com.ibm.wps.pe.pc.legacy.cmpf
Class ClientWrapper

java.lang.Object
  extended by com.ibm.wps.pe.pc.legacy.cmpf.ClientWrapper
All Implemented Interfaces:
Client

public class ClientWrapper
extends java.lang.Object
implements Client

Wrapper class around the Client interface which allows to return modified markup or capabilities.

Since:
5.0

Constructor Summary
ClientWrapper(Client client)
          Creates a new wrapper object from a Client
 
Method Summary
 Client getClient()
          Returns the wrapped client.
 java.lang.String getManufacturer()
          Returns the name of the manufacturer of this client, or null if the name is not available.
 java.lang.String getMarkupName()
          Returns the preferred markup name that this client device supports.
 java.lang.String getMimeType()
          Returns the preferred mime-type that this client device supports.
 java.lang.String getModel()
          Returns the name of the model of this client, or null if the name is not available.
 java.lang.String getUserAgent()
          Returns the exact user agent that this client uses to identify itself to the portal.
 java.lang.String getVersion()
          Returns the version of the model of this client, or null if the version is not available.
 boolean isCapableOf(Capability capability)
          Returns whether this client has the given capability.
 boolean isCapableOf(Capability[] capabilities)
          Returns whether this client has the given capabilities.
 void setClient(Client client)
          Sets the client to be wrapped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientWrapper

public ClientWrapper(Client client)
Creates a new wrapper object from a Client

Parameters:
client - the client to be wrapped
Method Detail

getClient

public Client getClient()
Returns the wrapped client.

Returns:
the wrapped client.

setClient

public void setClient(Client client)
Sets the client to be wrapped

Parameters:
client - client to be wrapped

getMarkupName

public java.lang.String getMarkupName()
Description copied from interface: Client
Returns the preferred markup name that this client device supports.

Specified by:
getMarkupName in interface Client
Returns:
the naem of the markup

getManufacturer

public java.lang.String getManufacturer()
Description copied from interface: Client
Returns the name of the manufacturer of this client, or null if the name is not available.

Specified by:
getManufacturer in interface Client
Returns:
the manufacturer

getModel

public java.lang.String getModel()
Description copied from interface: Client
Returns the name of the model of this client, or null if the name is not available.

Specified by:
getModel in interface Client
Returns:
the model

getMimeType

public java.lang.String getMimeType()
Description copied from interface: Client
Returns the preferred mime-type that this client device supports.

Specified by:
getMimeType in interface Client
Returns:
the mime-type

getVersion

public java.lang.String getVersion()
Description copied from interface: Client
Returns the version of the model of this client, or null if the version is not available.

Specified by:
getVersion in interface Client
Returns:
the version

getUserAgent

public java.lang.String getUserAgent()
Description copied from interface: Client
Returns the exact user agent that this client uses to identify itself to the portal. If the client does not send a user agent, this method returns null.

Specified by:
getUserAgent in interface Client
Returns:
the user agent

isCapableOf

public boolean isCapableOf(Capability[] capabilities)
Description copied from interface: Client
Returns whether this client has the given capabilities. The array of capability is tested in its entirety, ie. only if the client is capable of every single capability this methods returns true.

Specified by:
isCapableOf in interface Client
Returns:
true if the client has the given capability,
false otherwise
See Also:
Client.isCapableOf(Capability)

isCapableOf

public boolean isCapableOf(Capability capability)
Description copied from interface: Client
Returns whether this client has the given capability. If the portal does not know enough about the client, it has to be on the safe side and return false.

Specified by:
isCapableOf in interface Client
Returns:
true if the client has the given capability,
false otherwise
See Also:
Client.isCapableOf(Capability[])