org.wso2.carbon.registry.core
Class ResourceIDImpl

java.lang.Object
  extended by org.wso2.carbon.registry.core.ResourceIDImpl

public class ResourceIDImpl
extends Object

This represent a resource id. This keep the path which used to identify that resource in the present state in a unique way. In addition to that it keep the more drilled down details of the path, the path id and resource name. If the resource is a collection pathID = REG_PATH_ID(path) name = null If the resource is not a collection pathId = REG_PATH_ID(parentPath(path)) name = the name component of the path id so path = parentPath(path) + "/" + name component of the path.


Constructor Summary
ResourceIDImpl()
           
 
Method Summary
 String getName()
          Method to get the name.
 String getPath()
          Returning the full path, i.e.
 int getPathID()
          Method to get the path id, If the resource is a collection, pathID = REG_PATH_ID(path) name = null If the resource is not a collection, pathId = REG_PATH_ID(parentPath(path))
 boolean isCollection()
          Method to check whether the resource is a collection.
 void setCollection(boolean collection)
          Method to set whether the resource is a collection.
 void setName(String name)
          Method to set the name.
 void setPath(String path)
          Setting the full path i.e.
 void setPathID(int pathID)
          Method to set the path id.
 String toString()
          The string value of the resource ID = getPath();
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceIDImpl

public ResourceIDImpl()
Method Detail

getPath

public String getPath()
Returning the full path, i.e. parentPath + resourceName

Returns:
the path.

setPath

public void setPath(String path)
Setting the full path i.e. parentPath + resourceName

Parameters:
path - the path.

isCollection

public boolean isCollection()
Method to check whether the resource is a collection.

Returns:
true, if it is a collection, false otherwise.

setCollection

public void setCollection(boolean collection)
Method to set whether the resource is a collection.

Parameters:
collection - whether this is a collection or not.

getPathID

public int getPathID()
Method to get the path id, If the resource is a collection, pathID = REG_PATH_ID(path) name = null If the resource is not a collection, pathId = REG_PATH_ID(parentPath(path))

Returns:
the path id.

setPathID

public void setPathID(int pathID)
Method to set the path id.

Parameters:
pathID - the path id.

getName

public String getName()
Method to get the name.

Returns:
the name.

setName

public void setName(String name)
Method to set the name.

Parameters:
name - the name.

toString

public String toString()
The string value of the resource ID = getPath();

Overrides:
toString in class Object
Returns:
the string value of the resource id.


Copyright © 2012 WSO2 Inc. All Rights Reserved.