Package de.xima.fc.api.entity
Class MandantAPI
- java.lang.Object
 - 
- de.xima.fc.api.ASubAPI
 - 
- de.xima.fc.api.entity.AEntityAPI<Mandant>
 - 
- de.xima.fc.api.entity.MandantAPI
 
 
 
 
- 
public class MandantAPI extends AEntityAPI<Mandant>
API class for manipulation ofMandantentities.- Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Field Summary
- 
Fields inherited from class de.xima.fc.api.entity.AEntityAPI
entityClass 
 - 
 
- 
Constructor Summary
Constructors Constructor Description MandantAPI() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Mandant>getAllByName(UserContext uc, String name)Method for determining allMandants by name (case-insensitive).MandantgetByName(UserContext uc, String name)Method for determining aMandantby his name (case-insensitive).MandantgetByUUID(UserContext uc, String uuid)MandantgetByUUID(UserContext uc, UUID uuid)@NotNull Map<String,String>getCustomAttributes(UserContext uc, Mandant client)Gets the custom properties of this client.booleanisCreationAllowed(UserContext uc, Mandant mandant)Method for checking if the creation of aMandantis allowed.voidupdateClientLastUserLogin(org.pac4j.core.profile.UserProfile profile)Updates theMandant.getLastUserLogin()property to the current date, for allclientsthat the given user can access.- 
Methods inherited from class de.xima.fc.api.entity.AEntityAPI
create, create, delete, delete, deleteAllBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getEntityRefs, getPagedResult, getSingleAttributes, getSingleAttributes, resultTotalCount, resultTotalCount, update, update 
- 
Methods inherited from class de.xima.fc.api.ASubAPI
getHandlerProvider 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getByName
public Mandant getByName(UserContext uc, String name)
Method for determining aMandantby his name (case-insensitive).- Parameters:
 uc-UserContextthe user context in which the action is to be performed.name-Stringthe name of theMandant(case-insensitive).- Returns:
 Mandantwhich was searched.- Since:
 - 2.4.3
 
 
- 
getAllByName
public List<Mandant> getAllByName(UserContext uc, String name)
Method for determining allMandants by name (case-insensitive).- Parameters:
 uc-UserContextthe user context in which the action is to be performed.name-Stringthe name which is to searched (case-insensitive).- Returns:
 ListofMandantwhich were found.- Since:
 - 2.4.3
 
 
- 
getCustomAttributes
@NotNull public @NotNull Map<String,String> getCustomAttributes(UserContext uc, Mandant client)
Gets the custom properties of this client. This method is needed when the map of the custom properties hasn't yet been initialized.- Parameters:
 uc- User context for database transactions.client- the client to get the custom properties for.- Returns:
 - a map of all the custom properties of the client.
 - Since:
 - 8.0.0
 
 
- 
getByUUID
public Mandant getByUUID(UserContext uc, String uuid)
 
- 
getByUUID
public Mandant getByUUID(UserContext uc, UUID uuid)
 
- 
isCreationAllowed
public boolean isCreationAllowed(UserContext uc, Mandant mandant)
Method for checking if the creation of aMandantis allowed.- Parameters:
 uc-UserContextthe user context in which the action is to be performed.mandant-Mandantwhich is to check.- Returns:
 Booleanif the creation is allowed true, otherwise false.
 
- 
updateClientLastUserLogin
public void updateClientLastUserLogin(org.pac4j.core.profile.UserProfile profile)
Updates theMandant.getLastUserLogin()property to the current date, for allclientsthat the given user can access. This method should be called after a login.- Parameters:
 profile- Profile of a user that has logged in.
 
 - 
 
 -