use of com.evolveum.midpoint.xml.ns._public.common.common_3.FileAppenderConfigurationType in project midpoint by Evolveum.
the class SystemConfigurationDto method init.
private void init(SystemConfigurationType config) {
if (config == null) {
return;
}
if (config.getGlobalAccountSynchronizationSettings() != null) {
AssignmentPolicyEnforcementType globalAEP = config.getGlobalAccountSynchronizationSettings().getAssignmentPolicyEnforcement();
aepLevel = AEPlevel.fromAEPLevelType(globalAEP);
}
CleanupPolicyType auditCleanup = config.getCleanupPolicy().getAuditRecords();
CleanupPolicyType taskCleanup = config.getCleanupPolicy().getClosedTasks();
auditCleanupValue = auditCleanup.getMaxAge().toString();
taskCleanupValue = taskCleanup.getMaxAge().toString();
passPolicyDto = loadPasswordPolicy(config);
securityPolicyDto = loadSecurityPolicy(config);
objectPolicyList = new ArrayList<>();
List<ObjectPolicyConfigurationType> objectPolicies = config.getDefaultObjectPolicyConfiguration();
if (objectPolicies != null && !objectPolicies.isEmpty()) {
for (ObjectPolicyConfigurationType policy : objectPolicies) {
objectPolicyList.add(new ObjectPolicyConfigurationTypeDto(policy));
}
} else {
objectPolicyList.add(new ObjectPolicyConfigurationTypeDto());
}
// NOTIFICATIONS
if (config.getNotificationConfiguration() != null) {
notificationConfig = new NotificationConfigurationDto(config.getNotificationConfiguration());
} else {
notificationConfig = new NotificationConfigurationDto();
}
// LOGGING
LoggingConfigurationType logging = config.getLogging();
if (logging != null) {
for (AppenderConfigurationType appender : logging.getAppender()) {
if (appender instanceof FileAppenderConfigurationType) {
appenders.add(new FileAppenderConfig((FileAppenderConfigurationType) appender));
} else {
appenders.add(new AppenderConfiguration(appender));
}
}
Collections.sort(appenders);
loggingConfig = new LoggingDto(config.getLogging());
} else {
loggingConfig = new LoggingDto();
}
loggingConfig.setAppenders(appenders);
// PROFILING
if (config.getProfilingConfiguration() != null) {
List<ClassLoggerConfigurationType> classLoggerConfig = config.getLogging() != null ? config.getLogging().getClassLogger() : null;
profilingDto = new ProfilingDto(config.getProfilingConfiguration(), classLoggerConfig);
} else {
profilingDto = new ProfilingDto();
}
profilingDto.setAppenders(appenders);
enableExperimentalCode = SystemConfigurationTypeUtil.isExperimentalCodeEnabled(config);
userDashboardLink = loadUserDashboardLink(config);
additionalMenuLink = loadAdditionalMenuItem(config);
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.FileAppenderConfigurationType in project midpoint by Evolveum.
the class LoggingConfigPanel method addFileAppenderPerformed.
private void addFileAppenderPerformed(AjaxRequestTarget target) {
LoggingDto dto = getModel().getObject();
FileAppenderConfig appender = new FileAppenderConfig(new FileAppenderConfigurationType());
appender.setEditing(true);
dto.getAppenders().add(appender);
target.add(getAppendersTable());
}
Aggregations