|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.jetspeed.capabilities.impl.CapabilityMapImpl
class CapabilityMapImpl
Implementation for capabilityMap interface
| Field Summary | |
|---|---|
private Map |
capabilityMap
|
private org.apache.jetspeed.capabilities.Client |
client
|
private static org.apache.commons.logging.Log |
log
|
private Map |
mediaTypeMap
|
private Map |
mimeTypeMap
|
private org.apache.jetspeed.capabilities.MediaType |
preferredMediaType
|
private String |
useragent
|
| Constructor Summary | |
|---|---|
CapabilityMapImpl()
|
|
| Method Summary | |
|---|---|
void |
addCapability(org.apache.jetspeed.capabilities.Capability capability)
Add capability to the CapabilityMap |
void |
addMediaType(org.apache.jetspeed.capabilities.MediaType mediatype)
Add MediaType to the MediaTypeMap |
void |
addMimetype(org.apache.jetspeed.capabilities.MimeType mimetype)
Add Mimetype to the MimetypeMap |
String |
getAgent()
Returns the user-agent string |
org.apache.jetspeed.capabilities.Client |
getClient()
Returns the Client for the CapabilityMap |
Iterator |
getMimeTypes()
Get the mime types that this CapabilityMap supports. |
org.apache.jetspeed.capabilities.MediaType |
getPreferredMediaType()
Returns the preferred media type for the current user-agent |
org.apache.jetspeed.capabilities.MimeType |
getPreferredType()
Returns the preferred MIME type for the current user-agent |
boolean |
hasCapability(int capability)
Checks to see if the current agent has the specified capability |
boolean |
hasCapability(String capability)
Checks to see if the current agent has the specified capability |
Iterator |
listMediaTypes()
Returns an ordered list of supported media-types, from most preferred to least preferred |
void |
setAgent(String userAgent)
set userAgent |
void |
setClient(org.apache.jetspeed.capabilities.Client client)
Sets the client for the CapabilityMap |
void |
setPreferredMediaType(org.apache.jetspeed.capabilities.MediaType type)
Sets the preferred MediaType for this CapabilityMap |
boolean |
supportsMediaType(String media)
Return true if this CapabilityMap supports the given media type |
boolean |
supportsMimeType(org.apache.jetspeed.capabilities.MimeType mimeType)
Return true if this CapabilityMap supports the given MimeType |
String |
toString()
Create a map -> string representation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final org.apache.commons.logging.Log log
private String useragent
private Map mimeTypeMap
private Map capabilityMap
private Map mediaTypeMap
private org.apache.jetspeed.capabilities.Client client
private org.apache.jetspeed.capabilities.MediaType preferredMediaType
| Constructor Detail |
|---|
CapabilityMapImpl()
| Method Detail |
|---|
public void setClient(org.apache.jetspeed.capabilities.Client client)
setClient in interface org.apache.jetspeed.capabilities.CapabilityMappublic org.apache.jetspeed.capabilities.Client getClient()
getClient in interface org.apache.jetspeed.capabilities.CapabilityMappublic void addCapability(org.apache.jetspeed.capabilities.Capability capability)
addCapability in interface org.apache.jetspeed.capabilities.CapabilityMappublic void addMimetype(org.apache.jetspeed.capabilities.MimeType mimetype)
addMimetype in interface org.apache.jetspeed.capabilities.CapabilityMappublic void addMediaType(org.apache.jetspeed.capabilities.MediaType mediatype)
addMediaType in interface org.apache.jetspeed.capabilities.CapabilityMappublic org.apache.jetspeed.capabilities.MimeType getPreferredType()
getPreferredType in interface org.apache.jetspeed.capabilities.CapabilityMappublic void setPreferredMediaType(org.apache.jetspeed.capabilities.MediaType type)
setPreferredMediaType in interface org.apache.jetspeed.capabilities.CapabilityMapMediaTypeEntry - public org.apache.jetspeed.capabilities.MediaType getPreferredMediaType()
getPreferredMediaType in interface org.apache.jetspeed.capabilities.CapabilityMappublic Iterator listMediaTypes()
listMediaTypes in interface org.apache.jetspeed.capabilities.CapabilityMappublic String getAgent()
getAgent in interface org.apache.jetspeed.capabilities.CapabilityMappublic void setAgent(String userAgent)
setAgent in interface org.apache.jetspeed.capabilities.CapabilityMappublic boolean hasCapability(int capability)
hasCapability in interface org.apache.jetspeed.capabilities.CapabilityMappublic boolean hasCapability(String capability)
hasCapability in interface org.apache.jetspeed.capabilities.CapabilityMappublic Iterator getMimeTypes()
getMimeTypes in interface org.apache.jetspeed.capabilities.CapabilityMappublic boolean supportsMimeType(org.apache.jetspeed.capabilities.MimeType mimeType)
supportsMimeType in interface org.apache.jetspeed.capabilities.CapabilityMappublic boolean supportsMediaType(String media)
supportsMediaType in interface org.apache.jetspeed.capabilities.CapabilityMapmedia - the name of a media type registered in the
MediaType registry
public String toString()
toString in interface org.apache.jetspeed.capabilities.CapabilityMaptoString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||