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

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

Public Member Functions

CustomProperty addCustomProperty (String name, String type, String value)
 Creates a new CustomProperty for the user. More...
 
boolean addFileTypeAgent (var fileTypes, Array loginNames)
 Create file type agents for the user. More...
 
boolean addFileTypeAgentScript (var fileTypes, String scriptName)
 Create file type agents for the user, whereby the agents are specified by the desired script. More...
 
boolean addToAccessProfile (AccessProfile ap)
 Make the SystemUser a member of the desired AccessProfile. More...
 
boolean checkPassword (String passwd)
 Evaluate if the password is correct. More...
 
boolean delegateFilesOfAbsentUser ()
 Move the files from the inbox of an absent user to his agent. More...
 
int getAccess (DocFile docFile)
 Retrieve an access mask whose bits correspond to the user's access rights supported by the given DocFile or filetype. More...
 
AccessProfileIterator getAccessProfiles ()
 Retrieve an AccessProfileIterator representing a list of all AccessProfiles the user is a member of. More...
 
SystemUserIterator getAgents ()
 Get a SystemUserIterator with the agents of the user. More...
 
FolderIterator getAllFolders ()
 Retrieve a list of private and public Folders of the Systemuser. More...
 
String getAttribute (String attribute)
 Get the String value of an attribute of the SystemUser. More...
 
boolean getBackDelegatedFiles (boolean removeFromAgentInbox)
 Get back the delegated files. More...
 
CustomPropertyIterator getCustomProperties (String nameFilter="", String typeFilter="")
 Get a CustomPropertyIterator with all CustomProperty of the user. More...
 
FolderIterator getIndividualFolders ()
 Retrieve a list of individual Folders of the Systemuser. More...
 
String getLastError ()
 Function to get the description of the last error that occurred. More...
 
String getOID (boolean oidLow=false)
 Returns the object-id. More...
 
Folder getPrivateFolder (String folderType)
 Try to retrieve a particular private Folder of the Systemuser. More...
 
SystemUser getSuperior ()
 Get the SystemUser object representing the superior of the user. More...
 
FolderIterator getUserdefinedInboxFolders ()
 Retrieve a list of userdefined inbox Folders of the Systemuser. More...
 
boolean hasAccessProfile (String profileName)
 Retrieve information whether the SystemUser is a member of a particular AccessProfile which is identified by its technical name. More...
 
boolean invalidateAccessProfileCache ()
 Invalidates the server sided cache of the access profiles for the SystemUser. More...
 
Array listAgentFileTypes ()
 Retrieve a list of file types for them an agent exists. More...
 
Array listFileTypeAgents (String fileType)
 Retrieve a list of all agents for the desired file type of the user. More...
 
boolean notifyFileReturnedFromSending (boolean notifying=true)
 Define whether to notify the user by e-mail of files returned from sending. More...
 
boolean notifyNewFileInInbox (boolean notifying=true)
 Define whether to notify the user by e-mail of new files in inbox. More...
 
boolean removeFileTypeAgent (var fileTypes)
 Remove file type agents from the user. More...
 
boolean removeFromAccessProfile (AccessProfile ap)
 Clear the SystemUser's membership in the given AccessProfile. More...
 
boolean resetSuperior ()
 Clear the user's relation to a superior. More...
 
boolean setAbsent (boolean absent, boolean filesDueAbsenceToInfo=true, string[] agents=[], boolean removeFromAgentInbox=false, Date from=undefined, Date until=undefined)
 Set a Systemuser absent or present. More...
 
boolean setAbsentMail (boolean sendMail, String message="")
 Define if an absence mail for the absent user will be sent to the sender of the file. More...
 
boolean setAccessProfiles (var apNames1, var apNames2,...)
 Set the AccessProfiles for an user. More...
 
boolean setAttribute (String attribute, String value)
 Set the String value of an attribute of the SystemUser to the desired value. More...
 
boolean setEasywareAuthentication (boolean value)
 Turn EASYWARE Authentication on or off. More...
 
CustomProperty setOrAddCustomProperty (String name, String type, String value)
 Creates a new CustomProperty or modifies a CustomProperty according the name and type for the user. More...
 
boolean setPassword (String newPwd)
 Set the password of the user represented by the SystemUser object to the desired new value. More...
 
