public class CmisSender extends SenderWithParametersBase implements HasKeystore, HasTruststore
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>
</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 |
authAlias
, username overrides username specified by the attribute username
, password overrides password specified by the attribute password
Modifier and Type | Class and Description |
---|---|
static class |
CmisSender.CmisAction |
parameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
CmisSender() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Stop/close the sender and deallocate resources.
|
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
org.apache.chemistry.opencmis.client.api.Session |
createCmisSession(ParameterValueList pvl)
Creates a session during JMV runtime, tries to retrieve parameters and falls back on the defaults when they can't be found
|
String |
getKeyManagerAlgorithm() |
String |
getKeystore() |
String |
getKeystoreAlias() |
String |
getKeystoreAliasAuthAlias() |
String |
getKeystoreAliasPassword() |
String |
getKeystoreAuthAlias() |
String |
getKeystorePassword() |
KeystoreType |
getKeystoreType() |
CmisSessionBuilder |
getSessionBuilder() |
String |
getTrustManagerAlgorithm() |
String |
getTruststore() |
String |
getTruststoreAuthAlias() |
String |
getTruststorePassword() |
KeystoreType |
getTruststoreType() |
boolean |
isAllowSelfSignedCertificates() |
boolean |
isIgnoreCertificateExpiredException() |
boolean |
isVerifyHostname() |
void |
open()
This method will be called to start the sender.
|
SenderResult |
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 perform
|
void |
setAllowSelfSignedCertificates(boolean testModeNoCertificatorCheck)
If
true , self signed certificates are accepted |
void |
setAuthAlias(String authAlias)
Alias used to obtain credentials for authentication to host
|
void |
setBindingType(CmisSessionBuilder.BindingTypes bindingType)
BindingType CMIS protocol to use
|
void |
setCertificateAuthAlias(String certificateAuthAlias)
Deprecated.
|
void |
setCertificatePassword(String certificatePassword)
Deprecated.
|
void |
setCertificateUrl(String certificate)
Deprecated.
|
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 |
void |
setFileContentSessionKey(String string)
Deprecated.
|
void |
setFileInputStreamSessionKey(String string)
Deprecated.
|
void |
setFilenameSessionKey(String string)
If
action =create the session key that contains the name of the file to use. |
void |
setFileNameSessionKey(String string)
Deprecated.
|
void |
setFileSessionKey(String string)
If
action =create the sessionKey that contains the file to use. |
void |
setGetDocumentContent(boolean getDocumentContent)
(Only used when
action =get ). |
void |
setGetProperties(boolean b)
(Only used when
action =get ). |
void |
setIgnoreCertificateExpiredException(boolean ignoreCertificateExpiredException)
If
true , CertificateExpiredExceptions are ignored |
void |
setKeepSession(boolean keepSession)
If true, the session is not closed at the end and it will be used in the next call
|
void |
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 keystore
|
void |
setKeystoreAliasAuthAlias(String keystoreAliasAuthAlias)
Authentication alias to authenticate access to certificate or key indicated by
keystoreAlias |
void |
setKeystoreAliasPassword(String keystoreAliasPassword)
Default password to authenticate access to certificate or key indicated by
keystoreAlias |
void |
setKeystoreAuthAlias(String keystoreAuthAlias)
Authentication alias used to obtain keystore password
|
void |
setKeystorePassword(String keystorePassword)
Default password to access keystore
|
void |
setKeystoreType(KeystoreType keystoreType)
Type of keystore
|
void |
setMaxConnections(int i)
The maximum number of concurrent connections
|
void |
setOverrideEntryPointWSDL(String overrideEntryPointWSDL)
Override entrypoint WSDL by reading it from the classpath, overrides url attribute
|
void |
setPassword(String password)
Password used in authentication to host
|
void |
setProxyAuthAlias(String proxyAuthAlias)
Alias used to obtain credentials for authentication to proxy
|
void |
setProxyHost(String proxyHost)
Proxy host url
|
void |
setProxyPassword(String proxyPassword)
Proxy Password
|
void |
setProxyPort(int proxyPort)
Proxy host port
|
void |
setProxyUsername(String proxyUsername)
Proxy Username
|
void |
setProxyUserName(String proxyUsername)
Deprecated.
|
void |
setRepository(String repository)
Repository ID
|
void |
setResultOnNotFound(String string)
Deprecated.
|
void |
setStreamResultToServlet(boolean b)
Deprecated.
|
void |
setTimeout(int i)
The connection timeout in seconds
|
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 password
|
void |
setTruststorePassword(String truststorePassword)
Default password to access truststore
|
void |
setTruststoreType(KeystoreType truststoreType)
Type of truststore
|
void |
setUrl(String url)
URL to connect to
|
void |
setUsername(String userName)
Username used in authentication to host
|
void |
setUserName(String userName)
Deprecated.
|
void |
setUseRootFolder(boolean b)
(Only used when
action =create ). |
void |
setVerifyHostname(boolean verifyHostname)
If
true , the hostname in the certificate will be checked against the actual hostname of the peer |
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
createBean, getLogPrefix, getName, isSynchronous, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
isSynchronous, sendMessageOrThrow
getName, setName
public void configure() throws ConfigurationException
ISender
configure()
is called once at startup of the framework in the configure method of the owner of this sender.
Purpose of this method is to check whether the static configuration of the sender is correct.
As much as possible class-instantiating should take place in the configure()
or open()
method, to improve performance.configure
in interface IConfigurable
configure
in interface ISender
configure
in class SenderWithParametersBase
ConfigurationException
public org.apache.chemistry.opencmis.client.api.Session createCmisSession(ParameterValueList pvl) throws SenderException
SenderException
public CmisSessionBuilder getSessionBuilder()
public void open() throws SenderException
ISender
sendMessage()
method.open
in interface ISender
open
in class SenderBase
SenderException
public void close() throws SenderException
ISender
close
in interface ISender
close
in class SenderBase
SenderException
public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
ISender
configure()
method is called.
The following table shows the difference between synchronous and a-synchronous senders:
synchronous | a-synchronous | |
---|---|---|
ISender.isSynchronous() returns | true | false |
return value of sendMessage() is | the 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
.
sendMessage
in interface ISender
SenderException
TimeoutException
@Mandatory public void setAction(CmisSender.CmisAction action)
public void setMaxConnections(int i)
public void setTimeout(int i)
public void setUrl(String url)
public void setRepository(String repository)
public void setAuthAlias(String authAlias)
public void setUsername(String userName)
@Deprecated @ConfigurationWarning(value="Please use attribute username instead") public void setUserName(String userName)
public void setPassword(String password)
@Mandatory public void setBindingType(CmisSessionBuilder.BindingTypes bindingType)
public void setFileSessionKey(String string)
action
=create
the sessionKey that contains the file to use. If action
=get
and getProperties
=true
the sessionKey to store the result inpublic void setFilenameSessionKey(String string)
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@Deprecated @ConfigurationWarning(value="attribute \'fileNameSessionKey\' is replaced with \'filenameSessionKey\'") public void setFileNameSessionKey(String string)
@Deprecated @ConfigurationWarning(value="attribute \'fileInputStreamSessionKey\' is replaced with \'fileSessionKey\'") public void setFileInputStreamSessionKey(String string)
@ConfigurationWarning(value="attribute \'fileContentSessionKey\' is replaced with \'fileSessionKey\', please note that the \'fileSessionKey\' result will not BASE64 encode the content") @Deprecated public void setFileContentSessionKey(String string)
action
=create
the session key that contains the base64 encoded content of the file to use. When action
=get
and getProperties
=true
: the session key in which the base64 encoded content of the document is storedpublic void setDefaultMediaType(String string)
action
=create
the mime type used to store the document when it's not set in the input message by a property@Deprecated @ConfigurationWarning(value="Please return document content (as sender output) to the listener, ensure the pipeline exit is able to return data") public void setStreamResultToServlet(boolean b)
public void setGetProperties(boolean b)
action
=get
). If true, the content of the document is streamed to fileInputStreamSessionKey
and all document properties are put in the result as a xml stringpublic void setGetDocumentContent(boolean getDocumentContent)
action
=get
). If true, the attachment for the document is the sender result or, if set, stored in fileInputStreamSessionKey
. If false, only the properties are returnedpublic void setUseRootFolder(boolean b)
action
=create
). If true, the document is created in the root folder of the repository. Otherwise the document is created in the repository@Deprecated @ConfigurationWarning(value="configure forward \'notFound\' instead") public void setResultOnNotFound(String string)
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 namepublic void setKeepSession(boolean keepSession)
public void setOverrideEntryPointWSDL(String overrideEntryPointWSDL)
@Deprecated @ConfigurationWarning(value="replaced with \'keystore\'") public void setCertificateUrl(String certificate)
@Deprecated @ConfigurationWarning(value="replaced with \'keystoreAuthAlias\'") public void setCertificateAuthAlias(String certificateAuthAlias)
@Deprecated @ConfigurationWarning(value="replaced with \'keystorePassword\'") public void setCertificatePassword(String certificatePassword)
public void setKeystore(String keystore)
HasKeystore
setKeystore
in interface HasKeystore
public String getKeystore()
getKeystore
in interface HasKeystore
public void setKeystoreType(KeystoreType keystoreType)
HasKeystore
setKeystoreType
in interface HasKeystore
public KeystoreType getKeystoreType()
getKeystoreType
in interface HasKeystore
public void setKeystoreAuthAlias(String keystoreAuthAlias)
HasKeystore
setKeystoreAuthAlias
in interface HasKeystore
public String getKeystoreAuthAlias()
getKeystoreAuthAlias
in interface HasKeystore
public void setKeystorePassword(String keystorePassword)
HasKeystore
setKeystorePassword
in interface HasKeystore
public String getKeystorePassword()
getKeystorePassword
in interface HasKeystore
public void setKeystoreAlias(String keystoreAlias)
HasKeystore
setKeystoreAlias
in interface HasKeystore
public String getKeystoreAlias()
getKeystoreAlias
in interface HasKeystore
public void setKeystoreAliasAuthAlias(String keystoreAliasAuthAlias)
HasKeystore
keystoreAlias
setKeystoreAliasAuthAlias
in interface HasKeystore
public String getKeystoreAliasAuthAlias()
getKeystoreAliasAuthAlias
in interface HasKeystore
public void setKeystoreAliasPassword(String keystoreAliasPassword)
HasKeystore
keystoreAlias
setKeystoreAliasPassword
in interface HasKeystore
public String getKeystoreAliasPassword()
getKeystoreAliasPassword
in interface HasKeystore
public void setKeyManagerAlgorithm(String keyManagerAlgorithm)
HasKeystore
setKeyManagerAlgorithm
in interface HasKeystore
public String getKeyManagerAlgorithm()
getKeyManagerAlgorithm
in interface HasKeystore
public void setTruststore(String truststore)
HasTruststore
setTruststore
in interface HasTruststore
public String getTruststore()
getTruststore
in interface HasTruststore
public void setTruststoreType(KeystoreType truststoreType)
HasTruststore
setTruststoreType
in interface HasTruststore
public KeystoreType getTruststoreType()
getTruststoreType
in interface HasTruststore
public void setTruststoreAuthAlias(String truststoreAuthAlias)
HasTruststore
setTruststoreAuthAlias
in interface HasTruststore
public String getTruststoreAuthAlias()
getTruststoreAuthAlias
in interface HasTruststore
public void setTruststorePassword(String truststorePassword)
HasTruststore
setTruststorePassword
in interface HasTruststore
public String getTruststorePassword()
getTruststorePassword
in interface HasTruststore
public void setTrustManagerAlgorithm(String trustManagerAlgorithm)
HasTruststore
setTrustManagerAlgorithm
in interface HasTruststore
public String getTrustManagerAlgorithm()
getTrustManagerAlgorithm
in interface HasTruststore
public void setVerifyHostname(boolean verifyHostname)
HasTruststore
true
, the hostname in the certificate will be checked against the actual hostname of the peersetVerifyHostname
in interface HasTruststore
public boolean isVerifyHostname()
isVerifyHostname
in interface HasTruststore
public void setAllowSelfSignedCertificates(boolean testModeNoCertificatorCheck)
HasTruststore
true
, self signed certificates are acceptedsetAllowSelfSignedCertificates
in interface HasTruststore
public boolean isAllowSelfSignedCertificates()
isAllowSelfSignedCertificates
in interface HasTruststore
public void setIgnoreCertificateExpiredException(boolean ignoreCertificateExpiredException)
HasTruststore
true
, CertificateExpiredExceptions are ignoredsetIgnoreCertificateExpiredException
in interface HasTruststore
public boolean isIgnoreCertificateExpiredException()
isIgnoreCertificateExpiredException
in interface HasTruststore
public void setProxyHost(String proxyHost)
public void setProxyPort(int proxyPort)
public void setProxyAuthAlias(String proxyAuthAlias)
public void setProxyUsername(String proxyUsername)
@Deprecated @ConfigurationWarning(value="Please use attribute proxyUsername instead") public void setProxyUserName(String proxyUsername)
public void setProxyPassword(String proxyPassword)
Copyright © 2023 Frank!Framework. All rights reserved.