Package com.avoka.fc.core.service
Class ClientService
java.lang.Object
com.avoka.fc.core.service.BaseService
com.avoka.fc.core.service.CayenneService
com.avoka.fc.core.service.ClientService
Provides a client service which handles client creation and deletion.
- See Also:
-
Constructor Summary
ConstructorDescriptionPackage private constructor to enforce ServiceFactory pattern. -
Method Summary
Modifier and TypeMethodDescriptioncreateNewClient
(String name, String code) Create a new client given the client name and client code.generateNormalizedCode
(String clientCode) Return the generated normalised client code from a client codevoid
updateClientPortals
(Client client, List<Long> newPortalIds) Update the client to be associated with the given set of portalsMethods inherited from class com.avoka.fc.core.service.CayenneService
commitChanges, deleteObject, deleteObjects, findObject, getDataContext, getDataDomain, getObjectForPK, getObjectStore, newObject, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, refetchEntity, refetchObject, registerNewObject, rollbackChanges, toMap, toMap
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Constructor Details
-
ClientService
public ClientService()Package private constructor to enforce ServiceFactory pattern.
-
-
Method Details
-
createNewClient
Create a new client given the client name and client code. Note that this method contains database transactions.- Parameters:
name
- a client namecode
- a client code- Returns:
- the created client
-
generateNormalizedCode
Return the generated normalised client code from a client code- Parameters:
clientCode
- a client code- Returns:
- the generated normalised client code
- See Also:
-
updateClientPortals
Update the client to be associated with the given set of portals- Parameters:
client
- the client (required)newPortalIds
- the list of portal IDs that the client should be associated with (required, may be empty)- Since:
- 19.05.0
-