Interface RemoteService<Type extends IridaRepresentationModel & IridaThing>
-
- Type Parameters:
Type
- The type of object this repository will store
- All Known Subinterfaces:
Fast5ObjectRemoteService
,GenomeAssemblyRemoteService
,ProjectRemoteService
,SampleRemoteService
,SequenceFilePairRemoteService
,SequencingObjectRemoteService<Type>
,SingleEndSequenceFileRemoteService
- All Known Implementing Classes:
Fast5ObjectRemoteServiceImpl
,GenomeAssemblyRemoteServiceImpl
,ProjectRemoteServiceImpl
,RemoteServiceImpl
,SampleRemoteServiceImpl
,SequenceFilePairRemoteServiceImpl
,SequencingObjectRemoteServiceImpl
,SingleEndSequenceFileRemoteServiceImpl
public interface RemoteService<Type extends IridaRepresentationModel & IridaThing>
Service for communicating with a remote IRIDA instance
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
getServiceStatus(RemoteAPI remoteAPI)
Get the status of the remote servicejava.util.List<Type>
list(java.lang.String uri, RemoteAPI remoteAPI)
List the resources available from this serviceType
read(java.lang.String uri)
Read individual resource at the given URI.Type
read(java.lang.String uri, RemoteAPI remoteAPI)
Read an individual resource
-
-
-
Method Detail
-
read
Type read(java.lang.String uri, RemoteAPI remoteAPI)
Read an individual resource- Parameters:
uri
- The URI of the resource to readremoteAPI
- the API to read from- Returns:
- An object of Type
-
read
Type read(java.lang.String uri)
Read individual resource at the given URI. The requiredRemoteAPI
will be found using the given resource URI.- Parameters:
uri
- The URI of the resource- Returns:
- an object of Type
-
list
java.util.List<Type> list(java.lang.String uri, RemoteAPI remoteAPI)
List the resources available from this service- Parameters:
uri
- the uri to load the resources from.remoteAPI
- The API to read from- Returns:
- A
List<Type>
of the resources available
-
getServiceStatus
boolean getServiceStatus(RemoteAPI remoteAPI) throws IridaOAuthException
Get the status of the remote service- Parameters:
remoteAPI
- The API to check status for- Returns:
- true if the service is active
- Throws:
IridaOAuthException
- if the remote api cannot be contacted
-
-