You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by cz...@apache.org on 2006/02/03 15:33:32 UTC
svn commit: r374679 [1/2] -
/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/
Author: cziegeler
Date: Fri Feb 3 06:33:03 2006
New Revision: 374679
URL: http://svn.apache.org/viewcvs?rev=374679&view=rev
Log:
Code formatting
Modified:
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericConsumerEnvironment.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericGroupSessionImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletRegistryImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletSessionImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletWindowSessionImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericProducerRegistryImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserRegistryImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserSessionImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericWSRPBaseRequestImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/InitCookieInfoImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/PortletDriverImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/PortletDriverRegistryImpl.java
portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/PortletKeyImpl.java
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericConsumerEnvironment.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericConsumerEnvironment.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericConsumerEnvironment.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericConsumerEnvironment.java Fri Feb 3 06:33:03 2006
@@ -26,209 +26,209 @@
import org.apache.wsrp4j.commons.consumer.interfaces.urlgenerator.URLTemplateComposer;
import org.apache.wsrp4j.commons.consumer.interfaces.user.UserRegistry;
-
/**
- * @version $Id$
+ * @version $Id: GenericConsumerEnvironment.java 374672 2006-02-03 14:10:58Z
+ * cziegeler $
*/
-public abstract class GenericConsumerEnvironment implements ConsumerEnvironment
-{
+public abstract class GenericConsumerEnvironment implements ConsumerEnvironment {
private String consumerAgent;
+
private String[] supportedLocales;
+
private String[] supportedModes;
+
private String[] supportedWindowStates;
+
private StateChange portletStateChange;
+
private String userAuthMethod;
+
private String[] characterEncoding;
+
private String[] mimeTypes;
+
private UserRegistry userRegistry;
+
private ProducerRegistry producerRegistry;
+
private PortletRegistry portletRegistry;
+
private PortletDriverRegistry portletDriverRegistry;
+
private SessionHandler sessionHandler;
+
private URLTemplateComposer templateComposer;
+
private URLRewriter urlRewriter;
- public GenericConsumerEnvironment()
- {
+ public GenericConsumerEnvironment() {
}
/**
* Get the name of the consumer
*
* @return The name of the consumer
- **/
- public String getConsumerAgent()
- {
+ */
+ public String getConsumerAgent() {
return consumerAgent;
}
/**
* Set the name of the consumer
*
- * @param name The new name of the consumer
- **/
- public void setConsumerAgent(String name)
- {
+ * @param name
+ * The new name of the consumer
+ */
+ public void setConsumerAgent(String name) {
consumerAgent = name;
}
/**
- * Get the locales which are supported by the consumer.
- * (ISO-639 + "_" + ISO-3166)
+ * Get the locales which are supported by the consumer. (ISO-639 + "_" +
+ * ISO-3166)
*
* @return Array with String representations of the locales which are
- * supported by the consumer
- **/
- public String[] getSupportedLocales()
- {
+ * supported by the consumer
+ */
+ public String[] getSupportedLocales() {
return supportedLocales;
}
/**
- * Set the locales which are supported by the consumer.
- * Pattern: ISO-639 + "_" + ISO-3166
+ * Set the locales which are supported by the consumer. Pattern: ISO-639 +
+ * "_" + ISO-3166
*
- * @param locales Array of String representations of the supported locales
- **/
- public void setSupportedLocales(String[] locales)
- {
+ * @param locales
+ * Array of String representations of the supported locales
+ */
+ public void setSupportedLocales(String[] locales) {
supportedLocales = locales;
}
/**
- * Get the portlet modes the consumer is willing to manage.
+ * Get the portlet modes the consumer is willing to manage.
*
* @return Array with string representations of the portlet modes which are
- * supported by the consumer
- **/
- public String[] getSupportedModes()
- {
+ * supported by the consumer
+ */
+ public String[] getSupportedModes() {
return supportedModes;
}
/**
- * Set the portlet modes which are supported by the consumer.
+ * Set the portlet modes which are supported by the consumer.
*
- * @param modes Array of string representations of portlet modes
- **/
- public void setSupportedModes(String[] modes)
- {
+ * @param modes
+ * Array of string representations of portlet modes
+ */
+ public void setSupportedModes(String[] modes) {
supportedModes = modes;
}
/**
- * Get the window states the consumer is willing to manage.
+ * Get the window states the consumer is willing to manage.
*
* @return Array with string representations of the window states which are
- * supported by the consumer
- **/
- public String[] getSupportedWindowStates()
- {
+ * supported by the consumer
+ */
+ public String[] getSupportedWindowStates() {
return supportedWindowStates;
}
/**
- * Set the window states which are supported by the consumer.
+ * Set the window states which are supported by the consumer.
*
- * @param states Array of string representations of window states
- **/
- public void setSupportedWindowStates(String[] states)
- {
+ * @param states
+ * Array of string representations of window states
+ */
+ public void setSupportedWindowStates(String[] states) {
supportedWindowStates = states;
}
/**
- * Returns a flag which is used to indicate the producer wether or not
- * the processing of portlets is allowed to modify the portlet state.
+ * Returns a flag which is used to indicate the producer wether or not the
+ * processing of portlets is allowed to modify the portlet state.
*
* @return A flag
- **/
- public StateChange getPortletStateChange()
- {
+ */
+ public StateChange getPortletStateChange() {
return portletStateChange;
}
/**
- * Set a flag which is used to indicate the producer wether or not
- * the processing of portlets is allowed to modify the portlet state.
+ * Set a flag which is used to indicate the producer wether or not the
+ * processing of portlets is allowed to modify the portlet state.
*
- * @param portletStateChange A flag with one of the following values
- * (OK, Clone, Fault)
- **/
- public void setPortletStateChange(StateChange portletStateChange)
- {
+ * @param portletStateChange
+ * A flag with one of the following values (OK, Clone, Fault)
+ */
+ public void setPortletStateChange(StateChange portletStateChange) {
this.portletStateChange = portletStateChange;
}
/**
- * Get the character sets the consumer wants the remote portlet to use for
- * encoding the markup.
- * Valid character sets are defined
- * <a href='http://www.iana.org/assignments/character-sets'>here</a>
+ * Get the character sets the consumer wants the remote portlet to use for
+ * encoding the markup. Valid character sets are defined <a
+ * href='http://www.iana.org/assignments/character-sets'>here</a>
*
* @return Array of string representations of the character encoding.
- **/
- public String[] getCharacterEncodingSet()
- {
+ */
+ public String[] getCharacterEncodingSet() {
return characterEncoding;
}
/**
- * Set the character set the consumer wants the remote portlet to use for
- * encoding the markup.
- * Valid character sets are defined
- * <a href='http://www.iana.org/assignments/character-sets'>here</a>
- *
- * @param charEncoding Array of string representations of the character
- * encoding.
- **/
- public void setCharacterEncodingSet(String[] charEncoding)
- {
+ * Set the character set the consumer wants the remote portlet to use for
+ * encoding the markup. Valid character sets are defined <a
+ * href='http://www.iana.org/assignments/character-sets'>here</a>
+ *
+ * @param charEncoding
+ * Array of string representations of the character encoding.
+ */
+ public void setCharacterEncodingSet(String[] charEncoding) {
characterEncoding = charEncoding;
}
/**
- * Get an array of mime types which are supported by the consumer.
- * The order in the array defines the order of preference of the consumer.
+ * Get an array of mime types which are supported by the consumer. The order
+ * in the array defines the order of preference of the consumer.
*
* @return An array of mimes types the consumer supports.
- **/
- public String[] getMimeTypes()
- {
+ */
+ public String[] getMimeTypes() {
return mimeTypes;
}
/**
- * Set the mime types the consumer supports
- * The order in the array defines the order of preference of the consumer.
+ * Set the mime types the consumer supports The order in the array defines
+ * the order of preference of the consumer.
*
- * @param mimeTypes An array of mimes types the consumer supports.
- **/
- public void setMimeTypes(String[] mimeTypes)
- {
+ * @param mimeTypes
+ * An array of mimes types the consumer supports.
+ */
+ public void setMimeTypes(String[] mimeTypes) {
this.mimeTypes = mimeTypes;
}
/**
* Get the method which is used by the consumer to authenticate its users.
- *
- * @return String indicating how end-users were authenticated by the
- * consumer.
- **/
- public String getUserAuthentication()
- {
+ *
+ * @return String indicating how end-users were authenticated by the
+ * consumer.
+ */
+ public String getUserAuthentication() {
return userAuthMethod;
}
/**
* Set the method of end user authentication used by the consumer..
- *
- * @param authMethod String indicating how end-users are authenticated
- * by the consumer.
- **/
- public void setUserAuthentication(String authMethod)
- {
+ *
+ * @param authMethod
+ * String indicating how end-users are authenticated by the
+ * consumer.
+ */
+ public void setUserAuthentication(String authMethod) {
userAuthMethod = authMethod;
}
@@ -236,19 +236,18 @@
* Get the user registry of the consumer.
*
* @return The consumer specific user registry
- **/
- public UserRegistry getUserRegistry()
- {
+ */
+ public UserRegistry getUserRegistry() {
return userRegistry;
}
/**
* Set the user registry of the consumer.
*
- * @param userRegistry The consumer specific user registry
- **/
- public void setUserRegistry(UserRegistry userRegistry)
- {
+ * @param userRegistry
+ * The consumer specific user registry
+ */
+ public void setUserRegistry(UserRegistry userRegistry) {
this.userRegistry = userRegistry;
}
@@ -256,19 +255,18 @@
* Get the producer registry of the consumer.
*
* @return The consumer specific producer registry
- **/
- public ProducerRegistry getProducerRegistry()
- {
+ */
+ public ProducerRegistry getProducerRegistry() {
return producerRegistry;
}
/**
* Set the producer registry of the consumer.
*
- * @param producerRegistry The consumer specific producer registry
- **/
- public void setProducerRegistry(ProducerRegistry producerRegistry)
- {
+ * @param producerRegistry
+ * The consumer specific producer registry
+ */
+ public void setProducerRegistry(ProducerRegistry producerRegistry) {
this.producerRegistry = producerRegistry;
}
@@ -276,19 +274,18 @@
* Get the portlet registry of the consumer.
*
* @return Interface to the consumer specific portlet registry
- **/
- public PortletRegistry getPortletRegistry()
- {
+ */
+ public PortletRegistry getPortletRegistry() {
return portletRegistry;
}
/**
* Set the portlet registry of the consumer.
*
- * @param portletRegistry The consumer specific portlet registry
- **/
- public void setPortletRegistry(PortletRegistry portletRegistry)
- {
+ * @param portletRegistry
+ * The consumer specific portlet registry
+ */
+ public void setPortletRegistry(PortletRegistry portletRegistry) {
this.portletRegistry = portletRegistry;
}
@@ -296,21 +293,18 @@
* Get the portlet driver registry of the consumer.
*
* @return Interface to the consumer specific portlet driver registry
- **/
- public PortletDriverRegistry getPortletDriverRegistry()
- {
+ */
+ public PortletDriverRegistry getPortletDriverRegistry() {
return portletDriverRegistry;
}
/**
* Set the portlet driver registry of the consumer.
*
- * @param portletDriverRegistry The consumer specific portlet driver
- * registry
- **/
- public void setPortletDriverRegistry(
- PortletDriverRegistry portletDriverRegistry)
- {
+ * @param portletDriverRegistry
+ * The consumer specific portlet driver registry
+ */
+ public void setPortletDriverRegistry(PortletDriverRegistry portletDriverRegistry) {
this.portletDriverRegistry = portletDriverRegistry;
}
@@ -318,19 +312,18 @@
* Get the session handler of the consumer.
*
* @return Interface to the consumer specific session handler
- **/
- public SessionHandler getSessionHandler()
- {
+ */
+ public SessionHandler getSessionHandler() {
return sessionHandler;
}
/**
* Set the session handler of the consumer.
*
- * @param sessionHandler The consumer specific session handler
- **/
- public void setSessionHandler(SessionHandler sessionHandler)
- {
+ * @param sessionHandler
+ * The consumer specific session handler
+ */
+ public void setSessionHandler(SessionHandler sessionHandler) {
this.sessionHandler = sessionHandler;
}
@@ -338,19 +331,18 @@
* Get the url template composer for template proccessing
*
* @return Interface to the consumer specific template composer
- **/
- public URLTemplateComposer getTemplateComposer()
- {
+ */
+ public URLTemplateComposer getTemplateComposer() {
return templateComposer;
}
/**
* Set the url template composer for template proccessing
*
- * @param templateComposer The consumer specific template composer
- **/
- public void setTemplateComposer(URLTemplateComposer templateComposer)
- {
+ * @param templateComposer
+ * The consumer specific template composer
+ */
+ public void setTemplateComposer(URLTemplateComposer templateComposer) {
this.templateComposer = templateComposer;
}
@@ -358,19 +350,18 @@
* Get the url rewriter for consumer url-rewriting
*
* @return The consumer specific url rewriter
- **/
- public URLRewriter getURLRewriter()
- {
+ */
+ public URLRewriter getURLRewriter() {
return urlRewriter;
}
/**
* Set the url rewriter for consumer url-rewriting
*
- * @param urlRewriter The consumer specific url rewriter
- **/
- public void setURLRewriter(URLRewriter urlRewriter)
- {
+ * @param urlRewriter
+ * The consumer specific url rewriter
+ */
+ public void setURLRewriter(URLRewriter urlRewriter) {
this.urlRewriter = urlRewriter;
}
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericGroupSessionImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericGroupSessionImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericGroupSessionImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericGroupSessionImpl.java Fri Feb 3 06:33:03 2006
@@ -24,107 +24,85 @@
import org.apache.wsrp4j.commons.log.LogManager;
import org.apache.wsrp4j.commons.log.Logger;
-
/**
* Class implements a consumer based group session
*
- * @version $Id$
+ * @version $Id: GenericGroupSessionImpl.java 374672 2006-02-03 14:10:58Z
+ * cziegeler $
*/
-public abstract class GenericGroupSessionImpl extends InitCookieInfoImpl
- implements GroupSessionMgr
-{
+public abstract class GenericGroupSessionImpl extends InitCookieInfoImpl implements GroupSessionMgr {
- // ID of the group this session is bind to
- private String groupID = null;
+ // ID of the group this session is bind to
+ private String groupID;
// holding all the portlet session objects for this group
- protected Hashtable portletSessions = null;
+ protected Hashtable portletSessions;
+
+ // logger
+ private static final Logger logger = LogManager.getLogManager().getLogger(
+ GenericGroupSessionImpl.class);
- // logger
- private static final Logger logger =
- LogManager.getLogManager().getLogger(GenericGroupSessionImpl.class);
-
- public GenericGroupSessionImpl(String groupID, String markupInterfaceURL)
- throws WSRPException
- {
+ public GenericGroupSessionImpl(String groupID, String markupInterfaceURL) throws WSRPException {
super(markupInterfaceURL);
-
- final String MN = "constructor";
- if (logger.isLogging(Logger.TRACE_HIGH))
- {
- logger.entry(Logger.TRACE_HIGH, MN);
- }
+
+ final String MN = "constructor";
+ if (logger.isLogging(Logger.TRACE_HIGH)) {
+ logger.entry(Logger.TRACE_HIGH, MN);
+ }
this.groupID = groupID;
this.portletSessions = new Hashtable();
- if (logger.isLogging(Logger.TRACE_HIGH))
- {
- logger.exit(Logger.TRACE_HIGH, MN);
- }
+ if (logger.isLogging(Logger.TRACE_HIGH)) {
+ logger.exit(Logger.TRACE_HIGH, MN);
+ }
}
- public String getGroupID()
- {
+ public String getGroupID() {
return this.groupID;
}
- public void setGroupID(String groupID)
- {
- if (groupID != null)
- {
+ public void setGroupID(String groupID) {
+ if (groupID != null) {
this.groupID = groupID;
}
}
- public void addPortletSession(PortletSession portletSession)
- {
- final String MN = "addPortletSession";
-
- if (portletSession != null)
- {
- this.portletSessions.put(portletSession.getPortletHandle(),
- portletSession);
- if (logger.isLogging(Logger.TRACE_HIGH))
- {
- logger.text(Logger.TRACE_HIGH, MN,
- "added PortletSession with handle: " +
- portletSession.getPortletHandle() +
- " to GroupSession with ID: " + groupID);
+ public void addPortletSession(PortletSession portletSession) {
+ final String MN = "addPortletSession";
+
+ if (portletSession != null) {
+ this.portletSessions.put(portletSession.getPortletHandle(), portletSession);
+ if (logger.isLogging(Logger.TRACE_HIGH)) {
+ logger.text(Logger.TRACE_HIGH, MN, "added PortletSession with handle: "
+ + portletSession.getPortletHandle() + " to GroupSession with ID: "
+ + groupID);
}
}
}
public abstract PortletSession getPortletSession(String portletHandle);
- public Iterator getAllPortletSessions()
- {
+ public Iterator getAllPortletSessions() {
return this.portletSessions.values().iterator();
}
- public void removePortletSession(String portletHandle)
- {
- final String MN = "removePortletSession";
- if (portletHandle == null)
- {
+ public void removePortletSession(String portletHandle) {
+ final String MN = "removePortletSession";
+ if (portletHandle == null) {
this.portletSessions.remove(portletHandle);
- if (logger.isLogging(Logger.TRACE_HIGH))
- {
- logger.text(Logger.TRACE_HIGH, MN,
- "deleted PortletSession with handle: " +
- portletHandle + " from GroupSession with ID: " +
- groupID);
- }
+ if (logger.isLogging(Logger.TRACE_HIGH)) {
+ logger.text(Logger.TRACE_HIGH, MN, "deleted PortletSession with handle: "
+ + portletHandle + " from GroupSession with ID: " + groupID);
+ }
}
}
- public void removeAllPortletSessions()
- {
+ public void removeAllPortletSessions() {
this.portletSessions.clear();
}
- public boolean existsPortletSession(String portletHandle)
- {
+ public boolean existsPortletSession(String portletHandle) {
if (portletHandle == null)
return false;
return this.portletSessions.containsKey(portletHandle);
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletRegistryImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletRegistryImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletRegistryImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletRegistryImpl.java Fri Feb 3 06:33:03 2006
@@ -24,28 +24,26 @@
import org.apache.wsrp4j.commons.exception.WSRPException;
/**
- * @version $Id$
+ * @version $Id: GenericPortletRegistryImpl.java 374672 2006-02-03 14:10:58Z
+ * cziegeler $
*/
-public abstract class GenericPortletRegistryImpl implements PortletRegistry
-{
+public abstract class GenericPortletRegistryImpl implements PortletRegistry {
// maps portlet keys to portlets
private Hashtable portlets;
- public GenericPortletRegistryImpl()
- {
+ public GenericPortletRegistryImpl() {
portlets = new Hashtable();
}
/**
* Add a portlet to the registry
- *
- * @param portlet The portlet to add
+ *
+ * @param portlet
+ * The portlet to add
*/
- public void addPortlet(WSRPPortlet portlet) throws WSRPException
- {
- if (portlet != null)
- {
+ public void addPortlet(WSRPPortlet portlet) throws WSRPException {
+ if (portlet != null) {
portlets.put(portlet.getPortletKey().toString(), portlet);
@@ -54,53 +52,52 @@
/**
* Get the portlet for the given producer and portlet handle
- *
- * @param portletKey The portlet key identifying the portlet
- *
+ *
+ * @param portletKey
+ * The portlet key identifying the portlet
+ *
* @return The portlet with the given portlet key
- **/
- public WSRPPortlet getPortlet(PortletKey portletKey)
- {
+ */
+ public WSRPPortlet getPortlet(PortletKey portletKey) {
if (portletKey == null)
return null;
- WSRPPortlet portlet = (WSRPPortlet)portlets.get(portletKey.toString());
+ WSRPPortlet portlet = (WSRPPortlet) portlets.get(portletKey.toString());
return portlet;
}
/**
* Remove the portlet with the given portlet key
- *
- * @param portletKey The portlet key identifying the portlet
+ *
+ * @param portletKey
+ * The portlet key identifying the portlet
* @return The portlet which has been removed or null
- **/
- public WSRPPortlet removePortlet(PortletKey portletKey)
- {
+ */
+ public WSRPPortlet removePortlet(PortletKey portletKey) {
if (portletKey == null)
return null;
- return (WSRPPortlet)portlets.remove(portletKey.toString());
+ return (WSRPPortlet) portlets.remove(portletKey.toString());
}
/**
- * Remove all portlets from the registry
- **/
- public void removeAllPortlets()
- {
+ * Remove all portlets from the registry
+ */
+ public void removeAllPortlets() {
portlets.clear();
}
/**
* Tests if a portlet with the given portlet key
*
- * @param portletKey The portlet key identifying the portlet
+ * @param portletKey
+ * The portlet key identifying the portlet
*
* @return True if portlet exists with this portlet key
- **/
- public boolean existsPortlet(PortletKey portletKey)
- {
+ */
+ public boolean existsPortlet(PortletKey portletKey) {
if (portletKey == null)
return false;
@@ -111,9 +108,8 @@
* Get all the portlets in the register
*
* @return Iterator with all portlets in the registry
- **/
- public Iterator getAllPortlets()
- {
+ */
+ public Iterator getAllPortlets() {
return portlets.values().iterator();
}
}
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletSessionImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletSessionImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletSessionImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletSessionImpl.java Fri Feb 3 06:33:03 2006
@@ -26,83 +26,72 @@
import oasis.names.tc.wsrp.v1.types.SessionContext;
-
/**
- * @version $Id$
+ * @version $Id: GenericPortletSessionImpl.java 374672 2006-02-03 14:10:58Z
+ * cziegeler $
*/
-public abstract class GenericPortletSessionImpl implements PortletSession
-{
- // the session context passed from the producer to store
+public abstract class GenericPortletSessionImpl implements PortletSession {
+ // the session context passed from the producer to store
private SessionContext sessionCtx;
-
+
// the portlet handle identifying the where the session belogns to
private String handle;
- // holds the varios window sessions for this portlet instance
+ // holds the varios window sessions for this portlet instance
protected final Map windowSessions;
-
- // logger
- private static final Logger logger =
- LogManager.getLogManager().getLogger(
+
+ // logger
+ private static final Logger logger = LogManager.getLogManager().getLogger(
GenericPortletSessionImpl.class);
- public GenericPortletSessionImpl(String handle)
- {
- final String MN = "constructor";
- if (logger.isLogging(Logger.TRACE_HIGH))
- {
- logger.entry(Logger.TRACE_HIGH, MN);
- }
-
+ public GenericPortletSessionImpl(String handle) {
+ final String MN = "constructor";
+ if (logger.isLogging(Logger.TRACE_HIGH)) {
+ logger.entry(Logger.TRACE_HIGH, MN);
+ }
+
this.windowSessions = new HashMap();
this.handle = handle;
- if (logger.isLogging(Logger.TRACE_HIGH))
- {
- logger.exit(Logger.TRACE_HIGH, MN);
- }
+ if (logger.isLogging(Logger.TRACE_HIGH)) {
+ logger.exit(Logger.TRACE_HIGH, MN);
+ }
}
- public String getPortletHandle()
- {
+ public String getPortletHandle() {
return handle;
}
- public void setPortletHandle(String handle)
- {
- if (handle != null)
- {
+ public void setPortletHandle(String handle) {
+ if (handle != null) {
this.handle = handle;
}
}
- public SessionContext getSessionContext()
- {
+ public SessionContext getSessionContext() {
return sessionCtx;
}
- public void setSessionContext(SessionContext ctx)
- {
+ public void setSessionContext(SessionContext ctx) {
this.sessionCtx = ctx;
}
/**
- * Get the <code>PortletWindowSession</code> of the portlet window with
+ * Get the <code>PortletWindowSession</code> of the portlet window with
* the given ID.
*
- * @param windowID The ID of the portlet window
- * @return The <code>PorletWindowSession</code> with the given ID.
- **/
- public abstract PortletWindowSession getPortletWindowSession(
- String windowID);
-
+ * @param windowID
+ * The ID of the portlet window
+ * @return The <code>PorletWindowSession</code> with the given ID.
+ */
+ public abstract PortletWindowSession getPortletWindowSession(String windowID);
+
/**
* Get all window session which belong to the portlet session
*
- * @return An Iterator of <code>SimplePortletWindowSession</code> objects.
- **/
- public Iterator getAllPorletWindowSessions()
- {
+ * @return An Iterator of <code>SimplePortletWindowSession</code> objects.
+ */
+ public Iterator getAllPorletWindowSessions() {
return this.windowSessions.entrySet().iterator();
}
@@ -110,32 +99,28 @@
/**
* Remove the porlet window session with the given window id.
*
- * @param windowID The ID of the portlet window whichs session shoul dbe
- * removed
- * @return The portlet window session which has been removed or null if
- * the session did not exist.
- **/
- public PortletWindowSession removePortletWindowSession(String windowID)
- {
- final String MN ="getPortletWindowSession";
-
- PortletWindowSession winSession =
- (PortletWindowSession) this.windowSessions.remove(windowID);
-
- if (logger.isLogging(Logger.TRACE_HIGH) && winSession != null)
- {
- logger.text(Logger.TRACE_HIGH, MN,
- "removed PortletWindowSession with ID: " + windowID);
- }
-
+ * @param windowID
+ * The ID of the portlet window whichs session shoul dbe removed
+ * @return The portlet window session which has been removed or null if the
+ * session did not exist.
+ */
+ public PortletWindowSession removePortletWindowSession(String windowID) {
+ final String MN = "getPortletWindowSession";
+
+ PortletWindowSession winSession = (PortletWindowSession) this.windowSessions
+ .remove(windowID);
+
+ if (logger.isLogging(Logger.TRACE_HIGH) && winSession != null) {
+ logger.text(Logger.TRACE_HIGH, MN, "removed PortletWindowSession with ID: " + windowID);
+ }
+
return winSession;
}
/**
- * Remove all portlet window sessions which belong to this portlet session.
- **/
- public void removeAllPortletWindowSessions()
- {
+ * Remove all portlet window sessions which belong to this portlet session.
+ */
+ public void removeAllPortletWindowSessions() {
this.windowSessions.clear();
}
}
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletWindowSessionImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletWindowSessionImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletWindowSessionImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericPortletWindowSessionImpl.java Fri Feb 3 06:33:03 2006
@@ -21,48 +21,42 @@
import oasis.names.tc.wsrp.v1.types.MarkupContext;
/**
- * @version $Id$
+ * @version $Id: GenericPortletWindowSessionImpl.java 374672 2006-02-03
+ * 14:10:58Z cziegeler $
*/
-public class GenericPortletWindowSessionImpl implements PortletWindowSession
-{
- // the markup context we store between performBlockingInteraction and
+public class GenericPortletWindowSessionImpl implements PortletWindowSession {
+ // the markup context we store between performBlockingInteraction and
// getMarkup calls
private transient MarkupContext markupCtx;
-
+
// the window ID identifying this session
private String windowID;
-
- // the refering PortletSession
+
+ // the refering PortletSession
private PortletSession pSession;
-
- public GenericPortletWindowSessionImpl(
- String windowID, PortletSession pSession) {
+ public GenericPortletWindowSessionImpl(String windowID, PortletSession pSession) {
this.windowID = windowID;
this.pSession = pSession;
}
-
+
public PortletSession getPortletSession() {
- return this.pSession;
+ return this.pSession;
}
- public String getWindowID()
- {
+ public String getWindowID() {
return windowID;
}
- public void setWindowID(String windowID)
- {
+ public void setWindowID(String windowID) {
this.windowID = windowID;
- }
+ }
- public MarkupContext getCachedMarkup()
- {
+ public MarkupContext getCachedMarkup() {
return markupCtx;
}
- public void updateMarkupCache(MarkupContext markupContext)
- {
+ public void updateMarkupCache(MarkupContext markupContext) {
markupCtx = markupContext;
}
}
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericProducerRegistryImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericProducerRegistryImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericProducerRegistryImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericProducerRegistryImpl.java Fri Feb 3 06:33:03 2006
@@ -22,27 +22,25 @@
import org.apache.wsrp4j.commons.consumer.interfaces.producer.ProducerRegistry;
/**
- * @version $Id$
+ * @version $Id: GenericProducerRegistryImpl.java 374672 2006-02-03 14:10:58Z
+ * cziegeler $
*/
-public abstract class GenericProducerRegistryImpl implements ProducerRegistry
-{
+public abstract class GenericProducerRegistryImpl implements ProducerRegistry {
private Hashtable producers;
- public GenericProducerRegistryImpl()
- {
+ public GenericProducerRegistryImpl() {
producers = new Hashtable();
}
/**
* Add a producer to the registry
- *
- * @param producer The producer to add
+ *
+ * @param producer
+ * The producer to add
*/
- public void addProducer(Producer producer)
- {
- if (producer != null)
- {
+ public void addProducer(Producer producer) {
+ if (producer != null) {
producers.put(producer.getID(), producer);
}
}
@@ -50,56 +48,54 @@
/**
* Get the producer for the given URL
*
- * @param id The ID of the producer
+ * @param id
+ * The ID of the producer
*
* @return The producer with the given ID
- **/
- public Producer getProducer(String id)
- {
+ */
+ public Producer getProducer(String id) {
- return (Producer)producers.get(id);
+ return (Producer) producers.get(id);
}
/**
* Get all producer in the registry
*
* @return Iterator with all producers
- **/
- public Iterator getAllProducers()
- {
+ */
+ public Iterator getAllProducers() {
return producers.values().iterator();
}
/**
* Remove the producer with the given ID from the registry
*
- * @param id The ID of the producer
+ * @param id
+ * The ID of the producer
*
- * @return The producer which had been mapped to this id or
- * null if no producer was found with this id
- **/
- public Producer removeProducer(String id)
- {
- return (Producer)producers.remove(id);
+ * @return The producer which had been mapped to this id or null if no
+ * producer was found with this id
+ */
+ public Producer removeProducer(String id) {
+ return (Producer) producers.remove(id);
}
/**
* Remove all producer objects from the registry
- **/
- public void removeAllProducers()
- {
+ */
+ public void removeAllProducers() {
producers.clear();
}
/**
* Check if a producer with the given ID exists in the registry.
*
- * @param id The ID of the producer
+ * @param id
+ * The ID of the producer
*
* @return True if producer exists with this ID
- **/
- public boolean existsProducer(String id)
- {
+ */
+ public boolean existsProducer(String id) {
return producers.containsKey(id);
}
}
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserRegistryImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserRegistryImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserRegistryImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserRegistryImpl.java Fri Feb 3 06:33:03 2006
@@ -21,32 +21,29 @@
import org.apache.wsrp4j.commons.consumer.interfaces.user.User;
import org.apache.wsrp4j.commons.consumer.interfaces.user.UserRegistry;
-
/**
- * @version $Id$
+ * @version $Id: GenericUserRegistryImpl.java 327497 2005-08-28 21:35:05Z
+ * dlouzan $
*/
-public class GenericUserRegistryImpl implements UserRegistry
-{
+public class GenericUserRegistryImpl implements UserRegistry {
private Hashtable users;
- public GenericUserRegistryImpl()
- {
+ public GenericUserRegistryImpl() {
this.users = new Hashtable();
}
/**
* Get the user with the given id
- *
- * @param userID The ID of the user
- *
+ *
+ * @param userID
+ * The ID of the user
+ *
* @return The user
- **/
- public User getUser(String userID)
- {
- if (userID != null)
- {
- return (User)users.get(userID);
+ */
+ public User getUser(String userID) {
+ if (userID != null) {
+ return (User) users.get(userID);
}
return null;
@@ -54,38 +51,35 @@
/**
* Remove a user from the list of known user
- *
- * @param userID The ID of the user
+ *
+ * @param userID
+ * The ID of the user
* @return The user which has been removed or null
- **/
- public User removeUser(String userID)
- {
+ */
+ public User removeUser(String userID) {
if (userID == null)
return null;
- return (User)users.remove(userID);
+ return (User) users.remove(userID);
}
/**
- * Add a user. If a record with the given userid already exists,
- * the input UserContext object is returned, otherwise a null value.
- *
- * @param user The user object to add
- *
- * @return Null on success or the input user object
- * in case a user with the same user id already exists.
- **/
- public User addUser(User user)
- {
+ * Add a user. If a record with the given userid already exists, the input
+ * UserContext object is returned, otherwise a null value.
+ *
+ * @param user
+ * The user object to add
+ *
+ * @return Null on success or the input user object in case a user with the
+ * same user id already exists.
+ */
+ public User addUser(User user) {
- if (user != null)
- {
+ if (user != null) {
String userID = user.getUserID();
- if (userID != null)
- {
- if (!users.containsKey(userID))
- {
+ if (userID != null) {
+ if (!users.containsKey(userID)) {
users.put(userID, user);
return null;
@@ -98,16 +92,14 @@
/**
* Get an iterator with all known users
- *
+ *
* @return All known user contexts in an iterator
- **/
- public Iterator getAllUsers()
- {
+ */
+ public Iterator getAllUsers() {
return users.values().iterator();
}
- public void removeAllUsers()
- {
+ public void removeAllUsers() {
users.clear();
}
}
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserSessionImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserSessionImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserSessionImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericUserSessionImpl.java Fri Feb 3 06:33:03 2006
@@ -23,13 +23,11 @@
import org.apache.wsrp4j.commons.consumer.interfaces.session.UserSessionMgr;
import org.apache.wsrp4j.commons.exception.WSRPException;
-
/**
- * @version $Id$
+ * @version $Id: GenericUserSessionImpl.java 374672 2006-02-03 14:10:58Z
+ * cziegeler $
*/
-public abstract class GenericUserSessionImpl extends InitCookieInfoImpl
- implements UserSessionMgr
-{
+public abstract class GenericUserSessionImpl extends InitCookieInfoImpl implements UserSessionMgr {
// ID of the user this session belongs to
private String userID;
@@ -40,9 +38,8 @@
// mapping access points to hashtable of group sessions
protected Hashtable groupSessions;
- public GenericUserSessionImpl(String producerID, String userID,
- String markupURL) throws WSRPException
- {
+ public GenericUserSessionImpl(String producerID, String userID, String markupURL)
+ throws WSRPException {
super(markupURL);
this.producerID = producerID;
this.userID = userID;
@@ -52,117 +49,109 @@
* Get ID of the user this session is bind to
*
* @return User ID
- **/
- public String getUserID()
- {
+ */
+ public String getUserID() {
return this.userID;
}
/**
- * Set the ID of the user this session is bind to
+ * Set the ID of the user this session is bind to
*
- * @param userID ID of the user
- **/
- public void setUserID(String userID)
- {
- if (userID != null)
- {
+ * @param userID
+ * ID of the user
+ */
+ public void setUserID(String userID) {
+ if (userID != null) {
this.userID = userID;
}
}
/**
- * Get ID of the producer this session is bind to
- *
- * @return ID of the producer
- **/
- public String getProducerID()
- {
+ * Get ID of the producer this session is bind to
+ *
+ * @return ID of the producer
+ */
+ public String getProducerID() {
return this.producerID;
}
/**
* Set the ID of the producer this session is bind to.
*
- * @param producerID ID of the producer
- **/
- public void setProducerID(String producerID)
- {
+ * @param producerID
+ * ID of the producer
+ */
+ public void setProducerID(String producerID) {
this.producerID = producerID;
}
/**
* Get the group session for this group ID
- *
- * @param groupID ID of the portlet application
- * @return The a group session for the provided group ID or a
- * new groupSession
- **/
- public abstract GroupSessionMgr getGroupSession(String groupID)
- throws WSRPException;
+ *
+ * @param groupID
+ * ID of the portlet application
+ * @return The a group session for the provided group ID or a new
+ * groupSession
+ */
+ public abstract GroupSessionMgr getGroupSession(String groupID) throws WSRPException;
/**
* Add a group session to the user session
*
- * @param groupSession A group session
- **/
- public void addGroupSession(GroupSession groupSession)
- {
- if (groupSession != null)
- {
+ * @param groupSession
+ * A group session
+ */
+ public void addGroupSession(GroupSession groupSession) {
+ if (groupSession != null) {
this.groupSessions.put(groupSession.getGroupID(), groupSession);
}
}
/**
- * Get all group session
- *
- * @return Iterator with all group sessions for the given producer
- * access point
- **/
- public Iterator getAllGroupSessions()
- {
+ * Get all group session
+ *
+ * @return Iterator with all group sessions for the given producer access
+ * point
+ */
+ public Iterator getAllGroupSessions() {
return this.groupSessions.values().iterator();
}
/**
* Remove a group session from the user session
- *
- * @param groupID ID of the portlet application
- **/
- public void removeGroupSession(String groupID)
- {
- if (groupID != null)
- {
+ *
+ * @param groupID
+ * ID of the portlet application
+ */
+ public void removeGroupSession(String groupID) {
+ if (groupID != null) {
this.groupSessions.remove(groupID);
}
}
/**
* Remove all group sessions
- *
- **/
- public void removeAllGroupSessions()
- {
+ *
+ */
+ public void removeAllGroupSessions() {
this.groupSessions.clear();
}
/**
* Check if a group session exists for the given group ID
- *
- * @param groupID ID of the portlet group
+ *
+ * @param groupID
+ * ID of the portlet group
* @return True if a group session exists for the provided group ID
- **/
- public boolean existsGroupSession(String groupID)
- {
+ */
+ public boolean existsGroupSession(String groupID) {
if (groupID == null)
return false;
return this.groupSessions.containsKey(groupID);
}
- protected void setGroupSessionTable(Hashtable groupSessions)
- {
+ protected void setGroupSessionTable(Hashtable groupSessions) {
this.groupSessions = groupSessions;
}
}
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericWSRPBaseRequestImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericWSRPBaseRequestImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericWSRPBaseRequestImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/GenericWSRPBaseRequestImpl.java Fri Feb 3 06:33:03 2006
@@ -31,9 +31,9 @@
getLogger(GenericWSRPBaseRequestImpl.class);
public abstract String getSessionID();
-
+
public abstract String getPortletInstanceKey();
-
+
public abstract String getNavigationalState();
public abstract String getWindowState();
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/InitCookieInfoImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/InitCookieInfoImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/InitCookieInfoImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/InitCookieInfoImpl.java Fri Feb 3 06:33:03 2006
@@ -31,86 +31,68 @@
/**
* @version $Id$
*/
-public class InitCookieInfoImpl implements InitCookieInfo
-{
+public class InitCookieInfoImpl implements InitCookieInfo {
+
+ private Logger logger;
+
+ private String markupInterfaceURL;
- private Logger logger;
- private String markupInterfaceURL;
private boolean initCookieRequired;
+
private boolean initCookieDone;
+
private WSRP_v1_Markup_PortType markupInterface;
- public InitCookieInfoImpl(String markupURL) throws WSRPException
- {
- final String MN = "init";
+ public InitCookieInfoImpl(String markupURL) throws WSRPException {
+ final String MN = "init";
+
+ logger = LogManager.getLogManager().getLogger(getClass());
- logger = LogManager.getLogManager().getLogger(getClass());
-
this.initCookieDone = false;
this.initCookieRequired = false;
this.markupInterfaceURL = markupURL;
- try
- {
- WSRPServiceLocator serviceLocator = new WSRPServiceLocator();
- serviceLocator.setMaintainSession(true);
-
- markupInterface =
- serviceLocator.getWSRPBaseService(new URL(markupURL));
-
- } catch (javax.xml.rpc.ServiceException xmlEx)
- {
- WSRPXHelper.throwX(
- logger,
- Logger.ERROR,
- MN,
- ErrorCodes.INIT_OF_MARKUP_PORT_FAILED,
- xmlEx);
- } catch (MalformedURLException urlEx)
- {
- WSRPXHelper.throwX(
- logger,
- Logger.ERROR,
- MN,
- ErrorCodes.INVALID_URL_OF_MARKUP_PORT,
- urlEx);
+ try {
+ WSRPServiceLocator serviceLocator = new WSRPServiceLocator();
+ serviceLocator.setMaintainSession(true);
+
+ markupInterface = serviceLocator.getWSRPBaseService(new URL(markupURL));
+
+ } catch (javax.xml.rpc.ServiceException xmlEx) {
+ WSRPXHelper.throwX(logger, Logger.ERROR, MN, ErrorCodes.INIT_OF_MARKUP_PORT_FAILED,
+ xmlEx);
+ } catch (MalformedURLException urlEx) {
+ WSRPXHelper.throwX(logger, Logger.ERROR, MN, ErrorCodes.INVALID_URL_OF_MARKUP_PORT,
+ urlEx);
}
}
- public boolean isInitCookieRequired()
- {
+ public boolean isInitCookieRequired() {
return initCookieRequired;
}
- public void setInitCookieRequired(boolean initCookieRequired)
- {
+ public void setInitCookieRequired(boolean initCookieRequired) {
this.initCookieRequired = initCookieRequired;
}
- public boolean isInitCookieDone()
- {
+ public boolean isInitCookieDone() {
return initCookieDone;
}
- public void setInitCookieDone(boolean initCookieDone)
- {
+ public void setInitCookieDone(boolean initCookieDone) {
this.initCookieDone = initCookieDone;
}
- public String getMarkupInterfaceURL()
- {
+ public String getMarkupInterfaceURL() {
return markupInterfaceURL;
}
- public WSRP_v1_Markup_PortType getWSRPBaseService()
- {
+ public WSRP_v1_Markup_PortType getWSRPBaseService() {
return markupInterface;
}
- public void setWSRPBaseService(WSRP_v1_Markup_PortType markupPortType)
- {
- if (markupPortType != null)
- {
+ public void setWSRPBaseService(WSRP_v1_Markup_PortType markupPortType) {
+ if (markupPortType != null) {
this.markupInterface = markupPortType;
}
}
Modified: portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/PortletDriverImpl.java
URL: http://svn.apache.org/viewcvs/portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/PortletDriverImpl.java?rev=374679&r1=374678&r2=374679&view=diff
==============================================================================
--- portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/PortletDriverImpl.java (original)
+++ portals/wsrp4j/trunk/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/driver/PortletDriverImpl.java Fri Feb 3 06:33:03 2006
@@ -70,44 +70,44 @@
/**
* This class implements a portlet driver
- *
+ *
* @version $Id$
- **/
-public class PortletDriverImpl implements PortletDriver
-{
+ */
+public class PortletDriverImpl implements PortletDriver {
private WSRPPortlet portlet;
+
private WSRP_v1_Markup_PortType markupPort;
+
private WSRP_v1_PortletManagement_PortType portletPort;
+
private ConsumerEnvironment consumerEnv;
+
private Producer producer;
+
private ParameterChecker parameterChecker;
+
private CookieProtocol initCookie = CookieProtocol.none;
- // the logger
- private static final Logger logger =
- LogManager.getLogManager().getLogger(PortletDriverImpl.class);
-
- public PortletDriverImpl(WSRPPortlet portlet,
- ConsumerEnvironment consumerEnv)
- throws WSRPException
- {
- parameterChecker = new ParameterChecker();
+ // the logger
+ private static final Logger logger = LogManager.getLogManager().getLogger(
+ PortletDriverImpl.class);
+
+ public PortletDriverImpl(WSRPPortlet portlet, ConsumerEnvironment consumerEnv)
+ throws WSRPException {
+ parameterChecker = new ParameterChecker();
this.consumerEnv = consumerEnv;
this.portlet = portlet;
- this.producer = consumerEnv.getProducerRegistry().
- getProducer(portlet.getPortletKey().getProducerId());
-
+ this.producer = consumerEnv.getProducerRegistry().getProducer(
+ portlet.getPortletKey().getProducerId());
+
portletPort = producer.getPortletManagementInterface();
- ServiceDescription serviceDescription =
- producer.getServiceDescription(false);
- if (serviceDescription != null)
- {
+ ServiceDescription serviceDescription = producer.getServiceDescription(false);
+ if (serviceDescription != null) {
this.initCookie = serviceDescription.getRequiresInitCookie();
- if (initCookie == null)
- {
+ if (initCookie == null) {
initCookie = CookieProtocol.none; // TODO - get from config
}
}
@@ -117,121 +117,94 @@
* Get the portlet this driver is bind to.
*
* @return The enity
- **/
- public WSRPPortlet getPortlet()
- {
+ */
+ public WSRPPortlet getPortlet() {
return this.portlet;
}
- private void resetInitCookie(String userID) throws WSRPException
- {
+ private void resetInitCookie(String userID) throws WSRPException {
- UserSessionMgr userSession =
- this.consumerEnv.getSessionHandler().getUserSession(
- getPortlet().getPortletKey().getProducerId(),
- userID);
+ UserSessionMgr userSession = this.consumerEnv.getSessionHandler().getUserSession(
+ getPortlet().getPortletKey().getProducerId(), userID);
- if (initCookie.getValue().equalsIgnoreCase(CookieProtocol._none))
- {
+ if (initCookie.getValue().equalsIgnoreCase(CookieProtocol._none)) {
userSession.setInitCookieDone(false);
- } else if (initCookie.getValue().equalsIgnoreCase(
- CookieProtocol._perGroup))
- {
+ } else if (initCookie.getValue().equalsIgnoreCase(CookieProtocol._perGroup)) {
PortletDescription portletDescription = null;
- try
- {
+ try {
- portletDescription = producer.getPortletDescription(
- getPortlet().getParent());
+ portletDescription = producer.getPortletDescription(getPortlet().getParent());
- } catch (WSRPException e)
- {
+ } catch (WSRPException e) {
// do nothing since exception has been logged already
}
String groupID = null;
- if (portletDescription != null)
- {
+ if (portletDescription != null) {
groupID = portletDescription.getGroupID();
}
- if (groupID != null)
- {
- GroupSessionMgr groupSession =
- userSession.getGroupSession(groupID);
+ if (groupID != null) {
+ GroupSessionMgr groupSession = userSession.getGroupSession(groupID);
groupSession.setInitCookieDone(false);
}
}
}
- private void checkInitCookie(String userID) throws WSRPException
- {
- UserSessionMgr userSession =
- this.consumerEnv.getSessionHandler().getUserSession(
- getPortlet().getPortletKey().getProducerId(),
- userID);
+ private void checkInitCookie(String userID) throws WSRPException {
+ UserSessionMgr userSession = this.consumerEnv.getSessionHandler().getUserSession(
+ getPortlet().getPortletKey().getProducerId(), userID);
- if (initCookie.getValue().equalsIgnoreCase(CookieProtocol._perUser))
- {
+ if (initCookie.getValue().equalsIgnoreCase(CookieProtocol._perUser)) {
this.markupPort = userSession.getWSRPBaseService();
- if (!userSession.isInitCookieDone())
- {
+ if (!userSession.isInitCookieDone()) {
userSession.setInitCookieRequired(true);
initCookie();
userSession.setInitCookieDone(true);
}
- } else if (initCookie.getValue().equalsIgnoreCase(
- CookieProtocol._perGroup))
- {
+ } else if (initCookie.getValue().equalsIgnoreCase(CookieProtocol._perGroup)) {
- PortletDescription portletDescription =
- producer.getPortletDescription(getPortlet().getParent());
+ PortletDescription portletDescription = producer.getPortletDescription(getPortlet()
+ .getParent());
String groupID = null;
- if (portletDescription != null)
- {
+ if (portletDescription != null) {
groupID = portletDescription.getGroupID();
}
- if (groupID != null)
- {
- GroupSessionMgr groupSession =
- userSession.getGroupSession(groupID);
+ if (groupID != null) {
+ GroupSessionMgr groupSession = userSession.getGroupSession(groupID);
this.markupPort = groupSession.getWSRPBaseService();
- if (!groupSession.isInitCookieDone())
- {
+ if (!groupSession.isInitCookieDone()) {
groupSession.setInitCookieRequired(true);
initCookie();
groupSession.setInitCookieDone(true);
}
- } else
- {
- // means either we have no service description from the
+ } else {
+ // means either we have no service description from the
// producer containg the portlet
- // or the producer specified initCookieRequired perGroup
+ // or the producer specified initCookieRequired perGroup
// but didn't provide
- // a groupID in the portlet description
+ // a groupID in the portlet description
}
- } else
- {
+ } else {
this.markupPort = userSession.getWSRPBaseService();
}
-
+
}
- private MarkupParams getMarkupParams(WSRPBaseRequest request)
- {
+ private MarkupParams getMarkupParams(WSRPBaseRequest request) {
MarkupParams markupParams = new MarkupParams();
ClientData clientData = null;
@@ -239,8 +212,7 @@
// lets just set this to the consumer agent for now
if (producer.getRegistrationData() != null) {
clientData = new ClientData();
- clientData.setUserAgent(
- producer.getRegistrationData().getConsumerAgent());
+ clientData.setUserAgent(producer.getRegistrationData().getConsumerAgent());
}
markupParams.setClientData(clientData);
markupParams.setSecureClientCommunication(false);
@@ -251,77 +223,66 @@
markupParams.setMode(request.getMode());
markupParams.setWindowState(request.getWindowState());
markupParams.setNavigationalState(request.getNavigationalState());
- markupParams.setMarkupCharacterSets(
- consumerEnv.getCharacterEncodingSet());
+ markupParams.setMarkupCharacterSets(consumerEnv.getCharacterEncodingSet());
markupParams.setValidateTag(null); // TODO ValidateTag
- // TODO: Set only modes and window states that are supported by the portlet as
- // described in it's portlet description.
+ // TODO: Set only modes and window states that are supported by the
+ // portlet as
+ // described in it's portlet description.
markupParams.setValidNewModes(consumerEnv.getSupportedModes());
- markupParams.setValidNewWindowStates(
- consumerEnv.getSupportedWindowStates());
+ markupParams.setValidNewWindowStates(consumerEnv.getSupportedWindowStates());
markupParams.setExtensions(null);
return markupParams;
}
- private RuntimeContext getRuntimeContext(WSRPBaseRequest request)
- {
+ private RuntimeContext getRuntimeContext(WSRPBaseRequest request) {
RuntimeContext runtimeContext = new RuntimeContext();
- runtimeContext.setUserAuthentication(
- consumerEnv.getUserAuthentication());
+ runtimeContext.setUserAuthentication(consumerEnv.getUserAuthentication());
runtimeContext.setPortletInstanceKey(request.getPortletInstanceKey());
- URLTemplateComposer templateComposer =
- consumerEnv.getTemplateComposer();
- if (templateComposer != null)
- {
- runtimeContext.setNamespacePrefix(
- templateComposer.getNamespacePrefix());
+ URLTemplateComposer templateComposer = consumerEnv.getTemplateComposer();
+ if (templateComposer != null) {
+ runtimeContext.setNamespacePrefix(templateComposer.getNamespacePrefix());
}
Boolean doesUrlTemplateProcess = null;
- try
- {
+ try {
- PortletDescription desc =
- producer.getPortletDescription(getPortlet().getParent());
+ PortletDescription desc = producer.getPortletDescription(getPortlet().getParent());
- if (desc != null)
- {
+ if (desc != null) {
doesUrlTemplateProcess = desc.getDoesUrlTemplateProcessing();
}
- } catch (WSRPException e)
- {
+ } catch (WSRPException e) {
// do nothing since exception has been logged already
- // continue with assumption that portlet does not support template
+ // continue with assumption that portlet does not support template
// processing
}
- if (doesUrlTemplateProcess != null && templateComposer != null &&
- doesUrlTemplateProcess.booleanValue())
- {
+ if (doesUrlTemplateProcess != null && templateComposer != null
+ && doesUrlTemplateProcess.booleanValue()) {
Templates templates = new Templates();
- templates.setBlockingActionTemplate(templateComposer.
- createBlockingActionTemplate(true, true, true, true));
- templates.setRenderTemplate(templateComposer.
- createRenderTemplate(true, true, true, true));
- templates.setDefaultTemplate(templateComposer.
- createDefaultTemplate(true, true, true, true));
- templates.setResourceTemplate(templateComposer.
- createResourceTemplate(true, true, true, true));
- templates.setSecureBlockingActionTemplate(templateComposer.
- createSecureBlockingActionTemplate(true, true, true, true));
- templates.setSecureRenderTemplate(templateComposer.
- createSecureRenderTemplate(true, true, true, true));
- templates.setSecureDefaultTemplate(templateComposer.
- createSecureDefaultTemplate(true, true, true, true));
- templates.setSecureResourceTemplate(templateComposer.
- createSecureResourceTemplate(true, true, true, true));
+ templates.setBlockingActionTemplate(templateComposer.createBlockingActionTemplate(true,
+ true, true, true));
+ templates.setRenderTemplate(templateComposer.createRenderTemplate(true, true, true,
+ true));
+ templates.setDefaultTemplate(templateComposer.createDefaultTemplate(true, true, true,
+ true));
+ templates.setResourceTemplate(templateComposer.createResourceTemplate(true, true, true,
+ true));
+ templates.setSecureBlockingActionTemplate(templateComposer
+ .createSecureBlockingActionTemplate(true, true, true, true));
+ templates.setSecureRenderTemplate(templateComposer.createSecureRenderTemplate(true,
+ true, true, true));
+ templates.setSecureDefaultTemplate(templateComposer.createSecureDefaultTemplate(true,
+ true, true, true));
+ templates.setSecureResourceTemplate(templateComposer.createSecureResourceTemplate(true,
+ true, true, true));
runtimeContext.setTemplates(templates);
}
@@ -331,50 +292,44 @@
return runtimeContext;
}
- private UserContext getUserContext(String userID)
- {
+ private UserContext getUserContext(String userID) {
UserContext userContext = null;
- if (userID != null)
- {
+ if (userID != null) {
User user = consumerEnv.getUserRegistry().getUser(userID);
- if (user != null)
- {
+ if (user != null) {
userContext = user.getUserContext();
}
}
-
+
// workaround for Oracle bug, always send a userContext with dummy value
// if none was provided
-
+
if (userContext == null) {
- userContext = new UserContext();
- userContext.setUserContextKey("dummyUserContextKey");
+ userContext = new UserContext();
+ userContext.setUserContextKey("dummyUserContextKey");
}
return userContext;
}
- private InteractionParams getInteractionParams(
- InteractionRequest actionRequest)
- {
+ private InteractionParams getInteractionParams(InteractionRequest actionRequest) {
InteractionParams interactionParams = new InteractionParams();
- interactionParams.setPortletStateChange(
- consumerEnv.getPortletStateChange());
-
+ interactionParams.setPortletStateChange(consumerEnv.getPortletStateChange());
+
// access POPs with cloneBeforeWrite
// however keep the default behaviour from ConsEnv
- // this means that if readWrite is set and we access a POP then set to cloneBeforeWrite
- if (!portlet.isConsumerConfigured() &&
- interactionParams.getPortletStateChange().toString().
- equalsIgnoreCase(StateChange._readWrite)) {
- interactionParams.setPortletStateChange(StateChange.cloneBeforeWrite);
- }
-
- interactionParams.setInteractionState(
- actionRequest.getInteractionState());
+ // this means that if readWrite is set and we access a POP then set to
+ // cloneBeforeWrite
+ if (!portlet.isConsumerConfigured()
+ && interactionParams.getPortletStateChange().toString().equalsIgnoreCase(
+ StateChange._readWrite)) {
+ interactionParams.setPortletStateChange(StateChange.cloneBeforeWrite);
+ }
+
+ interactionParams.setInteractionState(actionRequest.getInteractionState());
interactionParams.setFormParameters(actionRequest.getFormParameters());
interactionParams.setUploadContexts(null);
interactionParams.setExtensions(null);
@@ -383,26 +338,23 @@
}
/**
- * This method is used to retrieve the markup generated by the portlet
- * instance.
- *
- * @param markupRequest
- * @param userID
- * @return The markup response generated by the portlet
- **/
- public MarkupResponse getMarkup(MarkupRequest markupRequest, String userID)
- throws WSRPException
- {
+ * This method is used to retrieve the markup generated by the portlet
+ * instance.
+ *
+ * @param markupRequest
+ * @param userID
+ * @return The markup response generated by the portlet
+ */
+ public MarkupResponse getMarkup(MarkupRequest markupRequest, String userID)
+ throws WSRPException {
checkInitCookie(userID);
MarkupResponse response = null;
- try
- {
+ try {
MarkupContext markupContext = null;
- if ((markupContext = markupRequest.getCachedMarkup()) == null)
- {
+ if ((markupContext = markupRequest.getCachedMarkup()) == null) {
// getMarkup request
GetMarkup request = new GetMarkup();
@@ -423,35 +375,28 @@
parameterChecker.check(response);
- } else
- {
+ } else {
response = new MarkupResponse();
response.setMarkupContext(markupContext);
- }
-
- Boolean requiresRewriting =
- response.getMarkupContext().getRequiresUrlRewriting();
- requiresRewriting = requiresRewriting ==
- null ? Boolean.FALSE : requiresRewriting;
+ }
+
+ Boolean requiresRewriting = response.getMarkupContext().getRequiresUrlRewriting();
+ requiresRewriting = requiresRewriting == null ? Boolean.FALSE : requiresRewriting;
- if (requiresRewriting.booleanValue())
- {
+ if (requiresRewriting.booleanValue()) {
// rewrite url's
URLRewriter urlRewriter = consumerEnv.getURLRewriter();
- String rewrittenMarkup = urlRewriter.rewriteURLs(
- response.getMarkupContext().getMarkupString());
+ String rewrittenMarkup = urlRewriter.rewriteURLs(response.getMarkupContext()
+ .getMarkupString());
- if (rewrittenMarkup != null)
- {
- response.getMarkupContext().setMarkupString(
- rewrittenMarkup);
+ if (rewrittenMarkup != null) {
+ response.getMarkupContext().setMarkupString(rewrittenMarkup);
}
}
- } catch (InvalidCookieFault cookieFault)
- {
+ } catch (InvalidCookieFault cookieFault) {
// lets reset the init cookie settings
resetInitCookie(userID);
@@ -459,8 +404,7 @@
// and try it again
response = getMarkup(markupRequest, userID);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
@@ -470,25 +414,20 @@
}
/**
- * This method is used to perform a blocking interaction on the portlet
+ * This method is used to perform a blocking interaction on the portlet
* instance.
*
- * @param actionRequest
- **/
- public BlockingInteractionResponse performBlockingInteraction(
- InteractionRequest actionRequest,
- String userID)
- throws WSRPException
- {
+ * @param actionRequest
+ */
+ public BlockingInteractionResponse performBlockingInteraction(InteractionRequest actionRequest,
+ String userID) throws WSRPException {
checkInitCookie(userID);
BlockingInteractionResponse response = null;
- try
- {
- PerformBlockingInteraction request =
- new PerformBlockingInteraction();
+ try {
+ PerformBlockingInteraction request = new PerformBlockingInteraction();
request.setPortletContext(getPortlet().getPortletContext());
request.setInteractionParams(getInteractionParams(actionRequest));
@@ -507,8 +446,7 @@
parameterChecker.check(response);
- } catch (InvalidCookieFault cookieFault)
- {
+ } catch (InvalidCookieFault cookieFault) {
// lets reset the init cookie settings
resetInitCookie(userID);
@@ -516,8 +454,7 @@
// and try it again
response = performBlockingInteraction(actionRequest, userID);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}
@@ -529,9 +466,8 @@
* Clone the portlet
*
* @return The new portlet context
- **/
- public PortletContext clonePortlet(String userID) throws WSRPException
- {
+ */
+ public PortletContext clonePortlet(String userID) throws WSRPException {
ClonePortlet request = new ClonePortlet();
request.setPortletContext(getPortlet().getPortletContext());
@@ -546,14 +482,12 @@
PortletContext response = null;
- try
- {
+ try {
response = portletPort.clonePortlet(request);
parameterChecker.check(response, Constants.NILLABLE_FALSE);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}
@@ -562,12 +496,10 @@
}
/**
- * Destroy the producer portlets specified in the entiyHandles array.
- **/
- public DestroyPortletsResponse destroyPortlets(
- String[] portletHandles, String userID)
- throws WSRPException
- {
+ * Destroy the producer portlets specified in the entiyHandles array.
+ */
+ public DestroyPortletsResponse destroyPortlets(String[] portletHandles, String userID)
+ throws WSRPException {
DestroyPortlets request = new DestroyPortlets();
RegistrationContext regCtx = producer.getRegistrationContext();
@@ -577,14 +509,12 @@
request.setPortletHandles(portletHandles);
DestroyPortletsResponse response = null;
- try
- {
+ try {
response = portletPort.destroyPortlets(request);
parameterChecker.check(response);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}
@@ -594,11 +524,9 @@
/**
* Inform the producer that the sessions specified in the sessionIDs array
- * will no longer be used by the consumer and can therefor be released.
- **/
- public ReturnAny releaseSessions(String[] sessionIDs, String userID)
- throws WSRPException
- {
+ * will no longer be used by the consumer and can therefor be released.
+ */
+ public ReturnAny releaseSessions(String[] sessionIDs, String userID) throws WSRPException {
checkInitCookie(userID);
@@ -611,13 +539,11 @@
request.setSessionIDs(sessionIDs);
ReturnAny response = null;
- try
- {
+ try {
response = markupPort.releaseSessions(request);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}
@@ -627,39 +553,36 @@
/**
* Actual WSRP initCookie() call
- **/
- public void initCookie() throws WSRPException
- {
+ */
+ public void initCookie() throws WSRPException {
InitCookie request = new InitCookie();
RegistrationContext regCtx = producer.getRegistrationContext();
if (regCtx != null)
request.setRegistrationContext(regCtx);
- try
- {
+ try {
markupPort.initCookie(request);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}
}
/**
- * Fetches information about the portlet from the producer.
+ * Fetches information about the portlet from the producer.
*
- * @param userID is used to get the user context of the user from the user
- * registry
- * @param desiredLocales Array of locales the description should be provided
+ * @param userID
+ * is used to get the user context of the user from the user
+ * registry
+ * @param desiredLocales
+ * Array of locales the description should be provided
*
* @return The response to the getPortletDescription call.
- **/
- public PortletDescriptionResponse getPortletDescription(
- String userID, String[] desiredLocales)
- throws WSRPException
- {
+ */
+ public PortletDescriptionResponse getPortletDescription(String userID, String[] desiredLocales)
+ throws WSRPException {
GetPortletDescription request = new GetPortletDescription();
RegistrationContext regCtx = producer.getRegistrationContext();
@@ -676,14 +599,12 @@
PortletDescriptionResponse response = null;
- try
- {
+ try {
response = portletPort.getPortletDescription(request);
parameterChecker.check(response);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}
@@ -694,16 +615,14 @@
/**
* Fetches all published properties of an remote portlet.
*
- * @param userID The ID of the user this request is done for
+ * @param userID
+ * The ID of the user this request is done for
*
* @return The portlet property description response from the producer
- **/
- public PortletPropertyDescriptionResponse getPortletPropertyDescription(
- String userID)
- throws WSRPException
- {
- GetPortletPropertyDescription request =
- new GetPortletPropertyDescription();
+ */
+ public PortletPropertyDescriptionResponse getPortletPropertyDescription(String userID)
+ throws WSRPException {
+ GetPortletPropertyDescription request = new GetPortletPropertyDescription();
request.setPortletContext(getPortlet().getPortletContext());
RegistrationContext regCtx = producer.getRegistrationContext();
@@ -718,14 +637,12 @@
PortletPropertyDescriptionResponse response = null;
- try
- {
+ try {
response = portletPort.getPortletPropertyDescription(request);
parameterChecker.check(response);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}
@@ -736,15 +653,15 @@
/**
* Get the current values of the properties with the given names.
*
- * @param names The names of the properties
- * @param userID The ID of the user is used to get the user context
+ * @param names
+ * The names of the properties
+ * @param userID
+ * The ID of the user is used to get the user context
*
- * @return A list of properties containing the values and names of the
- * properties.
- **/
- public PropertyList getPortletProperties(String[] names, String userID)
- throws WSRPException
- {
+ * @return A list of properties containing the values and names of the
+ * properties.
+ */
+ public PropertyList getPortletProperties(String[] names, String userID) throws WSRPException {
GetPortletProperties request = new GetPortletProperties();
request.setPortletContext(getPortlet().getPortletContext());
request.setNames(names);
@@ -759,14 +676,12 @@
PropertyList response = null;
- try
- {
+ try {
response = portletPort.getPortletProperties(request);
parameterChecker.check(response, Constants.NILLABLE_FALSE);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}
@@ -777,13 +692,13 @@
/**
* Set the portlet properties specified in the property list
*
- * @param properties List of properties to be set.
- * @param userID The ID of the user is used to get the user context
- **/
- public PortletContext setPortletProperties(
- PropertyList properties, String userID)
- throws WSRPException
- {
+ * @param properties
+ * List of properties to be set.
+ * @param userID
+ * The ID of the user is used to get the user context
+ */
+ public PortletContext setPortletProperties(PropertyList properties, String userID)
+ throws WSRPException {
SetPortletProperties request = new SetPortletProperties();
request.setPortletContext(getPortlet().getPortletContext());
@@ -798,14 +713,12 @@
PortletContext response = null;
- try
- {
+ try {
response = portletPort.setPortletProperties(request);
parameterChecker.check(response, Constants.NILLABLE_FALSE);
- } catch (java.rmi.RemoteException wsrpFault)
- {
+ } catch (java.rmi.RemoteException wsrpFault) {
WSRPXHelper.handleWSRPFault(logger, wsrpFault);
}