boolean setSuperior (SystemUser sup)
 Set the SystemUser object representing the superior of the user to the desired object. More...
 

Public Attributes

int ANNOTATIONS
 Annotations right flag in the access mask. More...
 
int ARCHIVE
 Archive right flag in the access mask. More...
 
int CHANGE_TYPE
 Change filetype right flag in the access mask. More...
 
int CHANGE_WORKFLOW
 Change workflow right flag in the access mask. More...
 
int COPY
 Copy right flag in the access mask. More...
 
int CREATE
 Create right flag in the access mask. More...
 
int CREATE_WORKFLOW
 Create workflow right flag in the access mask. More...
 
String email
 String value containing the email address of the SystemUser. More...
 
String firstName
 String value containing the first name of the SystemUser. More...
 
String lastName
 String value containing the last name of the SystemUser. More...
 
String login
 String value containing the unique login name of the SystemUser. More...
 
int MAIL
 Mail right flag in the access mask. More...
 
int MOVE
 Move right flag in the access mask. More...
 
int PDF
 Create PDF right flag in the access mask. More...
 
PropertyCache propCache
 Access to the property cache of the SystemUser. More...
 
int READ
 Read right flag in the access mask. More...
 
int REMOVE
 Remove right flag in the access mask. More...
 
int START_WORKFLOW
 Start workflow flag in the access mask. More...
 
int VERSION
 Versioning right flag in the access mask. More...
 
int WRITE
 Write right flag in the access mask. More...
 

Detailed Description

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

There are several functions implemented in different classes to retrieve a SystemUser object.

Since
ELC 3.50b / otrisPORTAL 5.0b

Member Function Documentation

◆ addCustomProperty()

CustomProperty SystemUser::addCustomProperty ( String  name,
String  type,
String  value 
)

Creates a new CustomProperty for the user.

Parameters
nameString value defining the name
typeString value defining the type
valueString value defining the value
Returns
CustomProperty
Since
DOCUMENTS 4.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
var custProp = currentUser.addCustomProperty("favorites", "string", "peachit");
if (!custProp)
util.out(currentUser.getLastError());
See also
SystemUser.setOrAddCustomProperty(String name, String type, String value)
SystemUser.getCustomProperties(String nameFilter, String typeFilter)

◆ addFileTypeAgent()

boolean SystemUser::addFileTypeAgent ( var  fileTypes,
Array  loginNames 
)

Create file type agents for the user.

Parameters
fileTypesThe desired file types may be passed as follows:
  • String containing the technical name of the desired file type;
  • Array of strings containing the technical names of the desired file types;
  • String constant "*" indicating all file types.
loginNamesArray of strings containing the login names of the agents.
Returns
true if successful, false in case of any error.
Since
DOCUMENTS 5.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
var loginNames = new Array();
loginNames.push("user1");
loginNames.push("user2");
if (!currentUser.addFileTypeAgent("testFileType", loginNames))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");

◆ addFileTypeAgentScript()

boolean SystemUser::addFileTypeAgentScript ( var  fileTypes,
String  scriptName 
)

Create file type agents for the user, whereby the agents are specified by the desired script.

Parameters
fileTypesThe desired file types may be passed as follows:
  • String containing the technical name of the desired file type;
  • Array of strings containing the technical names of the desired file types;
  • String constant "*" indicating all file types.
scriptNameString containing the name of the script specifying the file type agents.
Returns
true if successful, false in case of any error.
Since
DOCUMENTS 5.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
if (!currentUser.addFileTypeAgentScript("*", "testScript"))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");

◆ addToAccessProfile()

boolean SystemUser::addToAccessProfile ( AccessProfile  ap)

Make the SystemUser a member of the desired AccessProfile.

Parameters
apAccessProfile the user should be a member of
Returns
true if successful, false in case of any error
Since
ELC 3.50b / otrisPORTAL 5.0b for PartnerAccounts
DOCUMENTS 4.0b HF1 for Fellows
Note
If the user is already logged in, it is necessary to invalidate the cache of the user s. SystemUser.invalidateAccessProfileCache()

◆ checkPassword()

boolean SystemUser::checkPassword ( String  passwd)

Evaluate if the password is correct.

