Search in sources :

Example 1 with AttributeTranslator

use of org.olat.shibboleth.util.AttributeTranslator in project openolat by klemens.

the class AttributeEasyRowAdderController method getShibAttributes.

/**
 * Internal helper to create a sting array that contains all shibboleth attributes that can be selected in the drop down
 *
 * @return String[] - will never return null
 */
private String[] getShibAttributes() {
    if (shibbolethModule.isEnableShibbolethCourseEasyConfig()) {
        final AttributeTranslator attTrans = getAttributeTranslator();
        Set<String> attributes = attTrans.getTranslateableAttributes();
        final String[] outNames = new String[attributes.size()];
        int i = 0;
        for (final String attribute : attributes) {
            outNames[i] = attTrans.translateAttribute(attribute);
            i++;
        }
        return outNames;
    }
    return new String[0];
}
Also used : AttributeTranslator(org.olat.shibboleth.util.AttributeTranslator)

Example 2 with AttributeTranslator

use of org.olat.shibboleth.util.AttributeTranslator in project OpenOLAT by OpenOLAT.

the class AttributeEasyRowAdderController method getShibAttributes.

/**
 * Internal helper to create a sting array that contains all shibboleth attributes that can be selected in the drop down
 *
 * @return String[] - will never return null
 */
private String[] getShibAttributes() {
    if (shibbolethModule.isEnableShibbolethCourseEasyConfig()) {
        final AttributeTranslator attTrans = getAttributeTranslator();
        Set<String> attributes = attTrans.getTranslateableAttributes();
        final String[] outNames = new String[attributes.size()];
        int i = 0;
        for (final String attribute : attributes) {
            outNames[i] = attTrans.translateAttribute(attribute);
            i++;
        }
        return outNames;
    }
    return new String[0];
}
Also used : AttributeTranslator(org.olat.shibboleth.util.AttributeTranslator)

Aggregations

AttributeTranslator (org.olat.shibboleth.util.AttributeTranslator)2