org.apache.wvcm
Class LocationImpl

java.lang.Object
  extended by org.apache.wvcm.LocationImpl
All Implemented Interfaces:
Location

public class LocationImpl
extends java.lang.Object
implements Location

Implementation of Location.

Version:
$Revision: 1.1.1.1.2.13 $

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.wvcm.Location
Location.GenericLocationImpl
 
Field Summary
 
Fields inherited from interface javax.wvcm.Location
ALL, AUTHENTICATED, OWNER, SELF, UNAUTHENTICATED
 
Constructor Summary
LocationImpl(java.lang.String location, ProviderImpl provider)
           
LocationImpl(java.lang.String location, ProviderImpl provider, boolean escaped)
          Default constructor
 
Method Summary
 Activity activity()
          Return a proxy for the activity at this Location.
 Location child(java.lang.String bindingName)
          Return the Location of the child with the specified binding name in the folder at this Location.
 ControllableResource controllableResource()
          Return a proxy for the controllable resource at this Location.
 boolean equals(java.lang.Object o)
           
 java.lang.String escapedLastSegment()
           
 java.lang.String escapedPath()
          Get the escaped path of this location
 Folder folder()
          Return a proxy for the folder at this Location.
 Principal.Group group()
          NOT YET STANDARD Return a proxy for the group principal at this location.
 int hashCode()
           
 java.lang.String hostname()
          Get the host
 boolean isClientSide()
          Return true if this location is a client-side location
 java.lang.String lastSegment()
          NOT YET STANDARD
 Location parent()
          Return the Location of the parent folder of the resource at this Location.
 java.lang.String path()
          Get the path of this location
 int port()
          Get the port
 Principal principal()
          NOT YET STANDARD Return a proxy for the principal at this location.
 AccessControlElement.Privilege privilege()
          NOT YET STANDARD Return a proxy for the privilege at this location.
 Provider provider()
          Get the provider of this location
 Resource resource()
          Return a proxy for the resource at this Location.
 Resource resource(java.lang.Class cls)
          Return a proxy as instance of the specified class for the resource at this Location.
 Principal.Role role()
          NOT YET STANDARD Return a proxy for the role principal at this location.
 java.lang.String scheme()
          Get the scheme ("http"/"https").
 java.lang.String string()
          Return the string value for this Location.
 java.lang.String toString()
           
 Workspace workspace()
          Return a proxy for the workspace at this location.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocationImpl

public LocationImpl(java.lang.String location,
                    ProviderImpl provider)
             throws WvcmException
Parameters:
location - the location string
provider - the provider
Throws:
WvcmException

LocationImpl

public LocationImpl(java.lang.String location,
                    ProviderImpl provider,
                    boolean escaped)
             throws WvcmException
Default constructor

Parameters:
location - location
provider - a ProviderImpl
escaped - if true, the string is escaped (URL encoding)
Throws:
WvcmException
Method Detail

folder

public Folder folder()
Return a proxy for the folder at this Location.

Specified by:
folder in interface Location

resource

public Resource resource()
Return a proxy for the resource at this Location.

Specified by:
resource in interface Location

string

public java.lang.String string()
Return the string value for this Location.

Specified by:
string in interface Location

controllableResource

public ControllableResource controllableResource()
Return a proxy for the controllable resource at this Location.

Specified by:
controllableResource in interface Location

child

public Location child(java.lang.String bindingName)
               throws WvcmException
Return the Location of the child with the specified binding name in the folder at this Location. The string value of the Location of the child is commonly created by appending a "/" and the name of the child to the string value of this Location.

Specified by:
child in interface Location
Throws:
WvcmException

workspace

public Workspace workspace()
Return a proxy for the workspace at this location.

Specified by:
workspace in interface Location

parent

public Location parent()
Return the Location of the parent folder of the resource at this Location. If this Location is the root of the namespace, null is returned. The string value of the Location of the parent folder is commonly created by stripping off the last segment beginning with a "/" character of this Location.

Specified by:
parent in interface Location

activity

public Activity activity()
Return a proxy for the activity at this Location.

Specified by:
activity in interface Location

principal

public Principal principal()
NOT YET STANDARD Return a proxy for the principal at this location.

Specified by:
principal in interface Location

role

public Principal.Role role()
NOT YET STANDARD Return a proxy for the role principal at this location.

Specified by:
role in interface Location

group

public Principal.Group group()
NOT YET STANDARD Return a proxy for the group principal at this location.

Specified by:
group in interface Location

privilege

public AccessControlElement.Privilege privilege()
NOT YET STANDARD Return a proxy for the privilege at this location.

Specified by:
privilege in interface Location

lastSegment

public java.lang.String lastSegment()
NOT YET STANDARD

Specified by:
lastSegment in interface Location

escapedLastSegment

public java.lang.String escapedLastSegment()

isClientSide

public boolean isClientSide()
Return true if this location is a client-side location

Returns:
true, if this location is a client-side location

scheme

public java.lang.String scheme()
Get the scheme ("http"/"https").

Returns:
scheme

hostname

public java.lang.String hostname()
Get the host

Returns:
a String

port

public int port()
Get the port

Returns:
an int

resource

public Resource resource(java.lang.Class cls)
                  throws WvcmException
Return a proxy as instance of the specified class for the resource at this Location.

Parameters:
cls - the class of the result resource
Returns:
a Resource
Throws:
WvcmException

path

public java.lang.String path()
Get the path of this location

Returns:
the path

escapedPath

public java.lang.String escapedPath()
Get the escaped path of this location

Returns:
the path

provider

public Provider provider()
Get the provider of this location

Returns:
the provider

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright (c) 2003 - Apache Software Foundation