|
DOCUMENTS 5 - PortalScripting API
|
The Register class has been added to the DOCUMENTS PortalScripting API to gain full access to the registers of a DOCUMENTS file by scripting means. More...
Public Member Functions | |
| boolean | addFileLink (DocFile file) |
| Adds a file to a file link register. More... | |
| boolean | deleteDocument (Document doc) |
| Delete a Document at the Register. More... | |
| String | getAttribute (String attribute) |
| Get the String value of an attribute of the Register. More... | |
| DocumentIterator | getDocuments () |
| Retrieve a list of all Documents stored on the given Register. More... | |
| DocFile | getFile () |
| Returns the DocFile the Register belongs to. More... | |
| FileResultset | getFiles () |
| Retrieve a FileResultset of all DocFile objects linked to the register. 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... | |
| boolean | removeFileLink (DocFile file) |
| Removes a file from a file link register. More... | |
| boolean | setAttribute (String attribute, String value) |
| Set the String value of an attribute of the Register to the desired value. More... | |
| Document | uploadDocument (String filePath, String registerFileName) |
| Upload a new Document stored on the server's filesystem to the Register. More... | |
Public Attributes | |
| String | label |
| The ergonomic label of the Register object. More... | |
| String | name |
| The technical name of the Register object. More... | |
| String | type |
| The type of the Register object. More... | |
Private Member Functions | |
| String | getLocaleLabel (String locale) |
| Get the ergonomic label of the Register. More... | |
The Register class has been added to the DOCUMENTS PortalScripting API to gain full access to the registers of a DOCUMENTS file by scripting means.
| boolean Register::addFileLink | ( | DocFile | file | ) |
Adds a file to a file link register.
true if successful, false in case of any error | boolean Register::deleteDocument | ( | Document | doc | ) |
Delete a Document at the Register.
With the necessary access rights the user can delete a Document at the Register.
| doc | Document to delete |
true if successful, false in case of any error | String Register::getAttribute | ( | String | attribute | ) |
Get the String value of an attribute of the Register.
| attribute | String containing the name of the desired attribute |
| DocumentIterator Register::getDocuments | ( | ) |
Retrieve a list of all Documents stored on the given Register.
This method is available for documents registers only. You cannot use it with different types of Register objects.
| DocFile Register::getFile | ( | ) |
| FileResultset Register::getFiles | ( | ) |
Retrieve a FileResultset of all DocFile objects linked to the register.
| String Register::getLastError | ( | ) |
Function to get the description of the last error that occurred.
|
private |
Get the ergonomic label of the Register.
| locale | Optional String value with the locale abbreviation (according to the principal's configuration); if omitted, the current user's portal language is used automatically. |
String containing the ergonomic label of the Register in the appropriate portal language. | String Register::getOID | ( | boolean | oidLow = false | ) |
Returns the object-id.
| oidLow | Optional flag: If true only the id of the Register object (m_oid) will be returned. If false the id of the Register 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) | boolean Register::removeFileLink | ( | DocFile | file | ) |
Removes a file from a file link register.
true if successful, false in case of any error | boolean Register::setAttribute | ( | String | attribute, |
| String | value | ||
| ) |
Set the String value of an attribute of the Register 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 | Document Register::uploadDocument | ( | String | filePath, |
| String | registerFileName | ||
| ) |
Upload a new Document stored on the server's filesystem to the Register.
The filePath parameter must contain not only the directory path but the filename as well. Otherwise the server will take the first file to be found in the given filePath. The registerFileName parameter has the purpose to allow to rename the Document already while uploading it.
| filePath | String containing the filePath and filename of the desired file to be uploaded. Note: Backslashes contained in the filepath must be quoted with a leading backslash, since the backslash is a special char in ECMAScript! |
| registerFileName | String containing the desired target filename of the Document on the Register |
Document if successful, null in case of any error | String Register::label |
| String Register::name |
| String Register::type |
The type of the Register object.
The possible values of the type attribute are listed below:
documents fields links archiveddocuments externalcall