org.kuali.kfs.module.endow.document.validation.impl
Class EndowmentTransactionalDocumentBaseRule

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.rice.kns.rules.TransactionalDocumentRuleBase
          extended by org.kuali.kfs.module.endow.document.validation.impl.EndowmentTransactionalDocumentBaseRule
All Implemented Interfaces:
org.kuali.rice.kns.rule.AddAdHocRoutePersonRule, org.kuali.rice.kns.rule.AddAdHocRouteWorkgroupRule, org.kuali.rice.kns.rule.AddNoteRule, org.kuali.rice.kns.rule.ApproveDocumentRule, org.kuali.rice.kns.rule.BusinessRule, org.kuali.rice.kns.rule.RouteDocumentRule, org.kuali.rice.kns.rule.SaveDocumentRule, org.kuali.rice.kns.rule.SendAdHocRequestsRule
Direct Known Subclasses:
EndowmentTransactionLinesDocumentBaseRules

public class EndowmentTransactionalDocumentBaseRule
extends org.kuali.rice.kns.rules.TransactionalDocumentRuleBase


Constructor Summary
EndowmentTransactionalDocumentBaseRule()
           
 
Method Summary
protected  boolean errorAlreadyExists(String propertyName, String errorConstant)
          Convenience method to determine whether the field already has the message indicated.
protected  EndowmentTransactionSecurity getEndowmentTransactionSecurity(EndowmentTransactionalDocument document, boolean isSource)
          This method returns the Security line associated with a Transaction.
protected  String getEndowmentTransactionSecurityPrefix(EndowmentTransactionalDocument document, boolean isSource)
          This method obtains the Prefix for displaying errors on the UI for Source & Target lines.
protected  boolean isRegistrationCodeActive(EndowmentSecurityDetailsDocument document, boolean isSource)
          This method checks if the Registration Code is Active.
protected  boolean isRegistrationCodeEmpty(EndowmentTransactionalDocument document, boolean isSource)
          This method validates the Registration code.
protected  boolean isSecurityActive(EndowmentSecurityDetailsDocument document, boolean isSource)
          This method checks if the Security is Active.
protected  boolean isSecurityCodeEmpty(EndowmentTransactionalDocument document, boolean isSource)
          This method validate the Security code.
protected  boolean isSubTypeEmpty(EndowmentTransactionalDocument document)
          This method validates the Sub Type Code.
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
           
protected  void putDocumentError(String propertyName, String errorConstant, String parameter)
          This method is a convenience method to add a property-specific document error to the global errors list.
protected  void putDocumentError(String propertyName, String errorConstant, String[] parameters)
          This method is a convenience method to add a property-specific document error to the global errors list.
protected  void putFieldError(String propertyName, String errorConstant)
          This method is a convenience method to add a property-specific error to the global errors list.
protected  void putFieldError(String propertyName, String errorConstant, String parameter)
          This method is a convenience method to add a property-specific error to the global errors list.
protected  void putFieldError(String propertyName, String errorConstant, String[] parameters)
          This method is a convenience method to add a property-specific error to the global errors list.
protected  void putGlobalError(String errorConstant)
          This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field, but applicable to the whole document).
protected  void putGlobalError(String errorConstant, String parameter)
          This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field, but applicable to the whole document).
protected  void putGlobalError(String errorConstant, String[] parameters)
          This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field, but applicable to the whole document).
protected  void putGlobalsError(String propertyName, String errorConstant)
          This method specifically doesn't put any prefixes before the error so that the developer can do things specific to the globals errors (like newDelegateChangeDocument errors)
protected  void putGlobalsError(String propertyName, String errorConstant, String parameter)
          This method specifically doesn't put any prefixes before the error so that the developer can do things specific to the globals errors (like newDelegateChangeDocument errors)
protected  boolean validateRegistrationCode(EndowmentSecurityDetailsDocument document, boolean isSource)
          This method validates the Registration code by trying to create a RegistrationCode object from the code.
