Interface ProvisionService
- 
- All Known Implementing Classes:
- DefaultProvisionService
 
 public interface ProvisionService
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringABORTstatic java.lang.StringDETECTOR_NAMEstatic java.lang.StringERRORstatic java.lang.StringFOREIGN_IDstatic java.lang.StringFOREIGN_SOURCEstatic java.lang.StringIP_ADDRESSstatic java.lang.StringLOCATIONstatic java.lang.StringNODE_ID
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description OnmsMonitoredServiceaddMonitoredService(java.lang.Integer ipInterfaceId, java.lang.String svcName)OnmsMonitoredServiceaddMonitoredService(java.lang.Integer nodeId, java.lang.String ipAddress, java.lang.String serviceName)io.opentracing.SpanbuildAndStartSpan(java.lang.String name, io.opentracing.SpanContext spanContext)voidclearCache()Clear the Hibernate object cache.OnmsCategorycreateCategoryIfNecessary(java.lang.String name)Look up the OnmsCategory with the give name, creating one if none exists.OnmsMonitoringLocationcreateLocationIfNecessary(java.lang.String locationId)Lookup a monitoring location in the database, creating it if necessary.OnmsServiceTypecreateServiceTypeIfNecessary(java.lang.String serviceName)Look up the OnmsServiceType with the given name, creating one if it doesn't exist.OnmsNodecreateUndiscoveredNode(java.lang.String ipAddress, java.lang.String foreignSource, java.lang.String location)voiddeleteInterface(java.lang.Integer nodeId, java.lang.String ipAddr)voiddeleteNode(java.lang.Integer nodeId)Delete the indicated node from the database.voiddeleteObsoleteInterfaces(java.lang.Integer nodeId, java.util.Date scanStamp)voiddeleteService(java.lang.Integer nodeId, java.net.InetAddress addr, java.lang.String service, boolean ignoreUnmanaged)Delete the indicated service from the database.OnmsNodegetDbNodeInitCat(java.lang.Integer nodeId)java.util.List<PluginConfig>getDetectorsForForeignSource(java.lang.String foreignSource)java.util.Map<java.lang.String,java.lang.Integer>getForeignIdToNodeIdMap(java.lang.String foreignSource)Creates a map of foreignIds to nodeIds for all nodes that have the indicated foreignSorce.HostnameResolvergetHostnameResolver()java.util.List<IpInterfacePolicy>getIpInterfacePoliciesForForeignSource(java.lang.String foreignSourceName)LocationAwareDetectorClientgetLocationAwareDetectorClient()LocationAwareDnsLookupClientgetLocationAwareDnsLookupClient()LocationAwareSnmpClientgetLocationAwareSnmpClient()OnmsNodegetNode(java.lang.Integer nodeId)java.util.List<NodePolicy>getNodePoliciesForForeignSource(java.lang.String foreignSourceName)OnmsIpInterfacegetPrimaryInterfaceForNode(OnmsNode node)OnmsNodegetRequisitionedNode(java.lang.String foreignSource, java.lang.String foreignId)NodeScanSchedulegetScheduleForNode(int nodeId, boolean force)java.util.List<NodeScanSchedule>getScheduleForNodes()Returns a list of scheduled nodes.java.util.List<SnmpInterfacePolicy>getSnmpInterfacePoliciesForForeignSource(java.lang.String foreignSourceName)SnmpProfileMappergetSnmpProfileMapper()voidinsertNode(OnmsNode node)Insert the provided node into the databasebooleanisDiscoveryEnabled()RequisitionloadRequisition(org.springframework.core.io.Resource resource)voidsetForeignSourceRepository(ForeignSourceRepository foriengSourceRepository)voidsetHostnameResolver(HostnameResolver resolver)OnmsIpInterfacesetIsPrimaryFlag(java.lang.Integer nodeId, java.lang.String ipAddress)voidsetNodeParentAndDependencies(java.lang.String foreignSource, java.lang.String foreignId, java.lang.String parentForeignSource, java.lang.String parentForeignId, java.lang.String parentNodeLabel)Sets the parent of the node and adds the relationship to the path element for the node.voidsetSnmpProfileMapper(SnmpProfileMapper snmpProfileMapper)voidsetTracer(io.opentracing.Tracer tracer)OnmsIpInterfaceupdateIpInterfaceAttributes(java.lang.Integer nodeId, OnmsIpInterface ipInterface)OnmsMonitoredServiceupdateMonitoredServiceState(java.lang.Integer nodeId, java.lang.String ipAddress, java.lang.String serviceName)voidupdateNode(OnmsNode node, java.lang.String rescanExisting)Update the database entry for the given node.OnmsNodeupdateNodeAttributes(OnmsNode node)voidupdateNodeScanStamp(java.lang.Integer nodeId, java.util.Date scanStamp)OnmsSnmpInterfaceupdateSnmpInterfaceAttributes(java.lang.Integer nodeId, OnmsSnmpInterface snmpInterface)
 
