Openwings API Documentation (v1.1)

net.openwings.install
Interface InstallerMBean

All Superinterfaces:
MBean

public interface InstallerMBean
extends MBean

This interface is a utility interface for a management bean that may optionally be provided by an Openwings Installer.

Through this interface component descriptors may be edited, dependency information may be obtained, and alternate descriptor versions may be created.

Since:
0.9.1

Method Summary
 InstallableComponentDescriptor cloneComponentDescriptor(InstallableComponentDescriptor descriptor, java.lang.String alternateName)
          This method is used to create alternate configurations of component descriptors in the Installer, so the same component may be run with different configurations.
 InstallableComponentDescriptor[] getComponents()
          This method returns an array of ComponentDescriptor for all components installed on the system.
 java.net.URL[] getInstallJarURLs(UniqueID uniqueID)
          This method is used to retrieve a list of URLs that represent download locations for all dependencies of this component, including the component itself.
 InstallableComponentDescriptor[] getResolvedDependencyComponents(UniqueID uniqueID, boolean recurse)
          This method is used to retrieve resolved dependencies of a component.
 java.lang.String[] getUnresolvedDependencyComponents(UniqueID uniqueID, boolean recurse)
          This method is used to retrieve unresolved dependencies of a component.
 InstallableComponentDescriptor overrideComponentDescriptor(InstallableComponentDescriptor descriptor)
          This method is used to override the descriptor for a component installed by the Installer service.
 
Methods inherited from interface net.openwings.management.MBean
getMBeanInfo
 

Method Detail

getComponents

public InstallableComponentDescriptor[] getComponents()
                                               throws java.rmi.RemoteException
This method returns an array of ComponentDescriptor for all components installed on the system. This method returns the same results as Installer.getComponents() and is duplicated in this interface for convenience.

Returns:
array of InstallableComponentDescriptors.
Throws:
java.rmi.RemoteException - for communication errors

overrideComponentDescriptor

public InstallableComponentDescriptor overrideComponentDescriptor(InstallableComponentDescriptor descriptor)
                                                           throws InstallException,
                                                                  java.rmi.RemoteException
This method is used to override the descriptor for a component installed by the Installer service. descriptor must have the same componentName, componentID, and version as the descriptor for a component already installed on the platform. The Installer is responsible for re-resolving the edited descriptor and notifying any registered InstallListeners

Parameters:
descriptor - edited component descriptor
Returns:
re-resolved component descriptor
Throws:
java.rmi.RemoteException - for communication errors
InstallException - if descriptor is not recognized by the Installer

cloneComponentDescriptor

public InstallableComponentDescriptor cloneComponentDescriptor(InstallableComponentDescriptor descriptor,
                                                               java.lang.String alternateName)
                                                        throws InstallException,
                                                               java.rmi.RemoteException
This method is used to create alternate configurations of component descriptors in the Installer, so the same component may be run with different configurations. The descriptor must have the same componentName, componentID, and version as the descriptor for a component already installed on the platform. The Installer is responsible for: The cloned descriptor is returned, which the user may then edit and set by calling overrideComponentDescriptor().

Parameters:
descriptor - component descriptor to be cloned
Returns:
cloned, resolved component descriptor
Throws:
java.rmi.RemoteException - for communication errors
InstallException - if descriptor is not recognized by the Installer, or if alternateName is null, the empty string, or any string that would cause an identical component name.

getResolvedDependencyComponents

public InstallableComponentDescriptor[] getResolvedDependencyComponents(UniqueID uniqueID,
                                                                        boolean recurse)
                                                                 throws InstallException,
                                                                        java.rmi.RemoteException
This method is used to retrieve resolved dependencies of a component.

Example: assume component "A" depends on component "B", which in turn depends on component "C". Calling this method with the unique ID For "A" will cause the descriptor for "B" to be returned, and the descriptor for "C" will also be returned only if recurse is true.

Parameters:
uniqueID - component unique identifier from the InstallableComponentDescriptor of the component whose dependencies are being retrieved
recurse - controls whether dependencies of dependencies are returned.
Returns:
array of InstallableComponentDescriptorss of components this component depends on
Throws:
java.rmi.RemoteException - for communication errors
InstallException - if uniqueID is not recognized by the Installer

getUnresolvedDependencyComponents

public java.lang.String[] getUnresolvedDependencyComponents(UniqueID uniqueID,
                                                            boolean recurse)
                                                     throws InstallException,
                                                            java.rmi.RemoteException
This method is used to retrieve unresolved dependencies of a component. By definition, the descriptors for unresolved dependencies are not present, so the names of unresolved component dependencies are returned.

Example: assume component "W" depends on component "X" and component "Y", and that component "Y" depends on component "Z". Also assume that "X" and "Z" have not been installed. Calling this method with the unique ID for "W" will cause the string "X" to be returned, and the string "Z" will also be returned only if recurse is true.

Parameters:
uniqueID - component unique identifier from the InstallableComponentDescriptor of the component whose dependencies are being retrieved
recurse - controls whether unresolved dependencies of resolved dependencies are returned.
Returns:
array of Strings of component names this component depends on that did not resolve
Throws:
java.rmi.RemoteException - for communication errors
InstallException - if uniqueID is not recognized by the Installer

getInstallJarURLs

public java.net.URL[] getInstallJarURLs(UniqueID uniqueID)
                                 throws InstallException,
                                        java.rmi.RemoteException
This method is used to retrieve a list of URLs that represent download locations for all dependencies of this component, including the component itself. This method always recurses to find dependencies of dependencies.

Parameters:
uniqueID - component unique identifier from the InstallableComponentDescriptor of the component whose dependencies are being retrieved
Returns:
array of URLs describing locations where dependent components can be downloaded
Throws:
java.rmi.RemoteException - for communication errors
InstallException - if uniqueID is not recognized by the Installer

Openwings API Documentation (v1.1)