public class DescriptionImpl extends AbstractBaseDescriptionDocument implements Description
Description.FormatStyle, Description.Lifecycle, Description.RequiredAuthentication, Description.RequiredCache, Description.RequiredTransaction, Description.RequiredTransactionParameters, Description.TransactionCapability| Modifier and Type | Field and Description |
|---|---|
static String |
DESC_NAME_PATTERN |
static String |
DESC_NAME_POSTFIX |
static String |
ROOT_ELEMENT_NAME |
COMMON_XML_HEADER, COMMON_XML_NS, NEW_LINE, TAB| Constructor and Description |
|---|
DescriptionImpl()
Default constructor
|
DescriptionImpl(String id,
String shortName,
String description,
String url)
Constructor with id, shortName, description and url
|
| Modifier and Type | Method and Description |
|---|---|
ArgumentTypeDescription[] |
getArguments()
Gets webscript argument descriptions
|
String |
getDefaultFormat()
Gets the default response format
Note: the default response format is the first listed in the service
description document
|
Map<String,Serializable> |
getExtensions()
Gets web script specific extensions
|
Set<String> |
getFamilys()
Gets the family(s) of this service in the order that they are defined
|
Description.FormatStyle |
getFormatStyle()
Gets the style of Format discriminator supported by this web script
|
String |
getKind()
Gets the kind of service.
|
Description.Lifecycle |
getLifecycle()
Get the lifecycle
|
String |
getMethod()
Gets the HTTP method this service is bound to
|
boolean |
getMultipartProcessing() |
NegotiatedFormat[] |
getNegotiatedFormats()
Gets the formats available for negotiation
|
Path |
getPackage()
Gets the package (Path version of getScriptPath)
|
TypeDescription[] |
getRequestTypes()
Gets webscript request types
|
Description.RequiredAuthentication |
getRequiredAuthentication()
Gets the required authentication level for execution of this service
|
Description.RequiredCache |
getRequiredCache()
Gets the required level of caching
|
Description.RequiredTransaction |
getRequiredTransaction()
Gets the required transaction level
|
Description.RequiredTransactionParameters |
getRequiredTransactionParameters()
Gets the transaction parameters
|
TypeDescription[] |
getResponseTypes()
Gets webscript response types
|
String |
getRunAs()
Gets the ID of the user that the service should be run as or
null if the service is to be run as the
authenticated user. |
String |
getScriptPath()
Gets the path within the store of this web script
|
String[] |
getURIs()
Gets the URIs this service supports
|
static DescriptionImpl |
newInstance()
Return a new instance of webscript
|
void |
parse(org.dom4j.Element elem)
Populates fields from given XML element without validation
|
void |
setArguments(ArgumentTypeDescription[] arguments) |
void |
setDefaultFormat(String defaultFormat)
Sets the default response format
|
void |
setExtensions(Map<String,Serializable> extensions)
Sets Web Script custom extensions
|
void |
setFamilys(Set<String> familys) |
void |
setFormatStyle(Description.FormatStyle formatStyle)
Sets the format style
|
void |
setKind(String kind)
Sets the service kind
|
void |
setLifecycle(Description.Lifecycle lifecycle)
Sets the lifecycle
|
void |
setMethod(String httpMethod)
Sets the service http method
|
void |
setMultipartProcessing(boolean multipartProcessing) |
void |
setNegotiatedFormats(NegotiatedFormat[] negotiatedFormats)
Sets the negotiated formats
|
void |
setPackage(Path scriptPackage)
Sets the Package (path version of getScriptPath)
|
void |
setRequestTypes(TypeDescription[] requestTypes) |
void |
setRequiredAuthentication(Description.RequiredAuthentication requiredAuthentication)
Sets the required level of authentication
|
void |
setRequiredCache(Description.RequiredCache requiredCache)
Sets the required cache
|
void |
setRequiredTransactionParameters(Description.RequiredTransactionParameters transactionParameters)
Sets the transaction parameters
|
void |
setResponseTypes(TypeDescription[] responseTypes) |
void |
setRunAs(String runAs)
Sets the ID of the user that the service should be run as.
|
void |
setScriptPath(String scriptPath)
Sets the script path
|
void |
setUris(String[] uris)
Sets the service URIs
|
String |
toString() |
getDescDocument, getDescPath, getStore, getStorePath, parseDocument, setDescPath, setStorecompareField, getDescription, getId, getShortName, setDescription, setId, setShortName, validateRootElementclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescDocument, getDescPath, getStorePathgetDescription, getId, getShortNamepublic static final String ROOT_ELEMENT_NAME
public static final String DESC_NAME_POSTFIX
public static final String DESC_NAME_PATTERN
public DescriptionImpl(String id, String shortName, String description, String url)
id - StringshortName - Stringdescription - Stringurl - Stringpublic DescriptionImpl()
public ArgumentTypeDescription[] getArguments()
DescriptiongetArguments in interface Descriptionpublic void setArguments(ArgumentTypeDescription[] arguments)
arguments - the arguments to setpublic TypeDescription[] getRequestTypes()
DescriptiongetRequestTypes in interface Descriptionpublic void setRequestTypes(TypeDescription[] requestTypes)
requestTypes - the requestTypes to setpublic TypeDescription[] getResponseTypes()
DescriptiongetResponseTypes in interface Descriptionpublic void setResponseTypes(TypeDescription[] responseTypes)
responseTypes - the responseTypes to setpublic void setScriptPath(String scriptPath)
scriptPath - Stringpublic String getScriptPath()
DescriptiongetScriptPath in interface Descriptionpublic void setPackage(Path scriptPackage)
scriptPackage - Pathpublic Path getPackage()
DescriptiongetPackage in interface Descriptionpublic void setKind(String kind)
kind - Stringpublic String getKind()
DescriptiongetKind in interface Descriptionpublic Set<String> getFamilys()
DescriptiongetFamilys in interface Descriptionpublic void setRequiredAuthentication(Description.RequiredAuthentication requiredAuthentication)
requiredAuthentication - RequiredAuthenticationpublic Description.RequiredAuthentication getRequiredAuthentication()
DescriptiongetRequiredAuthentication in interface Descriptionpublic void setRunAs(String runAs)
runAs - a user namepublic String getRunAs()
Descriptionnull if the service is to be run as the
authenticated user.getRunAs in interface Descriptionnull if not applicablepublic Description.RequiredTransaction getRequiredTransaction()
DescriptiongetRequiredTransaction in interface Descriptionpublic void setRequiredTransactionParameters(Description.RequiredTransactionParameters transactionParameters)
transactionParameters - RequiredTransactionParameterspublic Description.RequiredTransactionParameters getRequiredTransactionParameters()
DescriptiongetRequiredTransactionParameters in interface Descriptionpublic void setRequiredCache(Description.RequiredCache requiredCache)
requiredCache - RequiredCachepublic Description.RequiredCache getRequiredCache()
DescriptiongetRequiredCache in interface Descriptionpublic void setFormatStyle(Description.FormatStyle formatStyle)
formatStyle - FormatStylepublic Description.FormatStyle getFormatStyle()
DescriptiongetFormatStyle in interface Descriptionpublic void setMethod(String httpMethod)
httpMethod - Stringpublic String getMethod()
DescriptiongetMethod in interface Descriptionpublic void setUris(String[] uris)
uris - String[]public String[] getURIs()
DescriptiongetURIs in interface Descriptionpublic void setDefaultFormat(String defaultFormat)
defaultFormat - Stringpublic String getDefaultFormat()
DescriptiongetDefaultFormat in interface Descriptionpublic void setNegotiatedFormats(NegotiatedFormat[] negotiatedFormats)
negotiatedFormats - NegotiatedFormat[]public NegotiatedFormat[] getNegotiatedFormats()
DescriptiongetNegotiatedFormats in interface Descriptionpublic void setExtensions(Map<String,Serializable> extensions)
extensions - Mappublic Map<String,Serializable> getExtensions()
DescriptiongetExtensions in interface Descriptionpublic Description.Lifecycle getLifecycle()
DescriptiongetLifecycle in interface Descriptionpublic void setLifecycle(Description.Lifecycle lifecycle)
lifecycle - Lifecyclepublic boolean getMultipartProcessing()
getMultipartProcessing in interface Descriptionpublic void setMultipartProcessing(boolean multipartProcessing)
setMultipartProcessing in interface DescriptionmultipartProcessing - the multipartProcessing to setpublic void parse(org.dom4j.Element elem)
AbstractBaseDescriptionparse in class AbstractBaseDescriptionelem - root element for parsingpublic static DescriptionImpl newInstance()
Copyright © 2005–2018 Alfresco Software. All rights reserved.