|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.provision.service.DefaultProvisionService
@Service public class DefaultProvisionService
DefaultProvisionService
| Constructor Summary | |
|---|---|
DefaultProvisionService()
|
|
| Method Summary | ||
|---|---|---|
OnmsMonitoredService |
addMonitoredService(Integer ipInterfaceId,
String svcName)
addMonitoredService |
|
OnmsMonitoredService |
addMonitoredService(Integer nodeId,
String ipAddress,
String svcName)
addMonitoredService |
|
void |
clearCache()
clearCache |
|
OnmsCategory |
createCategoryIfNecessary(String name)
Look up the OnmsCategory with the give name, creating one if none exists. |
|
OnmsDistPoller |
createDistPollerIfNecessary(OnmsDistPoller scannedDistPoller)
|
|
OnmsDistPoller |
createDistPollerIfNecessary(String dpName,
String dpAddr)
Lookup a distPoller in the database, creating it if necessary. |
|
OnmsServiceType |
createServiceTypeIfNecessary(String serviceName)
Look up the OnmsServiceType with the given name, creating one if it doesn't exist. |
|
OnmsNode |
createUndiscoveredNode(String ipAddress)
createUndiscoveredNode |
|
void |
deleteInterface(Integer nodeId,
String ipAddr)
deleteInterface |
|
void |
deleteNode(Integer nodeId)
Delete the indicated node form the database. |
|
void |
deleteObsoleteInterfaces(Integer nodeId,
Date scanStamp)
deleteObsoleteInterfaces |
|
void |
deleteService(Integer nodeId,
InetAddress addr,
String service)
deleteService |
|
OnmsNode |
getDbNodeInitCat(Integer nodeId)
getDbNodeInitCat |
|
List<ServiceDetector> |
getDetectorsForForeignSource(String foreignSourceName)
getDetectorsForForeignSource |
|
Map<String,Integer> |
getForeignIdToNodeIdMap(String foreignSource)
Creates a map of foreignIds to nodeIds for all nodes that have the indicated foreignSorce. |
|
ForeignSourceRepository |
getForeignSourceRepository()
getForeignSourceRepository |
|
List<IpInterfacePolicy> |
getIpInterfacePoliciesForForeignSource(String foreignSourceName)
getIpInterfacePoliciesForForeignSource |
|
OnmsNode |
getNode(Integer nodeId)
getNode |
|
List<NodePolicy> |
getNodePoliciesForForeignSource(String foreignSourceName)
getNodePoliciesForForeignSource |
|
|
getPluginsForForeignSource(Class<T> pluginClass,
String foreignSourceName)
getPluginsForForeignSource |
|
OnmsIpInterface |
getPrimaryInterfaceForNode(OnmsNode node)
getPrimaryInterfaceForNode |
|
OnmsNode |
getRequisitionedNode(String foreignSource,
String foreignId)
getRequisitionedNode |
|
NodeScanSchedule |
getScheduleForNode(int nodeId,
boolean force)
getScheduleForNode |
|
List<NodeScanSchedule> |
getScheduleForNodes()
getScheduleForNodes |
|
List<SnmpInterfacePolicy> |
getSnmpInterfacePoliciesForForeignSource(String foreignSourceName)
getSnmpInterfacePoliciesForForeignSource |
|
void |
insertNode(OnmsNode node)
Insert the provided node into the database |
|
boolean |
isDiscoveryEnabled()
isDiscoveryEnabled |
|
boolean |
isRequisitioned(OnmsIpInterface ip)
|
|
boolean |
isRequisitioned(OnmsMonitoredService monSvc)
|
|
boolean |
isRequisitioned(OnmsNode node)
|
|
boolean |
isRequisitionedEntityDeletionEnabled()
|
|
Requisition |
loadRequisition(org.springframework.core.io.Resource resource)
loadRequisition |
|
void |
setForeignSourceRepository(ForeignSourceRepository foreignSourceRepository)
setForeignSourceRepository |
|
OnmsIpInterface |
setIsPrimaryFlag(Integer nodeId,
String ipAddress)
setIsPrimaryFlag |
|
void |
setNodeParentAndDependencies(String foreignSource,
String foreignId,
String parentForeignId,
String parentNodeLabel)
Sets the parent of the node and adds the relationship to the path element for the node. |
|
OnmsIpInterface |
updateIpInterfaceAttributes(Integer nodeId,
OnmsIpInterface scannedIface)
updateIpInterfaceAttributes |
|
OnmsMonitoredService |
updateMonitoredServiceState(Integer nodeId,
String ipAddress,
String svcName)
updateMonitoredServiceState |
|
void |
updateNode(OnmsNode node)
Update the database entry for the given node. |
|
OnmsNode |
updateNodeAttributes(OnmsNode node)
updateNodeAttributes |
|
void |
updateNodeScanStamp(Integer nodeId,
Date scanStamp)
updateNodeScanStamp |
|
OnmsSnmpInterface |
updateSnmpInterfaceAttributes(Integer nodeId,
OnmsSnmpInterface snmpInterface)
updateSnmpInterfaceAttributes |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultProvisionService()
| Method Detail |
|---|
public boolean isDiscoveryEnabled()
isDiscoveryEnabled
isDiscoveryEnabled in interface ProvisionServicepublic boolean isRequisitionedEntityDeletionEnabled()
isRequisitionedEntityDeletionEnabled in interface ProvisionService@Transactional public void insertNode(OnmsNode node)
insertNode in interface ProvisionServicenode - a OnmsNode object.@Transactional public void updateNode(OnmsNode node)
updateNode in interface ProvisionServicenode - The node that has been updated and should be written to the
database@Transactional public void deleteNode(Integer nodeId)
deleteNode in interface ProvisionServicenodeId - a Integer object.
@Transactional
public void deleteInterface(Integer nodeId,
String ipAddr)
deleteInterface
deleteInterface in interface ProvisionServicenodeId - a Integer object.ipAddr - a String object.
@Transactional
public void deleteService(Integer nodeId,
InetAddress addr,
String service)
deleteService
deleteService in interface ProvisionServicenodeId - a Integer object.addr - a String object.service - a String object.public boolean isRequisitioned(OnmsNode node)
public boolean isRequisitioned(OnmsIpInterface ip)
public boolean isRequisitioned(OnmsMonitoredService monSvc)
@Transactional
public OnmsIpInterface updateIpInterfaceAttributes(Integer nodeId,
OnmsIpInterface scannedIface)
updateIpInterfaceAttributes
updateIpInterfaceAttributes in interface ProvisionServicenodeId - a Integer object.scannedIface - a OnmsIpInterface object.
OnmsIpInterface object.
@Transactional
public OnmsSnmpInterface updateSnmpInterfaceAttributes(Integer nodeId,
OnmsSnmpInterface snmpInterface)
updateSnmpInterfaceAttributes
updateSnmpInterfaceAttributes in interface ProvisionServicenodeId - a Integer object.snmpInterface - a OnmsSnmpInterface object.
OnmsSnmpInterface object.
@Transactional
public OnmsMonitoredService addMonitoredService(Integer ipInterfaceId,
String svcName)
addMonitoredService
addMonitoredService in interface ProvisionServiceipInterfaceId - a Integer object.svcName - a String object.
OnmsMonitoredService object.
@Transactional
public OnmsMonitoredService addMonitoredService(Integer nodeId,
String ipAddress,
String svcName)
addMonitoredService
addMonitoredService in interface ProvisionServicenodeId - a Integer object.ipAddress - a String object.svcName - a String object.
OnmsMonitoredService object.
@Transactional
public OnmsMonitoredService updateMonitoredServiceState(Integer nodeId,
String ipAddress,
String svcName)
ProvisionServiceupdateMonitoredServiceState
updateMonitoredServiceState in interface ProvisionServicenodeId - a Integer object.ipAddress - a String object.svcName - a String object.
OnmsMonitoredService object.@Transactional public void clearCache()
clearCache
clearCache in interface ProvisionService
public OnmsDistPoller createDistPollerIfNecessary(String dpName,
String dpAddr)
createDistPollerIfNecessary in interface ProvisionServicedpName - The name of the distPoller that is neededdpAddr - The address to give the new distPoller if it is necessary to
create one
public OnmsDistPoller createDistPollerIfNecessary(OnmsDistPoller scannedDistPoller)
@Transactional
public OnmsNode getRequisitionedNode(String foreignSource,
String foreignId)
throws ForeignSourceRepositoryException
getRequisitionedNode
getRequisitionedNode in interface ProvisionServiceforeignSource - a String object.foreignId - a String object.
OnmsNode object.
ForeignSourceRepositoryException@Transactional public OnmsServiceType createServiceTypeIfNecessary(String serviceName)
createServiceTypeIfNecessary in interface ProvisionServiceserviceName - the name of the OnmsServiceType to look up
@Transactional public OnmsCategory createCategoryIfNecessary(String name)
createCategoryIfNecessary in interface ProvisionServicename - the name of the OnmsCategory to look up
@Transactional(readOnly=true) public Map<String,Integer> getForeignIdToNodeIdMap(String foreignSource)
getForeignIdToNodeIdMap in interface ProvisionServiceforeignSource - a String object.
Map object.
@Transactional
public void setNodeParentAndDependencies(String foreignSource,
String foreignId,
String parentForeignId,
String parentNodeLabel)
setNodeParentAndDependencies in interface ProvisionServiceforeignSource - the foreignSource to use when looking for the nodeId and
parentNodeId by foreignId.foreignId - the foreignId for the node being setparentForeignId - the foreignId of the parent nodeparentNodeLabel - if the parent node cannot be found using its
foreignId then an attempt to locate it using the its nodeLabel
is made
@Transactional(readOnly=true)
public NodeScanSchedule getScheduleForNode(int nodeId,
boolean force)
getScheduleForNode
getScheduleForNode in interface ProvisionServicenodeId - a int.force - a boolean.
NodeScanSchedule object.@Transactional(readOnly=true) public List<NodeScanSchedule> getScheduleForNodes()
getScheduleForNodes
getScheduleForNodes in interface ProvisionServiceList object.public void setForeignSourceRepository(ForeignSourceRepository foreignSourceRepository)
setForeignSourceRepository
setForeignSourceRepository in interface ProvisionServiceforeignSourceRepository - a ForeignSourceRepository object.public ForeignSourceRepository getForeignSourceRepository()
getForeignSourceRepository
ForeignSourceRepository object.public Requisition loadRequisition(org.springframework.core.io.Resource resource)
loadRequisition
loadRequisition in interface ProvisionServiceresource - a Resource object.
Requisition object.@Transactional public OnmsNode updateNodeAttributes(OnmsNode node)
updateNodeAttributes
updateNodeAttributes in interface ProvisionServicenode - a OnmsNode object.
OnmsNode object.public List<ServiceDetector> getDetectorsForForeignSource(String foreignSourceName)
getDetectorsForForeignSource
getDetectorsForForeignSource in interface ProvisionServiceforeignSourceName - a String object.
List object.public List<NodePolicy> getNodePoliciesForForeignSource(String foreignSourceName)
getNodePoliciesForForeignSource
getNodePoliciesForForeignSource in interface ProvisionServiceforeignSourceName - a String object.
List object.public List<IpInterfacePolicy> getIpInterfacePoliciesForForeignSource(String foreignSourceName)
getIpInterfacePoliciesForForeignSource
getIpInterfacePoliciesForForeignSource in interface ProvisionServiceforeignSourceName - a String object.
List object.public List<SnmpInterfacePolicy> getSnmpInterfacePoliciesForForeignSource(String foreignSourceName)
getSnmpInterfacePoliciesForForeignSource
getSnmpInterfacePoliciesForForeignSource in interface ProvisionServiceforeignSourceName - a String object.
List object.
public <T> List<T> getPluginsForForeignSource(Class<T> pluginClass,
String foreignSourceName)
getPluginsForForeignSource
T - a T object.pluginClass - a Class object.foreignSourceName - a String object.
List object.
@Transactional
public void deleteObsoleteInterfaces(Integer nodeId,
Date scanStamp)
deleteObsoleteInterfaces
deleteObsoleteInterfaces in interface ProvisionServicenodeId - a Integer object.scanStamp - a Date object.
@Transactional
public void updateNodeScanStamp(Integer nodeId,
Date scanStamp)
updateNodeScanStamp
updateNodeScanStamp in interface ProvisionServicenodeId - a Integer object.scanStamp - a Date object.
@Transactional
public OnmsIpInterface setIsPrimaryFlag(Integer nodeId,
String ipAddress)
setIsPrimaryFlag
setIsPrimaryFlag in interface ProvisionServicenodeId - a Integer object.ipAddress - a String object.
OnmsIpInterface object.@Transactional public OnmsIpInterface getPrimaryInterfaceForNode(OnmsNode node)
getPrimaryInterfaceForNode
getPrimaryInterfaceForNode in interface ProvisionServicenode - a OnmsNode object.
OnmsIpInterface object.@Transactional public OnmsNode createUndiscoveredNode(String ipAddress)
createUndiscoveredNode
createUndiscoveredNode in interface ProvisionServiceipAddress - a String object.
OnmsNode object.@Transactional public OnmsNode getNode(Integer nodeId)
getNode
getNode in interface ProvisionServicenodeId - a Integer object.
OnmsNode object.@Transactional public OnmsNode getDbNodeInitCat(Integer nodeId)
getDbNodeInitCat
getDbNodeInitCat in interface ProvisionServicenodeId - a Integer object.
OnmsNode object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||