FileNet Content Services
Java Connector v3.0

com.filenet.wcm.api
Interface SecurityTemplate

All Superinterfaces:
java.io.Serializable, ValueObject

public interface SecurityTemplate
extends ValueObject, java.io.Serializable

Not Implemented in CS Java Connector v3.0.

A SecurityTemplate object is a template for applying permissions (access rights) to a Document, CustomObject, or Folder object. Security templates are not independently persistable to the Content Services server; they are contained in a SecurityPolicy object. The template contains the permissions that will be applied to an object as the object's state changes. You can enable or disable a template within its security policy. An enabled template can be applied to an object; a disabled template remains an item in the security policy but cannot be applied to an object.

A SecurityTemplate object can represent either an application security template or a versioning security template, and either type can exist simultaneously in a single SecurityPolicy object. The two template types have the same object type (BaseObject.TYPE_SECURITY_TEMPLATE), but are differentiated by their class IDs (GUIDs), which are available as constants defined in the ClassDescription interface, and by their use. An application security template must be explicitly applied by calling an object's applySecurityTemplate method; it is never automatically applied. A versioning security template is automatically applied when the state of a document version changes, and may also be explicitly applied at any time by a user or group with permission to modify the object's security (Permission.WRITE_ACL).

To create a new SecurityTemplate object, call the getSecurityTemplate method on the ObjectFactory class.

To retrieve a SecurityTemplate object from a SecurityPolicy object, first retrieve the SecurityPolicy object's SecurityTemplates property then retrieve a SecurityTemplate object from the returned SecurityTemplates collection.


Method Summary
 java.lang.String getApplyStateId()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getClassId()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getDisplayName()
          

Not Implemented in CS Java Connector v3.0.

 boolean getIsEnabled()
          Returns a value that indicates whether or not this SecurityTemplate object can be applied to an object.
 Permissions getPermissions()
          

Not Implemented in CS Java Connector v3.0.

 Permissions getPermissions(java.lang.String collectionType)
          

Not Implemented in CS Java Connector v3.0.

 PermissionDescriptions getTemplatePermissionDescriptions()
          

Not Implemented in CS Java Connector v3.0.

 void setApplyStateId(java.lang.String applyStateId)
          

Not Implemented in CS Java Connector v3.0.

 void setDisplayName(java.lang.String displayName)
          

Not Implemented in CS Java Connector v3.0.

 void setIsEnabled(boolean isEnabled)
          

Not Implemented in CS Java Connector v3.0.

 void setPermissions(Permissions permissions)
          

Not Implemented in CS Java Connector v3.0.

 void setPermissions(Permissions permissions, java.lang.String collectionType)
          

Not Implemented in CS Java Connector v3.0.

 

Method Detail

getDisplayName

public java.lang.String getDisplayName()

Not Implemented in CS Java Connector v3.0.

Returns the display name of this SecurityTemplate object.

Returns:
A String that contains the display name of this SecurityTemplate object.

getIsEnabled

public boolean getIsEnabled()
Returns a value that indicates whether or not this SecurityTemplate object can be applied to an object.

Returns:
A boolean - true if this SecurityTemplate can be applied to an object; otherwise, returns false.

getApplyStateId

public java.lang.String getApplyStateId()

Not Implemented in CS Java Connector v3.0.

Returns the identifier (GUID) for the object state to which this SecurityTemplate object applies. The returned String is the value of this SecurityTemplate object's ApplyStateId property. For a versioning security template, valid values are:
Constants for these GUIDs are defined in the VersionableObject interface. For an application security template, the returned value corresponds to a user-defined GUID managed by your application.

Returns:
A String that contains the GUID that identifies this SecurityTemplate object's apply state.

getPermissions

public Permissions getPermissions()

Not Implemented in CS Java Connector v3.0.

Returns a collection of Permission objects that represents the security defined by this SecurityTemplate object. The returned permissions do not represent access rights to the SecurityTemplate object of which they are a part; rather, they control access to an object to which this SecurityTemplate object is applied.

The user must have Read permission on the containing SecurityPolicy object's security (either Permission.RIGHT_READ_ACL or Permission.LEVEL_VIEW) to retrieve the SecurityTemplate object's permissions.

Returns:
A Permissions collection containing permissions defined by this SecurityTemplate object.

getPermissions

public Permissions getPermissions(java.lang.String collectionType)

Not Implemented in CS Java Connector v3.0.

