Top Description Methods
org.apache.derby.iapi.services.property

public Interface PropertyFactory

Known Direct Implementers
org.apache.derby.iapi.services.property.PropertyValidation
Imports
org.apache.derby.catalog.UUID, org.apache.derby.iapi.services.context.ContextManager, org.apache.derby.iapi.services.locks.LockFactory, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.access.TransactionController, org.apache.derby.iapi.store.access.conglomerate.MethodFactory, org.apache.derby.iapi.services.property.PropertySetCallback, java.util.Properties, .Dictionary, java.io.File, .Serializable

Module interface for an Property validation.

An PropertyFactory is typically obtained from the Monitor:

	// Get the current validation factory.
	PropertyFactory af;
	af = (PropertyFactory) Monitor.findServiceModule(this, org.apache.derby.shared.common.reference.Module.PropertyFactory);
  

Method Summary

Modifier and TypeMethod and Description
public void
addPropertySetNotification(PropertySetCallback
which object is called
who
)

Add a callback for a change in any property value.

public Serializable

Returns:

a serializable
doMap
(String
The property key
key
,
Serializable
The value to be bound to the key
value
,
Dictionary<K, V>
The property set for this key
set
)

Call the property set callbacks to map a proposed property value to a value to save.

public Serializable
doValidateApplyAndMap(TransactionController tc, String key, Serializable value, Dictionary<K, V> d, boolean dbOnlyProperty)

public void
validateSingleProperty(String
The property key
key
,
Serializable
The proposed value for the key
value
,
Dictionary<K, V>
The set containing the key/value pair
set
)

validate a single property

public void
verifyPropertySet(Properties
Properties to validate.
p
,
Properties
Properties to not validate in p. Usefull for properties that may not be set after boot.
ignore
)

Validate a Property set.

Method Detail

addPropertySetNotificationback to summary
public void addPropertySetNotification(PropertySetCallback who)

Add a callback for a change in any property value.
The callback is made in the context of the transaction making the change.

Parameters
who:PropertySetCallback

which object is called

doMapback to summary
public Serializable doMap(String key, Serializable value, Dictionary<K, V> set) throws StandardException

Call the property set callbacks to map a proposed property value to a value to save.

The caller must run this in a block synchronized on this to serialize validations with changes to the set of property callbacks

Parameters
key:String

The property key

value:Serializable

The value to be bound to the key

set:Dictionary<K, V>

The property set for this key

Returns:Serializable

a serializable

Exceptions
StandardException:
if the key/value pair is invalid
doValidateApplyAndMapback to summary
public Serializable doValidateApplyAndMap(TransactionController tc, String key, Serializable value, Dictionary<K, V> d, boolean dbOnlyProperty) throws StandardException
validateSinglePropertyback to summary
public void validateSingleProperty(String key, Serializable value, Dictionary<K, V> set) throws StandardException

validate a single property

Parameters
key:String

The property key

value:Serializable

The proposed value for the key

set:Dictionary<K, V>

The set containing the key/value pair

Exceptions
StandardException:
if the key/value pair is invalid
verifyPropertySetback to summary
public void verifyPropertySet(Properties p, Properties ignore) throws StandardException

Validate a Property set.

Validate a Property set by calling all the registered property set notification functions with .

Parameters
p:Properties

Properties to validate.

ignore:Properties

Properties to not validate in p. Usefull for properties that may not be set after boot.

Exceptions
StandardException:
Throws if p fails a check.