Class AbstractForeignSourceRepository
- java.lang.Object
-
- org.opennms.netmgt.provision.persist.AbstractForeignSourceRepository
-
- All Implemented Interfaces:
ForeignSourceRepository
- Direct Known Subclasses:
CachingForeignSourceRepository
,FilesystemForeignSourceRepository
,FusedForeignSourceRepository
public abstract class AbstractForeignSourceRepository extends Object implements ForeignSourceRepository
-
-
Constructor Summary
Constructors Constructor Description AbstractForeignSourceRepository()
Constructor for AbstractForeignSourceRepository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Delete all requisitions and foreign source definitions and return to defaults.ForeignSource
getDefaultForeignSource()
getDefaultForeignSourceOnmsNodeRequisition
getNodeRequisition(String foreignSource, String foreignId)
getNodeRequisitionRequisition
importResourceRequisition(org.springframework.core.io.Resource resource)
importResourceRequisitionvoid
putDefaultForeignSource(ForeignSource foreignSource)
putDefaultForeignSourcevoid
resetDefaultForeignSource()
resetDefaultForeignSourcevoid
validate(ForeignSource foreignSource)
void
validate(Requisition requisition)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.provision.persist.ForeignSourceRepository
delete, delete, flush, getActiveForeignSourceNames, getForeignSource, getForeignSourceCount, getForeignSources, getRequisition, getRequisition, getRequisitionDate, getRequisitions, getRequisitionURL, save, save
-
-
-
-
Method Detail
-
importResourceRequisition
public Requisition importResourceRequisition(org.springframework.core.io.Resource resource) throws ForeignSourceRepositoryException
importResourceRequisition
- Specified by:
importResourceRequisition
in interfaceForeignSourceRepository
- Parameters:
resource
- aResource
object.- Returns:
- a
Requisition
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
getDefaultForeignSource
public ForeignSource getDefaultForeignSource() throws ForeignSourceRepositoryException
getDefaultForeignSource
- Specified by:
getDefaultForeignSource
in interfaceForeignSourceRepository
- Returns:
- a
ForeignSource
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
putDefaultForeignSource
public void putDefaultForeignSource(ForeignSource foreignSource) throws ForeignSourceRepositoryException
putDefaultForeignSource
- Specified by:
putDefaultForeignSource
in interfaceForeignSourceRepository
- Parameters:
foreignSource
- aForeignSource
object.- Throws:
ForeignSourceRepositoryException
- if any.
-
resetDefaultForeignSource
public void resetDefaultForeignSource() throws ForeignSourceRepositoryException
resetDefaultForeignSource
- Specified by:
resetDefaultForeignSource
in interfaceForeignSourceRepository
- Throws:
ForeignSourceRepositoryException
- if any.
-
getNodeRequisition
public OnmsNodeRequisition getNodeRequisition(String foreignSource, String foreignId) throws ForeignSourceRepositoryException
getNodeRequisition
- Specified by:
getNodeRequisition
in interfaceForeignSourceRepository
- Parameters:
foreignSource
- aString
object.foreignId
- aString
object.- Returns:
- a
OnmsNodeRequisition
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
validate
public void validate(ForeignSource foreignSource) throws ForeignSourceRepositoryException
- Specified by:
validate
in interfaceForeignSourceRepository
- Throws:
ForeignSourceRepositoryException
-
validate
public void validate(Requisition requisition) throws ForeignSourceRepositoryException
- Specified by:
validate
in interfaceForeignSourceRepository
- Throws:
ForeignSourceRepositoryException
-
clear
public void clear() throws ForeignSourceRepositoryException
Description copied from interface:ForeignSourceRepository
Delete all requisitions and foreign source definitions and return to defaults.- Specified by:
clear
in interfaceForeignSourceRepository
- Throws:
ForeignSourceRepositoryException
-
-