public class ClientService
extends java.lang.Object
| Constructor and Description |
|---|
ClientService(ClientStorage clientStorage)
Constructor for ClientService.
|
| Modifier and Type | Method and Description |
|---|---|
Client |
createClient(Client client)
Create new Client that will be available for all users.
|
void |
deleteClient(java.lang.Long clientId,
java.lang.String username)
Delete Client identified by its id and check if username has permission to
delete it.
|
java.util.List<Client> |
getClientsList()
Retrieves the list of Activities with offset, limit and a keyword that can be
empty
|
Client |
updateClient(Client Client,
java.lang.String username)
Update an existing Client on datasource.
|
public ClientService(ClientStorage clientStorage)
Constructor for ClientService.
clientStorage - a ClientStorage object.public Client createClient(Client client) throws java.lang.Exception
EntityExistsException will be thrown.client - Client to createClient in datasourcejava.lang.Exception - when Client already exists or an error occurs while
creating Client or its attached imagepublic Client updateClient(Client Client, java.lang.String username) throws java.lang.Exception
EntityNotFoundException will be thrown.Client - dto to update on storeusername - username storing ClientClient in datasourcejava.lang.Exception - when Exception is thrown or an error
occurs while saving Clientpublic void deleteClient(java.lang.Long clientId,
java.lang.String username)
throws javax.persistence.EntityNotFoundException,
java.lang.IllegalAccessException
clientId - technical identifier of Clientusername - user currently deleting Clientjavax.persistence.EntityNotFoundException - if Client wasn't foundjava.lang.IllegalAccessException - if user is not allowed to delete ClientCopyright © 2003–2021 eXo Platform SAS. All rights reserved.