org.kuali.rice.krad.document
Class DocumentBase

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.krad.document.DocumentBase
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject, Document
Direct Known Subclasses:
MaintenanceDocumentBase, TransactionalDocumentBase

@MappedSuperclass
public abstract class DocumentBase
extends PersistableBusinessObjectBase
implements Document

See Also:
Document, Serialized Form

Field Summary
protected  List<AdHocRoutePerson> adHocRoutePersons
           
protected  List<AdHocRouteWorkgroup> adHocRouteWorkgroups
           
protected  DocumentHeader documentHeader
           
protected  String documentNumber
           
protected  List<Note> notes
           
protected  List<PessimisticLock> pessimisticLocks
           
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, newCollectionRecord, objectId, versionNumber
 
Constructor Summary
DocumentBase()
          Constructs a DocumentBase.java.
 
Method Summary
protected  void addCopyErrorDocumentNote(String noteText)
          Adds a note to the document indicating it was created by a copy or error correction.
 void addNote(Note note)
          Adds the given Note to the document's list of Notes.
 void addPessimisticLock(PessimisticLock lock)
          This method adds a new PessimisticLock to the document NOTE: LOCKS ADDED VIA THIS METHOD WILL NOT BE SAVED WITH THE DOCUMENT
 void afterActionTaken(ActionType performed, ActionTakenEvent event)
          method to integrate with workflow where we will be able to perform logic after an action taken being performed on a document
 void afterWorkflowEngineProcess(boolean successfullyProcessed)
          The the default implementation for afterWorkflowEngineProcess does nothing, but is meant to provide a hook for documents to implement for other needs.
 void beforeWorkflowEngineProcess()
          The the default implementation for beforeWorkflowEngineProcess does nothing, but is meant to provide a hook for documents to implement for other needs.
protected  PropertySerializabilityEvaluator createPropertySerializabilityEvaluator(WorkflowProperties workflowProperties, WorkflowAttributes workflowAttributes)
           
 void doActionTaken(ActionTakenEvent event)
          method to integrate with workflow where we will be able to perform logic for an action taken being performed on a document
 void doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent)
          The the default implementation for RouteLevelChange does nothing, but is meant to provide a hook for documents to implement for other needs.
 void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent)
          Handle the doRouteStatusChange event from the post processor
 List<KualiDocumentEvent> generateSaveEvents()
          Hook for override
 List<AdHocRoutePerson> getAdHocRoutePersons()
          getter method to get the list of ad hoc route persons associated with a document at a point in time, this list is only valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a document
 List<AdHocRouteWorkgroup> getAdHocRouteWorkgroups()
          getter method to get the list of ad hoc route workgroups associated with a document at a point in time, this list is only valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a document
 boolean getAllowsCopy()
          This method returns whether or not this document can be copied.
protected  AttachmentService getAttachmentService()
           
 String getBasePathToDocumentDuringSerialization()
          Returns the POJO property name of "this" document in the object returned by wrapDocumentWithMetadataForXmlSerialization()
 String getCustomLockDescriptor(Person user)
          This default implementation just throws a PessimisticLockingException.
 DocumentHeader getDocumentHeader()
          This retrieves the standard DocumentHeader object, which contains standard meta-data about a document.
 String getDocumentNumber()
          All documents have a document header id.
 PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
          If workflowProperties have been defined within the data dictionary for this document, then it returns an instance of BusinessObjectPropertySerializibilityEvaluator initialized with the properties.
 String getDocumentTitle()
          Retrieves the title of the document
 List<String> getLockClearingMethodNames()
          This is a method that is used by Kuali Pessimistic Locking to get the names (method to call values) of the KNS KualiDocumentActionBase methods that should release locks
 List<String> getLockClearningMethodNames()
          Deprecated. 
protected  List<String> getNonLockingActionTakenCodes()
          Return the list of actions a user could take on a document which should not result in the recalculation of the PessimisticLocks.
 Note getNote(int index)
          Retrieves the note at the given index.
 List<Note> getNotes()
          Returns a mutable list of all notes on the document.
