org.apache.jetspeed.capability
Interface CapabilityMap

All Known Implementing Classes:
BaseCapabilityMap

public interface CapabilityMap

This interface provides lookup features on the capabilities supported by a client user agent.

Version:
$Id: CapabilityMap.java,v 1.9 2005/03/21 18:21:35 sgala Exp $
Author:
RaphaŽl Luta, Kevin A. Burton

Field Summary
static int HTML_ACTIVEX
          Handle activex controls
static int HTML_CSS1
          Handle CSS1
static int HTML_CSS2
          Handle CSS2
static int HTML_CSSP
          Handle CSSP
static int HTML_DOM
          Handle DOM
static int HTML_FORM
          Handle form handling
static int HTML_FRAME
          Handle frames
static int HTML_IMAGE
          Handle inline image display
static int HTML_JAVA
          Handle client-side applet
static int HTML_JAVA1_0
           
static int HTML_JAVA1_1
           
static int HTML_JAVA1_2
           
static int HTML_JSCRIPT
          Handle client-side javascript
static int HTML_JSCRIPT1_0
           
static int HTML_JSCRIPT1_1
           
static int HTML_JSCRIPT1_2
           
static int HTML_TABLE
          Handle HTML Table
static int HTML_XML
          Handle XML
static int HTML_XSL
          Handle XSL
 
Method Summary
 java.lang.String getAgent()
          Returns the user-agent string
 MimeType[] getMimeTypes()
          Get the mime types that this CapabilityMap supports.
 java.lang.String getPreferredMediaType()
          Returns the preferred media type for the current user-agent
 MimeType getPreferredType()
          Returns the preferred MIME type for the current user-agent
 boolean hasCapability(int cap)
          Checks to see if the current agent has the specified capability
 boolean hasCapability(java.lang.String capability)
          Checks to see if the current agent has the specified capability
 java.util.Iterator listMediaTypes()
          Returns an ordered list of supported media-types, from most preferred to least preferred
 boolean supportsMediaType(java.lang.String media)
          Return true if this CapabilityMap supports the given media type
 boolean supportsMimeType(MimeType mimeType)
          Return true if this CapabilityMap supports the given MimeType
 java.lang.String toString()
          Create a map -> string representation
 

Field Detail

HTML_TABLE

public static final int HTML_TABLE
Handle HTML Table

See Also:
Constant Field Values

HTML_IMAGE

public static final int HTML_IMAGE
Handle inline image display

See Also:
Constant Field Values

HTML_FORM

public static final int HTML_FORM
Handle form handling

See Also:
Constant Field Values

HTML_FRAME

public static final int HTML_FRAME
Handle frames

See Also:
Constant Field Values

HTML_JAVA

public static final int HTML_JAVA
Handle client-side applet

See Also:
Constant Field Values

HTML_JAVA1_0

public static final int HTML_JAVA1_0
See Also:
Constant Field Values

HTML_JAVA1_1

public static final int HTML_JAVA1_1
See Also:
Constant Field Values

HTML_JAVA1_2

public static final int HTML_JAVA1_2
See Also:
Constant Field Values

HTML_JSCRIPT

public static final int HTML_JSCRIPT
Handle client-side javascript

See Also:
Constant Field Values

HTML_JSCRIPT1_0

public static final int HTML_JSCRIPT1_0
See Also:
Constant Field Values

HTML_JSCRIPT1_1

public static final int HTML_JSCRIPT1_1
See Also:
Constant Field Values

HTML_JSCRIPT1_2

public static final int HTML_JSCRIPT1_2
See Also:
Constant Field Values

HTML_ACTIVEX

public static final int HTML_ACTIVEX
Handle activex controls

See Also:
Constant Field Values

HTML_CSS1

public static final int HTML_CSS1
Handle CSS1

See Also:
Constant Field Values

HTML_CSS2

public static final int HTML_CSS2
Handle CSS2

See Also:
Constant Field Values

HTML_CSSP

public static final int HTML_CSSP
Handle CSSP

See Also:
Constant Field Values

HTML_XML

public static final int HTML_XML
Handle XML

See Also:
Constant Field Values

HTML_XSL

public static final int HTML_XSL
Handle XSL

See Also:
Constant Field Values

HTML_DOM

public static final int HTML_DOM
Handle DOM

See Also:
Constant Field Values
Method Detail

getPreferredType

public MimeType getPreferredType()
Returns the preferred MIME type for the current user-agent


getPreferredMediaType

public java.lang.String getPreferredMediaType()
Returns the preferred media type for the current user-agent


listMediaTypes

public java.util.Iterator listMediaTypes()
Returns an ordered list of supported media-types, from most preferred to least preferred


getAgent

public java.lang.String getAgent()
Returns the user-agent string


hasCapability

public boolean hasCapability(int cap)
Checks to see if the current agent has the specified capability


hasCapability

public boolean hasCapability(java.lang.String capability)
Checks to see if the current agent has the specified capability


getMimeTypes

public MimeType[] getMimeTypes()
Get the mime types that this CapabilityMap supports.


supportsMimeType

public boolean supportsMimeType(MimeType mimeType)
Return true if this CapabilityMap supports the given MimeType


supportsMediaType

public boolean supportsMediaType(java.lang.String media)
Return true if this CapabilityMap supports the given media type

Parameters:
media - the name of a media type registered in the MediaType regsitry
Returns:
true is the capabilities of this agent at least match those required by the media type

toString

public java.lang.String toString()
Create a map -> string representation



Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.