com.hp.ucmdb.api.view
Interface ViewDefinition<T extends ViewDefinition>

All Superinterfaces:
BundledResource<ViewDefinition>, SupportsClientProperties<ViewDefinition>
All Known Subinterfaces:
PerspectiveBasedViewReferenceDefinition, RuleBasedViewDefinition, SingleViewReferenceDefinition, ViewWithFoldingDefinition

@NotFinalAPI
public interface ViewDefinition<T extends ViewDefinition>
extends BundledResource<ViewDefinition>, SupportsClientProperties<ViewDefinition>

Since:
UCMDB 9.0

Method Summary
 PerspectiveBasedViewReferenceDefinition asPerspectiveBasedViewReferenceDefinition()
          Returns this interface as a PerspectiveBasedViewReferenceDefinition.
 RuleBasedViewDefinition asRuleBasedViewDefinition()
          Returns this interface as a RuleBasedViewDefinition.
 SingleViewReferenceDefinition asSingleViewReference()
          Returns this interface as a SingleViewReference.
 ViewWithFoldingDefinition asViewWithFoldingDefinition()
          Returns this interface as a ViewWithFoldingDefinition.
 java.lang.String description()
          Returns a human-readable description of the view purpose.
 java.lang.String name()
          The name fo the view.
 java.lang.String queryName()
          Returns the name of the query this view is based on.
 View toView()
          Return an object that can be executed using the ViewService methods.
 ViewType viewType()
          The type of the view.
 T withDescription(java.lang.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 Detail

name

java.lang.String name()
The name fo the view.

Returns:
the name of the view.

description

java.lang.String description()
Returns a human-readable description of the view purpose.


withDescription

T withDescription(java.lang.String description)
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 the ViewService 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

java.lang.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 or PerspectiveBasedViewReferenceDefinition, according to the viewType()).

Returns:
The name of the query this view is based on.

asViewWithFoldingDefinition

ViewWithFoldingDefinition asViewWithFoldingDefinition()
                                                      throws java.lang.ClassCastException
Returns this interface as a ViewWithFoldingDefinition.

Returns:
this interface, cast to ViewWithFoldingDefinition.
Throws:
java.lang.ClassCastException - if viewType() is not ViewType.VIEW_WITH_FOLDING_DEFINITION.

asSingleViewReference

SingleViewReferenceDefinition asSingleViewReference()
                                                    throws java.lang.ClassCastException
Returns this interface as a SingleViewReference.

Returns:
this interface, cast to SingleViewReference.
Throws:
java.lang.ClassCastException - if viewType() is not ViewType.SINGLE_VIEW_REFERENCE_DEFINITION.

asPerspectiveBasedViewReferenceDefinition

PerspectiveBasedViewReferenceDefinition asPerspectiveBasedViewReferenceDefinition()
                                                                                  throws java.lang.ClassCastException
Returns this interface as a PerspectiveBasedViewReferenceDefinition.

Returns:
this interface, cast to PerspectiveBasedViewReferenceDefinition.
Throws:
java.lang.ClassCastException - if viewType() is not ViewType.PERSPECTIVES_BASED_VIEW_REFERENCE_DEFINITION.

asRuleBasedViewDefinition

RuleBasedViewDefinition asRuleBasedViewDefinition()
                                                  throws java.lang.ClassCastException
Returns this interface as a RuleBasedViewDefinition.

Returns:
this interface, cast to RuleBasedViewDefinition.
Throws:
java.lang.ClassCastException - if viewType() is not ViewType.RULE_BASED_VIEW.


Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.