Parameters
passwdString value containing the plain password
Returns
true if correct, otherwise false
Since
ELC 3.60d / otrisPORTAL 6.0d

◆ delegateFilesOfAbsentUser()

boolean SystemUser::delegateFilesOfAbsentUser ( )

Move the files from the inbox of an absent user to his agent.

If a Systemuser is set to absent, then all new files are redirected to his agent. The currently existing files (that came into the inbox before the was absent) can be moved to the agent with this method. If the user is not absent this method returns an error.

Returns
true if succeeded, otherwise false - an error message describing the error with getLastError().
Since
ELC 3.60g / otrisPORTAL 6.0g
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
if (!currentUser.delegateFilesOfAbsentUser())
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");
See also
boolean setAbsent(boolean absent, boolean filesDueAbsenceToInfo, Array agents, boolean removeFromAgentInbox, Date from, Date until);
boolean setAbsentMail(boolean sendMail, String message)
SystemUserIterator getAgents()

◆ getAccess()

int SystemUser::getAccess ( DocFile  docFile)

Retrieve an access mask whose bits correspond to the user's access rights supported by the given DocFile or filetype.

Returns
32-bit value whose bits correspond to the user's access rights.
Parameters
docFileDocFile object to which the access rights should be retrieved.
Since
DOCUMENTS 5.0a HF2
Example:
var docFile = context.file;
var currentUser = context.getSystemUser();
if (!currentUser)
throw "currentUser is NULL";
var accessMask = currentUser.getAccess(docFile);
if(SystemUser.READ & accessMask)
util.out("The user " + currentUser.login + " has read access!");
Note
There is a constant for any right flag in the access mask (e.g. SystemUser.READ specifies the read right).
See also
e.g. SystemUser.READ

◆ getAccessProfiles()

AccessProfileIterator SystemUser::getAccessProfiles ( )

Retrieve an AccessProfileIterator representing a list of all AccessProfiles the user is a member of.

Returns
AccessProfileIterator containing a list of all AccessProfiles which are assigned to the user; null in case of any error
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ getAgents()

SystemUserIterator SystemUser::getAgents ( )

Get a SystemUserIterator with the agents of the user.

This method returns a SystemUserIterator with the agents of the user, if the user is absent.

Returns
SystemUserIterator
Since
ELC 3.60g / otrisPORTAL 6.0g
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
var itSU = currentUser.getAgents();
for (var su = itSU.first(); su; su = itSU.next())
{
util.out(su.login);
}
See also
boolean setAbsent(boolean absent, boolean filesDueAbsenceToInfo, Array agents, boolean removeFromAgentInbox, Date from, Date until);
boolean setAbsentMail(boolean sendMail, String message)
boolean delegateFilesOfAbsentUser()

◆ getAllFolders()

FolderIterator SystemUser::getAllFolders ( )

Retrieve a list of private and public Folders of the Systemuser.

Returns
FolderIterator containing a list of the folders.
Since
DOCUMENTS 5.0c
Example:
var currentUser = context.getSystemUser();
if (!currentUser)
throw "currentUser is null";
var folderIter = currentUser.getAllFolders();
See also
SystemUser.getAllFolders()

◆ getAttribute()

String SystemUser::getAttribute ( String  attribute)

Get the String value of an attribute of the SystemUser.

Parameters
attributeString containing the name of the desired attribute
Returns
String containing the value of the desired attribute
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ getBackDelegatedFiles()

boolean SystemUser::getBackDelegatedFiles ( boolean  removeFromAgentInbox)

Get back the delegated files.

If the user is not present this method returns an error.

Parameters
removeFromAgentInboxOptional boolean indicating whether the files are removed from agent inbox after getting back by the user. If this parameter is not specified, the value from the user settings in the absent dialog on the web is used.
Returns
true if successful, false in case of any error.
Since
DOCUMENTS 4.0d
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
if (!currentUser.getBackDelegatedFiles(true))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");
See also
boolean setAbsent(boolean absent, boolean filesDueAbsenceToInfo, Array agents, boolean removeFromAgentInbox, Date from, Date until);
boolean delegateFilesOfAbsentUser()

◆ getCustomProperties()

CustomPropertyIterator SystemUser::getCustomProperties ( String  nameFilter = "",
String  typeFilter = "" 
)

Get a CustomPropertyIterator with all CustomProperty of the user.

