|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.modules.ModuleDescription
A description of a module that is constructed from the module's manifest file. This provides a convenient way to parse a manifest file.
Inner Class Summary | |
static class |
ModuleDescription.Dependency
Deprecated. A type of dependency that the module can have on its environment. |
static interface |
ModuleDescription.PackageAccessibleClassLoader
Deprecated. Interface to permit a couple of methods in ClassLoader to be made public. |
Field Summary | |
static String |
SECTION_ACTION
Deprecated. "Action" module section. |
static String |
SECTION_CLIPBOARD_CONVERTOR
Deprecated. "ClipboardConvertor" module section. |
static String |
SECTION_DEBUGGER
Deprecated. "Debugger" module section. |
static String |
SECTION_FILESYSTEM
Deprecated. "Filesystem" module section. |
static String |
SECTION_LOADER
Deprecated. "Loader" module section. |
static String |
SECTION_NODE
Deprecated. "Node" module section. |
static String |
SECTION_OPTION
Deprecated. "Option" module section. |
static String |
SECTION_SERVICE
Deprecated. "Service" module section. |
static Attributes.Name |
TAG_CATEGORY
Deprecated. Category of module for display purposes. |
static Attributes.Name |
TAG_DESCRIPTION
Deprecated. Name of an (optional) JavaHelp-style help set. |
static Attributes.Name |
TAG_FILESYSTEM_HELP
Deprecated. Help resource for a file system. |
static Attributes.Name |
TAG_FILESYSTEM_NAME
Deprecated. Display name of a file system type. |
static Attributes.Name |
TAG_IDE_DEPENDENCIES
Deprecated. IDE dependency tag for whole module. |
static Attributes.Name |
TAG_IMPL_VERSION
Deprecated. Implementation version tag for whole module. |
static Attributes.Name |
TAG_INSTALL_AFTER
Deprecated. Option to install this loader after another. |
static Attributes.Name |
TAG_INSTALL_BEFORE
Deprecated. Option to install this loader before another. |
static Attributes.Name |
TAG_JAVA_DEPENDENCIES
Deprecated. Java dependency tag for whole module. |
static Attributes.Name |
TAG_LAYER
Deprecated. Name of (optional) XML filesystem layer. |
static Attributes.Name |
TAG_LONG_DESCRIPTION
Deprecated. Long description of module. |
static Attributes.Name |
TAG_MAGIC
Deprecated. Global tag for whole module. |
static Attributes.Name |
TAG_MAIN
Deprecated. Name of (optional) main class. |
static Attributes.Name |
TAG_MODULE_DEPENDENCIES
Deprecated. Module dependency tag for whole module. |
static Attributes.Name |
TAG_NAME
Deprecated. Display name of module. |
static Attributes.Name |
TAG_NODE_TYPE
Deprecated. Option to distingiush between different types of nodes. |
static Attributes.Name |
TAG_PACKAGE_DEPENDENCIES
Deprecated. Package dependency tag for whole module. |
static Attributes.Name |
TAG_SECTION_CLASS
Deprecated. Tag for a section. |
static Attributes.Name |
TAG_SERVICE_DEFAULT
Deprecated. Whether this service should be the default for its category. |
static Attributes.Name |
TAG_SHORT_DESCRIPTION
Deprecated. Short description of module. |
static Attributes.Name |
TAG_SPEC_VERSION
Deprecated. Specification version tag for whole module. |
Constructor Summary | |
ModuleDescription(File jar)
Deprecated. Only for testing. |
|
ModuleDescription(String text)
Deprecated. Only for testing. |
|
ModuleDescription(String name,
Manifest man)
Deprecated. Better to explicitly provide a classloader. |
|
ModuleDescription(String name,
Manifest man,
ClassLoader cl)
Deprecated. Create new description from a provided manifest file and classloader. |
Method Summary | |
static boolean |
compatibleWith(String older,
String newer)
Deprecated. Check whether specification versions are compatible. |
Enumeration |
dependencies()
Deprecated. Get all dependencies. |
boolean |
dependsOnModule(ModuleDescription other)
Deprecated. Check whether this description depends on another module. |
void |
forEachSection(ManifestSection.Iterator it)
Deprecated. Iterates over all entries found in the module. |
Set |
getBadClasses()
Deprecated. Get a set of classes that were not loaded by the requested classloader. |
ClassLoader |
getClassLoader()
Deprecated. Get the classloader used to load this module. |
String |
getCodeName()
Deprecated. Get code name of the module. |
String |
getCodeNameBase()
Deprecated. Get code name base of the module. |
int |
getCodeNameRelease()
Deprecated. Get the major release number of the module code name. |
ModuleDescription.Dependency[] |
getDependencies()
Deprecated. Get a list of all dependencies. |
URL |
getDescription()
Deprecated. Currently disused in favor of getDescriptionResource() |
String |
getDescriptionResource()
Deprecated. Get JavaHelp helpset as a resource path. |
String |
getDisplayCategory()
Deprecated. Get the module's display category. |
String |
getImplVersion()
Deprecated. Get the implementation version of this module. |
URL |
getLayer()
Deprecated. getLayerResource() actually used now |
String |
getLayerResource()
Deprecated. Get the resource path to the filesystem layer. |
String |
getLongDescription()
Deprecated. Get the module's long description (paragraph-length summary). |
ModuleInstall |
getModule()
Deprecated. Get the main hook object of the module (to run hooks from). |
String |
getName()
Deprecated. Get display name of the module. |
String |
getShortDescription()
Deprecated. Get the module's short description (like a tool tip). |
String |
getSpecVersion()
Deprecated. Get the specification version of this module. |
String |
reasonWhyUnsatisfied(ModuleDescription[] otherModules)
Deprecated. Check whether this description satisfies all of its dependencies, and if not say why. |
static List |
resolveOrdering(Set modules)
Deprecated. Resolve the proper ordering of a set of modules. |
static List |
resolveOrderingForRealInstall(Set restored,
Set installed)
Deprecated. Actually generate a list of newly-installable modules in this IDE (but do not install them). |
void |
setClassLoader(ClassLoader cl)
Deprecated. Set the classloader used to load this module. |
String |
toString()
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Attributes.Name TAG_MAGIC
public static final Attributes.Name TAG_NAME
OpenIDE-Module-Name_cs
.public static final Attributes.Name TAG_SHORT_DESCRIPTION
OpenIDE-Module-Short-Description_cs
.public static final Attributes.Name TAG_LONG_DESCRIPTION
OpenIDE-Module-Long-Description_cs
.public static final Attributes.Name TAG_CATEGORY
OpenIDE-Module-Display-Category_cs
.public static final Attributes.Name TAG_SPEC_VERSION
public static final Attributes.Name TAG_IMPL_VERSION
public static final Attributes.Name TAG_MODULE_DEPENDENCIES
public static final Attributes.Name TAG_PACKAGE_DEPENDENCIES
public static final Attributes.Name TAG_JAVA_DEPENDENCIES
public static final Attributes.Name TAG_IDE_DEPENDENCIES
public static final Attributes.Name TAG_MAIN
ModuleInstall
.public static final Attributes.Name TAG_LAYER
org/netbeans/modules/foo/resources/layer.xmlThe path will be treated as localizable, so for example the above path may actually load:
org/netbeans/modules/foo/resources/layer_ja.xml
public static final Attributes.Name TAG_DESCRIPTION
For example, the value org.netbeans.module.Index
will look for one of the following, according to locale:
/org/netbeans/module/Index_cs.html
/org/netbeans/module/Index.html
public static final Attributes.Name TAG_SECTION_CLASS
public static final String SECTION_ACTION
public static final String SECTION_OPTION
public static final String SECTION_LOADER
public static final Attributes.Name TAG_INSTALL_BEFORE
public static final Attributes.Name TAG_INSTALL_AFTER
public static final String SECTION_FILESYSTEM
public static final Attributes.Name TAG_FILESYSTEM_NAME
public static final Attributes.Name TAG_FILESYSTEM_HELP
public static final String SECTION_SERVICE
public static final Attributes.Name TAG_SERVICE_DEFAULT
public static final String SECTION_DEBUGGER
public static final String SECTION_NODE
public static final Attributes.Name TAG_NODE_TYPE
Currently the possible types are Environment
, Roots
,
and Session
. If the attribute
is missing, Environment
is assumed.
public static final String SECTION_CLIPBOARD_CONVERTOR
Constructor Detail |
public ModuleDescription(String name, Manifest man) throws IllegalModuleException
name
- name of the JAR fileman
- the manifest file within that JARIllegalModuleException
- if there is an error reading the descriptionpublic ModuleDescription(String name, Manifest man, ClassLoader cl) throws IllegalModuleException
name
- name of the JAR fileman
- the manifest file within that JARcl
- classloader which should be able to find objects mentioned in the manifest;
if null
, must be set later with setClassLoader(java.lang.ClassLoader)
IllegalModuleException
- if there is an error reading the descriptionpublic ModuleDescription(File jar) throws IllegalModuleException, IOException
jar
- the JAR fileIllegalModuleException
- if there is an error reading the descriptionIOException
- if the JAR file could not be opened or readpublic ModuleDescription(String text) throws IllegalModuleException, IOException
text
- the full text of the manifest fileIllegalModuleException
- if there is an error reading the descriptionIOException
- should not be thrownMethod Detail |
public String getName()
TAG_NAME
public String getShortDescription()
null
if unspecifiedTAG_SHORT_DESCRIPTION
public String getLongDescription()
null
if unspecifiedTAG_LONG_DESCRIPTION
public String getDisplayCategory()
null
if unspecifiedTAG_CATEGORY
public String getCodeName()
TAG_MAGIC
public String getCodeNameBase()
foo/3
, this would give foo
.getCodeName()
public int getCodeNameRelease()
foo/3
, this would give 3
.-1
if unspecifiedgetCodeName()
public ClassLoader getClassLoader()
public void setClassLoader(ClassLoader cl)
cl
- the classloaderpublic Set getBadClasses()
Class
getClassLoader()
public ModuleInstall getModule()
TAG_MAIN
public URL getLayer()
getLayerResource()
actually used now
null
, will be a pointer to an
XML filesystem which should be added by the module
as a project layer.null
if none was specifiedpublic String getLayerResource()
null
public URL getDescription()
getDescriptionResource()
null
if the module did not specify a descriptionIllegalStateException
- if the tag is specified but the HelpSet file was not foundTAG_DESCRIPTION
public String getDescriptionResource()
null
if no helpset was specifiedpublic void forEachSection(ManifestSection.Iterator it)
it
- iterator over all sectionspublic Enumeration dependencies()
ModuleDescription.Dependency
sgetDependencies()
public ModuleDescription.Dependency[] getDependencies()
dependencies()
public String getSpecVersion()
null
TAG_SPEC_VERSION
public String getImplVersion()
null
TAG_IMPL_VERSION
public String reasonWhyUnsatisfied(ModuleDescription[] otherModules) throws IllegalModuleException
otherModules
- other modules which this module might requirenull
if satisfied, else text explaining why it was notModuleDescription.Dependency.checkForMiss(org.openide.modules.ModuleDescription[])
public boolean dependsOnModule(ModuleDescription other)
other
- the other module to compare totrue
if this module states that it depends on the other in its dependency list, false
if it makes no such statementTAG_MODULE_DEPENDENCIES
public String toString()
toString
in class Object
public static List resolveOrdering(Set modules) throws IllegalModuleException
modules
- a set of ModuleDescription
s to be installedModuleDescription
s in the order in which they should be installedIllegalModuleException
- if the ordering cannot be resolved (for example, due to a cyclic dependency)dependsOnModule(org.openide.modules.ModuleDescription)
public static List resolveOrderingForRealInstall(Set restored, Set installed) throws IllegalModuleException
restored
- a set of ModuleDescription
s for already-installed modules which should have already been restoredinstalled
- a set of ModuleDescription
s for modules which are intended for installation and may be returnedModuleDescription
s for modules which may be installed, in the order in which they should be installed; will be a subset of installed
IllegalModuleException
- if any problem is encountered other than missed dependenciespublic static boolean compatibleWith(String older, String newer) throws IllegalModuleException
This algorithm should hopefully match that used by the Java Versioning specification (which unfortunately does not make its algorithm public).
older
- the presumed older versionnewer
- the presumed newer versionIllegalModuleException
- in case of a number format errorPackage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |