org.jboss.soa.esb.listeners.deployers.mc
Class GroupingStructure

java.lang.Object
  extended by org.jboss.deployers.vfs.spi.structure.helpers.AbstractStructureDeployer
      extended by org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer
          extended by org.jboss.soa.esb.listeners.deployers.mc.GroupingStructure
All Implemented Interfaces:
org.jboss.deployers.spi.Ordered, org.jboss.deployers.vfs.spi.structure.StructureDeployer

public class GroupingStructure
extends org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer

Similar to jar or directory structure, being able to handle sub-dirs, but a bit more strict then dir structure. Only listed sub-directories are candidates for potential sub-deployments. It also allows you to set metadata paths, libs and should the root be part of classpath. Each of sub-dirs can be filtered per path or by default per lib or group. In order to accept anything one must first set shortCircuitFilter instance.

Author:
Ales Justin
See Also:
org.jboss.deployers.vfs.plugins.structure.jar.JARStructure, org.jboss.deployers.vfs.plugins.structure.dir.DirectoryStructure

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.deployers.spi.Ordered
org.jboss.deployers.spi.Ordered.OrderedComparator
 
Field Summary
 
Fields inherited from class org.jboss.deployers.vfs.spi.structure.helpers.AbstractStructureDeployer
log
 
Fields inherited from interface org.jboss.deployers.spi.Ordered
COMPARATOR
 
Constructor Summary
GroupingStructure()
           
 
Method Summary
 void addGroup(java.lang.String group)
          Add group.
 boolean determineStructure(org.jboss.deployers.vfs.spi.structure.StructureContext structureContext)
           
 void removeGroup(java.lang.String group)
          Remove group.
 void setFilters(java.util.Map<java.lang.String,org.jboss.virtual.VirtualFileFilter> filters)
          Set filter per path.
 void setGroupFilter(org.jboss.virtual.VirtualFileFilter groupFilter)
          Set default group filter.
 void setGroups(java.util.Set<java.lang.String> groups)
          Set groups.
 void setLibFilter(org.jboss.virtual.VirtualFileFilter libFilter)
          Set default lib filter.
 void setLibs(java.util.Set<java.lang.String> libs)
          Set libs; added as cp entries.
 void setMetaDataPaths(java.lang.String[] metaDataPaths)
          Set the default metadata paths.
 void setRootClasspathEntry(boolean rootClasspathEntry)
          Is root part of classpath.
 void setShortCircuitFilter(org.jboss.virtual.VirtualFileFilter shortCircuitFilter)
          Set short circuit file filter.
protected  boolean shortCircuitFileCheck(org.jboss.virtual.VirtualFile file)
          Do short circuit file check.
 
Methods inherited from class org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer
createAnnotationEnvironment, setExcluded, setFilter, setIncluded, setRecurseFilter
 
Methods inherited from class org.jboss.deployers.vfs.spi.structure.helpers.AbstractStructureDeployer
addAllChildren, addAllChildren, addCandidateAnnotation, addChildren, addChildren, addClassPath, applyContextInfo, applyMetadataPath, applyMetadataPaths, applyStructure, checkCandidateAnnotations, createContext, createContext, createContext, getCandidateAnnotations, getCandidateStructureVisitorFactory, getRelativeOrder, getRelativePath, getRelativePath, isLeaf, isSupportsCandidateAnnotations, setCandidateAnnotations, setCandidateStructureVisitorFactory, setContextInfoOrder, setRelativeOrder, setSupportsCandidateAnnotations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupingStructure

public GroupingStructure()
Method Detail

determineStructure

public boolean determineStructure(org.jboss.deployers.vfs.spi.structure.StructureContext structureContext)
                           throws org.jboss.deployers.spi.DeploymentException
Throws:
org.jboss.deployers.spi.DeploymentException

shortCircuitFileCheck

protected boolean shortCircuitFileCheck(org.jboss.virtual.VirtualFile file)
Do short circuit file check.

Parameters:
file - the file
Returns:
true if we accept the file

setShortCircuitFilter

public void setShortCircuitFilter(org.jboss.virtual.VirtualFileFilter shortCircuitFilter)
Set short circuit file filter.

Parameters:
shortCircuitFilter - the short circuit file filter

setRootClasspathEntry

public void setRootClasspathEntry(boolean rootClasspathEntry)
Is root part of classpath.

Parameters:
rootClasspathEntry - root cp flag

setLibs

public void setLibs(java.util.Set<java.lang.String> libs)
Set libs; added as cp entries.

Parameters:
libs - the libs

setLibFilter

public void setLibFilter(org.jboss.virtual.VirtualFileFilter libFilter)
Set default lib filter.

Parameters:
libFilter - the filter

setMetaDataPaths

public void setMetaDataPaths(java.lang.String[] metaDataPaths)
Set the default metadata paths.

Parameters:
metaDataPaths - the meta data paths

setGroups

public void setGroups(java.util.Set<java.lang.String> groups)
Set groups. Aka grouping sub-directories.

Parameters:
groups - the groups

addGroup

public void addGroup(java.lang.String group)
Add group.

Parameters:
group - the group

removeGroup

public void removeGroup(java.lang.String group)
Remove group.

Parameters:
group - the group

setGroupFilter

public void setGroupFilter(org.jboss.virtual.VirtualFileFilter groupFilter)
Set default group filter.

Parameters:
groupFilter - the filter

setFilters

public void setFilters(java.util.Map<java.lang.String,org.jboss.virtual.VirtualFileFilter> filters)
Set filter per path.

Parameters:
filters - the filters