This method returns a CustomPropertyIterator with the CustomProperty of the user.

Parameters
nameFilterString value defining an optional filter depending on the name
typeFilterString value defining an optional filter depending on the type
Returns
CustomPropertyIterator
Since
DOCUMENTS 4.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
var itProp = currentUser.getCustomProperties();
for (var prop = itProp.first(); prop; prop = itProp.next())
{
util.out(prop.name + prop.value);
}
See also
Context.findCustomProperties(String filter)
SystemUser.setOrAddCustomProperty(String name, String type, String value)
SystemUser.addCustomProperty(String name, String type, String value)

◆ getIndividualFolders()

FolderIterator SystemUser::getIndividualFolders ( )

Retrieve a list of individual Folders of the Systemuser.

Returns
FolderIterator containing a list of all individual folders.
Since
DOCUMENTS 4.0d
Example:
var currentUser = context.getSystemUser();
if (!currentUser)
throw "currentUser is null";
var folderIter = currentUser.getIndividualFolders();
See also
SystemUser.getPrivateFolder(String folderType)

◆ getLastError()

String SystemUser::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()

◆ getOID()

String SystemUser::getOID ( boolean  oidLow = false)

Returns the object-id.

Parameters
oidLowOptional flag:
If true only the id of the Systemuser object (m_oid) will be returned.
If false the id of the Systemuser object will be returned together with the id of the corresponding class in the form class-id:m_oid.
The default value is false.
Returns
String with the object-id
Since
ELC 3.60c / otrisPORTAL 6.0c
DOCUMENTS 5.0 (new parameter oidLow)

◆ getPrivateFolder()

Folder SystemUser::getPrivateFolder ( String  folderType)

Try to retrieve a particular private Folder of the Systemuser.

In addition to the public folders you may define in DOCUMENTS, each DOCUMENTS user has a set of private folders. You might need to access a particular private folder to access its contents, for example.

Parameters
folderTypeString value defining the kind of private folder you want to access.
You may choose between
  • "individual" individual folder
    Note: This function returns only the first individual folder on the top level. Using SystemUser.getIndividualFolders() to retrieve all individual folders.
  • "favorites" favorites folder
  • "inbox" the user's inbox
  • "sent" the user's sent folder
  • "sendingfinished" user's folder containing files which finished their workflow
  • "inwork" folder containing the files the SystemUser created himself
  • "resubmission" folder containing files with a resubmission defined for the SystemUser
  • "trash" folder containing files the user has deleted
  • "tasks" folder containing all files the user has a task to perform to
  • "lastused" folder containing the files the SystemUser accessed latest, sorted in descending chronological order
  • "introuble" folder containing files which ran into some workflow error. This folder is only available for editors and only if it has been added manually by the administrator.
Returns
Folder object representing the desired folder, null in case of any error
Since
ELC 3.51b / otrisPORTAL 5.1b
See also
SystemUser.getIndividualFolders(), SystemUser.getUserdefinedInboxFolders()

◆ getSuperior()

SystemUser SystemUser::getSuperior ( )

Get the SystemUser object representing the superior of the user.

Returns
SystemUser object representing the superior or null if no superior available
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ getUserdefinedInboxFolders()

FolderIterator SystemUser::getUserdefinedInboxFolders ( )

Retrieve a list of userdefined inbox Folders of the Systemuser.

Returns
FolderIterator containing a list of all userdefined inbox folders.
Since
DOCUMENTS 4.0d
Example:
var currentUser = context.getSystemUser();
if (!currentUser)
throw "currentUser is null";
var folderIter = currentUser.getUserdefinedInboxFolders();
See also
SystemUser.getPrivateFolder(String folderType)

◆ hasAccessProfile()

boolean SystemUser::hasAccessProfile ( String  profileName)

Retrieve information whether the SystemUser is a member of a particular AccessProfile which is identified by its technical name.

Parameters
profileNameString value containing the technical name of an AccessProfile
Returns
true if the SystemUser is a member of the desired profile, otherwise false
Since
ELC 3.50e / otrisPORTAL 5.0e

◆ invalidateAccessProfileCache()

boolean SystemUser::invalidateAccessProfileCache ( )

Invalidates the server sided cache of the access profiles for the SystemUser.

