|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.spray.media.DefaultMediaProvider
public class DefaultMediaProvider
A default implementation of MediaProvider.
Field Summary |
---|
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Constructor Summary | |
---|---|
DefaultMediaProvider()
Constructs a new provider. |
Method Summary | |
---|---|
void |
addMediaKey(int index,
String key)
Adds a path finder media key to the specified index. |
void |
addMediaKey(String key)
Adds a path finder media key. |
void |
clearMediaKeys()
Clears all path finder media keys. |
String |
getDefaultIndex()
Gets the default index file. |
protected String |
getDefaultIndex(boolean localized,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the default index with the terminal extension. |
String[] |
getMediaKeys()
Gets the path finder keys for resolving media paths. |
Resource<?> |
getResource(String path,
boolean localized,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the media content resource. |
void |
removeMediaKey(String key)
Removes a path finder media key. |
void |
setDefaultIndex(String index)
Sets the default index file. |
void |
setMediaKeys(String[] keys)
Sets the path finder keys for resolving media paths. |
Methods inherited from class org.norther.tammi.core.base.Adaptee |
---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMediaProvider()
Method Detail |
---|
public String[] getMediaKeys()
MediaProvider
getMediaKeys
in interface MediaProvider
public void setMediaKeys(String[] keys)
MediaProvider
setMediaKeys
in interface MediaProvider
keys
- an array of path finder keys.public void addMediaKey(String key)
MediaProvider
addMediaKey
in interface MediaProvider
key
- the path finder key.public void addMediaKey(int index, String key)
MediaProvider
addMediaKey
in interface MediaProvider
index
- the key index.key
- the path finder key.public void removeMediaKey(String key)
MediaProvider
removeMediaKey
in interface MediaProvider
key
- the path finder key.public void clearMediaKeys()
MediaProvider
clearMediaKeys
in interface MediaProvider
public String getDefaultIndex()
MediaProvider
getDefaultIndex
in interface MediaProvider
public void setDefaultIndex(String index)
MediaProvider
setDefaultIndex
in interface MediaProvider
index
- a default index file.public Resource<?> getResource(String path, boolean localized, ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ConstructionException, AccessDeniedException
MediaProvider
getResource
in interface MediaProvider
path
- the content path.localized
- the localization option.request
- the servlet request.response
- the servlet response.chain
- the filter chain.
IOException
- on I/O errors.
ConstructionException
- on resource errors.
AccessDeniedException
- for access restrictions.protected String getDefaultIndex(boolean localized, ServletRequest request, ServletResponse response, FilterChain chain)
localized
- the localization option.request
- the request.response
- the response.chain
- the filter chain.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |