Class CmisSender

  • All Implemented Interfaces:
    IConfigurable, IConfigurationAware, INamedObject, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, HasKeystore, HasTruststore, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class CmisSender
    extends SenderWithParametersBase
    implements HasKeystore, HasTruststore
    Sender to obtain information from and write to a CMIS application.

    When action=get the input (xml string) indicates the id of the document to get. This input is mandatory.

    Example:

    
       <cmis>
          <id>documentId</id>
       </cmis>
     

    When action=delete the input (xml string) indicates the id of the document to get. This input is mandatory.

    Example:

    
       <cmis>
          <id>documentId</id>
       </cmis>
     

    When action=create the input (xml string) indicates document properties to set. This input is optional.

    Example:

    
       <cmis>
          <name>Offerte</name>
          <objectTypeId>NNB_Geldlening</objectTypeId>
          <mediaType>application/pdf</mediaType>
          <properties>
             <property name="ArrivedAt" type="datetime" formatString="yyyy-MM-dd'T'HH:mm:ss.SSSz">2014-11-27T16:43:01.268+0100</property>
             <property name="ArrivedBy">HDN</property>
             <property name="DocumentType">Geldlening</property>
          </properties>
       </cmis>
     

    attributesdescriptiondefault
    namemandatory property "cmis:name". If not set the sender attribute fileNameSessionKey is used"[unknown]"
    objectTypeIdmandatory property "cmis:objectTypeId""cmis:document"
    mediaTypethe MIME type of the document to store"application/octet-stream"
    propertycustom document property to set. Possible attributes:
    namedescriptiondefault
    type
    • string: renders the value
    • datetime: converts the value to a Date, by default using formatString yyyy-MM-dd HH:mm:ss
    string
    formatStringused in combination with datetimeyyyy-MM-dd HH:mm:ss
     

    When action=find the input (xml string) indicates the query to perform.

    Example:

    
       <query>
          <statement>select * from cmis:document</statement>
          <maxItems>10</maxItems>
          <skipCount>0</skipCount>
          <searchAllVersions>true</searchAllVersions>
          <includeAllowableActions>true</includeAllowableActions>
       </query>
     

    When action=update the input (xml string) indicates document properties to update.

    Example:

    
       <cmis>
          <id>123456789</id>
          <properties>
             <property name="ArrivedAt" type="datetime" formatString="yyyy-MM-dd'T'HH:mm:ss.SSSz">2014-11-27T16:43:01.268+0100</property>
             <property name="ArrivedBy">HDN</property>
             <property name="DocumentType">Geldlening</property>
          </properties>
       </cmis>
     

    attributesdescriptiondefault
    idmandatory property "cmis:objectId" which indicates the document to update 
    propertycustom document property to update. See action=create for possible attributes 

    Author:
    Peter Leeuwenburgh, Niels Meijer
    Specific parameters
    authAlias overrides authAlias specified by the attribute authAlias, username overrides username specified by the attribute username, password overrides password specified by the attribute password
    • Constructor Detail

      • CmisSender

        public CmisSender()
    • Method Detail

      • setAction

        @Mandatory
        public void setAction​(CmisSender.CmisAction action)
        Specifies action to perform
      • setMaxConnections

        public void setMaxConnections​(int i)
        The maximum number of concurrent connections
        Default value
        10
      • setTimeout

        public void setTimeout​(int i)
        The connection timeout in seconds
        Default value
        10
      • setUrl

        public void setUrl​(String url)
        URL to connect to
      • setRepository

        public void setRepository​(String repository)
        Repository ID
      • setAuthAlias

        public void setAuthAlias​(String authAlias)
        Alias used to obtain credentials for authentication to host
      • setUsername

        public void setUsername​(String username)
        Username used in authentication to host
      • setPassword

        public void setPassword​(String password)
        Password used in authentication to host
      • setFileSessionKey

        public void setFileSessionKey​(String string)
        If action=create the sessionKey that contains the file to use. If action=get and getProperties=true the sessionKey to store the result in
      • setFilenameSessionKey

        public void setFilenameSessionKey​(String string)
        If action=create the session key that contains the name of the file to use. If not set, the value of the property filename from the input message is used
      • setDefaultMediaType

        public void setDefaultMediaType​(String string)
        If action=create the mime type used to store the document when it's not set in the input message by a property
        Default value
        'application/octet-stream'
      • setGetProperties

        public void setGetProperties​(boolean b)
        (Only used when action=get). If true, the content of the document is put to FileSessionKey and all document properties are put in the result as a xml string
        Default value
        false
      • setGetDocumentContent

        public void setGetDocumentContent​(boolean getDocumentContent)
        (Only used when action=get). If true, the attachment for the document is the sender result or, if set, stored in FileSessionKey. If false, only the properties are returned
        Default value
        true
      • setUseRootFolder

        public void setUseRootFolder​(boolean b)
        (Only used when action=create). If true, the document is created in the root folder of the repository. Otherwise the document is created in the repository
        Default value
        true
      • setResultOnNotFound

        @Deprecated
        @ConfigurationWarning("configure forward \'notFound\' instead")
        public void setResultOnNotFound​(String string)
        Deprecated.
        (Only used when action=get) result returned when no document was found for the given id (e.g. '[not_found]'). If empty then 'notFound' is returned as forward name
      • setKeepSession

        public void setKeepSession​(boolean keepSession)
        If true, the session is not closed at the end and it will be used in the next call
        Default value
        true
      • setOverrideEntryPointWSDL

        public void setOverrideEntryPointWSDL​(String overrideEntryPointWSDL)
        Override entrypoint WSDL by reading it from the classpath, overrides url attribute
      • setProxyHost

        public void setProxyHost​(String proxyHost)
        Proxy host url
      • setProxyPort

        public void setProxyPort​(int proxyPort)
        Proxy host port
        Default value
        80
      • setProxyAuthAlias

        public void setProxyAuthAlias​(String proxyAuthAlias)
        Alias used to obtain credentials for authentication to proxy
      • setProxyUsername

        public void setProxyUsername​(String proxyUsername)
        Proxy Username
      • setProxyPassword

        public void setProxyPassword​(String proxyPassword)
        Proxy Password
      • getAuthAlias

        public String getAuthAlias()
      • getUsername

        public String getUsername()
      • getPassword

        public String getPassword()
      • getFilenameSessionKey

        public String getFilenameSessionKey()
      • getDefaultMediaType

        public String getDefaultMediaType()
      • isGetProperties

        public boolean isGetProperties()
      • isGetDocumentContent

        public boolean isGetDocumentContent()
      • isUseRootFolder

        public boolean isUseRootFolder()
      • getResultOnNotFound

        public String getResultOnNotFound()
      • isKeepSession

        public boolean isKeepSession()
      • getFileSessionKey

        public String getFileSessionKey()