Returns
true if successful, otherwise false
Since
DOCUMENTS 4.0 (HF1)

◆ listAgentFileTypes()

Array SystemUser::listAgentFileTypes ( )

Retrieve a list of file types for them an agent exists.

Returns
Array of strings containing the technical names of the file types.
If the flag 'all filetypes' for a file type agent is set, the array contains only the string "*".
Since
DOCUMENTS 5.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
var fileTypes = currentUser.listAgentFileTypes();
if (fileTypes)
{
for (var i=0; i < fileTypes.length; i++)
{
util.out(fileTypes[i]);
}
}
else
util.out("Error: " + currentUser.getLastError());

◆ listFileTypeAgents()

Array SystemUser::listFileTypeAgents ( String  fileType)

Retrieve a list of all agents for the desired file type of the user.

Parameters
fileTypeString containing the technical name of the file type.
Returns
Array of strings containing login names of all agents for the desired file type.
Since
DOCUMENTS 5.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
var loginNames = currentUser.listFileTypeAgents("testFileType");
if (loginNames)
{
for (var i=0; i < loginNames.length; i++)
{
util.out(loginNames[i]);
}
}
else
util.out("Error: " + currentUser.getLastError());

◆ notifyFileReturnedFromSending()

boolean SystemUser::notifyFileReturnedFromSending ( boolean  notifying = true)

Define whether to notify the user by e-mail of files returned from sending.

Parameters
notifyingboolean indicating whether files returned from sending are to be notified to the user. The default value is true.
Returns
true if successful, false in case of any error.
Since
DOCUMENTS 5.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
if (!currentUser.notifyFileReturnedFromSending(true))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");

◆ notifyNewFileInInbox()

boolean SystemUser::notifyNewFileInInbox ( boolean  notifying = true)

Define whether to notify the user by e-mail of new files in inbox.

Parameters
notifyingboolean indicating whether new files in inbox are to be notified to the user. The default value is true.
Returns
true if successful, false in case of any error.
Since
DOCUMENTS 5.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
if (!currentUser.notifyNewFileInInbox(true))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");

◆ removeFileTypeAgent()

boolean SystemUser::removeFileTypeAgent ( var  fileTypes)

Remove file type agents from the user.

Parameters
fileTypesThe desired file types may be passed as follows:
  • String containing the technical name of the desired file type;
  • Array of strings containing the technical names of the desired file types;
  • String constant "*" indicating all file types.
Returns
true if successful, false in case of any error.
Since
DOCUMENTS 5.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
var fileTypes = new Array();
fileTypes.push("Filetype1");
fileTypes.push("Filetype2");
if (!currentUser.removeFileTypeAgent(fileTypes))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");

◆ removeFromAccessProfile()

boolean SystemUser::removeFromAccessProfile ( AccessProfile  ap)

Clear the SystemUser's membership in the given AccessProfile.

Returns
true if successful, false in case of any error
Since
ELC 3.50b / otrisPORTAL 5.0b for PartnerAccounts
DOCUMENTS 4.0b HF1 for Fellows
Note
If the user is already logged in, it is necessary to invalidate the cache of the user s. SystemUser.invalidateAccessProfileCache()

◆ resetSuperior()

boolean SystemUser::resetSuperior ( )

Clear the user's relation to a superior.

Returns
true if successful, false in case of any error
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ setAbsent()

boolean SystemUser::setAbsent ( boolean  absent,
boolean  filesDueAbsenceToInfo = true,
string []  agents = [],
boolean  removeFromAgentInbox = false,
Date  from = undefined,
Date  until = undefined 
)

Set a Systemuser absent or present.

If a Systemuser is on holiday with this function it is possible to set the user absent. After his return you can set him present. You can also define one or more agents for the absent user. The agent will get new files for the absent user in substitution. With the agent list you set the agents for the user (you overwrite the existing agents!). With an empty agent list you remove all agents.