protected  NoteService getNoteService()
           
 PersistableBusinessObject getNoteTarget()
          Returns the business object with which notes related to this document should be associated.
 NoteType getNoteType()
          Returns the NoteType to use for notes associated with this document.
 List<PessimisticLock> getPessimisticLocks()
          This method gets a list of the PessimisticLock objects associated with this document
 List<String> getWorkflowEngineDocumentIdsToLock()
          The default implementation returns no additional ids for the workflow engine to lock prior to processing.
 String getXmlForRouteReport()
          This method is used to get the xml that should be used in a Route Report.
protected  void logErrors()
          This method logs errors.
 void populateDocumentForRouting()
          This is the method to integrate with workflow, where we will actually populate the workflow defined data structure(s) so that workflow can routed based on this data.
protected  void postLoad()
          Loads the KRAD document header via the document header service.
 void postProcessSave(KualiDocumentEvent event)
          Do any work on the document after the save.
protected  void postRemove()
          This overridden method is used to delete the DocumentHeader object due to the system not being able to manage the DocumentHeader object via mapping files
 void prepareForSave()
          This method provides a hook that will be called before the document is saved.
 void prepareForSave(KualiDocumentEvent event)
          Override this method with implementation specific prepareForSave logic
protected  void prePersist()
          Save the KRAD document header via the document header service.
 void processAfterRetrieve()
          This method provides a hook that will be called after a document is retrieved, but before it is returned from the DocumentService.
 void refreshPessimisticLocks()
          This method updates the list of PessimisticLock objects on the document if changes could have been made
 void refreshReferenceObject(String referenceObjectName)
          Deprecated. This is a KNS/OJB-related method. It should not be used on KRAD/JPA-based documents.
 boolean removeNote(Note note)
          Removes the given note from the document's list of notes.
 String serializeDocumentToXml()
          This is a method where we can get the xml of a document that the workflow system will use to base it's routing and search attributes on.
 void setAdHocRoutePersons(List<AdHocRoutePerson> adHocRoutePersons)
          setter method to set the list of ad hoc route persons associated with a document at a point in time, this list is only valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a document
 void setAdHocRouteWorkgroups(List<AdHocRouteWorkgroup> adHocRouteWorkgroups)
          setter method to set the list of ad hoc route workgroups associated with a document at a point in time, this list is only valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a document
 void setDocumentHeader(DocumentHeader documentHeader)
          Sets the associated DocumentHeader for this document.
 void setDocumentNumber(String documentNumber)
          setter for document header id
protected  void setNewDocumentHeader()
          Gets a new document header for this documents type and sets in the document instance.
 void setNotes(List<Note> notes)
          Sets the document's list of notes to the given list.
 void setPessimisticLocks(List<PessimisticLock> pessimisticLocks)
           
 void toCopy()
           
 boolean useCustomLockDescriptors()
          This default implementation simply returns false to indicate that custom lock descriptors are not supported by DocumentBase.
 void validateBusinessRules(KualiDocumentEvent event)
          Sends document off to the rules engine to verify business rules.
 KualiDocumentXmlMaterializer wrapDocumentWithMetadataForXmlSerialization()
          Wraps a document in an instance of KualiDocumentXmlMaterializer, that provides additional metadata for serialization
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getLegacyDataAdapter, getObjectId, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postPersist, postUpdate, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.bo.PersistableBusinessObject
buildListOfDeletionAwareLists, getExtension, isNewCollectionRecord, linkEditableUserFields, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from interface org.kuali.rice.krad.bo.BusinessObject
refresh
 
Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
 
Methods inherited from interface org.kuali.rice.core.api.mo.common.Versioned
getVersionNumber
 
Methods inherited from interface org.kuali.rice.core.api.mo.common.GloballyUnique
getObjectId
 

Field Detail

documentNumber

protected String documentNumber

documentHeader

protected DocumentHeader documentHeader

pessimisticLocks

protected List<PessimisticLock> pessimisticLocks

adHocRoutePersons

protected List<AdHocRoutePerson> adHocRoutePersons

adHocRouteWorkgroups

protected List<AdHocRouteWorkgroup> adHocRouteWorkgroups

notes

protected List<Note> notes
Constructor Detail

DocumentBase

public DocumentBase()
Constructs a DocumentBase.java.

Method Detail

getAllowsCopy

public boolean getAllowsCopy()
Description copied from interface: Document
This method returns whether or not this document can be copied.