- 
- 
- 
Field Detail- 
NODE_IDstatic final java.lang.String NODE_ID - See Also:
- Constant Field Values
 
 - 
LOCATIONstatic final java.lang.String LOCATION - See Also:
- Constant Field Values
 
 - 
IP_ADDRESSstatic final java.lang.String IP_ADDRESS - See Also:
- Constant Field Values
 
 - 
FOREIGN_IDstatic final java.lang.String FOREIGN_ID - See Also:
- Constant Field Values
 
 - 
FOREIGN_SOURCEstatic final java.lang.String FOREIGN_SOURCE - See Also:
- Constant Field Values
 
 - 
DETECTOR_NAMEstatic final java.lang.String DETECTOR_NAME - See Also:
- Constant Field Values
 
 - 
ABORTstatic final java.lang.String ABORT - See Also:
- Constant Field Values
 
 - 
ERRORstatic final java.lang.String ERROR - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
isDiscoveryEnabledboolean isDiscoveryEnabled() 
 - 
clearCachevoid clearCache() Clear the Hibernate object cache. This is used to clear the object cache created by Hibernate. This is needed so large imports don't end up caching the entire database when it has no intention of using a node's data again. This is needed only to help memory performance.
 - 
createLocationIfNecessary@Transactional OnmsMonitoringLocation createLocationIfNecessary(java.lang.String locationId) Lookup a monitoring location in the database, creating it if necessary. This method looks up theOnmsMonitoringLocationobject with the ID 'locationId' in the database and returns it. If there is noOnmsMonitoringLocationwith that name then one is created using the name provided, saved in the database, and returned.- Parameters:
- locationId- The ID of the- OnmsMonitoringLocationthat is needed
- Returns:
- a new OnmsMonitoringLocationthat will be saved to the database when the transaction is committed.
 
 - 
updateNode@Transactional void updateNode(OnmsNode node, java.lang.String rescanExisting) Update the database entry for the given node. The node supplied is used to update the database. Entries that have been change in the node are copied into the database. It is assumed that the node passed in has been previously loaded from the database and modified.- Parameters:
- node- The node that has been updated and should be written to the database
- rescanExisting- true, if the node must be rescanned. false, if the node should not be rescanned (perform only add/delete operations on the DB) dbonly, if the node should not be rescanned (perform all DB operations)
 
 - 
getDbNodeInitCat@Transactional OnmsNode getDbNodeInitCat(java.lang.Integer nodeId) 
 - 
updateIpInterfaceAttributes@Transactional OnmsIpInterface updateIpInterfaceAttributes(java.lang.Integer nodeId, OnmsIpInterface ipInterface) 
 - 
updateSnmpInterfaceAttributes@Transactional OnmsSnmpInterface updateSnmpInterfaceAttributes(java.lang.Integer nodeId, OnmsSnmpInterface snmpInterface) 
 - 
addMonitoredService@Transactional OnmsMonitoredService addMonitoredService(java.lang.Integer ipInterfaceId, java.lang.String svcName) 
 - 
addMonitoredService@Transactional OnmsMonitoredService addMonitoredService(java.lang.Integer nodeId, java.lang.String ipAddress, java.lang.String serviceName) 
 - 
updateMonitoredServiceState@Transactional OnmsMonitoredService updateMonitoredServiceState(java.lang.Integer nodeId, java.lang.String ipAddress, java.lang.String serviceName) 
 - 
getRequisitionedNode@Transactional OnmsNode getRequisitionedNode(java.lang.String foreignSource, java.lang.String foreignId) 
 - 
deleteNode@Transactional void deleteNode(java.lang.Integer nodeId) Delete the indicated node from the database.
 - 
deleteInterface@Transactional void deleteInterface(java.lang.Integer nodeId, java.lang.String ipAddr)
 - 
deleteService@Transactional void deleteService(java.lang.Integer nodeId, java.net.InetAddress addr, java.lang.String service, boolean ignoreUnmanaged)Delete the indicated service from the database. If the service is the last service on the interface, delete the interface as well. If the interface is the last interface on the node, delete the node as well.- Parameters:
- nodeId- the node containing the service
- addr- the IP address containing the service
- service- the service to delete
- ignoreUnmanaged- if true, cascade delete the containing interface if only unmanaged services remain
 
 - 
insertNode@Transactional void insertNode(OnmsNode node) Insert the provided node into the database
 - 