Parameters
absentboolean true, if the user should be set absent, false, if the user is present
filesDueAbsenceToInfoboolean set to true, if the user should get the files due absence to info in his inbox
agentsArray with the login-names of the agents
removeFromAgentInboxOptional boolean indicating whether the files are removed from agent inbox after getting back by the user. If this parameter is not specified, the value from the user settings in the absent dialog on the web is used.
fromOptional Date object specifying when the absence begins.
untilOptional Date object specifying when the absence ends.
Returns
true if correct, otherwise false an error message describing the error with getLastError().
Since
ELC 3.60g / otrisPORTAL 6.0g
DOCUMENTS 4.0d (Option: removeFromAgentInbox)
DOCUMENTS 5.0a (Option: from and until)
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
// set user absent
var agents = new Array();
agents.push("oppen");
agents.push("buch");
var from = new Date();
var until = context.addTimeInterval(from, 3, "days", false);
if (!currentUser.setAbsent(true, false, agents, true, from, until))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");
// set user present
if (!currentUser.setAbsent(false))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");
See also
boolean setAbsentMail(boolean sendMail, String message)
boolean delegateFilesOfAbsentUser()
boolean getBackDelegatedFiles(boolean removeFromAgentInbox)
SystemUserIterator getAgents()

◆ setAbsentMail()

boolean SystemUser::setAbsentMail ( boolean  sendMail,
String  message = "" 
)

Define if an absence mail for the absent user will be sent to the sender of the file.

If a Systemuser is absent and get a file in the inbox, an absence mail to the sender of this file can be send.

Parameters
sendMailboolean true, if an absent mail should be sent, otherwise false
messageString with an additional e-mail message from the absent user
Returns
true if succeeded, otherwise false - an error message describing the error with getLastError().
Since
ELC 3.60g / otrisPORTAL 6.0g
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
if (!currentUser.setAbsentMail(true, "I will be back on 12/31 2009"))
util.out("Error: " + currentUser.getLastError());
else
util.out("OK.");
See also
boolean setAbsent(boolean absent, boolean filesDueAbsenceToInfo, Array agents, boolean removeFromAgentInbox, Date from, Date until);
boolean delegateFilesOfAbsentUser()
SystemUserIterator getAgents()

◆ setAccessProfiles()

boolean SystemUser::setAccessProfiles ( var  apNames1,
var  apNames2,
  ... 
)

Set the AccessProfiles for an user.

All existing AccessProfiles will be removed and the AccessProfiles from the parameters will be set.

Parameters
apNames1String or Array with the names of the AccessProfiles
apNames2String or Array with the names of the AccessProfiles
...
Returns
true if successful, false in case of any error
Since
DOCUMENTS 5.0c HF2
Example:
var val1 = ["AP1", "AP2"];
var val2 = "AP3\r\nAP4";
var user = context.getSystemUser();
if (!user.setAccessProfiles(val1, val2))
throw user.getLastError();

◆ setAttribute()

boolean SystemUser::setAttribute ( String  attribute,
String  value 
)

Set the String value of an attribute of the SystemUser to the desired value.

Parameters
attributeString containing the name of the desired attribute
valueString containing the desired value of the attribute
Returns
true if successful, false in case of any error
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ setEasywareAuthentication()

boolean SystemUser::setEasywareAuthentication ( boolean  value)

Turn EASYWARE Authentication on or off.

Parameters
valueboolean true to turn authentication on false to turn it off.
Returns
true if successful, false in case of any error
Since
DOCUMENTS 5.0c HF2

◆ setOrAddCustomProperty()

CustomProperty SystemUser::setOrAddCustomProperty ( String  name,
String  type,
String  value 
)

Creates a new CustomProperty or modifies a CustomProperty according the name and type for the user.

This method creates or modifies a unique CustomProperty for the user. The combination of the name and the type make the CustomProperty unique for the user.

Parameters
nameString value defining the name
typeString value defining the type
valueString value defining the value
Returns
CustomProperty
Since
DOCUMENTS 4.0a
Example:
var currentUser = context.getSystemUser();
if (!currentUser) throw "currentUser is NULL";
var custProp = currentUser.setOrAddCustomProperty("superior", "string", "oppen");
if (!custProp)
util.out(currentUser.getLastError());
See also
SystemUser.getCustomProperties(String nameFilter, String typeFilter)
SystemUser.addCustomProperty(String name, String type, String value)

◆ setPassword()

boolean SystemUser::setPassword ( String  newPwd)

Set the password of the user represented by the SystemUser object to the desired new value.

Parameters
newPwdString containing the plaintext new password
Returns
true if successful, false in case of any error
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ setSuperior()

