Spring Hateoas

org.springframework.hateoas.mvc
Class ControllerLinkBuilderFactory

java.lang.Object
  extended by org.springframework.hateoas.mvc.ControllerLinkBuilderFactory
All Implemented Interfaces:
LinkBuilderFactory<ControllerLinkBuilder>

public class ControllerLinkBuilderFactory
extends Object
implements LinkBuilderFactory<ControllerLinkBuilder>

Factory for UriComponentsLinkBuilder instances based on the request mapping annotated on the given controller.

Author:
Ricardo Gladwell, Oliver Gierke

Constructor Summary
ControllerLinkBuilderFactory()
           
 
Method Summary
 ControllerLinkBuilder linkTo(Class<?> controller)
          Creates a new LinkBuilder with a base of the mapping annotated to the given target clas (controller, service, etc.).
 ControllerLinkBuilder linkTo(Class<?> controller, Object... parameters)
          Creates a new LinkBuilder with a base of the mapping annotated to the given target class (controller, service, etc.).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerLinkBuilderFactory

public ControllerLinkBuilderFactory()
Method Detail

linkTo

public ControllerLinkBuilder linkTo(Class<?> controller)
Description copied from interface: LinkBuilderFactory
Creates a new LinkBuilder with a base of the mapping annotated to the given target clas (controller, service, etc.).

Specified by:
linkTo in interface LinkBuilderFactory<ControllerLinkBuilder>
Parameters:
controller - must not be null.
Returns:

linkTo

public ControllerLinkBuilder linkTo(Class<?> controller,
                                    Object... parameters)
Description copied from interface: LinkBuilderFactory
Creates a new LinkBuilder with a base of the mapping annotated to the given target class (controller, service, etc.). The additional parameters are used to fill up potentially available path variables in the class scope request mapping.

Specified by:
linkTo in interface LinkBuilderFactory<ControllerLinkBuilder>
Parameters:
controller - must not be null.
parameters - must not be null.
Returns:

Spring Hateoas

Copyright © 2012 SpringSource, a division of VMware. All Rights Reserved.