public class UnionContentResolver extends Object implements ContentResolver
ContentResolver
which will be processed in sequence.
the first result of a ContentResolver which are a not-null value will be used as result.
Constructor and Description |
---|
UnionContentResolver()
Default Constructor.
|
UnionContentResolver(ContentResolver contentResolver)
Constructor with the first
ContentResolver . |
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 UnionContentResolver()
public UnionContentResolver(ContentResolver contentResolver)
ContentResolver
.contentResolver
- with the first 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.