View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package org.apache.jetspeed.capabilities;
18  
19  import java.util.Collection;
20  
21  /***
22   * <P>
23   * The <CODE>ClientEntry</CODE> interface represents one client inside
24   * of the client registry. It is accessed by the portlet container
25   * to get information about the clients.
26   * </P>
27   *
28   * @author <a href="shesmer@raleigh.ibm.com">Stephan Hesmer</a>
29   * @author <a href="raphael@apache.org">Rapha\u00ebl Luta</a>
30   * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
31   */
32  public interface Client
33  {
34      /***
35       * Set Client ID -- Assigns the Client ID
36       * @param id
37       */
38      public void setClientId(int id);
39  
40      /***
41       * Get Client ID
42       * @return Client ID
43       */
44      public int getClientId();
45  
46      public int getEvalOrder();
47      
48      public void setEvalOrder(int evalOrder);
49      
50      /***
51       * Returns the pattern parameter of this client. The pattern is used
52       * to match a client to the user agent used to access the portal. If
53       * the pattern matches the user agent string, this client is recognized
54       * as the one the user is currently working with.
55       *
56       * @return the pattern of this client
57       */
58      public String getUserAgentPattern();
59  
60      /***
61       * Sets the pattern used to match the user agent.
62       *
63       * @param useragentpattern
64       *               the new pattern
65       */
66      public void setUserAgentPattern(String useragentpattern);
67  
68      /***
69       * Returns the manufacturer of this client
70       *
71       * @return the manufacturer of this client
72       */
73      public String getManufacturer();
74  
75      /***
76       * Sets the new manufacturer of this client
77       *
78       * @param name   the new manufacturer
79       */
80      public void setManufacturer(String name);
81  
82      /***
83       * Returns the model of this client
84       *
85       * @return the model of this client
86       */
87      public String getModel();
88  
89      /***
90       * Sets the new model of this client
91       *
92       * @param name   the new model
93       */
94      public void setModel(String name);
95  
96      /***
97       * Returns the version of this client
98       *
99       * @return the version of this client
100      */
101     public String getVersion();
102 
103     /***
104      * Sets the new version of this client
105      *
106      * @param name   the new version
107      */
108     public void setVersion(String name);
109 
110     /***
111      * Returns all supported mimetypes as <CODE>MimeTypeMap</CODE>.
112      * The <CODE>MimeTypeMap</CODE> contains all mimetypes in decreasing
113      * order of importance.
114      *
115      * @return the MimeTypeMap
116      * @see MimeTypeMap
117      */
118     public Collection getMimetypes();
119 
120     /***
121      * Set MimeTypes
122      * @param mimetypes
123      */
124     public void setMimetypes(Collection mimetypes);
125 
126     String getName();
127     void setName(String name);
128 
129     /***
130      * Returns all supported capablities as <CODE>CapabilityMap</CODE>.
131      * The <CODE>CapabilityMap</CODE> contains all capabilities in arbitrary
132      * order.
133      *
134      * @return the CapabilityMap
135      * @see CapabilityMap
136      */
137     public Collection getCapabilities();
138 
139     /***
140      * Assigns a list of capabilities
141      * @param capabilities
142      */
143     public void setCapabilities(Collection capabilities);
144 
145     /***
146      * getPreferredMimeTypeId
147      * @return mimeTypeId
148      */
149     public int getPreferredMimeTypeId();
150 
151     /***
152      * setPreferredMimeTypeId
153      * @param mimeTypeId to be set as preferred mimeType
154      */
155     public void setPreferredMimeTypeId(int mimeTypeId);
156 
157 }