001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.jetspeed.capabilities;
018:
019: import java.util.Collection;
020:
021: /**
022: * <P>
023: * The <CODE>ClientEntry</CODE> interface represents one client inside
024: * of the client registry. It is accessed by the portlet container
025: * to get information about the clients.
026: * </P>
027: *
028: * @author <a href="shesmer@raleigh.ibm.com">Stephan Hesmer</a>
029: * @author <a href="raphael@apache.org">Rapha\u00ebl Luta</a>
030: * @author <a href="mailto:roger.ruttimann@earthlink.net">Roger Ruttimann</a>
031: */
032: public interface Client {
033: /**
034: * Set Client ID -- Assigns the Client ID
035: * @param id
036: */
037: public void setClientId(int id);
038:
039: /**
040: * Get Client ID
041: * @return Client ID
042: */
043: public int getClientId();
044:
045: public int getEvalOrder();
046:
047: public void setEvalOrder(int evalOrder);
048:
049: /**
050: * Returns the pattern parameter of this client. The pattern is used
051: * to match a client to the user agent used to access the portal. If
052: * the pattern matches the user agent string, this client is recognized
053: * as the one the user is currently working with.
054: *
055: * @return the pattern of this client
056: */
057: public String getUserAgentPattern();
058:
059: /**
060: * Sets the pattern used to match the user agent.
061: *
062: * @param useragentpattern
063: * the new pattern
064: */
065: public void setUserAgentPattern(String useragentpattern);
066:
067: /**
068: * Returns the manufacturer of this client
069: *
070: * @return the manufacturer of this client
071: */
072: public String getManufacturer();
073:
074: /**
075: * Sets the new manufacturer of this client
076: *
077: * @param name the new manufacturer
078: */
079: public void setManufacturer(String name);
080:
081: /**
082: * Returns the model of this client
083: *
084: * @return the model of this client
085: */
086: public String getModel();
087:
088: /**
089: * Sets the new model of this client
090: *
091: * @param name the new model
092: */
093: public void setModel(String name);
094:
095: /**
096: * Returns the version of this client
097: *
098: * @return the version of this client
099: */
100: public String getVersion();
101:
102: /**
103: * Sets the new version of this client
104: *
105: * @param name the new version
106: */
107: public void setVersion(String name);
108:
109: /**
110: * Returns all supported mimetypes as <CODE>MimeTypeMap</CODE>.
111: * The <CODE>MimeTypeMap</CODE> contains all mimetypes in decreasing
112: * order of importance.
113: *
114: * @return the MimeTypeMap
115: * @see MimeTypeMap
116: */
117: public Collection getMimetypes();
118:
119: /**
120: * Set MimeTypes
121: * @param mimetypes
122: */
123: public void setMimetypes(Collection mimetypes);
124:
125: String getName();
126:
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: }
|