public class FileContentResolver extends java.lang.Object implements URIContentResolver, URIQueryInterface, VisibilityListener
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,FileContentHandler> |
_handlers |
protected java.util.Set<java.lang.String> |
_validExts |
| Constructor and Description |
|---|
FileContentResolver(java.util.Set<java.lang.String> validExts) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(FileContentHandler handler) |
boolean |
addHandler(FileContentHandler handler,
boolean allowUpdate)
Add a new handler to the cache and notify listeners
|
void |
dispose() |
FileContentHandler |
getHandler(java.io.File f)
Get a content handler for a given file
|
FileContentHandler |
getHandler(java.lang.String tool,
java.lang.String uri)
Given a tool name and content URI, create or obtain a content handler
|
protected java.util.List<FileContentHandler> |
getHandlers() |
void |
onVisibilityConditions(java.util.List<VisibilityCondition> conditions)
Visibility conditions have changed or should be processed
This is where implementations should go through their contents and apply
visibility based on these conditions
|
java.util.List<URIContentHandler> |
query(URIQueryParameters params)
Query a list of content using specific parameters
|
void |
removeHandler(java.io.File file)
Remove a file-based content handler
|
protected final java.util.Set<java.lang.String> _validExts
protected final java.util.Map<java.lang.String,FileContentHandler> _handlers
public FileContentResolver(java.util.Set<java.lang.String> validExts)
public void dispose()
public FileContentHandler getHandler(java.lang.String tool, java.lang.String uri)
URIContentResolvergetHandler in interface URIContentResolvertool - Tool name (may be null if N/A)uri - Content URIpublic FileContentHandler getHandler(java.io.File f)
f - Filepublic boolean addHandler(FileContentHandler handler, boolean allowUpdate)
handler - File-based content handlerallowUpdate - True to update existing handlers, false to ignore addpublic void addHandler(FileContentHandler handler)
public void removeHandler(java.io.File file)
file - Fileprotected java.util.List<FileContentHandler> getHandlers()
public java.util.List<URIContentHandler> query(URIQueryParameters params)
URIQueryInterfacequery in interface URIQueryInterfaceparams - Query parameterspublic void onVisibilityConditions(java.util.List<VisibilityCondition> conditions)
VisibilityListeneronVisibilityConditions in interface VisibilityListenerconditions - List of visibility conditions