protected  boolean validateSecurityClassCodeTypeNotLiability(EndowmentSecurityDetailsDocument document, boolean isSource)
          Validates that the security class code type is not Liability.
protected  boolean validateSecurityClassTypeCode(EndowmentSecurityDetailsDocument document, boolean isSource, String classCodeType)
          This method validates the Security Class Type Code.
protected  boolean validateSecurityCode(EndowmentSecurityDetailsDocument document, boolean isSource)
          This method validates the Security code by trying to create a Security object from the code.
 
Methods inherited from class org.kuali.rice.kns.rules.DocumentRuleBase
getDataDictionaryService, getDictionaryValidationService, getDocumentHelperService, getIdentityManagementService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getPersonService, getWorkflowInfoService, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processApproveDocument, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processRouteDocument, processSaveDocument, processSendAdHocRequests, setMaxDictionaryValidationDepth, validateSensitiveDataValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndowmentTransactionalDocumentBaseRule

public EndowmentTransactionalDocumentBaseRule()
Method Detail

putGlobalError

protected void putGlobalError(String errorConstant)
This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field, but applicable to the whole document).

Parameters:
errorConstant - - Error Constant that can be mapped to a resource for the actual text message.

putGlobalError

protected void putGlobalError(String errorConstant,
                              String parameter)
This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field, but applicable to the whole document).

Parameters:
errorConstant - - Error Constant that can be mapped to a resource for the actual text message.
parameter - - Replacement value for part of the error message.

putGlobalError

protected void putGlobalError(String errorConstant,
                              String[] parameters)
This method is a convenience method to easily add a Document level error (ie, one not tied to a specific field, but applicable to the whole document).

Parameters:
errorConstant - - Error Constant that can be mapped to a resource for the actual text message.
parameters - - Array of replacement values for part of the error message.

putFieldError

protected void putFieldError(String propertyName,
                             String errorConstant)
This method is a convenience method to add a property-specific error to the global errors list. This method makes sure that the correct prefix is added to the property name so that it will display correctly on maintenance documents.

Parameters:
propertyName - - Property name of the element that is associated with the error. Used to mark the field as errored in the UI.
errorConstant - - Error Constant that can be mapped to a resource for the actual text message.

putFieldError

protected void putFieldError(String propertyName,
                             String errorConstant,
                             String parameter)
This method is a convenience method to add a property-specific error to the global errors list. This method makes sure that the correct prefix is added to the property name so that it will display correctly on maintenance documents.

Parameters:
propertyName - - Property name of the element that is associated with the error. Used to mark the field as errored in the UI.
errorConstant - - Error Constant that can be mapped to a resource for the actual text message.
parameter - - Single parameter value that can be used in the message so that you can display specific values to the user.

putFieldError

protected void putFieldError(String propertyName,
                             String errorConstant,
                             String[] parameters)
This method is a convenience method to add a property-specific error to the global errors list. This method makes sure that the correct prefix is added to the property name so that it will display correctly on maintenance documents.

Parameters:
propertyName - - Property name of the element that is associated with the error. Used to mark the field as errored in the UI.
errorConstant - - Error Constant that can be mapped to a resource for the actual text message.
parameters - - Array of strings holding values that can be used in the message so that you can display specific values to the user.

putDocumentError

protected void putDocumentError(String propertyName,
                                String errorConstant,
                                String parameter)
This method is a convenience method to add a property-specific document error to the global errors list. This method makes sure that the correct prefix is added to the property name so that it will display correctly on maintenance documents.

Parameters:
propertyName - - Property name of the element that is associated with the error. Used to mark the field as errored in the UI.
errorConstant - - Error Constant that can be mapped to a resource for the actual text message.
parameter - - Single parameter value that can be used in the message so that you can display specific values to the user.

putDocumentError

protected void putDocumentError(String propertyName,
                                String errorConstant,
                                String[] parameters)
This method is a convenience method to add a property-specific document error to the global errors list. This method makes sure that the correct prefix is added to the property name so that it will display correctly on maintenance documents.

