com.hp.ucmdb.api.view
Interface ViewClassBasedFoldingRule


public interface ViewClassBasedFoldingRule

This interface defines a class-based folding rule.

Class-based folding rules are resolved while traversing the topology resulting from the query the view is based on. If the triplet is X--Y-->Z (source class is X, link class is Y, target class is Z), then for a result triplet (CI/Relation/CI) x--y-->z, z will appear as a child of x.
If the triplet is X<--Y--Z (source class is X, link class is Y, target class is Z, against link direction), then for a result triplet x--y-->z, x will appear as a child of z.

Note the cycles restriction from RuleBasedViewDefinition is in effect.

Since:
UCMDB 9.0

Method Summary
 ViewClassBasedFoldingRule againstTheLink(java.lang.String linkClassName)
          Sets the link class name and direction.
 ViewClassBasedFoldingRule alongTheLink(java.lang.String linkClassName)
          Sets the link class name and direction.
 java.lang.String from()
          CIs of this class are considered as sources.
 ViewClassBasedFoldingRule from(java.lang.String sourceClassName)
          Sets the source class name.
 boolean isAlongDirection()
          If true, the rule is evaluated along the link direction.
 java.lang.String link()
          Relations of this class are valid.
 ViewClassBasedFoldingRule setAlongDirection(boolean alongDirection)
          Sets the direction the rule is evaluated.
 java.lang.String to()
          CIs of this class are considered as targets.
 ViewClassBasedFoldingRule to(java.lang.String targetClassName)
          Sets the target class name.
 ViewClassBasedFoldingRule withLinkClassName(java.lang.String linkClassName)
          Sets the link class name.
 

Method Detail

from

java.lang.String from()
CIs of this class are considered as sources.


from

ViewClassBasedFoldingRule from(java.lang.String sourceClassName)
Sets the source class name.

Returns:
this object for method chaining.
See Also:
from()

to

java.lang.String to()
CIs of this class are considered as targets.


to

ViewClassBasedFoldingRule to(java.lang.String targetClassName)
Sets the target class name.

Returns:
this object for method chaining.
See Also:
to()

alongTheLink

ViewClassBasedFoldingRule alongTheLink(java.lang.String linkClassName)
Sets the link class name and direction.

This means "fold instances of:

 'source'--'link'-->'target'
 
as:
  'source'
    'target'
 
(target below source)


againstTheLink

ViewClassBasedFoldingRule againstTheLink(java.lang.String linkClassName)
Sets the link class name and direction.

This means "fold instances of:

 'source'<--'link'--'target'
 
as:
  'target'
    'source'
 
(target below source)


link

java.lang.String link()
Relations of this class are valid.


isAlongDirection

boolean isAlongDirection()
If true, the rule is evaluated along the link direction. Otherwise, the rule is evaluated against the link direction.


setAlongDirection

ViewClassBasedFoldingRule setAlongDirection(boolean alongDirection)
Sets the direction the rule is evaluated.

Returns:
this object for method chaining.
See Also:
isAlongDirection()

withLinkClassName

ViewClassBasedFoldingRule withLinkClassName(java.lang.String linkClassName)
Sets the link class name.

Returns:
this object for method chaining.
See Also:
link()


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