Add JIT base provision and enrollment handlers #230
Merged
pahansith
merged 5 commits from rajitha/device-mgt-core:jit-feature
into master
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'rajitha/device-mgt-core:jit-feature'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Purpose
http://roadmap.entgra.net/issues/10270
http://roadmap.entgra.net/issues/10308
93a3d511a4
to5e65a74acd
1 year agoca2a15374e
to87ea4e642d
1 year agoprivate String getTemplateName(String deviceType, String prefix, String separator) throws NoSuchFileException {
String templateName = deviceType + separator + prefix;
File template = new File(CarbonUtils.getCarbonHome() + File.separator + "repository" + File.separator
Better to use StringBuilder to concatenate these values, since this is running inside a loop
return templateName;
}
String defaultTemplateName = "default" + separator + prefix;
File defaultTemplate = new File(CarbonUtils.getCarbonHome() + File.separator + "repository" + File.separator
Use StringBuilder
return defaultTemplateName;
}
String msg = "Didn't found template file for " + templateName;
Since msg variable is not using any other places, better to avoid using variable
Document JITConfigurationDoc = documentBuilder.parse(JITConfigurationFile);
JITConfigurationDoc.getDocumentElement().normalize();
Element enrollmentScopes;
if (Objects.equals(JITEnrollmentInfo.getOs(), "android")) {
Move these device type names and tagnames to a constant file
* @return boolean true when successful initialization, otherwise false
* @throws JITProvisionException throws when error occurred
*/
private boolean initializeJITConfigurations() throws JITProvisionException {
Why do we initiate this configuration by reading the file for each request? Since reading file operations are costly, better to initiate once and keep it in a dataholder
87ea4e642d
tob144be0f97
1 year ago9ae64c718c
into master 1 year agoReviewers
9ae64c718c
.