Interface AccountArchiveService
- All Superinterfaces:
net.anotheria.anoprise.metafactory.Service
- All Known Implementing Classes:
AccountArchiveServiceImpl,RemoteAccountArchiveServiceStub
@DistributeMe
@FailBy(strategyClass=org.distributeme.core.failing.RetryCallOnce.class)
public interface AccountArchiveService
extends net.anotheria.anoprise.metafactory.Service
Interface to account archive service which stores deleted accounts.
- Since:
- 21.04.14 18:40
- Author:
- VKoulakov
-
Method Summary
Modifier and TypeMethodDescriptioncreateAccount(ArchivedAccount toUpdate) Creates a new archived account.voiddeleteAccount(net.anotheria.portalkit.services.common.AccountId accountId) Deletes archived account from database.voiddeleteAccountsByEmail(String pattern) Deletes archived accounts from database whose emails match pattern.getAccount(net.anotheria.portalkit.services.common.AccountId accountId) Returns an account by it's id.getAccountByEmail(String email) getAccountByName(String name) getAccounts(List<net.anotheria.portalkit.services.common.AccountId> accountId) Returns a list of archived accounts for given list of identities.getCustomNote(net.anotheria.portalkit.services.common.AccountId accountId) Get custom note by account id.voidsaveCustomNote(net.anotheria.portalkit.services.common.AccountId accountId, String customNote) Save custom note by account id.voidupdateAccount(ArchivedAccount toUpdate) Updates acrchived account.
-
Method Details
-
getAccount
ArchivedAccount getAccount(net.anotheria.portalkit.services.common.AccountId accountId) throws AccountArchiveServiceException Returns an account by it's id.- Parameters:
accountId- account id. id of account to find- Returns:
- archived account
- Throws:
AccountArchiveServiceException- if error.
-
getAccounts
List<ArchivedAccount> getAccounts(List<net.anotheria.portalkit.services.common.AccountId> accountId) throws AccountArchiveServiceException Returns a list of archived accounts for given list of identities.- Parameters:
accountId- account id.- Returns:
- list of
ArchivedAccount - Throws:
AccountArchiveServiceException- if error.
-
deleteAccount
void deleteAccount(net.anotheria.portalkit.services.common.AccountId accountId) throws AccountArchiveServiceException Deletes archived account from database.- Parameters:
accountId- account id.- Throws:
AccountArchiveServiceException- if error.
-
deleteAccountsByEmail
Deletes archived accounts from database whose emails match pattern.- Parameters:
pattern- email pattern string- Throws:
AccountArchiveServiceException
-
updateAccount
Updates acrchived account.- Parameters:
toUpdate- archive to update.- Throws:
AccountArchiveServiceException- if error.
-
createAccount
Creates a new archived account.- Parameters:
toUpdate- archive to update.- Returns:
ArchivedAccount- Throws:
AccountArchiveServiceException- if error.
-
getCustomNote
String getCustomNote(net.anotheria.portalkit.services.common.AccountId accountId) throws AccountArchiveServiceException Get custom note by account id.- Parameters:
accountId- account id- Returns:
- custom note
- Throws:
AccountArchiveServiceException- if error
-
saveCustomNote
void saveCustomNote(net.anotheria.portalkit.services.common.AccountId accountId, String customNote) throws AccountArchiveServiceException Save custom note by account id.- Parameters:
accountId- account idcustomNote- custom note- Throws:
AccountArchiveServiceException- if error
-
getAccountByName
- Parameters:
name- account name.- Returns:
ArchivedAccount- Throws:
AccountArchiveServiceException- if error.
-
getAccountByEmail
- Parameters:
email- account email.- Returns:
ArchivedAccount- Throws:
AccountArchiveServiceException- if error.
-
getAllAccounts
- Returns:
- list of
ArchivedAccount - Throws:
AccountArchiveServiceException- if error.
-
getAccountsByQuery
List<ArchivedAccount> getAccountsByQuery(ArchivedAccountQuery query) throws AccountArchiveServiceException - Parameters:
query-ArchivedAccountQuery- Returns:
- list of
ArchivedAccount - Throws:
AccountArchiveServiceException- if error.
-