org.sakaiproject.tool.presentation
Class PresentationTool

java.lang.Object
  extended byorg.sakaiproject.tool.presentation.PresentationTool

public class PresentationTool
extends Object

Presentation Tool

Version:
$Revision: 632 $
Author:
Mark Norton

Nested Class Summary
 class PresentationTool.PresentationBean
          Our local decorated presentation object.
 
Field Summary
protected  boolean allowShow
          Determines if this user has access only or has write ability
protected  String currentMode
          These flags indicate our relationship to the show or slides.
protected  Presentation currentPresentation
           
protected  int currentSlidePos
           
protected  org.osid.shared.Id id
          Private properties.
protected  org.osid.id.IdManager idMgr
          Service Dependency: IdManager.
protected  Logger logger
          Service Dependency: Logger - eventually this will be the Sakai logger.
protected  List m_presentations
           
protected  List presentations
          A list (PresentationView) of presentations to be displayed.
protected  PresentationManager prMgr
          Service Dependency: Presentation Service.
 
Constructor Summary
PresentationTool()
          noarg constructor, required for managed beans.
 
Method Summary
 boolean getAllowShow()
           
 org.osid.id.IdManager getIdMgr()
          Return the IdManager service.
 String getInstructionMessage()
           
 boolean getIsShowing()
          Determine whether or not the current presentation is showing.
protected  FacesMessage getLocalizedMessage(String resourceBundlePropertyName, String messageParameter)
           
 List getPresentations()
          Return the list of presentations (decorated).
 PresentationManager getPrMgr()
          Return the PresentationManager service.
 String getShowPosition()
          Return a string indicating the current show position as an example: "1 of 5" the expectation is that there will be a message like Viewing: 1 of 5 Viewing: No current presentation
 Slide getSlide()
          Get the current slide.
 int getSlideCount()
           
protected  List loadPresentations()
           
protected  ObservingCourier makeResourceCourier(String pattern)
          Return an EventsObservingCourier for the particular reference area.
 String processActionEnd()
          Process the "End" action.
 String processActionExit()
          Process the "Exit" action.
 String processActionHelp()
          Process the "Help" action.
 String processActionJoin()
          Process the "Join" action.
 String processActionNext()
          Process the "Next" action.
 String processActionPrevious()
          Process the "Previous" action.
 String processActionRefresh()
          Handle a refresh view event.
 String processActionRefreshPresentations()
          Process the "Refresh Presentations" action.
 String processActionView()
          Process the "View" action.
protected  void refreshPresentations()
          Refresh the list of presentations.
 void setIdMgr(org.osid.id.IdManager mgr)
          Set the IdManager service.
 void setInstructionMessage(String message)
           
protected  void setPresentations(List list)
          Set the decorated presentation list to be decorated objects of this list
 void setPrMgr(PresentationManager mgr)
          Set the PrsentationManager service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idMgr

protected org.osid.id.IdManager idMgr
Service Dependency: IdManager.


logger

protected Logger logger
Service Dependency: Logger - eventually this will be the Sakai logger.


prMgr

protected PresentationManager prMgr
Service Dependency: Presentation Service.


id

protected org.osid.shared.Id id
Private properties.


presentations

protected List presentations
A list (PresentationView) of presentations to be displayed.


currentPresentation

protected Presentation currentPresentation

m_presentations

protected List m_presentations

currentMode

protected String currentMode
These flags indicate our relationship to the show or slides.


currentSlidePos

protected int currentSlidePos

allowShow

protected boolean allowShow
Determines if this user has access only or has write ability

Constructor Detail

PresentationTool

public PresentationTool()
noarg constructor, required for managed beans. Note: You are NOT service injected at this point.

Method Detail

getInstructionMessage

public String getInstructionMessage()

setInstructionMessage

public void setInstructionMessage(String message)

getLocalizedMessage

protected FacesMessage getLocalizedMessage(String resourceBundlePropertyName,
                                           String messageParameter)

setPresentations

protected void setPresentations(List list)
Set the decorated presentation list to be decorated objects of this list

Parameters:
list - The set of Presentations for the list.

loadPresentations

protected List loadPresentations()

refreshPresentations

protected void refreshPresentations()
Refresh the list of presentations.


makeResourceCourier

protected ObservingCourier makeResourceCourier(String pattern)
Return an EventsObservingCourier for the particular reference area.

Parameters:
pattern -

getIdMgr

public org.osid.id.IdManager getIdMgr()
Return the IdManager service.


setIdMgr

public void setIdMgr(org.osid.id.IdManager mgr)
Set the IdManager service.


getPrMgr

public PresentationManager getPrMgr()
Return the PresentationManager service.


setPrMgr

public void setPrMgr(PresentationManager mgr)
Set the PrsentationManager service.


getPresentations

public List getPresentations()
Return the list of presentations (decorated). Also check to see if the user is allowed to update the content area so the proper buttons are made available.


getSlide

public Slide getSlide()
Get the current slide.

Returns:
curent Slide

getIsShowing

public boolean getIsShowing()
Determine whether or not the current presentation is showing.

Returns:
True is the current presentation is showing.

getAllowShow

public boolean getAllowShow()

getSlideCount

public int getSlideCount()

getShowPosition

public String getShowPosition()
Return a string indicating the current show position as an example: "1 of 5" the expectation is that there will be a message like Viewing: 1 of 5 Viewing: No current presentation

Returns:
Position Insdicator String

processActionView

public String processActionView()
Process the "View" action.

Returns:
the navigation outcome.

processActionJoin

public String processActionJoin()
Process the "Join" action.

Returns:
the navigation outcome.

processActionRefreshPresentations

public String processActionRefreshPresentations()
Process the "Refresh Presentations" action. This causes the presentation list to be reloaded.

Returns:
the navigation outcome.

processActionRefresh

public String processActionRefresh()
Handle a refresh view event. This is only needed while watching a presentation.


processActionHelp

public String processActionHelp()
Process the "Help" action. This causes the active show to end.

Returns:
the navigation outcome.

processActionEnd

public String processActionEnd()
Process the "End" action. This causes the active show to end.

Returns:
the navigation outcome.

processActionNext

public String processActionNext()
Process the "Next" action. This causes the current show to move to the next slide. It will not go past the end of the show.\

Returns:
the navigation outcome.

processActionPrevious

public String processActionPrevious()
Process the "Previous" action. This causes the current show to move the current slide to the previous slide. It will not go past the first slide.

Returns:
the navigation outcome.

processActionExit

public String processActionExit()
Process the "Exit" action. Handle the exit even out of the viewer page.

Returns:
the navigation outcome.