ariba.ui.aribaweb.core
Class AWErrorManager

java.lang.Object
  extended by ariba.ui.aribaweb.util.AWBaseObject
      extended by ariba.ui.aribaweb.core.AWErrorManager
All Implemented Interfaces:
AWObject
Direct Known Subclasses:
AWErrorManager.AWNewErrorManager

public class AWErrorManager
extends AWBaseObject

Key Concepts: Repositories Error Keys Error Display Page Error Display Validation, Revalidation Frozen Repositories Navigation Handlers Validation Handlers Highlighted Errors Deferring Error Info Selected Error Autoscroll


Nested Class Summary
static class AWErrorManager.AWNewErrorManager
          This class is here to restrict access to the AWErrorManager so that the only interaction we do with it is to call setErrorMessageAndValue(...).
static class AWErrorManager.MultiErrorBucket
          This holds several errors.
 
Field Summary
static int ApplyValuesPhase
           
static java.lang.String EnvironmentErrorKey
           
static java.lang.String GeneralErrorKey
           
static java.lang.String InstanceKey
           
static int InvokePhase
           
static int OutOfPhase
           
static int RenderPhase
           
 
Fields inherited from class ariba.ui.aribaweb.util.AWBaseObject
AribaHashtableClass, AribaVectorClass, ClassClass, EmptyHashtable, EmptyMap, EmptyVector, False, IntegerClass, JavaHashtableClass, JavaMapClass, JavaVectorClass, LogHandling, NullObject, ObjectClass, StringClass, True, UndefinedObject, UndefinedString, UninitializedRealNumber
 
Constructor Summary
AWErrorManager(AWPage page)
           
 
Method Summary
 java.util.List<AWFullValidationHandler> _getRegisteredValidationHandlers()
           
 void _setupOffPageNavigationAtDst(AWErrorInfo curError, AWErrorHandler navHandler)
           
 boolean allErrorsAreWarnings()
           
 AWComponent alternateResponseForNavigationAction(AWComponent target, int action)
           
 boolean changesSavedSafely()
           
 boolean checkErrorsAndEnableDisplay()
           
 void clearErrorInAppend(java.lang.Object key)
          Clear a single error, during append.
 void clearHighLightedError()
           
 void disableErrorPanel()
           
 void enableErrorDisplay(boolean enable)
           
 void enableErrorDisplay(boolean enablePageErrorDisplay, boolean enablePageAutoScroll)
           
 void enablePageAutoScrolling()
           
 java.lang.Object errantValueForKey(java.lang.Object key)
           
 java.lang.String errorMessageForKey(java.lang.Object key)
           
 boolean errorPanelDisabled()
           
 java.util.List<AWErrorBucket> errorsForKeys(java.lang.Object[] keys)
           
 java.util.List errorsForValueSource(java.lang.Object valueSource)
           
 java.util.List errorsForValueSource(java.lang.Object valueSource, java.lang.String fieldPath)
           
 java.util.List<AWErrorBucket> errorsForValueSource(java.lang.Object valueSource, java.lang.String fieldPath, java.lang.String group)
           
 AWErrorInfo firstErrorForKeys(java.lang.Object[] keys, boolean isWarning)
           
 java.lang.String firstErrorMessageForKeys(java.lang.Object[] keys)
           
 java.lang.String firstWarningMessageForKeys(java.lang.Object[] keys)
           
 java.util.List<AWErrorInfo> getAllErrors()
           
 java.util.List<AWErrorInfo> getAllWarnings()
           
 AWComponent getDeferredNavigationDestination()
           
 boolean getEnablePageAutoScroll()
           
static java.lang.Object getErrorKeyForComponent(AWComponent comp)
           
static java.lang.Object[] getErrorKeyFromBindings(AWComponent comp)
           
