Interface ForeignSourceRepository
-
- All Known Implementing Classes:
AbstractForeignSourceRepository
,CachingForeignSourceRepository
,FasterFilesystemForeignSourceRepository
,FilesystemForeignSourceRepository
,FusedForeignSourceRepository
,QueueingForeignSourceRepository
public interface ForeignSourceRepository
ForeignSourceRepository interface.
- Author:
- Benjamin Reed, Matt Brozowski
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clear()
Delete all requisitions and foreign source definitions and return to defaults.void
delete(ForeignSource foreignSource)
deletevoid
delete(Requisition requisition)
deletevoid
flush()
For performance reasons, a get after a save on a ForeignSourceRepository is not guaranteed to return the latest saved data unless you flush first.java.util.Set<java.lang.String>
getActiveForeignSourceNames()
getActiveForeignSourceNamesForeignSource
getDefaultForeignSource()
getDefaultForeignSourceForeignSource
getForeignSource(java.lang.String foreignSourceName)
getForeignSourceint
getForeignSourceCount()
getForeignSourceCountjava.util.Set<ForeignSource>
getForeignSources()
getForeignSourcesOnmsNodeRequisition
getNodeRequisition(java.lang.String foreignSource, java.lang.String foreignId)
getNodeRequisitionRequisition
getRequisition(java.lang.String foreignSourceName)
getRequisitionRequisition
getRequisition(ForeignSource foreignSource)
getRequisitionjava.util.Date
getRequisitionDate(java.lang.String foreignSource)
getRequisitionDatejava.util.Set<Requisition>
getRequisitions()
getRequisitionsjava.net.URL
getRequisitionURL(java.lang.String foreignSource)
getRequisitionURLRequisition
importResourceRequisition(org.springframework.core.io.Resource resource)
importResourceRequisitionvoid
putDefaultForeignSource(ForeignSource foreignSource)
putDefaultForeignSourcevoid
resetDefaultForeignSource()
resetDefaultForeignSourcevoid
save(ForeignSource foreignSource)
savevoid
save(Requisition requisition)
savevoid
validate(ForeignSource foreignSource)
void
validate(Requisition requisition)
-
-
-
Method Detail
-
getActiveForeignSourceNames
java.util.Set<java.lang.String> getActiveForeignSourceNames()
getActiveForeignSourceNames
- Returns:
- a
Set
object.
-
getForeignSourceCount
int getForeignSourceCount() throws ForeignSourceRepositoryException
getForeignSourceCount
- Returns:
- a int.
- Throws:
ForeignSourceRepositoryException
- if any.
-
getForeignSources
java.util.Set<ForeignSource> getForeignSources() throws ForeignSourceRepositoryException
getForeignSources
- Returns:
- a
Set
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
getForeignSource
ForeignSource getForeignSource(java.lang.String foreignSourceName) throws ForeignSourceRepositoryException
getForeignSource
- Parameters:
foreignSourceName
- aString
object.- Returns:
- a
ForeignSource
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
save
void save(ForeignSource foreignSource) throws ForeignSourceRepositoryException
save
- Parameters:
foreignSource
- aForeignSource
object.- Throws:
ForeignSourceRepositoryException
- if any.
-
delete
void delete(ForeignSource foreignSource) throws ForeignSourceRepositoryException
delete
- Parameters:
foreignSource
- aForeignSource
object.- Throws:
ForeignSourceRepositoryException
- if any.
-
getDefaultForeignSource
ForeignSource getDefaultForeignSource() throws ForeignSourceRepositoryException
getDefaultForeignSource
- Returns:
- a
ForeignSource
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
putDefaultForeignSource
void putDefaultForeignSource(ForeignSource foreignSource) throws ForeignSourceRepositoryException
putDefaultForeignSource
- Parameters:
foreignSource
- aForeignSource
object.- Throws:
ForeignSourceRepositoryException
- if any.
-
resetDefaultForeignSource
void resetDefaultForeignSource() throws ForeignSourceRepositoryException
resetDefaultForeignSource
- Throws:
ForeignSourceRepositoryException
- if any.
-
importResourceRequisition
Requisition importResourceRequisition(org.springframework.core.io.Resource resource) throws ForeignSourceRepositoryException
importResourceRequisition
- Parameters:
resource
- aResource
object.- Returns:
- a
Requisition
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
getRequisitions
java.util.Set<Requisition> getRequisitions() throws ForeignSourceRepositoryException
getRequisitions
- Returns:
- a
Set
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
getRequisition
Requisition getRequisition(java.lang.String foreignSourceName) throws ForeignSourceRepositoryException
getRequisition
- Parameters:
foreignSourceName
- aString
object.- Returns:
- a
Requisition
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
getRequisition
Requisition getRequisition(ForeignSource foreignSource) throws ForeignSourceRepositoryException
getRequisition
- Parameters:
foreignSource
- aForeignSource
object.- Returns:
- a
Requisition
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
getRequisitionDate
java.util.Date getRequisitionDate(java.lang.String foreignSource)
getRequisitionDate
- Parameters:
foreignSource
- the Foreign Source name of the requisition.- Returns:
- The date-stamp of the requisition, as a
Date
-
getRequisitionURL
java.net.URL getRequisitionURL(java.lang.String foreignSource)
getRequisitionURL
- Parameters:
foreignSource
- aString
object.- Returns:
- a
URL
object.
-
save
void save(Requisition requisition) throws ForeignSourceRepositoryException
save
- Parameters:
requisition
- aRequisition
object.- Throws:
ForeignSourceRepositoryException
- if any.
-
delete
void delete(Requisition requisition) throws ForeignSourceRepositoryException
delete
- Parameters:
requisition
- aRequisition
object.- Throws:
ForeignSourceRepositoryException
- if any.
-
getNodeRequisition
OnmsNodeRequisition getNodeRequisition(java.lang.String foreignSource, java.lang.String foreignId) throws ForeignSourceRepositoryException
getNodeRequisition
- Parameters:
foreignSource
- aString
object.foreignId
- aString
object.- Returns:
- a
OnmsNodeRequisition
object. - Throws:
ForeignSourceRepositoryException
- if any.
-
validate
void validate(ForeignSource foreignSource) throws ForeignSourceRepositoryException
- Throws:
ForeignSourceRepositoryException
-
validate
void validate(Requisition requisition) throws ForeignSourceRepositoryException
- Throws:
ForeignSourceRepositoryException
-
flush
void flush() throws ForeignSourceRepositoryException
For performance reasons, a get after a save on a ForeignSourceRepository is not guaranteed to return the latest saved data unless you flush first.- Throws:
ForeignSourceRepositoryException
-
clear
void clear() throws ForeignSourceRepositoryException
Delete all requisitions and foreign source definitions and return to defaults.- Throws:
ForeignSourceRepositoryException
-
-