org.quattor.pan.utils
Class FinalFlags

java.lang.Object
  extended by org.quattor.pan.utils.FinalFlags

public class FinalFlags
extends java.lang.Object

Data structure that hold final flag information for paths in a machine configuration.

Author:
loomis

Constructor Summary
FinalFlags()
          Create a new FinalFlags object to hold information about which paths are marked as final.
 
Method Summary
 java.lang.String getFinalReason(Path path)
          Return a String with a message indicating why the given path is final.
 boolean isFinal(Path path)
          Determine if the given path is marked as final.
 void setFinal(Path path)
          Mark the given Path as being final.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinalFlags

public FinalFlags()
Create a new FinalFlags object to hold information about which paths are marked as final.

Method Detail

isFinal

public boolean isFinal(Path path)
Determine if the given path is marked as final. The path is final if the path or any parent is marked as final or the full path has descendants which are marked as final. If the path is final, then the getFinalReason() method should be called to determine why.

Parameters:
path - Path to check
Returns:
boolean indicating if the Path is final

getFinalReason

public java.lang.String getFinalReason(Path path)
Return a String with a message indicating why the given path is final.

Parameters:
path - Path to check
Returns:
String reason why the path is final or null if the path isn't final

setFinal

public void setFinal(Path path)
Mark the given Path as being final.

Parameters:
path - Path to mark as final


Copyright © 2011 Quattor. All Rights Reserved.