public class ComponentIdentifier extends java.lang.Object implements IComponentIdentifier, java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name
The component name.
|
protected java.lang.String |
root
Cache for platform name for getRoot() calls.
|
EMPTY_COMPONENTIDENTIFIERS, LOCAL, RESULTCID
Constructor and Description |
---|
ComponentIdentifier()
Create a new component identifier.
|
ComponentIdentifier(IComponentIdentifier cid)
Copy a component identifier.
|
ComponentIdentifier(java.lang.String name)
Create a new component identifier with a global name and given addresses.
|
ComponentIdentifier(java.lang.String name,
IComponentIdentifier parent)
Create component identifier.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone this component identifier.
|
boolean |
equals(java.lang.Object obj)
Test if two component identifiers are equal.
|
java.lang.String |
getDotName()
Get the name without @ replaced by dot.
|
java.lang.String |
getLocalName()
Get the local component name.
|
java.lang.String |
getName()
Get the component name.
|
IComponentIdentifier |
getParent()
Get the parent identifier.
|
java.lang.String |
getPlatformName()
Get the platform name.
|
java.lang.String |
getPlatformPrefix()
Get the platform name without the suffix for name uniqueness.
|
static java.lang.String |
getPlatformPrefix(java.lang.String name)
Get the stripped platform name.
|
IComponentIdentifier |
getRoot()
Get the root identifier.
|
int |
hashCode()
The hash code of the object.
|
void |
setName(java.lang.String name)
Set the component name.
|
java.lang.String |
toString()
Return a string representation.
|
protected java.lang.String name
protected java.lang.String root
public ComponentIdentifier()
public ComponentIdentifier(java.lang.String name)
name
- A global name (e.g. "cms@lars").public ComponentIdentifier(java.lang.String name, IComponentIdentifier parent)
name
- The local name.parent
- The parent.addresses
- The addresses.public ComponentIdentifier(IComponentIdentifier cid)
cid
- The id to copy from.public java.lang.String getName()
getName
in interface IComponentIdentifier
public void setName(java.lang.String name)
name
- The component name.public IComponentIdentifier getParent()
getParent
in interface IComponentIdentifier
public IComponentIdentifier getRoot()
getRoot
in interface IComponentIdentifier
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String getLocalName()
IComponentIdentifier
getLocalName
in interface IComponentIdentifier
public java.lang.String getPlatformName()
getPlatformName
in interface IComponentIdentifier
public java.lang.String getDotName()
getDotName
in interface IComponentIdentifier
public java.lang.String getPlatformPrefix()
getPlatformPrefix
in interface IComponentIdentifier
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String getPlatformPrefix(java.lang.String name)
name
- The platform name.