|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jaxfront.core.type.TypeController
public class TypeController
The TypeController controls any value changes in the underlying JAXFront DOM. If a value changed the TypeController checks all relevant rules defined in the XUI document. He keeps track of all occured validation errors. In case of a validation error, a ValidationChangeEvent gets fired.
Field Summary | |
---|---|
static java.lang.String |
PROPERTYCHANGE
|
static java.lang.String |
SERIALIZABLE_CHANGED
|
static java.lang.String |
TEMPORARY_PROPERTYCHANGE
|
static java.lang.String |
XUI_INITIALIZED
|
Constructor Summary | |
---|---|
TypeController(Document dom)
|
Method Summary | |
---|---|
void |
addChangeLog(LogEntry logEntry)
Add a log to the logging list. |
void |
addDirtyChangeListener(DirtyChangeListener newListener)
Register a new listener for receiving dirty changes. |
FormulaExpression |
addFormula(FormulaExpression formula)
Adds a formula. |
void |
addIndeterminateXPath(Type source,
java.lang.String xpath,
Type xuiType)
Adds an none deterministic xpath. |
LoggingListener |
addLogListener(LoggingListener listener)
|
LoggingListener |
addLogListener(Type sourceType,
java.lang.String scope,
java.lang.String logLevel)
Add a log for a certain type. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a propertyChangeListener. |
Rule |
addRule(Rule rule)
Adds a rule. |
void |
applySaveRules(boolean isRunningOnServer)
Applies all defined rules without checking scope and event type. |
void |
applySaveRules(java.lang.Object event,
boolean isRunningOnServer)
Applies all defined rules without checking scope and event type. |
void |
cleanLogging()
Clears all logged changes. |
void |
domChanged(DOMChangeEvent event)
Respond method for a DOM state changed (DOMChangeEvent). |
void |
domChanged(DOMChangeEvent event,
java.util.Stack callStack)
Acts as an observer for all DOMChanges fired by the JAXFrontDOM. |
void |
dumpLog()
Dumps the logged changes to the System.out. |
void |
fireDirtyChange()
|
void |
fireDirtyChange(DirtyChangeEvent event)
|
void |
fireDOMValidated(Document dom)
|
ErrorController |
getErrorController()
|
java.lang.StringBuffer |
getInfo()
|
java.util.List |
getLoggedChanges()
Returns a list of all logged changes. |
java.util.Hashtable |
getLoggingListeners()
Returns all LoggingListeners. |
MathEvaluator |
getMathEvaluator()
Returns the single instance of the MathEvaluator for Parsing/Evaluating formula expressions. |
Rule |
getRule(FormulaExpression formula)
|
Rule |
getRule(java.lang.String id)
Return a rule for the given id. |
java.util.List |
getRules(Type source,
boolean initializationRulesOnly)
Returns all rules for a certain type (source). |
java.util.List |
getRules(Type source,
boolean initializationRulesOnly,
boolean inclDerived)
Returns all rules for a certain type (source). |
static void |
handleDynamicRequiredState(Type source,
boolean checkParent)
|
boolean |
hasChanged()
Returns true if any node in the underlying DOM has changed its state. |
void |
hasChanged(boolean hasChanged)
Marks the underlying DOM as changed. |
boolean |
isDebug()
|
void |
printRules()
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Keeps track of all propertyChanges occuring in the underlying JAXFront DOM and performs the defined XUI rules. |
void |
release()
Releases rules, validationErrors, validationChangeListener and propertyChangeSupport. |
void |
releaseRules()
Releases all rules. |
void |
removeDirtyChangeListener(DirtyChangeListener listener)
Remove listener. |
void |
removeLogListener(LoggingListener listener)
Removes a loggin listener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes the given PropertyChangeListener. |
void |
removeRule(FormulaExpression formula)
Removes all Rules for the given sourceTpe. |
void |
removeRule(Rule rule)
Removes the given Rule. |
void |
removeRule(Type sourceType)
Removes the given Rule. |
void |
removeRule(Type sourceType,
boolean inclDerived)
Removes the given Rule. |
void |
setDebug(boolean _debug)
|
static Type |
updateXUICompUserObject(Type aType)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TEMPORARY_PROPERTYCHANGE
public static final java.lang.String PROPERTYCHANGE
public static final java.lang.String XUI_INITIALIZED
public static final java.lang.String SERIALIZABLE_CHANGED
Constructor Detail |
---|
public TypeController(Document dom)
Method Detail |
---|
public void addIndeterminateXPath(Type source, java.lang.String xpath, Type xuiType)
xpath
- none deterministic xpathxuiType
- holding xui typepublic FormulaExpression addFormula(FormulaExpression formula)
formula
- a formula that should be added
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a propertyChangeListener that should be addedpublic Rule addRule(Rule rule)
rule
- a rule that should be added
public java.util.List getRules(Type source, boolean initializationRulesOnly)
source
- Type to look forinitializationRulesOnly
- indicates if only initialization rules should be consideredpublic java.util.List getRules(Type source, boolean initializationRulesOnly, boolean inclDerived)
source
- Type to look forinitializationRulesOnly
- indicates if only initialization rules should be consideredpublic Rule getRule(FormulaExpression formula)
public Rule getRule(java.lang.String id)
source
- Type to look forinitializationRulesOnly
- indicates if only initialization rules should be consideredpublic void fireDOMValidated(Document dom)
public void applySaveRules(boolean isRunningOnServer)
public void applySaveRules(java.lang.Object event, boolean isRunningOnServer)
public void domChanged(DOMChangeEvent event, java.util.Stack callStack)
public MathEvaluator getMathEvaluator()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- a propertyChangeEvent that occuredpublic static void handleDynamicRequiredState(Type source, boolean checkParent)
public void release()
public java.lang.StringBuffer getInfo()
public void releaseRules()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- a PropertyChangeListener that should be removedpublic void removeRule(Type sourceType)
type
- a Rule that should be removedpublic void removeRule(Type sourceType, boolean inclDerived)
type
- a Rule that should be removedpublic void removeRule(FormulaExpression formula)
rule
- a Rule that should be removedpublic boolean hasChanged()
public void hasChanged(boolean hasChanged)
hasChanged
- indicates if the underlying DOM has changed.public void fireDirtyChange()
public void fireDirtyChange(DirtyChangeEvent event)
public void addDirtyChangeListener(DirtyChangeListener newListener)
newListener
- a new listenerpublic void removeDirtyChangeListener(DirtyChangeListener listener)
listener
- to removepublic LoggingListener addLogListener(Type sourceType, java.lang.String scope, java.lang.String logLevel)
sourceType
- Type of the logging sourcescope
- eather source or whole subtree will be loggedlogLevel
- log levelpublic LoggingListener addLogListener(LoggingListener listener)
public void removeLogListener(LoggingListener listener)
listener
- listener to removepublic java.util.Hashtable getLoggingListeners()
public void cleanLogging()
public java.util.List getLoggedChanges()
public void addChangeLog(LogEntry logEntry)
logEntry
- public void dumpLog()
public boolean isDebug()
public void setDebug(boolean _debug)
public ErrorController getErrorController()
public static Type updateXUICompUserObject(Type aType)
public void domChanged(DOMChangeEvent event)
DOMChangeListener
domChanged
in interface DOMChangeListener
event
- occured DOMChangeEventpublic void printRules()
public void removeRule(Rule rule)
rule
- a Rule that should be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |