public class SlingScriptAdapterFactory extends Object implements org.apache.sling.api.adapter.AdapterFactory, org.apache.sling.commons.mime.MimeTypeProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
BINDINGS_CONTEXT
The context string to use to select BindingsValuesProviders
|
| Constructor and Description |
|---|
SlingScriptAdapterFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
activate(org.osgi.service.component.ComponentContext context) |
protected void |
deactivate(org.osgi.service.component.ComponentContext context) |
<AdapterType> |
getAdapter(Object adaptable,
Class<AdapterType> type) |
String |
getExtension(String mimeType)
Returns the first extension entry of the supported extensions of a
ScriptEngineFactory which is registered for the given MIME type.
|
String |
getMimeType(String name)
Returns the first MIME type entry of the supported MIME types of a
ScriptEngineFactory which is registered for the extension of the given
name.
|
public static final String BINDINGS_CONTEXT
public <AdapterType> AdapterType getAdapter(Object adaptable, Class<AdapterType> type)
getAdapter in interface org.apache.sling.api.adapter.AdapterFactorypublic String getMimeType(String name)
null.getMimeType in interface org.apache.sling.commons.mime.MimeTypeProvidername - The name whose extension is to be mapped to a MIME type. The
extension is the string after the last dot in the name. If the
name contains no dot, the entire name is considered the
extension.public String getExtension(String mimeType)
null.getExtension in interface org.apache.sling.commons.mime.MimeTypeProvidermimeType - The MIME type to be mapped to an extension.protected void activate(org.osgi.service.component.ComponentContext context)
protected void deactivate(org.osgi.service.component.ComponentContext context)
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.