edu.internet2.middleware.grouper.app.subectSource.SubjectAttributeNameOptionValues Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grouper Show documentation
Show all versions of grouper Show documentation
Internet2 Groups Management Toolkit
package edu.internet2.middleware.grouper.app.subectSource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import edu.internet2.middleware.grouper.app.config.GrouperConfigurationModuleAttribute;
import edu.internet2.middleware.grouper.cfg.dbConfig.OptionValueDriver;
import edu.internet2.middleware.grouper.util.GrouperUtil;
import edu.internet2.middleware.grouperClient.collections.MultiKey;
import org.apache.commons.lang3.StringUtils;
public class SubjectAttributeNameOptionValues implements OptionValueDriver {
private Map configSuffixToConfigModuleAttribute;
@Override
public void setConfigSuffixToConfigModuleAttribute(
Map configSuffixToConfigModuleAttribute) {
this.configSuffixToConfigModuleAttribute = configSuffixToConfigModuleAttribute;
}
@Override
public List retrieveKeysAndLabels() {
GrouperConfigurationModuleAttribute grouperConfigurationModuleAttribute = configSuffixToConfigModuleAttribute.get("numberOfAttributes");
int countOfAttributes = GrouperUtil.intValue(grouperConfigurationModuleAttribute.getValueOrExpressionEvaluation(), 0);
List result = new ArrayList();
for (int i=0; i