Package com.emc.documentum.rest.controller

# Class AbstractController

java.lang.Object
com.emc.documentum.rest.controller.AbstractController

public class AbstractController extends Object
The abstract class for resource controllers. It registers a number of property editors for query parameters.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final Map<String,Object>`
  `POST_FROM_COLLECTION_MAP`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractController()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected <T extends Linkable>
  T`
  `getRenderedObject(String repositoryName, T object, boolean links, UriInfo uriInfo, Map<String,Object> others)`
  Get the rendered linkable object from the view definition.
  `protected <T extends Linkable>
  AtomFeed`
  `getRenderedPage(String repositoryName, Page<T> page, boolean links, boolean inline, UriInfo uriInfo, Map<String,Object> others)`
  Get the rendered atom feed from the view definition.
  `void`
  `initBinder(org.springframework.web.bind.WebDataBinder binder)`
  Initialize the binding for registered query parameters.
  `protected void`
  `validateCollectionNotAllowed(jakarta.servlet.http.HttpServletRequest request)`
  `protected void`
  `validateOnlyPageItemsPerPageCollectionAllowed(jakarta.servlet.http.HttpServletRequest request)`
  `protected void`
  `validatePaginationNotAllowed(jakarta.servlet.http.HttpServletRequest request)`
  `protected void`
  `validateTargetControllerAccessible(Class<? extends AbstractController> controllerClazz)`
  validate the accessibility of the target resource controller.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### POST_FROM_COLLECTION_MAP

    protected static final Map<String,Object> POST_FROM_COLLECTION_MAP

- ## Constructor Details

  - ### AbstractController

    public AbstractController()

- ## Method Details

  - ### initBinder

    @InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
    Initialize the binding for registered query parameters. This method is called by Spring MVC handlers.
    Parameters:
      `binder` - the binder
    See Also:
      - `InitBinder`

  - ### getRenderedObject

    protected <T extends Linkable> T getRenderedObject(String repositoryName, T object, boolean links, UriInfo uriInfo, Map<String,Object> others)
    Get the rendered linkable object from the view definition. The view definition classes are loaded from `ViewFactory`. The default view definition can be annotated on the controller definition by `ResourceViewBinding`.
    Type Parameters:
      `T` - serializable model data
    Parameters:
      `repositoryName` - repository name
      `object` - linkable model object
      `links` - indicate whether to return links
      `uriInfo` - uri info
      `others` - other parameters
    Returns:
      the rendered model object

  - ### getRenderedPage

    protected <T extends Linkable> AtomFeed getRenderedPage(String repositoryName, Page<T> page, boolean links, boolean inline, UriInfo uriInfo, Map<String,Object> others)
    Get the rendered atom feed from the view definition. The view definition classes are loaded from `ViewFactory`. The default view definition can be annotated on the controller definition by `ResourceViewBinding`.
    Type Parameters:
      `T` - serializable model data
    Parameters:
      `repositoryName` - repository name
      `page` - the paged items
      `links` - indicate whether to return links
      `uriInfo` - uri info
      `others` - other parameters
      `inline` - whether embed the entry in the feed
    Returns:
      the rendered atom feed for the page

  - ### validateTargetControllerAccessible

    protected void validateTargetControllerAccessible(Class<? extends AbstractController> controllerClazz)
    validate the accessibility of the target resource controller. If the target controller class is not active, a `RestClientErrorException` is thrown with error code E_TARGET_RESOURCE_DISABLED and status 403.
    Parameters:
      `controllerClazz` - the controller

  - ### validatePaginationNotAllowed

    protected void validatePaginationNotAllowed(jakarta.servlet.http.HttpServletRequest request)

  - ### validateCollectionNotAllowed

    protected void validateCollectionNotAllowed(jakarta.servlet.http.HttpServletRequest request)

  - ### validateOnlyPageItemsPerPageCollectionAllowed

    protected void validateOnlyPageItemsPerPageCollectionAllowed(jakarta.servlet.http.HttpServletRequest request)