boolean SystemUser::setSuperior ( SystemUser  sup)

Set the SystemUser object representing the superior of the user to the desired object.

Parameters
supSystemuser object representing the new superior of the user
Returns
true if successful, false in case of any error
Since
ELC 3.50b / otrisPORTAL 5.0b

Member Data Documentation

◆ ANNOTATIONS

int SystemUser::ANNOTATIONS

Annotations right flag in the access mask.

Returns
32-bit value in which the bit for the annotation right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ ARCHIVE

int SystemUser::ARCHIVE

Archive right flag in the access mask.

The bit that specifies the right to archive files.

Returns
32-bit value in which the bit for the archive right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ CHANGE_TYPE

int SystemUser::CHANGE_TYPE

Change filetype right flag in the access mask.

The bit that specifies the right to change the filetype of a file.

Returns
32-bit value in which the bit for the change filetype right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ CHANGE_WORKFLOW

int SystemUser::CHANGE_WORKFLOW

Change workflow right flag in the access mask.

The bit that specifies the right to change a workflow assigned to a file.

Returns
32-bit value in which the bit for the change workflow right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ COPY

int SystemUser::COPY

Copy right flag in the access mask.

The bit that specifies the right to copy files to a personal or public folder.

Returns
32-bit value in which the bit for the copy right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ CREATE

int SystemUser::CREATE

Create right flag in the access mask.

The bit that specifies the right to create new files.

Returns
32-bit value in which the bit for the create right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ CREATE_WORKFLOW

int SystemUser::CREATE_WORKFLOW

Create workflow right flag in the access mask.

Returns
32-bit value in which the bit for the create workflow right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ email

String SystemUser::email

String value containing the email address of the SystemUser.

Returns
String value containing the SystemUser's email address
Since
DOCUMENTS 5.0a

◆ firstName

String SystemUser::firstName

String value containing the first name of the SystemUser.

Returns
String value containing the SystemUser's first name.
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ lastName

String SystemUser::lastName

String value containing the last name of the SystemUser.

Returns
String value containing the SystemUser's last name.
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ login

String SystemUser::login

String value containing the unique login name of the SystemUser.

Returns
String value containing the SystemUser's login.
Since
ELC 3.50b / otrisPORTAL 5.0b

◆ MAIL

int SystemUser::MAIL

Mail right flag in the access mask.

The bit that specifies the right to send files via an e-mail system.

Returns
32-bit value in which the bit for the mail right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ MOVE

int SystemUser::MOVE

Move right flag in the access mask.

The bit that specifies the right to move files to a personal or public folder.

Returns
32-bit value in which the bit for the move right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ PDF

int SystemUser::PDF

Create PDF right flag in the access mask.

The bit that specifies the right to create a PDF of a file.

Returns
32-bit value in which the bit for the create PDF right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ propCache

PropertyCache SystemUser::propCache

Access to the property cache of the SystemUser.

Returns
PropertyCache object of the SystemUser.
Example:
var user = context.getSystemUser();
if (!user.propCache.hasProperty("Contacts"))
{
util.out("Creating cache");
user.propCache.Contacts = ["Peter", "Paul", "Marry"];
}
Since
DOCUMENTS 5.0
See also
PropertyCache, AccessProfile.propCache

◆ READ

int SystemUser::READ

Read right flag in the access mask.

The bit that specifies the right to see files.

Returns
32-bit value in which the bit for the read right is set.
Note
the access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ REMOVE

int SystemUser::REMOVE

Remove right flag in the access mask.

The bit that specifies the right to delete files.

Returns
32-bit value in which the bit for the remove right is set.
Note
the access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ START_WORKFLOW

int SystemUser::START_WORKFLOW

Start workflow flag in the access mask.

Returns
32-bit value in which the bit for the start workflow right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ VERSION

int SystemUser::VERSION

Versioning right flag in the access mask.

Returns
32-bit value in which the bit for the versioning right is set.
Note
The access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

◆ WRITE

int SystemUser::WRITE

Write right flag in the access mask.

The bit that specifies the right for changing index fields or documents in files.

Returns
32-bit value in which the bit for the write right is set.
Note
the access mask is returned by SystemUser.getAccess(DocFile)
See also
SystemUser.getAccess(DocFile)

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