4 Common Content
This chapter describes the utility methods included in the Oracle Communications Unified Inventory Management (UIM) common cartridge (ora_uim_common). This cartridge provides modeling capabilities that are independent of the technology domain.
The common cartridge includes utility methods that provide operations across multiple cartridge packs. Refer to the Javadoc for detailed information about the utility methods.
The utility methods in the cartridge are bundled into the following classes:
The ora_uim_common.jar provides a library that resolves references from the ora_uim_common cartridge. You use this library to develop new domain cartridges or to enhance other cartridges. Save this library in the same location as the path you defined for the UIM_LIB variable in Oracle Communications Design Studio. See the Design Studio Help for more information.
CommonManager
The CommonManager class represents the common interface for the use of a cartridge pack.
Table 4-1 describes the utility methods included in the CommonManager class.
Table 4-1 Utility Methods in CommonManager
Method Signature | Description |
---|---|
boolean checkPartyServiceRel (ServiceConfigurationVersion scv, Party party) |
Checks whether the service is associated with a party. |
boolean checkPartyServiceRel (ServiceConfigurationVersion scv, PartyType subscriberParam) |
Checks whether the service is associated with a party. For this method, the input parameter is PartyType. |
void commitAndStartTransaction() |
Commits an open transaction. |
GeographicAddress createAddress (GeographicAddressType addressType, java.lang.String specName) |
Creates a geographic address based on the address, city, and state information. |
GeographicLocation createGeoLocationForServiceAddress (GeographicAddress address) |
Creates a service location for the given service address. |
<E extends Persistent> E createLiveEntity (Persistent entity) |
Creates an entity in live context. |
Party createParty (PartyType partyType, java.lang.String partySpecName, java.lang.String roleSpecName) |
Creates a party based on the name, specification, and account number information. |
java.util.List<GeographicAddress> findAddress (GeographicAddressType addressType) |
Finds a service address based on the address, city, and state information. |
java.util.List<InventoryGroup> findAndValidateInventoryGroup (java.lang.String inventoryGroupName, java.lang.String specificationName) |
Finds all inventory groups based on the name of the inventory group and its specification. |
Specification findAndValidateSpecification (java.lang.Class specClass, java.lang.String specificationName) |
Finds a specification based on the name of the specification and validates it. This method requires the name of the specification class as an input parameter. |
Specification findAndValidateSpecification (java.lang.String specificationName) |
Finds a specification based on the name of the specification and validates it. |
java.util.List<InventoryGroup> findInventoryGroup (java.lang.String inventoryGroupName, java.lang.String specificationName) |
Finds all the inventory groups based on the inventory group name and specification. |
GeographicLocation findLocationForServiceAddress (GeographicAddress serviceAddress) |
Finds a service location for the given service address. If a service location is not found, it returns null. |
java.util.List<Party> findParty (PartyType partyType) |
Finds a party based on the party name, specification, and account number information. |
java.util.List<InventoryGroup> findServingAreaForServiceAddress (GeographicAddress serviceAddress, java.lang.String placeCharName, java.lang.String invGroupSpecName) |
Finds inventory groups that are defined for a serving area. |
GeographicAddress getAddress (GeographicAddressType addressType, java.lang.String specName) |
Finds an address entity based on the given parameter type. When an address is not found, it creates one address with the given information in the parameter type. |
GeographicLocation getLocation (GeographicAddress address) |
Finds a geographical location entity based on the given address. When a location is not found, it creates a location and relates it to the address. |
Party getParty (PartyType partyType, java.lang.String partySpecName, java.lang.String roleSpecName) |
Finds a party entity based on the given parameter type. When a party is not found, it creates one party with the given information in the party parameter. |
CharValue makeCharValue (characteristicExtensible, java.lang.String charSpecName, java.lang.String value) |
Creates a characteristic value. |
void validateInventoryGroupName (InventoryGroup inventoryGroup, java.lang.String specificationName) |
Checks whether an inventory group exists for an instance of this specification. |
ResourceManager
The ResourceManager class represents the common interface for resource management of a cartridge pack.
Table 4-2 describes the utility methods included in the ResourceManager class.
Table 4-2 Utility Methods in ResourceManager
Method Signature | Description |
---|---|
PhysicalDevice createPhysicalDevice (java.lang.String physicalDeviceName, java.lang.String specificationName, java.util.Collection<PhysicalDeviceCharacteristic> pdCharacteristics) |
Creates a physical device based on name and specification. |
PhysicalDevice createPhysicalDevice (java.lang.String physicalDeviceName, java.lang.String specificationName, java.lang.String serialNumber, java.lang.String physicalAddress, java.lang.String physicalLocation, java.util.Collection<PhysicalDeviceCharacteristic> pdCharacteristics) |
Creates a physical device based on name and specification. The hard attributes serial number, physical address, and physical location are additional input parameters for this method. |
java.util.List<LogicalDevice> findAndValidateLogicalDevice (java.lang.String logicalDeviceName, java.lang.String specificationName) |
Finds all the logical devices based on the name of the logical device and its specification. |
java.util.List<PhysicalDevice> findAndValidatePhysicalDevice (java.lang.String physicalDeviceName, java.lang.String specificationName) |
Finds all the physical devices based on the name of the physical device and its specification and validates them. |
java.util.List<PhysicalDevice> findAndValidatePhysicalDeviceByPhysicalAddress (java.lang.String physicalAddress, java.lang.String specificationName) |
Finds all the physical devices based on the physicalAddress characteristic and its specification. |
java.util.List<LogicalDevice> findLogicalDevice (InventoryGroup group, java.lang.String specName) |
Finds all the logical devices in the given inventory group. |
java.util.List<LogicalDevice> findLogicalDevice (java.lang.String logicalDeviceName, java.lang.String specificationName) |
Finds all the logical devices based on the name of the logical device and its specification name. |
java.util.List<LogicalDeviceAccount> findLogicalDeviceAccountByChar (java.lang.String charName, java.lang.String charValue, java.lang.String specName, LogicalDevice ld) |
Finds all logical device accounts based on a characteristic. If a logical device account is not found, it returns either null or an empty list. |
java.util.List<LogicalDevice> findLogicalDeviceByChar (java.lang.String charName, java.lang.String charValue, java.lang.String specName) |
Finds all logical devices based on a characteristic. |
java.util.List<PhysicalDevice> findPhysicalDevice (java.lang.String physicalDeviceName, java.lang.String specificationName) |
Finds all the physical devices based on the name of a physical device and the specification. |
java.util.List<PhysicalDevice> findPhysicalDeviceByPhysicalAddress (java.lang.String physicalAddress, java.lang.String specificationName) |
Finds physical devices in the inventory based on the physical address (MAC address) and specification. |
void validateLogicalDeviceName (LogicalDevice logicalDevice, java.lang.String specificationName) |
Checks whether a logical device already exists for an instance of this specification. |
void validatePhysicalDeviceName (PhysicalDevice physicalDevice, java.lang.String specificationName) |
Checks whether a physical device already exists for an instance of this specification. |
ServiceManager
The ServiceManager class represents the common interface for the service and service configuration management of a cartridge pack.
Table 4-3 describes the methods included in the ServiceManager class.
Table 4-3 Utility Methods in ServiceManager
Method Signature | Description |
---|---|
addChildConfigItem (ServiceConfigurationVersion scv, ServiceConfigurationItem parentItem, java.lang.String childItemName) |
Adds a child configuration item in the given configuration version. |
addChildConfigItem (ServiceConfigurationVersion scv, java.lang.String parentItemName, java.lang.String childItemName) |
Adds a child configuration item in the given configuration version. For this method, the name of the parent service configuration item, rather than the configuration item itself, is passed as an input parameter. |
checkItemAssignedReferenced (ServiceConfigurationVersion scv, ServiceConfigurationItem item) |
Checks whether the configuration item has an assignment or reference. |
checkItemAssignedReferenced (ServiceConfigurationVersion scv, java.lang.String itemName) |
Checks whether the configuration item has an assignment or reference. For this method, the name of the service configuration item, rather than the configuration item itself, is passed as an input parameter. |
findServiceConfigItemByName (ServiceConfigurationVersion scv, java.lang.String itemName) |
Finds service configuration items by the name of a configuration item in the given service configuration version. |
getAllChildServiceConfigurationItems (java.util.List<ServiceConfigurationItem> items) |
Retrieves all the levels of child configuration items for the given configuration items. |
getAllChildServiceConfigurationItemsMatching (ServiceConfigurationItem item, java.lang.String matchingName) |
Retrieves the child configuration items for the given configuration item that match with the given name. |
getServiceConfigurationItems (ServiceConfigurationVersion scv, Assignment assignment) |
Finds the service configuration items based on the assigned resources. |
getServiceConfigurationItems (ServiceConfigurationVersion scv, ConfigurationReference reference) |
Finds the service configuration items based on the referenced resources. |
getServiceConfigurationVersion (Service svc, java.lang.String configSpecName) |
Finds whether a service configuration version that is in progress exists before a new version can be created. |
relateServiceToParty (ServiceConfigurationVersion scv, Party party, java.lang.String roleSpec) |
Relates a party to the service. |
relateServiceToParty (ServiceConfigurationVersion scv, PartyType partyType, java.lang.String partySpecName, java.lang.String roleSpec) |
Relates a party to the service. For this method, the input parameter is PartyType. |
updateServiceConfigurationVersion (ServiceConfigurationVersion scv) |
Updates the service configuration version for the given configuration version and returns the updated version. |