public abstract class DictionaryWebServiceBase
extends org.springframework.extensions.webscripts.DeclarativeWebScript
Modifier and Type | Field and Description |
---|---|
protected org.alfresco.service.cmr.dictionary.DictionaryService |
dictionaryservice
Dictionary service
|
protected static String |
MODEL_PROP_KEY_MESSAGE_LOOKUP |
protected org.alfresco.service.namespace.NamespaceService |
namespaceService
Namespace service
|
Constructor and Description |
---|
DictionaryWebServiceBase() |
Modifier and Type | Method and Description |
---|---|
protected org.alfresco.service.namespace.QName |
createClassQName(String className) |
protected org.alfresco.service.namespace.QName |
createClassQName(String prefix,
String shortName) |
String |
getFullNamespaceURI(String classname) |
String |
getFullNamespaceURI(String prefix,
String shorname) |
String |
getNamespaceURIfromQname(org.alfresco.service.namespace.QName qname) |
String |
getPrefix(String classname) |
String |
getPrefixFromModelName(String modelname) |
String |
getShortName(String classname) |
String |
getValidInput(String input) |
boolean |
isValidAssociationFilter(String af) |
boolean |
isValidClassFilter(String classfilter) |
boolean |
isValidClassname(String classname) |
boolean |
isValidClassname(String prefix,
String shorname)
Checks whether the classname is valid
|
boolean |
isValidModelName(String modelname) |
boolean |
isValidTypeorAspect(String classname) |
boolean |
isValidTypeorAspect(String prefix,
String shorname) |
protected <T> Collection<T> |
reorderedValues(List<org.alfresco.service.cmr.dictionary.ClassDefinition> sortedClassDefs,
Map<org.alfresco.service.namespace.QName,T> dependent)
Returns dependent collections (properties or associations)
in order that complies to order of class definitions
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
Set the dictionaryService property.
|
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceservice)
Set the namespaceService property.
|
execute, executeFinallyImpl, executeImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
protected static final String MODEL_PROP_KEY_MESSAGE_LOOKUP
protected org.alfresco.service.namespace.NamespaceService namespaceService
protected org.alfresco.service.cmr.dictionary.DictionaryService dictionaryservice
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceservice)
namespaceservice
- The namespace service instance to setpublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService
- The dictionary service instance to setprotected org.alfresco.service.namespace.QName createClassQName(String className)
protected org.alfresco.service.namespace.QName createClassQName(String prefix, String shortName)
prefix
- - prefix for class nameshortName
- - short class namepublic String getNamespaceURIfromQname(org.alfresco.service.namespace.QName qname)
qname
- QNamepublic String getFullNamespaceURI(String classname)
classname
- the class name as cm_personpublic String getFullNamespaceURI(String prefix, String shorname)
prefix
- prefix for classname as cmshorname
- the short class name as personpublic boolean isValidClassname(String classname)
classname
- - checks whether the classname is valid , gets the classname as input e.g cm_personpublic boolean isValidClassname(String prefix, String shorname)
prefix
- - gets the prefix as input e.g cmshorname
- - gets the short classname as input e.g personpublic String getPrefixFromModelName(String modelname)
modelname
- Stringpublic boolean isValidAssociationFilter(String af)
public boolean isValidTypeorAspect(String classname)
classname
- as the inputpublic boolean isValidTypeorAspect(String prefix, String shorname)
prefix
- as the inputshorname
- as the inputpublic boolean isValidModelName(String modelname)
modelname
- - gets the modelname as the input (modelname is without prefix ie. cm:contentmodel => where modelname = contentmodel)public String getPrefix(String classname)
classname
- - returns the prefix from the classname of the format namespaceprefix:name eg. cm_personpublic String getShortName(String classname)
classname
- Stringpublic String getValidInput(String input)
input
- -gets a string input and validates itpublic boolean isValidClassFilter(String classfilter)
classfilter
- =>valid class filters are all,apect or typeprotected <T> Collection<T> reorderedValues(List<org.alfresco.service.cmr.dictionary.ClassDefinition> sortedClassDefs, Map<org.alfresco.service.namespace.QName,T> dependent)
sortedClassDefs
- - list of sorted class definitionsdependent
- - collections that depend on class definitionsCopyright © 2005–2017 Alfresco Software. All rights reserved.