|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.page.Page
Base class for server and client side PageModels. A Page is a set of WidgetModels.
| Constructor Summary | |
Page(boolean stateless,
boolean atServer)
Constructs a Page. |
|
| Method Summary | |
boolean |
changed()
Yields true if any of this PageModels WidgetModels has changed since the last server side event (or since creation if isNew). |
void |
commit()
This method discards the change history in every WidgetModel. |
void |
describe(DNode n)
describe puts all relevant information about this into the provided node. |
void |
display()
Shows structure in a SWT window. |
void |
equalsCS(Page mServer,
int syncPoint)
This debugging purpose method compares all widget models of a client and server page if their state match at two specified syncpoints. |
void |
externalize(XmaOutput xo,
boolean forceFull)
This method writes either all widget models if forceFull or just the changed ones. |
short |
getId()
Every page model has an integer id which identifies the page model within its component. |
int |
getNumWModels()
Returns the number of Widget Models in this Page. |
abstract short |
getTypeId()
A subclass is responsible for generating a unique id to identify the type of this Page. |
WModel |
getWModel(short idWModel)
Returns a particular WidgetModel. |
abstract WModel[] |
getWModels()
Returns an array of all WidgetModels of this page. |
void |
internalize(XmaInput in)
Updates the state of this with information of the given XMAObjectInput. |
boolean |
isAtServer()
Indicates whether this Page executes at the server side. |
boolean |
isStateless()
Indicates whether this Page is stateless. |
void |
randomlyChange(int n)
Make n random changes to each widget model of this page |
void |
rollback()
Restores all WidgetModels of this PageModels to the state immediately after the last server side event (or at creation time if isNew()). |
void |
setId(short id)
Assigns an id to this Page. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Page(boolean stateless,
boolean atServer)
stateless - indicates if this is a server stateless Page.atServer - indicates if the created instance is living at the server side.| Method Detail |
public boolean isStateless()
public boolean changed()
changed in interface Transactionalpublic void rollback()
rollback in interface Transactionalpublic void commit()
commit in interface Transactional
public void externalize(XmaOutput xo,
boolean forceFull)
throws java.io.IOException
externalize in interface Synchronizationxo - the serialization destinationforceFull - if true, the complete state is written
and deltas are ignored.
java.io.IOException - on serialization errorsSynchronization.externalize(at.spardat.xma.serializer.XmaOutput, boolean)
public void internalize(XmaInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
SynchronizationThis method is not allowed to throw Exceptions because that would leave models in an inconsistent state. Thrown exceptions are considered to be programming errors. Internalize must not throw technical exceptions which indicate system or ressource failures. That implies that the person implementing internalize is not allowed to access ressources outside the JVM, either directly or via calls to other methods. Examples of ressource access which must not be triggered are calls to communication of file system services.
internalize in interface Synchronizationin - the XMAObjectInput. If a XMAObjectInputChangeListener is
set in the object in, it will be notified after applying
changes read from in.
java.lang.ClassNotFoundException - on serialization errors
java.io.IOException - on serialization errorsSynchronization.internalize(at.spardat.xma.serializer.XmaInput)public short getId()
public void setId(short id)
id - the assigned id for this Page
java.lang.IllegalStateException - if there is allready set an id.public int getNumWModels()
public WModel getWModel(short idWModel)
idWModel - the id of the WidgetModel to return.
java.lang.IllegalArgumentException - if idModel less then zero or
greater than getNumWModels()-1.public abstract WModel[] getWModels()
public abstract short getTypeId()
public boolean isAtServer()
public void describe(DNode n)
Descriptive
describe in interface Descriptiven - the node going to hold information about this.Descriptive.describe(at.spardat.xma.mdl.util.DNode)public java.lang.String toString()
Object.toString()public void display()
public void randomlyChange(int n)
public void equalsCS(Page mServer,
int syncPoint)
syncPoint - 0 after a client to server sync, 1 after
a server to client sync.WModel.equalsCS(at.spardat.xma.mdl.WModel, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||