Package org.eclipse.emf.spi.cdo
Interface CDOOperationAuthorizer
- All Superinterfaces:
Comparable<org.eclipse.net4j.util.container.ContainerElementList.Prioritized>,org.eclipse.net4j.util.container.ContainerElementList.Prioritized
- All Known Implementing Classes:
LMOperationAuthorizer,ReviewsOperationAuthorizer
public interface CDOOperationAuthorizer
extends org.eclipse.net4j.util.container.ContainerElementList.Prioritized
An operation authorizer for CDO sessions.
Implementations must register a factory with the container
of the session that is supposed to authorize operations, e.g.:
<simpleFactory
productGroup="org.eclipse.emf.cdo.operationAuthorizers"
type="test"
productClass="x.y.z.TestOperationAuthorizer"/>
- Since:
- 4.28
- Author:
- Eike Stepper
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionauthorizeOperation(CDOSession session, Supplier<org.eclipse.net4j.util.collection.Entity> userInfoSupplier, org.eclipse.net4j.util.security.operations.AuthorizableOperation operation) Authorizes the givenoperationin the context of the givensession.default intMethods inherited from interface org.eclipse.net4j.util.container.ContainerElementList.Prioritized
compareTo
-
Field Details
-
PRODUCT_GROUP
- See Also:
-
GRANTED
-
DENIED
- See Also:
-
ABSTAINED
-
-
Method Details
-
getPriority
default int getPriority()- Specified by:
getPriorityin interfaceorg.eclipse.net4j.util.container.ContainerElementList.Prioritized
-
authorizeOperation
Object authorizeOperation(CDOSession session, Supplier<org.eclipse.net4j.util.collection.Entity> userInfoSupplier, org.eclipse.net4j.util.security.operations.AuthorizableOperation operation) Authorizes the givenoperationin the context of the givensession.- Returns:
- One of the following values:
- The special value
ABSTAINED(ornull) to indicate that this authorizer abstained from voting. - The special value
GRANTEDto indicate that authorization is granted. - Any non-
nullString value to indicate that authorization is vetoed. The String value represents the reason for the veto. - An
authorizable operationto indicate that the repository shall be asked to authorize the returned operation on behalf of the operation that is passed to this method. The returned operation can be identical to the passed operation, have differentparametersthan the passed operation, or an entirely different operation. Care should be taken to ask for repository authorization of operations with complex parameter types, as Objectserializationis used to send the parameters to the repository. For example, aCDOIDshould be preferred over an entireCDOObject.
- The special value
- See Also:
-