@Service public class DefaultProvisionService extends Object implements ProvisionService, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
DefaultProvisionService() |
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public boolean isDiscoveryEnabled()
isDiscoveryEnabled
isDiscoveryEnabled
in interface ProvisionService
public boolean isRequisitionedEntityDeletionEnabled()
isRequisitionedEntityDeletionEnabled
in interface ProvisionService
@Transactional public void insertNode(OnmsNode node)
insertNode
in interface ProvisionService
@Transactional public void updateNode(OnmsNode node, String rescanExisting)
updateNode
in interface ProvisionService
node
- The node that has been updated and should be written to the
databaserescanExisting
- 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)@Transactional public void deleteNode(Integer nodeId)
deleteNode
in interface ProvisionService
@Transactional public void deleteInterface(Integer nodeId, String ipAddr)
deleteInterface
in interface ProvisionService
@Transactional public void deleteService(Integer nodeId, InetAddress addr, String service)
deleteService
in interface ProvisionService
public boolean isRequisitioned(OnmsNode node)
public boolean isRequisitioned(OnmsIpInterface ip)
public boolean isRequisitioned(OnmsMonitoredService monSvc)
@Transactional public OnmsIpInterface updateIpInterfaceAttributes(Integer nodeId, OnmsIpInterface scannedIface)
updateIpInterfaceAttributes
in interface ProvisionService
@Transactional public OnmsSnmpInterface updateSnmpInterfaceAttributes(Integer nodeId, OnmsSnmpInterface snmpInterface)
updateSnmpInterfaceAttributes
in interface ProvisionService
@Transactional public OnmsMonitoredService addMonitoredService(Integer ipInterfaceId, String svcName)
addMonitoredService
in interface ProvisionService
@Transactional public OnmsMonitoredService addMonitoredService(Integer nodeId, String ipAddress, String svcName)
addMonitoredService
in interface ProvisionService
@Transactional public OnmsMonitoredService updateMonitoredServiceState(Integer nodeId, String ipAddress, String svcName)
updateMonitoredServiceState
in interface ProvisionService
@Transactional public void clearCache()
clearCache
clearCache
in interface ProvisionService
public OnmsDistPoller createDistPollerIfNecessary(String dpName, String dpAddr)
createDistPollerIfNecessary
in interface ProvisionService
dpName
- The name of the distPoller that is neededdpAddr
- The address to give the new distPoller if it is necessary to
create onepublic OnmsDistPoller createDistPollerIfNecessary(OnmsDistPoller scannedDistPoller)
@Transactional public OnmsNode getRequisitionedNode(String foreignSource, String foreignId) throws ForeignSourceRepositoryException
getRequisitionedNode
in interface ProvisionService
ForeignSourceRepositoryException
@Transactional public OnmsServiceType createServiceTypeIfNecessary(String serviceName)
createServiceTypeIfNecessary
in interface ProvisionService
serviceName
- the name of the OnmsServiceType to look up@Transactional public OnmsCategory createCategoryIfNecessary(String name)
createCategoryIfNecessary
in interface ProvisionService
name
- the name of the OnmsCategory to look up@Transactional(readOnly=true) public Map<String,Integer> getForeignIdToNodeIdMap(String foreignSource)
getForeignIdToNodeIdMap
in interface ProvisionService
@Transactional public void setNodeParentAndDependencies(String foreignSource, String foreignId, String parentForeignSource, String parentForeignId, String parentNodeLabel)
setNodeParentAndDependencies
in interface ProvisionService
foreignSource
- 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
in interface ProvisionService
@Transactional(readOnly=true) public List<NodeScanSchedule> getScheduleForNodes()
getScheduleForNodes
getScheduleForNodes
in interface ProvisionService
List
object.public void setForeignSourceRepository(ForeignSourceRepository foreignSourceRepository)
setForeignSourceRepository
in interface ProvisionService
public ForeignSourceRepository getForeignSourceRepository()
getForeignSourceRepository
ForeignSourceRepository
object.public Requisition loadRequisition(org.springframework.core.io.Resource resource)
loadRequisition
in interface ProvisionService
@Transactional public OnmsNode updateNodeAttributes(OnmsNode node)
updateNodeAttributes
in interface ProvisionService
public List<ServiceDetector> getDetectorsForForeignSource(String foreignSourceName)
getDetectorsForForeignSource
in interface ProvisionService
public List<NodePolicy> getNodePoliciesForForeignSource(String foreignSourceName)
getNodePoliciesForForeignSource
in interface ProvisionService
public List<IpInterfacePolicy> getIpInterfacePoliciesForForeignSource(String foreignSourceName)
getIpInterfacePoliciesForForeignSource
in interface ProvisionService
public List<SnmpInterfacePolicy> getSnmpInterfacePoliciesForForeignSource(String foreignSourceName)
getSnmpInterfacePoliciesForForeignSource
in interface ProvisionService
public <T> List<T> getPluginsForForeignSource(Class<T> pluginClass, String foreignSourceName)
getPluginsForForeignSource
@Transactional public void deleteObsoleteInterfaces(Integer nodeId, Date scanStamp)
deleteObsoleteInterfaces
in interface ProvisionService
@Transactional public void updateNodeScanStamp(Integer nodeId, Date scanStamp)
updateNodeScanStamp
in interface ProvisionService
@Transactional public OnmsIpInterface setIsPrimaryFlag(Integer nodeId, String ipAddress)
setIsPrimaryFlag
in interface ProvisionService
@Transactional public OnmsIpInterface getPrimaryInterfaceForNode(OnmsNode node)
getPrimaryInterfaceForNode
in interface ProvisionService
@Transactional public OnmsNode createUndiscoveredNode(String ipAddress, String foreignSource)
createUndiscoveredNode
in interface ProvisionService
@Transactional public OnmsNode getNode(Integer nodeId)
getNode
in interface ProvisionService
@Transactional public OnmsNode getDbNodeInitCat(Integer nodeId)
getDbNodeInitCat
in interface ProvisionService
public void setHostnameResolver(HostnameResolver resolver)
setHostnameResolver
in interface ProvisionService
public HostnameResolver getHostnameResolver()
getHostnameResolver
in interface ProvisionService
Copyright © 2015. All rights reserved.