org.ow2.petals.admin.api
Class ArtifactAdministration

java.lang.Object
  extended by org.ow2.petals.admin.api.ArtifactAdministration

public abstract class ArtifactAdministration
extends java.lang.Object

Author:
Nicolas Oddoux - EBM WebSourcing

Constructor Summary
protected ArtifactAdministration()
           
 
Method Summary
 void deployAndStartArtifact(java.net.URL artifactUrl)
           
 void deployAndStartArtifact(java.net.URL artifactUrl, java.util.Properties configurationProperties)
           
 void deployAndStartArtifact(java.net.URL artifactUrl, java.net.URL configurationFile)
           
 void deployAndStartArtifacts(java.net.URL[] artifactsUrl)
          Deploy and start all specified artifacts taking into account the artifact type.
abstract  Artifact getArtifact(java.lang.String type, java.lang.String name)
           Create an artifact with this type and name.
 Artifact getArtifactInfo(java.lang.String type, java.lang.String name)
           Get information about an artifact already deployed.
 Artifact getArtifactInfo(java.net.URL artifactUrl)
           
abstract  java.util.List<Artifact> listArtifacts()
           
 void startArtifact(java.lang.String type, java.lang.String name)
          Start an artifact.
 void startArtifact(java.net.URL artifactUrl)
           
abstract  void stopAndUndeployAllArtifacts()
           
 void stopAndUndeployArtifact(java.lang.String type, java.lang.String name)
          Stop and undeploy an artifact.
 void stopAndUndeployArtifact(java.net.URL artifactUrl)
           
 void stopArtifact(java.lang.String type, java.lang.String name)
          Stop an artifact.
 void stopArtifact(java.net.URL artifactUrl)
          Stop artifact
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactAdministration

protected ArtifactAdministration()
Method Detail

deployAndStartArtifact

public void deployAndStartArtifact(java.net.URL artifactUrl)
                            throws ArtifactAdministrationException
Throws:
ArtifactAdministrationException

deployAndStartArtifact

public void deployAndStartArtifact(java.net.URL artifactUrl,
                                   java.util.Properties configurationProperties)
                            throws ArtifactAdministrationException
Throws:
ArtifactAdministrationException

deployAndStartArtifact

public void deployAndStartArtifact(java.net.URL artifactUrl,
                                   java.net.URL configurationFile)
                            throws ArtifactAdministrationException
Throws:
ArtifactAdministrationException

startArtifact

public void startArtifact(java.net.URL artifactUrl)
                   throws ArtifactAdministrationException
Throws:
ArtifactAdministrationException

startArtifact

public void startArtifact(java.lang.String type,
                          java.lang.String name)
                   throws UnsupportedArtifactTypeException,
                          ArtifactNotFoundException,
                          ArtifactTypeIsNeededException,
                          ArtifactAdministrationException

Start an artifact.

The artifact type is needed to distinct betwwen two JBI artifacts having the same identifier.

Parameters:
type - The nature (SL, SA, BC, SA) of the artifact to stop.
name - The JBI identifier of the artifact to stop.
Throws:
UnsupportedArtifactTypeException - type is a not supported artifact type.
ArtifactNotFoundException - No artifact found.
ArtifactTypeIsNeededException - Several artifacts match the name, the artifact type MUST be provided to be able to find the right artifact.
ArtifactAdministrationException - An error occurs retrieving the artifact.

stopArtifact

public void stopArtifact(java.net.URL artifactUrl)
                  throws ArtifactAdministrationException
Stop artifact

Parameters:
artifactUrl -
Throws:
ArtifactAdministrationException

stopArtifact

public void stopArtifact(java.lang.String type,
                         java.lang.String name)
                  throws UnsupportedArtifactTypeException,
                         ArtifactNotFoundException,
                         ArtifactTypeIsNeededException,
                         ArtifactAdministrationException

Stop an artifact.

The artifact type is needed to distinct betwwen two JBI artifacts having the same identifier.

