|
||||||||||
| 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 null
protected AbstractVFSContext(URL rootURL)
throws URISyntaxException
rootURL - the root url
URISyntaxException - for illegal URL
IllegalArgumentException - if rootURI is null| Method Detail |
|---|
public Set<VFSContextConstraints> getConstraints()
VFSContext
getConstraints in interface VFSContextprotected Options createNewOptions()
public VFS getVFS()
VFSContext
getVFS in interface VFSContextpublic URI getRootURI()
VFSContext
getRootURI in interface VFSContextpublic void setRootPeer(VirtualFileHandler handler)
public VirtualFileHandler getRootPeer()
VFSContext
getRootPeer in interface VFSContextpublic 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 fails
public List<VirtualFileHandler> getChildren(VirtualFileHandler parent,
boolean ignoreErrors)
throws IOException
VFSContext
getChildren in interface VFSContextparent - the parentignoreErrors - whether to ignore errors
IOException - for any problem accessing the VFS
public VirtualFileHandler getChild(VirtualFileHandler parent,
String path)
throws IOException
VFSContext
getChild in interface VFSContextparent - the parentpath - the path
null if not found
IOException - for any problem accessing the VFS
public URL getChildURL(VirtualFileHandler parent,
String name)
throws IOException
parent - a parentname - a name of the child
IOException - for any error
public void visit(VirtualFileHandler handler,
VirtualFileHandlerVisitor visitor)
throws IOException
VFSContext
visit in interface VFSContexthandler - the reference handlervisitor - the visitor
IOException - for any error
protected 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 VFSContexttempInfo - the temp infopublic TempInfo getTempInfo(String path)
VFSContext
getTempInfo in interface VFSContextpath - the path to match
public TempInfo getFurthestParentTemp(String path)
VFSContext
getFurthestParentTemp in interface VFSContextpath - the path to match
public void cleanupTempInfo(String path)
VFSContext
cleanupTempInfo in interface VFSContextpath - the path to cleanuppublic Iterable<TempInfo> getTempInfos()
VFSContext
getTempInfos in interface VFSContextpublic ExceptionHandler getExceptionHandler()
VFSContext
getExceptionHandler in interface VFSContextpublic void setExceptionHandler(ExceptionHandler exceptionHandler)
VFSContext
setExceptionHandler in interface VFSContextexceptionHandler - the exception handler.public String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||