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, paramListFields inherited from class org.frankframework.senders.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 CmisSessionBuilderbooleanbooleanbooleansendMessage(Message message, PipeLineSession session) Send a message to some destination (as configured in the Sender object).voidsetAction(CmisSender.CmisAction action) Specifies action to performvoidsetAllowSelfSignedCertificates(boolean testModeNoCertificatorCheck) Iftrue, self signed certificates are acceptedvoidsetAuthAlias(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).voidsetIgnoreCertificateExpiredException(boolean ignoreCertificateExpiredException) Iftrue, CertificateExpiredExceptions are ignoredvoidsetKeepSession(boolean keepSession) If true, the session is not closed at the end and it will be used in the next callvoidsetKeyManagerAlgorithm(String keyManagerAlgorithm) Key manager algorithm.voidsetKeystore(String keystore) Resource url to keystore or certificate.voidsetKeystoreAlias(String keystoreAlias) Alias to obtain specific certificate or key in keystorevoidsetKeystoreAliasAuthAlias(String keystoreAliasAuthAlias) Authentication alias to authenticate access to certificate or key indicated bykeystoreAliasvoidsetKeystoreAliasPassword(String keystoreAliasPassword) Default password to authenticate access to certificate or key indicated bykeystoreAliasvoidsetKeystoreAuthAlias(String keystoreAuthAlias) Authentication alias used to obtain keystore passwordvoidsetKeystorePassword(String keystorePassword) Default password to access keystorevoidsetKeystoreType(KeystoreType keystoreType) Type of keystorevoidsetMaxConnections(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 IDvoidsetResultOnNotFound(String string) Deprecated, for removal: This API element is subject to removal in a future version.voidsetTimeout(int i) READ_TIMEOUT timeout in MS.voidsetTrustManagerAlgorithm(String trustManagerAlgorithm) Trust manager algorithm.voidsetTruststore(String truststore) Resource url to truststore.voidsetTruststoreAuthAlias(String truststoreAuthAlias) Authentication alias used to obtain truststore passwordvoidsetTruststorePassword(String truststorePassword) Default password to access truststorevoidsetTruststoreType(KeystoreType truststoreType) Type of truststorevoidURL to connect tovoidsetUsername(String username) Username used in authentication to hostvoidsetUseRootFolder(boolean b) (Only used whenaction=create).voidsetVerifyHostname(boolean verifyHostname) Iftrue, the hostname in the certificate will be checked against the actual hostname of the peervoidstart()This method will be called to start the sender.voidstop()Stop/close the sender and deallocate resources.Methods inherited from class org.frankframework.senders.AbstractSenderWithParameters
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueListMethods inherited from class org.frankframework.senders.AbstractSender
createBean, getLogPrefix, getName, isRunning, setApplicationContext, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods 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: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
@Nonnull public 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
-
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:HasKeystoreResource url to keystore or certificate. If none specified, the JVMs default keystore will be used.- Specified by:
setKeystorein interfaceHasKeystore
-
getKeystore
- Specified by:
getKeystorein interfaceHasKeystore
-
setKeystoreType
Description copied from interface:HasKeystoreType of keystore- Specified by:
setKeystoreTypein interfaceHasKeystore
-
getKeystoreType
- Specified by:
getKeystoreTypein interfaceHasKeystore
-
setKeystoreAuthAlias
Description copied from interface:HasKeystoreAuthentication alias used to obtain keystore password- Specified by:
setKeystoreAuthAliasin interfaceHasKeystore
-
getKeystoreAuthAlias
- Specified by:
getKeystoreAuthAliasin interfaceHasKeystore
-
setKeystorePassword
Description copied from interface:HasKeystoreDefault password to access keystore- Specified by:
setKeystorePasswordin interfaceHasKeystore
-
getKeystorePassword
- Specified by:
getKeystorePasswordin interfaceHasKeystore
-
setKeystoreAlias
Description copied from interface:HasKeystoreAlias to obtain specific certificate or key in keystore- Specified by:
setKeystoreAliasin interfaceHasKeystore
-
getKeystoreAlias
- Specified by:
getKeystoreAliasin interfaceHasKeystore
-
setKeystoreAliasAuthAlias
Description copied from interface:HasKeystoreAuthentication alias to authenticate access to certificate or key indicated bykeystoreAlias- Specified by:
setKeystoreAliasAuthAliasin interfaceHasKeystore
-
getKeystoreAliasAuthAlias
- Specified by:
getKeystoreAliasAuthAliasin interfaceHasKeystore
-
setKeystoreAliasPassword
Description copied from interface:HasKeystoreDefault password to authenticate access to certificate or key indicated bykeystoreAlias- Specified by:
setKeystoreAliasPasswordin interfaceHasKeystore
-
getKeystoreAliasPassword
- Specified by:
getKeystoreAliasPasswordin interfaceHasKeystore
-
setKeyManagerAlgorithm
Description copied from interface:HasKeystoreKey manager algorithm. Can be left empty to use the servers default algorithm- Specified by:
setKeyManagerAlgorithmin interfaceHasKeystore
-
getKeyManagerAlgorithm
- Specified by:
getKeyManagerAlgorithmin interfaceHasKeystore
-
setTruststore
Description copied from interface:HasTruststoreResource url to truststore. If none specified, the JVMs default truststore will be used.- Specified by:
setTruststorein interfaceHasTruststore
-
getTruststore
- Specified by:
getTruststorein interfaceHasTruststore
-
setTruststoreType
Description copied from interface:HasTruststoreType of truststore- Specified by:
setTruststoreTypein interfaceHasTruststore
-
getTruststoreType
- Specified by:
getTruststoreTypein interfaceHasTruststore
-
setTruststoreAuthAlias
Description copied from interface:HasTruststoreAuthentication alias used to obtain truststore password- Specified by:
setTruststoreAuthAliasin interfaceHasTruststore
-
getTruststoreAuthAlias
- Specified by:
getTruststoreAuthAliasin interfaceHasTruststore
-
setTruststorePassword
Description copied from interface:HasTruststoreDefault password to access truststore- Specified by:
setTruststorePasswordin interfaceHasTruststore
-
getTruststorePassword
- Specified by:
getTruststorePasswordin interfaceHasTruststore
-
setTrustManagerAlgorithm
Description copied from interface:HasTruststoreTrust manager algorithm. Can be left empty to use the servers default algorithm- Specified by:
setTrustManagerAlgorithmin interfaceHasTruststore
-
getTrustManagerAlgorithm
- Specified by:
getTrustManagerAlgorithmin interfaceHasTruststore
-
setVerifyHostname
Description copied from interface:HasTruststoreIftrue, the hostname in the certificate will be checked against the actual hostname of the peer- Specified by:
setVerifyHostnamein interfaceHasTruststore
-
isVerifyHostname
public boolean isVerifyHostname()- Specified by:
isVerifyHostnamein interfaceHasTruststore
-
setAllowSelfSignedCertificates
Description copied from interface:HasTruststoreIftrue, self signed certificates are accepted- Specified by:
setAllowSelfSignedCertificatesin interfaceHasTruststore
-
isAllowSelfSignedCertificates
public boolean isAllowSelfSignedCertificates()- Specified by:
isAllowSelfSignedCertificatesin interfaceHasTruststore
-
setIgnoreCertificateExpiredException
Description copied from interface:HasTruststoreIftrue, CertificateExpiredExceptions are ignored- Specified by:
setIgnoreCertificateExpiredExceptionin interfaceHasTruststore
-
isIgnoreCertificateExpiredException
public boolean isIgnoreCertificateExpiredException()- Specified by:
isIgnoreCertificateExpiredExceptionin 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
-