Oracle Data-aware Controls Reference

oracle.dacf.dataset
Class ValidationManager

java.lang.Object
  extended byoracle.dacf.dataset.ValidationManager

public class ValidationManager
extends java.lang.Object

The ValidationManager class provides the functionality to validate a given data item by name. This class manages the current validation level and helps the NavigationManager to approve (or disapprove) a focus change. If a DataItem needs to be validated the responsibilty is delegated to the producer of that DataItem.


Field Summary
static int ATTRIBUTE_INVALID
          Constant used to indicate that the column is invalid.
static int COLUMN_INVALID
           
protected static java.lang.String ERR_PROD_CODE
           
protected static int INITIAL_CAPACITY
           
static int QUERYVIEW_INVALID
           
static int ROW_INVALID
          Constant used to indicate that the row is invalid.
static int ROWSET_INVALID
          Constant used to indicate that the query RowSet is invalid.
static int SESSION_INVALID
          Constant used to indicate that the session is invalid.
static int VALID
          Constant used to setup the ValidationException that is thrown to terminate validation.
 
Constructor Summary
protected ValidationManager()
          Default constructor.
 
Method Summary
 void addItemProducer(IBItemProducer itemProducer)
          Adds a IBItemProducer to the list of registered InfoBus producers.
 void addProducer(ProducerObject producer)
          Deprecated.  
 javax.infobus.DataItem getDataItem(InfoObject infoObject)
          Gets the DataItem for the specified name.
 InfoObject getInfoObject(java.lang.String name)
          Gets the InfoObject that corresponds to the specified name.
 InfoObject getProducer(java.lang.String name)
          Gets the producer of the DataItem that should be used to perform validation.
 int getValidationLevel()
          Returns the existing validation level.
static ValidationManager getValidationManager()
          Returns an instance of the ValidationManager.
 void removeItemProducer(IBItemProducer itemProducer)
          Removes a IBItemProducer to the list of registered InfoBus producers.
 void removeProducer(ProducerObject producer)
          Deprecated.  
 void setProducer(ProducerObject producer)
          Deprecated. Use addProducer(ProducerObject) instead.
 void setValidationLevel(int level)
          This method sets the level at which validations should be performed.
 void validateDataItem(java.lang.String dataItemName, int changeLevel)
          Internal: Applications should not use this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALID

public static final int VALID
Constant used to setup the ValidationException that is thrown to terminate validation. This constant can stop further validation from occuring but mark the object as valid

See Also:
ValidationException, Constant Field Values

ATTRIBUTE_INVALID

public static final int ATTRIBUTE_INVALID
Constant used to indicate that the column is invalid. Sets up the ValidationException that is thrown to terminate validation.

See Also:
ValidationException, Constant Field Values

COLUMN_INVALID

public static final int COLUMN_INVALID
See Also:
Constant Field Values

ROW_INVALID

public static final int ROW_INVALID
Constant used to indicate that the row is invalid. Sets up the ValidationException that is thrown to terminate validation.

See Also:
ValidationException, Constant Field Values

ROWSET_INVALID

public static final int ROWSET_INVALID
Constant used to indicate that the query RowSet is invalid. Sets up the ValidationException that is thrown to terminate validation.

See Also:
ValidationException, Constant Field Values

QUERYVIEW_INVALID

public static final int QUERYVIEW_INVALID
See Also:
Constant Field Values

SESSION_INVALID

public static final int SESSION_INVALID
Constant used to indicate that the session is invalid. Sets up the ValidationException that is thrown to terminate validation.

See Also:
ValidationException, Constant Field Values

INITIAL_CAPACITY

protected static final int INITIAL_CAPACITY
See Also:
Constant Field Values

ERR_PROD_CODE

protected static final java.lang.String ERR_PROD_CODE
Constructor Detail

ValidationManager

protected ValidationManager()
Default constructor.

Method Detail

getValidationManager

public static ValidationManager getValidationManager()
Returns an instance of the ValidationManager.


getProducer

public InfoObject getProducer(java.lang.String name)
Gets the producer of the DataItem that should be used to perform validation.

Parameters:
name - the producer of the DataItem.

setProducer

public void setProducer(ProducerObject producer)
Deprecated. Use addProducer(ProducerObject) instead.


addProducer

public void addProducer(ProducerObject producer)
Deprecated.  


removeProducer

public void removeProducer(ProducerObject producer)
Deprecated.  


addItemProducer

public void addItemProducer(IBItemProducer itemProducer)
Adds a IBItemProducer to the list of registered InfoBus producers.

The IBItemProducer responds to subscription requests. It is used to locate the ProducerObject for a DataItem when validation needs to occur.

Parameters:
itemProducer - the InfoBus producer that serves as an interface to the consumer objects
See Also:
#removeItemProducer(ItemProducer itemProducer)

removeItemProducer

public void removeItemProducer(IBItemProducer itemProducer)
Removes a IBItemProducer to the list of registered InfoBus producers.

The IBItemProducer responds to subscription requests. It is used to locate the ProducerObject for a DataItem when validation needs to occur.

Parameters:
itemProducer - the InfoBus producer that serves as an interface to the consumer objects
See Also:
#addItemProducer(ItemProducer itemProducer)

setValidationLevel

public void setValidationLevel(int level)
                        throws java.lang.IllegalArgumentException
This method sets the level at which validations should be performed. Validation events are fired based on the validation level set with this class.

The validation level ranges from InfoObject.LEVEL_COLUMN to InfoObject.LEVEL_SESSION. By default the validation level is set to InfoObject.LEVEL_ATTRIBUTE.

Parameters:
level - the new validation level.
Throws:
java.lang.IllegalArgumentException - if an invalid validation level is used.
See Also:
InfoObject

getValidationLevel

public int getValidationLevel()
Returns the existing validation level.

Returns:
the existing validation level.

validateDataItem

public void validateDataItem(java.lang.String dataItemName,
                             int changeLevel)
                      throws ValidationException
Internal: Applications should not use this method.

Checks whether a DataItem is valid. This method is called by the NavigationManager--clients should never directly call this method.

An exception is thrown if the data item is invalid.

Parameters:
dataItemName - published name of the item that needs to be validated.
changeLevel - navigational change attempted by the end user.
Throws:
ValidationException - if validation failed.

getInfoObject

public InfoObject getInfoObject(java.lang.String name)
Gets the InfoObject that corresponds to the specified name.

Parameters:
name - name of the item.
Returns:
InfoObject corresponding to the specified DataItem.

getDataItem

public javax.infobus.DataItem getDataItem(InfoObject infoObject)
Gets the DataItem for the specified name.

Parameters:
infoObject - the InfoObject that publishes the DataItem.
Returns:
DataItem corresponding to the specified DataItem name.

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.