Specified by:
getAllowsCopy in interface Document
Returns:
True if it can be copied, false if not.
See Also:
Document.getAllowsCopy()

getDocumentTitle

public String getDocumentTitle()
Retrieves the title of the document

This is the default document title implementation. It concatenates the document's data dictionary file label attribute and the document's document header description together. This title is used to populate workflow and will show up in document search results and user action lists.

return String representing the title of the document

Specified by:
getDocumentTitle in interface Document
Returns:
document title
See Also:
Document.getDocumentTitle()

prepareForSave

public void prepareForSave()
Description copied from interface: Document
This method provides a hook that will be called before the document is saved. This method is useful for applying document level data to children. For example, if someone changes data at the document level, and that data needs to be propagated to child objects or child lists of objects, you can use this method to update the child object or iterate through the list of child objects and apply the document level data to them. Any document that follows this paradigm will need to make use of this method to apply all of those changes.

Specified by:
prepareForSave in interface Document
See Also:
Document.prepareForSave()

processAfterRetrieve

public void processAfterRetrieve()
Description copied from interface: Document
This method provides a hook that will be called after a document is retrieved, but before it is returned from the DocumentService.

Specified by:
processAfterRetrieve in interface Document
See Also:
Document.processAfterRetrieve()

doRouteLevelChange

public void doRouteLevelChange(DocumentRouteLevelChange levelChangeEvent)
The the default implementation for RouteLevelChange does nothing, but is meant to provide a hook for documents to implement for other needs.

Specified by:
doRouteLevelChange in interface Document
Parameters:
levelChangeEvent - route level change event
See Also:
Document.doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteLevelChange)

doActionTaken

public void doActionTaken(ActionTakenEvent event)
Description copied from interface: Document
method to integrate with workflow where we will be able to perform logic for an action taken being performed on a document

Specified by:
doActionTaken in interface Document
Parameters:
event - action taken event
See Also:
Document.doActionTaken(org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent)

afterActionTaken

public void afterActionTaken(ActionType performed,
                             ActionTakenEvent event)
Description copied from interface: Document
method to integrate with workflow where we will be able to perform logic after an action taken being performed on a document

Specified by:
afterActionTaken in interface Document
Parameters:
performed - action type performed
event - action taken event
See Also:
Document.afterActionTaken(ActionType, org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent)

getNonLockingActionTakenCodes

protected List<String> getNonLockingActionTakenCodes()
Return the list of actions a user could take on a document which should not result in the recalculation of the PessimisticLocks.

See Also:
doActionTaken(ActionTakenEvent)

afterWorkflowEngineProcess

public void afterWorkflowEngineProcess(boolean successfullyProcessed)
The the default implementation for afterWorkflowEngineProcess does nothing, but is meant to provide a hook for documents to implement for other needs.

Specified by:
afterWorkflowEngineProcess in interface Document
Parameters:
successfullyProcessed - - true if the document was processed successfully, false otherwise
See Also:
Document.afterWorkflowEngineProcess(boolean)

beforeWorkflowEngineProcess

public void beforeWorkflowEngineProcess()
The the default implementation for beforeWorkflowEngineProcess does nothing, but is meant to provide a hook for documents to implement for other needs.

Specified by:
beforeWorkflowEngineProcess in interface Document
See Also:
Document.beforeWorkflowEngineProcess()

getWorkflowEngineDocumentIdsToLock

public List<String> getWorkflowEngineDocumentIdsToLock()
The default implementation returns no additional ids for the workflow engine to lock prior to processing.

Specified by:
getWorkflowEngineDocumentIdsToLock in interface Document
Returns:
additional document IDs to lock prior to processing
See Also:
Document.getWorkflowEngineDocumentIdsToLock()

toCopy

public void toCopy()
            throws WorkflowException,
                   IllegalStateException
Throws:
WorkflowException
IllegalStateException
See Also:
Copyable.toCopy()

setNewDocumentHeader

protected void setNewDocumentHeader()
                             throws WorkflowException
Gets a new document header for this documents type and sets in the document instance.

Throws:
WorkflowException

addCopyErrorDocumentNote

protected void addCopyErrorDocumentNote(String noteText)
Adds a note to the document indicating it was created by a copy or error correction.

Parameters:
noteText - - text for note

