Search in sources :

Example 1 with StandardLoggerType

use of com.evolveum.midpoint.gui.impl.page.admin.configuration.component.StandardLoggerType in project midpoint by Evolveum.

the class LoggingPackageWrapperFactoryImpl method getPredefinedValues.

public LookupTableType getPredefinedValues(PrismProperty<T> item, WrapperContext wrapperContext) {
    LookupTableType lookupTable = new LookupTableType();
    List<LookupTableRowType> list = lookupTable.createRowList();
    List<StandardLoggerType> standardLoggers = EnumUtils.getEnumList(StandardLoggerType.class);
    for (StandardLoggerType standardLogger : standardLoggers) {
        LookupTableRowType row = new LookupTableRowType();
        row.setKey(standardLogger.getValue());
        row.setValue(standardLogger.getValue());
        PolyStringType label = new PolyStringType("StandardLoggerType." + standardLogger.name());
        PolyStringTranslationType translation = new PolyStringTranslationType();
        translation.setKey("StandardLoggerType." + standardLogger.name());
        label.setTranslation(translation);
        row.setLabel(label);
        list.add(row);
    }
    List<LoggingComponentType> componentLoggers = EnumUtils.getEnumList(LoggingComponentType.class);
    for (LoggingComponentType componentLogger : componentLoggers) {
        LookupTableRowType row = new LookupTableRowType();
        String value = ComponentLoggerType.getPackageByValue(componentLogger);
        row.setKey(value);
        row.setValue(value);
        PolyStringType label = new PolyStringType("LoggingComponentType." + componentLogger.name());
        PolyStringTranslationType translation = new PolyStringTranslationType();
        translation.setKey("LoggingComponentType." + componentLogger.name());
        label.setTranslation(translation);
        row.setLabel(label);
        list.add(row);
    }
    return lookupTable;
}
Also used : StandardLoggerType(com.evolveum.midpoint.gui.impl.page.admin.configuration.component.StandardLoggerType) PolyStringType(com.evolveum.prism.xml.ns._public.types_3.PolyStringType) LoggingComponentType(com.evolveum.midpoint.xml.ns._public.common.common_3.LoggingComponentType) LookupTableRowType(com.evolveum.midpoint.xml.ns._public.common.common_3.LookupTableRowType) LookupTableType(com.evolveum.midpoint.xml.ns._public.common.common_3.LookupTableType) PolyStringTranslationType(com.evolveum.prism.xml.ns._public.types_3.PolyStringTranslationType)

Aggregations

StandardLoggerType (com.evolveum.midpoint.gui.impl.page.admin.configuration.component.StandardLoggerType)1 LoggingComponentType (com.evolveum.midpoint.xml.ns._public.common.common_3.LoggingComponentType)1 LookupTableRowType (com.evolveum.midpoint.xml.ns._public.common.common_3.LookupTableRowType)1 LookupTableType (com.evolveum.midpoint.xml.ns._public.common.common_3.LookupTableType)1 PolyStringTranslationType (com.evolveum.prism.xml.ns._public.types_3.PolyStringTranslationType)1 PolyStringType (com.evolveum.prism.xml.ns._public.types_3.PolyStringType)1