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,ContentReportSupportHalLinkFactory,DiscoveryRestHalLinkFactory,DSpaceResourceHalLinkFactory,ExternalSourceEntryHalLinkFactory,ExternalSourceHalLinkFactory,HarvestedCollectionRestHalLinkFactory,OrcidQueueHalLinkFactory,ProcessHalLinkFactory,RelationshipHalLinkFactory,RootHalLinkFactory,SearchConfigurationResourceHalLinkFactory,SearchSupportHalLinkFactory,StatisticsSupportHalLinkFactory,SubmissionCCLicenseUrlResourceHalLinkFactory,SubmissionSectionHalLinkFactory
This is the factory that will be called to add the links to the hal resources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddLinks(RESOURCE halResource, org.springframework.data.domain.Pageable pageable, LinkedList<org.springframework.hateoas.Link> list) protected org.springframework.hateoas.Linkprotected <T> org.springframework.hateoas.LinkPlease note that this method could lead to double encoding.protected abstract Class<CONTROLLER>List<org.springframework.hateoas.Link>getLinksFor(HALResource halResource, org.springframework.data.domain.Pageable pageable) protected <C> CgetMethodOn(Class<C> clazz) protected CONTROLLERgetMethodOn(Object... parameters) booleanprotected <T> UriComponentsBuilderuriBuilder(T data)
-
Constructor Details
-
HalLinkFactory
public HalLinkFactory()
-
-
Method Details
-
supports
-
getLinksFor
public List<org.springframework.hateoas.Link> getLinksFor(HALResource halResource, org.springframework.data.domain.Pageable pageable) throws Exception - Throws:
Exception
-
buildLink
Please note that this method could lead to double encoding. See: https://github.com/DSpace/DSpace/issues/8333 -
uriBuilder
-
buildLink
-
getMethodOn
-
getMethodOn
-
addLinks
protected abstract void addLinks(RESOURCE halResource, org.springframework.data.domain.Pageable pageable, LinkedList<org.springframework.hateoas.Link> list) throws Exception - Throws:
Exception
-
getControllerClass
-
getResourceClass
-