Session class

A Session object represents a session stored in a CP2 dataset.

Getters [R]

getStartTime( ) : Date
Returns the time when this session was started (CP2:start_time), or null if the property is absent.
getEndTime( ) : Date
Returns the time when this session was ended (CP2:end_time), or null if the property is absent.
getZones( ) : String[]
Returns an unordered list of the editing zone strings specifying the areas of the PDF file that were changed during this session (CP2:zones), or an empty list if the property is absent.
getComment( ) : String
Returns the user-supplied comment that describes the changes to the PDF file during this session (CP2:comment). This function returns the English language alternate, or the empty string if the property is absent.
getCommentLocalized( ) : AltText
Returns the user-supplied comment that describes the changes to the PDF file during this session (CP2:comment). This function returns the complete set of language alternates, which is empty if the property is absent. For the active session, the returned AltText object is writable.
getChangeDescriptions( ) : String[]
Returns an ordered list of descriptions of the changes to the PDF file during this session (CP2:change_desc), or an empty list if the property is absent. This function returns the English language alternate for each item.
getChangeDescriptionsLocalized( ) : AltTextList
Returns an ordered list of descriptions of the changes to the PDF file during this session (CP2:change_desc), or an empty list if the property is absent. This function returns the complete set of language alternates for each item. The returned AltText objects are read-only.
getUser( ) : User
Returns the user object referenced by this session (through CP2:user_id_ref), or null if the session doesn't reference a user.
getDataMap( ) : DataMap
Returns a data map referencing the collection of private data for this session (CP2:data), which is empty if the property is absent. For the active session, the returned DataMap object is writable.
getToolID( ) : String
Returns the unique identifier for the toolkit or library that created this session (CP2:tool_id), or the empty string if the property is absent.
getToolVersion( ) : String
Returns the version string for the toolkit or library that created this session (CP2:tool_version), or the empty string if the property is absent.
getToolDescription( ) : String
Returns the human-readable description of the toolkit or library that created this session (CP2:tool_desc). This function returns the English language alternate, or the empty string if the property is absent.
getToolDescriptionLocalized( ) : AltText
Returns the human-readable description of the toolkit or library that created this session (CP2:tool_desc). This function returns the complete set of language alternates, which is empty if the property is absent. The returned AltText object is read-only.
getApplicationID( ) : String
Returns the unique identifier for the application that created this session (CP2:appl_id), or the empty string if the property is absent.
getApplicationVersion( ) : String
Returns the version string for the application that created this session (CP2:appl_version), or the empty string if the property is absent.
getApplicationDescription( ) : String
Returns the human-readable description of the application that created this session (CP2:appl_desc). This function returns the English language alternate, or the empty string if the property is absent.
getApplicationDescriptionLocalized( ) : AltText
Returns the human-readable description of the application that created this session (CP2:appl_desc). This function returns the complete set of language alternates, which is empty if the property is absent. The returned AltText object is read-only.
getCertificates( ) : CertificateList
Returns a list of all certificates associated with this session, in order of appearance in the dataset. The list may be empty.

Setters [W]

These functions may be invoked only on the active session. Invoking them on any other session is a programming error and has unpredictable results.
setComment( value : String )
Sets the user-supplied comment that describes the changes to the PDF file during this session (CP2:comment). This function sets the English language alternate and erases all other alternates.

To set other language alternates, use appropriate setters on an AltText object obtained with getCommentLocalized().

addChangeDescription( value : String )
Appends the specified string to the list of descriptions of the changes to the PDF file during this session (CP2:change_desc). This function sets the English language alternate for the new item, omitting any other alternatives.
addNewChangeDescriptionLocalized( ) : AltText
Appends a newly created item to the list of descriptions of the changes to the PDF file during this session (CP2:change_desc), and returns a reference to the new item. The returned AltText object is empty, and it is writable. Use appropriate setters on the returned AltText object to set any language alternates.