com.mentata.l3d
Class L3DPath

java.lang.Object
  extended bycom.mentata.l3d.L3DPath
All Implemented Interfaces:
Serializable

public class L3DPath
extends Object
implements Serializable

A bean identifying a context, object, entry, and/or attribute. This is a utility bean used for addressing contexts, objects, identifiers, and attributes with a simple expressive grammar employing forward slashes, as in:

/<context>/<object>/<identifier>/<attribute>

A path can also be configured with an associated action and application. The class includes methods that apply encoding and decoding on a string representation of the path to make it appropriate for use in URIs. Path beans are available through objects or can be created and defined manually.

Since:
0.7
Author:
Jon Roberts
See Also:
Serialized Form

Constructor Summary
L3DPath()
           
 
Method Summary
 String getAction()
          Returns the action name from the path.
 String getApplication()
          Returns the application name from the path.
 String getAttribute()
          Returns the attribute name from the path.
 String getContext()
          Returns the context name from the path.
 String getIdentifier()
          Returns the identifier from the path.
 String getObject()
          Returns the object name from the path.
 String getRemainder()
          Returns the remainder string from the path.
 String getString()
          Returns a representation of the path.
 String getURI()
          Returns a representation of the complete application path.
 void setAction(String action)
          Sets the action name for the path.
 void setApplication(String application)
          Sets the application name for the path.
 void setAttribute(String attribute)
          Sets the attribute name for the path.
 void setContext(String context)
          Sets the context name for the path.
 void setIdentifier(String identifier)
          Sets the identifier for the path.
 void setObject(String object)
          Sets the object name for the path.
 void setRemainder(String remainder)
          Sets the remainder string for the path.
 void setURI(String uri)
          Configures the path according to a decoded and translated URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

L3DPath

public L3DPath()
Method Detail

setContext

public void setContext(String context)
Sets the context name for the path.

Parameters:
context - a context name

getContext

public String getContext()
Returns the context name from the path.

Returns:
the context name

setObject

public void setObject(String object)
Sets the object name for the path.

Parameters:
object - an object name

getObject

public String getObject()
Returns the object name from the path.

Returns:
the object name

setIdentifier

public void setIdentifier(String identifier)
Sets the identifier for the path.

Parameters:
identifier - an entry identifier

getIdentifier

public String getIdentifier()
Returns the identifier from the path.

Returns:
the entry identifier

setAttribute

public void setAttribute(String attribute)
Sets the attribute name for the path.

Parameters:
attribute - an attribute name

getAttribute

public String getAttribute()
Returns the attribute name from the path.

Returns:
the attribute name

setAction

public void setAction(String action)
Sets the action name for the path.

Parameters:
action - an action name

getAction

public String getAction()
Returns the action name from the path.

Returns:
the action name

setApplication

public void setApplication(String application)
Sets the application name for the path.

Parameters:
application - an application name

getApplication

public String getApplication()
Returns the application name from the path.

Returns:
the application name

setRemainder

public void setRemainder(String remainder)
Sets the remainder string for the path.

Parameters:
remainder - an additional string for the path

getRemainder

public String getRemainder()
Returns the remainder string from the path.

Returns:
the remainder string

getString

public String getString()
Returns a representation of the path.

Returns:
a backslash-delimited string path

setURI

public void setURI(String uri)
Configures the path according to a decoded and translated URI.

Parameters:
uri - an URL-encoded, backslash-delimited string

getURI

public String getURI()
Returns a representation of the complete application path.

Returns:
an URL-encoded, backslash-delimited string