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.ServiceInterface to account archive service which stores deleted accounts.- Since:
- 21.04.14 18:40
- Author:
- VKoulakov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ArchivedAccountcreateAccount(ArchivedAccount toUpdate)Creates a new archived account.voiddeleteAccount(net.anotheria.portalkit.services.common.AccountId accountId)Deletes archived account from database.voiddeleteAccountsByEmail(java.lang.String pattern)Deletes archived accounts from database whose emails match pattern.ArchivedAccountgetAccount(net.anotheria.portalkit.services.common.AccountId accountId)Returns an account by it's id.ArchivedAccountgetAccountByEmail(java.lang.String email)ArchivedAccountgetAccountByName(java.lang.String name)java.util.List<ArchivedAccount>getAccounts(java.util.List<net.anotheria.portalkit.services.common.AccountId> accountId)Returns a list of archived accounts for given list of identities.java.util.List<ArchivedAccount>getAccountsByQuery(ArchivedAccountQuery query)java.util.List<ArchivedAccount>getAllAccounts()java.lang.StringgetCustomNote(net.anotheria.portalkit.services.common.AccountId accountId)Get custom note by account id.voidsaveCustomNote(net.anotheria.portalkit.services.common.AccountId accountId, java.lang.String customNote)Save custom note by account id.voidupdateAccount(ArchivedAccount toUpdate)Updates acrchived account.
-
-
-
Method Detail
-
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
java.util.List<ArchivedAccount> getAccounts(java.util.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 AccountArchiveServiceExceptionDeletes archived account from database.- Parameters:
accountId- account id.- Throws:
AccountArchiveServiceException- if error.
-
deleteAccountsByEmail
void deleteAccountsByEmail(java.lang.String pattern) throws AccountArchiveServiceExceptionDeletes archived accounts from database whose emails match pattern.- Parameters:
pattern- email pattern string- Throws:
AccountArchiveServiceException
-
updateAccount
void updateAccount(ArchivedAccount toUpdate) throws AccountArchiveServiceException
Updates acrchived account.- Parameters:
toUpdate- archive to update.- Throws:
AccountArchiveServiceException- if error.
-
createAccount
ArchivedAccount createAccount(ArchivedAccount toUpdate) throws AccountArchiveServiceException
Creates a new archived account.- Parameters:
toUpdate- archive to update.- Returns:
ArchivedAccount- Throws:
AccountArchiveServiceException- if error.
-
getCustomNote
java.lang.String getCustomNote(net.anotheria.portalkit.services.common.AccountId accountId) throws AccountArchiveServiceExceptionGet 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, java.lang.String customNote) throws AccountArchiveServiceExceptionSave custom note by account id.- Parameters:
accountId- account idcustomNote- custom note- Throws:
AccountArchiveServiceException- if error
-
getAccountByName
ArchivedAccount getAccountByName(java.lang.String name) throws AccountArchiveServiceException
- Parameters:
name- account name.- Returns:
ArchivedAccount- Throws:
AccountArchiveServiceException- if error.
-
getAccountByEmail
ArchivedAccount getAccountByEmail(java.lang.String email) throws AccountArchiveServiceException
- Parameters:
email- account email.- Returns:
ArchivedAccount- Throws:
AccountArchiveServiceException- if error.
-
getAllAccounts
java.util.List<ArchivedAccount> getAllAccounts() throws AccountArchiveServiceException
- Returns:
- list of
ArchivedAccount - Throws:
AccountArchiveServiceException- if error.
-
getAccountsByQuery
java.util.List<ArchivedAccount> getAccountsByQuery(ArchivedAccountQuery query) throws AccountArchiveServiceException
- Parameters:
query-ArchivedAccountQuery- Returns:
- list of
ArchivedAccount - Throws:
AccountArchiveServiceException- if error.
-
-