Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.workflow.document.ejb
Class AbstractWorkflowDocumentManager

java.lang.Object
  extended by org.nuxeo.ecm.platform.workflow.document.ejb.AbstractWorkflowDocumentManager
All Implemented Interfaces:
Serializable, SessionSynchronization, BaseWorkflowDocumentManager
Direct Known Subclasses:
WorkflowDocumentLifeCycleBean, WorkflowDocumentSecurityBean

public abstract class AbstractWorkflowDocumentManager
extends Object
implements SessionSynchronization, BaseWorkflowDocumentManager

Abstract workflow document manager.

This abstract class will deal with JTA session resources synchronization. In this case the core document manager needs to be opened and closed at the beginning and end of every transaction.

Author:
Julien Anguenot
See Also:
Serialized Form

Field Summary
protected  CoreSession documentManager
           
protected  CoreDocumentManagerBusinessDelegate documentManagerBusinessDelegate
           
protected  String repositoryUri
           
protected  WorkflowDocumentSecurityPolicyBusinessDelegate wDocRightsPolicyBusinessDelegate
           
 
Constructor Summary
AbstractWorkflowDocumentManager()
           
 
Method Summary
 void afterBegin()
           
 void afterCompletion(boolean committed)
           
 void beforeCompletion()
           
protected  CoreSession getDocumentManager()
           
 DocumentModel getDocumentModelFor(DocumentRef docRef)
          Returns a document model from core given a document ref.
 String getRepositoryUri()
          Gets the repository URI.
protected  WorkflowDocumentSecurityPolicyManager getWorkflowDocumentRightsPolicy()
           
 void setRepositoryUri(String repositoryUri)
          Sets the repository URI.
 void unlockDocument(DocumentRef docRef)
          Unlock document if locked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repositoryUri

protected String repositoryUri

documentManagerBusinessDelegate

protected final CoreDocumentManagerBusinessDelegate documentManagerBusinessDelegate

wDocRightsPolicyBusinessDelegate

protected final WorkflowDocumentSecurityPolicyBusinessDelegate wDocRightsPolicyBusinessDelegate

documentManager

protected transient CoreSession documentManager
Constructor Detail

AbstractWorkflowDocumentManager

public AbstractWorkflowDocumentManager()
Method Detail

afterBegin

public void afterBegin()
                throws EJBException
Specified by:
afterBegin in interface SessionSynchronization
Throws:
EJBException

afterCompletion

public void afterCompletion(boolean committed)
                     throws EJBException
Specified by:
afterCompletion in interface SessionSynchronization
Throws:
EJBException

beforeCompletion

public void beforeCompletion()
                      throws EJBException,
                             RemoteException
Specified by:
beforeCompletion in interface SessionSynchronization
Throws:
EJBException
RemoteException

getDocumentManager

protected CoreSession getDocumentManager()
                                  throws NamingException,
                                         ClientException
Throws:
NamingException
ClientException

getWorkflowDocumentRightsPolicy

protected WorkflowDocumentSecurityPolicyManager getWorkflowDocumentRightsPolicy()
                                                                         throws Exception
Throws:
Exception

unlockDocument

public void unlockDocument(DocumentRef docRef)
                    throws ClientException
Description copied from interface: BaseWorkflowDocumentManager
Unlock document if locked.

Specified by:
unlockDocument in interface BaseWorkflowDocumentManager
Parameters:
docRef - : the Nuxeo core document Reference.
Throws:
ClientException - if exception Nuxeo core side.

getDocumentModelFor

public DocumentModel getDocumentModelFor(DocumentRef docRef)
                                  throws ClientException
Description copied from interface: BaseWorkflowDocumentManager
Returns a document model from core given a document ref.

Specified by:
getDocumentModelFor in interface BaseWorkflowDocumentManager
Parameters:
docRef - the document reference.
Returns:
a DocumentModel instance
Throws:
ClientException

getRepositoryUri

public String getRepositoryUri()
Description copied from interface: BaseWorkflowDocumentManager
Gets the repository URI.

Specified by:
getRepositoryUri in interface BaseWorkflowDocumentManager
Returns:
the repository URI

setRepositoryUri

public void setRepositoryUri(String repositoryUri)
Description copied from interface: BaseWorkflowDocumentManager
Sets the repository URI.

Needed by the underlying document manager.

Specified by:
setRepositoryUri in interface BaseWorkflowDocumentManager
Parameters:
repositoryUri - the repository URI

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.