// Names of source attributes in a Set for convenience of checking membership
private Set<String> sourceNamesSet;
- // Number of values that each source attribute has (must be same for all attributes)
- private int valueCount = -1;
-
public CompositeAttributeDefinition(Element e) throws ResolutionPlugInException {
super(e);
* Get ordered attribute values for all source attributes from the dependent data connectors. The values of all
* multi-valued attribute MUST be ordered and MUST be of same size or else the results can be unpredictable.
*/
- private void addAttributesFromConnectors(Dependencies depends, Attributes sourceAttrs)
+ private void addAttributesFromConnectors(Dependencies depends, Attributes sourceAttrs, int valueCount)
throws ResolutionPlugInException {
Iterator connectorDependIt = connectorDependencyIds.iterator();
* Get ordered attribute values for all source attributes from the dependent attributes. The values of all
* multi-valued attribute MUST be ordered and MUST be of same size or else the results can be unpredictable.
*/
- private void addAttributesFromAttributeDependencies(Dependencies depends, Attributes sourceAttrs)
+ private void addAttributesFromAttributeDependencies(Dependencies depends, Attributes sourceAttrs, int valueCount)
throws ResolutionPlugInException {
Iterator attrDependIt = attributeDependencyIds.iterator();
super.resolve(attribute, principal, requester, responder, depends);
+ // Number of values that each source attribute has (must be same for all attributes)
+ int valueCount = -1;
+
// Collect attribute values from dependencies
BasicAttributes attributes = new BasicAttributes();
- addAttributesFromConnectors(depends, attributes);
- addAttributesFromAttributeDependencies(depends, attributes);
+ addAttributesFromConnectors(depends, attributes, valueCount);
+ addAttributesFromAttributeDependencies(depends, attributes, valueCount);
// If we got this far, all attributes are ordered and have 'valueCount' number of values
for (int i = 0; i < valueCount; i++) {