|
Service Activator Toolkit
Version 1.1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IDependencyTracker
The IDependencyTracker interface defines the API for a container
that holds pairs of objects that represent a relationship. When adding
a pair of objects to the container there is always a dependent
object that depends on a prerequisite object, and there is always a
prerequisite object that is a prerequisite of the dependent
object. An implementation of this interface is a generally useful object
container for tracking dependencies between objects. For example, you could
track parent-child relationships using an implementation of this interface.
| Nested Class Summary | |
|---|---|
static interface |
IDependencyTracker.IXmlProvider
The IXmlProvider interface defines the API for converting a
dependent object and a prerequisite object into XML. |
| Method Summary | |
|---|---|
boolean |
add(Object dependent,
Object prerequisite)
Create a dependent and prerequisite relationship. |
List |
getAllDependents(Object prerequisite)
Answers all the dependents of a prerequisite. |
List |
getAllPrerequisites(Object dependent)
Answers all the prerequisites of a dependent. |
List |
getDependents()
Answers all the entries that are dependents. |
List |
getDependents(Object prerequisite)
Answers the immediate dependents of an entry. |
List |
getPrerequisites()
Answers all the entries that are prerequisites. |
List |
getPrerequisites(Object dependent)
Answers the immediate prerequisites of an entry. |
List |
getValues()
Answers a list of all the objects in the IDependencyTracker. |
boolean |
hasCircularReferences(Object entry)
Answers true if an entry has circular references otherwise
false. |
boolean |
hasDependents()
Answers true if dependent entries exist, otherwise
false. |
boolean |
hasPrerequisites()
Answers true if prerequisite entries exist, otherwise
false. |
boolean |
isEmpty()
Answers true if the DepenencyTrackerService is empty,
otherwise false. |
void |
remove(Object entry)
Removes an Object, severing its dependent and prerequisite
relationships. |
boolean |
remove(Object dependent,
Object prerequisite)
Destroy a dependent and prerequisite relationship. |
void |
removeAll()
Removes all the objects from the IDependencyTracker. |
void |
removeDependent(Object entry)
Utility that removes a dependent entry. |
void |
removePrerequisite(Object entry)
Utility that removes a prerequisite entry. |
List |
removeWithAllPrerequisites(Object entry)
Removes an entry, along with all its prerequisites that are only dependents of the entry. |
List |
removeWithPrerequisites(Object entry)
Removes an entry, along with its prerequisites that are only dependents of the entry. |
int |
size()
Answers the number of entries in the IDependencyTracker. |
String |
toXml(String name)
Answers an XML representation of the IDependencyTracker. |
String |
toXml(String name,
IDependencyTracker.IXmlProvider xmlProvider)
Answers an XML representation of the IDependencyTracker
using the specified implementation of the interface
IDependencyTracker.IXmlProvider. |
String |
toXml(String name,
int indent)
Answers an XML representation of the IDependencyTracker. |
String |
toXml(String name,
int indent,
IDependencyTracker.IXmlProvider xmlProvider)
Answers an XML representation of the IDependencyTracker
using the specified implementation of the interface
IDependencyTracker.IXmlProvider. |
| Method Detail |
|---|
boolean add(Object dependent,
Object prerequisite)
dependent - An Object that is a dependent of a
prerequisite Object.prerequisite - An Object that is a prerequisite of a
dependent Object.
true, otherwise false.List getAllDependents(Object prerequisite)
prerequisite - An Object that is a prerequisite.
ListList getAllPrerequisites(Object dependent)
dependent - An Object that is a dependent.
ListList getDependents()
ListList getDependents(Object prerequisite)
prerequisite - An Object that is a prerequisite.
ListList getPrerequisites()
ListList getPrerequisites(Object dependent)
dependent - An Object that is a dependent.
ListList getValues()
IDependencyTracker.
boolean hasCircularReferences(Object entry)
true if an entry has circular references otherwise
false.
entry - Any object stored in the IDependencyTracker.
booleanboolean hasDependents()
true if dependent entries exist, otherwise
false.
booleanboolean hasPrerequisites()
true if prerequisite entries exist, otherwise
false.
booleanboolean isEmpty()
true if the DepenencyTrackerService is empty,
otherwise false.
booleanvoid remove(Object entry)
Object, severing its dependent and prerequisite
relationships.
entry - An Object in the IDependencyTracker.
boolean remove(Object dependent,
Object prerequisite)
dependent - An Object that is dependent of a
prerequisite object.prerequisite - An Object that is a prerequisite of a
dependent object.
true, otherwise false.void removeAll()
IDependencyTracker.
void removeDependent(Object entry)
entry - A dependent Object.void removePrerequisite(Object entry)
entry - A prerequisite Object.List removeWithAllPrerequisites(Object entry)
entry - An dependent Object.
ListList removeWithPrerequisites(Object entry)
entry - A dependent Object.
int size()
IDependencyTracker.
String toXml(String name)
IDependencyTracker.
This method uses the default implementation of the interface
IDependencyTracker.IXmlProvider, which simply returns the
value of the dependent and prerequisite object without performing a
conversion. This is most appropriate for cases where the dependent
and prerequisite objects are instances of the class
String.
name - The value of the name attribute in the top-most
<dependencyTracker> element.
IDependencyTracker.
String toXml(String name,
IDependencyTracker.IXmlProvider xmlProvider)
IDependencyTracker
using the specified implementation of the interface
IDependencyTracker.IXmlProvider. This is most
appropriate for cases where the dependent or prerequisite objects
are not instances of the class String.
name - The value of the name attribute in the top-most
<dependencyTracker> element.xmlProvider - An custom implementation of the interface
IDependencyTracker.IXmlProvider
responsible for converting the dependent and
prerequisite objects into XML.
IDependencyTracker.
String toXml(String name,
int indent)
IDependencyTracker.
This method uses the default implementation of the interface
IDependencyTracker.IXmlProvider, which simply returns the
value of the dependent and prerequisite object without performing a
conversion. This is most appropriate for cases where the dependent
and prerequisite objects are instances of the class
String.
name - The value of the name attribute in the top-most
<dependencyTracker> element.indent - The indent level at which to start.
IDependencyTracker.
String toXml(String name,
int indent,
IDependencyTracker.IXmlProvider xmlProvider)
IDependencyTracker
using the specified implementation of the interface
IDependencyTracker.IXmlProvider. This is most
appropriate for cases where the dependent or prerequisite objects
are not instances of the class String.
name - The value of the name attribute in the top-most
<dependencyTracker> element.indent - The indent level at which to start.xmlProvider - An custom implementation of the interface
IDependencyTracker.IXmlProvider
responsible for converting the dependent and
prerequisite objects into XML.
IDependencyTracker.
|
Service Activator Toolkit
Version 1.1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2001, 2008 IBM Corporation and others. All Rights Reserved.