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 org.frankframework.senders.AbstractSenderWithParameters
parameterNamesMustBeUnique, paramList
Fields inherited from class org.frankframework.senders.AbstractSender
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure 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
boolean
boolean
boolean
sendMessage
(Message message, PipeLineSession session) Send a message to some destination (as configured in the Sender object).void
setAction
(CmisSender.CmisAction action) Specifies action to performvoid
setAllowSelfSignedCertificates
(boolean testModeNoCertificatorCheck) Iftrue
, self signed certificates are acceptedvoid
setAuthAlias
(String authAlias) Alias used to obtain credentials for authentication to hostvoid
setBindingType
(CmisSessionBuilder.BindingTypes bindingType) BindingType CMIS protocol to usevoid
setDefaultMediaType
(String string) Ifaction=create
the mime type used to store the document when it's not set in the input message by a propertyvoid
setFilenameSessionKey
(String string) Ifaction=create
the session key that contains the name of the file to use.void
setFileSessionKey
(String string) Ifaction=create
the sessionKey that contains the file to use.void
setGetDocumentContent
(boolean getDocumentContent) (Only used whenaction=get
).void
setGetProperties
(boolean b) (Only used whenaction=get
).void
setIgnoreCertificateExpiredException
(boolean ignoreCertificateExpiredException) Iftrue
, CertificateExpiredExceptions are ignoredvoid
setKeepSession
(boolean keepSession) If true, the session is not closed at the end and it will be used in the next callvoid
setKeyManagerAlgorithm
(String keyManagerAlgorithm) Key manager algorithm.void
setKeystore
(String keystore) Resource url to keystore or certificate.void
setKeystoreAlias
(String keystoreAlias) Alias to obtain specific certificate or key in keystorevoid
setKeystoreAliasAuthAlias
(String keystoreAliasAuthAlias) Authentication alias to authenticate access to certificate or key indicated bykeystoreAlias
void
setKeystoreAliasPassword
(String keystoreAliasPassword) Default password to authenticate access to certificate or key indicated bykeystoreAlias
void
setKeystoreAuthAlias
(String keystoreAuthAlias) Authentication alias used to obtain keystore passwordvoid
setKeystorePassword
(String keystorePassword) Default password to access keystorevoid
setKeystoreType
(KeystoreType keystoreType) Type of keystorevoid
setMaxConnections
(int i) The maximum number of concurrent connectionsvoid
setOverrideEntryPointWSDL
(String overrideEntryPointWSDL) Override entrypoint WSDL by reading it from the classpath, overrides url attributevoid
setPassword
(String password) Password used in authentication to hostvoid
setProxyAuthAlias
(String proxyAuthAlias) Alias used to obtain credentials for authentication to proxyvoid
setProxyHost
(String proxyHost) Proxy host urlvoid
setProxyPassword
(String proxyPassword) Proxy Passwordvoid
setProxyPort
(int proxyPort) Proxy host portvoid
setProxyUsername
(String proxyUsername) Proxy Usernamevoid
setRepository
(String repository) Repository IDvoid
setResultOnNotFound
(String string) Deprecated, for removal: This API element is subject to removal in a future version.void
setTimeout
(int i) READ_TIMEOUT timeout in MS.void
setTrustManagerAlgorithm
(String trustManagerAlgorithm) Trust manager algorithm.void
setTruststore
(String truststore) Resource url to truststore.void
setTruststoreAuthAlias
(String truststoreAuthAlias) Authentication alias used to obtain truststore passwordvoid
setTruststorePassword
(String truststorePassword) Default password to access truststorevoid
setTruststoreType
(KeystoreType truststoreType) Type of truststorevoid
URL to connect tovoid
setUsername
(String username) Username used in authentication to hostvoid
setUseRootFolder
(boolean b) (Only used whenaction=create
).void
setVerifyHostname
(boolean verifyHostname) Iftrue
, the hostname in the certificate will be checked against the actual hostname of the peervoid
start()
This method will be called to start the sender.void
stop()
Stop/close the sender and deallocate resources.Methods inherited from class org.frankframework.senders.AbstractSenderWithParameters
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
Methods inherited from class org.frankframework.senders.AbstractSender
createBean, getLogPrefix, getName, isRunning, setApplicationContext, setName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrow
-
Field Details
-
HEADER_PARAM_PREFIX
- See Also:
-
-
Constructor Details
-
CmisSender
public CmisSender()
-
-
Method Details
-
configure
Description copied from interface:IConfigurable
Configure 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:
configure
in interfaceIConfigurable
- Overrides:
configure
in 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:ISender
This 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:
start
in interfaceISender
- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
- Overrides:
start
in classAbstractSender
-
stop
public void stop()Description copied from interface:ISender
Stop/close the sender and deallocate resources.- Specified by:
stop
in interfaceISender
- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
- Overrides:
stop
in classAbstractSender
-
sendMessage
@Nonnull public SenderResult sendMessage(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException, TimeoutException Description copied from interface:ISender
Send 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()
returnstrue
false
return 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:
sendMessage
in interfaceISender
- Throws:
SenderException
TimeoutException
-
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=create
the sessionKey that contains the file to use. Ifaction=get
andgetProperties=true
the sessionKey to store the result in -
setFilenameSessionKey
Ifaction=create
the session key that contains the name of the file to use. If not set, the value of the propertyfilename
from the input message is used -
setDefaultMediaType
Ifaction=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 whenaction=get
). If true, the content of the document is put toFileSessionKey
and 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
-
setResultOnNotFound
@Deprecated(forRemoval=true, since="7.9.0") @ConfigurationWarning("configure forward \'notFound\' instead") public void setResultOnNotFound(String string) Deprecated, for removal: This API element is subject to removal in a future version.(Only used whenaction=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
Override entrypoint WSDL by reading it from the classpath, overrides url attribute -
setKeystore
Description copied from interface:HasKeystore
Resource url to keystore or certificate. If none specified, the JVMs default keystore will be used.- Specified by:
setKeystore
in interfaceHasKeystore
-
getKeystore
- Specified by:
getKeystore
in interfaceHasKeystore
-
setKeystoreType
Description copied from interface:HasKeystore
Type of keystore- Specified by:
setKeystoreType
in interfaceHasKeystore
-
getKeystoreType
- Specified by:
getKeystoreType
in interfaceHasKeystore
-
setKeystoreAuthAlias
Description copied from interface:HasKeystore
Authentication alias used to obtain keystore password- Specified by:
setKeystoreAuthAlias
in interfaceHasKeystore
-
getKeystoreAuthAlias
- Specified by:
getKeystoreAuthAlias
in interfaceHasKeystore
-
setKeystorePassword
Description copied from interface:HasKeystore
Default password to access keystore- Specified by:
setKeystorePassword
in interfaceHasKeystore
-
getKeystorePassword
- Specified by:
getKeystorePassword
in interfaceHasKeystore
-
setKeystoreAlias
Description copied from interface:HasKeystore
Alias to obtain specific certificate or key in keystore- Specified by:
setKeystoreAlias
in interfaceHasKeystore
-
getKeystoreAlias
- Specified by:
getKeystoreAlias
in interfaceHasKeystore
-
setKeystoreAliasAuthAlias
Description copied from interface:HasKeystore
Authentication alias to authenticate access to certificate or key indicated bykeystoreAlias
- Specified by:
setKeystoreAliasAuthAlias
in interfaceHasKeystore
-
getKeystoreAliasAuthAlias
- Specified by:
getKeystoreAliasAuthAlias
in interfaceHasKeystore
-
setKeystoreAliasPassword
Description copied from interface:HasKeystore
Default password to authenticate access to certificate or key indicated bykeystoreAlias
- Specified by:
setKeystoreAliasPassword
in interfaceHasKeystore
-
getKeystoreAliasPassword
- Specified by:
getKeystoreAliasPassword
in interfaceHasKeystore
-
setKeyManagerAlgorithm
Description copied from interface:HasKeystore
Key manager algorithm. Can be left empty to use the servers default algorithm- Specified by:
setKeyManagerAlgorithm
in interfaceHasKeystore
-
getKeyManagerAlgorithm
- Specified by:
getKeyManagerAlgorithm
in interfaceHasKeystore
-
setTruststore
Description copied from interface:HasTruststore
Resource url to truststore. If none specified, the JVMs default truststore will be used.- Specified by:
setTruststore
in interfaceHasTruststore
-
getTruststore
- Specified by:
getTruststore
in interfaceHasTruststore
-
setTruststoreType
Description copied from interface:HasTruststore
Type of truststore- Specified by:
setTruststoreType
in interfaceHasTruststore
-
getTruststoreType
- Specified by:
getTruststoreType
in interfaceHasTruststore
-
setTruststoreAuthAlias
Description copied from interface:HasTruststore
Authentication alias used to obtain truststore password- Specified by:
setTruststoreAuthAlias
in interfaceHasTruststore
-
getTruststoreAuthAlias
- Specified by:
getTruststoreAuthAlias
in interfaceHasTruststore
-
setTruststorePassword
Description copied from interface:HasTruststore
Default password to access truststore- Specified by:
setTruststorePassword
in interfaceHasTruststore
-
getTruststorePassword
- Specified by:
getTruststorePassword
in interfaceHasTruststore
-
setTrustManagerAlgorithm
Description copied from interface:HasTruststore
Trust manager algorithm. Can be left empty to use the servers default algorithm- Specified by:
setTrustManagerAlgorithm
in interfaceHasTruststore
-
getTrustManagerAlgorithm
- Specified by:
getTrustManagerAlgorithm
in interfaceHasTruststore
-
setVerifyHostname
Description copied from interface:HasTruststore
Iftrue
, the hostname in the certificate will be checked against the actual hostname of the peer- Specified by:
setVerifyHostname
in interfaceHasTruststore
-
isVerifyHostname
public boolean isVerifyHostname()- Specified by:
isVerifyHostname
in interfaceHasTruststore
-
setAllowSelfSignedCertificates
Description copied from interface:HasTruststore
Iftrue
, self signed certificates are accepted- Specified by:
setAllowSelfSignedCertificates
in interfaceHasTruststore
-
isAllowSelfSignedCertificates
public boolean isAllowSelfSignedCertificates()- Specified by:
isAllowSelfSignedCertificates
in interfaceHasTruststore
-
setIgnoreCertificateExpiredException
Description copied from interface:HasTruststore
Iftrue
, CertificateExpiredExceptions are ignored- Specified by:
setIgnoreCertificateExpiredException
in interfaceHasTruststore
-
isIgnoreCertificateExpiredException
public boolean isIgnoreCertificateExpiredException()- Specified by:
isIgnoreCertificateExpiredException
in 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
-