getXmlForRouteReport

public String getXmlForRouteReport()
Description copied from interface: Document
This method is used to get the xml that should be used in a Route Report. In it's default implementation this will call the methods prepareForSave() and populateDocumentForRouting().

Specified by:
getXmlForRouteReport in interface Document
Returns:
XML data for routing
See Also:
Document.getXmlForRouteReport()

populateDocumentForRouting

public void populateDocumentForRouting()
Description copied from interface: Document
This is the method to integrate with workflow, where we will actually populate the workflow defined data structure(s) so that workflow can routed based on this data. This method is responsible for passing over the proper Kuali (client system) data that will be used by workflow to determine how the document is actually routed.

Specified by:
populateDocumentForRouting in interface Document
See Also:
Document.populateDocumentForRouting()

serializeDocumentToXml

public String serializeDocumentToXml()
Description copied from interface: Document
This is a method where we can get the xml of a document that the workflow system will use to base it's routing and search attributes on.

Specified by:
serializeDocumentToXml in interface Document
Returns:
the document serialized to an xml string
See Also:
Document.serializeDocumentToXml()

wrapDocumentWithMetadataForXmlSerialization

public KualiDocumentXmlMaterializer wrapDocumentWithMetadataForXmlSerialization()
Wraps a document in an instance of KualiDocumentXmlMaterializer, that provides additional metadata for serialization

Specified by:
wrapDocumentWithMetadataForXmlSerialization in interface Document
Returns:
a wrapper object (most likely containing a reference to "this"), or "this" itself.
See Also:
Document.wrapDocumentWithMetadataForXmlSerialization()

getDocumentPropertySerizabilityEvaluator

public PropertySerializabilityEvaluator getDocumentPropertySerizabilityEvaluator()
If workflowProperties have been defined within the data dictionary for this document, then it returns an instance of BusinessObjectPropertySerializibilityEvaluator initialized with the properties. If none have been defined, then returns AlwaysTruePropertySerializibilityEvaluator.

Specified by:
getDocumentPropertySerizabilityEvaluator in interface Document
Returns:
a fully initialized evaluator object, ready to be used for workflow routing
See Also:
Document.getDocumentPropertySerizabilityEvaluator()

createPropertySerializabilityEvaluator

protected PropertySerializabilityEvaluator createPropertySerializabilityEvaluator(WorkflowProperties workflowProperties,
                                                                                  WorkflowAttributes workflowAttributes)

getBasePathToDocumentDuringSerialization

public String getBasePathToDocumentDuringSerialization()
Returns the POJO property name of "this" document in the object returned by wrapDocumentWithMetadataForXmlSerialization()

Specified by:
getBasePathToDocumentDuringSerialization in interface Document
Returns:
a fully initialized evaluator object, ready to be used for workflow routing
See Also:
Document.getBasePathToDocumentDuringSerialization()

getDocumentHeader

public DocumentHeader getDocumentHeader()
This retrieves the standard DocumentHeader object, which contains standard meta-data about a document.

Specified by:
getDocumentHeader in interface Document
Returns:
document header since all docs will have a document header

setDocumentHeader

public void setDocumentHeader(DocumentHeader documentHeader)
Sets the associated DocumentHeader for this document.

Specified by:
setDocumentHeader in interface Document

getDocumentNumber

public String getDocumentNumber()
All documents have a document header id. This is the quick accessor to that unique identifier and should return the same value as documentHeader.getDocumentHeaderId().

Specified by:
getDocumentNumber in interface Document
Returns:
doc header id

setDocumentNumber

public void setDocumentNumber(String documentNumber)
setter for document header id

Specified by:
setDocumentNumber in interface Document

getAdHocRoutePersons

public List<AdHocRoutePerson> getAdHocRoutePersons()
getter method to get the list of ad hoc route persons associated with a document at a point in time, this list is only valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a document

Specified by:
getAdHocRoutePersons in interface Document
Returns:
list of ad hoc route persons

setAdHocRoutePersons

public void setAdHocRoutePersons(List<AdHocRoutePerson> adHocRoutePersons)
setter method to set the list of ad hoc route persons associated with a document at a point in time, this list is only valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a document

Specified by:
setAdHocRoutePersons in interface Document

getAdHocRouteWorkgroups

