Class CmisSender
- java.lang.Object
-
- org.frankframework.senders.SenderBase
-
- org.frankframework.senders.SenderWithParametersBase
-
- org.frankframework.extensions.cmis.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=getthe input (xml string) indicates the id of the document to get. This input is mandatory.Example:
<cmis> <id>documentId</id> </cmis>When
action=deletethe input (xml string) indicates the id of the document to get. This input is mandatory.Example:
<cmis> <id>documentId</id> </cmis>When
action=createthe 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: name description default type string: renders the valuedatetime: converts the value to a Date, by default using formatStringyyyy-MM-dd HH:mm:ss
string formatString used in combination with datetimeyyyy-MM-dd HH:mm:ss When
action=findthe 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=updatethe 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>attributes description default id mandatory property "cmis:objectId" which indicates the document to update property custom document property to update. See action=createfor 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 Modifier and Type Class Description static classCmisSender.CmisAction
-
Field Summary
Fields Modifier and Type Field Description static StringHEADER_PARAM_PREFIX-
Fields inherited from class org.frankframework.senders.SenderWithParametersBase
parameterNamesMustBeUnique, paramList
-
Fields inherited from class org.frankframework.senders.SenderBase
log
-
-
Constructor Summary
Constructors Constructor Description CmisSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose()voidconfigure()CloseableCmisSessioncreateCmisSession(ParameterValueList pvl)Creates a session during JMV runtime, tries to retrieve parameters and falls back on the defaults when they can't be foundCmisSender.CmisActiongetAction()StringgetAuthAlias()StringgetDefaultMediaType()StringgetFilenameSessionKey()StringgetFileSessionKey()StringgetKeyManagerAlgorithm()StringgetKeystore()StringgetKeystoreAlias()StringgetKeystoreAliasAuthAlias()StringgetKeystoreAliasPassword()StringgetKeystoreAuthAlias()StringgetKeystorePassword()KeystoreTypegetKeystoreType()StringgetPassword()StringgetResultOnNotFound()protected CmisSessionBuildergetSessionBuilder()StringgetTrustManagerAlgorithm()StringgetTruststore()StringgetTruststoreAuthAlias()StringgetTruststorePassword()KeystoreTypegetTruststoreType()StringgetUsername()booleanisAllowSelfSignedCertificates()booleanisGetDocumentContent()booleanisGetProperties()booleanisIgnoreCertificateExpiredException()booleanisKeepSession()booleanisUseRootFolder()booleanisVerifyHostname()voidopen()SenderResultsendMessage(Message message, PipeLineSession session)voidsetAction(CmisSender.CmisAction action)Specifies action to performvoidsetAllowSelfSignedCertificates(boolean testModeNoCertificatorCheck)voidsetAuthAlias(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)voidsetKeepSession(boolean keepSession)If true, the session is not closed at the end and it will be used in the next callvoidsetKeyManagerAlgorithm(String keyManagerAlgorithm)voidsetKeystore(String keystore)voidsetKeystoreAlias(String keystoreAlias)voidsetKeystoreAliasAuthAlias(String keystoreAliasAuthAlias)voidsetKeystoreAliasPassword(String keystoreAliasPassword)voidsetKeystoreAuthAlias(String keystoreAuthAlias)voidsetKeystorePassword(String keystorePassword)voidsetKeystoreType(KeystoreType keystoreType)voidsetMaxConnections(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.voidsetTimeout(int i)The connection timeout in secondsvoidsetTrustManagerAlgorithm(String trustManagerAlgorithm)voidsetTruststore(String truststore)voidsetTruststoreAuthAlias(String truststoreAuthAlias)voidsetTruststorePassword(String truststorePassword)voidsetTruststoreType(KeystoreType truststoreType)voidsetUrl(String url)URL to connect tovoidsetUsername(String username)Username used in authentication to hostvoidsetUseRootFolder(boolean b)(Only used whenaction=create).voidsetVerifyHostname(boolean verifyHostname)-
Methods inherited from class org.frankframework.senders.SenderWithParametersBase
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
-
Methods inherited from class org.frankframework.senders.SenderBase
createBean, getApplicationContext, getConfigurationClassLoader, getLogPrefix, getName, 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.IConfigurationAware
getApplicationContext, getName
-
Methods inherited from interface org.frankframework.core.INamedObject
getName, setName
-
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
-
Methods inherited from interface org.frankframework.core.ISender
isSynchronous, sendMessageOrThrow
-
-
-
-
Field Detail
-
HEADER_PARAM_PREFIX
public static final String HEADER_PARAM_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
configure
public void configure() throws ConfigurationException- Specified by:
configurein interfaceIConfigurable- Specified by:
configurein interfaceISender- Overrides:
configurein classSenderWithParametersBase- Throws:
ConfigurationException
-
createCmisSession
public CloseableCmisSession createCmisSession(ParameterValueList pvl) throws SenderException
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
protected CmisSessionBuilder getSessionBuilder()
-
open
public void open() throws SenderException- Specified by:
openin interfaceISender- Overrides:
openin classSenderBase- Throws:
SenderException
-
close
public void close()
- Specified by:
closein interfaceISender- Overrides:
closein classSenderBase
-
sendMessage
public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
- Specified by:
sendMessagein interfaceISender- Throws:
SenderExceptionTimeoutException
-
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
-
setBindingType
@Mandatory public void setBindingType(CmisSessionBuilder.BindingTypes bindingType)
BindingType CMIS protocol to use
-
setFileSessionKey
public void setFileSessionKey(String string)
Ifaction=createthe sessionKey that contains the file to use. Ifaction=getandgetProperties=truethe sessionKey to store the result in
-
setFilenameSessionKey
public void setFilenameSessionKey(String string)
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
public void setDefaultMediaType(String string)
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 @ConfigurationWarning("configure forward \'notFound\' instead") public void setResultOnNotFound(String string)
Deprecated.(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
public void setOverrideEntryPointWSDL(String overrideEntryPointWSDL)
Override entrypoint WSDL by reading it from the classpath, overrides url attribute
-
setKeystore
public void setKeystore(String keystore)
- Specified by:
setKeystorein interfaceHasKeystore
-
getKeystore
public String getKeystore()
- Specified by:
getKeystorein interfaceHasKeystore
-
setKeystoreType
public void setKeystoreType(KeystoreType keystoreType)
- Specified by:
setKeystoreTypein interfaceHasKeystore
-
getKeystoreType
public KeystoreType getKeystoreType()
- Specified by:
getKeystoreTypein interfaceHasKeystore
-
setKeystoreAuthAlias
public void setKeystoreAuthAlias(String keystoreAuthAlias)
- Specified by:
setKeystoreAuthAliasin interfaceHasKeystore
-
getKeystoreAuthAlias
public String getKeystoreAuthAlias()
- Specified by:
getKeystoreAuthAliasin interfaceHasKeystore
-
setKeystorePassword
public void setKeystorePassword(String keystorePassword)
- Specified by:
setKeystorePasswordin interfaceHasKeystore
-
getKeystorePassword
public String getKeystorePassword()
- Specified by:
getKeystorePasswordin interfaceHasKeystore
-
setKeystoreAlias
public void setKeystoreAlias(String keystoreAlias)
- Specified by:
setKeystoreAliasin interfaceHasKeystore
-
getKeystoreAlias
public String getKeystoreAlias()
- Specified by:
getKeystoreAliasin interfaceHasKeystore
-
setKeystoreAliasAuthAlias
public void setKeystoreAliasAuthAlias(String keystoreAliasAuthAlias)
- Specified by:
setKeystoreAliasAuthAliasin interfaceHasKeystore
-
getKeystoreAliasAuthAlias
public String getKeystoreAliasAuthAlias()
- Specified by:
getKeystoreAliasAuthAliasin interfaceHasKeystore
-
setKeystoreAliasPassword
public void setKeystoreAliasPassword(String keystoreAliasPassword)
- Specified by:
setKeystoreAliasPasswordin interfaceHasKeystore
-
getKeystoreAliasPassword
public String getKeystoreAliasPassword()
- Specified by:
getKeystoreAliasPasswordin interfaceHasKeystore
-
setKeyManagerAlgorithm
public void setKeyManagerAlgorithm(String keyManagerAlgorithm)
- Specified by:
setKeyManagerAlgorithmin interfaceHasKeystore
-
getKeyManagerAlgorithm
public String getKeyManagerAlgorithm()
- Specified by:
getKeyManagerAlgorithmin interfaceHasKeystore
-
setTruststore
public void setTruststore(String truststore)
- Specified by:
setTruststorein interfaceHasTruststore
-
getTruststore
public String getTruststore()
- Specified by:
getTruststorein interfaceHasTruststore
-
setTruststoreType
public void setTruststoreType(KeystoreType truststoreType)
- Specified by:
setTruststoreTypein interfaceHasTruststore
-
getTruststoreType
public KeystoreType getTruststoreType()
- Specified by:
getTruststoreTypein interfaceHasTruststore
-
setTruststoreAuthAlias
public void setTruststoreAuthAlias(String truststoreAuthAlias)
- Specified by:
setTruststoreAuthAliasin interfaceHasTruststore
-
getTruststoreAuthAlias
public String getTruststoreAuthAlias()
- Specified by:
getTruststoreAuthAliasin interfaceHasTruststore
-
setTruststorePassword
public void setTruststorePassword(String truststorePassword)
- Specified by:
setTruststorePasswordin interfaceHasTruststore
-
getTruststorePassword
public String getTruststorePassword()
- Specified by:
getTruststorePasswordin interfaceHasTruststore
-
setTrustManagerAlgorithm
public void setTrustManagerAlgorithm(String trustManagerAlgorithm)
- Specified by:
setTrustManagerAlgorithmin interfaceHasTruststore
-
getTrustManagerAlgorithm
public String getTrustManagerAlgorithm()
- Specified by:
getTrustManagerAlgorithmin interfaceHasTruststore
-
setVerifyHostname
public void setVerifyHostname(boolean verifyHostname)
- Specified by:
setVerifyHostnamein interfaceHasTruststore
-
isVerifyHostname
public boolean isVerifyHostname()
- Specified by:
isVerifyHostnamein interfaceHasTruststore
-
setAllowSelfSignedCertificates
public void setAllowSelfSignedCertificates(boolean testModeNoCertificatorCheck)
- Specified by:
setAllowSelfSignedCertificatesin interfaceHasTruststore
-
isAllowSelfSignedCertificates
public boolean isAllowSelfSignedCertificates()
- Specified by:
isAllowSelfSignedCertificatesin interfaceHasTruststore
-
setIgnoreCertificateExpiredException
public void setIgnoreCertificateExpiredException(boolean ignoreCertificateExpiredException)
- Specified by:
setIgnoreCertificateExpiredExceptionin interfaceHasTruststore
-
isIgnoreCertificateExpiredException
public boolean isIgnoreCertificateExpiredException()
- Specified by:
isIgnoreCertificateExpiredExceptionin interfaceHasTruststore
-
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
-
getAction
public CmisSender.CmisAction getAction()
-
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()
-
-