Search in sources :

Example 1 with UserPropertiesConfigImpl

use of org.olat.user.propertyhandlers.UserPropertiesConfigImpl in project OpenOLAT by OpenOLAT.

the class UsrPropCfgManager method setUserManagerProperties.

/**
 * updates the userManager with our current config
 */
private void setUserManagerProperties() {
    UserPropertiesConfigImpl upConfig = new UserPropertiesConfigImpl();
    List<UserPropertyHandler> handlers = new ArrayList<UserPropertyHandler>();
    for (UserPropertyHandler handler : cfgObject.getPropertyHandlers()) {
        if (cfgObject.isActiveHandler(handler))
            handlers.add(handler);
    }
    upConfig.setUserPropertyHandlers(handlers);
    upConfig.setUserPropertyUsageContexts(cfgObject.getUsageContexts());
    userManager.setUserPropertiesConfig(upConfig);
}
Also used : ArrayList(java.util.ArrayList) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler) UserPropertiesConfigImpl(org.olat.user.propertyhandlers.UserPropertiesConfigImpl)

Example 2 with UserPropertiesConfigImpl

use of org.olat.user.propertyhandlers.UserPropertiesConfigImpl in project openolat by klemens.

the class UsrPropCfgManager method setUserManagerProperties.

/**
 * updates the userManager with our current config
 */
private void setUserManagerProperties() {
    UserPropertiesConfigImpl upConfig = new UserPropertiesConfigImpl();
    List<UserPropertyHandler> handlers = new ArrayList<UserPropertyHandler>();
    for (UserPropertyHandler handler : cfgObject.getPropertyHandlers()) {
        if (cfgObject.isActiveHandler(handler))
            handlers.add(handler);
    }
    upConfig.setUserPropertyHandlers(handlers);
    upConfig.setUserPropertyUsageContexts(cfgObject.getUsageContexts());
    userManager.setUserPropertiesConfig(upConfig);
}
Also used : ArrayList(java.util.ArrayList) UserPropertyHandler(org.olat.user.propertyhandlers.UserPropertyHandler) UserPropertiesConfigImpl(org.olat.user.propertyhandlers.UserPropertiesConfigImpl)

Aggregations

ArrayList (java.util.ArrayList)2 UserPropertiesConfigImpl (org.olat.user.propertyhandlers.UserPropertiesConfigImpl)2 UserPropertyHandler (org.olat.user.propertyhandlers.UserPropertyHandler)2