try {
// load users to Factory Manager
SSDObjectArray ssdUsers = ssdSettingsData.getArray(HPIConstants.CONFIGURATIONS_USERS);
for (int i = 0; i < ssdUsers.getSize(); i++) {
SSDObjectNode ssdUser = ssdUsers.getNode(i);
String passphrase = ssdUser.getLeaf(HPIConstants.CONFIGURATIONS_USERS_PASSPHRASE).getValue();
String nickname = ssdUser.getLeaf(HPIConstants.CONFIGURATIONS_USERS_NICKNAME).getValue();
this.addUser(new User(nickname, passphrase));
}
// instantiate the data watcher object, because afeter it will be started to watch some directory(ies)
DataWatcher dataWatcher = new DataWatcher();
// first load to invokers SSD files
SSDObjectArray ssdMappedFolders = ssdSettingsData.getArray(HPIConstants.CONFIGURATIONS_MAPPED_FOLDER);
for (int i = 0; i < ssdMappedFolders.getSize(); i++) {
SSDObjectNode ssdMappedFolder = ssdMappedFolders.getNode(i);
File mappedFolder = null;
if (ssdMappedFolder.get(HPIConstants.CONFIGURATIONS_RELATIVE_SERVER) != null) {
mappedFolder = new File(System.getProperty(HPIConstants.ENV_HPI_BASE),
System.getProperty("file.separator") +
ssdMappedFolder.getLeaf(HPIConstants.CONFIGURATIONS_RELATIVE_SERVER).getValue());
} else if (ssdMappedFolder.get(HPIConstants.CONFIGURATIONS_CANONICAL_PATH) != null) {
mappedFolder = new File(ssdMappedFolder.getLeaf(HPIConstants.CONFIGURATIONS_CANONICAL_PATH).getValue());
} else throw new IllegalStateException("There's some wrong thing in the " + HPIConstants.CONFIGURATIONS_MAPPED_FOLDER);
for (File invokerFile : mappedFolder.listFiles(new FolderFilter())) {
this.addInvokerFile(invokerFile);
}