static java.lang.Object[] getErrorKeyFromBindingsOnly(AWComponent comp)
           
 AWEncodedString getErrorNavSubmitForm()
           
 int getErrorSetId()
           
 AWErrorInfo getHighLightedError()
           
 boolean getIgnoreKnownWarnings()
           
 java.lang.String getLogPrefix()
           
 int getNumberOfErrors()
           
 int getNumberOfErrors(boolean excludeKnownWarnings)
           
 AWErrorInfo getPreviousError()
           
 ariba.ui.aribaweb.core.AWErrorManager.EMMultiKeyHashtable<java.lang.Object[],AWErrorInfo> getVisitedErrors()
           
 boolean hasDeferredNavHandlerForCurrentError()
           
 boolean hasErrors()
           
 boolean hasHighLightedError()
           
 boolean hasNewError(java.lang.Object key)
           
 boolean hasWarnings()
           
 boolean isErrorDisplayEnabled()
           
 boolean isHighLightedError(java.lang.Object key)
           
 boolean isHighLightedError(java.lang.Object[] keys)
           
 boolean isValidationRequiredInAppend()
           
 java.lang.Object mostRecentErrorKey()
           
 void navToErrorAsNeeded(boolean onlyInAppend, java.lang.Object keysForPendingDisplayError, boolean forceCheckExistence)
          This is for AWDataTable scrolling?
 AWComponent navUsingDeferredNavHandler(AWComponent pageComponent)
           
 AWErrorInfo newErrorForKey(java.lang.Object key)
          Get the recently added error for this key.
 java.lang.String newErrorMessageForKey(java.lang.Object key)
          Get the recently added error for this key.
 java.lang.Object newErrorValueForKey(java.lang.Object key)
          Get the recently added error value for this key.
 AWComponent nextError(AWComponent pageComponent)
           
 int phase()
           
 AWComponent prevError(AWComponent pageComponent)
           
 void registerErrorHandler(AWErrorHandler handler, int priority)
           
 void registerErrorHandler(AWErrorHandler handler, int priority, boolean isTableAutoScrollHandler)
           
 void registerFullValidationHandler(AWFullValidationHandler handler)
           
 boolean requiresRevalidation()
           
 void rerunValidation()
           
 void setAssociatedTableItem(java.lang.Object[] errorKeys, AWComponent datatable, java.lang.Object tableItem)
           
 void setChangesSavedSafely(boolean flag)
           
 void setErrorDisplayOrder(AWErrorInfo error, boolean isNavigable)
           
 void setErrorNavSubmitForm(AWRequestContext requestContext)
           
 void setIgnoreKnownWarnings(boolean ignore)
          Indicates whether error count should include the warnings that have been displayed before.
 void setMostRecentErrorKey(java.lang.Object errorKey)
           
 void setPhase(int phase)
           
 void unregisterErrorHandler(ariba.ui.aribaweb.core.AWErrorManager.PrioritizedHandler handler)
           
 void unregisterFullValidationHandler(AWFullValidationHandler handler)
           
 void validateOnAppend()
           
 java.lang.String warningMessageForKey(java.lang.Object key)
           
 
Methods inherited from class ariba.ui.aribaweb.util.AWBaseObject
debugString, ensureFieldValuesClear, getFieldValue, init, isKindOfClass, localizedJavaString, logString, logWarning, setFieldValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GeneralErrorKey

public static final java.lang.String GeneralErrorKey
See Also:
Constant Field Values

InstanceKey

public static final java.lang.String InstanceKey
See Also:
Constant Field Values

EnvironmentErrorKey

public static final java.lang.String EnvironmentErrorKey
See Also:
Constant Field Values

OutOfPhase

public static int OutOfPhase

RenderPhase

public static int RenderPhase

ApplyValuesPhase

public static int ApplyValuesPhase

InvokePhase

public static int InvokePhase
Constructor Detail

AWErrorManager

public AWErrorManager(AWPage page)
Method Detail

setPhase

public void setPhase(int phase)

phase

public int phase()

validateOnAppend

public void validateOnAppend()

isValidationRequiredInAppend

public boolean isValidationRequiredInAppend()

setErrorNavSubmitForm

