|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.faunos.skwish.ext.http.MappedUriProvider
public class MappedUriProvider
A filter on a skwish service provider that maps input URIs to output URIs. This only exposes a read-only interface.
Note this implementation breaks the Provider contract in one minor way: SegmentStores returned by this provider do not have the correct uri property; you can't use that URI on this provider to get back the same SegmentStore.
Constructor Summary | |
---|---|
MappedUriProvider()
Constructs a default instance that uses the default provider. |
|
MappedUriProvider(Provider inner)
Constructs an instance that wraps the given inner instance. |
Method Summary | |
---|---|
String |
getBaseUri()
Returns the base URI. |
Map<String,String> |
getUriMappings()
Returns the mapped URIs. |
SegmentStore |
loadInstance(String uri)
Loads the store at the given uri by first retrieving the URI's mapped value and then invoking the loadInstance method on the contained instance. |
void |
map(String src,
String dtn)
Adds the given mapping. |
void |
setBaseUri(String baseUri)
Sets the base URI for the mapping. |
void |
setUriMappings(Map<String,String> mappings)
Sets the URI mappings. |
SegmentStore |
writeNewInstance(String uri)
Not implemented. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MappedUriProvider()
SegmentStore.getProvider()
public MappedUriProvider(Provider inner)
Method Detail |
---|
public Map<String,String> getUriMappings()
public void setUriMappings(Map<String,String> mappings)
public void map(String src, String dtn)
src
- the input URIdtn
- the mapped value for the URIpublic void setBaseUri(String baseUri)
baseUri
- public String getBaseUri()
public SegmentStore loadInstance(String uri) throws IOException
loadInstance
in interface Provider
IOException
setBaseUri(String)
public SegmentStore writeNewInstance(String uri) throws IOException
writeNewInstance
in interface Provider
UnsupportedOperationException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |