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 dl...@apache.org on 2005/08/28 23:32:23 UTC
cvs commit: ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/consumer Consumer.java ConsumerCapabilities.java ConsumerEnvironment.java
dlouzan 2005/08/28 14:32:23
Added: sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/consumer
Consumer.java ConsumerCapabilities.java
ConsumerEnvironment.java
Log:
Initial commit.
Revision Changes Path
1.1 ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/consumer/Consumer.java
Index: Consumer.java
===================================================================
/*
* Copyright 2003-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wsrp4j.commons.consumer.interfaces.consumer;
import org.apache.wsrp4j.commons.consumer.interfaces.session.SessionHandler;
import org.apache.wsrp4j.commons.consumer.interfaces.portlet.PortletRegistry;
import org.apache.wsrp4j.commons.consumer.interfaces.portletdriver.PortletDriverRegistry;
import org.apache.wsrp4j.commons.consumer.interfaces.producer.ProducerRegistry;
import org.apache.wsrp4j.commons.consumer.interfaces.user.UserRegistry;
import org.apache.wsrp4j.commons.consumer.interfaces.urlgenerator.URLRewriter;
import org.apache.wsrp4j.commons.consumer.interfaces.urlgenerator.URLTemplateComposer;
/**
* The consumer provides access to consumer specific components.
*
* @author <a href='mailto:peter.fischer@de.ibm.com'>Peter Fischer</a>
* @version $Id: Consumer.java,v 1.1 2005/08/28 21:32:22 dlouzan Exp $
*/
public interface Consumer {
/**
* Get the session handler of the consumer.
*
* @return Interface to the consumer specific session handler
**/
SessionHandler getSessionHandler();
/**
* Get the portlet registry of the consumer.
*
* @return Interface to the consumer specific portlet registry
**/
PortletRegistry getPortletRegistry();
/**
* Get the portlet driver registry of the consumer.
*
* @return Interface to the consumer specific portlet driver registry
**/
PortletDriverRegistry getPortletDriverRegistry();
/**
* Get the producer registry of the consumer.
*
* @return The consumer specific producer registry
**/
ProducerRegistry getProducerRegistry();
/**
* Get the user registry of the consumer.
*
* @return The consumer specific user registry
**/
UserRegistry getUserRegistry();
/**
* Get the url template composer for template proccessing
*
* @return Interface to the consumer specific template composer
**/
URLTemplateComposer getTemplateComposer();
/**
* Get the url rewriter for consumer url-rewriting
*
* @return The consumer specific url rewriter
**/
URLRewriter getURLRewriter();
}
1.1 ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/consumer/ConsumerCapabilities.java
Index: ConsumerCapabilities.java
===================================================================
/*
* Copyright 2003-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wsrp4j.commons.consumer.interfaces.consumer;
import oasis.names.tc.wsrp.v1.types.StateChange;
/**
* The consumer capababilities provides access to consumer related information.
*
* @author <a href='mailto:peter.fischer@de.ibm.com'>Peter Fischer</a>
*
* @version $Id: ConsumerCapabilities.java,v 1.1 2005/08/28 21:32:22 dlouzan Exp $
*/
public interface ConsumerCapabilities {
/**
* Get the name of the consumer
*
* @return The name of the consumer
**/
String getConsumerAgent();
/**
* Get the method which is used by the consumer to authenticate its users.
*
* @return String indicating how end-users were authenticated by the
* consumer.
**/
String getUserAuthentication();
/**
* 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
**/
String[] getSupportedLocales();
/**
* 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
**/
String[] getSupportedModes();
/**
* 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
**/
String[] getSupportedWindowStates();
/**
* 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
**/
StateChange getPortletStateChange();
/**
* 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.
**/
String[] getCharacterEncodingSet();
/**
* 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.
**/
String[] getMimeTypes();
/**
* Set the name of the consumer
*
* @param name The new name of the consumer
**/
void setConsumerAgent(String name);
/**
* Set the method of end user authentication used by the consumer..
*
* @param authMethod indicating how end-users are authenticated by the
* consumer.
**/
void setUserAuthentication(String authMethod);
/**
* 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.
**/
void setMimeTypes(String[] mimeTypes);
/**
* Set the locales which are supported by the consumer.
* Pattern: ISO-639 + "_" + ISO-3166
*
* @param locales Array of string representations of supported locales
**/
void setSupportedLocales(String[] locales);
/**
* Set the portlet modes which are supported by the consumer.
*
* @param modes Array of string representations of portlet modes
**/
void setSupportedModes(String[] modes);
/**
* Set the window states which are supported by the consumer.
*
* @param states Array of string representations of window states
**/
void setSupportedWindowStates(String[] states);
/**
* 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:
* StateChange.OK, StateChange.Clone, StateChange.Fault
**/
void setPortletStateChange(StateChange portletStateChange);
/**
* 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.
**/
void setCharacterEncodingSet(String[] charEncoding);
}
1.1 ws-wsrp4j/sandbox/wsrp4j/commons-consumer/src/java/org/apache/wsrp4j/commons/consumer/interfaces/consumer/ConsumerEnvironment.java
Index: ConsumerEnvironment.java
===================================================================
/*
* Copyright 2003-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.wsrp4j.commons.consumer.interfaces.consumer;
/**
* The consumer environment provides access to consumer specific components
* and data.
*
* @author Stephan.Laertz@de.ibm.com
* @author <a href='mailto:peter.fischer@de.ibm.com'>Peter Fischer</a>
*
* @version $Id: ConsumerEnvironment.java,v 1.1 2005/08/28 21:32:22 dlouzan Exp $
*/
public interface ConsumerEnvironment extends Consumer, ConsumerCapabilities
{
// just a combination of the two interfaces
}