net.sf.tacos.demo.partial
Class ProgressCounter

java.lang.Object
  extended byorg.apache.hivemind.impl.BaseLocatable
      extended byorg.apache.tapestry.AbstractComponent
          extended byorg.apache.tapestry.BaseComponent
              extended byorg.apache.tapestry.AbstractPage
                  extended byorg.apache.tapestry.html.BasePage
                      extended bynet.sf.tacos.demo.partial.ProgressCounter
All Implemented Interfaces:
IComponent, IDirect, IPage, IRender, ITemplateComponent, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder

public abstract class ProgressCounter
extends BasePage
implements IDirect

Demonstrates use of ProgressBar component to render progress of threaded work.

Author:
Jesse Kuhnert

Constructor Summary
ProgressCounter()
           
 
Method Summary
abstract  AjaxDirectService getAjaxEngineService()
          Injected ajax engine
 String getEstimatedTimeLeft()
          Calculates amount of time left, in minutes, for task.
abstract  ProgressWorkThread getProgressWorker()
          Worker doing import
 String getRefreshLink()
          Generates a link to refresh with.
abstract  long getStartTime()
          Gets start time
 boolean isImporting()
           
abstract  void setProgressWorker(ProgressWorkThread worker)
          sets worker doing import
abstract  void setStartTime(long time)
          Set time - in milliseconds - that worker started
 void startTask(IRequestCycle cycle)
          Starts the progress task.
 void trigger(IRequestCycle cycle)
          
 
Methods inherited from class org.apache.tapestry.html.BasePage
getResponseContentType
 
Methods inherited from class org.apache.tapestry.AbstractPage
addPageAttachListener, addPageBeginRenderListener, addPageDetachListener, addPageEndRenderListener, addPageRenderListener, addPageValidateListener, attach, beginPageRender, beginResponse, detach, endPageRender, firePageAttached, firePageBeginRender, firePageDetached, firePageEndRender, firePageValidate, getChangeObserver, getEngine, getExtendedId, getGlobal, getIdPath, getLocale, getNestedComponent, getOutputEncoding, getPageName, getRequestCycle, getVisit, initialize, removePageAttachListener, removePageBeginRenderListener, removePageDetachListener, removePageEndRenderListener, removePageRenderListener, removePageValidateListener, renderPage, setChangeObserver, setLocale, setPageName, validate
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponent, getComponents, getContainer, getId, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.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.IDirect
isStateful
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

ProgressCounter

public ProgressCounter()
Method Detail

getAjaxEngineService

public abstract AjaxDirectService getAjaxEngineService()
Injected ajax engine


getProgressWorker

public abstract ProgressWorkThread getProgressWorker()
Worker doing import


setProgressWorker

public abstract void setProgressWorker(ProgressWorkThread worker)
sets worker doing import


setStartTime

public abstract void setStartTime(long time)
Set time - in milliseconds - that worker started


getStartTime

public abstract long getStartTime()
Gets start time


isImporting

public boolean isImporting()
Returns:
True if currently importing a casebase file.

getEstimatedTimeLeft

public String getEstimatedTimeLeft()
Calculates amount of time left, in minutes, for task.

Returns:

getRefreshLink

public String getRefreshLink()
Generates a link to refresh with.


trigger

public void trigger(IRequestCycle cycle)

Specified by:
trigger in interface IDirect

startTask

public void startTask(IRequestCycle cycle)
               throws Exception
Starts the progress task.

Parameters:
cycle -
Throws:
Exception