org.servebox.toolbox.acl
Class ACLTreeNode

java.lang.Object
  extended by org.servebox.toolbox.acl.ACLTreeNode

public class ACLTreeNode
extends Object

Represents an entry in a tree structure
20070321 - This class now becomes a set of helper functions rather than an object in its own right
20070322 - Assorted finder functions added.

Author:
B.Flight

Constructor Summary
ACLTreeNode()
           
 
Method Summary
static BasicACLObject findByName(Vector v, String name)
          Find an object in the ACL tree by name
static BasicACLObject findByUID(Vector v, String uid)
          Find an object in the ACL tree by its UID
static Vector getChildren(Object o)
          Try calling the method getChildContainer on a supplied object.
static boolean isContainer(Object o)
          Is the specified ACL object a container for other objects?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACLTreeNode

public ACLTreeNode()
Method Detail

findByUID

public static BasicACLObject findByUID(Vector v,
                                       String uid)
Find an object in the ACL tree by its UID

Parameters:
v - The starting point in the ACL tree (not necessarily the root)
uid - The UID of the object being sought
Returns:
The object found, or null.

findByName

public static BasicACLObject findByName(Vector v,
                                        String name)
Find an object in the ACL tree by name

Parameters:
v - The starting point in the ACL tree (not necessarily the root)
name - The name of the object being sought
Returns:
The object found, or null.

getChildren

public static Vector getChildren(Object o)
Try calling the method getChildContainer on a supplied object.

Parameters:
o -
Returns:
A Vector provided by the called method or null.

isContainer

public static boolean isContainer(Object o)
Is the specified ACL object a container for other objects? Reflection is used to determine whether the object in question implements the IACLContainer interface. If found, the response is true.

Parameters:
o -
Returns:
true or false


Copyright © 2010. All Rights Reserved.