org.globus.mds.usefulrp.rpprovider
Class ArrayValueResourcePropertyProvider

java.lang.Object
  extended byorg.globus.wsrf.impl.BaseResourceProperty
      extended byorg.globus.wsrf.impl.ReflectionResourceProperty
          extended byorg.globus.mds.usefulrp.rpprovider.BaseResourcePropertyProvider
              extended byorg.globus.mds.usefulrp.rpprovider.ArrayValueResourcePropertyProvider
All Implemented Interfaces:
org.globus.wsrf.ResourceProperty

public class ArrayValueResourcePropertyProvider
extends BaseResourcePropertyProvider

Generic class for using arbitrary ResourcePropertyElementProducer plugins to generate Resource Property value(s) for a configuration-named dynamic Resource Property.

The ArrayValueResourcePropertyProvider class is suitable for use in situations where one or more ResourcePropertyElementProducers are configured to generate data values for the named Resource Property and when complex processing or merging of output fragments (or a more specalized implmentation) is not necessary. The intended usage of this class is in scenarios where the developer has existing XML data that can be easily imported with one of the pre-existing ResourcePropertyElementProducer classes.

Using the ResourcePropertyProviderConfig object, it is possible to configure ArrayValueResourcePropertyProvider to import well-formed XML data from a variety of input sources and represent that data as admin-specified ResourceProperty values. The ArrayValueResourcePropertyProvider class provides a reusable mechanism to import such data without the developer having to write a specialized ResourceProperty implementation of his/her own.

The following simplifying assumptions are made about the ArrayValueResourcePropertyProvider data structure:

1. The cardinal order of the result values of the Resource Property will match that of the cardinal order of the ResourcePropertyElementProducer configuration blocks found in the ResourcePropertyProviderConfig parameter. In other words, the RP value [0] will contain the result output from the execution of ResourcePropertyProviderConfig.getResourcePropertyElementProducers()[0], and so on.

Note: It is important to keep the ordering restriction in mind when enumerating the ResourcePropertyElementProducers in the ResourcePropertyProviderConfig configuration file, as the order of the result data array will mirror that which is found in the file.

2. The XML output for any configured producer should have as its root element an element with a QName that matches the QName of the Resource Property as configured in the ResourcePropertyProviderConfig.resourcePropertyName parameter.

Note: If the XML output of the producer does NOT contain such a root, a new root will be created that matches the RP QName and the XML output from the ResourcePropertyElementProducer will be "wrapped" as a child element of this new root element.


Field Summary
protected  TransformElementListener[] listeners
           
protected  ArrayList resultElements
           
 
Fields inherited from class org.globus.mds.usefulrp.rpprovider.BaseResourcePropertyProvider
config, timerManager
 
Fields inherited from class org.globus.wsrf.impl.BaseResourceProperty
metaData
 
Constructor Summary
ArrayValueResourcePropertyProvider(ResourcePropertyProviderConfig config)
           
 
Method Summary
 Object[] getDynamicValue()
           
 void initialize()
           
 
Methods inherited from class org.globus.mds.usefulrp.rpprovider.BaseResourcePropertyProvider
finalize, getConfig, getTimerManager
 
Methods inherited from class org.globus.wsrf.impl.ReflectionResourceProperty
add, clear, get, getValueSimple, isArray, isEmpty, iterator, remove, set, setObject, setPropertyName, size, toElements, toSOAPElements
 
Methods inherited from class org.globus.wsrf.impl.BaseResourceProperty
convert, convertObject, convertPrimitive, getMetaData, setMetaData
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected TransformElementListener[] listeners

resultElements

protected ArrayList resultElements
Constructor Detail

ArrayValueResourcePropertyProvider

public ArrayValueResourcePropertyProvider(ResourcePropertyProviderConfig config)
                                   throws Exception
Method Detail

initialize

public void initialize()
                throws org.globus.wsrf.ResourcePropertyException
Throws:
org.globus.wsrf.ResourcePropertyException

getDynamicValue

public Object[] getDynamicValue()


Copyright © 1999-2006 University of Chicago. All rights reserved.