org.apache.jackrabbit.oak.jcr.session.operation
Class SessionOperation<T>

java.lang.Object
  extended by org.apache.jackrabbit.oak.jcr.session.operation.SessionOperation<T>
Direct Known Subclasses:
ItemOperation, LockOperation, UserManagerOperation

public abstract class SessionOperation<T>
extends Object

A SessionOperation provides an execution context for executing session scoped operations.

See Also:
SessionDelegate.perform(SessionOperation)

Constructor Summary
protected SessionOperation(String name)
           
protected SessionOperation(String name, boolean update)
           
 
Method Summary
 void checkPreconditions()
           
 boolean isLogout()
           
 boolean isRefresh()
          Return true if this operation refreshed the transient space
 boolean isSave()
           
 boolean isUpdate()
          Returns true if this operation updates the the transient
abstract  T perform()
           
 String toString()
          Provide details about the operation being performed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionOperation

protected SessionOperation(String name,
                           boolean update)

SessionOperation

protected SessionOperation(String name)
Method Detail

isUpdate

public boolean isUpdate()
Returns true if this operation updates the the transient


isRefresh

public boolean isRefresh()
Return true if this operation refreshed the transient space


isSave

public boolean isSave()

isLogout

public boolean isLogout()

checkPreconditions

public void checkPreconditions()
                        throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

perform

public abstract T perform()
                   throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

toString

public String toString()
Provide details about the operation being performed. This default implementation just returns the name passed to the constructor.

Overrides:
toString in class Object


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.