org.apache.sling.javax.activation.internal
Class OsgiMailcapCommandMap
java.lang.Object
javax.activation.CommandMap
org.apache.sling.javax.activation.internal.OsgiMailcapCommandMap
public class OsgiMailcapCommandMap
- extends javax.activation.CommandMap
The OsgiMailcapCommandMap is a CommandMap which ensures that DataCommandHandler
classes are
loaded by their containing bundles.
This allows the javax.activation bundle to obey classloading contraints in an OSGi environment, while preserving most
of the functionality available in an unmodified version of the bundle. Notably, this implementation does not support
loading mailcap files which are not placed inside a bundle.
Methods inherited from class javax.activation.CommandMap |
createDataContentHandler, getAllCommands, getCommand, getDefaultCommandMap, getPreferredCommands, setDefaultCommandMap |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OsgiMailcapCommandMap
public OsgiMailcapCommandMap()
addMailcapEntries
public void addMailcapEntries(InputStream mailcapFile,
org.osgi.framework.Bundle originatingBundle)
throws IOException
- Throws:
IOException
removeMailcapEntriesForBundle
public void removeMailcapEntriesForBundle(org.osgi.framework.Bundle bundle)
getPreferredCommands
public javax.activation.CommandInfo[] getPreferredCommands(String mimeType)
- Specified by:
getPreferredCommands
in class javax.activation.CommandMap
getAllCommands
public javax.activation.CommandInfo[] getAllCommands(String mimeType)
- Specified by:
getAllCommands
in class javax.activation.CommandMap
getCommand
public javax.activation.CommandInfo getCommand(String mimeType,
String cmdName)
- Specified by:
getCommand
in class javax.activation.CommandMap
createDataContentHandler
public javax.activation.DataContentHandler createDataContentHandler(String mimeType)
- Specified by:
createDataContentHandler
in class javax.activation.CommandMap
getMimeTypes
public String[] getMimeTypes()
- Overrides:
getMimeTypes
in class javax.activation.CommandMap
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.