|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.rules.DocumentRuleBase
public abstract class DocumentRuleBase
This class contains all of the business rules that are common to all documents.
Field Summary | |
---|---|
private static DataDictionaryService |
dataDictionaryService
|
private static DictionaryValidationService |
dictionaryValidationService
|
private static DocumentHelperService |
documentHelperService
|
private static GroupService |
groupService
|
private static ConfigurationService |
kualiConfigurationService
|
private static org.apache.log4j.Logger |
LOG
|
private int |
maxDictionaryValidationDepth
Just some arbitrarily high max depth that's unlikely to occur in real life to prevent recursion problems |
private static PermissionService |
permissionService
|
private static PersonService |
personService
|
private static KualiWorkflowInfo |
workflowInfoService
|
Constructor Summary | |
---|---|
DocumentRuleBase()
|
Method Summary | |
---|---|
protected DataDictionaryService |
getDataDictionaryService()
|
protected DictionaryValidationService |
getDictionaryValidationService()
|
protected DocumentHelperService |
getDocumentHelperService()
|
static GroupService |
getGroupService()
|
protected ConfigurationService |
getKualiConfigurationService()
|
int |
getMaxDictionaryValidationDepth()
Gets the maximum number of levels the data-dictionary based validation will recurse for the document |
static PermissionService |
getPermissionService()
|
protected PersonService |
getPersonService()
|
protected KualiWorkflowInfo |
getWorkflowInfoService()
|
boolean |
isAddHocRoutePersonValid(Document document,
AdHocRoutePerson person)
Verifies that the adHocRoutePerson's fields are valid - it does required and format checks. |
boolean |
isAddHocRouteWorkgroupValid(AdHocRouteWorkgroup workgroup)
Verifies that the adHocRouteWorkgroup's fields are valid - it does required and format checks. |
protected boolean |
isAdHocRouteRecipientsValid(Document document)
Checks the adhoc route recipient list to ensure there are recipients or else throws an error that at least one recipient is required. |
boolean |
isDocumentAttributesValid(Document document,
boolean validateRequired)
Validates the document attributes against the data dictionary. |
boolean |
isDocumentOverviewValid(Document document)
Verifies that the document's overview fields are valid - it does required and format checks. |
boolean |
isNoteValid(Note note)
Verifies that the note's fields are valid - it does required and format checks. |
boolean |
processAddAdHocRoutePerson(Document document,
AdHocRoutePerson adHocRoutePerson)
This method is responsible for housing business rules that need to be checked before a document adHocRoutePerson is added to a document. |
boolean |
processAddAdHocRouteWorkgroup(Document document,
AdHocRouteWorkgroup adHocRouteWorkgroup)
This method is responsible for housing business rules that need to be checked before a document adHocRouteWorkgroup is added to a document. |
boolean |
processAddNote(Document document,
Note note)
Runs all business rules needed prior to adding a document note. |
boolean |
processApproveDocument(ApproveDocumentEvent approveEvent)
Runs all business rules needed prior to approving. |
protected boolean |
processCustomAddAdHocRoutePersonBusinessRules(Document document,
AdHocRoutePerson person)
This method should be overridden by children rule classes as a hook to implement document specific business rule checks for the "add ad hoc route person" event. |
protected boolean |
processCustomAddAdHocRouteWorkgroupBusinessRules(Document document,
AdHocRouteWorkgroup workgroup)
This method should be overridden by children rule classes as a hook to implement document specific business rule checks for the "add ad hoc route workgroup" event. |
protected boolean |
processCustomAddNoteBusinessRules(Document document,
Note note)
This method should be overridden by children rule classes as a hook to implement document specific business rule checks for the "add document note" event. |
protected boolean |
processCustomApproveDocumentBusinessRules(ApproveDocumentEvent approveEvent)
This method should be overridden by children rule classes as a hook to implement document specific business rule checks for the "approve document" event. |
protected boolean |
processCustomRouteDocumentBusinessRules(Document document)
This method should be overridden by children rule classes as a hook to implement document specific business rule checks for the "route document" event. |
protected boolean |
processCustomSaveDocumentBusinessRules(Document document)
This method should be overridden by children rule classes as a hook to implement document specific business rule checks for the "save document" event. |
protected boolean |
processCustomSendAdHocRequests(Document document)
|
boolean |
processRouteDocument(Document document)
Runs all business rules needed prior to routing. |
boolean |
processSaveDocument(Document document)
Runs all business rules needed prior to saving. |
boolean |
processSendAdHocRequests(Document document)
|
void |
setMaxDictionaryValidationDepth(int maxDictionaryValidationDepth)
Gets the maximum number of levels the data-dictionary based validation will recurse for the document |
protected boolean |
validateSensitiveDataValue(String fieldName,
String fieldValue,
String fieldLabel)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.log4j.Logger LOG
private static PersonService personService
private static DictionaryValidationService dictionaryValidationService
private static KualiWorkflowInfo workflowInfoService
private static ConfigurationService kualiConfigurationService
private static DocumentHelperService documentHelperService
private static GroupService groupService
private static PermissionService permissionService
private static DataDictionaryService dataDictionaryService
private int maxDictionaryValidationDepth
Constructor Detail |
---|
public DocumentRuleBase()
Method Detail |
---|
protected PersonService getPersonService()
public static GroupService getGroupService()
public static PermissionService getPermissionService()
protected DocumentHelperService getDocumentHelperService()
protected DictionaryValidationService getDictionaryValidationService()
protected KualiWorkflowInfo getWorkflowInfoService()
protected ConfigurationService getKualiConfigurationService()
public boolean isDocumentOverviewValid(Document document)
document
-
public boolean isDocumentAttributesValid(Document document, boolean validateRequired)
document
- validateRequired
- if true, then an error will be retruned if a DD required field is empty. if false, no required
checking is done
public boolean processSaveDocument(Document document)
processSaveDocument
in interface SaveDocumentRule
SaveDocumentRule.processSaveDocument(org.kuali.rice.krad.document.Document)
protected boolean processCustomSaveDocumentBusinessRules(Document document)
document
-
public boolean processRouteDocument(Document document)
processRouteDocument
in interface RouteDocumentRule
RouteDocumentRule.processRouteDocument(org.kuali.rice.krad.document.Document)
protected boolean processCustomRouteDocumentBusinessRules(Document document)
document
-
public boolean processApproveDocument(ApproveDocumentEvent approveEvent)
processApproveDocument
in interface ApproveDocumentRule
ApproveDocumentRule.processApproveDocument(org.kuali.rice.krad.rule.event.ApproveDocumentEvent)
protected boolean processCustomApproveDocumentBusinessRules(ApproveDocumentEvent approveEvent)
approveEvent
-
public boolean processAddNote(Document document, Note note)
processAddNote
in interface AddNoteRule
org.kuali.rice.krad.rule.AddDocumentNoteRule#processAddDocumentNote(org.kuali.rice.krad.document.Document,
org.kuali.rice.krad.document.DocumentNote)
public boolean isNoteValid(Note note)
note
-
protected boolean processCustomAddNoteBusinessRules(Document document, Note note)
document
- note
-
public boolean processAddAdHocRoutePerson(Document document, AdHocRoutePerson adHocRoutePerson)
AddAdHocRoutePersonRule
processAddAdHocRoutePerson
in interface AddAdHocRoutePersonRule
AddAdHocRoutePersonRule.processAddAdHocRoutePerson(org.kuali.rice.krad.document.Document,
org.kuali.rice.krad.bo.AdHocRoutePerson)
public boolean processSendAdHocRequests(Document document)
processSendAdHocRequests
in interface SendAdHocRequestsRule
SendAdHocRequestsRule.processSendAdHocRequests(org.kuali.rice.krad.document.Document)
protected boolean processCustomSendAdHocRequests(Document document)
protected boolean isAdHocRouteRecipientsValid(Document document)
document
-
public boolean isAddHocRoutePersonValid(Document document, AdHocRoutePerson person)
person
-
protected boolean processCustomAddAdHocRoutePersonBusinessRules(Document document, AdHocRoutePerson person)
document
- person
-
public boolean processAddAdHocRouteWorkgroup(Document document, AdHocRouteWorkgroup adHocRouteWorkgroup)
AddAdHocRouteWorkgroupRule
processAddAdHocRouteWorkgroup
in interface AddAdHocRouteWorkgroupRule
AddAdHocRouteWorkgroupRule.processAddAdHocRouteWorkgroup(org.kuali.rice.krad.document.Document,
org.kuali.rice.krad.bo.AdHocRouteWorkgroup)
public boolean isAddHocRouteWorkgroupValid(AdHocRouteWorkgroup workgroup)
workgroup
-
protected boolean processCustomAddAdHocRouteWorkgroupBusinessRules(Document document, AdHocRouteWorkgroup workgroup)
document
- workgroup
-
public int getMaxDictionaryValidationDepth()
public void setMaxDictionaryValidationDepth(int maxDictionaryValidationDepth)
protected boolean validateSensitiveDataValue(String fieldName, String fieldValue, String fieldLabel)
protected DataDictionaryService getDataDictionaryService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |