|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.irm.engine.rights.context.DocumentRoleOperationsInstance
public final class DocumentRoleOperationsInstance
Document role operations. The document role operations include role management operations such as creating, editing and copying roles. The document role operations also include role assignment roles and re-assignment.
This class provides static methods for a set of procedural style methods. The methods can be made to appear as global methods by using import static. e.g.
import static oracle.irm.engine.rights.context.DocumentRoleOperationsInstance.*;
Method Summary | |
---|---|
static DocumentRole |
appendFeaturesToRole(DocumentRole role, String[] featureIds) Add features to a role. |
static DocumentRole |
clearTimeConstraints(DocumentRole role) Clear the time constraints on a role. |
static DocumentRole |
copyRole(DocumentRole role, Domain domain) Copy a role. |
static Collection<DocumentRole> |
copyRoles(Collection<DocumentRole> roles, Domain domain) Copy a set of roles. |
static void |
deleteRole(DocumentRole role) Delete a role. |
static void |
deleteRoles(Collection<DocumentRole> roles) Delete a set of roles. |
static boolean |
documentRoleExists(UUID uuid, Domain domain) Check for a document role's existence. |
static Collection<TimePeriod> |
getDefaultRefreshPeriods() List default refresh periods. |
static boolean |
getFeatureRecording(DocumentRole role) Infer whether feature recording has been set on a document role. |
static DocumentRole.TimeConstraints |
getTimeConstraints(DocumentRole role) Get the time constraints set on a document role. |
static Collection<DocumentRole> |
listRoles(Domain domain) List document roles owned by a domain. |
static Collection<DocumentRole> |
listRolesForContext(ContextInstance context) List document roles available to a context. |
static DocumentRole |
refreshDocumentRole(DocumentRole role) Refresh a document role's properties. |
static DocumentRole |
saveChangesToRole(DocumentRole role, DocumentRole delta) Save changes to a document role. |
static DocumentRole |
saveNewRole(Domain domain, DocumentRole role) Save a new document role. |
static DocumentRole |
setAbsoluteTimeConstraints(DocumentRole role, Date startTime, Date stopTime) Set absolute time constraints on a role. |
static DocumentRole |
setFeatureRecording(DocumentRole role, boolean record) Set whether feature use is recorded. |
static DocumentRole |
setRelativeAssignmentTimeConstraints(DocumentRole role, TimePeriod period) Set relative to assignment time constraints on a role. |
static DocumentRole |
setRelativeClassificationTimeConstraints(DocumentRole role, TimePeriod period) Set relative to classification time constraints on a role. |
static Collection<Feature> |
updateExportConstraints(Collection<Feature> features, DocumentRole.ExportConstraints constraints) Update a set of features based on export constraints. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Collection<TimePeriod> getDefaultRefreshPeriods()
DocumentRole
a refresh period must be specified. This method returns a list of recommended default refresh periods that can be used, for example, as a pick-list in a user interface that creates or edits document roles.
public static Collection<DocumentRole> listRoles(Domain domain) throws UnknownDomainException, AuthorizationDeniedException
Domain
. Roles are created using saveNewRole
and the domain that owns the role must be provided at this time.
addDomainAdministrators
method. This method can be invoked by users that have the Domain Manager role in the related domain. This role can be assigned using the addDomainManagers
method.domain
- the domain.UnknownDomainException
- the domain does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static Collection<DocumentRole> listRolesForContext(ContextInstance context) throws UnknownContextException, AuthorizationDeniedException
addDomainAdministrators
method. This method can be invoked by users that have the Context Manager role in the related context. This role can be assigned using the addContextManagers
method. This method can be invoked by users that have the Inspector role in the related context. This role can be assigned using the addInspectors
method.context
- the context.UnknownContextException
- the context does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static DocumentRole saveNewRole(Domain domain, DocumentRole role) throws DocumentRoleAlreadyExistsException, InvalidFeaturesException, InvalidTimePeriodException, UnknownDomainException, IllegalArgumentException, AuthorizationDeniedException
Domain
.
addDomainAdministrators
method.
domain
- the domain that owns this role.role
- the role.DocumentRoleAlreadyExistsException
- a role already exists with the same UUID within the specified domain.InvalidFeaturesException
- invalid features specified.InvalidTimePeriodException
- invalid time period specified.UnknownDomainException
- the domain does not exist.IllegalArgumentException
- illegal argument. The role provided must NOT have it's Domain
property specified. This is to protect against passing in a role that has already been saved. Duplicate features and time spans are also not allowed.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static DocumentRole saveChangesToRole(DocumentRole role, DocumentRole delta) throws InvalidFeaturesException, InvalidTimePeriodException, ImmutableDocumentRoleException, UnknownDocumentRoleException, IllegalArgumentException, AuthorizationDeniedException
DocumentRole
by providing two copies. Changes are made by comparing the two copies of the role. If there are no differences in a property then no changes are made to persistent storage for that property. Changes in collection based properties cause additions or removals to occur in persistent storage. For example, if the delta contains a new Feature
as compared to the role then a new role will be associated with the template.
addDomainAdministrators
method.
role
- the document role to compare to the delta.delta
- the changes. The Domain
and Uuid
properties must match with the role parameter.InvalidFeaturesException
- invalid features specified.InvalidTimePeriodException
- invalid time period specified.ImmutableDocumentRoleException
- the role has been assigned to a user or group and the item constraints cannot be changed.UnknownDocumentRoleException
- the role does not exist.IllegalArgumentException
- illegal argument. If the Domain
and Uuid
properties of the delta parameter do not match the role parameter. Also thrown in the role provided does not have it's Domain
property specified. Duplicate features and time spans are not allowed.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static void deleteRole(DocumentRole role) throws CannotRemoveDocumentRoleException
role
- the role.CannotRemoveDocumentRoleException
- the role cannot be removed as it is in use. A document role cannot be deleted if there are any contexts assignments using the role. The document role can only be deleted after the associated rights have been unassigned.public static void deleteRoles(Collection<DocumentRole> roles) throws CannotRemoveDocumentRoleException, AuthorizationDeniedException
addDomainAdministrators
method.
roles
- the set of roles. This parameter is optional, it is valid to pass null or an empty collection.CannotRemoveDocumentRoleException
- the role cannot be removed as it is in use. A document role cannot be deleted if there are any contexts assignments using the role. The document role can only be deleted after the associated rights have been unassigned.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static DocumentRole copyRole(DocumentRole role, Domain domain) throws UnknownDomainException, UnknownDocumentRoleException, IllegalArgumentException
Domain
. When roles are copied the rights assigned to those roles are not copied.Labels
are also copied and altered to reflect that the result is a copy of the role. For example, in English, the role Contributor would turn into Copy Of Contributor.
role
- the role.domain
- the domain.UnknownDomainException
- the domain does not exist.UnknownDocumentRoleException
- the role does not exist.IllegalArgumentException
- illegal argument. The role provided must have it's Domain
property specified.public static Collection<DocumentRole> copyRoles(Collection<DocumentRole> roles, Domain domain) throws UnknownDomainException, UnknownDocumentRoleException, IllegalArgumentException, AuthorizationDeniedException
Domain
. When roles are copied the rights assigned to those roles are not copied.Labels
are also copied and altered to reflect that the result is a copy of the role. For example, in English, the role Contributor would turn into Copy Of Contributor.
addDomainAdministrators
method.
roles
- the set of roles. This parameter is optional, it is valid to pass null or an empty collection.domain
- the domain.UnknownDomainException
- the domain does not exist.UnknownDocumentRoleException
- the role does not exist.IllegalArgumentException
- illegal argument. If any of the roles provided are not associated with a Domain
.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static DocumentRole refreshDocumentRole(DocumentRole role) throws UnknownDocumentRoleException, AuthorizationDeniedException
addDomainAdministrators
method. This method can be invoked by users that have the Domain Manager role in the related domain. This role can be assigned using the addDomainManagers
method.
role
- the role.UnknownDocumentRoleException
- the role does not exist.AuthorizationDeniedException
- authorization denied. The authenticated user is not authorized to call this operation.public static boolean documentRoleExists(UUID uuid, Domain domain)
uuid
- the role UUID.domain
- the owning domain.public static DocumentRole appendFeaturesToRole(DocumentRole role, String[] featureIds) throws UnknownFeatureException
getFeature
and then adds the resultant feature to the role's Features
.saveNewRole
or saveChangesToRole
is required to persist changes to the features.role
- the role.featureIds
- the array of feature Ids.UnknownFeatureException
- one of the specified feature Ids is invalid.public static DocumentRole clearTimeConstraints(DocumentRole role)
saveNewRole
or saveChangesToRole
is required to persist changes to the time constraints.role
- the role.NONE
, TimeSpans
public static DocumentRole setAbsoluteTimeConstraints(DocumentRole role, Date startTime, Date stopTime)
saveNewRole
or saveChangesToRole
is required to persist changes to the time constraints.role
- the role.startTime
- start time. The start time is optional if a stop time has been provided. This parameter is optional, it is valid to pass null.stopTime
- stop time. The stop time is optional if a start time has been provided. This parameter is optional, it is valid to pass null.ABSOLUTE
, TimeSpans
public static DocumentRole setRelativeAssignmentTimeConstraints(DocumentRole role, TimePeriod period)
saveNewRole
or saveChangesToRole
is required to persist changes to the time constraints.role
- the role.period
- the time period. e.g. three months.RELATIVE_ASSIGNMENT
, TimeSpans
, AssignedTime
public static DocumentRole setRelativeClassificationTimeConstraints(DocumentRole role, TimePeriod period)
saveNewRole
or saveChangesToRole
is required to persist changes to the time constraints.role
- the role.period
- the time period. e.g. one day.ClassificationTime
, TimeSpans
, RELATIVE_CLASSIFICATION
public static DocumentRole.TimeConstraints getTimeConstraints(DocumentRole role)
TimeSpans
the role allows. This methods is provided as an alternative way to working out what the time constraints are rather than manually examining the time spans property.role
- the role.public static DocumentRole setFeatureRecording(DocumentRole role, boolean record)
Record
value on each Feature
present in the list of Features
. This methods is provided as an alternative way of altering each feature's Record
property manually.saveNewRole
or saveChangesToRole
is required to persist changes to the export constraints.role
- the role.record
- feature use is recorded (true) or not recorded (false).Features
public static boolean getFeatureRecording(DocumentRole role)
Features
. This methods is provided as an alternative way to examining the features individually.role
- the role.public static Collection<Feature> updateExportConstraints(Collection<Feature> features, DocumentRole.ExportConstraints constraints)
Feature
. This method can be used to add in these features based on the required export constraints. The Record
property value of these added features will be set to match the features provided. If any the provided features are marked to have their usage recorded, the added feature will also be marked to have their usage recorded.features
- the features. This parameter is optional, it is valid to pass null or an empty collection.constraints
- the required export constraints.Destinations
|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |