Certificate class

A Certificate object represents a certificate stored in a CP2 dataset.

Getters [R]

getClassID( ) : String
Returns the vendor-neutral class identifier of this certificate (CP2:class_id). This may be one of the "built-in" identifiers described in the Certified PDF 2 specification (the empty string for generic certificates, or "Preflight" for preflight certificates) or another value agreed between third-party vendors. It is recommended to register such other values with Enfocus.
getClassVersion( ) : String
Returns the version string for the data type of this certificate's class properties (CP2:class_version), or the empty string if the property is absent. The scripting API doesn't support access to class properties.
getTypeID( ) : String
Returns the unique identifier for the type of this certificate (CP2:type_id), or the empty string if the property is absent. This identifier indirectly specifies the data type of the certificate's private properties, and is used by a conforming application to select a certificate handler implementation that can interpret the contents of these properties.
getTypeVersion( ) : String
Returns the version string for the type of this certificate (CP2:type_version), or the empty string if the property is absent. This version string indirectly specifies the version of the certificate's private properties, and can be used by a certificate handler implementation while interpreting these private properties.
getTypeDescription( ) : String
Returns the human-readable description of this certificate's type and version (CP2:type_desc). This function returns the English language alternate, or the empty string if the property is absent.
getTypeDescriptionLocalized( ) : AltText
Returns the human-readable description of this certificate's type and version (CP2:type_desc). This function returns the complete set of language alternates, which is empty if the property is absent. For a certificate associated with the active session, the returned AltText object is writable.
getImplementationID( ) : String
Returns the unique identifier for the certificate handler implementation that created this certificate (CP2:impl_id), or the empty string if the property is absent.
getImplementationVersion( ) : String
Returns the version string for the certificate handler implementation that created this certificate (CP2:impl_version), or the empty string if the property is absent.
getImplementationDescription( ) : String
Returns the human-readable description of the certificate handler implementation that created this certificate (CP2:impl_desc). This function returns the English language alternate, or the empty string if the property is absent.
getImplementationDescriptionLocalized( ) : AltText
Returns the human-readable description of the certificate handler implementation that created this certificate (CP2:impl_desc). This function returns the complete set of language alternates, which is empty if the property is absent. For a certificate associated with the active session, the returned AltText object is writable.
getSession( ) : Session
Returns the session during which this certificate was created (referenced through CP2:session_id_ref).
getStatementDescription( ) : String
Returns the human-readable description of the statement made by this certificate (CP2:statement_desc). This function returns the English language alternate, or the empty string if the property is absent.
getStatementDescriptionLocalized( ) : AltText
Returns the human-readable description of the statement made by this certificate (CP2:statement_desc). This function returns the complete set of language alternates, which is empty if the property is absent. For a certificate associated with the active session, the returned AltText object is writable.
getState( ) : String
Returns the state of this certificate (CP2:state) as one of the following string values: "Errors", "Warnings", "Info", "Success", or "Unknown". For a new certificate the state is initialized to "Unknown". In most cases this should be replaced by an appropriate value.
getStateDescription( ) : String
Returns the human-readable description of the state of this certificate (CP2:state_desc). This function returns the English language alternate, or the empty string if the property is absent.
getStateDescriptionLocalized( ) : AltText
Returns the human-readable description of the state of this certificate (CP2:state_desc). This function returns the complete set of language alternates, which is empty if the property is absent. For a certificate associated with the active session, the returned AltText object is writable.
getZones( ) : String[]
Returns an unordered list of the editing zone strings specifying the type of changes to which this certificate is sensitive (CP2:zones), or an empty list if the property is absent (which means that the certificate is not sensitive to any changes in the PDF file). For a new certificate this property is initialized to the single editing zone "All". It is advisable to narrow the certificate's editing zones down to avoid it becoming dirty unnecessarily.
getDataMap( ) : DataMap
Returns a data map referencing the collection of private data for this certificate (CP2:data), which is empty if the property is absent. For a certificate associated with the active session, the returned DataMap object is writable.
getDataDescription( ) : String
Returns the human-readable description of this certificate's private properties taken as a whole (CP2:data_desc). This function returns the English language alternate, or the empty string if the property is absent.
getDataDescriptionLocalized( ) : AltText
Returns the human-readable description of this certificate's private properties taken as a whole (CP2:data_desc). This function returns the complete set of language alternates, which is empty if the property is absent. For a certificate associated with the active session, the returned AltText object is writable.
getFingerPrint( ) : String
Returns the fingerprint representing a unique identifier for this certificate's configuration (CP2:fingerprint), or the empty string if the property is absent. The fingerprint allows determining whether or not two configurations are equivalent without accessing the contents of class or private properties.
getTime( ) : Date
Returns the time when this session was created (CP2:time), or null if the property is absent. For a new certificate this property is initialized to the current system time; it can't be updated.
isDirty( ) : Boolean
Returns true if this certificate certificate's editing zones overlap with any of the editing zones touched in a later session (excluding the certificate's own session), false otherwise.
isValid( ) : Boolean
Returns true if this certificate is valid, false otherwise. A certificate in any session other than the active session is valid if and only if all of the following conditions apply:
  • The certificate resides in a Certified PDF file with a valid signature.
  • The certificate's state is not "Unknown".
  • The certificate is not dirty, that is, its editing zones do not overlap with any of the editing zones touched in a later session (excluding the certificate's own session).

A certificate in the active session is valid if and only if its state is not "Unknown". This is because it is assumed that the certificate will be saved in a file with a valid signature and because the editing zones in the active session never make the certificate dirty.

Setters [W]

These functions may be invoked only on certificates residing in the active session. Invoking them on any other certificate is a programming error and has unpredictable results.
setClassVersion( value : String )
Sets the version string for the data type of this certificate's class properties (CP2:class_version). The scripting API does not support access to class properties.
setTypeID( value : String )
Sets the unique identifier for the type of this certificate (CP2:type_id). This identifier indirectly specifies the data type of the certificate's private properties, and is used by a conforming application to select a certificate handler implementation that can interpret the contents of these properties.
setTypeVersion( value : String )
Sets the version string for the type of this certificate (CP2:type_version). This version string indirectly specifies the version of the certificate's private properties, and can be used by a certificate handler implementation while interpreting these private properties.
setTypeDescription( value : String )
Sets the human-readable description of this certificate's type and version (CP2:type_desc). 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 getTypeDescriptionLocalized().
setImplementationID( value : String )
Sets the unique identifier for the certificate handler implementation that created this certificate (CP2:impl_id).
setImplementationVersion( value : String )
Sets the version string for the certificate handler implementation that created this certificate (CP2:impl_version).
setImplementationDescription( value : String )
Sets the human-readable description of the certificate handler implementation that created this certificate (CP2:impl_desc). 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 getImplementationDescription().
setStatementDescription( value : String )
Sets the human-readable description of the statement made by this certificate (CP2:statement_desc). 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 getStatementDescriptionLocalized().
setState( value : String )
Sets the state of this certificate (CP2:state). The state must be specified as one of the following values (or a case-insensitive variation thereof): "Errors", "Warnings", "Info", "Success", or "Unknown". Any other value is interpreted as "Unknown". For a new certificate the state is initialized to "Unknown". In most cases this should be replaced by an appropriate value.
setStateDescription( value : String )
Sets the human-readable description of the state of this certificate (CP2:state_desc). 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 getStateDescriptionLocalized().
setZones( value : String[] )
Sets an unordered list of editing zone strings specifying the type of changes to which this certificate is sensitive (CP2:zones). An empty list indicates that the certificate is not sensitive to any changes in the PDF file. For a new certificate this property is initialized to the single editing zone "All". It is advisable to narrow the certificate's editing zones down to avoid it becoming dirty unnecessarily.
setDataDescription( value : String )
Sets the human-readable description of this certificate's private properties taken as a whole (CP2:data_desc). 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 getDataDescriptionLocalized().
setFingerPrint( value : String )
Sets the fingerprint representing a unique identifier for this certificate's configuration (CP2:fingerprint). The fingerprint allows determining whether or not two configurations are equivalent without accessing the contents of class or private properties.