org.sakaiproject.util
Class Placement

java.lang.Object
  extended byorg.sakaiproject.util.Placement
All Implemented Interfaces:
Placement
Direct Known Subclasses:
BaseToolConfiguration

public class Placement
extends Object
implements Placement

Placement is a utility class that implements the Placement interface.

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

Field Summary
protected  Properties m_config
          Placement configuration Properties (mutable).
protected  String m_context
          The placement context.
protected  String m_id
          The well known identifier string.
protected  String m_title
          The title string.
protected  Tool m_tool
          Tool placed.
 
Constructor Summary
Placement()
          Construct
Placement(String id, Tool tool, Properties config, String context, String title)
          Construct.
 
Method Summary
 boolean equals(Object obj)
          
 Properties getConfig()
          Access the configuration properties, combined from placement and registration, for the tool placement. Placement values override registration. Access is read only.
 String getContext()
          Access the placement context.
 String getId()
          Get the tool placement id.
 Properties getPlacementConfig()
          Access the configuration properties for this tool placement - not including those from the tool registration.
 String getTitle()
          Access the tool placement title.
 Tool getTool()
          Access the tool placeed with this placement.
 int hashCode()
          
 void save()
          Save any changes to the placement.
 void setContext(String context)
          Set the context.
 void setId(String id)
          Set the id.
 void setTitle(String title)
          Set the title for this tool placement. Non-null values override the tool registration title.
 void setTool(Tool tool)
          Set the tool for this tool placement.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_config

protected Properties m_config
Placement configuration Properties (mutable).


m_context

protected String m_context
The placement context.


m_id

protected String m_id
The well known identifier string.


m_title

protected String m_title
The title string.


m_tool

protected Tool m_tool
Tool placed.

Constructor Detail

Placement

public Placement()
Construct


Placement

public Placement(String id,
                 Tool tool,
                 Properties config,
                 String context,
                 String title)
Construct.

Parameters:
id - The placement id.
tool - The tool to place.
config - The particular placement config Properties to use.
context - The particular placement context to use.
title - The tool placement title.
Method Detail

equals

public boolean equals(Object obj)


getConfig

public Properties getConfig()
Access the configuration properties, combined from placement and registration, for the tool placement. Placement values override registration. Access is read only.

Specified by:
getConfig in interface Placement
Returns:
The read-only combined configuration properties for the tool.

getContext

public String getContext()
Access the placement context.

Specified by:
getContext in interface Placement
Returns:
The context associated with this tool placement.

getId

public String getId()
Description copied from interface: Placement
Get the tool placement id.

Specified by:
getId in interface Placement
Returns:
The tool placement id.

getPlacementConfig

public Properties getPlacementConfig()
Access the configuration properties for this tool placement - not including those from the tool registration.

Specified by:
getPlacementConfig in interface Placement
Returns:
The configuration properties for this tool placement - not including those from the tool registration.

getTitle

public String getTitle()
Description copied from interface: Placement
Access the tool placement title.

Specified by:
getTitle in interface Placement
Returns:
The tool placement title.

getTool

public Tool getTool()
Description copied from interface: Placement
Access the tool placeed with this placement.

Specified by:
getTool in interface Placement
Returns:
The tool placed with this placement.

hashCode

public int hashCode()


setContext

public void setContext(String context)
Set the context.

Parameters:
context - The context to set.

setId

public void setId(String id)
Set the id.

Parameters:
id - The id to set.

setTitle

public void setTitle(String title)
Set the title for this tool placement. Non-null values override the tool registration title.

Specified by:
setTitle in interface Placement
Parameters:
title - The tool placement title.

setTool

public void setTool(Tool tool)
Set the tool for this tool placement.

Specified by:
setTool in interface Placement
Parameters:
tool - The tool.

save

public void save()
Save any changes to the placement.

Specified by:
save in interface Placement