|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.spardat.xma.component.Component
This class implements the comon base for Components on the client side and on the server side. This is mostly the live-cycle-management of the PageModels.
| Field Summary | |
protected XMASession |
session_
The session this component belongs to. |
| Constructor Summary | |
Component()
This is a noop-constructor for test-purpose. |
|
Component(XMASession session,
boolean isStateless,
boolean isAtServer)
Constructor |
|
| Method Summary | |
void |
commit()
Calls commit on every page in this component. |
void |
describe(DNode n)
describe puts all relevant information about this into the provided node. |
protected void |
externalizePageSet(java.util.HashSet pages,
XmaOutput xo,
boolean forceFull)
Writes a set of pages to the output stream. |
protected void |
externalizeProperties(XmaOutput xo,
boolean forceFull)
Writes the property model to xout. |
short |
getId()
Returns the id of this component. |
abstract java.lang.String |
getModelClass(short typeId)
Gets the full classname for the given typeId of a page in the component. |
java.lang.String |
getName()
Returns the short name of this component. |
int |
getNumPageModels()
Gets the number of registered PageModels in this Component. |
Page |
getPageModel(short idPage)
Gets the Page with the given ID. |
java.util.Iterator |
getPageModels()
Gets an Iterator to iterate over all living PageModels. |
protected ComponentProperty[] |
getPropDes()
|
protected ComponentProperty |
getPropDes(java.lang.String name)
Gets the descriptor of a given property Only properties defined in the guidesigner for this component are found by this method. |
short |
getSCN()
Returns the server change number. |
void |
incrementSCN()
Increments the server change number. |
protected void |
internalizePageSet(XmaInput xi)
Reads the information produces via externalizePageSet and applies the changes to the models. |
protected void |
internalizeProperties(XmaInput xi)
Restores property model externalized via externalizeProperties. |
boolean |
isPageModelAlive(short idPageModel)
Indicates if there exists an active Page with the given ID. |
boolean |
isStateless()
Returns true if this Component is stateless. |
void |
model2props()
Sets the properties from the values in the propModel. |
void |
props2model()
modifies the propModel so that the value of the cell (i,0) equals the ith property of this component. |
void |
registerPageModel(Page model)
Registers the given Page in the Component and assignes a unique ID to it. |
protected boolean |
removePageModel(short idPageModel)
Removes a page model with a given id. |
void |
rollback()
Calls rollback on every page in this component. |
void |
setId(short s)
Sets the id of this component. |
void |
setSCN(short s)
Sets the server change number. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface at.spardat.xma.mdl.Synchronization |
externalize, internalize |
| Field Detail |
protected XMASession session_
| Constructor Detail |
public Component(XMASession session,
boolean isStateless,
boolean isAtServer)
session - the XMASession this component belongs toisStateless - defines if this component is statelessisAtServer - indicates if this component executes at the server sidepublic Component()
| Method Detail |
public boolean isStateless()
public void registerPageModel(Page model)
The assigned id is also stored in the page (via Page.setId()).
model - the Page to register.
IllegalStateExecption - if the page is already registered.public Page getPageModel(short idPage)
idPage - the ID of the desired Page.
public boolean isPageModelAlive(short idPageModel)
idPageModel - the ID of the Page
protected boolean removePageModel(short idPageModel)
idPageModel - the id of the model to remove
public int getNumPageModels()
public java.util.Iterator getPageModels()
public abstract java.lang.String getModelClass(short typeId)
typeId - the unique typeId
protected void externalizePageSet(java.util.HashSet pages,
XmaOutput xo,
boolean forceFull)
throws java.io.IOException
pages - the set of pagesxo - the output streamforceFull - if true, all pages with all widget models are written. If false,
only changed pages and within these pages only changed widget
models are written.
java.io.IOException
protected void internalizePageSet(XmaInput xi)
throws java.io.IOException,
java.lang.ClassNotFoundException
This method requires that all pages whose information will be read out of the stream are already created.
xi - the object input stream
java.io.IOException - on serialization errors
java.lang.ClassNotFoundException - on serialization errors
protected void externalizeProperties(XmaOutput xo,
boolean forceFull)
throws java.io.IOException
xo - output-streamforceFull - ignore deltas
java.io.IOExceptionpublic void props2model()
This method must be called from outside the XMA-framework.
public void model2props()
This method must not be called from outside the XMA-framework.
protected void internalizeProperties(XmaInput xi)
throws java.io.IOException,
java.lang.ClassNotFoundException
xi - input stream
java.io.IOException
java.lang.ClassNotFoundExceptionpublic 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 short getId()
public void setId(short s)
public java.lang.String getName()
public short getSCN()
public void setSCN(short s)
public void incrementSCN()
public void commit()
public void rollback()
protected ComponentProperty[] getPropDes()
protected ComponentProperty getPropDes(java.lang.String name)
name - the name of the property to find
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||