public abstract class CommandMap
extends java.lang.Object
| Constructor and Description |
|---|
CommandMap() |
| Modifier and Type | Method and Description |
|---|---|
abstract DataContentHandler |
createDataContentHandler(java.lang.String mimeType)
Locate a DataContentHandler for the given mime
type.
|
DataContentHandler |
createDataContentHandler(java.lang.String mimeType,
DataSource ds)
Locate a DataContentHandler for the given mime
type.
|
abstract CommandInfo[] |
getAllCommands(java.lang.String mimeType)
Get all available commands for the given
mimetype.
|
CommandInfo[] |
getAllCommands(java.lang.String mimeType,
DataSource ds)
Get the entire command set for the given
mimetype, as modified by the DataSource.
|
abstract CommandInfo |
getCommand(java.lang.String mimeType,
java.lang.String cmdName)
Get the default command implementation for a
give mimeType
|
CommandInfo |
getCommand(java.lang.String mimeType,
java.lang.String cmdName,
DataSource ds)
Get the default command implementation for a
given mimeType/DataSource combo.
|
static CommandMap |
getDefaultCommandMap()
Return the default CommandMap.
|
java.lang.String[] |
getMimeTypes()
Return all mime types known to this CommandMap, or null if none.
|
abstract CommandInfo[] |
getPreferredCommands(java.lang.String mimeType)
Get the preferred commands for the given
mimetype.
|
CommandInfo[] |
getPreferredCommands(java.lang.String mimeType,
DataSource ds)
Get the preferred commands for the given
mimetype, as modified by the DataSource.
|
static void |
setDefaultCommandMap(CommandMap commandMap)
Set the default CommandMap.
|
public static CommandMap getDefaultCommandMap()
public static void setDefaultCommandMap(CommandMap commandMap)
commandMap - the new default CommandMap; if null resets to a MailcapCommandMapjava.lang.SecurityException - if the caller does not have "SetFactory" RuntimePermissionpublic CommandInfo[] getPreferredCommands(java.lang.String mimeType, DataSource ds)
mimeType - The mimeType name.ds - The datasource providing the type object.public abstract CommandInfo[] getPreferredCommands(java.lang.String mimeType)
mimeType - The mimeType name.public CommandInfo[] getAllCommands(java.lang.String mimeType, DataSource ds)
mimeType - The mimeType name.ds - The datasource providing the type object.public abstract CommandInfo[] getAllCommands(java.lang.String mimeType)
mimeType - The mimeType name.public CommandInfo getCommand(java.lang.String mimeType, java.lang.String cmdName, DataSource ds)
mimeType - The name of the mime typecmdName - The command action we wish to perform.ds - The modifying DataSource.public abstract CommandInfo getCommand(java.lang.String mimeType, java.lang.String cmdName)
mimeType - The name of the mime typecmdName - The command action we wish to perform.public DataContentHandler createDataContentHandler(java.lang.String mimeType, DataSource ds)
mimeType - The target MIME type.ds - The DataSource associated with this request.public abstract DataContentHandler createDataContentHandler(java.lang.String mimeType)
mimeType - The target MIME type.public java.lang.String[] getMimeTypes()