public List<AdHocRouteWorkgroup> getAdHocRouteWorkgroups()
getter method to get the list of ad hoc route workgroups associated with a document at a point in time, this list is only valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a document

Specified by:
getAdHocRouteWorkgroups in interface Document
Returns:
list of ad hoc route workgroups

setAdHocRouteWorkgroups

public void setAdHocRouteWorkgroups(List<AdHocRouteWorkgroup> adHocRouteWorkgroups)
setter method to set the list of ad hoc route workgroups associated with a document at a point in time, this list is only valid for a given users version of a document as this state is only persisted in workflow itself when someone takes an action on a document

Specified by:
setAdHocRouteWorkgroups in interface Document

postProcessSave

public void postProcessSave(KualiDocumentEvent event)
Description copied from interface: Document
Do any work on the document after the save.

Specified by:
postProcessSave in interface Document
Parameters:
event - - indicates which document event was requested

prepareForSave

public void prepareForSave(KualiDocumentEvent event)
Override this method with implementation specific prepareForSave logic

Specified by:
prepareForSave in interface Document
Parameters:
event - - indicates which document event was requested
See Also:
Document.prepareForSave(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent)

validateBusinessRules

public void validateBusinessRules(KualiDocumentEvent event)
Description copied from interface: Document
Sends document off to the rules engine to verify business rules.

Specified by:
validateBusinessRules in interface Document
Parameters:
event - - indicates which document event was requested

logErrors

protected void logErrors()
This method logs errors.


generateSaveEvents

public List<KualiDocumentEvent> generateSaveEvents()
Hook for override

Specified by:
generateSaveEvents in interface Document
Returns:
a list of document events that were triggered by the save event
See Also:
Document.generateSaveEvents()

doRouteStatusChange

public void doRouteStatusChange(DocumentRouteStatusChange statusChangeEvent)
Description copied from interface: Document
Handle the doRouteStatusChange event from the post processor

Specified by:
doRouteStatusChange in interface Document
Parameters:
statusChangeEvent - status change event
See Also:
Document.doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange)

getNoteTarget

public PersistableBusinessObject getNoteTarget()
Returns the business object with which notes related to this document should be associated. By default, the DocumentHeader of this document will be returned as the note target.

Sub classes can override this method if they want notes to be associated with something other than the document header. If this method is overridden, the getNoteType() method should be overridden to return NoteType.BUSINESS_OBJECT

Specified by:
getNoteTarget in interface Document
Returns:
Returns the documentBusinessObject.

getNoteType

public NoteType getNoteType()
Returns the NoteType to use for notes associated with this document. By default this returns NoteType.DOCUMENT_HEADER since notes are associated with the DocumentHeader record by default.

The case in which this should be overridden is if getNoteTarget() is overridden to return an object other than the DocumentHeader.

Specified by:
getNoteType in interface Document
Returns:
the note type to use for notes associated with this document
See Also:
Document.getNoteType()

addNote

public void addNote(Note note)
Description copied from interface: Document
Adds the given Note to the document's list of Notes.

Specified by:
addNote in interface Document
Parameters:
note - the Note to add, must be non-null
See Also:
Document.addNote(org.kuali.rice.krad.bo.Note)

removeNote

public boolean removeNote(Note note)
Description copied from interface: Document
Removes the given note from the document's list of notes.

Specified by:
removeNote in interface Document
Parameters:
note - the note to remove from the document's list of notes, must be non-null
Returns:
true if the note was successfully removed, false if the list did not contain the given note
See Also:
Document.removeNote(org.kuali.rice.krad.bo.Note)

getNote

public Note getNote(int index)
Description copied from interface: Document
Retrieves the note at the given index.

Specified by:
getNote in interface Document
Parameters:
index - the zero-based index of the note to retrieve
Returns:
the note located at the given index
See Also:
Document.getNote(int)

getNotes

public List<Note> getNotes()
Description copied from interface: Document
Returns a mutable list of all notes on the document.

Specified by:
getNotes in interface Document
Returns:
the list of notes associated with this document, if this document has no notes then an empty list will be returned
See Also:
Document.getNotes()

setNotes

public void setNotes(List<Note> notes)
Description copied from interface: Document
Sets the document's list of notes to the given list.