Parameters:
propertyName - - Property name of the element that is associated with the error. Used to mark the field as errored in the UI.
errorConstant - - Error Constant that can be mapped to a resource for the actual text message.
parameters - - Array of String parameters that can be used in the message so that you can display specific values to the user.

errorAlreadyExists

protected boolean errorAlreadyExists(String propertyName,
                                     String errorConstant)
Convenience method to determine whether the field already has the message indicated. This is useful if you want to suppress duplicate error messages on the same field.

Parameters:
propertyName - - propertyName you want to test on
errorConstant - - errorConstant you want to test
Returns:
returns True if the propertyName indicated already has the errorConstant indicated, false otherwise

putGlobalsError

protected void putGlobalsError(String propertyName,
                               String errorConstant)
This method specifically doesn't put any prefixes before the error so that the developer can do things specific to the globals errors (like newDelegateChangeDocument errors)

Parameters:
propertyName -
errorConstant -

putGlobalsError

protected void putGlobalsError(String propertyName,
                               String errorConstant,
                               String parameter)
This method specifically doesn't put any prefixes before the error so that the developer can do things specific to the globals errors (like newDelegateChangeDocument errors)

Parameters:
propertyName -
errorConstant -
parameter -

getEndowmentTransactionSecurityPrefix

protected String getEndowmentTransactionSecurityPrefix(EndowmentTransactionalDocument document,
                                                       boolean isSource)
This method obtains the Prefix for displaying errors on the UI for Source & Target lines.

Parameters:
document -
isSource -
Returns:

getEndowmentTransactionSecurity

protected EndowmentTransactionSecurity getEndowmentTransactionSecurity(EndowmentTransactionalDocument document,
                                                                       boolean isSource)
This method returns the Security line associated with a Transaction.

Parameters:
document -
isSource -
Returns:

isSecurityCodeEmpty

protected boolean isSecurityCodeEmpty(EndowmentTransactionalDocument document,
                                      boolean isSource)
This method validate the Security code.

Parameters:
tranSecurity -
Returns:

isRegistrationCodeEmpty

protected boolean isRegistrationCodeEmpty(EndowmentTransactionalDocument document,
                                          boolean isSource)
This method validates the Registration code.

Parameters:
tranSecurity -
Returns:

validateSecurityCode

protected boolean validateSecurityCode(EndowmentSecurityDetailsDocument document,
                                       boolean isSource)
This method validates the Security code by trying to create a Security object from the code.

Parameters:
document -
isSource -
Returns:

validateRegistrationCode

protected boolean validateRegistrationCode(EndowmentSecurityDetailsDocument document,
                                           boolean isSource)
This method validates the Registration code by trying to create a RegistrationCode object from the code.

Parameters:
document -
isSource -
Returns:

isSecurityActive

protected boolean isSecurityActive(EndowmentSecurityDetailsDocument document,
                                   boolean isSource)
This method checks if the Security is Active.

Parameters:
document -
isSource -
Returns:

validateSecurityClassCodeTypeNotLiability

protected boolean validateSecurityClassCodeTypeNotLiability(EndowmentSecurityDetailsDocument document,
                                                            boolean isSource)
Validates that the security class code type is not Liability.

Parameters:
endowmentTransactionSecurity -
Returns:
true is valid, false otherwise

isRegistrationCodeActive

protected boolean isRegistrationCodeActive(EndowmentSecurityDetailsDocument document,
                                           boolean isSource)
This method checks if the Registration Code is Active.

Parameters:
document -
isSource -
Returns:

validateSecurityClassTypeCode

protected boolean validateSecurityClassTypeCode(EndowmentSecurityDetailsDocument document,
                                                boolean isSource,
                                                String classCodeType)
This method validates the Security Class Type Code.

Parameters:
document -
isSource -
classCodeType -
Returns:

processCustomRouteDocumentBusinessRules

protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
Overrides:
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.rules.DocumentRuleBase
See Also:
DocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document)

isSubTypeEmpty

protected boolean isSubTypeEmpty(EndowmentTransactionalDocument document)
This method validates the Sub Type Code.

Parameters:
document -
Returns:


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.