Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: form :: validation ::

unpublished interface XValidator
Usage Restrictions
not published
Description
specifies a component able to validate (the content of) other components

Validators support simple validity checks and retrieving justifications for invalidity.

Validators may additionally support dynamic validity constraints. In such a case, the validity of a given value may change, without the value changing itself.
To be notified about this, interested components should register as XValidityConstraintListener.

See also
XValidatable

Methods' Summary
isValid determines whether the given value is valid  
explainInvalid retrieves a justification for the invalidity of the given value  
addValidityConstraintListener registers the given validity listener.  
removeValidityConstraintListener revokes the given validity listener  
Methods' Details
isValid
boolean
isValid( [in] any  Value );

Description
determines whether the given value is valid
Parameter aValue
the value to check for validity
Returns
true if and only if the value is considered valid.
explainInvalid
string
explainInvalid( [in] any  Value );

Description
retrieves a justification for the invalidity of the given value
Parameter aValue
the value which has been recognized as being invalid
Returns
a human-readable string, which explains why the given valus is considered invalid.
addValidityConstraintListener
void
addValidityConstraintListener( [in] XValidityConstraintListener  Listener )
raises( ::com::sun::star::lang::NullPointerException );

Description
registers the given validity listener.

Usually, an XValidatable instance will also add itself as validity listener, as soon as the validator is introduced to it.

Implementations which do not support dynamic validity contraints should simply ignore this call.

Throws
::com::sun::star::lang::NullPointerException if the given listener is NULL
See also
XValidityConstraintListener
removeValidityConstraintListener
void
removeValidityConstraintListener( [in] XValidityConstraintListener  Listener )
raises( ::com::sun::star::lang::NullPointerException );

Description
revokes the given validity listener
Throws
::com::sun::star::lang::NullPointerException if the given listener is NULL
See also
XValidityConstraintListener
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.