SigPath

org.sigpath.tapestry.pages.model
Class AddCompartments

java.lang.Object
  extended by org.apache.tapestry.spec.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by org.apache.tapestry.AbstractPage
                  extended by org.apache.tapestry.html.BasePage
                      extended by org.sigpath.tapestry.pages.ValidatedPage
                          extended by org.sigpath.tapestry.pages.model.ModelValidated
                              extended by org.sigpath.tapestry.pages.model.AddCompartments
All Implemented Interfaces:
EventListener, PageRenderListener, PageValidateListener, IComponent, ILocatable, ILocationHolder, IPage, IRender

public abstract class AddCompartments
extends ModelValidated
implements PageRenderListener


Field Summary
 
Fields inherited from class org.sigpath.tapestry.pages.ValidatedPage
_validationDelegate
 
Constructor Summary
AddCompartments()
           
 
Method Summary
 void addCompartment(IRequestCycle cycle)
          creates a new compartment, add it to the model, validate the model, and go back to a another page if everything is fine.
 void beginEdit(IRequestCycle cycle, Compartment comp)
           
 void formCancel(IRequestCycle cycle)
          cancels the submission
abstract  Map getAttributes()
           
 HashMap getAttributesFromCompartment(Compartment comp)
          initiate the fields of the form so that the page may be used for editing
 IPropertySelectionModel getCompartmentModel(Vector mcs)
          selection over the Vector of Strings mcs todo: this model may be used to instaciate any selection we use in this page
 IPropertySelectionModel getConcentrationUnitModel()
          selection over molecules types
abstract  Compartment getEditedCompartment()
           
abstract  String getFrom()
           
 Vector getOtherCompartments()
          gets the model compartments other than the one being currently edited.
 IPropertySelectionModel getVolumeUnitModel()
          selection over molecules types
 void pageBeginRender(PageEvent event)
          the form is empty when the page begins render
abstract  void setAttributes(Map attributes)
           
abstract  void setEditedCompartment(Compartment comp)
           
abstract  void setFrom(String name)
           
 
Methods inherited from class org.sigpath.tapestry.pages.model.ModelValidated
moveFurtherOrRollBack, notifyModelHasChanged, validateModel, validateModelCompartments, validateModelConcentrations, validateModelExcludedReactions, validateModelReactions
 
Methods inherited from class org.sigpath.tapestry.pages.ValidatedPage
getModelErrorsList, getValidationDelegate, initialize, moveTo, pageValidate, passErrorsToValidateDelegate, setErrorField
 
Methods inherited from class org.apache.tapestry.html.BasePage
getResponseWriter
 
Methods inherited from class org.apache.tapestry.AbstractPage
addPageDetachListener, addPageRenderListener, addPageValidateListener, attach, beginPageRender, beginResponse, detach, endPageRender, firePageBeginRender, firePageDetached, firePageEndRender, firePageValidate, getChangeObserver, getEngine, getExtendedId, getGlobal, getIdPath, getLocale, getNestedComponent, getOutputEncoding, getPageName, getRequestCycle, getVisit, removePageDetachListener, removePageRenderListener, removePageValidateListener, renderPage, setChangeObserver, setLocale, setPageName, setRequestCycle, validate
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainer, getId, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.tapestry.spec.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.event.PageRenderListener
pageEndRender
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getId, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Constructor Detail

AddCompartments

public AddCompartments()
Method Detail

getConcentrationUnitModel

public IPropertySelectionModel getConcentrationUnitModel()
selection over molecules types

Returns:

getVolumeUnitModel

public IPropertySelectionModel getVolumeUnitModel()
selection over molecules types

Returns:

getCompartmentModel

public IPropertySelectionModel getCompartmentModel(Vector mcs)
selection over the Vector of Strings mcs todo: this model may be used to instaciate any selection we use in this page

Returns:

formCancel

public void formCancel(IRequestCycle cycle)
cancels the submission

Parameters:
cycle -

addCompartment

public void addCompartment(IRequestCycle cycle)
                    throws SigPathDatabaseException,
                           ClassNotFoundException,
                           IOException
creates a new compartment, add it to the model, validate the model, and go back to a another page if everything is fine. Otherwise, rollback the changes

Parameters:
cycle -
Throws:
SigPathDatabaseException
ClassNotFoundException
IOException

getAttributesFromCompartment

public HashMap getAttributesFromCompartment(Compartment comp)
initiate the fields of the form so that the page may be used for editing

Parameters:
comp -
Returns:
HashMap which encloses the attributes of the form

pageBeginRender

public void pageBeginRender(PageEvent event)
the form is empty when the page begins render

Specified by:
pageBeginRender in interface PageRenderListener
Parameters:
event -

getOtherCompartments

public Vector getOtherCompartments()
gets the model compartments other than the one being currently edited. If the model is new, returns all the model Compartments.

Returns:

beginEdit

public void beginEdit(IRequestCycle cycle,
                      Compartment comp)
               throws IOException,
                      ClassNotFoundException
Throws:
IOException
ClassNotFoundException

getFrom

public abstract String getFrom()

setFrom

public abstract void setFrom(String name)

getAttributes

public abstract Map getAttributes()

setAttributes

public abstract void setAttributes(Map attributes)

setEditedCompartment

public abstract void setEditedCompartment(Compartment comp)

getEditedCompartment

public abstract Compartment getEditedCompartment()

SigPath

Copyright © 2002-2005 Institute for Computational Biomedicine, All Rights Reserved.