Dekoh platform API

dekoh.portal.fwk.share
Class AccessPath

java.lang.Object
  extended by dekoh.portal.fwk.share.AccessPath

public class AccessPath
extends Object

AccessPath is resource identifier of DigitalObjects. Dekoh applications build a database of DigitalObjects and organize them into DioCollections. These collections are then shared. Hence there may be several ways to access any perticular DigitalObject. Each instance of AccessPath captures the context in which a DigitalObject is being accessed.

An incoming HttpServeletRequest is parsed for information on which DioCollection of a Share is being accessed by Whom to make a AccessPath instance. An instace of AccessPath is kept in request scope.

AccessPath together with ShareQueryInterface provide a sandboxed access to shared DioCollections.

Since:
Dec 11, 2006

Field Summary
static int NOT_INITIALIZED
           
static String PARAMETER_KEY
          Key String against which the number train is stored as HttpServletRequest attribute.
 
Constructor Summary
AccessPath()
           
AccessPath(int shareId, Integer[] collectionIds)
           
 
Method Summary
 Map getChildren()
           
 Map getChildShare()
           
 List getCollectionIds()
           
 String getOwnerName()
           
 AccessPath getParent()
           
 AccessPath getRoot()
           
 int getShareId()
           
 boolean isAccessPathNull()
          This method is to check accesspath variables are null
 void setOwnerName(String ownerName)
           
 String toNumberTrain()
          Serializes this AccessPath object to a number train that can be used as a query string parameter value.
static String toNumberTrain(HttpServletRequest request)
          Converts the AccessPath in the HttpServletRequest passed to number train.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_INITIALIZED

public static final int NOT_INITIALIZED
See Also:
Constant Field Values

PARAMETER_KEY

public static final String PARAMETER_KEY
Key String against which the number train is stored as HttpServletRequest attribute.

This can be used as follows :

String accessPathStr = req.getParameter(AccessPath.PARAMETER_KEY);

See Also:
Constant Field Values
Constructor Detail

AccessPath

public AccessPath(int shareId,
                  Integer[] collectionIds)

AccessPath

public AccessPath()
Method Detail

getRoot

public AccessPath getRoot()

getChildShare

public Map getChildShare()

getChildren

public Map getChildren()

getParent

public AccessPath getParent()

getCollectionIds

public List getCollectionIds()

getShareId

public int getShareId()

toNumberTrain

public String toNumberTrain()
Serializes this AccessPath object to a number train that can be used as a query string parameter value.

This method is used by while generating urls. There would be no other uses to call this method. Use ShareQueryInterface methods like ShareQueryInterface.getAllCollections(AccessPath) to gain access to Dio entities pointed to by this object.

Returns:
String like 21-33-56. Be sure to pass the string returned by this method enclosed in \' (quotes) to Java Script functions, otherwise Java script will evaluate the number train treating it as an integer expression. For example : '21-33-56' is *not* same as 21-33-56.
See Also:
RequestContext.createAccessPath(String)

getOwnerName

public String getOwnerName()

setOwnerName

public void setOwnerName(String ownerName)

isAccessPathNull

public boolean isAccessPathNull()
This method is to check accesspath variables are null

Returns:
boolean

toNumberTrain

public static String toNumberTrain(HttpServletRequest request)
Converts the AccessPath in the HttpServletRequest passed to number train.

Parameters:
request - servlet request
Returns:
See Also:
AccessPath.toNumberTrain()

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers