org.jboss.deployers.vfs.spi.structure.modified
Class AbstractStructureModificationChecker<T>

java.lang.Object
  extended by org.jboss.deployers.vfs.spi.structure.modified.AbstractStructureModificationChecker<T>
Type Parameters:
T - exact cache value type
All Implemented Interfaces:
StructureListener, StructureModificationChecker
Direct Known Subclasses:
MetaDataStructureModificationChecker, SynchWrapperModificationChecker

public abstract class AbstractStructureModificationChecker<T>
extends Object
implements StructureModificationChecker

AbstractStructureModificationChecker.

Author:
Ales Justin

Field Summary
protected  org.jboss.logging.Logger log
          The log
 
Constructor Summary
protected AbstractStructureModificationChecker()
           
protected AbstractStructureModificationChecker(MainDeployerStructure mainDeployer)
           
 
Method Summary
 void addStructureRoot(org.jboss.virtual.VirtualFile root)
          Add structure root.
protected  StructureCache<T> getCache()
          Get the structure cache.
protected  VFSDeploymentContext getDeploymentContext(String name)
          Get deployment context.
protected  MainDeployerStructure getMainDeployerStructure()
          Get main deployer structure.
protected  boolean hasRootBeenModified(org.jboss.virtual.VirtualFile root)
          Check the root for modification.
protected abstract  boolean hasStructureBeenModifed(org.jboss.virtual.VirtualFile root, VFSDeploymentContext deploymentContext)
          Has structure been modified.
 boolean hasStructureBeenModified(VFSDeployment deployment)
          Has structure been modified.
 boolean hasStructureBeenModified(VFSDeploymentContext deploymentContext)
          Has structure been modified.
protected  boolean hasStructureBeenModified(VFSDeploymentContext deploymentContext, boolean checkRoot)
          Has structure been modified.
 boolean hasStructureBeenModified(org.jboss.virtual.VirtualFile root)
          Has structure been modified.
 void removeStructureRoot(org.jboss.virtual.VirtualFile root)
          Remove structure root.
 void setCache(StructureCache<T> cache)
          Set the structure cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.jboss.logging.Logger log
The log

Constructor Detail

AbstractStructureModificationChecker

protected AbstractStructureModificationChecker()

AbstractStructureModificationChecker

protected AbstractStructureModificationChecker(MainDeployerStructure mainDeployer)
Method Detail

getCache

protected StructureCache<T> getCache()
Get the structure cache.

Returns:
the structure cache

setCache

public void setCache(StructureCache<T> cache)
Set the structure cache.

Parameters:
cache - the structure cache

getMainDeployerStructure

protected MainDeployerStructure getMainDeployerStructure()
Get main deployer structure.

Returns:
the main deployer structure

getDeploymentContext

protected VFSDeploymentContext getDeploymentContext(String name)
Get deployment context.

Parameters:
name - the deployment context name
Returns:
vfs deployment context or null if doesn't exist or not vfs based

hasStructureBeenModified

public boolean hasStructureBeenModified(org.jboss.virtual.VirtualFile root)
                                 throws IOException
Description copied from interface: StructureModificationChecker
Has structure been modified.

Specified by:
hasStructureBeenModified in interface StructureModificationChecker
Parameters:
root - the structure's root
Returns:
true if structure has been modified, false otherwise
Throws:
IOException - for any error

hasStructureBeenModified

public boolean hasStructureBeenModified(VFSDeployment deployment)
                                 throws IOException
Description copied from interface: StructureModificationChecker
Has structure been modified.

Specified by:
hasStructureBeenModified in interface StructureModificationChecker
Parameters:
deployment - the vfs deployment
Returns:
true if structure has been modified, false otherwise
Throws:
IOException - for any error

hasStructureBeenModified

public boolean hasStructureBeenModified(VFSDeploymentContext deploymentContext)
                                 throws IOException
Description copied from interface: StructureModificationChecker
Has structure been modified.

Specified by:
hasStructureBeenModified in interface StructureModificationChecker
Parameters:
deploymentContext - the vfs deployment context
Returns:
true if structure has been modified, false otherwise
Throws:
IOException - for any error

hasStructureBeenModified

protected boolean hasStructureBeenModified(VFSDeploymentContext deploymentContext,
                                           boolean checkRoot)
                                    throws IOException
Has structure been modified.

Parameters:
deploymentContext - the deployment context
checkRoot - should we check root
Returns:
true if modifed, false otherwise
Throws:
IOException - for any error

hasRootBeenModified

protected boolean hasRootBeenModified(org.jboss.virtual.VirtualFile root)
                               throws IOException
Check the root for modification.

Parameters:
root - the root to check
Returns:
true if modified, false otherwise
Throws:
IOException - for any error

hasStructureBeenModifed

protected abstract boolean hasStructureBeenModifed(org.jboss.virtual.VirtualFile root,
                                                   VFSDeploymentContext deploymentContext)
                                            throws IOException
Has structure been modified.

Parameters:
root - the client root
deploymentContext - the deployment context
Returns:
true if modifed, false otherwise
Throws:
IOException - for any error

addStructureRoot

public void addStructureRoot(org.jboss.virtual.VirtualFile root)
Description copied from interface: StructureListener
Add structure root.

Specified by:
addStructureRoot in interface StructureListener
Parameters:
root - the structure root

removeStructureRoot

public void removeStructureRoot(org.jboss.virtual.VirtualFile root)
Description copied from interface: StructureListener
Remove structure root.

Specified by:
removeStructureRoot in interface StructureListener
Parameters:
root - the structure root


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