de.smartics.properties.admin.resources.representation.share
Class LinkDescriptorFactory

Package class diagram package LinkDescriptorFactory
java.lang.Object
  extended by de.smartics.properties.admin.resources.representation.share.LinkDescriptorFactory

public final class LinkDescriptorFactory
     
     
extends Object

A simple helper to create LinkDescriptors.


Constructor Summary
LinkDescriptorFactory(javax.ws.rs.core.UriInfo uriInfo, de.smartics.resteasy.hypermedia.renderer.LocalizationProvider provider)
          Default constructor.
 
Method Summary
 de.smartics.resteasy.hypermedia.renderer.LinkDescriptor createDescriptor(ApiServices.ServiceDescriptor service, String method)
          Creates the link descriptor to the a generic service.
 de.smartics.resteasy.hypermedia.renderer.LinkDescriptor createDescriptor(String id, Class<?> type, String method, Object... params)
          Creates the link descriptor to the a generic service.
 de.smartics.resteasy.hypermedia.renderer.LinkDescriptor createDescriptor(String id, URI uri)
          Creates the link descriptor to the a generic service with a fixed, maybe external, URI.
 de.smartics.resteasy.hypermedia.renderer.LocalizationProvider getProvider()
          Returns the provider of localized information.
 javax.ws.rs.core.UriInfo getUriInfo()
          Returns the helper to construct links.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkDescriptorFactory

public LinkDescriptorFactory(javax.ws.rs.core.UriInfo uriInfo,
                             de.smartics.resteasy.hypermedia.renderer.LocalizationProvider provider)
Default constructor.

Parameters:
uriInfo - the helper to construct links.
provider - the provider of localized information.
Method Detail

getUriInfo

public javax.ws.rs.core.UriInfo getUriInfo()
Returns the helper to construct links.

Returns:
the helper to construct links.

getProvider

public de.smartics.resteasy.hypermedia.renderer.LocalizationProvider getProvider()
Returns the provider of localized information.

Returns:
the provider of localized information.

createDescriptor

public de.smartics.resteasy.hypermedia.renderer.LinkDescriptor createDescriptor(String id,
                                                                                Class<?> type,
                                                                                String method,
                                                                                Object... params)
Creates the link descriptor to the a generic service.

Parameters:
id - the identifier of the resource to lookup link descriptor metadata.
type - the type of the resource.
method - the method within the resource.
params - the parameters to the resource URI.
Returns:
the requested link descriptor.

createDescriptor

public de.smartics.resteasy.hypermedia.renderer.LinkDescriptor createDescriptor(String id,
                                                                                URI uri)
Creates the link descriptor to the a generic service with a fixed, maybe external, URI.

Parameters:
id - the identifier of the resource to lookup link descriptor metadata.
uri - the URI to the link.
Returns:
the requested link descriptor.

createDescriptor

public de.smartics.resteasy.hypermedia.renderer.LinkDescriptor createDescriptor(ApiServices.ServiceDescriptor service,
                                                                                String method)
Creates the link descriptor to the a generic service.

Parameters:
service - the service to create a link to.
method - the method of the service to link to.
Returns:
the requested link descriptor.


Copyright © 2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.