Class CmisSender
- All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, IConfigurable, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, NameAware, HasKeystore, HasTruststore, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle
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>
| attributes | description | default | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| name | mandatory property "cmis:name". If not set the sender attribute fileNameSessionKey is used | "[unknown]" | |||||||||
| objectTypeId | mandatory property "cmis:objectTypeId" | "cmis:document" | |||||||||
| mediaType | the MIME type of the document to store | "application/octet-stream" | |||||||||
| property | custom document property to set. Possible attributes:
|
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>
<property name="DocumentDetail" isNull="true" />
</properties>
</cmis>
| attributes | description | default |
|---|---|---|
| id | mandatory property "cmis:objectId" which indicates the document to update | |
| property | custom 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 attributeusername, password overrides password specified by the attributepassword
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class AbstractSenderWithParameters
parameterNamesMustBeUnique, paramListFields inherited from class AbstractSender
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigure this component.Creates a session during JMV runtime, tries to retrieve parameters and falls back on the defaults when they can't be foundprotected CmisSessionBuilder@NonNull SenderResultsendMessage(@NonNull Message message, @NonNull PipeLineSession session) Send a message to some destination (as configured in the Sender object).voidsetAction(CmisSender.CmisAction action) Specifies action to performvoidsetAuthAlias(String authAlias) Alias used to obtain credentials for authentication to hostvoidsetBindingType(CmisSessionBuilder.BindingTypes bindingType) BindingType CMIS protocol to usevoidsetDefaultMediaType(String string) Ifaction=createthe mime type used to store the document when it's not set in the input message by a propertyvoidsetFilenameSessionKey(String string) Ifaction=createthe session key that contains the name of the file to use.voidsetFileSessionKey(String string) Ifaction=createthe sessionKey that contains the file to use.voidsetGetDocumentContent(boolean getDocumentContent) (Only used whenaction=get).voidsetGetProperties(boolean b) (Only used whenaction=get).voidsetKeepSession(boolean keepSession) If true, the session is not closed at the end and it will be used in the next callvoidsetKeystoreConfiguration(KeystoreConfiguration keystoreConfiguration) Set theKeystoreConfigurationobjectvoidsetMaxConnections(int i) The maximum number of concurrent connectionsvoidsetOverrideEntryPointWSDL(String overrideEntryPointWSDL) Override entrypoint WSDL by reading it from the classpath, overrides url attributevoidsetPassword(String password) Password used in authentication to hostvoidsetProxyAuthAlias(String proxyAuthAlias) Alias used to obtain credentials for authentication to proxyvoidsetProxyHost(String proxyHost) Proxy host urlvoidsetProxyPassword(String proxyPassword) Proxy PasswordvoidsetProxyPort(int proxyPort) Proxy host portvoidsetProxyUsername(String proxyUsername) Proxy UsernamevoidsetRepository(String repository) Repository IDvoidsetTimeout(int i) READ_TIMEOUT timeout in MS.voidsetTruststoreConfiguration(TruststoreConfiguration truststoreConfiguration) voidURL to connect tovoidsetUsername(String username) Username used in authentication to hostvoidsetUseRootFolder(boolean b) (Only used whenaction=create).voidstart()This method will be called to start the sender.voidstop()Stop/close the sender and deallocate resources.Methods inherited from class AbstractSenderWithParameters
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueListMethods inherited from class AbstractSender
createBean, getLogPrefix, getName, isRunning, setApplicationContext, setNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface FrankElement
addConfigWarningMethods inherited from interface HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface HasKeystore
createKeystoreConfiguration, getKeyManagerAlgorithm, getKeystore, getKeystoreAlias, getKeystoreAliasAuthAlias, getKeystoreAliasPassword, getKeystoreAuthAlias, getKeystorePassword, getKeystoreType, setKeyManagerAlgorithm, setKeystore, setKeystoreAlias, setKeystoreAliasAuthAlias, setKeystoreAliasPassword, setKeystoreAuthAlias, setKeystorePassword, setKeystoreTypeMethods inherited from interface HasTruststore
createTruststoreConfiguration, getTrustManagerAlgorithm, getTruststore, getTruststoreAuthAlias, getTruststorePassword, getTruststoreType, isAllowSelfSignedCertificates, isIgnoreCertificateExpiredException, isVerifyHostname, setAllowSelfSignedCertificates, setIgnoreCertificateExpiredException, setTrustManagerAlgorithm, setTruststore, setTruststoreAuthAlias, setTruststorePassword, setTruststoreType, setVerifyHostnameMethods inherited from interface ISender
isSynchronous, sendMessageOrThrow
-
Field Details
-
HEADER_PARAM_PREFIX
- See Also:
-
-
Constructor Details
-
CmisSender
public CmisSender()
-
-
Method Details
-
configure
Description copied from interface:IConfigurableConfigure this component.configure()is called once at startup of the framework in the configure method of the owner of thisIConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure(), to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configurein interfaceIConfigurable- Overrides:
configurein classAbstractSenderWithParameters- Throws:
ConfigurationException- in case it was not able to configure the component.
-
createCmisSession
Creates a session during JMV runtime, tries to retrieve parameters and falls back on the defaults when they can't be found- Throws:
SenderException
-
getSessionBuilder
-
start
public void start()Description copied from interface:ISenderThis method will be called to start the sender. After this method is called the sendMessage method may be called. Purpose of this method is to reduce creating connections to databases etc. in thesendMessage()method.- Specified by:
startin interfaceISender- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Overrides:
startin classAbstractSender
-
stop
public void stop()Description copied from interface:ISenderStop/close the sender and deallocate resources.- Specified by:
stopin interfaceISender- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Overrides:
stopin classAbstractSender
-
sendMessage
public @NonNull SenderResult sendMessage(@NonNull Message message, @NonNull PipeLineSession session) throws SenderException, TimeoutException Description copied from interface:ISenderSend a message to some destination (as configured in the Sender object). This method may only be called after theconfigure()method is called.The following table shows the difference between synchronous and a-synchronous senders:
synchronous a-synchronous ISender.isSynchronous()returnstruefalsereturn value of sendMessage()isthe reply-message the messageId of the message sent the correlationID specified with sendMessage()may be ignored is sent with the message a {link TimeOutException} may be thrown if a timeout occurs waiting for a reply should not be expected Multiple objects may try to call this method at the same time, from different threads. Implementations of this method should therefore be thread-safe, or
synchronized.- Specified by:
sendMessagein interfaceISender- Throws:
SenderExceptionTimeoutException
-
setAction
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) READ_TIMEOUT timeout in MS. Defaults to 10000, inherited fromHttpSender#setTimeout.- Default value
- 10000
-
setUrl
URL to connect to -
setRepository
Repository ID -
setAuthAlias
Alias used to obtain credentials for authentication to host -
setUsername
Username used in authentication to host -
setPassword
Password used in authentication to host -
setBindingType
BindingType CMIS protocol to use -
setFileSessionKey
Ifaction=createthe sessionKey that contains the file to use. Ifaction=getandgetProperties=truethe sessionKey to store the result in -
setFilenameSessionKey
Ifaction=createthe session key that contains the name of the file to use. If not set, the value of the propertyfilenamefrom the input message is used -
setDefaultMediaType
Ifaction=createthe 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 whenaction=get). If true, the content of the document is put toFileSessionKeyand all document properties are put in the result as a xml string- Default value
- false
-
setGetDocumentContent
public void setGetDocumentContent(boolean getDocumentContent) (Only used whenaction=get). If true, the attachment for the document is the sender result or, if set, stored infileSessionKey. If false, only the properties are returned- Default value
- true
-
setUseRootFolder
public void setUseRootFolder(boolean b) (Only used whenaction=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
-
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
Override entrypoint WSDL by reading it from the classpath, overrides url attribute -
setKeystoreConfiguration
Description copied from interface:HasKeystoreSet theKeystoreConfigurationobject- Specified by:
setKeystoreConfigurationin interfaceHasKeystore
-
getKeystoreConfiguration
- Specified by:
getKeystoreConfigurationin interfaceHasKeystore
-
getTruststoreConfiguration
- Specified by:
getTruststoreConfigurationin interfaceHasTruststore
-
setTruststoreConfiguration
- Specified by:
setTruststoreConfigurationin interfaceHasTruststore
-
setProxyHost
Proxy host url -
setProxyPort
public void setProxyPort(int proxyPort) Proxy host port- Default value
- 80
-
setProxyAuthAlias
Alias used to obtain credentials for authentication to proxy -
setProxyUsername
Proxy Username -
setProxyPassword
Proxy Password
-