001: /*
002: * Copyright 2000-2001,2004 The Apache Software Foundation.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: /*
018:
019: */
020:
021: package org.apache.wsrp4j.consumer;
022:
023: /**
024: * <p>This interface provides methods to generate URL templates.</p>
025: * <p>The generated templates will be transmitted to Producers (or respectively portlets)
026: * that are willing to properly write URLs for a Consumer. (With templates the Consumer
027: * indicates how it needs URLs formatted in order to process them properly.)</p>
028: *
029: * @author <a href="mailto:stefan.behl@de.ibm.com">Stefan Behl</a>
030: *
031: * @version 1.1
032: */
033: public interface URLTemplateComposer {
034:
035: /**
036: * Sets the URLGenerator to be used.
037: */
038: public void setURLGenerator(URLGenerator urlGenerator);
039:
040: /**
041: * Creates a blocking action template. Includes tokens for url-type, portletMode,
042: * navigationalState, interactionState and windowState to be replaced by the producer.
043: *
044: * @return String representing the entire template.
045: */
046: public String createBlockingActionTemplate(
047: boolean includePortletHandle,
048: boolean includeUserContextKey,
049: boolean includePortletInstanceKey, boolean includeSessionID);
050:
051: /**
052: * Creates a secure blocking action template. Includes tokens for url-type,
053: * portletMode, navigationalState, interactionState, windowState and secureURL to be replaced by
054: * the producer.
055: *
056: * @return String representing the entire template.
057: */
058: public String createSecureBlockingActionTemplate(
059: boolean includePortletHandle,
060: boolean includeUserContextKey,
061: boolean includePortletInstanceKey, boolean includeSessionID);
062:
063: /**
064: * Creates a render template. Includes tokens for url-type, portletMode,
065: * navigationalState, interactionState and windowState to be replaced by the producer.
066: *
067: * @return String representing the entire template.
068: */
069: public String createRenderTemplate(boolean includePortletHandle,
070: boolean includeUserContextKey,
071: boolean includePortletInstanceKey, boolean includeSessionID);
072:
073: /**
074: * Creates a secure render template. Includes tokens for url-type, portletMode,
075: * navigationalState, interactionState, windowState and secureURL to be replaced by the producer.
076: *
077: * @return String representing the entire template.
078: */
079: public String createSecureRenderTemplate(
080: boolean includePortletHandle,
081: boolean includeUserContextKey,
082: boolean includePortletInstanceKey, boolean includeSessionID);
083:
084: /**
085: * Creates a resource template. Includes tokens for url-type,
086: * rewriteResource and url to be replaced by the producer.
087: *
088: * @return String representing the entire template.
089: */
090: public String createResourceTemplate(boolean includePortletHandle,
091: boolean includeUserContextKey,
092: boolean includePortletInstanceKey, boolean includeSessionID);
093:
094: /**
095: * Creates a secure resource template. Includes tokens for url-type, url,
096: * rewriteResource, and secureURL to be replaced by the producer.
097: *
098: * @return String representing the entire template.
099: */
100: public String createSecureResourceTemplate(
101: boolean includePortletHandle,
102: boolean includeUserContextKey,
103: boolean includePortletInstanceKey, boolean includeSessionID);
104:
105: /**
106: * Creates a default template. Includes tokens for url-type, portletMode,
107: * navigationalState, interactionState, windowState, url, rewriteResource
108: * and secureURL to be replaced by the producer.
109: *
110: * @return String representing the entire template.
111: */
112: public String createDefaultTemplate(boolean includePortletHandle,
113: boolean includeUserContextKey,
114: boolean includePortletInstanceKey, boolean includeSessionID);
115:
116: /**
117: * Creates a secure default template. Includes tokens for url-type, portletMode,
118: * navigationalState, interactionState, windowState, url, rewriteResource and secureURL
119: * to be replaced by the producer.
120: *
121: * @return String representing the entire template.
122: */
123: public String createSecureDefaultTemplate(
124: boolean includePortletHandle,
125: boolean includeUserContextKey,
126: boolean includePortletInstanceKey, boolean includeSessionID);
127:
128: /**
129: * Get the consumers namespace prefix which is used by the portlet
130: * to namespace tokens which need to be unique on a aggregated page.
131: *
132: * @return The namespace prefix of the consumer.
133: **/
134: public String getNamespacePrefix();
135: }
|