View Javadoc

1   /*
2    * Copyright 2000-2001,2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.apache.jetspeed.portal;
18  
19  /***
20   * The PortletControl acts both as a decoration around a Portlet or PortletSet
21   * and also as the window manager for the enclosed Portlet(Set).
22   * As such it controls the operation that may be performed on this portlet
23   * and whether the portlet content should be displayed or not.
24   * PortletControl also delegates all Portlet and PortletSet methods to its
25   * inner object and can thus be transparently cascaded or substituted to
26   * a simple portlet wherever in a PSML object tree.
27   *
28   * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
29   * @version $Id: PortletControl.java,v 1.24 2004/02/23 04:05:35 jford Exp $
30   */
31  public interface PortletControl extends Portlet, PortletSet
32  {
33  
34      public String  COLOR               = "#CCCCCC";
35      public String  BACKGROUND_COLOR    = "#FFFFFF";
36      public String  TITLE_COLOR         = "#DDDDDD";
37      public String  WIDTH               = "100%";
38  
39      /***
40       * @return the PortletControl specific configuration
41       */
42      public PortletControlConfig getConfig();
43  
44      /***
45       * Sets the PortletControl specific configuration
46       * @param conf the new PortletControl configuration
47       */
48      public void setConfig(PortletControlConfig conf);
49  
50      /***
51       * Sets the portlet to be managed by this control
52       * 
53       * @param portlet the new portlet to be managed by the control
54       */
55      public void setPortlet(Portlet portlet);
56  
57      /***
58       * Retrieves the portlet managed by this control
59       * @return the portlet object managed or null
60       */
61      public Portlet getPortlet();
62  
63      /***
64       * Initializes the control and associates it with a portlet
65       *
66       * @param portlet the portlet to be managed by this control
67       */
68      public void init( Portlet portlet );
69  
70      /***
71       * Returns the color to use for displaying the portlet text
72       * 
73       * This method is deprecated and is only useful for ECS
74       * based Control implementation
75       * @deprecated
76       * @return the text color value in HTML format (#RRGGBB)
77       */
78      public String getColor();
79  
80      /***
81       * Sets the color to use for displaying the portlet text
82       * 
83       * This method is deprecated and is only useful for ECS
84       * based Control implementation
85       * @deprecated
86       * @param color the text color value in HTML format (#RRGGBB)
87       */
88      public void setColor(String color);
89  
90      /***
91       * Returns the color to use for displaying the portlet background
92       * 
93       * This method is deprecated and is only useful for ECS
94       * based Control implementation
95       * @deprecated
96       * @return the text color value in HTML format (#RRGGBB)
97       */
98      public String getBackgroundColor();
99  
100     /***
101      * Sets the color to use for displaying the portlet background
102      * 
103      * This method is deprecated and is only useful for ECS
104      * based Control implementation
105      * @deprecated
106      * @param backgroundColor the background color value in HTML format (#RRGGBB)
107      */
108     public void setBackgroundColor(String backgroundColor);
109 
110     /***
111      * Returns the color to use for displaying the portlet title
112      * 
113      * This method is deprecated and is only useful for ECS
114      * based Control implementation
115      * @deprecated
116      * @return the text color value in HTML format (#RRGGBB)
117      */
118     public String getTitleColor();
119 
120     /***
121      * Sets the color to use for displaying the portlet title
122      * 
123      * This method is deprecated and is only useful for ECS
124      * based Control implementation
125      * @deprecated
126      * @param titleColor the title color value in HTML format (#RRGGBB)
127      */
128     public void setTitleColor(String titleColor);
129 
130     /***
131      * Returns the width of the managed portlet relative to the size of
132      * portlet control.
133      * This method is deprecated and is only useful for ECS
134      * based Control implementation
135      * @deprecated
136      * @return the size value. May be expressed in percentages (eg, "80%")
137      */
138     public String getWidth();
139 
140     /***
141      * Sets the width of the managed portlet relative to the size of
142      * portlet control.
143      * 
144      * This method is deprecated and is only useful for ECS
145      * based Control implementation
146      * @deprecated
147      * @param width the width of portlet. Must be a positive, non nul integer
148      */
149     public void setWidth(int width);
150 
151     /***
152      * Sets the width of the managed portlet relative to the size of
153      * portlet control.
154      * 
155      * This method is deprecated and is only useful for ECS
156      * based Control implementation
157      * @deprecated
158      * @param width the width of portlet. Must be parseable as a positive, non 
159      * nul integer or a percentage
160      */
161     public void setWidth(String width);
162 }