org.jboss.deployers.vfs.spi.structure
Class StructureContext

java.lang.Object
  extended by org.jboss.deployers.vfs.spi.structure.StructureContext

public class StructureContext
extends Object

StructureContext.

Version:
$Revision: 1.1 $
Author:
Adrian Brock, Ales Justin

Constructor Summary
StructureContext(org.jboss.virtual.VirtualFile file, StructureMetaData metaData, StructureContext parentContext)
          Create a new child structure context
StructureContext(org.jboss.virtual.VirtualFile root, StructureMetaData metaData, VFSStructuralDeployers deployers)
          Create a new structure context from a root
StructureContext(org.jboss.virtual.VirtualFile root, org.jboss.virtual.VirtualFile parent, org.jboss.virtual.VirtualFile file, StructureMetaData metaData, VFSStructuralDeployers deployers, StructureContext parentContext)
          Create a new structure context from a root
 
Method Summary
 void addCallback(Object callback)
          Add the callback.
 void addChild(ContextInfo child)
          Add a child context
 boolean determineChildStructure(org.jboss.virtual.VirtualFile child)
          Determine the child structure
<T> Set<T>
getCallbacks(Class<T> callbackType)
          Get the matching callbacks.
 VFSStructuralDeployers getDeployers()
          Get the deployers.
 org.jboss.virtual.VirtualFile getFile()
          Get the file.
 StructureMetaData getMetaData()
          Get the metaData.
 String getName()
          Get the file name
 org.jboss.virtual.VirtualFile getParent()
          Get the parent.
 StructureContext getParentContext()
          Get the parentContext.
 org.jboss.virtual.VirtualFile getRoot()
          Get the root.
 boolean isCandidateAnnotationScanning()
          Get the candidate annotation scanning.
 boolean isTopLevel()
          Whether this is top level.
 void removeChild(ContextInfo child)
          Remove a child context
 void setCallbacks(Set<Object> callbacks)
          Set the callbacks.
 void setCandidateAnnotationScanning(boolean candidateAnnotationScanning)
          Set the candidate annotation scanning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructureContext

public StructureContext(org.jboss.virtual.VirtualFile root,
                        org.jboss.virtual.VirtualFile parent,
                        org.jboss.virtual.VirtualFile file,
                        StructureMetaData metaData,
                        VFSStructuralDeployers deployers,
                        StructureContext parentContext)
Create a new structure context from a root

Parameters:
root - the root file
parent - the parent file
file - the current file
metaData - the structure metadata to build
deployers - the available structure deployers
parentContext - the parentContext
Throws:
IllegalArgumentException - for a null parameter (parents can be null)

StructureContext

public StructureContext(org.jboss.virtual.VirtualFile root,
                        StructureMetaData metaData,
                        VFSStructuralDeployers deployers)
Create a new structure context from a root

Parameters:
root - the root file
metaData - the structure metadata to build
deployers - the available structure deployers
Throws:
IllegalArgumentException - for a null parameter

StructureContext

public StructureContext(org.jboss.virtual.VirtualFile file,
                        StructureMetaData metaData,
                        StructureContext parentContext)
Create a new child structure context

Parameters:
file - the candidate file
metaData - the structure metadata to build
parentContext - the parentContext
Throws:
IllegalArgumentException - for a null parameter
Method Detail

getName

public String getName()
Get the file name

Returns:
the file name

getRoot

public org.jboss.virtual.VirtualFile getRoot()
Get the root.

Returns:
the root.

getParent

public org.jboss.virtual.VirtualFile getParent()
Get the parent.

Returns:
the parent.

isTopLevel

public boolean isTopLevel()
Whether this is top level.

Returns:
true for top level.

getFile

public org.jboss.virtual.VirtualFile getFile()
Get the file.

Returns:
the file.

getMetaData

public StructureMetaData getMetaData()
Get the metaData.

Returns:
the metaData.

getDeployers

public VFSStructuralDeployers getDeployers()
Get the deployers.

Returns:
the deployers.

getParentContext

public StructureContext getParentContext()
Get the parentContext.

Returns:
the parentContext.

isCandidateAnnotationScanning

public boolean isCandidateAnnotationScanning()
Get the candidate annotation scanning.

Returns:
the candidate annotation scanning

setCandidateAnnotationScanning

public void setCandidateAnnotationScanning(boolean candidateAnnotationScanning)
Set the candidate annotation scanning.

Parameters:
candidateAnnotationScanning - the candidate annotation scanning

getCallbacks

public <T> Set<T> getCallbacks(Class<T> callbackType)
Get the matching callbacks.

Type Parameters:
T - exact callback type
Parameters:
callbackType - the exact callback type
Returns:
the callbacks

addCallback

public void addCallback(Object callback)
Add the callback.

Parameters:
callback - the callback

setCallbacks

public void setCallbacks(Set<Object> callbacks)
Set the callbacks.

Parameters:
callbacks - the callbacks

determineChildStructure

public boolean determineChildStructure(org.jboss.virtual.VirtualFile child)
                                throws DeploymentException
Determine the child structure

Parameters:
child - the child
Returns:
true when recognised
Throws:
DeploymentException - for any error

addChild

public void addChild(ContextInfo child)
Add a child context

Parameters:
child - the child

removeChild

public void removeChild(ContextInfo child)
Remove a child context

Parameters:
child - the child


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.