Spring Hateoas

org.springframework.hateoas.mvc
Class ControllerRelProvider

java.lang.Object
  extended by org.springframework.hateoas.mvc.ControllerRelProvider
All Implemented Interfaces:
RelProvider, org.springframework.plugin.core.Plugin<Class<?>>

public class ControllerRelProvider
extends Object
implements RelProvider

Author:
Oliver Gierke

Constructor Summary
ControllerRelProvider(Class<?> controller, org.springframework.plugin.core.PluginRegistry<RelProvider,Class<?>> providers)
           
 
Method Summary
 String getCollectionResourceRelFor(Class<?> resource)
          Returns the relation type to be used to point to a collection resource of the given type.
 String getItemResourceRelFor(Class<?> resource)
          Returns the relation type to be used to point to an item resource of the given type.
 boolean supports(Class<?> delimiter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerRelProvider

public ControllerRelProvider(Class<?> controller,
                             org.springframework.plugin.core.PluginRegistry<RelProvider,Class<?>> providers)
Method Detail

getCollectionResourceRelFor

public String getCollectionResourceRelFor(Class<?> resource)
Description copied from interface: RelProvider
Returns the relation type to be used to point to a collection resource of the given type.

Specified by:
getCollectionResourceRelFor in interface RelProvider
Parameters:
resource - must not be null.
Returns:

getItemResourceRelFor

public String getItemResourceRelFor(Class<?> resource)
Description copied from interface: RelProvider
Returns the relation type to be used to point to an item resource of the given type.

Specified by:
getItemResourceRelFor in interface RelProvider
Parameters:
resource - must not be null.
Returns:

supports

public boolean supports(Class<?> delimiter)
Specified by:
supports in interface org.springframework.plugin.core.Plugin<Class<?>>

Spring Hateoas

Copyright © 2012-2014–2014 Pivotal, Inc.. All rights reserved.