public void setErrorNavSubmitForm(AWRequestContext requestContext)

getErrorNavSubmitForm

public AWEncodedString getErrorNavSubmitForm()

isErrorDisplayEnabled

public boolean isErrorDisplayEnabled()

enableErrorDisplay

public void enableErrorDisplay(boolean enable)

enableErrorDisplay

public void enableErrorDisplay(boolean enablePageErrorDisplay,
                               boolean enablePageAutoScroll)

getNumberOfErrors

public int getNumberOfErrors()

setIgnoreKnownWarnings

public void setIgnoreKnownWarnings(boolean ignore)
Indicates whether error count should include the warnings that have been displayed before. Let's say a page has only warnings. When we ask the question "Is the page valid?" before taking a submit action, the error count will not be zero because there are warnings. However, if ask again (and go through another append cycle), the exact same warnings are considered known warnings. If desired, setting this flag will result in the error count to exclude the known warnings. In that case, the answer to "Is the page valid?" will be Yes and the submit action will go through. By default we don't ignore known warnings.

Parameters:
ignore -

getIgnoreKnownWarnings

public boolean getIgnoreKnownWarnings()

getNumberOfErrors

public int getNumberOfErrors(boolean excludeKnownWarnings)

getAllErrors

public java.util.List<AWErrorInfo> getAllErrors()

hasErrors

public boolean hasErrors()

getAllWarnings

public java.util.List<AWErrorInfo> getAllWarnings()

hasWarnings

public boolean hasWarnings()

allErrorsAreWarnings

public boolean allErrorsAreWarnings()

setErrorDisplayOrder

public void setErrorDisplayOrder(AWErrorInfo error,
                                 boolean isNavigable)

checkErrorsAndEnableDisplay

public boolean checkErrorsAndEnableDisplay()

hasNewError

public boolean hasNewError(java.lang.Object key)

newErrorForKey

public AWErrorInfo newErrorForKey(java.lang.Object key)
Get the recently added error for this key. This method should NOT be used to get the errors while building the user interface, because it will violate phase boundaries. Use errorMessageForKey instead.

Parameters:
key - The error key
Returns:
the error object if any

newErrorMessageForKey

public java.lang.String newErrorMessageForKey(java.lang.Object key)
Get the recently added error for this key. This method should NOT be used to get the errors while building the user interface, because it will violate phase boundaries. Use errorMessageForKey instead.

Parameters:
key - The error key
Returns:
the error message if any, or null if there is no error
See Also:
errorMessageForKey(java.lang.Object)

newErrorValueForKey

public java.lang.Object newErrorValueForKey(java.lang.Object key)
Get the recently added error value for this key. This method should NOT be used to get the errors while building the user interface, because it will violate phase boundaries. Use errorValueForKey instead.

Parameters:
key - The error key
Returns:
the error value if any, or null if there is no error
See Also:
errantValueForKey(java.lang.Object)

errorMessageForKey

public java.lang.String errorMessageForKey(java.lang.Object key)

warningMessageForKey

public java.lang.String warningMessageForKey(java.lang.Object key)

errantValueForKey

public java.lang.Object errantValueForKey(java.lang.Object key)

errorsForKeys

public java.util.List<AWErrorBucket> errorsForKeys(java.lang.Object[] keys)

firstErrorMessageForKeys

public java.lang.String firstErrorMessageForKeys(java.lang.Object[] keys)

firstWarningMessageForKeys

public java.lang.String firstWarningMessageForKeys(java.lang.Object[] keys)

firstErrorForKeys

public AWErrorInfo firstErrorForKeys(java.lang.Object[] keys,
                                     boolean isWarning)

errorsForValueSource

public java.util.List errorsForValueSource(java.lang.Object valueSource)

errorsForValueSource

public java.util.List errorsForValueSource(java.lang.Object valueSource,
                                           java.lang.String fieldPath)

errorsForValueSource

public java.util.List<AWErrorBucket> errorsForValueSource(java.lang.Object valueSource,
                                                          java.lang.String fieldPath,
                                                          java.lang.String group)

