|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TopologyUpdateService
Interface for updating topology: creating, updating, and deleting CIs and relations. To create the data structures used by the methods of this interface, use the factory obtained with the getFactory method.
A typical usage of this interface is demonstrated below:TopologyUpdateService topologyUpdateService = ucmdbService.getTopologyUpdateService(); TopologyUpdateFactory topologyUpdateFactory = topologyUpdateService.getFactory(); TopologyModificationData topologyModificationData = topologyUpdateFactory.createTopologyModificationData(); CI host = topologyModificationData.addCI("host"); host.setPropertyValue("host_key", "test1"); CI ip = topologyModificationData.addCI("ip"); ip.setPropertyValue("ip_address", "127.0.0.10"); ip.setPropertyValue("ip_domain", "DefaultDomain"); topologyModificationData.addRelation("contained", host, ip); TopologyModificationData topologyCleanupData = topologyUpdateFactory.createTopologyModificationData(); CI test_host = topologyCleanupData.addCI("host"); test_host.setPropertyValue("host_key", "test2"); TopologyModification topologyModification = topologyUpdateFactory.createTopologyModification(); topologyModification.setDataForCreate(topologyModificationData).setDataForDelete(topologyCleanupData); topologyUpdateService.execute(topologyModification,ModifyMode.OPTIMISTIC);
Method Summary | |
---|---|
CreateOutput |
create(TopologyModificationData modificationData,
CreateMode mode)
Creates the specified set of CIs and relations in the UCMDB. |
DeleteOutput |
delete(TopologyModificationData modificationData,
DeleteMode mode)
Deletes a set of CIs and relations from the UCMDB. |
ExecuteOutput |
execute(TopologyModification topologyModification,
ModifyMode mode)
Modifies the specified set of CIs and relations in the UCMDB. |
TopologyUpdateFactory |
getFactory()
|
void |
touch(TopologyModificationData modificationData)
Delays deletion of UCMDB CIs and relations due to aging. |
UpdateOutput |
update(TopologyModificationData modificationData)
Updates a set of CIs and relations in the UCMDB. |
Method Detail |
---|
TopologyUpdateFactory getFactory()
CreateOutput create(TopologyModificationData modificationData, CreateMode mode) throws UcmdbException
modificationData
have temporary IDs. All key attributes
must be defined on these elements. This method calculates UCMDB IDs from the key attributes
and replaces the temporary IDs. All key attributes must be specified in the input modificationData
.
modificationData
have permanent UCMDB IDs, they are used only if the
type of those elements is defined as having randomly generated IDs. The IDs specified are used
to check whether the CIs and relations already exist.
modificationData
- describes the CIs and relations to createmode
- specifies the behavior if items already exist. See the CreateMode
enum.
UcmdbException
UpdateOutput update(TopologyModificationData modificationData) throws UcmdbException
modificationData
with
permanent UCMDB IDs.
modificationData
- describes CIs and relations to update
UcmdbException
void touch(TopologyModificationData modificationData) throws UcmdbException
modificationData
- Specifies the the CIs and relations to touch.
This method only uses the IDs from the modificationData.
Other properties are ignored.
UcmdbException
DeleteOutput delete(TopologyModificationData modificationData, DeleteMode mode) throws UcmdbException
modificationData
are the independent ends of relations that
require deletion of dependent CIs.
modificationData
be specified using have permanent UCMDB IDs.
modificationData
- specifies the elements to deletemode
- specifies the behavior if items do not exist. See the DeleteMode
enum.
UcmdbException
ExecuteOutput execute(TopologyModification topologyModification, ModifyMode mode) throws UcmdbException
topologyModification
- describes the CIs and relations to be modifiedmode
- specifies the behavior if CI or relation modification fails. See the ModifyMode
enum.
UcmdbException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |