public class Accounts extends AbstractImpl
| Modifier and Type | Class and Description |
|---|---|
static interface |
Accounts.AddressFilter
Callback interface for filtering addresses.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
FAX_BUSINESS |
static int |
FAX_HOME |
static int |
MAIL_BUSINESS |
static int |
MAIL_HOME |
static int |
MAIL_OTHER |
static short |
MEMBER_QUALITY_NORMAL |
static short |
MEMBER_ROLE_ASSISTANT |
static short |
MEMBER_ROLE_EMPLOYEE |
static int |
MOBILE |
static int |
PHONE_BUSINESS |
static int |
PHONE_HOME |
static int |
PHONE_OTHER |
static int |
POSTAL_BUSINESS |
static int |
POSTAL_HOME |
static int |
WEB_BUSINESS |
static int |
WEB_HOME |
| Modifier | Constructor and Description |
|---|---|
protected |
Accounts()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
CheckForAutoUpdateResult |
checkForAutoUpdate(AccountAddress address)
Check whether address qualifies for auto-update.
|
int |
countFilteredAccount(AbstractFilterAccount accountFilter)
Count accounts matching the account filter.
|
int |
countFilteredAddress(AbstractFilterAddress addressFilter)
Count addresses matching the given filter.
|
Invoice |
createInvoice(Account account,
String name,
String description,
Invoice basedOn)
Deprecated.
use contract creators instead
|
Lead |
createLead(Account account,
String name,
String description,
String nextStep,
Lead basedOn)
Deprecated.
use contract creators instead
|
Opportunity |
createOpportunity(Account account,
String name,
String description,
String nextStep,
Opportunity basedOn)
Deprecated.
use contract creators instead
|
Quote |
createQuote(Account account,
String name,
String description,
Quote basedOn)
Deprecated.
use contract creators instead
|
SalesOrder |
createSalesOrder(Account account,
String name,
String description,
SalesOrder basedOn)
Deprecated.
use contract creators instead
|
AccountAddress[] |
getAccountAddresses(Account account,
Accounts.AddressFilter addressFilter,
boolean strict)
Return home and business addresses of given account matching the specified address filter.
|
List<AccountAddress> |
getAccountAddresses(Account account,
short usage)
Get addresses of given account.
|
Segment |
getAccountSegment(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName)
Get account segment.
|
static Accounts |
getInstance()
Get Accounts backend instance.
|
AccountAddress[] |
getMainAddresses(Account account)
Same as getMainAddresses(account, false)
|
AccountAddress[] |
getMainAddresses(Account account,
boolean strict)
Return main home and business addresses of given account.
|
List<Account> |
getMatchingAccounts(Segment accountSegment,
AccountQuery accountQuery,
String fullName,
String firstName,
String lastName,
String aliasName,
String phoneNumberMobile,
String phoneNumberHome,
String phoneNumberBusiness,
String postalCityHome,
String postalCityBusiness,
List<String> postalStreetHome,
List<String> postalStreetBusiness,
String emailHome,
String emailBusiness)
Get matching contacts.
|
String |
getPrimaryBusinessEMail(Account account,
String hint)
Get primary business email address.
|
String |
getPrimaryBusinessPhone(Account account)
Get primary business phone of given account.
|
Account |
getUnassignableAddressesHolder(Segment accountSegment)
Get holder for new addresses which can not be automatically be assigned to an account.
|
void |
initContract(SalesContract contract,
Account account,
String name,
String description)
Deprecated.
use contract creators instead.
|
List<EMailAddress> |
lookupEmailAddress(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName,
String emailAddress)
Find email addresses matching the given pattern.
|
List<EMailAddress> |
lookupEmailAddress(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName,
String emailAddress,
boolean exactCaseInsensitiveOnly)
Find email addresses matching the given pattern.
|
List<EMailAddress> |
lookupEmailAddress(javax.jdo.PersistenceManager pm,
String providerName,
String segmentName,
String email,
boolean exactCaseInsensitiveOnly,
boolean forceCreate)
Find email addresses matching the given pattern.
|
void |
markAccountAsDirty(Account account)
Touch account.
|
int |
moveAddress(AccountAddress source,
AccountAddress target,
Date updateRelationshipsSince,
Date updateRelationshipsBefore)
Replace all references to the source address with the target address.
|
int |
moveAddressToAccount(AccountAddress source,
Account targetAccount,
Date updateRelationshipsSince,
Date updateRelationshipsBefore)
Move address to target account.
|
void |
preDelete(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object,
boolean preDelete)
Pre-delete callback.
|
void |
preStore(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
Pre-store callback.
|
static void |
register()
Register Accounts backend instance.
|
protected void |
removeAccount(Account account,
boolean preDelete)
Callback for removing an account.
|
protected void |
removeAddress(AccountAddress address,
boolean preDelete)
Callback when address is removed, e.g.
|
protected void |
updateAccount(Account account)
Update derived attributes of given account.
|
void |
updateAccountFullName(Account account)
Update derived attribute full name of given account.
|
protected void |
updateAddress(AccountAddress address)
Update derived attributes of given address.
|
void |
updateAssignedAddresses(AccountAddress address)
Update the addresses assigned to the given address.
|
protected void |
updateMember(Member member)
Update member callback.
|
void |
updatePostalAddressLine(Account account)
Update postal address lines which are derived from account information.
|
void |
updateVcard(Account account)
Update VCARD of given account.
|
getInstance, getUidAsString, registerImplpublic static final int MAIL_BUSINESS
public static final int MAIL_HOME
public static final int PHONE_BUSINESS
public static final int PHONE_HOME
public static final int FAX_BUSINESS
public static final int FAX_HOME
public static final int POSTAL_BUSINESS
public static final int WEB_BUSINESS
public static final int POSTAL_HOME
public static final int WEB_HOME
public static final int MOBILE
public static final int PHONE_OTHER
public static final int MAIL_OTHER
public static final short MEMBER_ROLE_EMPLOYEE
public static final short MEMBER_ROLE_ASSISTANT
public static final short MEMBER_QUALITY_NORMAL
public static void register()
public static Accounts getInstance() throws org.openmdx.base.exception.ServiceException
org.openmdx.base.exception.ServiceExceptionpublic void markAccountAsDirty(Account account) throws org.openmdx.base.exception.ServiceException
account - org.openmdx.base.exception.ServiceExceptionpublic void initContract(SalesContract contract, Account account, String name, String description) throws org.openmdx.base.exception.ServiceException
contract - account - name - description - org.openmdx.base.exception.ServiceExceptionpublic Lead createLead(Account account, String name, String description, String nextStep, Lead basedOn) throws org.openmdx.base.exception.ServiceException
account - name - description - nextStep - basedOn - org.openmdx.base.exception.ServiceExceptionpublic Opportunity createOpportunity(Account account, String name, String description, String nextStep, Opportunity basedOn) throws org.openmdx.base.exception.ServiceException
account - name - description - nextStep - basedOn - org.openmdx.base.exception.ServiceExceptionpublic Quote createQuote(Account account, String name, String description, Quote basedOn) throws org.openmdx.base.exception.ServiceException
account - name - description - basedOn - org.openmdx.base.exception.ServiceExceptionpublic SalesOrder createSalesOrder(Account account, String name, String description, SalesOrder basedOn) throws org.openmdx.base.exception.ServiceException
account - name - description - basedOn - org.openmdx.base.exception.ServiceExceptionpublic Invoice createInvoice(Account account, String name, String description, Invoice basedOn) throws org.openmdx.base.exception.ServiceException
account - name - description - basedOn - org.openmdx.base.exception.ServiceExceptionpublic void updateAccountFullName(Account account) throws org.openmdx.base.exception.ServiceException
account - org.openmdx.base.exception.ServiceExceptionpublic void updatePostalAddressLine(Account account) throws org.openmdx.base.exception.ServiceException
account - org.openmdx.base.exception.ServiceExceptionpublic void updateAssignedAddresses(AccountAddress address) throws org.openmdx.base.exception.ServiceException
address - org.openmdx.base.exception.ServiceExceptionprotected void updateAccount(Account account) throws org.openmdx.base.exception.ServiceException
account - org.openmdx.base.exception.ServiceExceptionprotected void updateAddress(AccountAddress address) throws org.openmdx.base.exception.ServiceException
address - org.openmdx.base.exception.ServiceExceptionprotected void removeAddress(AccountAddress address, boolean preDelete) throws org.openmdx.base.exception.ServiceException
address - preDelete - org.openmdx.base.exception.ServiceExceptionpublic int countFilteredAccount(AbstractFilterAccount accountFilter) throws org.openmdx.base.exception.ServiceException
accountFilter - org.openmdx.base.exception.ServiceExceptionpublic Segment getAccountSegment(javax.jdo.PersistenceManager pm, String providerName, String segmentName)
pm - providerName - segmentName - public List<EMailAddress> lookupEmailAddress(javax.jdo.PersistenceManager pm, String providerName, String segmentName, String emailAddress)
pm - providerName - segmentName - emailAddress - public List<EMailAddress> lookupEmailAddress(javax.jdo.PersistenceManager pm, String providerName, String segmentName, String emailAddress, boolean exactCaseInsensitiveOnly)
pm - providerName - segmentName - emailAddress - exactCaseInsensitiveOnly - public Account getUnassignableAddressesHolder(Segment accountSegment) throws org.openmdx.base.exception.ServiceException
accountSegment - org.openmdx.base.exception.ServiceExceptionpublic List<EMailAddress> lookupEmailAddress(javax.jdo.PersistenceManager pm, String providerName, String segmentName, String email, boolean exactCaseInsensitiveOnly, boolean forceCreate) throws org.openmdx.base.exception.ServiceException
pm - providerName - segmentName - email - exactCaseInsensitiveOnly - forceCreate - org.openmdx.base.exception.ServiceExceptionpublic List<AccountAddress> getAccountAddresses(Account account, short usage)
account - usage - public String getPrimaryBusinessEMail(Account account, String hint) throws org.openmdx.base.exception.ServiceException
account - hint - org.openmdx.base.exception.ServiceExceptionpublic String getPrimaryBusinessPhone(Account account) throws org.openmdx.base.exception.ServiceException
account - org.openmdx.base.exception.ServiceExceptionpublic AccountAddress[] getMainAddresses(Account account)
account - public AccountAddress[] getMainAddresses(Account account, boolean strict)
account - strict - public AccountAddress[] getAccountAddresses(Account account, Accounts.AddressFilter addressFilter, boolean strict)
account - addressFilter - strict - public void updateVcard(Account account) throws org.openmdx.base.exception.ServiceException
account - org.openmdx.base.exception.ServiceExceptionprotected void updateMember(Member member) throws org.openmdx.base.exception.ServiceException
member - org.openmdx.base.exception.ServiceExceptionpublic int countFilteredAddress(AbstractFilterAddress addressFilter) throws org.openmdx.base.exception.ServiceException
addressFilter - org.openmdx.base.exception.ServiceExceptionpublic int moveAddressToAccount(AccountAddress source, Account targetAccount, Date updateRelationshipsSince, Date updateRelationshipsBefore) throws org.openmdx.base.exception.ServiceException
source - targetAccount - updateRelationshipsSince - updateRelationshipsBefore - org.openmdx.base.exception.ServiceExceptionpublic int moveAddress(AccountAddress source, AccountAddress target, Date updateRelationshipsSince, Date updateRelationshipsBefore) throws org.openmdx.base.exception.ServiceException
source - target - updateRelationshipsSince - updateRelationshipsBefore - org.openmdx.base.exception.ServiceExceptionpublic CheckForAutoUpdateResult checkForAutoUpdate(AccountAddress address)
address - protected void removeAccount(Account account, boolean preDelete) throws org.openmdx.base.exception.ServiceException
account - preDelete - org.openmdx.base.exception.ServiceExceptionpublic List<Account> getMatchingAccounts(Segment accountSegment, AccountQuery accountQuery, String fullName, String firstName, String lastName, String aliasName, String phoneNumberMobile, String phoneNumberHome, String phoneNumberBusiness, String postalCityHome, String postalCityBusiness, List<String> postalStreetHome, List<String> postalStreetBusiness, String emailHome, String emailBusiness) throws org.openmdx.base.exception.ServiceException
accountSegment - accountQuery - firstName - lastName - aliasName - phoneNumberMobile - phoneNumberHome - phoneNumberBusiness - postalCityHome - postalCityBusiness - postalStreetHome - postalStreetBusiness - emailHome - emailBusiness - org.openmdx.base.exception.ServiceExceptionpublic void preDelete(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object,
boolean preDelete)
throws org.openmdx.base.exception.ServiceException
AbstractImplpreDelete in class AbstractImplorg.openmdx.base.exception.ServiceExceptionpublic void preStore(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object)
throws org.openmdx.base.exception.ServiceException
AbstractImplpreStore in class AbstractImplorg.openmdx.base.exception.ServiceExceptionThis software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.