org.apache.wink.common
Interface DynamicResource

All Known Implementing Classes:
AbstractDynamicResource

public interface DynamicResource

This interface replaces Path annotation to declare a resource. It's impossible to declare resource using both DynamicResource interface and Path annotation.

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

See Also:
AbstractDynamicResource, Path

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 setParent(java.lang.Object parents)
           Sets parents.
 

Method Detail

getBeanName

java.lang.String getBeanName()
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.

Returns:

setBeanName

void setBeanName(java.lang.String beanName)
sets bean name. After this method was invoked, the getBeanName() must return the same method that was set.

Parameters:
beanName -

getPath

java.lang.String getPath()
Returns path. Similar to value() of javax.ws.rs.Path

Returns:
path of the resource

getParent

java.lang.Object getParent()

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.

Returns:
Resource instance of the parent dispatched URIs
See Also:
Parent

setParent

void setParent(java.lang.Object parents)

Sets parents. See getParent() for full description.

Parameters:
parents -

getWorkspaceTitle

java.lang.String getWorkspaceTitle()
Returns the workspace title. If the title was already defined using Workspace, the annotation data is overridden.

Returns:
workspace title
See Also:
Workspace

getCollectionTitle

java.lang.String getCollectionTitle()
Returns the collection title. If the title was already defined using Workspace, the annotation data is overridden.

Returns:
collection title
See Also:
Workspace


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