public class CMURI extends Object implements Comparable<CMURI>
This object is a helper object used to parse and create Content Manager (TCM or ISH) URIs.
| Constructor and Description |
|---|
CMURI(String uri)
Create a new URI from a string.
|
CMURI(String namespace,
int publicationId,
int itemId,
int itemType,
int version)
Create a new URI based on namespace, publication Id, item Id, item type and version.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CMURI other) |
boolean |
equals(Object object)
Overridden implementation of
equals() method in Object. |
int |
getItemId()
Get the item Id for this URI.
|
int |
getItemType()
Get the item type for this URI.
|
String |
getNamespace() |
int |
getPublicationId()
Get the publicationId for this URI.
|
int |
getVersion()
Get the version for this URI.
|
int |
hashCode()
Overridden implementation of
hashCode() in Object. |
protected boolean |
isNullUri()
Check if this object is NULL_URI.
|
protected void |
load(String uriString)
This method is used to create a
CMURI based on a String URI. |
void |
setItemId(int itemId)
Sets the itemId.
|
void |
setItemType(int itemType)
Sets the itemType.
|
void |
setNamespace(String namespace) |
void |
setPublicationId(int thePubId)
Sets the publicationId.
|
void |
setVersion(int version)
Sets the version.
|
String |
toString()
Overridden implementation of
toString() in Object. |
public static final CMURI NULL_URI
public CMURI(String namespace, int publicationId, int itemId, int itemType, int version)
namespace - namespace for this URI.publicationId - publicationId for this URI.itemId - itemId for this URI.itemType - itemType for this URI.version - version for this URI.ItemTypespublic CMURI(String uri) throws ParseException
uri - String containing the URI to be parsed.ParseException - Thrown if the String does not contain a valid CMURIprotected void load(String uriString) throws ParseException
CMURI based on a String URI.uriString - String representation of the URI. Format: namespacePrefix:pubId-itemId-itemType
Example: "tcm:6-228-64"ParseException - Thrown if the String does not contain a valid CMURIpublic String toString()
toString() in Object.public void setNamespace(String namespace)
public String getNamespace()
public int getItemType()
ItemTypespublic void setItemType(int itemType)
itemType - The new itemType.public int getItemId()
public void setItemId(int itemId)
itemId - The new itemIdpublic int getPublicationId()
public void setPublicationId(int thePubId)
thePubId - The new publicationId.public int getVersion()
public void setVersion(int version)
version - the new version.protected boolean isNullUri()
public boolean equals(Object object)
equals() method in Object.public int hashCode()
hashCode() in Object.public int compareTo(CMURI other)
compareTo in interface Comparable<CMURI>Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries