KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > pluto > services > information > DynamicInformationProvider


1 /*
2  * Copyright 2003,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
18  */

19
20 package org.apache.pluto.services.information;
21
22 import javax.portlet.PortletMode;
23 import javax.portlet.WindowState;
24
25 import org.apache.pluto.om.window.PortletWindow;
26  
27 /**
28  * Provide information from the portal to portlet container
29  * that are request dependend.
30  */

31 public interface DynamicInformationProvider
32 {
33
34
35      /**
36       * Returns the content type the portlet should use in its response
37       * The content type only includes the content type, not the character set.
38       *
39       * @return the content type to use for the response
40       */

41      public String JavaDoc getResponseContentType();
42
43      /**
44       * Gets a list of mime types which the portal accepts for the response.
45       * This list is ordered with the most preferable types listed first.
46       * <p>
47       * The content type only includes the content type, not the
48       * character set.
49       *
50       * @return an java.util.Iterator of content types for the response
51       */

52      public java.util.Iterator JavaDoc getResponseContentTypes();
53
54     /**
55      * Returns an URL pointing to the given portlet window
56      *
57      * @param portletWindow the portlet Window
58      *
59      * @return the URL to the given portlet
60      */

61      public PortletURLProvider getPortletURLProvider(PortletWindow portletWindow);
62
63     /**
64      * Returns the ResourceURLProvider to create URLs pointing to a resource
65      * in a web application.
66      *
67      * @param portletWindow the portlet Window
68      *
69      * @return the URL to a resource
70      */

71      public ResourceURLProvider getResourceURLProvider(PortletWindow portletWindow);
72
73     /**
74      * Returns the portlet action provider for the given portlet window
75      *
76      * @param portletWindow the portlet Window
77      *
78      * @return the action provider for the given portlet
79      */

80      public PortletActionProvider getPortletActionProvider(PortletWindow portletWindow);
81
82     /**
83      * Returns the current <CODE>PortletMode</CODE> of the given portlet window.
84      *
85      * @param portletWindow the portlet Window
86      * @return the portlet mode
87      */

88     public PortletMode getPortletMode(PortletWindow portletWindow);
89
90     /**
91      * Returns the <CODE>WindowState</CODE> of the given portlet window.
92      *
93      * @param portletWindow the portlet window
94      * @return the portlet window state
95      */

96     public WindowState getWindowState(PortletWindow portletWindow);
97
98     /**
99      * Returns true if the portal supports the requested
100      * portlet mode.
101      *
102      * @param mode portlet mode requested to support
103      *
104      * @return true, if the portal support requested portlet mode
105      */

106
107     public boolean isPortletModeAllowed(PortletMode mode);
108
109
110     /**
111      * Returns true if the portal supports the requested
112      * window state.
113      *
114      * @param state window state requested to support
115      *
116      * @return true, if the portal support requested window state
117      */

118
119     public boolean isWindowStateAllowed(WindowState state);
120
121 }
122
Popular Tags