org.sakaiproject.component.framework.portal
Class BasicPortalService

java.lang.Object
  extended byorg.sakaiproject.component.framework.portal.BasicPortalService
All Implemented Interfaces:
PortalService

public class BasicPortalService
extends Object
implements PortalService

PortalService is currently just a place where some definitions pertaining to portal access references can be centralized.

Version:
$Revision: 632 $
Author:
University of Michigan, CHEF Software Development Team

Field Summary
protected  CurrentService m_currentService
          Dependency: current service
protected  Logger m_logger
          Dependency: logging service
 
Fields inherited from interface org.sakaiproject.service.framework.portal.PortalService
PREF_REFRESH, PREF_REFRESH_SUPPRESS, SERVICE_NAME
 
Constructor Summary
BasicPortalService()
           
 
Method Summary
 void destroy()
          Returns to uninitialized state.
 String getCurrentClientWindowId()
          Format an identity string for the current request's client window: identifying the session, the specific site, and if present, a particular tool in the site.
 String getCurrentClientWindowId(String id)
          Format an identity string for the current request's client window: identifying the session, the specific site, and if provided, modified by this particular id.
 String getCurrentLocationId()
          Format an identity string for the current request's site-tool location: identifying the specific site, and if present, this particular tool in the site.
 String getCurrentLocationId(String id)
          Format an identity string for the current request's site-tool location: identifying the specific site, and if specified, the id parameter in place of a tool in the site.
 String getCurrentSiteId()
          Extract the site id from the current request.
 String getCurrentSitePageId()
          Extract the site page id from the current request.
 String getCurrentToolId()
          Extract the tool id from the current request.
 SessionState getCurrentToolState()
          Get the SessionState object for the tool in the current request.
 String getPresenceElementId(String toolId)
          Access the HTML element id that contains this tool's presence display.
 String getToolDocElementId(String toolId)
          Access the HTML element id that contains this tool's rendered document.
 String getToolTitleElementId(String toolId)
          Access the HTML element id that contains this tool's rendered title.
 void init()
          Final initialization, once all dependencies are set.
 void setCurrentService(CurrentService service)
          Dependency: current service.
 void setLogger(Logger service)
          Dependency: logging service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_logger

protected Logger m_logger
Dependency: logging service


m_currentService

protected CurrentService m_currentService
Dependency: current service

Constructor Detail

BasicPortalService

public BasicPortalService()
Method Detail

setLogger

public void setLogger(Logger service)
Dependency: logging service.

Parameters:
service - The logging service.

setCurrentService

public void setCurrentService(CurrentService service)
Dependency: current service.

Parameters:
service - The current service.

init

public void init()
Final initialization, once all dependencies are set.


destroy

public void destroy()
Returns to uninitialized state.


getCurrentSiteId

public String getCurrentSiteId()
Extract the site id from the current request.

Specified by:
getCurrentSiteId in interface PortalService
Returns:
The site id implied from the current request.

getCurrentSitePageId

public String getCurrentSitePageId()
Extract the site page id from the current request.

Specified by:
getCurrentSitePageId in interface PortalService
Returns:
The site page id implied from the current request.

getCurrentToolId

public String getCurrentToolId()
Extract the tool id from the current request.

Specified by:
getCurrentToolId in interface PortalService
Returns:
The tool id implied from the current request.

getCurrentToolState

public SessionState getCurrentToolState()
Get the SessionState object for the tool in the current request.

Specified by:
getCurrentToolState in interface PortalService
Returns:
The SessionState object for the tool in the current request.

getCurrentLocationId

public String getCurrentLocationId()
Format an identity string for the current request's site-tool location: identifying the specific site, and if present, this particular tool in the site.

Specified by:
getCurrentLocationId in interface PortalService
Returns:
The current request's location id.

getCurrentLocationId

public String getCurrentLocationId(String id)
Format an identity string for the current request's site-tool location: identifying the specific site, and if specified, the id parameter in place of a tool in the site.

Specified by:
getCurrentLocationId in interface PortalService
Parameters:
id - The tool id to append, if any
Returns:
The current request's location id.

getCurrentClientWindowId

public String getCurrentClientWindowId()
Format an identity string for the current request's client window: identifying the session, the specific site, and if present, a particular tool in the site.

Specified by:
getCurrentClientWindowId in interface PortalService
Returns:
The current request's location id.

getCurrentClientWindowId

public String getCurrentClientWindowId(String id)
Format an identity string for the current request's client window: identifying the session, the specific site, and if provided, modified by this particular id.

Specified by:
getCurrentClientWindowId in interface PortalService
Parameters:
id - The id modifier, skipped if null.
Returns:
The current request's location id.

getToolDocElementId

public String getToolDocElementId(String toolId)
Access the HTML element id that contains this tool's rendered document.

Specified by:
getToolDocElementId in interface PortalService
Parameters:
toolId - The tool id.
Returns:
The HTML element id that contains this tool's rendered document.

getToolTitleElementId

public String getToolTitleElementId(String toolId)
Access the HTML element id that contains this tool's rendered title.

Specified by:
getToolTitleElementId in interface PortalService
Parameters:
toolId - The tool id.
Returns:
The HTML element id that contains this tool's rendered title.

getPresenceElementId

public String getPresenceElementId(String toolId)
Access the HTML element id that contains this tool's presence display.

Specified by:
getPresenceElementId in interface PortalService
Parameters:
toolId - The tool id.
Returns:
The HTML element id that contains this tool's presence display.