01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/site/tags/sakai_2-4-1/site-api/api/src/java/org/sakaiproject/site/api/ToolConfiguration.java $
03: * $Id: ToolConfiguration.java 7517 2006-04-09 13:01:26Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.site.api;
21:
22: import java.io.Serializable;
23:
24: import org.sakaiproject.tool.api.Placement;
25:
26: /**
27: * <p>
28: * ToolConfiguration is a the placement of a tool on a site page; a placement with layout information.
29: * </p>
30: */
31: public interface ToolConfiguration extends Placement, Serializable {
32: /**
33: * @return the layout hints for this tool.
34: */
35: public String getLayoutHints();
36:
37: /**
38: * Set the layout hints.
39: *
40: * @param hints
41: * The layout hints.
42: */
43: public void setLayoutHints(String hints);
44:
45: /**
46: * If the layout hints are a row,col format, return the two numbers, else return null.
47: */
48: public int[] parseLayoutHints();
49:
50: /**
51: * @return the skin to use for this tool.
52: */
53: public String getSkin();
54:
55: /**
56: * @return the page id for this tool.
57: */
58: public String getPageId();
59:
60: /**
61: * @return the site id for this tool.
62: */
63: public String getSiteId();
64:
65: /**
66: * Access the SitePage in which this tool configuration lives.
67: *
68: * @return the SitePage in which this tool configuration lives.
69: */
70: public SitePage getContainingPage();
71:
72: /**
73: * Move this tool one step towards the start of the order of tools in this page.
74: */
75: public void moveUp();
76:
77: /**
78: * Move this tool one step towards the end of the order of tools in this page.
79: */
80: public void moveDown();
81:
82: /**
83: * Access the tool's order in the page.
84: *
85: * @return the tool's order in the page.
86: */
87: public int getPageOrder();
88: }
|