Class DocumentBase

java.lang.Object
org.kuali.rice.krad.bo.DataObjectBase
org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter
org.kuali.rice.krad.document.DocumentBase
All Implemented Interfaces:
Serializable, Cloneable, org.eclipse.persistence.descriptors.changetracking.ChangeTracker, org.eclipse.persistence.internal.descriptors.PersistenceEntity, org.eclipse.persistence.internal.descriptors.PersistenceObject, org.eclipse.persistence.internal.weaving.PersistenceWeaved, org.eclipse.persistence.internal.weaving.PersistenceWeavedChangeTracking, org.eclipse.persistence.internal.weaving.PersistenceWeavedFetchGroups, org.eclipse.persistence.internal.weaving.PersistenceWeavedRest, org.eclipse.persistence.queries.FetchGroupTracker, org.kuali.rice.core.api.mo.common.GloballyUnique, org.kuali.rice.core.api.mo.common.Versioned, Document
Direct Known Subclasses:
MaintenanceDocumentBase, TransactionalDocumentBase

@MappedSuperclass public abstract class DocumentBase extends org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter implements Document
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected List<org.kuali.rice.krad.bo.AdHocRoutePerson>
     
    protected List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup>
     
    protected org.kuali.rice.krad.bo.DocumentHeader
     
    protected String
     
    protected List<org.kuali.rice.krad.bo.Note>
     
    protected List<org.kuali.rice.krad.document.authorization.PessimisticLock>
     

    Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter

    extension, newCollectionRecord

    Fields inherited from class org.kuali.rice.krad.bo.DataObjectBase

    _persistence_cacheKey, _persistence_fetchGroup, _persistence_href, _persistence_links, _persistence_listener, _persistence_primaryKey, _persistence_relationshipInfo, _persistence_session, _persistence_shouldRefreshFetchGroup, objectId, versionNumber
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Adds a note to the document indicating it was created by a copy or error correction.
    void
    addNote(org.kuali.rice.krad.bo.Note note)
    Adds the given Note to the document's list of Notes.
    void
    addPessimisticLock(org.kuali.rice.krad.document.authorization.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(org.kuali.rice.kew.api.action.ActionType performed, org.kuali.rice.kew.framework.postprocessor.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
    The the default implementation for beforeWorkflowEngineProcess does nothing, but is meant to provide a hook for documents to implement for other needs.
     
    void
    doActionTaken(org.kuali.rice.kew.framework.postprocessor.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(org.kuali.rice.kew.framework.postprocessor.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(org.kuali.rice.kew.framework.postprocessor.DocumentRouteStatusChange statusChangeEvent)
    Handle the doRouteStatusChange event from the post processor
    Generate any necessary events required during the save event generation
    List<org.kuali.rice.kew.api.action.ActionRequest>
    This method gets a list of the ActionRequest objects associated with this document.
    Returns null by default.
    List<org.kuali.rice.krad.bo.AdHocRoutePerson>
    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<org.kuali.rice.krad.bo.AdHocRouteWorkgroup>
    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
    This method returns whether or not this document can be copied.
    protected org.kuali.rice.krad.service.AttachmentService
     
    Returns the POJO property name of "this" document in the object returned by wrapDocumentWithMetadataForXmlSerialization()
    getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person user)
    This default implementation just throws a PessimisticLockingException.
    org.kuali.rice.krad.bo.DocumentHeader
    This retrieves the standard DocumentHeader object, which contains standard meta-data about a document.
    All documents have a document header id.
    If workflowProperties have been defined within the data dictionary for this document, then it returns an instance of BusinessObjectPropertySerializibilityEvaluator initialized with the properties.
    Retrieves the title of the document
    Deprecated.
    Deprecated.
    protected List<String>
    Return the list of actions a user could take on a document which should not result in the recalculation of the PessimisticLocks.
    org.kuali.rice.krad.bo.Note
    getNote(int index)
    Retrieves the note at the given index.
    List<org.kuali.rice.krad.bo.Note>
    Returns a mutable list of all notes on the document.
    protected org.kuali.rice.krad.service.NoteService
     
    org.kuali.rice.core.api.mo.common.GloballyUnique
    Returns the business object with which notes related to this document should be associated.
    org.kuali.rice.krad.util.NoteType
    Returns the NoteType to use for notes associated with this document.
    List<org.kuali.rice.krad.document.authorization.PessimisticLock>
    This method gets a list of the PessimisticLock objects associated with this document
    This method gets the annotation to be attached to a super user action.
    The default implementation returns no additional ids for the workflow engine to lock prior to processing.
    This method is used to get the xml that should be used in a Route Report.
    protected void
    This method logs errors.
    void
    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
    Loads the KRAD document header via the document header service.
    void
    Do any work on the document after the save.
    protected void
    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
    This method provides a hook that will be called before the document is saved.
    void
    Override this method with implementation specific prepareForSave logic
    protected void
    Save the KRAD document header via the document header service.
    void
    This method provides a hook that will be called after a document is retrieved, but before it is returned from the DocumentService.
    void
    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.
    boolean
    removeNote(org.kuali.rice.krad.bo.Note note)
    Removes the given note from the document's list of notes.
    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<org.kuali.rice.krad.bo.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<org.kuali.rice.krad.bo.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(org.kuali.rice.krad.bo.DocumentHeader documentHeader)
    Sets the associated DocumentHeader for this document.
    void
    setDocumentNumber(String documentNumber)
    setter for document header id
    protected void
    Gets a new document header for this documents type and sets in the document instance.
    void
    setNotes(List<org.kuali.rice.krad.bo.Note> notes)
    Sets the document's list of notes to the given list.
    void
    setPessimisticLocks(List<org.kuali.rice.krad.document.authorization.PessimisticLock> pessimisticLocks)
     
    void
    setSuperUserAnnotation(String superUserAnnotation)
    This method sets the annotation to be attached to a super user action.
    void
     
    boolean
    This default implementation simply returns false to indicate that custom lock descriptors are not supported by DocumentBase.
    void
    Sends document off to the rules engine to verify business rules.
    Wraps a document in an instance of KualiDocumentXmlMaterializer, that provides additional metadata for serialization

    Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter

    _persistence_get, _persistence_new, _persistence_post_clone, _persistence_set, buildListOfDeletionAwareLists, getExtension, getLegacyDataAdapter, isNewCollectionRecord, linkEditableUserFields, refresh, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord

    Methods inherited from class org.kuali.rice.krad.bo.DataObjectBase

    _persistence_checkFetched, _persistence_checkFetchedForSet, _persistence_get_objectId, _persistence_get_versionNumber, _persistence_getCacheKey, _persistence_getFetchGroup, _persistence_getHref, _persistence_getId, _persistence_getLinks, _persistence_getPropertyChangeListener, _persistence_getRelationships, _persistence_getSession, _persistence_isAttributeFetched, _persistence_propertyChange, _persistence_resetFetchGroup, _persistence_set_objectId, _persistence_set_versionNumber, _persistence_setCacheKey, _persistence_setFetchGroup, _persistence_setHref, _persistence_setId, _persistence_setLinks, _persistence_setPropertyChangeListener, _persistence_setRelationships, _persistence_setSession, _persistence_setShouldRefreshFetchGroup, _persistence_shallow_clone, _persistence_shouldRefreshFetchGroup, generateAndSetObjectIdIfNeeded, getExtensionObject, getObjectId, getVersionNumber, preUpdate, setExtensionObject, setObjectId, setVersionNumber, 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.core.api.mo.common.GloballyUnique

    getObjectId

    Methods inherited from interface org.eclipse.persistence.internal.descriptors.PersistenceObject

    _persistence_shallow_clone
  • Field Details

    • documentNumber

      protected String documentNumber
    • documentHeader

      protected org.kuali.rice.krad.bo.DocumentHeader documentHeader
    • pessimisticLocks

      protected List<org.kuali.rice.krad.document.authorization.PessimisticLock> pessimisticLocks
    • adHocRoutePersons

      protected List<org.kuali.rice.krad.bo.AdHocRoutePerson> adHocRoutePersons
    • adHocRouteWorkgroups

      protected List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> adHocRouteWorkgroups
    • notes

      protected List<org.kuali.rice.krad.bo.Note> notes
  • Constructor Details

    • DocumentBase

      public DocumentBase()
  • Method Details

    • 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.
    • 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
    • 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
    • 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
    • doRouteLevelChange

      public void doRouteLevelChange(org.kuali.rice.kew.framework.postprocessor.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
    • doActionTaken

      public void doActionTaken(org.kuali.rice.kew.framework.postprocessor.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
    • afterActionTaken

      public void afterActionTaken(org.kuali.rice.kew.api.action.ActionType performed, org.kuali.rice.kew.framework.postprocessor.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
    • 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:
    • 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
    • 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
    • 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
    • toCopy

      public void toCopy() throws org.kuali.rice.kew.api.exception.WorkflowException, IllegalStateException
      Throws:
      org.kuali.rice.kew.api.exception.WorkflowException
      IllegalStateException
      See Also:
    • setNewDocumentHeader

      protected void setNewDocumentHeader() throws org.kuali.rice.kew.api.exception.WorkflowException
      Gets a new document header for this documents type and sets in the document instance.
      Throws:
      org.kuali.rice.kew.api.exception.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
    • 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
    • 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
    • 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:
    • 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:
    • 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:
    • getDocumentHeader

      public org.kuali.rice.krad.bo.DocumentHeader getDocumentHeader()
      Description copied from interface: Document
      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(org.kuali.rice.krad.bo.DocumentHeader documentHeader)
      Description copied from interface: Document
      Sets the associated DocumentHeader for this document.
      Specified by:
      setDocumentHeader in interface Document
      Parameters:
      documentHeader -
    • getDocumentNumber

      public String getDocumentNumber()
      Description copied from interface: Document
      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)
      Description copied from interface: Document
      setter for document header id
      Specified by:
      setDocumentNumber in interface Document
      Parameters:
      documentNumber -
    • getAdHocRoutePersons

      public List<org.kuali.rice.krad.bo.AdHocRoutePerson> getAdHocRoutePersons()
      Description copied from interface: Document
      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<org.kuali.rice.krad.bo.AdHocRoutePerson> adHocRoutePersons)
      Description copied from interface: Document
      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
      Parameters:
      adHocRoutePersons -
    • getAdHocRouteWorkgroups

      public List<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> getAdHocRouteWorkgroups()
      Description copied from interface: Document
      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<org.kuali.rice.krad.bo.AdHocRouteWorkgroup> adHocRouteWorkgroups)
      Description copied from interface: Document
      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
      Parameters:
      adHocRouteWorkgroups -
    • getAdHocRouteNodeName

      public String getAdHocRouteNodeName()
      Returns null by default. Subclasses can override this to provide the node name to which any adhoc requests should be attached.
      Specified by:
      getAdHocRouteNodeName in interface Document
      Returns:
      the name of the node to attach adhoc requests toage
    • postProcessSave

      public void postProcessSave(DocumentEvent 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(DocumentEvent event)
      Override this method with implementation specific prepareForSave logic
      Specified by:
      prepareForSave in interface Document
      Parameters:
      event - - indicates which document event was requested
    • validateBusinessRules

      public void validateBusinessRules(DocumentEvent 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<DocumentEvent> generateSaveEvents()
      Description copied from interface: Document
      Generate any necessary events required during the save event generation
      Specified by:
      generateSaveEvents in interface Document
      Returns:
      a list of document events that were triggered by the save event
    • doRouteStatusChange

      public void doRouteStatusChange(org.kuali.rice.kew.framework.postprocessor.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
    • getNoteTarget

      public org.kuali.rice.core.api.mo.common.GloballyUnique 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 org.kuali.rice.krad.util.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
    • addNote

      public void addNote(org.kuali.rice.krad.bo.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
    • removeNote

      public boolean removeNote(org.kuali.rice.krad.bo.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
    • getNote

      public org.kuali.rice.krad.bo.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
    • getNotes

      public List<org.kuali.rice.krad.bo.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
    • setNotes

      public void setNotes(List<org.kuali.rice.krad.bo.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
    • getActionRequests

      public List<org.kuali.rice.kew.api.action.ActionRequest> getActionRequests()
      Description copied from interface: Document
      This method gets a list of the ActionRequest objects associated with this document.
      Specified by:
      getActionRequests in interface Document
      Returns:
      list of action requests
    • getSuperUserAnnotation

      public String getSuperUserAnnotation()
      Description copied from interface: Document
      This method gets the annotation to be attached to a super user action.
      Specified by:
      getSuperUserAnnotation in interface Document
      Returns:
      the super user annotation
    • setSuperUserAnnotation

      public void setSuperUserAnnotation(String superUserAnnotation)
      Description copied from interface: Document
      This method sets the annotation to be attached to a super user action.
      Specified by:
      setSuperUserAnnotation in interface Document
      Parameters:
      superUserAnnotation - the super user annotation
    • postLoad

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

      protected void prePersist()
      Save the KRAD document header via the document header service.
      Overrides:
      prePersist in class org.kuali.rice.krad.bo.DataObjectBase
    • 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
    • getPessimisticLocks

      public List<org.kuali.rice.krad.document.authorization.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
    • 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
    • setPessimisticLocks

      public void setPessimisticLocks(List<org.kuali.rice.krad.document.authorization.PessimisticLock> pessimisticLocks)
    • addPessimisticLock

      public void addPessimisticLock(org.kuali.rice.krad.document.authorization.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
    • getLockClearingMethodNames

      @Deprecated public List<String> getLockClearingMethodNames()
      Deprecated.
      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
    • 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:
    • 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:
    • getCustomLockDescriptor

      public String getCustomLockDescriptor(org.kuali.rice.kim.api.identity.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:
    • getAttachmentService

      protected org.kuali.rice.krad.service.AttachmentService getAttachmentService()
    • getNoteService

      protected org.kuali.rice.krad.service.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.
      Overrides:
      refreshReferenceObject in class org.kuali.rice.krad.bo.PersistableBusinessObjectBaseAdapter