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
-
public class ClientService extends CayenneService
Provides a client service which handles client creation and deletion.- See Also:
Client
-
-
Constructor Summary
Constructors Constructor Description ClientService()
Package private constructor to enforce ServiceFactory pattern.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Client
createNewClient(String name, String code)
Create a new client given the client name and client code.String
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 portals-
Methods 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
-
-
-
-
Method Detail
-
createNewClient
public Client createNewClient(String name, String code)
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
public String generateNormalizedCode(String clientCode)
Return the generated normalised client code from a client code- Parameters:
clientCode
- a client code- Returns:
- the generated normalised client code
- See Also:
FormatUtils.generateNormalizedString(String)
-
updateClientPortals
public void updateClientPortals(Client client, List<Long> newPortalIds)
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
-
-