You can remove a component by using the Java API. When
updating a component, you should remove the outdated component before
deploying the updated component. For example, if you develop a component
and then you want to deploy a newer version, remove the older component
prior to deploying the updated component. For information about
creating components, see Creating Your First Component.
Hinweis: You cannot remove a component by using web services.
Summary of stepsTo remove a component, perform the following tasks:
Include project files.
Create an Component Manager Client API object.
Retrieve the component to remove.
Determine the components state.
Uninstall the component.
Include project filesInclude necessary files into your development
project. If you are creating a client application by using Java,
include the necessary JAR files. If you are using web services,
make sure that you include the proxy files.
Create an Component Manager Client API objectBefore you can
programmatically perform an Component Manager service operation,
you must create a ComponentRegistryClient object.
Determine the state of the componentTo remove a component, first
ensure that it is not in a running state. If a component is running,
put the component into a stopped state.
Uninstall the componentAfter you stop the component and remove
its services, you can remove the component.
Remove components using the Java APIRemove a component by using the Java API:
Include project files
Include client JAR files,
such as adobe-workflow-client-sdk.jar, in your Java project’s class
path.
Create an Component Manager Client API object
Create a ServiceClientFactory object that
contains connection properties.
Create a ComponentRegistryClient object
by using its constructor and passing a ServiceClientFactory object
that contains connection properties.
Retrieve the component to remove
Retrieve the component
to remove by invoking the ComponentRegistryClient object’s getComponent method
and passing a string value that specifies the component identifier.
This method returns a Component object.
Determine the state of the component
Determine
whether the component is running by invoking the Component object’s getState method.
This method returns a static member of Component.
If the component is in a running state, this method returns Component.RUNNING.
If the component is in a running state, stop the component
by invoking the ComponentRegistryClient object’s stop method
and passing the Component object.
Uninstall the component
Uninstall the component by
invoking the ComponentRegistryClient object’s uninstall method
and passing the Component object.
|
|
|