@NotFinalAPI public interface PerspectiveBasedViewReferenceDefinition extends ViewDefinition<PerspectiveBasedViewReferenceDefinition>
PerspectiveContactable.setAsPerspectiveContact()
).
On execution, a perspective contact node is restricted by the "previous result" (see below) while the rest of the
perspective is not restricted. This can allow perspectives to enrich the "previous result" with more information.
Perspectives are executed in partial order, defined by a List of Set. Each perspective from a specific "level"
in the list (N) is restricted by the results of the unioned previous level (N-1). The results of all perspectives
from the level are then unioned with the results of the previous level.
The "zeroth" perspective "level" is considered the seed query.
* The "zero-th" level of the perspective hierarchy is a set of IDs. These IDs may be explicitly set using withBaseCIsIds(java.util.Collection<com.hp.ucmdb.api.types.UcmdbId>)
or implicitly
generated from base query (withBaseQueryName(java.lang.String)
).
After calculation the result, folding is done by the relevant perspective view. Example:
Perspective query A: X(contact)-->Y Perspective view A: X Y _ Perspective query B: Y(contact)-->Z Perspective view B: Y Z _ Perspective based view: Ids (x1, x2), Perspective hierarchy: {{A},{B}} (ordered levels (list), each level is unordered (set)). _ Result: x1 (from ids, from A.X) y1 (from A.Y, from B.Y) z1 (from B.Z) x2 (from ids, from A.X) y2 (from A.Y, not from B.y since y2 has no Z connected to it)Perspectives (views and queries) must be saved before execution or save of the perspective based view definition. In addition to the view name, it is also possible to define a "query name". In this definition, the query name refers to the "top level query" (see
QueryManagementService.savePerspectiveApplication(java.lang.String, java.util.List<java.util.Set<java.lang.String>>, java.lang.String, com.hp.ucmdb.api.topology.QueryDefinitionRecalcPriority, com.hp.ucmdb.api.topology.QueryDefinitionFirstLoadStrategy)
).
This query can be executed independently of the view using the relevant TopologyQueryService.executeQuery() methods.
The query options (first load strategy / recalculation priority) refer to this query.
Modifier and Type | Method and Description |
---|---|
Collection<UcmdbId> |
baseCIsIds()
The base CIs IDs, if set, or empty collection is none is set.
|
String |
baseQueryName()
The base query name for generating CIs.
|
Collection<UcmdbId> |
excludedCIs()
The set of IDs excluded from the result.
|
QueryDefinitionFirstLoadStrategy |
firstLoadStrategy()
Determines when the top level query should first be loaded and calculated.
|
List<Set<String>> |
perspectives()
The perspective hierarchy (view names).
|
String |
queryName()
The top level query name.
|
QueryDefinitionRecalcPriority |
recalcPriority()
Determines how soon the top level query is recalculated after data change.
|
PerspectiveBasedViewReferenceDefinition |
withBaseCIsIds(Collection<UcmdbId> baseCIsIds)
Sets the base CIs IDs, or resets them if empty collection passed.
|
PerspectiveBasedViewReferenceDefinition |
withBaseQueryName(String baseQueryName)
Sets the base query name, or resets it if the name is null.
|
PerspectiveBasedViewReferenceDefinition |
withExcludedCIs(Collection<UcmdbId> excludedCIs)
Sets the excluded IDs collection, or resets it if passed an empty collection.
|
PerspectiveBasedViewReferenceDefinition |
withFirstLoadStrategy(QueryDefinitionFirstLoadStrategy firstLoadStrategy)
Sets when the top level query should first be loaded and calculated.
|
PerspectiveBasedViewReferenceDefinition |
withQueryName(String topLevelQueryName)
The top level query name.
|
PerspectiveBasedViewReferenceDefinition |
withQueryRecalcPriority(QueryDefinitionRecalcPriority recalcPriority)
Sets how soon the top level query is recalculated after data change.
|
asPerspectiveBasedViewReferenceDefinition, asRuleBasedViewDefinition, asSingleViewReference, asViewWithFoldingDefinition, cmViewDefinition, description, name, toView, viewType, withCmViewDefinition, withDescription
bundleNames, withBundles
clientProperties, clientProperty, usedNamespaces, withClientProperty
List<Set<String>> perspectives()
Collection<UcmdbId> baseCIsIds()
PerspectiveBasedViewReferenceDefinition withBaseCIsIds(Collection<UcmdbId> baseCIsIds)
baseCIsIds
- the IDs, or empty collection to reset IDs.String baseQueryName()
PerspectiveBasedViewReferenceDefinition withBaseQueryName(String baseQueryName)
baseQueryName
- the base query name, or null to reset.Collection<UcmdbId> excludedCIs()
PerspectiveBasedViewReferenceDefinition withExcludedCIs(Collection<UcmdbId> excludedCIs)
excludedCIs
- the IDs to be excluded, or empty collection.String queryName()
queryName
in interface ViewDefinition<PerspectiveBasedViewReferenceDefinition>
PerspectiveBasedViewReferenceDefinition withQueryName(String topLevelQueryName)
QueryDefinitionRecalcPriority recalcPriority()
PerspectiveBasedViewReferenceDefinition withQueryRecalcPriority(QueryDefinitionRecalcPriority recalcPriority)
QueryDefinitionFirstLoadStrategy firstLoadStrategy()
PerspectiveBasedViewReferenceDefinition withFirstLoadStrategy(QueryDefinitionFirstLoadStrategy firstLoadStrategy)
Documentation Feedback
Copyright 2011 - 2018 Micro Focus or one of its affiliates.