org.kuali.rice.krad.test.document
Class AccountRequestDocument2
java.lang.Object
org.kuali.rice.krad.bo.BusinessObjectBase
org.kuali.rice.krad.bo.PersistableBusinessObjectBase
org.kuali.rice.krad.document.DocumentBase
org.kuali.rice.krad.document.TransactionalDocumentBase
org.kuali.rice.krad.test.document.AccountRequestDocument2
- All Implemented Interfaces:
- Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject, Document, SessionDocument, TransactionalDocument
public class AccountRequestDocument2
- extends TransactionalDocumentBase
- implements SessionDocument
This is a test copy of AccountRequestDocument that has been modified to allow for custom lock descriptors.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
- Serialized Form
Methods inherited from class org.kuali.rice.krad.document.DocumentBase |
addCopyErrorDocumentNote, addNote, addPessimisticLock, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, createPropertySerializabilityEvaluator, doActionTaken, doRouteLevelChange, doRouteStatusChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getAttachmentService, getBasePathToDocumentDuringSerialization, getDocumentHeader, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNonLockingActionTakenCodes, getNote, getNotes, getNoteService, getNoteTarget, getNoteType, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, logErrors, populateDocumentForRouting, postProcessSave, prepareForSave, prepareForSave, processAfterRetrieve, refresh, refreshIfEmpty, refreshPessimisticLocks, refreshReferenceObject, removeNote, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setDocumentNumber, setNewDocumentHeader, setNotes, setPessimisticLocks, toCopy, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization |
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refreshNonUpdateableReferences, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber |
Methods inherited from interface org.kuali.rice.krad.document.Document |
addNote, addPessimisticLock, afterWorkflowEngineProcess, beforeWorkflowEngineProcess, doActionTaken, doRouteLevelChange, doRouteStatusChange, generateSaveEvents, getAdHocRoutePersons, getAdHocRouteWorkgroups, getBasePathToDocumentDuringSerialization, getDocumentHeader, getDocumentNumber, getDocumentPropertySerizabilityEvaluator, getDocumentTitle, getLockClearningMethodNames, getNote, getNotes, getNoteTarget, getNoteType, getPessimisticLocks, getWorkflowEngineDocumentIdsToLock, getXmlForRouteReport, populateDocumentForRouting, postProcessSave, prepareForSave, prepareForSave, processAfterRetrieve, refreshPessimisticLocks, removeNote, serializeDocumentToXml, setAdHocRoutePersons, setAdHocRouteWorkgroups, setDocumentHeader, setDocumentNumber, setNotes, validateBusinessRules, wrapDocumentWithMetadataForXmlSerialization |
ACCT_REQ_DOC_2_EDITABLE_FIELDS
public static final String ACCT_REQ_DOC_2_EDITABLE_FIELDS
- A test key to map to some value indicating what fields the user can edit on this doc. Note that such behavior is not enforced; it is simply
here for testing the PessimisticLockService's custom lock descriptor functionality.
- See Also:
- Constant Field Values
EDIT_ALL_BUT_REASONS
public static final String EDIT_ALL_BUT_REASONS
- A test value indicating that the user has permission to edit everything except "reason1" and "reason2". This is here only for testing the
generation of custom lock descriptors for PessimisticLockServiceTest; AccountRequestDocument2 does not actually enforce any such behavior.
- See Also:
- Constant Field Values
EDIT_REASONS_ONLY
public static final String EDIT_REASONS_ONLY
- A test value indicating that the user only has permission to edit "reason1" and "reason2". This is here only for testing the generation of
custom lock descriptors for PessimisticLockServiceTest; AccountRequestDocument2 does not actually enforce any such behavior.
- See Also:
- Constant Field Values
AccountRequestDocument2
public AccountRequestDocument2()
getReason2
public String getReason2()
setReason2
public void setReason2(String reason2)
getReason1
public String getReason1()
setReason1
public void setReason1(String reason1)
getRequester
public String getRequester()
setRequester
public void setRequester(String requester)
getAccounts
public List<Account> getAccounts()
setAccounts
public void setAccounts(List<Account> accounts)
getAccount
public Account getAccount(int index)
getRequestType
public String getRequestType()
setRequestType
public void setRequestType(String requestType)
setAccountTypeCode
public void setAccountTypeCode(String accountType)
getAccountTypeCode
public String getAccountTypeCode()
useCustomLockDescriptors
public boolean useCustomLockDescriptors()
- Since this class was made to test custom lock descriptors, this method will always return true.
- Specified by:
useCustomLockDescriptors
in interface Document
- Overrides:
useCustomLockDescriptors
in class DocumentBase
- See Also:
DocumentBase.useCustomLockDescriptors()
getCustomLockDescriptor
public String getCustomLockDescriptor(Person user)
- Generates a custom lock descriptor with a format of "[documentNumber]-[The user session's 'acctReqDoc2EditableFields' parameter value]".
Will throw a PessimisticLockingException if this parameter is not defined or if its value is neither "editAllButReasons" nor "editReasonsOnly".
- Specified by:
getCustomLockDescriptor
in interface Document
- Overrides:
getCustomLockDescriptor
in class DocumentBase
- See Also:
DocumentBase.getCustomLockDescriptor(org.kuali.rice.kim.api.identity.Person)
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.