|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.configuration.Namespaces
public class Namespaces
Directory of configurable Namespace objects. Namespace objects are used for configuring AndroMDA namespaces.
Namespace,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT
This is passed as the cartridge name for the getProperty(java.lang.String, java.lang.String) method if we wish to use a 'default' Namespace
for Plugins. |
| Constructor Summary | |
|---|---|
Namespaces()
|
|
| Method Summary | |
|---|---|
void |
addNamespace(Namespace namespace)
Adds a namespace to this collection of namespaces. |
void |
addNamespaces(Namespace[] namespaces)
Adds all namespaces to this instance. |
void |
addRegistry(NamespaceRegistry registry)
Adds a namespace registry to this instance. |
void |
clear()
Clears out the current namespaces. |
Namespace |
getNamespace(java.lang.String namespaceName)
Gets the Namespace with the corresponding namespaceName. |
java.util.Collection |
getNamespaceRegistries()
Gets all available namespace registries (these are namespaces which have been discovered but are not necessarily configured). |
java.util.Collection |
getNamespaces()
Gets the namespaces registered in this namespaces instance. |
java.util.Collection<Property> |
getProperties(java.lang.String namespaceName,
java.lang.String propertyName)
Retrieves a property from the Namespace with the namespaceName. |
java.util.Collection<Property> |
getProperties(java.lang.String namespaceName,
java.lang.String propertyName,
boolean showWarning)
Retrieves a property from the Namespace with the namespaceName. |
Property |
getProperty(java.lang.String namespaceName,
java.lang.String propertyName)
Retrieves a property from the Namespace with the namespaceName. |
Property |
getProperty(java.lang.String namespaceName,
java.lang.String propertyName,
boolean showWarning)
Retrieves a property from the Namespace with the namespaceName. |
PropertyDefinition[] |
getPropertyDefinitions(java.lang.String namespaceName)
Retrieves all property definitions for the given namespace. |
java.lang.String |
getPropertyValue(java.lang.String namespace,
java.lang.String name)
Attempts to get the value of a property from the given namespace with the given name by first attempting
to retrieve it from the namespace and if no property is defined
in the namespace we retrieve the default value (if one is defined). |
NamespaceRegistry |
getRegistry(java.lang.String namespace)
Retrieves the namespace registry for the given namespace, or returns null if it doesn't exist. |
java.net.URL[] |
getResourceRoots(java.lang.String namespace)
Attempts to retrieve the resource root of the namespace. |
static Namespaces |
instance()
Returns the singleton instance of this Namespaces |
boolean |
isComponentPresent(java.lang.String namespace,
java.lang.String component)
Indicates whether or not the component is present within the given
namespace |
boolean |
isShared(java.lang.String namespace)
Indicates if the given namespace is
shared or not. |
boolean |
namespacePresent(java.lang.String namespaceName)
Indicates if the namespace is present within this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT
getProperty(java.lang.String, java.lang.String) method if we wish to use a 'default' Namespace
for Plugins. This is so we don't need to define a specific mapping for each Plugin if we don't want. If a
namespaceName exists with a specific Plugin name, then that will be used instead of the 'default'
| Constructor Detail |
|---|
public Namespaces()
| Method Detail |
|---|
public static Namespaces instance()
public java.util.Collection getNamespaces()
public void addNamespace(Namespace namespace)
namespace - the Namespace to add to this instance.public void addNamespaces(Namespace[] namespaces)
namespaces to this instance.
namespaces - the array of namespaces to add.public Namespace getNamespace(java.lang.String namespaceName)
namespaceName.
namespaceName -
public boolean namespacePresent(java.lang.String namespaceName)
namespaceName - the name of the namespace.
public Property getProperty(java.lang.String namespaceName,
java.lang.String propertyName)
ignore attribute of the
Property instance is set to true then lookup of the property will not be attempted and null will
just be returned instead. If the propety is not found and ignore is not true a warning
message is logged.
- Parameters:
namespaceName - name of the Plugin to which the namespace appliespropertyName - name of the namespace property to find.
- Returns:
- String the namespace property value.
public java.util.Collection<Property> getProperties(java.lang.String namespaceName,
java.lang.String propertyName)
ignore attribute of the
Property instance is set to true then lookup of the property will not be attempted and null will
just be returned instead. If the propety is not found and ignore is not true a warning
message is logged.
- Parameters:
namespaceName - name of the Plugin to which the namespace appliespropertyName - name of the namespace property to find.
- Returns:
- String the namespace property value.
public Property getProperty(java.lang.String namespaceName,
java.lang.String propertyName,
boolean showWarning)
ignore attribute of the
Property instance is set to true then lookup of the property will not be attempted and null will
just be returned instead.
namespaceName - name of the Plugin to which the namespace appliespropertyName - name of the namespace property to find.showWarning - true/false if we'd like to display a warning if the property/namespace can not be found.
public java.util.Collection<Property> getProperties(java.lang.String namespaceName,
java.lang.String propertyName,
boolean showWarning)
ignore attribute of the
Property instance is set to true then lookup of the property will not be attempted and null will
just be returned instead.
namespaceName - name of the Plugin to which the namespace appliespropertyName - name of the namespace property to find.showWarning - true/false if we'd like to display a warning if the property/namespace can not be found.
public PropertyDefinition[] getPropertyDefinitions(java.lang.String namespaceName)
namespaceName - the name of the namespace.
public java.util.Collection getNamespaceRegistries()
public void addRegistry(NamespaceRegistry registry)
NamespaceRegistry
descriptor (used to describe NamespaceComponent) instances.
registry - the NamespaceRegistry instance to add.public boolean isShared(java.lang.String namespace)
namespace is
shared or not.
namespace - the namespace to check.
public java.lang.String getPropertyValue(java.lang.String namespace,
java.lang.String name)
namespace with the given name by first attempting
to retrieve it from the namespace and if no property is defined
in the namespace we retrieve the default value (if one is defined).
namespace - the namespace for which to retreive the value.name - the name of the value to retrieve.
public java.net.URL[] getResourceRoots(java.lang.String namespace)
namespace - the namespace of which to retrieve the resource.
public boolean isComponentPresent(java.lang.String namespace,
java.lang.String component)
component is present within the given
namespace
namespace - the name of the namespace.component - the name of the component type.
public NamespaceRegistry getRegistry(java.lang.String namespace)
namespace - the namespace name.
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||