Package fr.becpg.repo.web.scripts.remote
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
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript
org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdvSearchServiceprivate static final Stringprotected static final StringConstantJSON_PARAM="jsonParam"protected static final org.apache.commons.logging.LogConstantloggerprotected org.alfresco.service.cmr.repository.MimetypeServiceprotected org.alfresco.service.namespace.NamespaceServiceprotected org.alfresco.service.cmr.repository.NodeServiceServicesprotected static final StringConstantPARAM_ALL_VERSION="allVersion"protected static final Stringhttp://localhost:8080/alfresco/services/becpg/remote/entityprotected static final StringConstantPARAM_CALLBACK_PASSWORD="callbackPassword"protected static final StringCallback auth admin:becpgprotected static final StringConstantPARAM_EXCLUDE_SYSTEMS="excludeSystems"protected static final StringConstantPARAM_FIELDS="fields"protected static final StringConstantPARAM_FORMAT="format"protected static final StringConstantPARAM_LISTS="lists"protected static final StringConstantPARAM_MAX_RESULTS="maxResults"protected static final StringConstantPARAM_NODEREF="nodeRef"protected static final StringConstantPARAM_PAGE="page"protected static final StringConstantPARAM_PARAMS="params"protected static final StringConstantPARAM_PATH="path"protected static final StringConstantPARAM_QUERY="query"protected static final StringConstantPARAM_TYPE="type"protected org.alfresco.service.cmr.security.PermissionServiceprotected RemoteEntityServiceprotected RemoteRateLimiterprotected SystemConfigurationService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringdecodeParam(String param) decodeParam.voidexecute(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse resp) protected abstract voidexecuteInternal(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse resp) executeInternal.private StringextractBodyRequest(org.springframework.extensions.webscripts.WebScriptRequest req) extractFields(org.springframework.extensions.webscripts.WebScriptRequest req) extractFields.protected StringextractJsonParamName(String parameterName) extractJsonParamName.extractLists(org.springframework.extensions.webscripts.WebScriptRequest req) extractLists.protected org.json.JSONObjectextractParams(org.springframework.extensions.webscripts.WebScriptRequest req) extractParams.protected org.alfresco.query.PagingResults<org.alfresco.service.cmr.repository.NodeRef>findEntities(org.springframework.extensions.webscripts.WebScriptRequest req, Integer maxResults) findEntities.protected org.alfresco.service.cmr.repository.NodeReffindEntity(org.springframework.extensions.webscripts.WebScriptRequest req) findEntity.private StringformatListName(String list) protected StringgetContentType(org.springframework.extensions.webscripts.WebScriptRequest req) getContentType.protected EntityProviderCallBackgetEntityProviderCallback(org.springframework.extensions.webscripts.WebScriptRequest req) getEntityProviderCallback.protected RemoteEntityFormatgetFormat(org.springframework.extensions.webscripts.WebScriptRequest req) getFormat.protected IntegerintParam.protected IntegermaxResultsLimit.protected voidsendOKStatus(org.alfresco.service.cmr.repository.NodeRef entityNodeRef, org.springframework.extensions.webscripts.WebScriptResponse resp, RemoteEntityFormat format) sendOKStatus.voidsetAdvSearchService(AdvSearchService advSearchService) Setter for the fieldadvSearchService.voidsetMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService) Setter for the fieldmimetypeService.voidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Setter for the fieldnamespaceService.voidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) Setter for the fieldnodeService.voidsetPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) Setter for the fieldpermissionService.voidsetRemoteEntityService(RemoteEntityService remoteEntityService) Setter for the fieldremoteEntityService.voidsetRemoteRateLimiter(RemoteRateLimiter remoteRateLimiter) Setter for the fieldremoteRateLimiter.voidsetSystemConfigurationService(SystemConfigurationService systemConfigurationService) Setter for the fieldsystemConfigurationService.Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
-
Field Details
-
logger
protected static final org.apache.commons.logging.Log loggerConstantlogger -
JSON_PARAM
ConstantJSON_PARAM="jsonParam"- See Also:
-
PARAM_TYPE
ConstantPARAM_TYPE="type"- See Also:
-
PARAM_PARAMS
ConstantPARAM_PARAMS="params"- See Also:
-
PARAM_QUERY
ConstantPARAM_QUERY="query"- See Also:
-
PARAM_PATH
ConstantPARAM_PATH="path"- See Also:
-
PARAM_FORMAT
ConstantPARAM_FORMAT="format"- See Also:
-
PARAM_NODEREF
ConstantPARAM_NODEREF="nodeRef"- See Also:
-
PARAM_ALL_VERSION
ConstantPARAM_ALL_VERSION="allVersion"- See Also:
-
PARAM_FIELDS
ConstantPARAM_FIELDS="fields"- See Also:
-
PARAM_LISTS
ConstantPARAM_LISTS="lists"- See Also:
-
PARAM_EXCLUDE_SYSTEMS
ConstantPARAM_EXCLUDE_SYSTEMS="excludeSystems"- See Also:
-
PARAM_CALLBACK
http://localhost:8080/alfresco/services/becpg/remote/entity- See Also:
-
PARAM_CALLBACK_USER
Callback auth admin:becpg- See Also:
-
PARAM_CALLBACK_PASSWORD
ConstantPARAM_CALLBACK_PASSWORD="callbackPassword"- See Also:
-
PARAM_MAX_RESULTS
ConstantPARAM_MAX_RESULTS="maxResults"- See Also:
-
PARAM_PAGE
ConstantPARAM_PAGE="page"- See Also:
-
nodeService
protected org.alfresco.service.cmr.repository.NodeService nodeServiceServices -
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
-
systemConfigurationService
-
advSearchService
-
BASE_64_PREFIX
- See Also:
-
replacementMaps
-
-
Constructor Details
-
AbstractEntityWebScript
public AbstractEntityWebScript()
-
-
Method Details
-
setAdvSearchService
Setter for the field
advSearchService.- Parameters:
advSearchService- aAdvSearchServiceobject
-
setSystemConfigurationService
Setter for the field
systemConfigurationService.- Parameters:
systemConfigurationService- aSystemConfigurationServiceobject
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) Setter for the field
namespaceService.- Parameters:
namespaceService- aNamespaceServiceobject
-
setMimetypeService
public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService) Setter for the field
mimetypeService.- Parameters:
mimetypeService- aMimetypeServiceobject.
-
setRemoteEntityService
Setter for the field
remoteEntityService.- Parameters:
remoteEntityService- aRemoteEntityServiceobject.
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) Setter for the field
nodeService.- Parameters:
nodeService- aNodeServiceobject.
-
setPermissionService
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) Setter for the field
permissionService.- Parameters:
permissionService- aPermissionServiceobject.
-
setRemoteRateLimiter
Setter for the field
remoteRateLimiter.- Parameters:
remoteRateLimiter- aRemoteRateLimiterobject
-
maxResultsLimit
maxResultsLimit.
- Returns:
- a
Integerobject
-
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- aWebScriptRequestobjectresp- aWebScriptResponseobject- 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.
-
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.
-
findEntity
protected org.alfresco.service.cmr.repository.NodeRef findEntity(org.springframework.extensions.webscripts.WebScriptRequest req) findEntity.
- Parameters:
req- aWebScriptRequestobject.- Returns:
- a
NodeRefobject.
-
sendOKStatus
protected void sendOKStatus(org.alfresco.service.cmr.repository.NodeRef entityNodeRef, org.springframework.extensions.webscripts.WebScriptResponse resp, RemoteEntityFormat format) throws IOException sendOKStatus.
- Parameters:
entityNodeRef- aNodeRefobject.resp- aWebScriptResponseobject.format- aRemoteEntityFormatobject.- Throws:
IOException- if any.
-
getEntityProviderCallback
protected EntityProviderCallBack getEntityProviderCallback(org.springframework.extensions.webscripts.WebScriptRequest req) getEntityProviderCallback.
- Parameters:
req- aWebScriptRequestobject.- Returns:
- a
EntityProviderCallBackobject.
-
getFormat
protected RemoteEntityFormat getFormat(org.springframework.extensions.webscripts.WebScriptRequest req) getFormat.
- Parameters:
req- aWebScriptRequestobject.- Returns:
- a
RemoteEntityFormatobject.
-
getContentType
getContentType.
- Parameters:
req- aWebScriptRequestobject.- Returns:
- a
Stringobject.
-
extractFields
extractFields.
- Parameters:
req- aWebScriptRequestobject.- Returns:
- a
Listobject.
-
extractLists
extractLists.
- Parameters:
req- aWebScriptRequestobject.- Returns:
- a
Listobject.
-
formatListName
-
decodeParam
decodeParam.
-
extractParams
protected org.json.JSONObject extractParams(org.springframework.extensions.webscripts.WebScriptRequest req) extractParams.
- Parameters:
req- aWebScriptRequestobject- Returns:
- a
JSONObjectobject
-
extractJsonParamName
extractJsonParamName.
-