net.dpml.runtime
Class ComponentStrategyHandler

java.lang.Object
  extended by net.dpml.runtime.ComponentStrategyHandler
All Implemented Interfaces:
StrategyHandler

public class ComponentStrategyHandler
extends Object
implements StrategyHandler

Strategy handler for the component model.

Version:
2.1.0
Author:
Digital Product Management Library

Field Summary
static String NAMESPACE
          Constant XSD namespace value.
 
Constructor Summary
ComponentStrategyHandler()
           
 
Method Summary
 Strategy build(ClassLoader classloader, Element element, Resolver resolver, String partition, String query, boolean validate)
          Construct a strategy definition using a supplied element and value resolver.
 Component newComponent(Class<?> c, String name)
          Creation of a new component strategy handler for a supplied class.
 Strategy newStrategy(Class<?> c)
          Creation of a new component strategy handler for a supplied class.
 Strategy newStrategy(Class<?> c, String name)
          Creation of a new component strategy handler for a supplied class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAMESPACE

public static final String NAMESPACE
Constant XSD namespace value.

See Also:
Constant Field Values
Constructor Detail

ComponentStrategyHandler

public ComponentStrategyHandler()
Method Detail

newStrategy

public Strategy newStrategy(Class<?> c)
                     throws IOException
Creation of a new component strategy handler for a supplied class.

Specified by:
newStrategy in interface StrategyHandler
Parameters:
c - the implementation class
Returns:
the new strategy handler
Throws:
IOException - if an error occurs in strategy creation

newStrategy

public Strategy newStrategy(Class<?> c,
                            String name)
                     throws IOException
Creation of a new component strategy handler for a supplied class.

Specified by:
newStrategy in interface StrategyHandler
Parameters:
c - the implementation class
name - the strategy instance name
Returns:
the new strategy handler
Throws:
IOException - if an error occurs in strategy creation

newComponent

public Component newComponent(Class<?> c,
                              String name)
                       throws IOException
Creation of a new component strategy handler for a supplied class.

Parameters:
c - the implementation class
name - the strategy instance name
Returns:
the new strategy handler
Throws:
IOException - if an error occurs in strategy creation

build

public Strategy build(ClassLoader classloader,
                      Element element,
                      Resolver resolver,
                      String partition,
                      String query,
                      boolean validate)
               throws IOException
Construct a strategy definition using a supplied element and value resolver.

Specified by:
build in interface StrategyHandler
Parameters:
classloader - the operational classloader
element - the DOM element definining the deployment strategy
resolver - symbolic property resolver
partition - the enclosing partition
query - the query fragment to applied to the component context definition
validate - the validation policy
Returns:
the strategy definition
Throws:
IOException - if an I/O error occurs