Class AbstractEntityWebScript

java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
fr.becpg.repo.web.scripts.remote.AbstractEntityWebScript
All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
Direct Known Subclasses:
BranchEntityWebScript, CheckEntityWebScript, CreateEntityWebScript, DeleteEntityWebScript, EntityDictionaryWebScript, EntityReportWebScript, FormulateEntityWebScript, GetActivitiesWebScript, GetContentWebScript, GetEntityDataWebScript, GetEntityWebScript, ListEntitiesWebScript, MergeEntityWebScript, UpdateEntityDataWebScript, UpdateEntityWebScript

public abstract class AbstractEntityWebScript extends org.springframework.extensions.webscripts.AbstractWebScript
Abstract remote entity webscript
Version:
$Id: $Id
Author:
matthieu
  • Field Details

    • logger

      protected static final org.apache.commons.logging.Log logger
      Constant logger
    • JSON_PARAM

      protected static final String JSON_PARAM
      Constant JSON_PARAM="jsonParam"
      See Also:
    • PARAM_TYPE

      protected static final String PARAM_TYPE
      Constant PARAM_TYPE="type"
      See Also:
    • PARAM_PARAMS

      protected static final String PARAM_PARAMS
      Constant PARAM_PARAMS="params"
      See Also:
    • PARAM_QUERY

      protected static final String PARAM_QUERY
      Constant PARAM_QUERY="query"
      See Also:
    • PARAM_PATH

      protected static final String PARAM_PATH
      Constant PARAM_PATH="path"
      See Also:
    • PARAM_FORMAT

      protected static final String PARAM_FORMAT
      Constant PARAM_FORMAT="format"
      See Also:
    • PARAM_NODEREF

      protected static final String PARAM_NODEREF
      Constant PARAM_NODEREF="nodeRef"
      See Also:
    • PARAM_ALL_VERSION

      protected static final String PARAM_ALL_VERSION
      Constant PARAM_ALL_VERSION="allVersion"
      See Also:
    • PARAM_FIELDS

      protected static final String PARAM_FIELDS
      Constant PARAM_FIELDS="fields"
      See Also:
    • PARAM_LISTS

      protected static final String PARAM_LISTS
      Constant PARAM_LISTS="lists"
      See Also:
    • PARAM_EXCLUDE_SYSTEMS

      protected static final String PARAM_EXCLUDE_SYSTEMS
      Constant PARAM_EXCLUDE_SYSTEMS="excludeSystems"
      See Also:
    • PARAM_CALLBACK

      protected static final String PARAM_CALLBACK
      http://localhost:8080/alfresco/services/becpg/remote/entity
      See Also:
    • PARAM_CALLBACK_USER

      protected static final String PARAM_CALLBACK_USER
      Callback auth admin:becpg
      See Also:
    • PARAM_CALLBACK_PASSWORD

      protected static final String PARAM_CALLBACK_PASSWORD
      Constant PARAM_CALLBACK_PASSWORD="callbackPassword"
      See Also:
    • PARAM_MAX_RESULTS

      protected static final String PARAM_MAX_RESULTS
      Constant PARAM_MAX_RESULTS="maxResults"
      See Also:
    • PARAM_PAGE

      protected static final String PARAM_PAGE
      Constant PARAM_PAGE="page"
      See Also:
    • nodeService

      protected org.alfresco.service.cmr.repository.NodeService nodeService
      Services
    • remoteEntityService

      protected RemoteEntityService remoteEntityService
    • mimetypeService

      protected org.alfresco.service.cmr.repository.MimetypeService mimetypeService
    • permissionService

      protected org.alfresco.service.cmr.security.PermissionService permissionService
    • namespaceService

      protected org.alfresco.service.namespace.NamespaceService namespaceService
    • remoteRateLimiter

      protected RemoteRateLimiter remoteRateLimiter
    • systemConfigurationService

      protected SystemConfigurationService systemConfigurationService
    • advSearchService

      protected AdvSearchService advSearchService
    • BASE_64_PREFIX

      private static final String BASE_64_PREFIX
      See Also:
    • replacementMaps

      private static final Map<String,String> replacementMaps
  • Constructor Details

    • AbstractEntityWebScript

      public AbstractEntityWebScript()
  • Method Details

    • setAdvSearchService

      public void setAdvSearchService(AdvSearchService advSearchService)

      Setter for the field advSearchService.

      Parameters:
      advSearchService - a AdvSearchService object
    • setSystemConfigurationService

      public void setSystemConfigurationService(SystemConfigurationService systemConfigurationService)

      Setter for the field systemConfigurationService.

      Parameters:
      systemConfigurationService - a SystemConfigurationService object
    • setNamespaceService

      public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)

      Setter for the field namespaceService.

      Parameters:
      namespaceService - a NamespaceService object
    • setMimetypeService

      public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)

      Setter for the field mimetypeService.

      Parameters:
      mimetypeService - a MimetypeService object.
    • setRemoteEntityService

      public void setRemoteEntityService(RemoteEntityService remoteEntityService)

      Setter for the field remoteEntityService.

      Parameters:
      remoteEntityService - a RemoteEntityService object.
    • setNodeService

      public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

      Setter for the field nodeService.

      Parameters:
      nodeService - a NodeService object.
    • setPermissionService

      public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)

      Setter for the field permissionService.

      Parameters:
      permissionService - a PermissionService object.
    • setRemoteRateLimiter

      public void setRemoteRateLimiter(RemoteRateLimiter remoteRateLimiter)

      Setter for the field remoteRateLimiter.

      Parameters:
      remoteRateLimiter - a RemoteRateLimiter object
    • maxResultsLimit

      protected Integer maxResultsLimit()

      maxResultsLimit.

      Returns:
      a Integer object
    • execute

      public void execute(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse resp) throws IOException
      Throws:
      IOException
    • executeInternal

      protected abstract void executeInternal(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse resp) throws IOException

      executeInternal.

      Parameters:
      req - a WebScriptRequest object
      resp - a WebScriptResponse object
      Throws:
      IOException - if any.
    • findEntities

      protected org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef> findEntities(org.springframework.extensions.webscripts.WebScriptRequest req, Integer maxResults)

      findEntities.

      Parameters:
      req - a WebScriptRequest object.
      maxResults - a Integer object
      Returns:
      a List object.
    • extractBodyRequest

      private String extractBodyRequest(org.springframework.extensions.webscripts.WebScriptRequest req) throws IOException
      Throws:
      IOException
    • intParam

      protected Integer intParam(org.springframework.extensions.webscripts.WebScriptRequest req, String paramName)

      intParam.

      Parameters:
      req - a WebScriptRequest object
      paramName - a String object
      Returns:
      a Integer object
    • findEntity

      protected org.alfresco.service.cmr.repository.NodeRef findEntity(org.springframework.extensions.webscripts.WebScriptRequest req)

      findEntity.

      Parameters:
      req - a WebScriptRequest object.
      Returns:
      a NodeRef object.
    • sendOKStatus

      protected void sendOKStatus(org.alfresco.service.cmr.repository.NodeRef entityNodeRef, org.springframework.extensions.webscripts.WebScriptResponse resp, RemoteEntityFormat format) throws IOException

      sendOKStatus.

      Parameters:
      entityNodeRef - a NodeRef object.
      resp - a WebScriptResponse object.
      format - a RemoteEntityFormat object.
      Throws:
      IOException - if any.
    • getEntityProviderCallback

      protected EntityProviderCallBack getEntityProviderCallback(org.springframework.extensions.webscripts.WebScriptRequest req)

      getEntityProviderCallback.

      Parameters:
      req - a WebScriptRequest object.
      Returns:
      a EntityProviderCallBack object.
    • getFormat

      protected RemoteEntityFormat getFormat(org.springframework.extensions.webscripts.WebScriptRequest req)

      getFormat.

      Parameters:
      req - a WebScriptRequest object.
      Returns:
      a RemoteEntityFormat object.
    • getContentType

      protected String getContentType(org.springframework.extensions.webscripts.WebScriptRequest req)

      getContentType.

      Parameters:
      req - a WebScriptRequest object.
      Returns:
      a String object.
    • extractFields

      public Set<String> extractFields(org.springframework.extensions.webscripts.WebScriptRequest req)

      extractFields.

      Parameters:
      req - a WebScriptRequest object.
      Returns:
      a List object.
    • extractLists

      public Set<String> extractLists(org.springframework.extensions.webscripts.WebScriptRequest req)

      extractLists.

      Parameters:
      req - a WebScriptRequest object.
      Returns:
      a List object.
    • formatListName

      private String formatListName(String list)
    • decodeParam

      protected static String decodeParam(String param)

      decodeParam.

      Parameters:
      param - a String object
      Returns:
      a String object
    • extractParams

      protected org.json.JSONObject extractParams(org.springframework.extensions.webscripts.WebScriptRequest req)

      extractParams.

      Parameters:
      req - a WebScriptRequest object
      Returns:
      a JSONObject object
    • extractJsonParamName

      protected String extractJsonParamName(String parameterName)

      extractJsonParamName.

      Parameters:
      parameterName - a String object
      Returns:
      a String object