org.ow2.jasmine.deployme.extension
Class AbstractDeploymeExtension

java.lang.Object
  extended by org.ow2.jasmine.deployme.extension.AbstractDeploymeExtension
All Implemented Interfaces:
IDeploymeExtension

public abstract class AbstractDeploymeExtension
extends Object
implements IDeploymeExtension

Abstract deployme extension

Author:
Jeremy Cazaux

Field Summary
static String EOL
          EOL
protected  Class rootClass
          Root class
protected  List<URL> xsdUrls
          XSD URL
 
Constructor Summary
protected AbstractDeploymeExtension()
          Default constructor
 
Method Summary
 Object convert(Node localNode, Class rootClass, ClassLoader classLoader)
           
 String getNamespace()
          
protected  Source getSource(URL url)
           
protected  List<Source> getSources(List<URL> urls)
           
protected  List<Source> getXsdSources(List<String> resources)
           
protected  List<URL> getXsdURL(List<String> resources)
           
protected  URL getXsdURL(String resource)
           
protected  URL getXsdURL(String resource, Class clazz)
           
protected  Object unmarshall(Node node, Class<?> rootClass, List<Source> xsdSources, ClassLoader classLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.jasmine.deployme.api.extensions.IDeploymeExtension
applyConfiguration, convert, getJOnASService
 

Field Detail

EOL

public static final String EOL
EOL

See Also:
Constant Field Values

xsdUrls

protected List<URL> xsdUrls
XSD URL


rootClass

protected Class rootClass
Root class

Constructor Detail

AbstractDeploymeExtension

protected AbstractDeploymeExtension()
Default constructor

Method Detail

getXsdSources

protected List<Source> getXsdSources(List<String> resources)
                              throws DeploymeExtensionException
Throws:
DeploymeExtensionException

getXsdURL

protected List<URL> getXsdURL(List<String> resources)
                       throws DeploymeExtensionException
Parameters:
resources - List of resources
Returns:
the list of Source associate to the given resources list
Throws:
DeploymeExtensionException

getXsdURL

protected URL getXsdURL(String resource)
                 throws DeploymeExtensionException
Parameters:
resource - Resource
Returns:
the URL of the given resource
Throws:
DeploymeExtensionException

getXsdURL

protected URL getXsdURL(String resource,
                        Class clazz)
                 throws DeploymeExtensionException
Parameters:
resource - The resource to retrieve
clazz - A Class associated to the given resource (they should share the same classloader)
Returns:
the URL of the given resource
Throws:
DeploymeExtensionException

getSource

protected Source getSource(URL url)
                    throws DeploymeExtensionException
Parameters:
url - The URL
Returns:
the Source associated to the given URL
Throws:
DeploymeExtensionException

getSources

protected List<Source> getSources(List<URL> urls)
                           throws DeploymeExtensionException
Parameters:
urls - List of URL
Returns:
the list of Source associated to the list of url
Throws:
DeploymeExtensionException

unmarshall

protected Object unmarshall(Node node,
                            Class<?> rootClass,
                            List<Source> xsdSources,
                            ClassLoader classLoader)
                     throws DeploymeExtensionException
Parameters:
node - The node to unmarshall
rootClass - The root class of the node
xsdSources - XSD sources
classLoader - The classloader of the extension
Returns:
a JAXB object associated to the given node
Throws:
{@link - org.ow2.jasmine.deployme.api.extensions.DeploymeExtensionException} if unmarshall operation has failed
DeploymeExtensionException

getNamespace

public String getNamespace()

Specified by:
getNamespace in interface IDeploymeExtension

convert

public Object convert(Node localNode,
                      Class rootClass,
                      ClassLoader classLoader)
               throws DeploymeExtensionException
Parameters:
localNode - The node to unmarshall
rootClass - The root class of a node
classLoader - The classloader of the extension
Returns:
a JAXB object associated to the given node
Throws:
DeploymeExtensionException


Copyright © 2012 OW2 Consortium. All Rights Reserved.