Package de.fraunhofer.iese.mydata.client
Interface ILibraryClientService
-
- All Known Subinterfaces:
IManagementService
public interface ILibraryClientService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LibraryClientResponseDTOcreateLibraryClient(String clientIdStr, boolean isMasterClient)OAuthClientDetailsDTOcreateOAuthClientDetails(LibraryClientResponseDTO libraryClient, String username)Class returns created ClientDetails for an LibraryClient with the username of the Auhtentificated which is trying create it.voiddeleteLibraryClient(ClientId clientId, String username)voiddeleteLibraryClient(String clientIdStr, String username)LibraryClientgetLibraryClient(ClientId clientId)Get a client by its IDSet<LibraryClient>getLibraryClients(SolutionId solutionId)Get a set of library clients by solution idMap<ClientId,Long>listClientsForPolicy(PolicyId policyId)Map<ClientId,Long>listClientsForTimer(TimerId timerId)Map<PolicyId,Long>listDeployedPolicyVersions(ClientId libraryClientId)Map<TimerId,Long>listDeployedTimerVersions(ClientId libraryClientId)voidnotifySync(SyncNotification syncNotification)
-
-
-
Method Detail
-
notifySync
void notifySync(SyncNotification syncNotification) throws IOException, InvalidEntityException, NoSuchEntityException
- Parameters:
syncNotification-- Throws:
IOExceptionInvalidEntityException- if the sync notification is not validNoSuchEntityException- if there is no client with the id specified in the sync notification
-
listDeployedPolicyVersions
Map<PolicyId,Long> listDeployedPolicyVersions(ClientId libraryClientId) throws IOException, InvalidEntityException, NoSuchEntityException
- Parameters:
libraryClientId-- Returns:
- a map of policyIds and policyVersions for a specific clientId
- Throws:
IOExceptionInvalidEntityException- if the client id is not validNoSuchEntityException- if there is no library client with the client id given
-
listClientsForPolicy
Map<ClientId,Long> listClientsForPolicy(PolicyId policyId) throws IOException, InvalidEntityException, NoSuchEntityException
- Parameters:
policyId-- Returns:
- a map of libraryClientIds and policyVersions for a specific policyId
- Throws:
IOExceptionInvalidEntityException- if the policy id is not validNoSuchEntityException- if there is no policy with the policy id given
-
listDeployedTimerVersions
Map<TimerId,Long> listDeployedTimerVersions(ClientId libraryClientId) throws IOException, InvalidEntityException, NoSuchEntityException
- Parameters:
libraryClientId-- Returns:
- a map of timerIds and timerVersions for a specific libraryClientId
- Throws:
IOExceptionInvalidEntityException- if the client id is not validNoSuchEntityException- if there is no library client with the client id given
-
listClientsForTimer
Map<ClientId,Long> listClientsForTimer(TimerId timerId) throws IOException, InvalidEntityException, NoSuchEntityException
- Parameters:
timerId-- Returns:
- a map of libraryClientIds and policyVersions for a specific policyId
- Throws:
IOExceptionInvalidEntityException- if the timer id is not validNoSuchEntityException- if there is not imer with the timer id given
-
createLibraryClient
LibraryClientResponseDTO createLibraryClient(String clientIdStr, boolean isMasterClient) throws InvalidEntityException, IOException, ConflictingResourceException, NoSuchEntityException
- Parameters:
clientIdStr- a ClientId as String for this new LibraryClientisMasterClient-- Returns:
- Throws:
InvalidEntityException- if the client id string is not validIOException- clientIdStr must fit the soultionIdStrConflictingResourceException- if there already exists a library client with the same id or already a master clientNoSuchEntityException- if the solution does not exist
-
deleteLibraryClient
void deleteLibraryClient(ClientId clientId, String username) throws NoSuchEntityException, InvalidEntityException, IOException
- Parameters:
clientId- the Client of the LibraryClient you want to deleteusername- the username of the User who wants to accesss this method it will delete also the regarding OAtuhClientDetails if existing- Throws:
NoSuchEntityException- if the client does not existInvalidEntityException- if the client id is not validIOException
-
deleteLibraryClient
void deleteLibraryClient(String clientIdStr, String username) throws InvalidEntityException, NoSuchEntityException, IOException
- Parameters:
clientIdStr- as String the Client of the LibraryClient you want to deleteusername- the username of the User who wants to accesss this method it will delete also the regarding OAtuhClientDetails if existing- Throws:
InvalidEntityExceptionNoSuchEntityException- if the client does not existIOException
-
getLibraryClient
LibraryClient getLibraryClient(ClientId clientId) throws NoSuchEntityException, InvalidEntityException, IOException
Get a client by its ID- Parameters:
clientId- the client ID- Returns:
- Throws:
NoSuchEntityException- if the client does not existsInvalidEntityException- if the client id is not validIOException
-
getLibraryClients
Set<LibraryClient> getLibraryClients(SolutionId solutionId) throws NoSuchEntityException, InvalidEntityException, IOException
Get a set of library clients by solution id- Parameters:
solutionId- Solution ID- Returns:
- Set of library clients
- Throws:
NoSuchEntityException- if the solution does not existInvalidEntityException- if the solution id is not validIOException
-
createOAuthClientDetails
OAuthClientDetailsDTO createOAuthClientDetails(LibraryClientResponseDTO libraryClient, String username) throws InvalidEntityException, ConflictingResourceException, IOException
Class returns created ClientDetails for an LibraryClient with the username of the Auhtentificated which is trying create it.- Parameters:
libraryClient-username-- Returns:
- Throws:
InvalidEntityException- if the library client is not validConflictingResourceException- if the library client already existsIOException
-
-