org.jboss.deployers.vfs.plugins.structure.modify
Class AbstractModificationTypeMatcher

java.lang.Object
  extended by org.jboss.deployers.vfs.plugins.structure.modify.AbstractModificationTypeMatcher
All Implemented Interfaces:
ModificationTypeMatcher
Direct Known Subclasses:
FileModificationTypeMatcher

public abstract class AbstractModificationTypeMatcher
extends Object
implements ModificationTypeMatcher

Abstract modification type matcher.

Author:
Ales Justin

Field Summary
protected  org.jboss.logging.Logger log
           
 
Constructor Summary
AbstractModificationTypeMatcher()
           
 
Method Summary
 boolean determineModification(org.jboss.virtual.VirtualFile root, ContextInfo contextInfo)
          Should we modify the file.
 boolean determineModification(org.jboss.virtual.VirtualFile root, StructureMetaData structureMetaData)
          Should we modify the file.
protected abstract  boolean isModificationDetermined(org.jboss.virtual.VirtualFile file, ContextInfo contextInfo)
          Is modification determined.
 void setCheckChildren(boolean checkChildren)
          Do we apply modification to the top structure context.
 void setChildrenOnly(boolean childrenOnly)
          Is this matcher children only.
 void setModificationType(ModificationType modificationType)
          Set the modification type.
 void setTopLevelOnly(boolean topLevelOnly)
          Is this matcher top level only.
 
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
Constructor Detail

AbstractModificationTypeMatcher

public AbstractModificationTypeMatcher()
Method Detail

determineModification

public boolean determineModification(org.jboss.virtual.VirtualFile root,
                                     StructureMetaData structureMetaData)
Description copied from interface: ModificationTypeMatcher
Should we modify the file.

Specified by:
determineModification in interface ModificationTypeMatcher
Parameters:
root - the deployment root
structureMetaData - the current structure metadata
Returns:
true if we determined modification

determineModification

public boolean determineModification(org.jboss.virtual.VirtualFile root,
                                     ContextInfo contextInfo)
Description copied from interface: ModificationTypeMatcher
Should we modify the file.

Specified by:
determineModification in interface ModificationTypeMatcher
Parameters:
root - the deployment root
contextInfo - the current context info
Returns:
true if we determined modification

isModificationDetermined

protected abstract boolean isModificationDetermined(org.jboss.virtual.VirtualFile file,
                                                    ContextInfo contextInfo)
Is modification determined.

Parameters:
file - the file
contextInfo - the context info
Returns:
true if we should apply modification type, false otherwise

setCheckChildren

public void setCheckChildren(boolean checkChildren)
Do we apply modification to the top structure context.

Parameters:
checkChildren - the apply to top flag

setTopLevelOnly

public void setTopLevelOnly(boolean topLevelOnly)
Is this matcher top level only.

Parameters:
topLevelOnly - the top level only flag

setChildrenOnly

public void setChildrenOnly(boolean childrenOnly)
Is this matcher children only.

Parameters:
childrenOnly - the children only flag

setModificationType

public void setModificationType(ModificationType modificationType)
Set the modification type.

Parameters:
modificationType - the modification type


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