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

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

Public Member Functions

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

Detailed Description

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

The objects of this class represent lists of AccessProfile objects and allow to loop through such a list of profiles. The following methods return an AccessProfileIterator: Context.getAccessProfiles(), SystemUser.getAccessProfiles().

Since
ELC 3.50b / otrisPORTAL 5.0b
Example:
// take a certain Systemuser object (stored in user) and assign all availabe
// accessprofiles to this user
var itRoles = context.getAccessProfiles();
if (itRoles && itRoles.size() > 0)
{
for (var ap = itRoles.first(); ap; ap = itRoles.next())
{
user.addToAccessProfile(ap); // add user to profile
}
}

Member Function Documentation

◆ first()

AccessProfile AccessProfileIterator::first ( )

Retrieve the first AccessProfile object in the AccessProfileIterator.

Returns
AccessProfile or null in case of an empty AccessProfileIterator
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ getLastError()

String AccessProfileIterator::getLastError ( )

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

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

◆ next()

AccessProfile AccessProfileIterator::next ( )

Retrieve the next AccessProfile object in the AccessProfileIterator.

Returns
AccessProfile or null if end of AccessProfileIterator is reached.
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ size()

int AccessProfileIterator::size ( )

Get the amount of AccessProfile objects in the AccessProfileIterator.

Returns
integer value with the amount of AccessProfile objects in the AccessProfileIterator
Since
ELC 3.50b / otrisPORTAL 5.0b

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