[java-shib-common COMMIT] /branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/resolver...
noreply at shibboleth.net
noreply at shibboleth.net
Sat Nov 1 11:34:04 EDT 2014
Author: rdw
Date: Sat Nov 1 11:34:04 2014
New Revision: 1119
URL: http://svn.shibboleth.net/view/java-shib-common?rev=1119&view=rev
Log:
SIDP-622/SC-199 Clone from attribute definitions.
Modified:
branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/resolver/provider/attributeDefinition/ScriptedAttributeDefinition.java
Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/resolver/provider/attributeDefinition/ScriptedAttributeDefinition.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/resolver/provider/attributeDefinition/ScriptedAttributeDefinition.java?rev=1119&r1=1118&r2=1119&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/resolver/provider/attributeDefinition/ScriptedAttributeDefinition.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/resolver/provider/attributeDefinition/ScriptedAttributeDefinition.java Sat Nov 1 11:34:04 2014
@@ -174,13 +174,12 @@
ScriptContext.ENGINE_SCOPE);
ResolutionPlugIn plugin;
- Map<String, BaseAttribute> attributes;
- BaseAttribute attribute;
if (!getDependencyIds().isEmpty()) {
for (String dependency : getDependencyIds()) {
plugin = resolutionContext.getResolvedPlugins().get(dependency);
if (plugin instanceof DataConnector) {
+ final Map<String, BaseAttribute> attributes;
attributes = ((DataConnector) plugin).resolve(resolutionContext);
if (attributes != null) {
for (BaseAttribute attr : attributes.values()) {
@@ -193,9 +192,15 @@
}
}
} else if (plugin instanceof AttributeDefinition) {
+ final BaseAttribute attribute;
attribute = ((AttributeDefinition) plugin).resolve(resolutionContext);
if (attribute != null) {
- scriptContext.setAttribute(attribute.getId(), attribute, ScriptContext.ENGINE_SCOPE);
+ final BasicAttribute copy = new BasicAttribute(attribute.getId());
+ copy.getDisplayDescriptions().putAll(attribute.getDisplayDescriptions());
+ copy.getDisplayNames().putAll(attribute.getDisplayNames());
+ copy.setValueComparator(attribute.getValueComparator());
+ copy.setValues(attribute.getValues());
+ scriptContext.setAttribute(attribute.getId(), copy, ScriptContext.ENGINE_SCOPE);
}
}
}
More information about the commits
mailing list