Package org.cyclos.services.access
Interface AccessClientService
-
- All Superinterfaces:
CRUDService<AccessClientDTO,AccessClientData,AccessClientDataParams>,Service
public interface AccessClientService extends CRUDService<AccessClientDTO,AccessClientData,AccessClientDataParams>
Service interface used for managing access clients
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ActivateAccessClientDTOactivate(@NotNull String activationCode, String prefix)Activates an access client for the current user, using the given activation code.voidblock(@NotNull AccessClientActionParams params)Blocks the given an access clientStringgetActivationCode(@NotNull AccessClientActionParams params)Returns the code which can be used to activate the access client, connecting an applicationAccessClientsListDatagetListData(@NotNull PrincipalTypeVO principalType, @NotNull UserLocatorVO user)Returns data for listing access clients of a given type and userAccessClientsSearchDatagetSearchData()Returns data for searching access clientsList<AccessClientTypeData>getTypeData(@NotNull UserLocatorVO user, ChannelVO channel)Returns data each access client type the authenticated user can see for the given user.AccessClientVOlocate(@NotNull AccessClientLocatorVO locator)Returns an access client by either id or token, but only if it belongs (or is managed by) the authenticated userPage<AccessClientDetailedVO>search(@NotNull AccessClientQuery query)Searches for access clients according to the given criteriavoidunassign(@NotNull AccessClientActionParams params)Unassigns the given access client from its connected applicationbooleanunassignCurrent(ActionWithConfirmationPassword action)Unassigns the access client in the current authorization.voidunblock(@NotNull AccessClientActionParams params)Unblocks the given access client-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
-
-
-
Method Detail
-
activate
ActivateAccessClientDTO activate(@NotNull @NotNull String activationCode, String prefix) throws FrameworkException
Activates an access client for the current user, using the given activation code. It is possible to pass in a prefix (optional) to have it appended before the activation code itself. Returns a dto containing the principal type and a token which is then used to identify the remote application. The prefix is not returned. So, if for example, "123" is passed as prefix, and "ABCDEF", the token needed to be used on web service requests will be "123ABCDEF", but only "ABCDEF" is returned. If the prefix is null, no prefix is used.- Throws:
FrameworkException
-
block
void block(@NotNull @NotNull AccessClientActionParams params) throws FrameworkExceptionBlocks the given an access client- Throws:
IllegalActionException- When the status is not activeFrameworkException
-
getActivationCode
String getActivationCode(@NotNull @NotNull AccessClientActionParams params) throws FrameworkException
Returns the code which can be used to activate the access client, connecting an application- Throws:
IllegalActionException- When the status is not unassignedFrameworkException
-
getListData
AccessClientsListData getListData(@NotNull @NotNull PrincipalTypeVO principalType, @NotNull @NotNull UserLocatorVO user) throws FrameworkException
Returns data for listing access clients of a given type and user- Throws:
FrameworkException
-
getSearchData
AccessClientsSearchData getSearchData() throws FrameworkException
Returns data for searching access clients- Throws:
FrameworkException
-
getTypeData
List<AccessClientTypeData> getTypeData(@NotNull @NotNull UserLocatorVO user, ChannelVO channel) throws FrameworkException
Returns data each access client type the authenticated user can see for the given user. If a channel is passed in, will only return types that can be used to access it.- Throws:
FrameworkException
-
locate
AccessClientVO locate(@NotNull @NotNull AccessClientLocatorVO locator) throws FrameworkException
Returns an access client by either id or token, but only if it belongs (or is managed by) the authenticated user- Throws:
FrameworkException
-
search
Page<AccessClientDetailedVO> search(@NotNull @NotNull AccessClientQuery query) throws FrameworkException
Searches for access clients according to the given criteria- Throws:
FrameworkException
-
unassign
void unassign(@NotNull @NotNull AccessClientActionParams params) throws FrameworkExceptionUnassigns the given access client from its connected application- Throws:
IllegalActionException- When the status is unassignedFrameworkException
-
unassignCurrent
boolean unassignCurrent(ActionWithConfirmationPassword action) throws FrameworkException
Unassigns the access client in the current authorization. No-op if not authorized as an access client. Returns true if an access client was found associated to the current session.- Throws:
FrameworkException
-
unblock
void unblock(@NotNull @NotNull AccessClientActionParams params) throws FrameworkExceptionUnblocks the given access client- Throws:
IllegalActionException- When the status is not blockedFrameworkException
-
-