Overview | Package | Class | Tree | Deprecated | Index | Help
| OracleAS PDK for Java 9.0.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.portal.provider.v2.utils
Class ValidationError

    java.lang.Object
      |
      +--oracle.portal.provider.v2.utils.ValidationError

public class ValidationError
extends java.lang.Object

A `ValidationError` maintains a list of `ValidationError.Error`s reported by a tree of `Validateable` objects during validation traversal.

Context information, such as the location within a tree of objects, is supplied using the utility `newContext(String, String, String)` method.

Nested Class Summary
`static class` | `ValidationError.Error` Encapsulates information relating to a single error.

Constructor Summary
`ValidationError()` Constructs this `ValidationError` instance.

Method Summary
`void` | `addError(java.lang.String context, java.lang.String message, java.lang.String values)` Adds an error to the list maintained by this `ValidationError` instance.
`boolean` | `isEmpty()` Indicates whether or not this `ValidationError` instance is currently empty.
`java.util.Iterator` | `iterator()` Returns a `java.util.Iterator` providing ordered retrieval of the `ValidationError.Error`s entered into this `ValidationError` instance.
`static java.lang.String` | `newContext(java.lang.String parentContext, java.lang.String typeName, java.lang.String objName)` Returns a new context string containing the parent context and current context delimited by a ">" character.
`java.lang.String` | `toString()` Returns a `java.lang.String` representation of this `ValidationError` instance.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ValidationError

    public ValidationError()

  Constructs this `ValidationError` instance.

Method Detail

### addError

    public void addError(java.lang.String context,
                         java.lang.String message,
                         java.lang.String values)

  Adds an error to the list maintained by this `ValidationError` instance. The context information supplied should conatin the context information of entities calling the current `Validateable`. This will be the case if the utility `newContext(String, String, String)` was used.

  Parameters:
    `context` - Current context information.
    `message` - The error message.
    `values` - The error values.

### iterator

    public java.util.Iterator iterator()

  Returns a `java.util.Iterator` providing ordered retrieval of the `ValidationError.Error`s entered into this `ValidationError` instance.

  Returns:
    a `java.util.Iterator` whose members are of type `ValidationError.Error`.

### isEmpty

    public boolean isEmpty()

  Indicates whether or not this `ValidationError` instance is currently empty.

  Returns:
    a `boolean` flag.

### toString

    public java.lang.String toString()

  Returns a `java.lang.String` representation of this `ValidationError` instance.

  Overrides:
    `toString` in class `java.lang.Object`

### newContext

    public static java.lang.String newContext(java.lang.String parentContext,
                                              java.lang.String typeName,
                                              java.lang.String objName)

  Returns a new context string containing the parent context and current context delimited by a ">" character. The current context is constructed from the supplied object type name and object instance name (if any).

  Parameters:
    `parentContext` - The parent context.
    `typeName` - The type name of the current `Validateable` instance.
    `objName` - The instance name of the current `Validateable` instance.
  Returns:
    a new context string or `null` if it was not possible t construct one from the supplied information.

Overview | Package | Class | Tree | Deprecated | Index | Help
| OracleAS PDK for Java 9.0.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2002,2003 Oracle Corporation. All Rights Reserved.