@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.InitializingBeanExceptionpublic boolean isDiscoveryEnabled()
isDiscoveryEnabled
isDiscoveryEnabled in interface ProvisionServicepublic 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 ProvisionServicenode - 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 ProvisionServicepublic 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 ProvisionServicepublic 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 onepublic OnmsDistPoller createDistPollerIfNecessary(OnmsDistPoller scannedDistPoller)
@Transactional public OnmsNode getRequisitionedNode(String foreignSource, String foreignId) throws ForeignSourceRepositoryException
getRequisitionedNode in interface ProvisionServiceForeignSourceRepositoryException@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 ProvisionService@Transactional public void setNodeParentAndDependencies(String foreignSource, String foreignId, String parentForeignSource, 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 in interface ProvisionService@Transactional(readOnly=true) public List<NodeScanSchedule> getScheduleForNodes()
getScheduleForNodes
getScheduleForNodes in interface ProvisionServiceList object.public void setForeignSourceRepository(ForeignSourceRepository foreignSourceRepository)
setForeignSourceRepository in interface ProvisionServicepublic 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 ProvisionServicepublic List<ServiceDetector> getDetectorsForForeignSource(String foreignSourceName)
getDetectorsForForeignSource in interface ProvisionServicepublic List<NodePolicy> getNodePoliciesForForeignSource(String foreignSourceName)
getNodePoliciesForForeignSource in interface ProvisionServicepublic List<IpInterfacePolicy> getIpInterfacePoliciesForForeignSource(String foreignSourceName)
getIpInterfacePoliciesForForeignSource in interface ProvisionServicepublic List<SnmpInterfacePolicy> getSnmpInterfacePoliciesForForeignSource(String foreignSourceName)
getSnmpInterfacePoliciesForForeignSource in interface ProvisionServicepublic <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 ProvisionServicepublic void setHostnameResolver(HostnameResolver resolver)
setHostnameResolver in interface ProvisionServicepublic HostnameResolver getHostnameResolver()
getHostnameResolver in interface ProvisionServiceCopyright © 2015. All rights reserved.