001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/tool/tags/sakai_2-4-1/tool-api/api/src/java/org/sakaiproject/tool/api/Placement.java $
003: * $Id: Placement.java 7791 2006-04-13 21:53:16Z ggolden@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.tool.api;
021:
022: import java.util.Properties;
023:
024: /**
025: * <p>
026: * Tool Placement models a particular tool places in a particular place within a Sakai navigation or portal location.
027: * </p>
028: */
029: public interface Placement {
030: /**
031: * Access the configuration properties, combined from placement and registration, for the tool placement. Placement values override registration. Access is read only.
032: *
033: * @return The read-only combined configuration properties for the tool.
034: */
035: Properties getConfig();
036:
037: /**
038: * Access the placement context.
039: *
040: * @return The context associated with this tool placement.
041: */
042: String getContext();
043:
044: /**
045: * Get the tool placement id.
046: *
047: * @return The tool placement id.
048: */
049: String getId();
050:
051: /**
052: * Access the configuration properties for this tool placement - not including those from the tool registration.
053: *
054: * @return The configuration properties for this tool placement - not including those from the tool registration.
055: */
056: Properties getPlacementConfig();
057:
058: /**
059: * Access the tool placement title.
060: *
061: * @return The tool placement title.
062: */
063: String getTitle();
064:
065: /**
066: * Access the tool placed with this placement.
067: *
068: * @return The tool placed with this placement.
069: */
070: Tool getTool();
071:
072: /**
073: * Access the well-known tool-id of the tool associated with this placement.
074: *
075: * @return The tool id associated with this placement.
076: */
077: String getToolId();
078:
079: /**
080: * Set the title for this tool placement. Non-null values override the tool registration title.
081: *
082: * @param title
083: * The tool placement title.
084: */
085: void setTitle(String title);
086:
087: /**
088: * Set the tool for this tool placement.
089: *
090: * @param toolId
091: * The tool's well-known tool-id.
092: * @param tool
093: * The tool.
094: */
095: void setTool(String toolId, Tool tool);
096:
097: /**
098: * Save any changes to the placement.
099: */
100: void save();
101: }
|