org.gcube.contentmanagement.contentmanager.plugin.delegates
Class FactoryDelegate

java.lang.Object
  extended by org.gcube.contentmanagement.contentmanager.plugin.delegates.Delegate
      extended by org.gcube.contentmanagement.contentmanager.plugin.delegates.FactoryDelegate
Direct Known Subclasses:
DefaultFactory

public abstract class FactoryDelegate
extends Delegate

Extensions of the factory port-type of the service.

A FactoryDelegate is dynamically bound to the Factory port-type in order to create one or more collections from given creation parameters.

Subclasses are expected to return collections as soon as their identifiers can be found in or computed from the creation parameters.

Author:
Fabio Simeoni (University of Strathclyde)
See Also:
Delegate

Constructor Summary
FactoryDelegate()
           
 
Method Summary
abstract  java.util.List<? extends Collection> create(org.w3c.dom.Element parameters)
          Invoked by the service to create one or more collections from given creation parameters.
 
Methods inherited from class org.gcube.contentmanagement.contentmanager.plugin.delegates.Delegate
getScopeManager, getSecurityManager, setResource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactoryDelegate

public FactoryDelegate()
Method Detail

create

public abstract java.util.List<? extends Collection> create(org.w3c.dom.Element parameters)
                                                     throws java.lang.Exception
Invoked by the service to create one or more collections from given creation parameters.

Subclasses are expected to validate parameters and return collections as soon as the their identifiers can be found in, or computed from, the creation parameters. Collection-specific staging processes ought to be performed during the initialisation of the collection (cf. Collection#initialise(Element)), if and when the service requires it.

Parameters:
parameters - the parameters, served as an Element.
Returns:
the collections.
Throws:
java.lang.Exception - if the parameters are malformed or if collection identifiers could not be derived from them.