|
|||||||||
| 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. |
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 |
blockDirtyChange(boolean dirtyChange)
|
boolean |
changeWhileBlocking()
|
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)
|
Document |
getDom()
|
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 |
isBlockDirtyChange()
|
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 PROPERTYCHANGE
public static final java.lang.String SERIALIZABLE_CHANGED
public static final java.lang.String TEMPORARY_PROPERTYCHANGE
public static final java.lang.String XUI_INITIALIZED
| Constructor Detail |
|---|
public TypeController(Document dom)
| Method Detail |
|---|
public void addChangeLog(LogEntry logEntry)
logEntry - public void addDirtyChangeListener(DirtyChangeListener newListener)
newListener - a new listener
public void addIndeterminateXPath(Type source,
java.lang.String xpath,
Type xuiType)
xpath - none deterministic xpathxuiType - holding xui typepublic LoggingListener addLogListener(LoggingListener listener)
public 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 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 void applySaveRules(boolean isRunningOnServer)
public void applySaveRules(java.lang.Object event,
boolean isRunningOnServer)
public void blockDirtyChange(boolean dirtyChange)
public boolean changeWhileBlocking()
public void cleanLogging()
public void domChanged(DOMChangeEvent event)
DOMChangeListener
domChanged in interface DOMChangeListenerevent - occured DOMChangeEvent
public void domChanged(DOMChangeEvent event,
java.util.Stack callStack)
public void dumpLog()
public void fireDirtyChange()
public void fireDirtyChange(DirtyChangeEvent event)
public void fireDOMValidated(Document dom)
public Document getDom()
public ErrorController getErrorController()
public java.lang.StringBuffer getInfo()
public java.util.List getLoggedChanges()
public java.util.Hashtable getLoggingListeners()
public MathEvaluator getMathEvaluator()
public Rule getRule(FormulaExpression formula)
public Rule getRule(java.lang.String id)
source - Type to look forinitializationRulesOnly - indicates if only initialization rules should be considered
public java.util.List getRules(Type source,
boolean initializationRulesOnly)
source - Type to look forinitializationRulesOnly - indicates if only initialization rules should be considered
public java.util.List getRules(Type source,
boolean initializationRulesOnly,
boolean inclDerived)
source - Type to look forinitializationRulesOnly - indicates if only initialization rules should be considered
public static void handleDynamicRequiredState(Type source,
boolean checkParent)
public boolean hasChanged()
public void hasChanged(boolean hasChanged)
hasChanged - indicates if the underlying DOM has changed.public boolean isBlockDirtyChange()
public boolean isDebug()
public void printRules()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerevt - a propertyChangeEvent that occuredpublic void release()
public void releaseRules()
public void removeDirtyChangeListener(DirtyChangeListener listener)
listener - to removepublic void removeLogListener(LoggingListener listener)
listener - listener to removepublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - a PropertyChangeListener that should be removedpublic void removeRule(FormulaExpression formula)
rule - a Rule that should be removedpublic void removeRule(Rule rule)
rule - a Rule that should be removedpublic void removeRule(Type sourceType)
type - a Rule that should be removed
public void removeRule(Type sourceType,
boolean inclDerived)
type - a Rule that should be removedpublic void setDebug(boolean _debug)
public static Type updateXUICompUserObject(Type aType)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||