DependencyTree (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.appdef.shared.DependencyTree class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.appdef.shared
Class DependencyTree

    java.lang.Object
      org.hyperic.hq.appdef.shared.DependencyTree

All Implemented Interfaces:
  java.io.Serializable

    public class DependencyTree

extends java.lang.Object
implements java.io.Serializable

A DependencyTree has child DependencyNodes (who in turn my have children of their own), structurally, it's a list of lists.

See Also:
  Serialized Form

Constructor Summary
`DependencyTree(ApplicationValue appValue)`

Method Summary
`void` | `addNode(AppService appSvc)` Add a node with no dependents
`void` | `addNode(AppService appSvc, AppService depSvc)` Adds an AppService `depSvc` as a child of another AppService `appSvc`.
`boolean` | `equals(java.lang.Object o)`
`DependencyNode` | `findAppService(AppdefResourceValue aResource)`
`DependencyNode` | `findAppService(AppService aService)` Returns a top level DependencyNode
`static DependencyNode` | `findAppServiceById(DependencyTree tree, java.lang.Integer appSvcId)`
`static java.util.List` | `findDependees(DependencyTree tree, DependencyNode appSvcNode, java.util.List services)` Method findDependees.
`static java.util.List` | `findDependers(DependencyTree tree, java.lang.Integer appSvcId, java.util.List services)` Method findDependers.
`static java.util.List` | `findPotentialDependees(DependencyTree tree, DependencyNode currentNode, java.util.List services)` The criteria for qualifying AppServices as potential dependees for a given node are the following: The candidate AppService is in the DependencyTree already, i.e.
`static DependencyNode` | `findServiceById(DependencyTree tree, java.lang.Integer serviceId)`
`ApplicationValue` | `getApplication()`
`java.lang.Integer` | `getAppPK()`
`java.util.List` | `getNodes()` Returns a List of top level DependencyNodes
`boolean` | `isEntryPoint(AppService appService)` Check if the app service represents an entry point within this tree.
`static java.util.Map` | `mapServices(java.util.List services)`
`static boolean` | `nodeHasChild(DependencyNode node, java.lang.Integer appSvcId)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DependencyTree

    public DependencyTree(ApplicationValue appValue)

Method Detail

### getApplication

    public ApplicationValue getApplication()

### getAppPK

    public java.lang.Integer getAppPK()

### getNodes

    public java.util.List getNodes()

  Returns a List of top level DependencyNodes

### addNode

    public void addNode(AppService appSvc,
                        AppService depSvc)

  Adds an AppService `depSvc` as a child of another AppService `appSvc`. If the `appSvc` does not exist, it will be created as a toplevel node.

### addNode

    public void addNode(AppService appSvc)

  Add a node with no dependents

### findAppService

    public DependencyNode findAppService(AppService aService)
                                  throws java.util.NoSuchElementException

  Returns a top level DependencyNode

  Throws:
    `java.util.NoSuchElementException`

### findAppService

    public DependencyNode findAppService(AppdefResourceValue aResource)
                                  throws java.util.NoSuchElementException

  Throws:
    `java.util.NoSuchElementException`

### isEntryPoint

    public boolean isEntryPoint(AppService appService)
                         throws java.util.NoSuchElementException

  Check if the app service represents an entry point within this tree. An entry point is defined as an AppService which is not a dependee in any point in the tree

  Returns:
    int
  Throws:
    `java.util.NoSuchElementException`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### nodeHasChild

    public static boolean nodeHasChild(DependencyNode node,
                                       java.lang.Integer appSvcId)

### findAppServiceById

    public static DependencyNode findAppServiceById(DependencyTree tree,
                                                    java.lang.Integer appSvcId)

### findServiceById

    public static DependencyNode findServiceById(DependencyTree tree,
                                                 java.lang.Integer serviceId)

### mapServices

    public static java.util.Map mapServices(java.util.List services)

### findDependees

    public static java.util.List findDependees(DependencyTree tree,
                                               DependencyNode appSvcNode,
                                               java.util.List services)

  Method findDependees. Returns a list of application services that on a given dependency element

  Parameters:
    `services` -
  Returns:
    List a list of AppServiceNodeBeans

### findDependers

    public static java.util.List findDependers(DependencyTree tree,
                                               java.lang.Integer appSvcId,
                                               java.util.List services)

  Method findDependers. Performs a search for DependencyNodes that have the current one (identified by the appSvcId) among its children i.e. our current one depends on all of the ones returned

  Parameters:
    `tree` - the DependencyTree
    `appSvcId` - the current ApplicationService
    `services` - a list of ServiceValues associated with the application
  Returns:
    List a list of AppServiceNodeBeans

### findPotentialDependees

    public static java.util.List findPotentialDependees(DependencyTree tree,
                                                        DependencyNode currentNode,
                                                        java.util.List services)

  The criteria for qualifying AppServices as potential dependees for a given node are the following:
  1. The candidate AppService is in the DependencyTree already, i.e. it has a DependencyNode already.
  2. A candidate's node cannot be the given node, self dependencies are disallowed.
  3. The candidate AppService is not already a dependee, defining a dependency twice is disallowed. It may depend on indirectly already i.e. if something it already depends on currently depends on another node, that does not disqualify the other node.
  4. A candidate's node cannot have the given node as a depender either directly or indirectly, circular dependencies are disallowed.

  Parameters:
    `tree` -
    `currentNode` -
    `services` -
  Returns:

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.