Specified by:
setNotes in interface Document
Parameters:
notes - the list of notes to set on the document, must be non-null
See Also:
Document.setNotes(java.util.List)

postLoad

protected void postLoad()
Loads the KRAD document header via the document header service.

Overrides:
postLoad in class PersistableBusinessObjectBase
See Also:
PersistableBusinessObjectBase.postLoad()

prePersist

protected void prePersist()
Save the KRAD document header via the document header service.

Overrides:
prePersist in class PersistableBusinessObjectBase

postRemove

protected void postRemove()
This overridden method is used to delete the DocumentHeader object due to the system not being able to manage the DocumentHeader object via mapping files

Overrides:
postRemove in class PersistableBusinessObjectBase
See Also:
PersistableBusinessObjectBase.postRemove()

getPessimisticLocks

public List<PessimisticLock> getPessimisticLocks()
Description copied from interface: Document
This method gets a list of the PessimisticLock objects associated with this document

Specified by:
getPessimisticLocks in interface Document
Returns:
list of pessimistic locks
See Also:
Document.getPessimisticLocks()

refreshPessimisticLocks

public void refreshPessimisticLocks()
Description copied from interface: Document
This method updates the list of PessimisticLock objects on the document if changes could have been made

Specified by:
refreshPessimisticLocks in interface Document
See Also:
Document.refreshPessimisticLocks()

setPessimisticLocks

public void setPessimisticLocks(List<PessimisticLock> pessimisticLocks)
Parameters:
pessimisticLocks - the PessimisticLock objects to set

addPessimisticLock

public void addPessimisticLock(PessimisticLock lock)
Description copied from interface: Document
This method adds a new PessimisticLock to the document NOTE: LOCKS ADDED VIA THIS METHOD WILL NOT BE SAVED WITH THE DOCUMENT

Specified by:
addPessimisticLock in interface Document
Parameters:
lock - - the lock to add to the document
See Also:
Document.addPessimisticLock(org.kuali.rice.krad.document.authorization.PessimisticLock)

getLockClearingMethodNames

public List<String> getLockClearingMethodNames()
Description copied from interface: Document
This is a method that is used by Kuali Pessimistic Locking to get the names (method to call values) of the KNS KualiDocumentActionBase methods that should release locks

Specified by:
getLockClearingMethodNames in interface Document
Returns:
the list of method names of an action that should clear locks for the current user
See Also:
Document.getLockClearingMethodNames()

getLockClearningMethodNames

@Deprecated
public List<String> getLockClearningMethodNames()
Deprecated. 

Description copied from interface: Document
Renamed:

Specified by:
getLockClearningMethodNames in interface Document
Returns:
the list of method names of an action that should clear locks for the current user
See Also:
Document.getLockClearingMethodNames()

useCustomLockDescriptors

public boolean useCustomLockDescriptors()
This default implementation simply returns false to indicate that custom lock descriptors are not supported by DocumentBase. If custom lock descriptors are needed, the appropriate subclasses should override this method.

Specified by:
useCustomLockDescriptors in interface Document
Returns:
True if the document can generate custom lock descriptors, false otherwise.
See Also:
Document.useCustomLockDescriptors()

getCustomLockDescriptor

public String getCustomLockDescriptor(Person user)
This default implementation just throws a PessimisticLockingException. Subclasses of DocumentBase that need support for custom lock descriptors should override this method.

Specified by:
getCustomLockDescriptor in interface Document
Parameters:
user - The user trying to establish the lock.
Returns:
A String representing the lock descriptor.
See Also:
Document.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)

getAttachmentService

protected AttachmentService getAttachmentService()

getNoteService

protected NoteService getNoteService()

refreshReferenceObject

@Deprecated
public void refreshReferenceObject(String referenceObjectName)
Deprecated. This is a KNS/OJB-related method. It should not be used on KRAD/JPA-based documents.

Overrides this OJB method to accept the no-longer-bound documentHeader reference and perform the refresh via services instead of via OJB. For any other property, it works as before.

Specified by:
refreshReferenceObject in interface PersistableBusinessObject
Overrides:
refreshReferenceObject in class PersistableBusinessObjectBase
See Also:
PersistableBusinessObjectBase.refreshReferenceObject(java.lang.String)


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.