createServiceTypeIfNecessary@Transactional OnmsServiceType createServiceTypeIfNecessary(java.lang.String serviceName) Look up the OnmsServiceType with the given name, creating one if it doesn't exist.- Parameters:
- serviceName- the name of the OnmsServiceType to look up
- Returns:
- a OnmsServiceType object with the given name, if none existed in the database then a new one will been created and saved in the database.
 
 - 
createCategoryIfNecessary@Transactional OnmsCategory createCategoryIfNecessary(java.lang.String name) Look up the OnmsCategory with the give name, creating one if none exists.- Parameters:
- name- the name of the OnmsCategory to look up
- Returns:
- an OnmsCategory that represents the given name, if none existed in the database a new one will have been created.
 
 - 
getForeignIdToNodeIdMap@Transactional(readOnly=true) java.util.Map<java.lang.String,java.lang.Integer> getForeignIdToNodeIdMap(java.lang.String foreignSource) Creates a map of foreignIds to nodeIds for all nodes that have the indicated foreignSorce.
 - 
setNodeParentAndDependencies@Transactional void setNodeParentAndDependencies(java.lang.String foreignSource, java.lang.String foreignId, java.lang.String parentForeignSource, java.lang.String parentForeignId, java.lang.String parentNodeLabel)Sets the parent of the node and adds the relationship to the path element for the node. The foreignId is used to reference the node and the parentForeignId and the parentNodeLabel are used to locate the parentNodeId- Parameters:
- foreignSource- the foreignSource to use when looking for the nodeId and parentNodeId by foreignId.
- foreignId- the foreignId for the node being set
- parentForeignId- the foreignId of the parent node
- parentNodeLabel- if the parent node cannot be found using its foreignId then an attempt to locate it using the its nodeLabel is made
 
 - 
getScheduleForNodesjava.util.List<NodeScanSchedule> getScheduleForNodes() Returns a list of scheduled nodes.
 - 
getScheduleForNodeNodeScanSchedule getScheduleForNode(int nodeId, boolean force) 
 - 
setForeignSourceRepositoryvoid setForeignSourceRepository(ForeignSourceRepository foriengSourceRepository) 
 - 
loadRequisitionRequisition loadRequisition(org.springframework.core.io.Resource resource) 
 - 
getDetectorsForForeignSourcejava.util.List<PluginConfig> getDetectorsForForeignSource(java.lang.String foreignSource) 
 - 
getNodePoliciesForForeignSourcejava.util.List<NodePolicy> getNodePoliciesForForeignSource(java.lang.String foreignSourceName) 
 - 
getIpInterfacePoliciesForForeignSourcejava.util.List<IpInterfacePolicy> getIpInterfacePoliciesForForeignSource(java.lang.String foreignSourceName) 
 - 
getSnmpInterfacePoliciesForForeignSourcejava.util.List<SnmpInterfacePolicy> getSnmpInterfacePoliciesForForeignSource(java.lang.String foreignSourceName) 
 - 
updateNodeScanStamp@Transactional void updateNodeScanStamp(java.lang.Integer nodeId, java.util.Date scanStamp)
 - 
deleteObsoleteInterfaces@Transactional void deleteObsoleteInterfaces(java.lang.Integer nodeId, java.util.Date scanStamp)
 - 
setIsPrimaryFlag@Transactional OnmsIpInterface setIsPrimaryFlag(java.lang.Integer nodeId, java.lang.String ipAddress) 
 - 
getPrimaryInterfaceForNode@Transactional OnmsIpInterface getPrimaryInterfaceForNode(OnmsNode node) 
 - 
createUndiscoveredNode@Transactional OnmsNode createUndiscoveredNode(java.lang.String ipAddress, java.lang.String foreignSource, java.lang.String location) 
 - 
getNode@Transactional OnmsNode getNode(java.lang.Integer nodeId) 
 - 
getHostnameResolverHostnameResolver getHostnameResolver() 
 - 
setHostnameResolvervoid setHostnameResolver(HostnameResolver resolver) 
 - 
getLocationAwareDetectorClientLocationAwareDetectorClient getLocationAwareDetectorClient() 
 - 
getLocationAwareSnmpClientLocationAwareSnmpClient getLocationAwareSnmpClient() 
 - 
getLocationAwareDnsLookupClientLocationAwareDnsLookupClient getLocationAwareDnsLookupClient() 
 - 
getSnmpProfileMapperSnmpProfileMapper getSnmpProfileMapper() 
 - 
setSnmpProfileMappervoid setSnmpProfileMapper(SnmpProfileMapper snmpProfileMapper) 
 - 
setTracervoid setTracer(io.opentracing.Tracer tracer) 
 - 
buildAndStartSpanio.opentracing.Span buildAndStartSpan(java.lang.String name, io.opentracing.SpanContext spanContext)
 
- 
 
-