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

The DocumentIterator class has been added to the DOCUMENTS PortalScripting API to gain full access to the documents stored on registers of a DOCUMENTS file by scripting means. More...

Public Member Functions

Document first ()
 Retrieve the first Document object in the DocumentIterator. More...
 
String getLastError ()
 Function to get the description of the last error that occurred. More...
 
Document next ()
 Retrieve the next Document object in the DocumentIterator. More...
 
int size ()
 Get the amount of Document objects in the DocumentIterator. More...
 

Detailed Description

The DocumentIterator class has been added to the DOCUMENTS PortalScripting API to gain full access to the documents stored on registers of a DOCUMENTS file by scripting means.

Since
ELC 3.50n / otrisPORTAL 5.0n
ELC 3.60i / otrisPORTAL 6.0i available for archive files
Example:
var docFile = context.file;
if (docFile)
{
var docreg = docFile.getRegisterByName("Documents");
if (docreg)
{
var docs = docreg.getDocuments();
if (docs && docs.size() > 0)
{
for (var d = docs.first(); d; d = docs.next())
{
util.out(d.Fullname);
}
}
}
}

Member Function Documentation

◆ first()

Document DocumentIterator::first ( )

Retrieve the first Document object in the DocumentIterator.

Returns
Document or null in case of an empty DocumentIterator
Since
ELC 3.50n / otrisPORTAL 5.0n
ELC 3.60i / otrisPORTAL 6.0i available for archive files

◆ getLastError()

String DocumentIterator::getLastError ( )

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

Returns
Text of the last error as String
Since
ELC 3.50n / otrisPORTAL 5.0n
See also
DocFile.getLastError()

◆ next()

Document DocumentIterator::next ( )

Retrieve the next Document object in the DocumentIterator.

Returns
Document or null if end of DocumentIterator is reached.
Since
ELC 3.50n / otrisPORTAL 5.0n
ELC 3.60i / otrisPORTAL 6.0i available for archive files

◆ size()

int DocumentIterator::size ( )

Get the amount of Document objects in the DocumentIterator.

Returns
integer value with the amount of Document objects in the DocumentIterator
Since
ELC 3.50n / otrisPORTAL 5.0n
ELC 3.60i / otrisPORTAL 6.0i available for archive files

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