DOCUMENTS 5 - PortalScripting API
Public Member Functions | Public Attributes | List of all members
ArchiveConnectionBlob Class Reference

The ArchiveConnectionBlob class provides access to each single attachment of files in the archive. More...

Public Member Functions

boolean download ()
 Download the attachment to the PortalServer's machine (localPath) More...
 
String getLastError ()
 Function to get the description of the last error that occurred. More...
 

Public Attributes

number bytes
 Integer containing the filesize of an attachment in the archive. More...
 
String docKey
 String containing the key of the attachment in the archive. More...
 
boolean downloaded
 boolean that indicates whether an attachment of the archive is locally available at the PortalServer. More...
 
String fileKey
 String containing the key of the file the attachment belongs to in the archive. More...
 
String localPath
 String with the local path to the attachment (blob). More...
 
String mimeType
 String containing the mime-type of an attachment in the archive. More...
 
String name
 String containing the name of the attachment in the archive. More...
 
String size
 String containing the filesize of an attachment in the archive. More...
 

Detailed Description

The ArchiveConnectionBlob class provides access to each single attachment of files in the archive.

This class holds data like name, extension, size etc. of attachments in the archive. The existance of an object means, that an attachment exists in the archive. If you want to access the attachment (blob) itself in the PortalServer, you have to download the attachment from the archive with the ArchiveConnectionBlob.download() method. Then the attachment will be transferred to the PortalServer machine (localPath).

Note
You can not create objects of this class. Objects of this class are available only as return value of other functions, e.g. ArchiveConnection.downloadBlob(String fileKey, String docKey).
Class is only available for an ArchiceConnection to a XML-Server
Since
ELC 3.60i / otrisPORTAL 6.0i available for archive files

Member Function Documentation

◆ download()

boolean ArchiveConnectionBlob::download ( )

Download the attachment to the PortalServer's machine (localPath)

Returns
true if successful, false in case of any error
Since
ELC 3.60h / otrisPORTAL 6.0h
Example:
var archFile = .....
if (!archFile.downloaded)
{
var res = archFile.download();
if (!res)
util.out(archFile.getLastError());
else
util.out(archFile.localPath);
}

◆ getLastError()

String ArchiveConnectionBlob::getLastError ( )

Function to get the description of the last error that occurred.

Returns
Text of the last error as String
Since
ELC 3.60h / otrisPORTAL 6.0h

Member Data Documentation

◆ bytes

number ArchiveConnectionBlob::bytes

Integer containing the filesize of an attachment in the archive.

This property contains the filesize of the attachment in bytes (83605).

Example:
....
var archDoc = xmlserver.downloadBlob(....);
util.out(archDoc.bytes);

◆ docKey

String ArchiveConnectionBlob::docKey

String containing the key of the attachment in the archive.

Example:
....
var archDoc = xmlserver.downloadBlob(....);
util.out(archDoc.docKey);

◆ downloaded

boolean ArchiveConnectionBlob::downloaded

boolean that indicates whether an attachment of the archive is locally available at the PortalServer.

If the attachment in the archive is locally available at the PortalServer's file system, this value is true.

Example:
....
var archDoc = ...
if (archDoc.downloaded)
util.out(archDoc.localPath);

◆ fileKey

String ArchiveConnectionBlob::fileKey

String containing the key of the file the attachment belongs to in the archive.

Example:
....
var archDoc = xmlserver.downloadBlob(....);
util.out(archDoc.fileKey);

◆ localPath

String ArchiveConnectionBlob::localPath

String with the local path to the attachment (blob).

This path is only available if the attribute ArchiveConnectionBlob.downloaded is true

Example:
....
var archDoc = ...
if (archDoc.downloaded)
util.out(archDoc.localPath);

◆ mimeType

String ArchiveConnectionBlob::mimeType

String containing the mime-type of an attachment in the archive.

This property contains the mime-type of the attachment, e.g image/jpeg.

Example:
....
var archDoc = xmlserver.downloadBlob(....);
util.out(archDoc.mimeType);

◆ name

String ArchiveConnectionBlob::name

String containing the name of the attachment in the archive.

Example:
....
var archDoc = xmlserver.downloadBlob(....);
util.out(archDoc.name);

◆ size

String ArchiveConnectionBlob::size

String containing the filesize of an attachment in the archive.

This property contains the filesize of the attachment in as readable way (81.6 KB).

Example:
....
var archDoc = xmlserver.downloadBlob(....);
util.out(archDoc.size);

This documentation refers DOCUMENTS 5.0e (2105).
Created at 11-09-2019. - © 1998-2019 otris software AG, Königswall 21, D-44137 Dortmund. support@otris.de