Class UIRemoteAPIService
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.services.UIRemoteAPIService
-
@Component public class UIRemoteAPIService extends java.lang.Object
UI Service to handle request for Remote APIs
-
-
Constructor Summary
Constructors Constructor Description UIRemoteAPIService(RemoteAPIService remoteAPIService, RemoteAPITokenService tokenService, ProjectRemoteService projectRemoteService, ProjectService projectService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
checkAPIStatus(long remoteId)
Check the status of aRemoteAPI
AjaxCreateItemSuccessResponse
createSynchronizedProject(CreateRemoteProjectRequest request)
Add a new Synchronized Remote Projectvoid
deleteRemoteAPI(long remoteId)
Delete a specificRemoteAPI
java.util.List<RemoteAPIModel>
getListOfRemoteApis()
Get a list of allRemoteAPI
sjava.util.List<RemoteProjectModel>
getProjectsForAPI(java.lang.Long remoteId)
Get a list of projects available on a remote APIRemoteAPIModel
getRemoteApiDetails(long remoteId)
Get details about a specificRemoteAPI
-
-
-
Constructor Detail
-
UIRemoteAPIService
@Autowired public UIRemoteAPIService(RemoteAPIService remoteAPIService, RemoteAPITokenService tokenService, ProjectRemoteService projectRemoteService, ProjectService projectService)
-
-
Method Detail
-
checkAPIStatus
public java.util.Date checkAPIStatus(long remoteId)
Check the status of aRemoteAPI
- Parameters:
remoteId
- identifier for aRemoteAPI
- Returns:
- expiration
Date
of the REmote API Token
-
getRemoteApiDetails
public RemoteAPIModel getRemoteApiDetails(long remoteId)
Get details about a specificRemoteAPI
- Parameters:
remoteId
- identifier for theRemoteAPI
- Returns:
RemoteAPIModel
containing the details of theRemoteAPI
-
deleteRemoteAPI
public void deleteRemoteAPI(long remoteId)
Delete a specificRemoteAPI
- Parameters:
remoteId
- Identifier for theRemoteAPI
to delete
-
getListOfRemoteApis
public java.util.List<RemoteAPIModel> getListOfRemoteApis()
Get a list of allRemoteAPI
s- Returns:
- A list of
RemoteAPI
formatted for the UI
-
getProjectsForAPI
public java.util.List<RemoteProjectModel> getProjectsForAPI(java.lang.Long remoteId)
Get a list of projects available on a remote API- Parameters:
remoteId
- identifier for a remote api- Returns:
- List of projects on a remote API
-
createSynchronizedProject
public AjaxCreateItemSuccessResponse createSynchronizedProject(CreateRemoteProjectRequest request)
Add a new Synchronized Remote Project- Parameters:
request
- Details about the remote project to synchronize- Returns:
- the result of adding the new remote project
-
-