|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.virtual.plugins.context.AbstractVFSContext
public abstract class AbstractVFSContext
AbstractVFSContext.
Field Summary | |
---|---|
protected org.jboss.logging.Logger |
log
The log |
Constructor Summary | |
---|---|
protected |
AbstractVFSContext(URI rootURI)
Create a new AbstractVFSContext. |
protected |
AbstractVFSContext(URL rootURL)
Create a new AbstractVFSContext. |
Method Summary | ||
---|---|---|
void |
addTempInfo(TempInfo tempInfo)
Add temp info. |
|
void |
cleanupTempInfo(String path)
Cleanup all temp infos under path param. |
|
protected Options |
createNewOptions()
Create options. |
|
boolean |
equals(Object obj)
|
|
VirtualFileHandler |
getChild(VirtualFileHandler parent,
String path)
Get a child |
|
List<VirtualFileHandler> |
getChildren(VirtualFileHandler parent,
boolean ignoreErrors)
Get the children |
|
URL |
getChildURL(VirtualFileHandler parent,
String name)
Construct a URL from a given parent and a name |
|
Set<VFSContextConstraints> |
getConstraints()
Get context's constraints. |
|
ExceptionHandler |
getExceptionHandler()
Get the exception handler. |
|
TempInfo |
getFurthestParentTemp(String path)
Retrieve the furthest (outter most) temp which contains this path. |
|
protected
|
getOption(Class<T> expectedType)
|
|
protected Object |
getOption(String name)
|
|
protected
|
getOption(String name,
Class<T> expectedType)
|
|
Options |
getOptions()
Get options. |
|
protected VFSContext |
getPeerContext()
Get peer vfs context. |
|
VirtualFileHandler |
getRootPeer()
Return the peer representing the root of this context within another context. |
|
URI |
getRootURI()
Get the root uri |
|
TempInfo |
getTempInfo(String path)
Get exact temp info match. |
|
Iterable<TempInfo> |
getTempInfos()
Iterate over all temp infos. |
|
VFS |
getVFS()
Get the VFS for this context |
|
int |
hashCode()
|
|
void |
setExceptionHandler(ExceptionHandler exceptionHandler)
Set exception handler. |
|
protected void |
setOption(String name,
Object option)
|
|
protected URL |
setOptionsToURL(URL url)
Helper method to set options on an URL |
|
void |
setRootPeer(VirtualFileHandler handler)
|
|
String |
toString()
|
|
void |
visit(VirtualFileHandler handler,
VirtualFileHandlerVisitor visitor)
Visit the virtual file system |
|
protected void |
visit(VirtualFileHandler handler,
VirtualFileHandlerVisitor visitor,
boolean includeRoot,
boolean leavesOnly,
boolean ignoreErrors,
boolean includeHidden,
VirtualFileFilter recurseFilter)
Visit. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.virtual.spi.VFSContext |
---|
getName, getRoot |
Field Detail |
---|
protected final org.jboss.logging.Logger log
Constructor Detail |
---|
protected AbstractVFSContext(URI rootURI)
rootURI
- the root url
IllegalArgumentException
- if rootURI is nullprotected AbstractVFSContext(URL rootURL) throws URISyntaxException
rootURL
- the root url
URISyntaxException
- for illegal URL
IllegalArgumentException
- if rootURI is nullMethod Detail |
---|
public Set<VFSContextConstraints> getConstraints()
VFSContext
getConstraints
in interface VFSContext
protected Options createNewOptions()
public VFS getVFS()
VFSContext
getVFS
in interface VFSContext
public URI getRootURI()
VFSContext
getRootURI
in interface VFSContext
public void setRootPeer(VirtualFileHandler handler)
public VirtualFileHandler getRootPeer()
VFSContext
getRootPeer
in interface VFSContext
public Options getOptions()
VFSContext
getOptions
in interface VFSContext
protected void setOption(String name, Object option)
protected Object getOption(String name)
protected <T> T getOption(Class<T> expectedType)
protected <T> T getOption(String name, Class<T> expectedType)
protected VFSContext getPeerContext()
protected URL setOptionsToURL(URL url) throws MalformedURLException
url
- url to set options on
MalformedURLException
- if url manipulation failspublic List<VirtualFileHandler> getChildren(VirtualFileHandler parent, boolean ignoreErrors) throws IOException
VFSContext
getChildren
in interface VFSContext
parent
- the parentignoreErrors
- whether to ignore errors
IOException
- for any problem accessing the VFSpublic VirtualFileHandler getChild(VirtualFileHandler parent, String path) throws IOException
VFSContext
getChild
in interface VFSContext
parent
- the parentpath
- the path
null
if not found
IOException
- for any problem accessing the VFSpublic URL getChildURL(VirtualFileHandler parent, String name) throws IOException
parent
- a parentname
- a name of the child
IOException
- for any errorpublic void visit(VirtualFileHandler handler, VirtualFileHandlerVisitor visitor) throws IOException
VFSContext
visit
in interface VFSContext
handler
- the reference handlervisitor
- the visitor
IOException
- for any errorprotected void visit(VirtualFileHandler handler, VirtualFileHandlerVisitor visitor, boolean includeRoot, boolean leavesOnly, boolean ignoreErrors, boolean includeHidden, VirtualFileFilter recurseFilter) throws IOException
handler
- the reference handlervisitor
- the visitorincludeRoot
- whether to visit the rootleavesOnly
- whether to visit leaves onlyignoreErrors
- whether to ignore errorsincludeHidden
- whether to include hidden filesrecurseFilter
- the recurse filter
IOException
- for any problem accessing the virtual file systempublic void addTempInfo(TempInfo tempInfo)
VFSContext
addTempInfo
in interface VFSContext
tempInfo
- the temp infopublic TempInfo getTempInfo(String path)
VFSContext
getTempInfo
in interface VFSContext
path
- the path to match
public TempInfo getFurthestParentTemp(String path)
VFSContext
getFurthestParentTemp
in interface VFSContext
path
- the path to match
public void cleanupTempInfo(String path)
VFSContext
cleanupTempInfo
in interface VFSContext
path
- the path to cleanuppublic Iterable<TempInfo> getTempInfos()
VFSContext
getTempInfos
in interface VFSContext
public ExceptionHandler getExceptionHandler()
VFSContext
getExceptionHandler
in interface VFSContext
public void setExceptionHandler(ExceptionHandler exceptionHandler)
VFSContext
setExceptionHandler
in interface VFSContext
exceptionHandler
- the exception handler.public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |