org.jboss.deployers.vfs.plugins.structure.file
Class FileStructure

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.deployers.vfs.plugins.structure.file.FileStructure
All Implemented Interfaces:
Ordered, StructureDeployer

public class FileStructure
extends AbstractVFSStructureDeployer

FileStructure is a simple suffix recognition structure deployer.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.deployers.spi.Ordered
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
FileStructure()
          Create a new FileStructure.
FileStructure(Set<String> suffixes)
          Create a new FileStructure.
 
Method Summary
 boolean addFileMatcher(FileMatcher fm)
           
static boolean addFileSuffix(String suffix)
          Add a file suffix
protected  boolean checkFileMatchers(org.jboss.virtual.VirtualFile file)
          Check is some file matcher recognizes the file.
 boolean determineStructure(StructureContext structureContext)
          Determine the structure of a deployment
 Set<String> getSuffixes()
          Gets the list of suffixes recognised as files
static boolean isKnownFile(String name)
          Whether this is an archive
 boolean removeFileMatcher(FileMatcher fm)
           
static boolean removeFileSuffix(String suffix)
          Remove a file suffix
 
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

FileStructure

public FileStructure()
Create a new FileStructure.


FileStructure

public FileStructure(Set<String> suffixes)
Create a new FileStructure.

Parameters:
suffixes - the recognised suffixes
Throws:
IllegalArgumentException - for null suffixes
Method Detail

getSuffixes

public Set<String> getSuffixes()
Gets the list of suffixes recognised as files

Returns:
the list of suffixes

addFileSuffix

public static boolean addFileSuffix(String suffix)
Add a file suffix

Parameters:
suffix - the suffix
Returns:
true when added
Throws:
IllegalArgumentException - for a null suffix

removeFileSuffix

public static boolean removeFileSuffix(String suffix)
Remove a file suffix

Parameters:
suffix - the suffix
Returns:
true when removed
Throws:
IllegalArgumentException - for a null suffix

addFileMatcher

public boolean addFileMatcher(FileMatcher fm)

removeFileMatcher

public boolean removeFileMatcher(FileMatcher fm)

isKnownFile

public static boolean isKnownFile(String name)
Whether this is an archive

Parameters:
name - the name
Returns:
true when an archive
Throws:
IllegalArgumentException - for a null name

checkFileMatchers

protected boolean checkFileMatchers(org.jboss.virtual.VirtualFile file)
Check is some file matcher recognizes the file.

Parameters:
file - the virtual file
Returns:
true if recognized, false otherwise

determineStructure

public boolean determineStructure(StructureContext structureContext)
                           throws DeploymentException
Description copied from interface: StructureDeployer
Determine the structure of a deployment

Parameters:
structureContext - the structure context
Returns:
true when it recognised the context
Throws:
DeploymentException - for an error


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