Package org.dspace.app.rest.link
Class HalLinkFactory<RESOURCE,CONTROLLER>
- java.lang.Object
-
- org.dspace.app.rest.link.HalLinkFactory<RESOURCE,CONTROLLER>
-
- Direct Known Subclasses:
AuthenticationTokenHalLinkFactory,AuthnHalLinkFactory,BrowseEntryHalLinkFactory,CollectionResourceWorkflowGroupHalLinkFactory,DiscoveryRestHalLinkFactory,DSpaceResourceHalLinkFactory,EntityTypeHalLinkFactory,ExternalSourceEntryHalLinkFactory,ExternalSourceHalLinkFactory,HarvestedCollectionRestHalLinkFactory,ProcessHalLinkFactory,RelationshipHalLinkFactory,RootHalLinkFactory,SearchConfigurationResourceHalLinkFactory,SearchSupportHalLinkFactory,StatisticsSupportHalLinkFactory,SubmissionCCLicenseUrlResourceHalLinkFactory,SubmissionSectionHalLinkFactory
@Component public abstract class HalLinkFactory<RESOURCE,CONTROLLER> extends Object
This is the factory that will be called to add the links to the hal resources.
-
-
Constructor Summary
Constructors Constructor Description HalLinkFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddLinks(RESOURCE halResource, org.springframework.data.domain.Pageable pageable, LinkedList<org.springframework.hateoas.Link> list)protected org.springframework.hateoas.LinkbuildLink(String rel, String href)protected <T> org.springframework.hateoas.LinkbuildLink(String rel, T data)protected abstract Class<CONTROLLER>getControllerClass()List<org.springframework.hateoas.Link>getLinksFor(HALResource halResource, org.springframework.data.domain.Pageable pageable)protected <C> CgetMethodOn(Class<C> clazz)protected CONTROLLERgetMethodOn(Object... parameters)protected abstract Class<RESOURCE>getResourceClass()booleansupports(Class clazz)protected <T> org.springframework.web.util.UriComponentsBuilderuriBuilder(T data)
-
-
-
Method Detail
-
supports
public boolean supports(Class clazz)
-
getLinksFor
public List<org.springframework.hateoas.Link> getLinksFor(HALResource halResource, org.springframework.data.domain.Pageable pageable) throws Exception
- Throws:
Exception
-
buildLink
protected <T> org.springframework.hateoas.Link buildLink(String rel, T data)
-
uriBuilder
protected <T> org.springframework.web.util.UriComponentsBuilder uriBuilder(T data)
-
getMethodOn
protected CONTROLLER getMethodOn(Object... parameters)
-
getMethodOn
protected <C> C getMethodOn(Class<C> clazz)
-
addLinks
protected abstract void addLinks(RESOURCE halResource, org.springframework.data.domain.Pageable pageable, LinkedList<org.springframework.hateoas.Link> list) throws Exception
- Throws:
Exception
-
getControllerClass
protected abstract Class<CONTROLLER> getControllerClass()
-
-