use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.
the class ViewLogFileAction method prepareLogFiles.
private Map<Integer, String> prepareLogFiles() {
Map<Integer, String> logFiles = new HashMap<Integer, String>();
int fileIndex = 0;
for (SimpleCustomProperty logTemplate : this.logViewerConfiguration.getLogTemplates()) {
String logTemplatePattern = logTemplate.getValue2();
if (StringHelper.isEmpty(logTemplatePattern)) {
continue;
}
String logTemplatePath = FilenameUtils.getFullPath(logTemplatePattern);
String logTemplateFile = FilenameUtils.getName(logTemplatePattern);
File logTemplateBaseDir = new File(logTemplatePath);
FileFilter fileFilter = new AndFileFilter(FileFileFilter.FILE, new WildcardFileFilter(logTemplateFile));
File[] files = logTemplateBaseDir.listFiles(fileFilter);
if (files == null) {
continue;
}
for (int i = 0; i < files.length; i++) {
logFiles.put(fileIndex++, files[i].getPath());
}
}
return logFiles;
}
use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.
the class ExternalIdGeneratorService method executeExternalGenerateIdMethod.
public String executeExternalGenerateIdMethod(CustomScriptConfiguration customScriptConfiguration, String appId, String idType, String idPrefix) {
try {
log.debug("Executing python 'generateId' method");
IdGeneratorType externalType = (IdGeneratorType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
return externalType.generateId(appId, idType, idPrefix, configurationAttributes);
} catch (Exception ex) {
log.error(ex.getMessage(), ex);
}
return null;
}
use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.
the class ExternalScimService method executeScimDeleteGroupMethod.
public boolean executeScimDeleteGroupMethod(GluuGroup group, CustomScriptConfiguration customScriptConfiguration) {
try {
log.debug("Executing python 'SCIM Delete Group' method");
ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
boolean result = externalType.deleteGroup(group, configurationAttributes);
log.debug("executeScimDeleteGroupMethod result = " + result);
return result;
} catch (Exception ex) {
ex.printStackTrace();
}
return false;
}
use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.
the class ExternalScimService method executeScimDeleteUserMethod.
public boolean executeScimDeleteUserMethod(GluuCustomPerson user, CustomScriptConfiguration customScriptConfiguration) {
try {
log.debug("Executing python 'SCIM Delete User' method");
ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
boolean result = externalType.deleteUser(user, configurationAttributes);
log.debug("executeScimDeleteUserMethod result = " + result);
return result;
} catch (Exception ex) {
ex.printStackTrace();
}
return false;
}
use of org.xdi.model.SimpleCustomProperty in project oxTrust by GluuFederation.
the class ExternalScimService method executeScimCreateUserMethod.
public boolean executeScimCreateUserMethod(GluuCustomPerson user, CustomScriptConfiguration customScriptConfiguration) {
try {
log.debug("Executing python 'SCIM Create User' method");
ScimType externalType = (ScimType) customScriptConfiguration.getExternalType();
Map<String, SimpleCustomProperty> configurationAttributes = customScriptConfiguration.getConfigurationAttributes();
boolean result = externalType.createUser(user, configurationAttributes);
log.debug("executeScimCreateUserMethod result = " + result);
return result;
} catch (Exception ex) {
ex.printStackTrace();
}
return false;
}
Aggregations