|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.openwings.identity.ComponentDescriptor
net.openwings.install.InstallableComponentDescriptor
This class extends ComponentDescriptor, adding all
the information that would be used by the Install Service to install
a component.
The Install Service supports resolution of inter-component dependencies
on the following fields of an InstallableComponentDescriptor:
commandLineParameters
properties (property values only, not property names)
resolvableClasspath (resolved values written into
classpath)
resolvableCodebase (resolved values written into
codebase)
Inter-component dependencies are represented through a variable notation. Variables are of the form:
${<component>[-<ver>].value}
where "component" is the name of a component, "ver" is an optional version number, and "value" is one of "classpath", "codebase", or "property". These variables are described in the following table:
|
Key |
Description |
|
|
This notation is used to reference the classpath of another component. The result is one or more file: URLs. Example: A component might have an entry in its
and be added to the |
|
|
This notation is used to reference the codebase of another component. The result is one or more file: URLs. Example: A component might have an entry in its
and be added to the |
|
This notation is used to reference a specific property from another component. Example: A component might have an entry in its
|
The Install service also propagates properties into
the properties field (inherited from
ComponentDescriptor) to provide an installed component
with information about where it is installed. The properties are listed
in this table:
| Property Name | Description |
net.openwings.install.installJarURL |
http URL location of image jar file, only set if component served |
net.openwings.install.installFromURL |
http or file URL location of original image jar from which component was installed |
net.openwings.install.http |
http URL location of root of codebase
This is most often used by a component to build its own codebase Example: A component would use an entry like
and be added to the |
net.openwings.install.httpDir |
file URL location of http directory.
This may or may not be under the component directory structure.
Some implementations may copy the contents of the
Example:
|
net.openwings.install.binDir |
file URL location of bin directory - derived from
binDirectory field |
net.openwings.install.iconURL |
http URL location of icon - derived from iconFile
field |
net.openwings.install.dataDir |
file URL location of data directory - derived from
dataDirectory field |
net.openwings.install.docsDir |
file URL location of docs directory - derived from
docsDirectory field. Some implementations may copy the
contents of the docsDir folder to a web server. |
net.openwings.install.sourceDir |
file URL location of source directory - derived from
sourceDirectory field |
|
file URL location of lib directory - derived from
libDirectory field |
net.openwings.install.policyDir |
file URL location of policy directory - derived from
policyDirectory field |
net.openwings.install.local |
absolute file location of installed component (not a URL).
This is most often used by a component to reference its
own install directory.
Example:
|
net.openwings.install.localDir |
file URL location of installed component.
This is most often used by a component to reference its
own install directory.
Example:
|
net.openwings.install.static |
boolean indicator to denote if a component is a static component. The default value is false. |
| Field Summary | |
static int |
AUTHENTICATED
This is the state of a component which has been downloaded and authenticated but not yet resolved or installed. |
static java.lang.String |
BIN_DIR
This is the name of a property used to reference the file URL location of a component's bin directory. |
static java.lang.String |
DATA_DIR
This is the name of a property used to reference the file URL location of a component's data directory. |
static java.lang.String |
DOCS_DIR
This is the name of a property used to reference the file URL location of a component's documentation directory. |
static java.lang.String |
HTTP
This is the name of a property used to reference the http URL location of the root of a component's codebase. |
static java.lang.String |
HTTP_DIR
This is the name of a property used to reference the file URL location of a component's http directory. |
static java.lang.String |
ICON_URL
This is the name of a property used to reference the http URL location of a component's icon file. |
static java.lang.String |
INSTALL_FROM_URL
This is the name of a property used to reference the http or file URL location of the original image jar from which a component was installed. |
static java.lang.String |
INSTALL_JAR_URL
This is the name of a property used to reference the http URL location of a served component image. |
static java.lang.String |
INSTALL_STATIC
This is the name of a property used to denote a static component |
static int |
INSTALLED
This is the state of a component which has been installed but still has unresolved dependencies. |
static java.lang.String |
LIB_DIR
This is the name of a property used to reference the file URL location of a component's lib directory. |
static java.lang.String |
LOCAL
This is the name of a property used to reference the absolute file location of an installed component (not a URL). |
static java.lang.String |
LOCAL_DIR
This is the name of a property used to reference the file URL location of an installed component. |
static java.lang.String |
POLICY_DIR
This is the name of a property used to reference the file URL location of a component's policies directory. |
static int |
RESOLVED
This is the state of a component which has been installed and has no unresolved dependencies. |
static java.lang.String |
SOURCE_DIR
This is the name of a property used to reference the file URL location of a component's source directory. |
static int |
UNINSTALLED
This is the initial state of a component. |
| Constructor Summary | |
InstallableComponentDescriptor()
Default Constructor |
|
InstallableComponentDescriptor(InstallableComponentDescriptor installableComponentDescriptor)
This copy constructor does a shallow copy, i.e. |
|
InstallableComponentDescriptor(UniqueID uniqueID,
java.lang.String componentName,
java.lang.String version,
java.lang.String description,
boolean executable,
java.lang.String executableString,
java.lang.String platform,
boolean sharedContainerHint,
boolean restartHint,
boolean bootProcessHint,
boolean runImmediatelyHint,
boolean mobile,
java.net.URL[] classpath,
java.net.URL[] codebase,
java.util.Properties properties,
java.lang.String commandLineParameters,
boolean serveHint,
java.lang.String policyDirectory,
java.lang.String sourceDirectory,
java.lang.String dataDirectory,
java.lang.String docsDirectory,
java.lang.String libDirectory,
java.lang.String httpDirectory,
java.lang.String binDirectory,
java.lang.String iconFile,
java.lang.String[] resolvableClasspath,
java.lang.String[] resolvableCodebase,
int installState)
This constructor is used an executable java ComponentDescriptor |
|
InstallableComponentDescriptor(UniqueID uniqueID,
java.lang.String componentName,
java.lang.String version,
java.lang.String description,
boolean executable,
java.lang.String executableString,
java.lang.String platform,
boolean sharedContainerHint,
boolean restartHint,
boolean bootProcessHint,
java.lang.String commandLineParameters,
boolean serveHint,
java.lang.String policyDirectory,
java.lang.String sourceDirectory,
java.lang.String dataDirectory,
java.lang.String docsDirectory,
java.lang.String libDirectory,
java.lang.String httpDirectory,
java.lang.String binDirectory,
java.lang.String iconFile,
java.lang.String[] resolvableClasspath,
java.lang.String[] resolvableCodebase,
int installState)
This constructor is used to create a non-java executable component descriptor. |
|
InstallableComponentDescriptor(UniqueID uniqueID,
java.lang.String componentName,
java.lang.String version,
java.lang.String description,
java.lang.String platform,
java.net.URL[] classpath,
java.net.URL[] codebase,
boolean serveHint,
java.lang.String policyDirectory,
java.lang.String sourceDirectory,
java.lang.String dataDirectory,
java.lang.String docsDirectory,
java.lang.String libDirectory,
java.lang.String httpDirectory,
java.lang.String binDirectory,
java.lang.String iconFile,
java.lang.String[] resolvableClasspath,
java.lang.String[] resolvableCodebase,
int installState)
This constructor is used to create a non-executable java component descriptor. |
|
| Method Summary | |
java.lang.String |
getBinDirectory()
This method returns the relative location of the bin directory within the installable image jar file. |
java.lang.String |
getDataDirectory()
This method returns the relative location of the data directory within the installable image jar file. |
java.lang.String |
getDocsDirectory()
This method returns the relative location of the docs directory within the installable image jar file. |
java.lang.String |
getHttpDirectory()
This method returns the relative location of the http directory within the installable image jar file. |
java.lang.String |
getIconFile()
This method returns the relative location of the icon file for this component within the installable image jar file. |
int |
getInstallState()
This method returns the state of this component: UNINSTALLED, AUTHENTICATED,
INSTALLED, or RESOLVED. |
java.lang.String |
getLibDirectory()
This method returns the relative location of the lib directory within the installable image jar file. |
java.lang.String |
getPolicyDirectory()
This method returns the relative location of the policies directory within the installable image jar file. |
java.lang.String[] |
getResolvableClasspath()
This method returns an array of strings used to build the classpath field of this descriptor. |
java.lang.String[] |
getResolvableCodebase()
This method returns an array of strings used to build the codebase field of this descriptor. |
boolean |
getServeHint()
This method returns a flag that indicates whether this component should be served to other platforms (via a web server). |
java.lang.String |
getSourceDirectory()
This method returns the relative location of the source directory within the installable image jar file. |
void |
list(java.io.PrintStream out)
Convenience method for printing out the contents of the descriptor |
void |
setBinDirectory(java.lang.String binDirectory)
This method sets the relative location of the bin directory within the installable image jar file. |
void |
setDataDirectory(java.lang.String dataDirectory)
This method sets the relative location of the data directory within the installable image jar file. |
void |
setDocsDirectory(java.lang.String docsDirectory)
This method sets the relative location of the docs directory within the installable image jar file. |
void |
setHttpDirectory(java.lang.String httpDirectory)
This method sets the relative location of the http directory within the installable image jar file. |
void |
setIconFile(java.lang.String iconFile)
This method sets the relative location of the icon file for this component within the installable image jar file. |
void |
setInstallState(int installState)
This method sets the state of this component: UNINSTALLED, AUTHENTICATED,
INSTALLED, or RESOLVED. |
void |
setLibDirectory(java.lang.String libDirectory)
This method sets the relative location of the lib directory within the installable image jar file. |
void |
setPolicyDirectory(java.lang.String policyDirectory)
This method sets the relative location of the policies directory within the installable image jar file. |
void |
setResolvableClasspath(java.lang.String[] resolvableClasspath)
This method sets an array of strings used to build the classpath field of this descriptor. |
void |
setResolvableCodebase(java.lang.String[] resolvableCodebase)
This method returns an array of strings used to build the codebase field of this descriptor. |
void |
setServeHint(boolean serveHint)
This method sets a flag that indicates whether this component should be served to other platforms (via a web server). |
void |
setSourceDirectory(java.lang.String sourceDirectory)
This method sets the relative location of the source directory within the installable image jar file. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int UNINSTALLED
public static final int AUTHENTICATED
public static final int INSTALLED
public static final int RESOLVED
public static final java.lang.String LOCAL
public static final java.lang.String LOCAL_DIR
public static final java.lang.String HTTP
public static final java.lang.String HTTP_DIR
public static final java.lang.String LIB_DIR
public static final java.lang.String BIN_DIR
public static final java.lang.String DATA_DIR
public static final java.lang.String DOCS_DIR
public static final java.lang.String SOURCE_DIR
public static final java.lang.String POLICY_DIR
public static final java.lang.String ICON_URL
public static final java.lang.String INSTALL_STATIC
public static final java.lang.String INSTALL_JAR_URL
public static final java.lang.String INSTALL_FROM_URL
| Constructor Detail |
public InstallableComponentDescriptor(InstallableComponentDescriptor installableComponentDescriptor)
public InstallableComponentDescriptor(UniqueID uniqueID,
java.lang.String componentName,
java.lang.String version,
java.lang.String description,
boolean executable,
java.lang.String executableString,
java.lang.String platform,
boolean sharedContainerHint,
boolean restartHint,
boolean bootProcessHint,
boolean runImmediatelyHint,
boolean mobile,
java.net.URL[] classpath,
java.net.URL[] codebase,
java.util.Properties properties,
java.lang.String commandLineParameters,
boolean serveHint,
java.lang.String policyDirectory,
java.lang.String sourceDirectory,
java.lang.String dataDirectory,
java.lang.String docsDirectory,
java.lang.String libDirectory,
java.lang.String httpDirectory,
java.lang.String binDirectory,
java.lang.String iconFile,
java.lang.String[] resolvableClasspath,
java.lang.String[] resolvableCodebase,
int installState)
public InstallableComponentDescriptor(UniqueID uniqueID,
java.lang.String componentName,
java.lang.String version,
java.lang.String description,
boolean executable,
java.lang.String executableString,
java.lang.String platform,
boolean sharedContainerHint,
boolean restartHint,
boolean bootProcessHint,
java.lang.String commandLineParameters,
boolean serveHint,
java.lang.String policyDirectory,
java.lang.String sourceDirectory,
java.lang.String dataDirectory,
java.lang.String docsDirectory,
java.lang.String libDirectory,
java.lang.String httpDirectory,
java.lang.String binDirectory,
java.lang.String iconFile,
java.lang.String[] resolvableClasspath,
java.lang.String[] resolvableCodebase,
int installState)
public InstallableComponentDescriptor(UniqueID uniqueID,
java.lang.String componentName,
java.lang.String version,
java.lang.String description,
java.lang.String platform,
java.net.URL[] classpath,
java.net.URL[] codebase,
boolean serveHint,
java.lang.String policyDirectory,
java.lang.String sourceDirectory,
java.lang.String dataDirectory,
java.lang.String docsDirectory,
java.lang.String libDirectory,
java.lang.String httpDirectory,
java.lang.String binDirectory,
java.lang.String iconFile,
java.lang.String[] resolvableClasspath,
java.lang.String[] resolvableCodebase,
int installState)
public InstallableComponentDescriptor()
| Method Detail |
public final boolean getServeHint()
public final void setServeHint(boolean serveHint)
serveHint - boolean flagpublic final java.lang.String getPolicyDirectory()
URL
representing the absolute path to the policies directory of the
installed component. This value is written to the property
net.openwings.install.policyDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "policies".
public final void setPolicyDirectory(java.lang.String policyDirectory)
URL
representing the absolute path to the policies directory of the
installed component. This value is written to the property
net.openwings.install.policyDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "policies".
policyDirectory - relative path to the policies directorypublic final java.lang.String getSourceDirectory()
URL
representing the absolute path to the source directory of the
installed component. This value is written to the property
net.openwings.install.sourceDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "source".
public final void setSourceDirectory(java.lang.String sourceDirectory)
URL
representing the absolute path to the source directory of the
installed component. This value is written to the property
net.openwings.install.sourceDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "source".
sourceDirectory - relative path to the source directorypublic final java.lang.String getDataDirectory()
URL
representing the absolute path to the data directory of the
installed component. This value is written to the property
net.openwings.install.dataDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "data".
public final void setDataDirectory(java.lang.String dataDirectory)
URL
representing the absolute path to the data directory of the
installed component. This value is written to the property
net.openwings.install.dataDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "data".
dataDirectory - relative path to the data directorypublic final java.lang.String getDocsDirectory()
URL
representing the absolute path to the docs directory of the
installed component. This value is written to the property
net.openwings.install.docsDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "docs".
public final void setDocsDirectory(java.lang.String docsDirectory)
URL
representing the absolute path to the docs directory of the
installed component. This value is written to the property
net.openwings.install.docsDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "docs".
docsDirectory - relative path to the docs directorypublic final java.lang.String getLibDirectory()
URL
representing the absolute path to the lib directory of the
installed component. This value is written to the property
net.openwings.install.libDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "lib".
public final void setLibDirectory(java.lang.String libDirectory)
URL
representing the absolute path to the lib directory of the
installed component. This value is written to the property
net.openwings.install.libDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "lib".
libDirectory - relative path to the lib directorypublic final java.lang.String getHttpDirectory()
URL
representing the absolute path to the http directory of the
installed component. This value is written to the property
net.openwings.install.httpDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "http".
public final void setHttpDirectory(java.lang.String httpDirectory)
URL
representing the absolute path to the http directory of the
installed component. This value is written to the property
net.openwings.install.httpDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "http".
httpDirectory - relative path to the http directorypublic final java.lang.String getBinDirectory()
URL
representing the absolute path to the bin directory of the
installed component. This value is written to the property
net.openwings.install.binDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "bin".
public final void setBinDirectory(java.lang.String binDirectory)
URL
representing the absolute path to the bin directory of the
installed component. This value is written to the property
net.openwings.install.binDir in the
properties field.
If this field is null or the empty string, the Install
Service assumes the default: "bin".
binDirectory - relative path to the bin directorypublic final java.lang.String getIconFile()
null, the Install Service uses this
field to generate a URL representing the http location
of the icon for the component. This value is written to the property
net.openwings.install.iconURL in the
properties field.
public final void setIconFile(java.lang.String iconFile)
null, the Install Service uses this
field to generate a URL representing the http location
of the icon for the component. This value is written to the property
net.openwings.install.iconURL in the
properties field.
public final java.lang.String[] getResolvableClasspath()
classpath field of this descriptor. When a component
is installed, the Install Service performs resolution (variable
substitution) on these strings, converts them to URLs and
sets the classpath field.
public final void setResolvableClasspath(java.lang.String[] resolvableClasspath)
classpath field of this descriptor. When a component
is installed, the Install Service performs resolution (variable
substitution) on these strings, converts them to URLs and
sets the classpath field.
resolvableClasspath - array of resolvable classpath entriespublic final java.lang.String[] getResolvableCodebase()
codebase field of this descriptor. When a component
is installed, the Install Service performs resolution (variable
substitution) on these strings, converts them to URLs and
sets the codebase field.
public final void setResolvableCodebase(java.lang.String[] resolvableCodebase)
codebase field of this descriptor. When a component
is installed, the Install Service performs resolution (variable
substitution) on these strings, converts them to URLs and
sets the codebase field.
resolvableCodebase - array of resolvable codebase entriespublic final int getInstallState()
UNINSTALLED, AUTHENTICATED,
INSTALLED, or RESOLVED.
public final void setInstallState(int installState)
UNINSTALLED, AUTHENTICATED,
INSTALLED, or RESOLVED.
public void list(java.io.PrintStream out)
list in class ComponentDescriptorout - the stream to write output to
|
Openwings API Documentation (v1.1) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||