01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.pluto.spi;
18:
19: import java.util.Map;
20:
21: import javax.portlet.PortletMode;
22: import javax.portlet.WindowState;
23: import javax.portlet.PortletSecurityException;
24:
25: /**
26: * Defines the interface used by the portlet container to create Portal URLs.
27: * This provider must be implemented by the Portal and provided via the
28: * container services upon initialization of the container.
29: *
30: * @version 1.0
31: */
32: public interface PortletURLProvider {
33:
34: /**
35: * Sets the new portlet mode at the URL. If no mode is set at the URL the
36: * currently active mode is used.
37: * @param mode the new portlet mode
38: */
39: public void setPortletMode(PortletMode mode);
40:
41: /**
42: * Sets the new window state at the URL. If no state is set at the URL the
43: * currently active state is used.
44: * @param state the new window state
45: */
46: public void setWindowState(WindowState state);
47:
48: /**
49: * Specifies whether or not this request should be considered an action
50: * request. If the value specified is false, a render request will be
51: * assumed.
52: */
53: public void setAction(boolean action);
54:
55: /**
56: * By calling this method the URL is defined as a secure URL.
57: */
58: public void setSecure() throws PortletSecurityException;
59:
60: /**
61: * Determine whether or not this url provider
62: * supports secure urls.
63: *
64: * @return
65: * @throws PortletSecurityException
66: */
67: public boolean isSecureSupported();
68:
69: /**
70: * Removes all pre-existing parameters in this URL
71: */
72: public void clearParameters();
73:
74: /**
75: * Sets the given parameters as parameters into the URL, Removes all
76: * previously set parameters.
77: * @param parameters a map containing the name [java.lang.String] and value
78: * [java.lang.String[]] of the parameters.
79: */
80: public void setParameters(Map parameters);
81:
82: /**
83: * Returns the URL in string format. This method should only be called
84: * once.
85: * @return the URL
86: */
87: public String toString();
88: }
|