public class FilteredContentResolverWrapper extends Object implements ContentResolver
Filter
which is used before the given ContentResolver
is called.Constructor and Description |
---|
FilteredContentResolverWrapper(ContentResolver targetContentResolver,
Filter filter) |
Modifier and Type | Method and Description |
---|---|
void |
addContentResolver(ContentResolver contentResolver)
Some Implementations of a
ContentResolver are delegating the functionality
to other ContentResolvers. |
byte[] |
getContent(String key)
Reads the Content for the given Key or null if nothing where found.
|
public FilteredContentResolverWrapper(ContentResolver targetContentResolver, Filter filter)
targetContentResolver
- The ContentResolver
where the settings
should be read if the Filter allows it.filter
- the Filter
which defines if an key should be read from the given ContentResolver
.public void addContentResolver(ContentResolver contentResolver)
ContentResolver
are delegating the functionality
to other ContentResolvers.UnionContentResolver
-------------------------------------- <contentResolver name="DefaultContentResolver" class="org.settings4j.contentresolver.UnionContentResolver"> <contentResolver-ref ref="FSContentResolver" /> <contentResolver-ref ref="ClasspathContentResolver" /> </contentResolver> --------------------------------------
addContentResolver
in interface ContentResolver
contentResolver
- the original contentResolver to delegate.public byte[] getContent(String key)
getContent
in interface ContentResolver
key
- The keyCopyright © 2008–2014. All rights reserved.