Class PropertyValidation
- java.lang.Object
-
- org.apache.derby.iapi.services.property.PropertyValidation
-
- All Implemented Interfaces:
PropertyFactory
public class PropertyValidation extends java.lang.Object implements PropertyFactory
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Vector<PropertySetCallback>notifyOnSet
-
Constructor Summary
Constructors Constructor Description PropertyValidation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertySetNotification(PropertySetCallback who)Add a callback for a change in any property value.java.io.SerializabledoMap(java.lang.String key, java.io.Serializable value, java.util.Dictionary set)Call the property set callbacks to map a proposed property value to a value to save.java.io.SerializabledoValidateApplyAndMap(TransactionController tc, java.lang.String key, java.io.Serializable value, java.util.Dictionary d, boolean dbOnlyProperty)voidvalidateSingleProperty(java.lang.String key, java.io.Serializable value, java.util.Dictionary set)validation a single propertyvoidverifyPropertySet(java.util.Properties p, java.util.Properties ignore)Validate a Property set.
-
-
-
Field Detail
-
notifyOnSet
private java.util.Vector<PropertySetCallback> notifyOnSet
-
-
Method Detail
-
doValidateApplyAndMap
public java.io.Serializable doValidateApplyAndMap(TransactionController tc, java.lang.String key, java.io.Serializable value, java.util.Dictionary d, boolean dbOnlyProperty) throws StandardException
- Specified by:
doValidateApplyAndMapin interfacePropertyFactory- Throws:
StandardException
-
doMap
public java.io.Serializable doMap(java.lang.String key, java.io.Serializable value, java.util.Dictionary set) throws StandardExceptionCall 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
- Specified by:
doMapin interfacePropertyFactory- Throws:
StandardException
-
validateSingleProperty
public void validateSingleProperty(java.lang.String key, java.io.Serializable value, java.util.Dictionary set) throws StandardExceptionDescription copied from interface:PropertyFactoryvalidation a single property- Specified by:
validateSinglePropertyin interfacePropertyFactory- Throws:
StandardException
-
addPropertySetNotification
public void addPropertySetNotification(PropertySetCallback who)
Description copied from interface:PropertyFactoryAdd a callback for a change in any property value.
The callback is made in the context of the transaction making the change.- Specified by:
addPropertySetNotificationin interfacePropertyFactory- Parameters:
who- which object is called
-
verifyPropertySet
public void verifyPropertySet(java.util.Properties p, java.util.Properties ignore) throws StandardExceptionDescription copied from interface:PropertyFactoryValidate a Property set.Validate a Property set by calling all the registered property set notification functions with .
- Specified by:
verifyPropertySetin interfacePropertyFactory- Parameters:
p- Properties to validate.ignore- Properties to not validate in p. Usefull for properties that may not be set after boot.- Throws:
StandardException- Throws if p fails a check.
-
-