Class ClientService
java.lang.Object
org.exoplatform.timetracker.service.ClientService
A Service to access and store Activities
- Version:
- $Id: $Id
- Author:
- medamine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateClient(Client client) Create new Client that will be available for all users.voiddeleteClient(Long clientId, String username) Delete Client identified by its id and check if username has permission to delete it.Retrieves the list of Activities with offset, limit and a keyword that can be emptyupdateClient(Client Client, String username) Update an existing Client on datasource.
-
Constructor Details
-
ClientService
Constructor for ClientService.
- Parameters:
clientStorage- aClientStorageobject.
-
-
Method Details
-
createClient
Create new Client that will be available for all users. If the Client already exits anEntityExistsExceptionwill be thrown. -
updateClient
Update an existing Client on datasource. If the Client doesn't exit anEntityNotFoundExceptionwill be thrown. -
deleteClient
public void deleteClient(Long clientId, String username) throws javax.persistence.EntityNotFoundException, IllegalAccessException Delete Client identified by its id and check if username has permission to delete it.- Parameters:
clientId- technical identifier of Clientusername- user currently deleting Client- Throws:
javax.persistence.EntityNotFoundException- if Client wasn't foundIllegalAccessException- if user is not allowed to delete Client
-
getClientsList
Retrieves the list of Activities with offset, limit and a keyword that can be empty- Returns:
- List of
Clientthat contains the list of Activities
-