org.apache.jetspeed.capabilities.impl
Class ClientImpl

java.lang.Object
  extended by org.apache.jetspeed.capabilities.impl.ClientImpl
All Implemented Interfaces:
java.io.Serializable, Client

public class ClientImpl
extends java.lang.Object
implements Client, java.io.Serializable

Simple implementation of the ClientRegistry interface.

Version:
$Id: ClientImpl.java 516448 2007-03-09 16:25:47Z ate $
Author:
Stephan Hesmer, Rapha?l Luta, Roger Ruttimann
See Also:
Serialized Form

Constructor Summary
ClientImpl()
           
 
Method Summary
 boolean equals(java.lang.Object object)
          Implements the equals operation so that 2 elements are equal if all their member values are equal.
 java.util.Collection getCapabilities()
          Returns all supported capablities as CapabilityMap.
 int getClientId()
          Get Client ID
 int getEvalOrder()
           
 java.lang.String getManufacturer()
          Returns the manufacturer of this client
 java.util.Collection getMimetypes()
          Returns all supported mimetypes as MimeTypeMap.
 java.lang.String getModel()
          Returns the model of this client
 java.lang.String getName()
           
 int getPreferredMimeTypeId()
          getPreferredMimeTypeId
 java.lang.String getUserAgentPattern()
          Returns the pattern parameter of this client.
 java.lang.String getVersion()
          Returns the version of this client
 void setCapabilities(java.util.Collection capabilities)
          Assigns a list of capabilities
 void setClientId(int id)
          Set Client ID -- Assigns the Client ID
 void setEvalOrder(int evalOrder)
           
 void setManufacturer(java.lang.String name)
          Sets the new manufacturer of this client
 void setMimetypes(java.util.Collection mimetypes)
          Set MimeTypes
 void setModel(java.lang.String name)
          Sets the new model of this client
 void setName(java.lang.String string)
           
 void setPreferredMimeTypeId(int mimeTypeId)
          Set preferred Mimetype ID for Client
 void setUserAgentPattern(java.lang.String userAgentPattern)
          Sets the pattern used to match the user agent.
 void setVersion(java.lang.String name)
          Sets the new version of this client
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientImpl

public ClientImpl()
Method Detail

equals

public boolean equals(java.lang.Object object)
Implements the equals operation so that 2 elements are equal if all their member values are equal.

Overrides:
equals in class java.lang.Object

getUserAgentPattern

public java.lang.String getUserAgentPattern()
Description copied from interface: Client
Returns the pattern parameter of this client. The pattern is used to match a client to the user agent used to access the portal. If the pattern matches the user agent string, this client is recognized as the one the user is currently working with.

Specified by:
getUserAgentPattern in interface Client
Returns:
the pattern of this client

setUserAgentPattern

public void setUserAgentPattern(java.lang.String userAgentPattern)
Description copied from interface: Client
Sets the pattern used to match the user agent.

Specified by:
setUserAgentPattern in interface Client
Parameters:
userAgentPattern - the new pattern

getManufacturer

public java.lang.String getManufacturer()
Description copied from interface: Client
Returns the manufacturer of this client

Specified by:
getManufacturer in interface Client
Returns:
the manufacturer of this client

setManufacturer

public void setManufacturer(java.lang.String name)
Description copied from interface: Client
Sets the new manufacturer of this client

Specified by:
setManufacturer in interface Client
Parameters:
name - the new manufacturer

getModel

public java.lang.String getModel()
Description copied from interface: Client
Returns the model of this client

Specified by:
getModel in interface Client
Returns:
the model of this client

setModel

public void setModel(java.lang.String name)
Description copied from interface: Client
Sets the new model of this client

Specified by:
setModel in interface Client
Parameters:
name - the new model

getVersion

public java.lang.String getVersion()
Description copied from interface: Client
Returns the version of this client

Specified by:
getVersion in interface Client
Returns:
the version of this client

setVersion

public void setVersion(java.lang.String name)
Description copied from interface: Client
Sets the new version of this client

Specified by:
setVersion in interface Client
Parameters:
name - the new version

getMimetypes

public java.util.Collection getMimetypes()
Description copied from interface: Client
Returns all supported mimetypes as MimeTypeMap. The MimeTypeMap contains all mimetypes in decreasing order of importance.

Specified by:
getMimetypes in interface Client
Returns:
the MimeTypeMap
See Also:
MimeTypeMap

setMimetypes

public void setMimetypes(java.util.Collection mimetypes)
Description copied from interface: Client
Set MimeTypes

Specified by:
setMimetypes in interface Client

getCapabilities

public java.util.Collection getCapabilities()
Description copied from interface: Client
Returns all supported capablities as CapabilityMap. The CapabilityMap contains all capabilities in arbitrary order.

Specified by:
getCapabilities in interface Client
Returns:
the CapabilityMap
See Also:
CapabilityMap

setCapabilities

public void setCapabilities(java.util.Collection capabilities)
Description copied from interface: Client
Assigns a list of capabilities

Specified by:
setCapabilities in interface Client

setClientId

public void setClientId(int id)
Set Client ID -- Assigns the Client ID

Specified by:
setClientId in interface Client
Parameters:
id -

getClientId

public int getClientId()
Get Client ID

Specified by:
getClientId in interface Client
Returns:
Client ID

getName

public java.lang.String getName()
Specified by:
getName in interface Client
Returns:

setName

public void setName(java.lang.String string)
Specified by:
setName in interface Client
Parameters:
string -

getPreferredMimeTypeId

public int getPreferredMimeTypeId()
Description copied from interface: Client
getPreferredMimeTypeId

Specified by:
getPreferredMimeTypeId in interface Client
Returns:
Preferred MimeType ID for Client

setPreferredMimeTypeId

public void setPreferredMimeTypeId(int mimeTypeId)
Set preferred Mimetype ID for Client

Specified by:
setPreferredMimeTypeId in interface Client
Parameters:
mimeTypeId - MimeTypeId

getEvalOrder

public int getEvalOrder()
Specified by:
getEvalOrder in interface Client
Returns:
Returns the evalOrder.

setEvalOrder

public void setEvalOrder(int evalOrder)
Specified by:
setEvalOrder in interface Client
Parameters:
evalOrder - The evalOrder to set.


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.