DOCUMENTS 5 - PortalScripting API
|
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 | |
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 right flag in the access mask. More... | |
int | MOVE |
Move right flag in the access mask. More... | |
int | |
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... | |
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.
CustomProperty SystemUser::addCustomProperty | ( | String | name, |
String | type, | ||
String | value | ||
) |
Creates a new CustomProperty for the user.
name | String value defining the name |
type | String value defining the type |
value | String value defining the value |
boolean SystemUser::addFileTypeAgent | ( | var | fileTypes, |
Array | loginNames | ||
) |
Create file type agents for the user.
fileTypes | The desired file types may be passed as follows:
|
loginNames | Array of strings containing the login names of the agents. |
true
if successful, false
in case of any error. boolean SystemUser::addFileTypeAgentScript | ( | var | fileTypes, |
String | scriptName | ||
) |
Create file type agents for the user, whereby the agents are specified by the desired script.
fileTypes | The desired file types may be passed as follows:
|
scriptName | String containing the name of the script specifying the file type agents. |
true
if successful, false
in case of any error. boolean SystemUser::addToAccessProfile | ( | AccessProfile | ap | ) |
Make the SystemUser a member of the desired AccessProfile.
ap | AccessProfile the user should be a member of |
true
if successful, false
in case of any error boolean SystemUser::checkPassword | ( | String | passwd | ) |
Evaluate if the password is correct.
passwd | String value containing the plain password |
true
if correct, otherwise false
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.
true
if succeeded, otherwise false
- an error message describing the error with getLastError(). 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.
docFile | DocFile object to which the access rights should be retrieved. |
AccessProfileIterator SystemUser::getAccessProfiles | ( | ) |
Retrieve an AccessProfileIterator representing a list of all AccessProfiles the user is a member of.
null
in case of any error 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.
FolderIterator SystemUser::getAllFolders | ( | ) |
Retrieve a list of private and public Folders of the Systemuser.
String SystemUser::getAttribute | ( | String | attribute | ) |
Get the String value of an attribute of the SystemUser.
attribute | String containing the name of the desired attribute |
boolean SystemUser::getBackDelegatedFiles | ( | boolean | removeFromAgentInbox | ) |
Get back the delegated files.
If the user is not present this method returns an error.
removeFromAgentInbox | Optional 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. |
true
if successful, false
in case of any error. 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.
nameFilter | String value defining an optional filter depending on the name |
typeFilter | String value defining an optional filter depending on the type |
FolderIterator SystemUser::getIndividualFolders | ( | ) |
Retrieve a list of individual Folders of the Systemuser.
String SystemUser::getLastError | ( | ) |
Function to get the description of the last error that occurred.
String SystemUser::getOID | ( | boolean | oidLow = false | ) |
Returns the object-id.
oidLow | Optional 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 . |
String
with the object-id oidLow
) 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.
folderType | String value defining the kind of private folder you want to access. You may choose between
|
null
in case of any error SystemUser SystemUser::getSuperior | ( | ) |
Get the SystemUser object representing the superior of the user.
FolderIterator SystemUser::getUserdefinedInboxFolders | ( | ) |
Retrieve a list of userdefined inbox Folders of the Systemuser.
boolean SystemUser::hasAccessProfile | ( | String | profileName | ) |
Retrieve information whether the SystemUser is a member of a particular AccessProfile which is identified by its technical name.
profileName | String value containing the technical name of an AccessProfile |
true
if the SystemUser is a member of the desired profile, otherwise false
boolean SystemUser::invalidateAccessProfileCache | ( | ) |
Invalidates the server sided cache of the access profiles for the SystemUser.
true
if successful, otherwise false
Array SystemUser::listAgentFileTypes | ( | ) |
Retrieve a list of file types for them an agent exists.
Array SystemUser::listFileTypeAgents | ( | String | fileType | ) |
Retrieve a list of all agents for the desired file type of the user.
fileType | String containing the technical name of the file type. |
boolean SystemUser::notifyFileReturnedFromSending | ( | boolean | notifying = true | ) |
Define whether to notify the user by e-mail of files returned from sending.
notifying | boolean indicating whether files returned from sending are to be notified to the user. The default value is true . |
true
if successful, false
in case of any error. boolean SystemUser::notifyNewFileInInbox | ( | boolean | notifying = true | ) |
Define whether to notify the user by e-mail of new files in inbox.
notifying | boolean indicating whether new files in inbox are to be notified to the user. The default value is true . |
true
if successful, false
in case of any error. boolean SystemUser::removeFileTypeAgent | ( | var | fileTypes | ) |
Remove file type agents from the user.
fileTypes | The desired file types may be passed as follows:
|
true
if successful, false
in case of any error. boolean SystemUser::removeFromAccessProfile | ( | AccessProfile | ap | ) |
Clear the SystemUser's membership in the given AccessProfile.
true
if successful, false
in case of any error boolean SystemUser::resetSuperior | ( | ) |
Clear the user's relation to a superior.
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.
absent | boolean true , if the user should be set absent, false , if the user is present |
filesDueAbsenceToInfo | boolean set to true , if the user should get the files due absence to info in his inbox |
agents | Array with the login-names of the agents |
removeFromAgentInbox | Optional 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. |
from | Optional Date object specifying when the absence begins. |
until | Optional Date object specifying when the absence ends. |
true
if correct, otherwise false
an error message describing the error with getLastError(). 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.
sendMail | boolean true , if an absent mail should be sent, otherwise false |
message | String with an additional e-mail message from the absent user |
true
if succeeded, otherwise false
- an error message describing the error with getLastError(). 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.
apNames1 | String or Array with the names of the AccessProfiles |
apNames2 | String or Array with the names of the AccessProfiles |
... |
true
if successful, false
in case of any error boolean SystemUser::setAttribute | ( | String | attribute, |
String | value | ||
) |
Set the String value of an attribute of the SystemUser to the desired value.
attribute | String containing the name of the desired attribute |
value | String containing the desired value of the attribute |
true
if successful, false
in case of any error boolean SystemUser::setEasywareAuthentication | ( | boolean | value | ) |
Turn EASYWARE Authentication on or off.
value | boolean true to turn authentication on false to turn it off. |
true
if successful, false
in case of any error 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.
name | String value defining the name |
type | String value defining the type |
value | String value defining the value |
boolean SystemUser::setPassword | ( | String | newPwd | ) |
Set the password of the user represented by the SystemUser object to the desired new value.
newPwd | String containing the plaintext new password |
true
if successful, false
in case of any error boolean SystemUser::setSuperior | ( | SystemUser | sup | ) |
Set the SystemUser object representing the superior of the user to the desired object.
sup | Systemuser object representing the new superior of the user |
int SystemUser::ANNOTATIONS |
Annotations right flag in the access mask.
int SystemUser::ARCHIVE |
Archive right flag in the access mask.
The bit that specifies the right to archive files.
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.
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.
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.
int SystemUser::CREATE |
Create right flag in the access mask.
The bit that specifies the right to create new files.
int SystemUser::CREATE_WORKFLOW |
Create workflow right flag in the access mask.
String SystemUser::email |
String value containing the email address of the SystemUser.
String SystemUser::firstName |
String value containing the first name of the SystemUser.
String SystemUser::lastName |
String value containing the last name of the SystemUser.
String SystemUser::login |
String value containing the unique login name of the SystemUser.
int SystemUser::MAIL |
Mail right flag in the access mask.
The bit that specifies the right to send files via an e-mail system.
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.
int SystemUser::PDF |
Create PDF right flag in the access mask.
The bit that specifies the right to create a PDF of a file.
PropertyCache SystemUser::propCache |
Access to the property cache of the SystemUser.
int SystemUser::READ |
Read right flag in the access mask.
The bit that specifies the right to see files.
int SystemUser::REMOVE |
Remove right flag in the access mask.
The bit that specifies the right to delete files.
int SystemUser::START_WORKFLOW |
Start workflow flag in the access mask.
int SystemUser::VERSION |
Versioning right flag in the access mask.
int SystemUser::WRITE |
Write right flag in the access mask.
The bit that specifies the right for changing index fields or documents in files.