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 DescriptorServicedescriptorServicestatic StringJSON_KEY_DOCUMENTSstatic StringJSON_KEY_ERRORSstatic StringJSON_KEY_LAST_UPDATEstatic StringJSON_KEY_LEVELstatic StringJSON_KEY_LICENSE_HOLDERstatic StringJSON_KEY_LICENSE_MODEstatic StringJSON_KEY_LICENSE_VALID_UNTILstatic StringJSON_KEY_READ_ONLYstatic StringJSON_KEY_UPDATEDstatic StringJSON_KEY_USERSstatic StringJSON_KEY_WARNINGSprotected org.apache.commons.logging.LogloggerLogger that can be used by subclasses.protected RepoAdminServicerepoAdminService
-
Constructor Summary
Constructors Constructor Description AbstractAdminWebScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetI18NMessage(String key, Object... args)Return an I18N'd message for the given key or the key itself if not presentprotected voidputUsageInModel(Map<String,Object> model, RepoUsage repoUsage, boolean updated)Helper to assign JSON return variables based on the repository usage data.voidsetDescriptorService(DescriptorService descriptorService)voidsetRepoAdminService(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 String JSON_KEY_LAST_UPDATE
- See Also:
- Constant Field Values
-
JSON_KEY_USERS
public static final String JSON_KEY_USERS
- See Also:
- Constant Field Values
-
JSON_KEY_DOCUMENTS
public static final String JSON_KEY_DOCUMENTS
- See Also:
- Constant Field Values
-
JSON_KEY_LICENSE_MODE
public static final String JSON_KEY_LICENSE_MODE
- See Also:
- Constant Field Values
-
JSON_KEY_READ_ONLY
public static final String JSON_KEY_READ_ONLY
- See Also:
- Constant Field Values
-
JSON_KEY_UPDATED
public static final String JSON_KEY_UPDATED
- See Also:
- Constant Field Values
-
JSON_KEY_LICENSE_VALID_UNTIL
public static final String JSON_KEY_LICENSE_VALID_UNTIL
- See Also:
- Constant Field Values
-
JSON_KEY_LICENSE_HOLDER
public static final String JSON_KEY_LICENSE_HOLDER
- See Also:
- Constant Field Values
-
JSON_KEY_LEVEL
public static final String JSON_KEY_LEVEL
- See Also:
- Constant Field Values
-
JSON_KEY_WARNINGS
public static final String JSON_KEY_WARNINGS
- See Also:
- Constant Field Values
-
JSON_KEY_ERRORS
public static final 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 RepoAdminService repoAdminService
-
descriptorService
protected DescriptorService descriptorService
-
-
Method Detail
-
setRepoAdminService
public void setRepoAdminService(RepoAdminService repoAdminService)
- Parameters:
repoAdminService- the service that provides the functionality
-
setDescriptorService
public void setDescriptorService(DescriptorService descriptorService)
- Parameters:
descriptorService- the service that provides the functionality
-
getI18NMessage
protected String getI18NMessage(String key, 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
-
-