Class UIClientService
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.ria.web.services.UIClientService
-
@Component public class UIClientService extends java.lang.Object
UI Service to handle IRIDA Clients
-
-
Constructor Summary
Constructors Constructor Description UIClientService(IridaClientDetailsService clientDetailsService, org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createOrUpdateClient(CreateUpdateClientDetails request, java.util.Locale locale)
Create a new clientvoid
deleteClient(java.lang.Long id)
Delete a clientvoid
deleteClientTokens(java.lang.Long id)
Revoke all tokens for a specific clientTableResponse<ClientTableModel>
getClientList(ClientTableRequest tableRequest)
Get a listing of clients based on the table request.void
regenerateClientSecret(java.lang.Long id)
Generate a new client secretvoid
validateClientId(java.lang.String clientId)
Validate a client identifier for a new client
-
-
-
Constructor Detail
-
UIClientService
public UIClientService(IridaClientDetailsService clientDetailsService, org.springframework.context.MessageSource messageSource)
-
-
Method Detail
-
getClientList
public TableResponse<ClientTableModel> getClientList(ClientTableRequest tableRequest)
Get a listing of clients based on the table request.- Parameters:
tableRequest
- Information about the sort and page of the table.- Returns:
- Current status of the table
-
deleteClientTokens
public void deleteClientTokens(java.lang.Long id)
Revoke all tokens for a specific client- Parameters:
id
- Identifier for a client
-
validateClientId
public void validateClientId(java.lang.String clientId) throws EntityNotFoundException
Validate a client identifier for a new client- Parameters:
clientId
- Identifier to check to see if it exists- Throws:
EntityNotFoundException
- thrown if a client does not exist with the given client id.
-
createOrUpdateClient
public java.lang.String createOrUpdateClient(CreateUpdateClientDetails request, java.util.Locale locale) throws EntityExistsException, javax.validation.ConstraintViolationException
Create a new client- Parameters:
request
- Details about the new clientlocale
- Current usersLocale
- Returns:
- A message to the user about the result of the create/update
- Throws:
EntityExistsException
- thrown if the client id already is used.javax.validation.ConstraintViolationException
- thrown if the client id violates any of its constraints
-
deleteClient
public void deleteClient(java.lang.Long id)
Delete a client- Parameters:
id
- Identifier for the client to delete
-
regenerateClientSecret
public void regenerateClientSecret(java.lang.Long id)
Generate a new client secret- Parameters:
id
- identifier for a client
-
-