org.telscenter.pas.steps
Class HelloWorld

java.lang.Object
  extended by java.beans.beancontext.BeanContextChildSupport
      extended by org.telscenter.pas.beans.PasStep
          extended by org.telscenter.pas.steps.HelloWorld
All Implemented Interfaces:
java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextChildComponentProxy, java.beans.beancontext.BeanContextServiceRevokedListener, java.beans.beancontext.BeanContextServicesListener, java.io.Serializable, java.util.EventListener, net.sf.sail.common.beansupport.ITitleAware, IAuthorNotation, IHelp, IWorkReporter

public class HelloWorld
extends PasStep
implements IWorkReporter

A generic Pas step type, used for testing and demonstration purposes.

Author:
turadg
See Also:
Serialized Form

Field Summary
protected  net.sf.sail.core.beans.service.AgentService agentService
           
protected  net.sf.sail.core.beans.service.SessionService sessionService
           
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
 
Constructor Summary
HelloWorld()
           
 
Method Summary
protected  void consumeService(java.beans.beancontext.BeanContextServices bcs, java.lang.Class<? extends java.lang.Object> serviceClass)
           
 java.awt.Component getComponent()
           
 java.util.List<javax.swing.JLabel> getCurrentAnswers()
           
 java.util.List<java.lang.String> getCurrentPrompts()
           
 java.util.List<javax.swing.JPanel> getCurrentStepParts()
           
 java.util.Map<java.lang.String,java.lang.String> getEntityToPromptMap()
          Returns a mapping(s) for this step Note that steps like Note can have multiple Rims because if it were a multi-part note step.
 java.lang.String getMessage()
          gets the current message
 java.lang.Integer getPossibleScore()
           
 javax.swing.JPanel getReportForLearner()
          A JPanel presenting a report of the learner's work suitable for the learner themself.
 javax.swing.JPanel getReportForLearner(NavigateAction navigateAction)
          for special navigation options
 com.lowagie.text.pdf.PdfPCell getReportForLearnerPDF()
           
 com.lowagie.text.pdf.PdfPCell getReportForLearnerPDF(net.sf.sail.core.beans.service.AnnotationService annotationService)
           
 javax.swing.JPanel getReportForLearnerWithAnnotations()
           
 javax.swing.JPanel getReportForLearnerWithAnnotations(NavigateAction navigateAction)
          for special navigation options
 net.sf.sail.core.entity.Rim<java.lang.String> getWorkRim()
           
 net.sf.sail.core.entity.ISock<java.lang.String> getWorkSock()
           
 void initStepParts()
           
protected  java.lang.String makeMessageFromSock()
           
static void saveMessage(java.lang.String message)
           
 void setMessage(java.lang.String message)
          sets the current message
 void setPossibleScore(java.lang.Integer possibleScore)
           
 void setWorkRim(net.sf.sail.core.entity.Rim<java.lang.String> workRim)
           
 void setWorkSock(net.sf.sail.core.entity.ISock<java.lang.String> workSock)
           
protected  void updateLabelMessage()
           
 
Methods inherited from class org.telscenter.pas.beans.PasStep
addPropertyChangeListener, afterComponentAdded, beforeSessionStart, getAuthorNotes, getHelpId, getHintSet, getHoverString, getTitle, getType, hasHints, initializeBeanContextResources, initializePasStep, removePropertyChangeListener, serviceAvailable, setAuthorNotes, setBeanContext, setHintSet, setHoverString, setTitle, stepEnter, stepExit, toString
 
Methods inherited from class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceRevoked, validatePendingSetBeanContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

agentService

protected transient net.sf.sail.core.beans.service.AgentService agentService

sessionService

protected transient net.sf.sail.core.beans.service.SessionService sessionService
Constructor Detail

HelloWorld

public HelloWorld()
Method Detail

consumeService

protected void consumeService(java.beans.beancontext.BeanContextServices bcs,
                              java.lang.Class<? extends java.lang.Object> serviceClass)
