|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.codehaus.spice.extension.Extension
Utility class that represents either an available "Optional Package" (formerly known as "Standard Extension") as described in the manifest of a JAR file, or the requirement for such an optional package.
For more information about optional packages, see the document
Optional Package Versioning in the documentation bundle for your
Java2 Standard Edition package, in file
guide/extensions/versioning.html
.
Field Summary | |
static Compatability |
COMPATIBLE
Enum indicating that extension is compatible with other extension. |
static Attributes.Name |
EXTENSION_LIST
Manifest Attribute Name object for EXTENSION_LIST. |
static Attributes.Name |
EXTENSION_NAME
Manifest Attribute Name object for EXTENSION_NAME. |
static Attributes.Name |
IMPLEMENTATION_URL
Manifest Attribute Name object for IMPLEMENTATION_URL. |
static Attributes.Name |
IMPLEMENTATION_VENDOR
Manifest Attribute Name object for IMPLEMENTATION_VENDOR. |
static Attributes.Name |
IMPLEMENTATION_VENDOR_ID
Manifest Attribute Name object for IMPLEMENTATION_VENDOR_ID. |
static Attributes.Name |
IMPLEMENTATION_VERSION
Manifest Attribute Name object for IMPLEMENTATION_VERSION. |
static Compatability |
INCOMPATIBLE
Enum indicating that extension is incompatible with other extension in ways other than other enums indicate). |
static Attributes.Name |
OPTIONAL_EXTENSION_LIST
Name object for Optional-Extension-List
manifest attribute used for declaring optional dependencies on
installed extensions. |
static Compatability |
REQUIRE_IMPLEMENTATION_UPGRADE
Enum indicating that extension requires an upgrade of implementation to be compatible with other extension. |
static Compatability |
REQUIRE_SPECIFICATION_UPGRADE
Enum indicating that extension requires an upgrade of specification to be compatible with other extension. |
static Compatability |
REQUIRE_VENDOR_SWITCH
Enum indicating that extension requires a vendor switch to be compatible with other extension. |
static Attributes.Name |
SPECIFICATION_VENDOR
Manifest Attribute Name object for SPECIFICATION_VENDOR. |
static Attributes.Name |
SPECIFICATION_VERSION
Manifest Attribute Name object for SPECIFICATION_VERSION. |
Constructor Summary | |
Extension(String extensionName,
String specificationVersion,
String specificationVendor,
String implementationVersion,
String implementationVendor,
String implementationVendorId,
String implementationURL)
The constructor to create Extension object. |
Method Summary | |
static void |
addExtension(Extension extension,
Attributes attributes)
Add Extension to the specified manifest Attributes. |
static void |
addExtension(Extension extension,
String prefix,
Attributes attributes)
Add Extension to the specified manifest Attributes. |
static Extension[] |
getAvailable(Manifest manifest)
Return an array of Extension objects representing optional
packages that are available in the JAR file associated with the
specified Manifest . |
static Extension[] |
getAvailable(Manifest[] manifests)
Retrieve the set of Extension objects that are available
by the specified Manifest objects. |
Compatability |
getCompatibilityWith(Extension required)
Return a Compatibility enum indicating the relationship of this Extension with the specified Extension . |
String |
getExtensionName()
Get the name of the extension. |
String |
getImplementationURL()
Get the url of the extensions implementation. |
String |
getImplementationVendor()
Get the vendor of the extensions implementation. |
String |
getImplementationVendorID()
Get the vendorID of the extensions implementation. |
String |
getImplementationVersion()
Get the version of the extensions implementation. |
static Extension[] |
getOptions(Manifest manifest)
Return the set of Extension objects representing "Optional
Packages" that the application declares they will use if present. |
static Extension[] |
getRequired(Manifest manifest)
Return the set of Extension objects representing optional
packages that are required by the application contained in the JAR
file associated with the specified Manifest . |
static Extension[] |
getRequired(Manifest[] manifests)
Retrieve the set of Extension objects that are required
by the specified Manifest objects. |
String |
getSpecificationVendor()
Get the vendor of the extensions specification. |
DeweyDecimal |
getSpecificationVersion()
Get the version of the extensions specification. |
boolean |
isCompatibleWith(Extension required)
Return true if the specified Extension
(which represents an optional package required by an application)
is satisfied by this Extension (which represents an
optional package that is already installed. |
String |
toString()
Return a String representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Attributes.Name EXTENSION_LIST
Attributes.Name#EXTENSION_LIST
public static final Attributes.Name OPTIONAL_EXTENSION_LIST
Name
object for Optional-Extension-List
manifest attribute used for declaring optional dependencies on
installed extensions. Note that the dependencies declared by this method
are not required for the library to operate but if present will be used.
It is NOT part of the official "Optional Package" specification.
public static final Attributes.Name EXTENSION_NAME
Attributes.Name#EXTENSION_NAME
public static final Attributes.Name SPECIFICATION_VERSION
Attributes.Name#SPECIFICATION_VERSION
public static final Attributes.Name SPECIFICATION_VENDOR
Attributes.Name#SPECIFICATION_VENDOR
public static final Attributes.Name IMPLEMENTATION_VERSION
Attributes.Name#IMPLEMENTATION_VERSION
public static final Attributes.Name IMPLEMENTATION_VENDOR
Attributes.Name#IMPLEMENTATION_VENDOR
public static final Attributes.Name IMPLEMENTATION_URL
Attributes.Name#IMPLEMENTATION_URL
public static final Attributes.Name IMPLEMENTATION_VENDOR_ID
Attributes.Name#IMPLEMENTATION_VENDOR_ID
public static final Compatability COMPATIBLE
public static final Compatability REQUIRE_SPECIFICATION_UPGRADE
public static final Compatability REQUIRE_VENDOR_SWITCH
public static final Compatability REQUIRE_IMPLEMENTATION_UPGRADE
public static final Compatability INCOMPATIBLE
Constructor Detail |
public Extension(String extensionName, String specificationVersion, String specificationVendor, String implementationVersion, String implementationVendor, String implementationVendorId, String implementationURL)
extensionName
- the name of extension.specificationVersion
- the specification Version of extension.specificationVendor
- the specification Vendor of extension.implementationVersion
- the implementation Version of extension.implementationVendor
- the implementation Vendor of extension.implementationVendorId
- the implementation VendorId of extension.implementationURL
- the implementation URL of extension.Method Detail |
public static Extension[] getAvailable(Manifest manifest)
Extension
objects representing optional
packages that are available in the JAR file associated with the
specified Manifest
. If there are no such optional
packages, a zero-length array is returned.
manifest
- Manifest to be parsed
public static Extension[] getAvailable(Manifest[] manifests)
Extension
objects that are available
by the specified Manifest objects. If there are no such optional
packages, a zero-length list is returned.
manifests
- the manifests to scan
public static Extension[] getRequired(Manifest manifest)
Extension
objects representing optional
packages that are required by the application contained in the JAR
file associated with the specified Manifest
. If there
are no such optional packages, a zero-length list is returned.
manifest
- Manifest to be parsed
public static Extension[] getRequired(Manifest[] manifests)
Extension
objects that are required
by the specified Manifest objects. If there are no such optional
packages, a zero-length list is returned.
manifests
- the manifests to scan
public static Extension[] getOptions(Manifest manifest)
Extension
objects representing "Optional
Packages" that the application declares they will use if present. If
there are no such optional packages, a zero-length list is returned.
manifest
- Manifest to be parsed
public static void addExtension(Extension extension, Attributes attributes)
attributes
- the attributes of manifest to add toextension
- the extensionpublic static void addExtension(Extension extension, String prefix, Attributes attributes)
attributes
- the attributes of manifest to add toextension
- the extensionprefix
- the name to prefix to extensionpublic String getExtensionName()
public String getSpecificationVendor()
public DeweyDecimal getSpecificationVersion()
public String getImplementationURL()
public String getImplementationVendor()
public String getImplementationVendorID()
public String getImplementationVersion()
public Compatability getCompatibilityWith(Extension required)
Extension
with the specified Extension
.
required
- Description of the required optional package
public boolean isCompatibleWith(Extension required)
true
if the specified Extension
(which represents an optional package required by an application)
is satisfied by this Extension
(which represents an
optional package that is already installed. Otherwise, return
false
.
required
- Description of the required optional package
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |