Package org.eclipse.emf.cdo.server
Class CDOServerUtil.RepositoryReadAccessValidator
- java.lang.Object
-
- org.eclipse.emf.cdo.server.CDOServerUtil.RepositoryReadAccessValidator
-
- All Implemented Interfaces:
IRepository.Handler,IRepository.ReadAccessHandler
- Enclosing class:
- CDOServerUtil
public abstract static class CDOServerUtil.RepositoryReadAccessValidator extends java.lang.Object implements IRepository.ReadAccessHandler
An abstractread-access handlerthat grants or denies access to singlerevisions.- Since:
- 2.0
- Author:
- Eike Stepper
-
-
Constructor Summary
Constructors Constructor Description RepositoryReadAccessValidator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidhandleRevisionsBeforeSending(ISession session, CDORevision[] revisions, java.util.List<CDORevision> additionalRevisions)Provides a way to handle revisions that are to be sent to the client.protected voidthrowException(java.lang.String message)protected voidthrowException(ISession session, java.util.List<java.lang.String> violations)protected abstract java.lang.Stringvalidate(ISession session, CDORevision revision)
-
-
-
Method Detail
-
handleRevisionsBeforeSending
public void handleRevisionsBeforeSending(ISession session, CDORevision[] revisions, java.util.List<CDORevision> additionalRevisions) throws java.lang.RuntimeException
Description copied from interface:IRepository.ReadAccessHandlerProvides a way to handle revisions that are to be sent to the client.- Specified by:
handleRevisionsBeforeSendingin interfaceIRepository.ReadAccessHandler- Parameters:
session- The session that is going to send the revisions.revisions- The revisions that are requested by the client. If the client must not see any of these revisions an unchecked exception must be thrown.additionalRevisions- The additional revisions that are to be sent to the client because internal optimizers believe that they will be needed soon. If the client must not see any of these revisions they should be removed from the list.- Throws:
java.lang.RuntimeException- to indicate that none of the revisions must be sent to the client. This exception will be visible at the client side!
-
throwException
protected void throwException(ISession session, java.util.List<java.lang.String> violations) throws java.lang.RuntimeException
- Throws:
java.lang.RuntimeException
-
throwException
protected void throwException(java.lang.String message) throws java.lang.RuntimeException- Throws:
java.lang.RuntimeException
-
validate
protected abstract java.lang.String validate(ISession session, CDORevision revision)
-
-