org.ow2.jasmine.deployme
Class DeployMeService

java.lang.Object
  extended by org.ow2.jasmine.deployme.DeployMeService
All Implemented Interfaces:
IDeployMeService

public class DeployMeService
extends Object
implements IDeployMeService

Manage deployment of topology

Author:
Remy Bresson, Jeremy Cazaux (Conversion into an OSGi service)

Field Summary
protected static org.ow2.util.log.Log logger
          The logger
protected  Map<String,Node> namespaces
          Namespaces of the XML document
protected  Object topology
          The loaded topology
static Pattern XMLNS_PATTERN
          XMLNS pattern
 
Constructor Summary
DeployMeService()
          Default constructor
 
Method Summary
 void bindDeploymeExtension(IDeploymeExtension deploymeExtension)
           
 void bindDeploymeModule(IDeploymeModule deploymeModule)
           
 void deploy(String topologyXml, String machine, String domain, String server, String cluster)
          
 void deploy(URL topologyUrl, String machine, String domain, String server, String cluster)
          
 IDeployme getDeployme()
           
 IDeployme getInstance()
           
 IServer getServer(String domainName, String serverName)
          
 Object getTopology()
          Deprecated. 
 void initDeployme()
          Initialize IDeployme component
 void loadTopology(String topology)
          Load the topology from the xml string topology using the schema from schemaUrl.
 void loadTopology(URL urlTopology)
          Load the topology from the url urlTopology using the schema from schemaUrl.
 void unbindDeploymeExtension(IDeploymeExtension deploymeExtension)
           
 void unbindDeploymeModule(IDeploymeModule deploymeModule)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topology

protected Object topology
The loaded topology


namespaces

protected Map<String,Node> namespaces
Namespaces of the XML document


logger

protected static org.ow2.util.log.Log logger
The logger


XMLNS_PATTERN

public static final Pattern XMLNS_PATTERN
XMLNS pattern

Constructor Detail

DeployMeService

public DeployMeService()
Default constructor

Method Detail

getTopology

@Deprecated
public Object getTopology()
Deprecated. 

Getter for topology.

Returns:
the topology

deploy

public void deploy(URL topologyUrl,
                   String machine,
                   String domain,
                   String server,
                   String cluster)
            throws SAXException,
                   javax.xml.bind.JAXBException,
                   IOException

Specified by:
deploy in interface IDeployMeService
Throws:
SAXException
javax.xml.bind.JAXBException
IOException

deploy

public void deploy(String topologyXml,
                   String machine,
                   String domain,
                   String server,
                   String cluster)
            throws IOException,
                   SAXException,
                   javax.xml.bind.JAXBException

Specified by:
deploy in interface IDeployMeService
Throws:
IOException
SAXException
javax.xml.bind.JAXBException

initDeployme

public void initDeployme()
Initialize IDeployme component


getDeployme

public IDeployme getDeployme()
Returns:
IDeployme

loadTopology

public void loadTopology(URL urlTopology)
                  throws SAXException,
                         javax.xml.bind.JAXBException,
                         IOException
Load the topology from the url urlTopology using the schema from schemaUrl. Store the topology on DeployMeService.topology variable.

Parameters:
urlTopology - Url of the topology on xml format
Throws:
javax.xml.bind.JAXBException - JAXB exception.
SAXException - SAX exception.
IOException - If urlTopology cannot be retrieved.

loadTopology

public void loadTopology(String topology)
                  throws SAXException,
                         javax.xml.bind.JAXBException,
                         IOException
Load the topology from the xml string topology using the schema from schemaUrl. Store the topology on DeployMeService.topology variable.

Parameters:
topology - Url of the topology on xml format
Throws:
javax.xml.bind.JAXBException - JAXB exception.
SAXException - SAX exception.
IOException - If urlTopology cannot be retrieved.

bindDeploymeExtension

public void bindDeploymeExtension(IDeploymeExtension deploymeExtension)
Parameters:
deploymeExtension - The IDeploymeExtension to add

unbindDeploymeExtension

public void unbindDeploymeExtension(IDeploymeExtension deploymeExtension)
Parameters:
deploymeExtension - The IDeploymeExtension to remove

bindDeploymeModule

public void bindDeploymeModule(IDeploymeModule deploymeModule)
Parameters:
deploymeModule - The IDeploymeModule to add

unbindDeploymeModule

public void unbindDeploymeModule(IDeploymeModule deploymeModule)
Parameters:
deploymeModule - The IDeploymeModule to remove

getInstance

public IDeployme getInstance()
Specified by:
getInstance in interface IDeployMeService
Returns:
the deployme instance

getServer

public IServer getServer(String domainName,
                         String serverName)

Specified by:
getServer in interface IDeployMeService


Copyright © 2012 OW2 Consortium. All Rights Reserved.