Class DescriptionImpl

    • Constructor Detail

      • DescriptionImpl

        public DescriptionImpl​(java.lang.String id,
                               java.lang.String shortName,
                               java.lang.String description,
                               java.lang.String url)
        Constructor with id, shortName, description and url
        Parameters:
        id - String
        shortName - String
        description - String
        url - String
      • DescriptionImpl

        public DescriptionImpl()
        Default constructor
    • Method Detail

      • setArguments

        public void setArguments​(ArgumentTypeDescription[] arguments)
        Parameters:
        arguments - the arguments to set
      • setRequestTypes

        public void setRequestTypes​(TypeDescription[] requestTypes)
        Parameters:
        requestTypes - the requestTypes to set
      • setResponseTypes

        public void setResponseTypes​(TypeDescription[] responseTypes)
        Parameters:
        responseTypes - the responseTypes to set
      • setScriptPath

        public void setScriptPath​(java.lang.String scriptPath)
        Sets the script path
        Parameters:
        scriptPath - String
      • getScriptPath

        public java.lang.String getScriptPath()
        Description copied from interface: Description
        Gets the path within the store of this web script
        Specified by:
        getScriptPath in interface Description
        Returns:
        path within store
      • setPackage

        public void setPackage​(Path scriptPackage)
        Sets the Package (path version of getScriptPath)
        Parameters:
        scriptPackage - Path
      • getPackage

        public Path getPackage()
        Description copied from interface: Description
        Gets the package (Path version of getScriptPath)
        Specified by:
        getPackage in interface Description
      • setKind

        public void setKind​(java.lang.String kind)
        Sets the service kind
        Parameters:
        kind - String
      • getKind

        public java.lang.String getKind()
        Description copied from interface: Description
        Gets the kind of service. A Web Script may explicitly define its backing-bean implementation. The backing bean implementation is identified by a Spring bean whose id is: webscript. The may be dot separated.
        Specified by:
        getKind in interface Description
        Returns:
        the kind of service (or null, for a vanilla declarative web script)
      • setFamilys

        public void setFamilys​(java.util.Set<java.lang.String> familys)
        Parameters:
        familys - the family to set
      • getFamilys

        public java.util.Set<java.lang.String> getFamilys()
        Description copied from interface: Description
        Gets the family(s) of this service in the order that they are defined
        Specified by:
        getFamilys in interface Description
      • setRequiredAuthentication

        public void setRequiredAuthentication​(Description.RequiredAuthentication requiredAuthentication)
        Sets the required level of authentication
        Parameters:
        requiredAuthentication - RequiredAuthentication
      • setRunAs

        public void setRunAs​(java.lang.String runAs)
        Sets the ID of the user that the service should be run as. If not set, the service run as the authenticated user.
        Parameters:
        runAs - a user name
      • getRunAs

        public java.lang.String getRunAs()
        Description copied from interface: Description
        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.
        Specified by:
        getRunAs in interface Description
        Returns:
        a user name or null if not applicable
      • setRequiredTransactionParameters

        public void setRequiredTransactionParameters​(Description.RequiredTransactionParameters transactionParameters)
        Sets the transaction parameters
        Parameters:
        transactionParameters - RequiredTransactionParameters
      • setRequiredCache

        public void setRequiredCache​(Description.RequiredCache requiredCache)
        Sets the required cache
        Parameters:
        requiredCache - RequiredCache
      • setFormatStyle

        public void setFormatStyle​(Description.FormatStyle formatStyle)
        Sets the format style
        Parameters:
        formatStyle - FormatStyle
      • setMethod

        public void setMethod​(java.lang.String httpMethod)
        Sets the service http method
        Parameters:
        httpMethod - String
      • getMethod

        public java.lang.String getMethod()
        Description copied from interface: Description
        Gets the HTTP method this service is bound to
        Specified by:
        getMethod in interface Description
        Returns:
        HTTP method
      • setUris

        public void setUris​(java.lang.String[] uris)
        Sets the service URIs
        Parameters:
        uris - String[]
      • getURIs

        public java.lang.String[] getURIs()
        Description copied from interface: Description
        Gets the URIs this service supports
        Specified by:
        getURIs in interface Description
        Returns:
        array of URIs in order specified in service description document
      • setDefaultFormat

        public void setDefaultFormat​(java.lang.String defaultFormat)
        Sets the default response format
        Parameters:
        defaultFormat - String
      • getDefaultFormat

        public java.lang.String getDefaultFormat()
        Description copied from interface: Description
        Gets the default response format Note: the default response format is the first listed in the service description document
        Specified by:
        getDefaultFormat in interface Description
        Returns:
        default response format (or null, if format not known until run-time)
      • setNegotiatedFormats

        public void setNegotiatedFormats​(NegotiatedFormat[] negotiatedFormats)
        Sets the negotiated formats
        Parameters:
        negotiatedFormats - NegotiatedFormat[]
      • setExtensions

        public void setExtensions​(java.util.Map<java.lang.String,​java.io.Serializable> extensions)
        Sets Web Script custom extensions
        Parameters:
        extensions - Map
      • getExtensions

        public java.util.Map<java.lang.String,​java.io.Serializable> getExtensions()
        Description copied from interface: Description
        Gets web script specific extensions
        Specified by:
        getExtensions in interface Description
        Returns:
        map of extensions by name
      • setLifecycle

        public void setLifecycle​(Description.Lifecycle lifecycle)
        Sets the lifecycle
        Parameters:
        lifecycle - Lifecycle
      • getMultipartProcessing

        public boolean getMultipartProcessing()
        Specified by:
        getMultipartProcessing in interface Description
        Returns:
        true if automatic multipart formdata processes is enabled
      • setMultipartProcessing

        public void setMultipartProcessing​(boolean multipartProcessing)
        Specified by:
        setMultipartProcessing in interface Description
        Parameters:
        multipartProcessing - the multipartProcessing to set
      • parse

        public void parse​(org.dom4j.Element elem)
        Description copied from class: AbstractBaseDescription
        Populates fields from given XML element without validation
        Overrides:
        parse in class AbstractBaseDescription
        Parameters:
        elem - root element for parsing
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • newInstance

        public static DescriptionImpl newInstance()
        Return a new instance of webscript
        Returns:
        a new instance of webscript