org.apache.wink.common
Class AbstractDynamicResource

java.lang.Object
  extended by org.apache.wink.common.AbstractDynamicResource
All Implemented Interfaces:
DynamicResource

public abstract class AbstractDynamicResource
extends java.lang.Object
implements DynamicResource

Provides a basic implementation of the org.apache.wink.common.DynamicResource.

In general it's recommended to extend from this class, instead of implementing the DynamicResource.


Constructor Summary
AbstractDynamicResource()
           
 
Method Summary
 java.lang.String getBeanName()
          returns the name of the bean The bean name must be unique and usually should come from Spring.
 java.lang.String getCollectionTitle()
          Returns the collection title.
 java.lang.Object getParent()
           A parent of this resource, so the resulting path is a composition of the parent's path and this one.
 java.lang.String getPath()
          Returns path.
 java.lang.String getWorkspaceTitle()
          Returns the workspace title.
 void setBeanName(java.lang.String beanName)
          sets bean name.
 void setCollectionTitle(java.lang.String collectionTitle)
           
 void setParent(java.lang.Object parent)
           Sets parents.
 void setPath(java.lang.String path)
           
 void setWorkspaceTitle(java.lang.String workspaceTitle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDynamicResource

public AbstractDynamicResource()
Method Detail

getBeanName

public java.lang.String getBeanName()
Description copied from interface: DynamicResource
returns the name of the bean The bean name must be unique and usually should come from Spring. If your bean is not generated by Spring, return null and the unique bean name will be generated. If method bean name was set using the setBeanName method, the method must return the same name that was set.

Specified by:
getBeanName in interface DynamicResource
Returns:

setBeanName

public void setBeanName(java.lang.String beanName)
Description copied from interface: DynamicResource
sets bean name. After this method was invoked, the getBeanName() must return the same method that was set.

Specified by:
setBeanName in interface DynamicResource

setWorkspaceTitle

public void setWorkspaceTitle(java.lang.String workspaceTitle)

getWorkspaceTitle

public java.lang.String getWorkspaceTitle()
Description copied from interface: DynamicResource
Returns the workspace title. If the title was already defined using Workspace, the annotation data is overridden.

Specified by:
getWorkspaceTitle in interface DynamicResource
Returns:
workspace title
See Also:
Workspace

setCollectionTitle

public void setCollectionTitle(java.lang.String collectionTitle)

getCollectionTitle

public java.lang.String getCollectionTitle()
Description copied from interface: DynamicResource
Returns the collection title. If the title was already defined using Workspace, the annotation data is overridden.

Specified by:
getCollectionTitle in interface DynamicResource
Returns:
collection title
See Also:
Workspace

setPath

public void setPath(java.lang.String path)

getPath

public java.lang.String getPath()
Description copied from interface: DynamicResource
Returns path. Similar to value() of javax.ws.rs.Path

Specified by:
getPath in interface DynamicResource
Returns:
path of the resource

setParent

public void setParent(java.lang.Object parent)
Description copied from interface: DynamicResource

Sets parents. See getParent() for full description.

Specified by:
setParent in interface DynamicResource

getParent

public java.lang.Object getParent()
Description copied from interface: DynamicResource

A parent of this resource, so the resulting path is a composition of the parent's path and this one.

Note that in comparison to the Parent annotation, the parent here must be reference to the resource and not class.

If method setParent was invoked, this method must return the same parent that was set.

Specified by:
getParent in interface DynamicResource
Returns:
Resource instance of the parent dispatched URIs
See Also:
Parent


Copyright © 2009 The Apache Software Foundation. All Rights Reserved.