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

The ArchiveFileResultset class supports basic functions to loop through a list of ArchiveFile objects. More...

Public Member Functions

ArchiveFileResultset ArchiveFileResultset (String archiveKey, String filter, String sortOrder, String hitlist, boolean unlimitedHits=false)
 Create a new ArchiveFileResultset object. More...
 
DocFile first ()
 Retrieve the first DocFile object in the ArchiveFileResultset. More...
 
String getLastError ()
 Function to get the description of the last error that occurred. More...
 
DocFile last ()
 Retrieve the last DocFile object in the ArchiveFileResultset. More...
 
DocFile next ()
 Retrieve the next DocFile object in the ArchiveFileResultset. More...
 
int size ()
 Get the amount of DocFile objects in the ArchiveFileResultset. More...
 

Detailed Description

The ArchiveFileResultset class supports basic functions to loop through a list of ArchiveFile objects.

Constructor & Destructor Documentation

◆ ArchiveFileResultset()

ArchiveFileResultset ArchiveFileResultset::ArchiveFileResultset ( String  archiveKey,
String  filter,
String  sortOrder,
String  hitlist,
boolean  unlimitedHits = false 
)

Create a new ArchiveFileResultset object.

Like in other programming languages you create a new object with the new operator (refer to example below).

Parameters
archiveKeyString containing the key of the desired view or archive
filterString containing an filter criterium; use empty String ('') if you don't want to filter at all
sortOrderString containing an sort order; use empty String ('') if you don't want to sort at all
hitlistString containing the hitlist that you want to use (optional für EE.i / mandatory for EE.x
unlimitedHitsboolean that indicates if the archive hit limit must be ignored
Note
Important: The resultset may contain less hits than really exist. For EE.i and EE.x the limit of returned hits is the value of the DOCUMENTS property "MaxArchiveHitsFolder". If the property is not set, the limit is the XML-Server's default hit count. For EAS, The limit is either the "MaxArchiveHitsFolder" value or the limit of free research hitlists. The method is the same for dynamic folders and link-registers.
Since
ELC 3.60i / otrisPORTAL 6.0i
Example:
// Example for EE.i:
var archiveKey = "$(#STANDARD)\\EINRECH";
archiveKey += "@myeei"; // since Documents 4.0 using multi archive server
var filter = "Kreditor='ALFKI'";
var sortOrder = "BelegNr+";
var hitlist = "STANDARD";
var myAFRS = new ArchiveFileResultset(archiveKey, filter, sortOrder, hitlist);
var archFile = null;
while (true)
{
try
{
archFile = archFile ? myAFRS.next() : myAFRS.first();
if (!archFile) // end of ArchiveFileResultset
break;
util.out(archFile.getArchiveKey());
}
catch (err)
{
util.out("Unable to load archFile: " + err);
}
}
Example:
// Example for EE.x:
var archiveKey = "Unit=Default/Instance=Default/View=Scanners";
archiveKey += "@myeex"; // since Documents 4.0 using multi archive server
var filter = "Speed=10";
var sortOrder = "";
var hitlist = "Default";
var myAFRS = new ArchiveFileResultset(archiveKey, filter, sortOrder, hitlist);
Example:
// Example for EAS:
var archiveKey = "Order";
archiveKey += "@myeas"; // since Documents 4.0 using multi archive server
var filter = "company=A*";
var sortOrder = "company+";
var myAFRS = new ArchiveFileResultset(archiveKey, filter, sortOrder);

Member Function Documentation

◆ first()

DocFile ArchiveFileResultset::first ( )

Retrieve the first DocFile object in the ArchiveFileResultset.

Returns
DocFile, null in case of an empty ArchiveFileResultset, throws an exception on error loading archive file.
Since
ELC 3.60i / otrisPORTAL 6.0i

◆ getLastError()

String ArchiveFileResultset::getLastError ( )

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

Returns
Text of the last error as String
Since
ELC 3.60i / otrisPORTAL 6.0i
See also
DocFile.getLastError()

◆ last()

DocFile ArchiveFileResultset::last ( )

Retrieve the last DocFile object in the ArchiveFileResultset.

Returns
DocFile or null if end of ArchiveFileResultset is reached.
Since
ELC 3.60j / otrisPORTAL 6.0j

◆ next()

DocFile ArchiveFileResultset::next ( )

Retrieve the next DocFile object in the ArchiveFileResultset.

Returns
DocFile, null if end of ArchiveFileResultset is reached, throws an exception on error loading archive file.
Since
ELC 3.60i / otrisPORTAL 6.0i

◆ size()

int ArchiveFileResultset::size ( )

Get the amount of DocFile objects in the ArchiveFileResultset.

Returns
integer value with the amount of DocFile objects in the ArchiveFileResultset
Since
ELC 3.60i / otrisPORTAL 6.0i

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