getErrorKeyForComponent

public static java.lang.Object getErrorKeyForComponent(AWComponent comp)

getErrorKeyFromBindings

public static java.lang.Object[] getErrorKeyFromBindings(AWComponent comp)

getErrorKeyFromBindingsOnly

public static java.lang.Object[] getErrorKeyFromBindingsOnly(AWComponent comp)

clearErrorInAppend

public void clearErrorInAppend(java.lang.Object key)
Clear a single error, during append. A call to this method is not allowed except during append

Parameters:
key - - the error key that should be cleared

mostRecentErrorKey

public java.lang.Object mostRecentErrorKey()

setMostRecentErrorKey

public void setMostRecentErrorKey(java.lang.Object errorKey)

setChangesSavedSafely

public void setChangesSavedSafely(boolean flag)

changesSavedSafely

public boolean changesSavedSafely()

registerErrorHandler

public void registerErrorHandler(AWErrorHandler handler,
                                 int priority)

registerErrorHandler

public void registerErrorHandler(AWErrorHandler handler,
                                 int priority,
                                 boolean isTableAutoScrollHandler)

unregisterErrorHandler

public void unregisterErrorHandler(ariba.ui.aribaweb.core.AWErrorManager.PrioritizedHandler handler)

registerFullValidationHandler

public void registerFullValidationHandler(AWFullValidationHandler handler)

unregisterFullValidationHandler

public void unregisterFullValidationHandler(AWFullValidationHandler handler)

_getRegisteredValidationHandlers

public java.util.List<AWFullValidationHandler> _getRegisteredValidationHandlers()

rerunValidation

public void rerunValidation()

getHighLightedError

public AWErrorInfo getHighLightedError()

getPreviousError

public AWErrorInfo getPreviousError()

getVisitedErrors

public ariba.ui.aribaweb.core.AWErrorManager.EMMultiKeyHashtable<java.lang.Object[],AWErrorInfo> getVisitedErrors()

isHighLightedError

public boolean isHighLightedError(java.lang.Object key)

isHighLightedError

public boolean isHighLightedError(java.lang.Object[] keys)

hasHighLightedError

public boolean hasHighLightedError()

getDeferredNavigationDestination

public AWComponent getDeferredNavigationDestination()

clearHighLightedError

public void clearHighLightedError()

navToErrorAsNeeded

public void navToErrorAsNeeded(boolean onlyInAppend,
                               java.lang.Object keysForPendingDisplayError,
                               boolean forceCheckExistence)
This is for AWDataTable scrolling?

Parameters:
onlyInAppend -
keysForPendingDisplayError -
forceCheckExistence -

nextError

public AWComponent nextError(AWComponent pageComponent)

prevError

public AWComponent prevError(AWComponent pageComponent)

getEnablePageAutoScroll

public boolean getEnablePageAutoScroll()

enablePageAutoScrolling

public void enablePageAutoScrolling()

disableErrorPanel

public void disableErrorPanel()

errorPanelDisabled

public boolean errorPanelDisabled()

_setupOffPageNavigationAtDst

public void _setupOffPageNavigationAtDst(AWErrorInfo curError,
                                         AWErrorHandler navHandler)

hasDeferredNavHandlerForCurrentError

public boolean hasDeferredNavHandlerForCurrentError()

navUsingDeferredNavHandler

public AWComponent navUsingDeferredNavHandler(AWComponent pageComponent)

getLogPrefix

public java.lang.String getLogPrefix()

setAssociatedTableItem

public void setAssociatedTableItem(java.lang.Object[] errorKeys,
                                   AWComponent datatable,
                                   java.lang.Object tableItem)

getErrorSetId

public int getErrorSetId()

alternateResponseForNavigationAction

public AWComponent alternateResponseForNavigationAction(AWComponent target,
                                                        int action)

requiresRevalidation

public boolean requiresRevalidation()
Returns:
whether a set has resulted in the need to re-validate


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.