Class FullProjection

java.lang.Object
org.dspace.app.rest.projection.AbstractProjection
org.dspace.app.rest.projection.FullProjection
All Implemented Interfaces:
Projection

@Component public class FullProjection extends AbstractProjection
Catch-all projection that allows embedding of all subresources.
  • Field Details

  • Constructor Details

    • FullProjection

      public FullProjection()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Projection
      Gets the projection name.
      Returns:
      the name, which is a unique alphanumeric string.
    • allowEmbedding

      public boolean allowEmbedding(HALResource<? extends RestAddressableModel> halResource, LinkRest linkRest, org.springframework.hateoas.Link... oldLinks)
      Description copied from interface: Projection
      Tells whether this projection permits the embedding of a particular embeddable subresource. This gives the projection an opportunity to opt in to to certain embeds, by returning true. Note: If this method returns true for a given subresource, it will be automatically linked regardless of what Projection.allowLinking(HALResource, LinkRest) returns.
      Specified by:
      allowEmbedding in interface Projection
      Overrides:
      allowEmbedding in class AbstractProjection
      Parameters:
      halResource - the resource from which the embed may or may not be made.
      linkRest - the LinkRest annotation through which the related resource was discovered on the rest object.
      oldLinks - The previously traversed links
      Returns:
      true if allowed, false otherwise.
    • allowLinking

      public boolean allowLinking(HALResource halResource, LinkRest linkRest)
      Description copied from interface: Projection
      Tells whether this projection permits the linking of a particular linkable subresource. This gives the projection an opportunity to opt in to to certain links, by returning true. Note: If Projection.allowEmbedding(HALResource, LinkRest, Link...) returns true for a given subresource, it will be automatically linked regardless of what this method returns.
      Specified by:
      allowLinking in interface Projection
      Overrides:
      allowLinking in class AbstractProjection
      Parameters:
      halResource - the resource from which the link may or may not be made.
      linkRest - the LinkRest annotation through which the related resource was discovered on the rest object.
      Returns:
      true if allowed, false otherwise.