Overrides:
consumeService in class PasStep

saveMessage

public static void saveMessage(java.lang.String message)

getMessage

public java.lang.String getMessage()
gets the current message

Returns:

setMessage

public void setMessage(java.lang.String message)
sets the current message

Parameters:
message -

getComponent

public java.awt.Component getComponent()
Specified by:
getComponent in interface java.beans.beancontext.BeanContextChildComponentProxy

makeMessageFromSock

protected java.lang.String makeMessageFromSock()

updateLabelMessage

protected void updateLabelMessage()

getReportForLearner

public javax.swing.JPanel getReportForLearner()
Description copied from interface: IWorkReporter
A JPanel presenting a report of the learner's work suitable for the learner themself.

Specified by:
getReportForLearner in interface IWorkReporter
Returns:

getReportForLearnerPDF

public com.lowagie.text.pdf.PdfPCell getReportForLearnerPDF()

getReportForLearnerWithAnnotations

public javax.swing.JPanel getReportForLearnerWithAnnotations()
Specified by:
getReportForLearnerWithAnnotations in interface IWorkReporter

getCurrentAnswers

public java.util.List<javax.swing.JLabel> getCurrentAnswers()
Specified by:
getCurrentAnswers in interface IWorkReporter

getCurrentPrompts

public java.util.List<java.lang.String> getCurrentPrompts()
Specified by:
getCurrentPrompts in interface IWorkReporter

getCurrentStepParts

public java.util.List<javax.swing.JPanel> getCurrentStepParts()
Specified by:
getCurrentStepParts in interface IWorkReporter

initStepParts

public void initStepParts()
Specified by:
initStepParts in interface IWorkReporter

getEntityToPromptMap

public java.util.Map<java.lang.String,java.lang.String> getEntityToPromptMap()
Description copied from interface: IWorkReporter
Returns a mapping(s) for this step Note that steps like Note can have multiple Rims because if it were a multi-part note step.

Specified by:
getEntityToPromptMap in interface IWorkReporter
Returns:
Map rimname<->prompt mapping for this step.

getPossibleScore

public java.lang.Integer getPossibleScore()
Specified by:
getPossibleScore in interface IWorkReporter

setPossibleScore

public void setPossibleScore(java.lang.Integer possibleScore)
Specified by:
setPossibleScore in interface IWorkReporter

getWorkRim

public net.sf.sail.core.entity.Rim<java.lang.String> getWorkRim()
Returns:
the workRim

setWorkRim

public void setWorkRim(net.sf.sail.core.entity.Rim<java.lang.String> workRim)
Parameters:
workRim - the workRim to set

getWorkSock

public net.sf.sail.core.entity.ISock<java.lang.String> getWorkSock()
Returns:
the workSock

setWorkSock

public void setWorkSock(net.sf.sail.core.entity.ISock<java.lang.String> workSock)
Parameters:
workSock - the workSock to set

getReportForLearner

public javax.swing.JPanel getReportForLearner(NavigateAction navigateAction)
Description copied from interface: IWorkReporter
for special navigation options

Specified by:
getReportForLearner in interface IWorkReporter
Parameters:
navigateAction - - navigates the project to that step
Returns:

getReportForLearnerWithAnnotations

public javax.swing.JPanel getReportForLearnerWithAnnotations(NavigateAction navigateAction)
Description copied from interface: IWorkReporter
for special navigation options

Specified by:
getReportForLearnerWithAnnotations in interface IWorkReporter
Parameters:
navigateAction - - navigates the project to that step
Returns:

getReportForLearnerPDF

public com.lowagie.text.pdf.PdfPCell getReportForLearnerPDF(net.sf.sail.core.beans.service.AnnotationService annotationService)
Specified by:
getReportForLearnerPDF in interface IWorkReporter


Copyright © 2004-2008 TELS Center. All Rights Reserved.