1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.om.common.portlet;
18
19 import java.io.Serializable;
20 import java.util.Collection;
21
22 import org.apache.jetspeed.om.common.GenericMetadata;
23 import org.apache.jetspeed.om.common.JetspeedServiceReference;
24 import org.apache.jetspeed.om.common.UserAttribute;
25 import org.apache.jetspeed.om.common.UserAttributeRef;
26 import org.apache.pluto.om.portlet.PortletDefinition;
27 import org.apache.pluto.om.portlet.PortletDefinitionList;
28 import org.apache.pluto.om.servlet.WebApplicationDefinition;
29
30 /***
31 * MutablePortletApplication
32 *
33 * Extends the <code>org.apache.pluto.om.portlet.PortletApplicationDefinition</code>
34 * interface adding mutator methods for those attributes that do not have them
35 * so as to make manipulating the portlet OM easier.
36 *
37 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
38 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
39 * @version $Id: MutablePortletApplication.java 545987 2007-06-11 01:46:18Z taylor $
40 *
41 */
42 public interface MutablePortletApplication extends PortletApplication, Serializable
43 {
44 public static final String PREFS_ROOT ="portlet_application";
45
46 /***
47 * Sets the metadata from the extended jetspeed-portlet.xml
48 *
49 * @param metadata
50 */
51 public void setMetadata(GenericMetadata metadata);
52
53 /***
54 * Associates the web application definition with this portlet application defintion.
55 *
56 * @param wad
57 */
58 void setWebApplicationDefinition(WebApplicationDefinition wad);
59
60 /***
61 * @param name
62 */
63 void setName(String name);
64
65 /***
66 * @param pd
67 */
68 void addPortletDefinition(PortletDefinition pd);
69
70 /***
71 * @param portlets
72 */
73 void setPortletDefinitionList(PortletDefinitionList portlets);
74
75 /***
76 * <p>Adds a user attribute to the user attribute set.</p>
77 * @param userAttribute The user attribute.
78 */
79 void addUserAttribute(UserAttribute userAttribute);
80
81 /***
82 * <p>Adds a user attribute to the user attribute set.</p>
83 * @param userAttribute The user attribute.
84 */
85 void addUserAttribute(String name, String description);
86
87 /***
88 * <p>Sets a user-attribute-ref to the collection of user attribute refs associated
89 * with this portlet application.</p>
90 */
91 void setUserAttributeRefs(Collection userAttributeRefs);
92
93 /***
94 * <p>Adds a user attribute ref to the user attribute ref set.</p>
95 * @param userAttributeRef The user attribute ref.
96 */
97 void addUserAttributeRef(UserAttributeRef userAttributeRef);
98
99 /***
100 * <p>Sets a user-attribute to the collection of user attributes associated
101 * with this portlet application.</p>
102 */
103 void setUserAttributes(Collection userAttributes);
104
105 void setApplicationIdentifier(String applicationIndentifier);
106
107 /***
108 * @param string
109 */
110 void setDescription(String string);
111
112 /***
113 *
114 * @param version
115 */
116 void setVersion(String version);
117
118 /***
119 * Sets the Portlet Application type.
120 * Valid values are:
121 * <p>
122 * {@link MutablePortletApplication#WEBAPP} - A standard web application, stored in the web application
123 * server's web application space.
124 * <p>
125 * {@link MutablePortletApplication#LOCAL} - A local portlet application stored within Jetspeed's web application.
126 * <p>
127 * @param type The type of portlet application.
128 */
129 void setApplicationType(int type);
130
131 /***
132 * Marks this application as a standard web application,
133 * stored in the web application server's web application space.
134 */
135 public static final int WEBAPP = 0;
136
137 /***
138 * Marks this application as a LOCAL portlet application,
139 * stored in Jetspeed managed portlet application space.
140 */
141 public static final int LOCAL = 1;
142
143 /***
144 * Marks this application as a INTERNAL portlet application,
145 * stored in Jetspeed managed portlet application space.
146 */
147 public static final int INTERNAL = 2;
148
149 /***
150 * Adds a Jetspeed component service to the collection of component services allowed for this application.
151 *
152 * @param service The component service being added.
153 */
154 void addJetspeedService(JetspeedServiceReference service);
155
156 /***
157 * The checksum on the portlet XML from the last deployment
158 *
159 * @param checksum
160 */
161 void setChecksum(long checksum);
162
163 /***
164 * The checksum on the portlet XML from the last deployment
165 *
166 * @return
167 */
168 long getChecksum();
169
170 /***
171 * <p>
172 * Set the Jetspeed Security Constraint reference for this portlet application.
173 * This security constraint name references a Jetspeed-specific Security Constraint.
174 * Security Constraints are not Java Security Permissions, but a
175 * Jetspeed specific way of securing portlets, also known as PSML constraints.
176 * See the <i>page.security</i> file for examples of defining security constraint definitions.
177 * If the portlet application does not define a constraint, then no security constraints
178 * will be applied to this portlet. Security constraints for a portlet are normally
179 * checking during the render process of a portlet.
180 * </p>
181 *
182 * @param constraint The name of the Security Definition defined in
183 * the Jetspeed Security Constraints
184 */
185 void setJetspeedSecurityConstraint(String constraint);
186
187 }