Package io.vertigo.account.impl.account
Interface AccountCachePlugin
-
- All Superinterfaces:
io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Plugin
- All Known Implementing Classes:
MemoryAccountCachePlugin,RedisAccountCachePlugin
public interface AccountCachePlugin extends io.vertigo.core.node.component.Plugin- Author:
- pchretien
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidattach(io.vertigo.datamodel.structure.model.UID<Account> accountUID, Set<io.vertigo.datamodel.structure.model.UID<AccountGroup>> groupUID)Attaches an account to a group.voidattach(Set<io.vertigo.datamodel.structure.model.UID<Account>> accountsUID, io.vertigo.datamodel.structure.model.UID<AccountGroup> groupUID)Attaches an account to a group.Optional<Account>getAccount(io.vertigo.datamodel.structure.model.UID<Account> accountUID)Optional<Account>getAccountByAuthToken(String userAuthToken)Get an newly authentify user by his authToken.Set<io.vertigo.datamodel.structure.model.UID<Account>>getAccountUIDs(io.vertigo.datamodel.structure.model.UID<AccountGroup> groupUID)Lists the accounts for a defined group.Optional<AccountGroup>getGroup(io.vertigo.datamodel.structure.model.UID<AccountGroup> groupUID)Gets the group defined by an UID.Set<io.vertigo.datamodel.structure.model.UID<AccountGroup>>getGroupUIDs(io.vertigo.datamodel.structure.model.UID<Account> accountUID)Optional<VFile>getPhoto(io.vertigo.datamodel.structure.model.UID<Account> accountUID)Gets the photo of an account defined by its UID.voidputAccount(Account account)Saves an account.voidputGroup(AccountGroup group)Saves a group.voidreset()Reset: - All the accounts - All the groups - All the links accounts-group - All the PhotosvoidsetPhoto(io.vertigo.datamodel.structure.model.UID<Account> accountUID, VFile photo)Defines a photo to an account.
-
-
-
Method Detail
-
getAccount
Optional<Account> getAccount(io.vertigo.datamodel.structure.model.UID<Account> accountUID)
- Parameters:
accountUID- the account defined by its UID- Returns:
- the account
-
getGroupUIDs
Set<io.vertigo.datamodel.structure.model.UID<AccountGroup>> getGroupUIDs(io.vertigo.datamodel.structure.model.UID<Account> accountUID)
- Parameters:
accountUID- the account defined by its UID- Returns:
- Set of groups of this account
-
getGroup
Optional<AccountGroup> getGroup(io.vertigo.datamodel.structure.model.UID<AccountGroup> groupUID)
Gets the group defined by an UID.- Parameters:
groupUID- the group UID- Returns:
- the group
-
getAccountUIDs
Set<io.vertigo.datamodel.structure.model.UID<Account>> getAccountUIDs(io.vertigo.datamodel.structure.model.UID<AccountGroup> groupUID)
Lists the accounts for a defined group.- Parameters:
groupUID- the group UID- Returns:
- the list of acccounts.
-
getPhoto
Optional<VFile> getPhoto(io.vertigo.datamodel.structure.model.UID<Account> accountUID)
Gets the photo of an account defined by its UID.- Parameters:
accountUID- the account defined by its UID- Returns:
- the photo as a file
-
putAccount
void putAccount(Account account)
Saves an account. Caution : all the accounts must have an id.- Parameters:
account- account
-
putGroup
void putGroup(AccountGroup group)
Saves a group.- Parameters:
group- the group
-
attach
void attach(io.vertigo.datamodel.structure.model.UID<Account> accountUID, Set<io.vertigo.datamodel.structure.model.UID<AccountGroup>> groupUID)
Attaches an account to a group.- Parameters:
accountUID- the account defined by its UIDgroupUID- the group
-
attach
void attach(Set<io.vertigo.datamodel.structure.model.UID<Account>> accountsUID, io.vertigo.datamodel.structure.model.UID<AccountGroup> groupUID)
Attaches an account to a group.- Parameters:
accountsUID- the accounts defined by their UIDgroupUID- the group
-
reset
void reset()
Reset: - All the accounts - All the groups - All the links accounts-group - All the Photos
-
setPhoto
void setPhoto(io.vertigo.datamodel.structure.model.UID<Account> accountUID, VFile photo)
Defines a photo to an account.- Parameters:
accountUID- the account defined by its UIDphoto- the photo
-
-