Package com.hp.ucmdb.api.view
Interface ViewDefinition<T extends ViewDefinition>
- All Superinterfaces:
BundledResource<ViewDefinition>
,SupportsClientProperties<ViewDefinition>
- All Known Subinterfaces:
ComplianceView
,PerspectiveBasedViewReferenceDefinition
,RuleBasedViewDefinition
,SingleViewReferenceDefinition
,ViewWithFoldingDefinition
@NotFinalAPI
public interface ViewDefinition<T extends ViewDefinition>
extends BundledResource<ViewDefinition>, SupportsClientProperties<ViewDefinition>
- Since:
- UCMDB 9.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns this interface as a ComplianceView.Returns this interface as a PerspectiveBasedViewReferenceDefinition.Returns this interface as a RuleBasedViewDefinition.Returns this interface as a SingleViewReference.Returns this interface as a ViewWithFoldingDefinition.Returns CM definitions for the viewReturns a human-readable description of the view purpose.name()
The name fo the view.Returns the name of the query this view is based on.toView()
Return an object that can be executed using theViewService
methods.viewType()
The type of the view.withCmViewDefinition
(CmViewDefinition cmViewDefinition) withDescription
(String description) Changes the human-readable description of the view.Methods inherited from interface com.hp.ucmdb.api.bundles.BundledResource
bundleNames, withBundles
Methods inherited from interface com.hp.ucmdb.api.util.SupportsClientProperties
clientProperties, clientProperty, usedNamespaces, withClientProperty
-
Method Details
-
name
String name()The name fo the view.- Returns:
- the name of the view.
-
description
String description()Returns a human-readable description of the view purpose. -
withDescription
Changes the human-readable description of the view.- Parameters:
description
- the new description.- Returns:
- this view.
-
toView
View toView()Return an object that can be executed using theViewService
methods.- Returns:
- an object that can be executed using the
ViewService
methods.
-
viewType
ViewType viewType()The type of the view.- Returns:
- the type of the view.
-
queryName
String queryName()Returns the name of the query this view is based on. To see what the query name actually means for the specific view definition, see the actual view definition (ViewWithFoldingDefinition
,SingleViewReferenceDefinition
orPerspectiveBasedViewReferenceDefinition
, according to theviewType()
).- Returns:
- The name of the query this view is based on.
-
cmViewDefinition
CmViewDefinition cmViewDefinition()Returns CM definitions for the view- Returns:
- a CmViewDefinition object for the the view
-
withCmViewDefinition
-
asViewWithFoldingDefinition
Returns this interface as a ViewWithFoldingDefinition.- Returns:
- this interface, cast to ViewWithFoldingDefinition.
- Throws:
ClassCastException
- ifviewType()
is not ViewType.VIEW_WITH_FOLDING_DEFINITION.
-
asSingleViewReference
Returns this interface as a SingleViewReference.- Returns:
- this interface, cast to SingleViewReference.
- Throws:
ClassCastException
- ifviewType()
is not ViewType.SINGLE_VIEW_REFERENCE_DEFINITION.
-
asPerspectiveBasedViewReferenceDefinition
PerspectiveBasedViewReferenceDefinition asPerspectiveBasedViewReferenceDefinition() throws ClassCastExceptionReturns this interface as a PerspectiveBasedViewReferenceDefinition.- Returns:
- this interface, cast to PerspectiveBasedViewReferenceDefinition.
- Throws:
ClassCastException
- ifviewType()
is not ViewType.PERSPECTIVES_BASED_VIEW_REFERENCE_DEFINITION.
-
asRuleBasedViewDefinition
Returns this interface as a RuleBasedViewDefinition.- Returns:
- this interface, cast to RuleBasedViewDefinition.
- Throws:
ClassCastException
- ifviewType()
is not ViewType.RULE_BASED_VIEW.
-
asComplianceView
Returns this interface as a ComplianceView.- Returns:
- this interface, cast to ComplianceView.
- Throws:
ClassCastException
- ifviewType()
is not ViewType.COMPLIANCE_VIEW.
-