DOCUMENTS 5 - PortalScripting API
|
The ArchiveConnection class allows low level access to the EAS Interface, EBIS and the EASY ENTERPRISE XML-Server. More...
Public Member Functions | |
ArchiveConnectionBlob | downloadBlob (String fileKey, String docKey) |
Download an attachment from the XML-Server. More... | |
ArchiveConnectionBlobIterator | downloadBlobs (String fileKey[], String docKey[]) |
Download multiple attachments from the XML-Server. More... | |
String | getLastError () |
Function to get the description of the last error that occurred. More... | |
boolean | putBlob (Document doc, String blobreference) |
Upload an attachment to the XML-Server. More... | |
String | queryRawEEx (String eql, int wantedHits=-1, int maxHits=-1) |
Sends a query EQL to the EE.x XML-Server and returns the response XML. More... | |
String | sendEbisRequest (string resourceIdentifier, string postData="", string[] extraHeaders=[]) |
Sends a request to the EBIS interface and returns the response. More... | |
String | sendRequest (String request) |
Sends a request to the ArchiveConnection and returns the response XML. More... | |
Public Attributes | |
String | id |
String value containing the version of the archive interface. More... | |
The ArchiveConnection class allows low level access to the EAS Interface, EBIS and the EASY ENTERPRISE XML-Server.
ArchiveConnectionBlob ArchiveConnection::downloadBlob | ( | String | fileKey, |
String | docKey | ||
) |
Download an attachment from the XML-Server.
With this method you can download an attachment from the EASYWARE ENTERPRISE archive using the XML-Server. The method returns an object of the class ArchiveConnectionBlob
. This object allows you to access the attachment. If the method fails the return value is NULL. You can retrieve the error message by executing ArchiveConnection.getLastError()
.
fileKey | String containing the key of the file |
docKey | String containing the key of the attachment |
ArchiveConnectionBlob
or NULL
, if failed ArchiveConnectionBlobIterator ArchiveConnection::downloadBlobs | ( | String | fileKey[], |
String | docKey[] | ||
) |
Download multiple attachments from the XML-Server.
This method allows downloading multiple attachments from the EASYWARE ENTERPRISE archive using the XML-Server. The method returns an object of the class ArchiveConnectionBlobIterator
. This object allows you to access the attachments. If the method fails the return value is NULL. You can retrieve the error message by executing ArchiveConnection.getLastError()
.
fileKey | String Array containing the keys of the files |
docKey | String Array containing the keys of the attachments |
ArchiveConnectionBlobIterator
or NULL
, if failed String ArchiveConnection::getLastError | ( | ) |
Function to get the description of the last error that occurred.
boolean ArchiveConnection::putBlob | ( | Document | doc, |
String | blobreference | ||
) |
Upload an attachment to the XML-Server.
This method performs a "putblob" request to an installed EASY XML-Server.
doc | The Document object, whose binary content is to be uploaded |
blobreference | A unique string, which will identify the content in the XML-Server's blobcache. |
util.getUniqueId()
to create a blobreference. However this may be not unique enough, if several portal servers are connected to the same XML-server in this way. String ArchiveConnection::queryRawEEx | ( | String | eql, |
int | wantedHits = -1 , |
||
int | maxHits = -1 |
||
) |
Sends a query EQL to the EE.x XML-Server and returns the response XML.
With this method you can send a query EQL to the XML-Server of EASY ENTERPRISE.x If the method succeed the return value is the response-xml, otherwise it returns NULL. If the value is NULL you can retrieve the error message by executing ArchiveConnection.getLastError()
eql | String containing the EQL |
wantedHits | Int with the number of currently wanted hits (optional) |
maxHits | Int with the max. number of hits, that the ArchiveConnection should respond (optional) |
String ArchiveConnection::sendEbisRequest | ( | string | resourceIdentifier, |
string | postData = "" , |
||
string [] | extraHeaders = [] |
||
) |
Sends a request to the EBIS interface and returns the response.
With this method you can send a GET or a POST request to an EBIS interface. If the request succeeds, the return value is the HTTP-content of the response. Otherwise the function returns an empty String. Call ArchiveConnection.getLastError() subsequently to test for eventual errors. If the interface reports an error, it will be prefixed with "[EBIS] ".
resourceIdentifier | String containing the REST resource identifier (in other words: the back part of the URL). |
postData | A optional String with content data of a HTTP-POST request. If the parameter is missing or empty, the function generates a GET request. |
extraHeaders | A optional Array of Strings with an even number of elements. The first element of each pair must contain the name, the second one the value of an additional HTTP header element. |
String ArchiveConnection::sendRequest | ( | String | request | ) |
Sends a request to the ArchiveConnection and returns the response XML.
With this method you can send a request to the XML-Server of EASY ENTERPRISE. If the method succeeds the return value is the response-xml, otherwise it returns NULL. If the value is NULL you can retrieve the error message by executing ArchiveConnection.getLastError()
request | String containing the request |
String ArchiveConnection::id |
String value containing the version of the archive interface.