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

The FolderIterator class has been added to the DOCUMENTS PortalScripting API to gain full access to the DOCUMENTS folders by scripting means. More...

Public Member Functions

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

Detailed Description

The FolderIterator class has been added to the DOCUMENTS PortalScripting API to gain full access to the DOCUMENTS folders by scripting means.

Since
ELC 3.50l01 / otrisPORTAL 5.0l01
Example:
if (context.getFoldersByName(lstName, "public").size() == 0)
{
var folderIter = context.getFoldersByName("TemplateFolder", "public");
if (folderIter && folderIter.size() > 0)
{
var source = folderIter.first(); // fetch list folder
var target = source.copyFolder(true, true, true);
target.Name = lstName;
target.Label = docFile.crmName;
target.Type = "public";
}
}

Member Function Documentation

◆ first()

Folder FolderIterator::first ( )

Retrieve the first Folder object in the FolderIterator.

Returns
Folder or null in case of an empty FolderIterator
Since
ELC 3.50l01 / otrisPORTAL 5.0l01

◆ getLastError()

String FolderIterator::getLastError ( )

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

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

◆ next()

Folder FolderIterator::next ( )

Retrieve the next Folder object in the FolderIterator.

Returns
Folder or null if end of FolderIterator is reached.
Since
ELC 3.50l01 / otrisPORTAL 5.0l01

◆ size()

int FolderIterator::size ( )

Get the amount of Folder objects in the FolderIterator.

Returns
integer value with the amount of Folder objects in the FolderIterator
Since
ELC 3.50l01 / otrisPORTAL 5.0l01

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