Returns a collection of Permission objects that represents the security defined by this SecurityTemplate object, filtered by the specified type. Specify the type of permissions (basic object or audit) to retrieve in the collectionType parameter. The returned permissions do not represent access rights to the SecurityTemplate object of which they are a part; rather, they control access to an object to which this SecurityTemplate object is applied.

The user must have Read permission on the containing SecurityPolicy object's security (either Permission.RIGHT_READ_ACL or Permission.LEVEL_VIEW) to retrieve the SecurityTemplate object's permissions.

Parameters:
collectionType - A String that contains the name of a property whose value is a collection of Content Services Permission objects. Use Property.PERMISSIONS or Property.AUDIT_PERMISSIONS for basic object or audit permissions, respectively.

Returns:
A Permissions collection of the specified type containing the permissions defined by this SecurityTemplate object.

setDisplayName

public void setDisplayName(java.lang.String displayName)

Not Implemented in CS Java Connector v3.0.

Sets the display name for this SecurityTemplate object according to the value of the displayName parameter. You can display the name in a user interface, for example, to display a list of the templates that are available in a security policy.

Parameters:
displayName - A String that contains the display name of this SecurityTemplate object.

setIsEnabled

public void setIsEnabled(boolean isEnabled)

Not Implemented in CS Java Connector v3.0.

Sets this SecurityTemplate object's IsEnabled property to indicate whether this SecurityTemplate object can be applied to an object.

Parameters:
isEnabled - A boolean, set to true to allow this SecurityTemplate to be applied to an object; otherwise, set to false.

setApplyStateId

public void setApplyStateId(java.lang.String applyStateId)

Not Implemented in CS Java Connector v3.0.

Sets this SecurityTemplate object's ApplyStateId property to indicate the state to which this SecurityTemplate object applies.

For a versioning template, the parameter to this method is a GUID that corresponds to the value of an object's VersionStatus property. The value can be represented by one of the following constants defined in the VersionableObject interface:

For an application security template, the value corresponds to a user-defined GUID managed by your application. The specified ID must not be one of the four defined versioning security template IDs. Supplying one of the versioning security template IDs results in a BadPropertyValueException. Application security template IDs must be unique from all other application template IDs defined for the security policy. Non-unique values result in a BadReferenceException.

Parameters:
applyStateId - A String that contains the GUID that represents the object state to which this SecurityTemplate object applies.

setPermissions

public void setPermissions(Permissions permissions)

Not Implemented in CS Java Connector v3.0.

Sets the Permissions property of the object to which this security template is applied.

Because setPermissions completely replaces the existing permissions for the object, you must set each element in the Permissions collection, including those elements whose values remain unchanged.

The permissions are persisted when the value of the containing SecurityPolicy object's SecurityTemplates property is updated.

Parameters:
permissions - A Permissions collection containing Permission objects.

setPermissions

public void setPermissions(Permissions permissions,
                           java.lang.String collectionType)

Not Implemented in CS Java Connector v3.0.

Sets permissions defined by this SecurityTemplate object, of the type indicated by the collectionType parameter. Specify the collection type using Property.PERMISSIONS or Property.AUDIT_PERMISSIONS constants for basic object or audit permissions, respectively.

Because setPermissions completely replaces the existing permissions for the object, you must set each element in the Permissions collection, including those elements whose values remain unchanged.

The permissions are persisted when the value of the containing SecurityPolicy object's SecurityTemplates property is updated.

Parameters:
permissions - A Permissions collection containing Permission objects.

collectionType - A String that is the name of a property whose value is a collection of Content Services Permission objects.

getClassId

public java.lang.String getClassId()

Not Implemented in CS Java Connector v3.0.

Returns the class ID of this SecurityTemplate object's ClassDescription object on the Content Services server.

All Content Services objects have a class. Each class is identified by a unique GUID, which is system-assigned when the class is created.

Returns:
A String representing the GUID of the object's class.

getTemplatePermissionDescriptions

public PermissionDescriptions getTemplatePermissionDescriptions()

Not Implemented in CS Java Connector v3.0.

Returns a PermissionsDescriptions collection that contains AccessPermissionDescription objects for this SecurityTemplate. The user must have Read permission on the SecurityPolicy object (either Permission.LEVEL_READ or Permission.RIGHT_READ) to retrieve the object's permission descriptions. After retrieving an object from the collection, you can then use helper methods on the AccessPermissionDescription interface to retrieve information about access rights and levels associated with the permissions defined by this SecurityTemplate object.

Returns:
A PermissionDescriptions collection.

FileNet Content Services
Java Connector v3.0