KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > consumer > ConsumerCapabilities


1 package org.exoplatform.services.wsrp.consumer;
2
3 import org.exoplatform.services.wsrp.type.StateChange;
4
5 /**
6  * The consumer capababilities provides access to consumer related information.
7  *
8  * @author <a HREF='mailto:peter.fischer@de.ibm.com'>Peter Fischer</a>
9  * @author Benjamin Mestrallet
10  */

11 public interface ConsumerCapabilities {
12
13   /**
14    * Get the name of the consumer
15    *
16    * @return The name of the consumer
17    */

18   public String JavaDoc getConsumerAgent();
19
20   /**
21    * Get the method which is used by the consumer to authenticate its users.
22    *
23    * @return String indicating how end-users were authenticated by the consumer.
24    */

25   public String JavaDoc getUserAuthentication();
26
27   /**
28    * Get the locales which are supported by the consumer.
29    * (ISO-639 + "_" + ISO-3166)
30    *
31    * @return Array with string representations of the locales which are
32    * supported by the consumer
33    */

34   public String JavaDoc[] getSupportedLocales();
35
36   /**
37    * Get the portlet modes the consumer is willing to manage.
38    *
39    * @return Array with string representations of the portlet modes which are
40    * supported by the consumer
41    */

42   public String JavaDoc[] getSupportedModes();
43
44   /**
45    * Get the window states the consumer is willing to manage.
46    *
47    * @return Array with string representations of the window states which are
48    * supported by the consumer
49    */

50   public String JavaDoc[] getSupportedWindowStates();
51
52   /**
53    * Returns a flag which is used to indicate the producer wether or not
54    * the processing of portlets is allowed to modify the portlet state.
55    *
56    * @return A flag
57    */

58   public StateChange getPortletStateChange();
59
60   /**
61    * Get the character sets the consumer wants the remote portlet to use for encoding the markup.
62    * Valid character sets are defined <a HREF='http://www.iana.org/assignments/character-sets'>here</a>
63    *
64    * @return Array of string representations of the character encoding.
65    */

66   public String JavaDoc[] getCharacterEncodingSet();
67
68   /**
69    * Get an array of mime types which are supported by the consumer.
70    * The order in the array defines the order of preference of the consumer.
71    *
72    * @return An array of mimes types the consumer supports.
73    */

74   public String JavaDoc[] getMimeTypes();
75
76   /**
77    * Set the name of the consumer
78    *
79    * @param name The new name of the consumer
80    */

81   public void setConsumerAgent(String JavaDoc name);
82
83   /**
84    * Set the method of end user authentication used by the consumer..
85    */

86   public void setUserAuthentication(String JavaDoc authMethod);
87
88   /**
89    * Set the mime types the consumer supports
90    * The order in the array defines the order of preference of the consumer.
91    */

92   public void setMimeTypes(String JavaDoc[] mimeTypes);
93
94   /**
95    * Set the locales which are supported by the consumer.
96    * Pattern: ISO-639 + "_" + ISO-3166
97    *
98    * @param locales Array of string representations of supported locales
99    */

100   public void setSupportedLocales(String JavaDoc[] locales);
101
102   /**
103    * Set the portlet modes which are supported by the consumer.
104    *
105    * @param modes Array of string representations of portlet modes
106    */

107   public void setSupportedModes(String JavaDoc[] modes);
108
109   /**
110    * Set the window states which are supported by the consumer.
111    */

112   public void setSupportedWindowStates(String JavaDoc[] states);
113
114   /**
115    * Set a flag which is used to indicate the producer wether or not
116    * the processing of portlets is allowed to modify the portlet state.
117    *
118    * @param portletStateChange A flag with one of the following values:
119    * StateChange.OK, StateChange.Clone, StateChange.Fault
120    */

121   public void setPortletStateChange(StateChange portletStateChange);
122
123   /**
124    * Set the character set the consumer wants the remote portlet to use for encoding the markup.
125    * Valid character sets are defined <a HREF='http://www.iana.org/assignments/character-sets'>here</a>
126    *
127    * @param charEncoding Array of string representations of the character encoding.
128    */

129   public void setCharacterEncodingSet(String JavaDoc[] charEncoding);
130
131 }
132
133
Popular Tags