Parameters:
type - The nature (SL, SA, BC, SA) of the artifact to stop.
name - The JBI identifier of the artifact to stop.
Throws:
UnsupportedArtifactTypeException - type is a not supported artifact type.
ArtifactNotFoundException - No artifact found.
ArtifactTypeIsNeededException - Several artifacts match the name, the artifact type MUST be provided to be able to find the right artifact.
ArtifactAdministrationException - An error occurs retrieving the artifact.

stopAndUndeployArtifact

public void stopAndUndeployArtifact(java.net.URL artifactUrl)
                             throws ArtifactAdministrationException
Throws:
ArtifactAdministrationException

stopAndUndeployArtifact

public void stopAndUndeployArtifact(java.lang.String type,
                                    java.lang.String name)
                             throws UnsupportedArtifactTypeException,
                                    ArtifactNotFoundException,
                                    ArtifactTypeIsNeededException,
                                    ArtifactAdministrationException

Stop and undeploy an artifact.

The artifact type is needed to distinct betwwen two JBI artifacts having the same identifier.

Throws:
UnsupportedArtifactTypeException - type is a not supported artifact type.
ArtifactNotFoundException - No artifact found.
ArtifactTypeIsNeededException - Several artifacts match the name, the artifact type MUST be provided to be able to find the right artifact.
ArtifactAdministrationException - An error occurs retrieving the artifact.

getArtifactInfo

public Artifact getArtifactInfo(java.net.URL artifactUrl)
                         throws ArtifactAdministrationException
Throws:
ArtifactAdministrationException

getArtifactInfo

public Artifact getArtifactInfo(java.lang.String type,
                                java.lang.String name)
                         throws UnsupportedArtifactTypeException,
                                ArtifactNotFoundException,
                                ArtifactTypeIsNeededException,
                                ArtifactAdministrationException

Get information about an artifact already deployed.

The artifact type is needed to distinct betwwen two JBI artifacts having the same identifier.

Parameters:
type - artifact type (SL,BC,SE,SA). Can be null.
name - Artifact identifier. Not null.
Throws:
UnsupportedArtifactTypeException - type is a not supported artifact type.
ArtifactNotFoundException - No artifact found.
ArtifactTypeIsNeededException - Several artifacts match the name, the artifact type MUST be provided to be able to find the right artifact.
ArtifactAdministrationException - An error occurs retrieving the artifact.

deployAndStartArtifacts

public void deployAndStartArtifacts(java.net.URL[] artifactsUrl)
                             throws ArtifactAdministrationException
Deploy and start all specified artifacts taking into account the artifact type.

Parameters:
artifactsUrl - artifacts to deploy and start
Throws:
ArtifactAdministrationException

stopAndUndeployAllArtifacts

public abstract void stopAndUndeployAllArtifacts()
                                          throws ArtifactAdministrationException
Throws:
ArtifactAdministrationException

listArtifacts

public abstract java.util.List<Artifact> listArtifacts()
                                                throws ArtifactAdministrationException
Throws:
ArtifactAdministrationException

getArtifact

public abstract Artifact getArtifact(java.lang.String type,
                                     java.lang.String name)
                              throws UnsupportedArtifactTypeException,
                                     ArtifactNotFoundException,
                                     ArtifactTypeIsNeededException,
                                     ArtifactAdministrationException

Create an artifact with this type and name. The artifact to return is resolved by the underlying implementation.

The artifact type is needed to distinct betwwen two JBI artifacts having the same identifier.

Parameters:
type - artifact type (SL,BC,SE,SA). Can be null.
name - Artifact identifier. Not null.
Returns:
Throws:
UnsupportedArtifactTypeException - type is a not supported artifact type.
ArtifactNotFoundException - No artifact found.
ArtifactTypeIsNeededException - Several artifacts match the name, the artifact type MUST be provided to be able to find the right artifact.
ArtifactAdministrationException - An error occurs retrieving the artifact.


Copyright © 2005-2012 Petals Link (EBM Websourcing). All Rights Reserved.