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
|
AccountFilterGlobal |
findAccountFilter(String accountFilterName,
Segment segment)
Find account filter.
|
AddressFilterGlobal |
findAddressFilter(String accountFilterName,
Segment segment)
Find address filter.
|
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.
|
AccountFilterGlobal |
initAccountFilter(String filterName,
AccountFilterProperty[] filterProperties,
Segment segment,
List<PrincipalGroup> allUsers)
Init account filter.
|
AddressFilterGlobal |
initAddressFilter(String filterName,
AddressFilterProperty[] filterProperties,
Segment segment,
List<PrincipalGroup> allUsers)
Init address filter.
|
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.
|
protected void |
updateSearchAddressFields(Account account)
Update search address fields on account.
|
void |
updateVcard(Account account)
Update VCARD of given account.
|
protected void |
updateVCard(Account account,
List<String> statusMessage)
Update account's vcard.
|
getInstance, getPersistenceManager, getUidAsString, registerImpl
public 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.ServiceException
public void markAccountAsDirty(Account account) throws org.openmdx.base.exception.ServiceException
account
- org.openmdx.base.exception.ServiceException
public void initContract(SalesContract contract, Account account, String name, String description) throws org.openmdx.base.exception.ServiceException
contract
- account
- name
- description
- org.openmdx.base.exception.ServiceException
public 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.ServiceException
public 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.ServiceException
public Quote createQuote(Account account, String name, String description, Quote basedOn) throws org.openmdx.base.exception.ServiceException
account
- name
- description
- basedOn
- org.openmdx.base.exception.ServiceException
public SalesOrder createSalesOrder(Account account, String name, String description, SalesOrder basedOn) throws org.openmdx.base.exception.ServiceException
account
- name
- description
- basedOn
- org.openmdx.base.exception.ServiceException
public Invoice createInvoice(Account account, String name, String description, Invoice basedOn) throws org.openmdx.base.exception.ServiceException
account
- name
- description
- basedOn
- org.openmdx.base.exception.ServiceException
public AccountFilterGlobal findAccountFilter(String accountFilterName, Segment segment)
accountFilterName
- segment
- pm
- public AddressFilterGlobal findAddressFilter(String accountFilterName, Segment segment)
accountFilterName
- segment
- pm
- public AccountFilterGlobal initAccountFilter(String filterName, AccountFilterProperty[] filterProperties, Segment segment, List<PrincipalGroup> allUsers)
filterName
- filterProperties
- pm
- segment
- allUsers
- public AddressFilterGlobal initAddressFilter(String filterName, AddressFilterProperty[] filterProperties, Segment segment, List<PrincipalGroup> allUsers)
filterName
- filterProperties
- pm
- segment
- allUsers
- public void updateAccountFullName(Account account) throws org.openmdx.base.exception.ServiceException
account
- org.openmdx.base.exception.ServiceException
public void updatePostalAddressLine(Account account) throws org.openmdx.base.exception.ServiceException
account
- org.openmdx.base.exception.ServiceException
public void updateAssignedAddresses(AccountAddress address) throws org.openmdx.base.exception.ServiceException
address
- org.openmdx.base.exception.ServiceException
protected void updateSearchAddressFields(Account account) throws org.openmdx.base.exception.ServiceException
account
- org.openmdx.base.exception.ServiceException
protected void updateVCard(Account account, List<String> statusMessage) throws org.openmdx.base.exception.ServiceException
account
- statusMessage
- org.openmdx.base.exception.ServiceException
protected void updateAccount(Account account) throws org.openmdx.base.exception.ServiceException
account
- org.openmdx.base.exception.ServiceException
protected void updateAddress(AccountAddress address) throws org.openmdx.base.exception.ServiceException
address
- org.openmdx.base.exception.ServiceException
protected void removeAddress(AccountAddress address, boolean preDelete) throws org.openmdx.base.exception.ServiceException
address
- preDelete
- org.openmdx.base.exception.ServiceException
public int countFilteredAccount(AbstractFilterAccount accountFilter) throws org.openmdx.base.exception.ServiceException
accountFilter
- org.openmdx.base.exception.ServiceException
public 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.ServiceException
public 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.ServiceException
public 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.ServiceException
public String getPrimaryBusinessPhone(Account account) throws org.openmdx.base.exception.ServiceException
account
- org.openmdx.base.exception.ServiceException
public 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.ServiceException
protected void updateMember(Member member) throws org.openmdx.base.exception.ServiceException
member
- org.openmdx.base.exception.ServiceException
public int countFilteredAddress(AbstractFilterAddress addressFilter) throws org.openmdx.base.exception.ServiceException
addressFilter
- org.openmdx.base.exception.ServiceException
public int moveAddressToAccount(AccountAddress source, Account targetAccount, Date updateRelationshipsSince, Date updateRelationshipsBefore) throws org.openmdx.base.exception.ServiceException
source
- targetAccount
- updateRelationshipsSince
- updateRelationshipsBefore
- org.openmdx.base.exception.ServiceException
public int moveAddress(AccountAddress source, AccountAddress target, Date updateRelationshipsSince, Date updateRelationshipsBefore) throws org.openmdx.base.exception.ServiceException
source
- target
- updateRelationshipsSince
- updateRelationshipsBefore
- org.openmdx.base.exception.ServiceException
public CheckForAutoUpdateResult checkForAutoUpdate(AccountAddress address)
address
- protected void removeAccount(Account account, boolean preDelete) throws org.openmdx.base.exception.ServiceException
account
- preDelete
- org.openmdx.base.exception.ServiceException
public 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.ServiceException
public void preDelete(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object, boolean preDelete) throws org.openmdx.base.exception.ServiceException
AbstractImpl
preDelete
in class AbstractImpl
org.openmdx.base.exception.ServiceException
public void preStore(org.openmdx.base.accessor.jmi.cci.RefObject_1_0 object) throws org.openmdx.base.exception.ServiceException
AbstractImpl
preStore
in class AbstractImpl
org.openmdx.base.exception.ServiceException
This software is published under the BSD license. Copyright © 2003-${build.year}, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.