public class Disambiguator extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAXIMUM_DISAMBIGUATED_TREE_DEPTH
The maximum depth of the resource tree.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> List<org.rhq.core.domain.resource.composite.DisambiguationReport<T>> |
disambiguate(List<T> results,
DisambiguationUpdateStrategy disambiguationUpdateStrategy,
org.rhq.core.util.IntExtractor<? super T> extractor,
javax.persistence.EntityManager entityManager,
List<String> duplicateTypeNames)
Given a list of results, this method produces an object decorates the provided original results
with data needed to disambiguate the results with respect to resource names, their types and ancestory.
|
public static final int MAXIMUM_DISAMBIGUATED_TREE_DEPTH
public static <T> List<org.rhq.core.domain.resource.composite.DisambiguationReport<T>> disambiguate(List<T> results, DisambiguationUpdateStrategy disambiguationUpdateStrategy, org.rhq.core.util.IntExtractor<? super T> extractor, javax.persistence.EntityManager entityManager, List<String> duplicateTypeNames)
The disambiguation result contains information on what types of information are needed to make the resources in the original result unambiguous and contains the decorated original data in the same order as the supplied result list.
The objects in results do not necessarily need to correspond to a resource. In case of such objects,
the resourceIdExtractor should return 0. In the resulting report such objects will still be wrapped
in a DisambiguationReport but the parent list will be empty and resource type and plugin name will
be null.
T - the type of the result elementsresults - the results to disambiguatedisambiguationUpdateStrategy - how is the disambiguation info going to be applied to the results.resourceIdExtractor - an object able to extract resource id from an instance of type parameter.entityManager - an entityManager to be used to access the databaseduplicateTypeNames - the list of type names that are ambiguous without plugin specResourceNamesDisambiguationResultCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.