com.hp.ucmdb.api.topology
Interface TopologyData

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
TopologyModificationData

public interface TopologyData
extends java.io.Serializable

A structure serving as input to topology modification methods.


Method Summary
 void addCI(CI ci)
          Adds the CI to the list of modifications.
 CI addCI(java.lang.String type)
          Creates a new CI of the specified type and adds it to the list of modifications.
 CI addCI(UcmdbId id, java.lang.String type)
          Creates a new CI of the specified type ID and adds it to the list of modifications.
 void addCIs(java.lang.Iterable<? extends CI> cis)
          Adds all CIs from the collection to the list of modifications.
 void addRelation(Relation relation)
          Adds the specified relation to the list of modifications.
 Relation addRelation(java.lang.String type, CI end1, CI end2)
          Creates a new relation of the specified type between the two CIs and adds it to the list of modifications.
 Relation addRelation(java.lang.String type, UcmdbId end1, UcmdbId end2)
          Creates a new relation of the specified type between the CIs with the specified IDs and adds it to the list of modifications.
 Relation addRelation(UcmdbId id, java.lang.String type, CI end1, CI end2)
           
 Relation addRelation(UcmdbId id, java.lang.String type, UcmdbId end1, UcmdbId end2)
           
 void addRelations(java.lang.Iterable<? extends Relation> relations)
          Adds the relations in the collection to the list of modifications.
 CI getCI(UcmdbId id)
          Returns the CI in this collection having the specified ID.
 java.lang.Iterable<CI> getCIs()
          An Iterable collection of the CIs to be modified.
 java.lang.Iterable<Relation> getRelations()
          An Iterable collection of the Relations to be modified.
 boolean hasCIs()
          Checks if there are any CIs in the list of modifications.
 boolean hasRelations()
          Checks if there are any Relations in the list of modifications.
 

Method Detail

addCI

void addCI(CI ci)
Adds the CI to the list of modifications.

Parameters:
ci - The ci to add.

addCIs

void addCIs(java.lang.Iterable<? extends CI> cis)
Adds all CIs from the collection to the list of modifications.

Parameters:
cis - The CIs to add.

addCI

CI addCI(java.lang.String type)
Creates a new CI of the specified type and adds it to the list of modifications. The new CI has a temporary ID. This has the same effect as these two calls:
TopologyUpdateFactory.createCI(String)
addCI(com.hp.ucmdb.api.types.CI).

Parameters:
type - the type of the CI.
Returns:
CI
See Also:
TopologyUpdateFactory.createCI(String)

addCI

CI addCI(UcmdbId id,
         java.lang.String type)
Creates a new CI of the specified type ID and adds it to the list of modifications. This has the same effect as these two calls:
TopologyUpdateFactory.createCI(com.hp.ucmdb.api.types.UcmdbId, String)
addCI(com.hp.ucmdb.api.types.CI).

Parameters:
id - the id of the CI.
type - The type of the CI.
Returns:
CI
See Also:
TopologyUpdateFactory.createCI(com.hp.ucmdb.api.types.UcmdbId, String)

addRelation

void addRelation(Relation relation)
Adds the specified relation to the list of modifications.

Parameters:
relation - The relation to add.

addRelations

void addRelations(java.lang.Iterable<? extends Relation> relations)
Adds the relations in the collection to the list of modifications.

Parameters:
relations - The relations to add.

addRelation

Relation addRelation(java.lang.String type,
                     CI end1,
                     CI end2)
Creates a new relation of the specified type between the two CIs and adds it to the list of modifications. The new relation has a temporary ID. This has the same effect as these two calls:
TopologyUpdateFactory.createRelation(String, com.hp.ucmdb.api.types.CI, com.hp.ucmdb.api.types.CI)
addRelation(com.hp.ucmdb.api.types.Relation)

Parameters:
type - The type of the relation
end1 - The end1 CI
end2 - The end2 CI
Returns:
relation
See Also:
TopologyUpdateFactory.createRelation(String, com.hp.ucmdb.api.types.CI, com.hp.ucmdb.api.types.CI)

addRelation

Relation addRelation(java.lang.String type,
                     UcmdbId end1,
                     UcmdbId end2)
Creates a new relation of the specified type between the CIs with the specified IDs and adds it to the list of modifications. The new relation has a temporary ID. This has the same effect as these two calls:
TopologyUpdateFactory.createRelation(String, com.hp.ucmdb.api.types.UcmdbId, com.hp.ucmdb.api.types.UcmdbId)
addRelation(com.hp.ucmdb.api.types.Relation)

Parameters:
type - The type of the relation
end1 - The end1 CI id
end2 - The end2 CI id
Returns:
relation
See Also:
TopologyUpdateFactory.createRelation(String, com.hp.ucmdb.api.types.UcmdbId, com.hp.ucmdb.api.types.UcmdbId)

addRelation

Relation addRelation(UcmdbId id,
                     java.lang.String type,
                     UcmdbId end1,
                     UcmdbId end2)

addRelation

Relation addRelation(UcmdbId id,
                     java.lang.String type,
                     CI end1,
                     CI end2)

hasCIs

boolean hasCIs()
Checks if there are any CIs in the list of modifications.

Returns:
true if has at least one CI

getCIs

java.lang.Iterable<CI> getCIs()
An Iterable collection of the CIs to be modified.

Returns:
iterable on all CIs

getCI

CI getCI(UcmdbId id)
Returns the CI in this collection having the specified ID.

Parameters:
id - The id of the requested CI
Returns:
CI

hasRelations

boolean hasRelations()
Checks if there are any Relations in the list of modifications.

Returns:
true iff has at least one relation

getRelations

java.lang.Iterable<Relation> getRelations()
An Iterable collection of the Relations to be modified.

Returns:
iterable on all relations


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