Search in sources :

Example 1 with SMSubConfigComparator

use of com.sun.identity.console.base.model.SMSubConfigComparator in project OpenAM by OpenRock.

the class AbstractAuditModel method getEventHandlerConfigurations.

/**
     * Get the configuration properties of all the audit event handlers.
     *
     * @return A list of config objects.
     */
public List<SMSubConfig> getEventHandlerConfigurations() throws AMConsoleException {
    List<SMSubConfig> subConfigModelList = new ArrayList<>();
    try {
        ServiceConfig serviceConfig = getServiceConfig();
        if (serviceConfig == null) {
            return subConfigModelList;
        }
        Set<String> auditHandlerNames = serviceConfig.getSubConfigNames();
        for (String name : auditHandlerNames) {
            ServiceConfig conf = serviceConfig.getSubConfig(name);
            subConfigModelList.add(new SMSubConfig(conf.getComponentName(), name, conf.getSchemaID()));
        }
        sort(subConfigModelList, new SMSubConfigComparator(Collator.getInstance(getUserLocale())));
    } catch (SMSException | SSOException e) {
        throw new AMConsoleException(getErrorString(e));
    }
    return subConfigModelList;
}
Also used : SMSubConfig(com.sun.identity.console.base.model.SMSubConfig) ServiceConfig(com.sun.identity.sm.ServiceConfig) SMSException(com.sun.identity.sm.SMSException) ArrayList(java.util.ArrayList) SSOException(com.iplanet.sso.SSOException) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) SMSubConfigComparator(com.sun.identity.console.base.model.SMSubConfigComparator)

Aggregations

SSOException (com.iplanet.sso.SSOException)1 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)1 SMSubConfig (com.sun.identity.console.base.model.SMSubConfig)1 SMSubConfigComparator (com.sun.identity.console.base.model.SMSubConfigComparator)1 SMSException (com.sun.identity.sm.SMSException)1 ServiceConfig (com.sun.identity.sm.ServiceConfig)1 ArrayList (java.util.ArrayList)1