com.adobe.idp.dsc.registry.component.client
Class ComponentRegistryClient

java.lang.Object
  extended by com.adobe.idp.dsc.registry.component.client.ComponentRegistryClient
All Implemented Interfaces:
ComponentRegistry

public class ComponentRegistryClient
extends java.lang.Object
implements ComponentRegistry

The client implementation of the Component Registry. It provides clients the ability to query the metadata and state of a component, to install and uninstall components, and to toggle the state of a component from RUNNING to STOPPED.


Field Summary
 
Fields inherited from interface com.adobe.idp.dsc.registry.component.ComponentRegistry
SERVICE_ID
 
Constructor Summary
ComponentRegistryClient(ServiceClientFactory clientServiceFactory)
          The constructor for creating a Component Registry client instance.
 
Method Summary
 void clearCache()
          Clears any caching of components.
 void forceUninstall(Component aComponent)
          Forces the uninstall of a component, calling its Bootstrap interface and removing it from the container.
 Component getComponent(java.lang.String aComponentId, java.lang.String aVersion)
          Retrieves the specified version of a component or throws a ComponentNotFoundException if it does not exist.
 java.util.List getComponents()
          Retrieves a list of all the components installed in the container.
 java.util.List getComponents(java.lang.String aComponentId)
          Retrieves all versions with the specified component identifier.
 Component install(byte[] componentArchiveByteArray)
          Installs a component using a byte array, calling its Bootstrap interface and leaving the component in a STOPPED state.
 Component install(Document componentArchiveDocument)
          Installs a component, calling its Bootstrap interface and leaving the component in a STOPPED state.
 Component load(Component aComponent)
          Loads a component, calling its Bootstrap interface and leaving the component in a STOPPED state.
 Component modify(ModifyComponentInfo aInfo)
          Modifies a component with the specified component information.
 Component start(Component aComponent)
          Starts a component, calling its LifeCycle interface and leaving the component in a RUNNING state.
 Component stop(Component aComponent)
          Stops a component, calling its LifeCycle interface and leaving the component in a STOPPED state.
 void uninstall(Component aComponent)
          Uninstalls a component, calling its Bootstrap interface and removing it from the container.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.adobe.idp.dsc.registry.component.ComponentRegistry
start
 

Constructor Detail

ComponentRegistryClient

public ComponentRegistryClient(ServiceClientFactory clientServiceFactory)
The constructor for creating a Component Registry client instance.

Parameters:
clientServiceFactory - A ServiceClientFactory instance with valid credentials of the server where the service is deployed.
Method Detail

getComponents

public java.util.List getComponents()
Retrieves a list of all the components installed in the container.

Specified by:
getComponents in interface ComponentRegistry
Returns:
A list of all the components installed in the container.

getComponents

public java.util.List getComponents(java.lang.String aComponentId)
Retrieves all versions with the specified component identifier.

Specified by:
getComponents in interface ComponentRegistry
Parameters:
aComponentId - The component identifier.
Returns:
A list of all the components matching the specified component identifier.

getComponent

public Component getComponent(java.lang.String aComponentId,
                              java.lang.String aVersion)
                       throws ComponentNotFoundException
Retrieves the specified version of a component or throws a ComponentNotFoundException if it does not exist.

Specified by:
getComponent in interface ComponentRegistry
Parameters:
aComponentId - The identifier of the component to return.
aVersion - The version number of the component to return.
Returns:
The specified component.
Throws:
ComponentNotFoundException

install

public Component install(Document componentArchiveDocument)
                  throws RegistryException
Installs a component, calling its Bootstrap interface and leaving the component in a STOPPED state.

Specified by:
install in interface ComponentRegistry
Parameters:
componentArchiveDocument - A valid Document representing the bits of the underlying component jar.
Returns:
The component that was installed.
Throws:
RegistryException

install

public Component install(byte[] componentArchiveByteArray)
                  throws RegistryException
Installs a component using a byte array, calling its Bootstrap interface and leaving the component in a STOPPED state. The byte array is expected to by a LC Component JAR file. In most circumstances calling the overloaded version of this method that takes a com.adobe.idp.Document object is the preferred method since the Document object is a more efficient mechansim of transporting large document objects.

Specified by:
install in interface ComponentRegistry
Parameters:
componentArchiveByteArray - A byte array representing the bits of the underlying component jar.
Returns:
The component that was installed.
Throws:
RegistryException

modify

public Component modify(ModifyComponentInfo aInfo)
                 throws RegistryException
Modifies a component with the specified component information.

Specified by:
modify in interface ComponentRegistry
Parameters:
aInfo - The component information with which to modify the component.
Returns:
The modified component.
Throws:
RegistryException

start

public Component start(Component aComponent)
                throws RegistryException
Starts a component, calling its LifeCycle interface and leaving the component in a RUNNING state.

Specified by:
start in interface ComponentRegistry
Parameters:
aComponent - The component to start.
Returns:
component The started component.
Throws:
RegistryException

stop

public Component stop(Component aComponent)
               throws RegistryException
Stops a component, calling its LifeCycle interface and leaving the component in a STOPPED state.

Specified by:
stop in interface ComponentRegistry
Parameters:
aComponent - The component to stop.
Returns:
The stopped component.
Throws:
RegistryException

load

public Component load(Component aComponent)
               throws RegistryException
Loads a component, calling its Bootstrap interface and leaving the component in a STOPPED state.

Parameters:
aComponent - The component to load.
Returns:
The component that was loaded.
Throws:
RegistryException

uninstall

public void uninstall(Component aComponent)
               throws RegistryException
Uninstalls a component, calling its Bootstrap interface and removing it from the container.

Specified by:
uninstall in interface ComponentRegistry
Parameters:
aComponent - The component to uninstall.
Throws:
RegistryException

forceUninstall

public void forceUninstall(Component aComponent)
                    throws RegistryException
Forces the uninstall of a component, calling its Bootstrap interface and removing it from the container.

Specified by:
forceUninstall in interface ComponentRegistry
Parameters:
aComponent - The component to uninstall.
Throws:
RegistryException

clearCache

public void clearCache()
Clears any caching of components.

Specified by:
clearCache in interface ComponentRegistry


[an error occurred while processing this directive] [an error occurred while processing this directive]