Class AbstractAdminWebScript
- java.lang.Object
-
- org.springframework.extensions.webscripts.AbstractWebScript
-
- org.springframework.extensions.webscripts.DeclarativeWebScript
-
- org.alfresco.repo.web.scripts.admin.AbstractAdminWebScript
-
- All Implemented Interfaces:
org.springframework.extensions.webscripts.WebScript
- Direct Known Subclasses:
RepoRestrictionsGet,RepoUsageGet,RepoUsagePost
public abstract class AbstractAdminWebScript extends org.springframework.extensions.webscripts.DeclarativeWebScriptAbstract implementation for scripts that access theRepoAdminService.- Since:
- 3.4
- Author:
- Derek Hulley
-
-
Field Summary
Fields Modifier and Type Field Description protected org.alfresco.service.descriptor.DescriptorServicedescriptorServicestatic java.lang.StringJSON_KEY_DOCUMENTSstatic java.lang.StringJSON_KEY_ERRORSstatic java.lang.StringJSON_KEY_LAST_UPDATEstatic java.lang.StringJSON_KEY_LEVELstatic java.lang.StringJSON_KEY_LICENSE_HOLDERstatic java.lang.StringJSON_KEY_LICENSE_MODEstatic java.lang.StringJSON_KEY_LICENSE_VALID_UNTILstatic java.lang.StringJSON_KEY_READ_ONLYstatic java.lang.StringJSON_KEY_UPDATEDstatic java.lang.StringJSON_KEY_USERSstatic java.lang.StringJSON_KEY_WARNINGSprotected org.apache.commons.logging.LogloggerLogger that can be used by subclasses.protected org.alfresco.service.cmr.admin.RepoAdminServicerepoAdminService
-
Constructor Summary
Constructors Constructor Description AbstractAdminWebScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetI18NMessage(java.lang.String key, java.lang.Object... args)Return an I18N'd message for the given key or the key itself if not presentprotected voidputUsageInModel(java.util.Map<java.lang.String,java.lang.Object> model, org.alfresco.service.cmr.admin.RepoUsage repoUsage, boolean updated)Helper to assign JSON return variables based on the repository usage data.voidsetDescriptorService(org.alfresco.service.descriptor.DescriptorService descriptorService)voidsetRepoAdminService(org.alfresco.service.cmr.admin.RepoAdminService repoAdminService)-
Methods inherited from class org.springframework.extensions.webscripts.DeclarativeWebScript
execute, executeFinallyImpl, executeImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
-
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 Detail
-
JSON_KEY_LAST_UPDATE
public static final java.lang.String JSON_KEY_LAST_UPDATE
- See Also:
- Constant Field Values
-
JSON_KEY_USERS
public static final java.lang.String JSON_KEY_USERS
- See Also:
- Constant Field Values
-
JSON_KEY_DOCUMENTS
public static final java.lang.String JSON_KEY_DOCUMENTS
- See Also:
- Constant Field Values
-
JSON_KEY_LICENSE_MODE
public static final java.lang.String JSON_KEY_LICENSE_MODE
- See Also:
- Constant Field Values
-
JSON_KEY_READ_ONLY
public static final java.lang.String JSON_KEY_READ_ONLY
- See Also:
- Constant Field Values
-
JSON_KEY_UPDATED
public static final java.lang.String JSON_KEY_UPDATED
- See Also:
- Constant Field Values
-
JSON_KEY_LICENSE_VALID_UNTIL
public static final java.lang.String JSON_KEY_LICENSE_VALID_UNTIL
- See Also:
- Constant Field Values
-
JSON_KEY_LICENSE_HOLDER
public static final java.lang.String JSON_KEY_LICENSE_HOLDER
- See Also:
- Constant Field Values
-
JSON_KEY_LEVEL
public static final java.lang.String JSON_KEY_LEVEL
- See Also:
- Constant Field Values
-
JSON_KEY_WARNINGS
public static final java.lang.String JSON_KEY_WARNINGS
- See Also:
- Constant Field Values
-
JSON_KEY_ERRORS
public static final java.lang.String JSON_KEY_ERRORS
- See Also:
- Constant Field Values
-
logger
protected final org.apache.commons.logging.Log logger
Logger that can be used by subclasses.
-
repoAdminService
protected org.alfresco.service.cmr.admin.RepoAdminService repoAdminService
-
descriptorService
protected org.alfresco.service.descriptor.DescriptorService descriptorService
-
-
Method Detail
-
setRepoAdminService
public void setRepoAdminService(org.alfresco.service.cmr.admin.RepoAdminService repoAdminService)
- Parameters:
repoAdminService- the service that provides the functionality
-
setDescriptorService
public void setDescriptorService(org.alfresco.service.descriptor.DescriptorService descriptorService)
- Parameters:
descriptorService- the service that provides the functionality
-
getI18NMessage
protected java.lang.String getI18NMessage(java.lang.String key, java.lang.Object... args)Return an I18N'd message for the given key or the key itself if not present- Parameters:
args- arguments to replace the variables in the message
-
putUsageInModel
protected void putUsageInModel(java.util.Map<java.lang.String,java.lang.Object> model, org.alfresco.service.cmr.admin.RepoUsage repoUsage, boolean updated)Helper to assign JSON return variables based on the repository usage data.
-
-