public class CustomerConnector extends ServiceConnector<ICustomerService>
ICustomerService
. Please see that class for documentation on the
RPC methods.ICustomerService
,
ServiceConnector
,
Customer
,
Address
,
Card
,
EmailAddress
,
Order
,
PhoneNumber
ServiceConnector.Callback<T>, ServiceConnector.OnServiceConnectedListener, ServiceConnector.ServiceCallable<S,T>, ServiceConnector.ServiceRunnable<S>
mAccount, mClient, mConnected, mContext, mHandler, mService
Constructor and Description |
---|
CustomerConnector(Context context,
Account account,
ServiceConnector.OnServiceConnectedListener client) |
Modifier and Type | Method and Description |
---|---|
Address |
addAddress(String customerId,
String address1,
String address2,
String address3,
String city,
String state,
String zip) |
Card |
addCard(String customerId,
Card card) |
EmailAddress |
addEmailAddress(String customerId,
String emailAddress) |
PhoneNumber |
addPhoneNumber(String customerId,
String phoneNumber) |
Customer |
createCustomer(String firstName,
String lastName,
boolean marketingAllowed) |
void |
deleteAddress(String customerId,
String addressId) |
void |
deleteCard(String customerId,
String cardId) |
void |
deleteCustomer(String customerId) |
void |
deleteEmailAddress(String customerId,
String emailAddressId) |
void |
deletePhoneNumber(String customerId,
String phoneNumberId) |
Customer |
getCustomer(String id) |
List<Customer> |
getCustomers() |
List<Customer> |
getCustomers(String query) |
protected String |
getServiceIntentAction() |
protected String |
getServiceIntentPackage()
The package which hosts the service to connect to.
|
protected int |
getServiceIntentVersion()
Connectors that are versioned include a version number in the action returned by
ServiceConnector.getServiceIntentAction() instead of using this mechanism. |
protected ICustomerService |
getServiceInterface(IBinder iBinder) |
void |
setAddress(String customerId,
String addressId,
String address1,
String address2,
String address3,
String city,
String state,
String zip) |
void |
setCard(String customerId,
String cardId,
Card card) |
void |
setEmailAddress(String customerId,
String emailAddressId,
String emailAddress) |
void |
setMarketingAllowed(String customerId,
boolean marketingAllowed) |
void |
setName(String customerId,
String firstName,
String lastName) |
void |
setPhoneNumber(String customerId,
String phoneNumberId,
String phoneNumber) |
connect, disconnect, execute, execute, execute, execute, getService, getStartIntent, isConnected, isInstalled, notifyServiceConnected, notifyServiceDisconnected, onServiceConnected, onServiceDisconnected, postResults, throwOnFailure, waitForConnection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onBindingDied, onNullBinding
public CustomerConnector(Context context, Account account, ServiceConnector.OnServiceConnectedListener client)
protected String getServiceIntentAction()
getServiceIntentAction
in class ServiceConnector<ICustomerService>
protected String getServiceIntentPackage()
ServiceConnector
getServiceIntentPackage
in class ServiceConnector<ICustomerService>
protected int getServiceIntentVersion()
ServiceConnector
ServiceConnector.getServiceIntentAction()
instead of using this mechanism.getServiceIntentVersion
in class ServiceConnector<ICustomerService>
protected ICustomerService getServiceInterface(IBinder iBinder)
getServiceInterface
in class ServiceConnector<ICustomerService>
public List<Customer> getCustomers(String query) throws ClientException, ServiceException, BindingException, RemoteException
public List<Customer> getCustomers() throws ClientException, ServiceException, BindingException, RemoteException
public Customer getCustomer(String id) throws ClientException, ServiceException, BindingException, RemoteException
public Customer createCustomer(String firstName, String lastName, boolean marketingAllowed) throws ClientException, ServiceException, BindingException, RemoteException
public void setName(String customerId, String firstName, String lastName) throws ClientException, ServiceException, BindingException, RemoteException
public void setMarketingAllowed(String customerId, boolean marketingAllowed) throws ClientException, ServiceException, BindingException, RemoteException
public PhoneNumber addPhoneNumber(String customerId, String phoneNumber) throws ClientException, ServiceException, BindingException, RemoteException
public void setPhoneNumber(String customerId, String phoneNumberId, String phoneNumber) throws ClientException, ServiceException, BindingException, RemoteException
public void deletePhoneNumber(String customerId, String phoneNumberId) throws ClientException, ServiceException, BindingException, RemoteException
public EmailAddress addEmailAddress(String customerId, String emailAddress) throws ClientException, ServiceException, BindingException, RemoteException
public void setEmailAddress(String customerId, String emailAddressId, String emailAddress) throws ClientException, ServiceException, BindingException, RemoteException
public void deleteEmailAddress(String customerId, String emailAddressId) throws ClientException, ServiceException, BindingException, RemoteException
public Address addAddress(String customerId, String address1, String address2, String address3, String city, String state, String zip) throws ClientException, ServiceException, BindingException, RemoteException
public void setAddress(String customerId, String addressId, String address1, String address2, String address3, String city, String state, String zip) throws ClientException, ServiceException, BindingException, RemoteException
public void deleteAddress(String customerId, String addressId) throws ClientException, ServiceException, BindingException, RemoteException
public void deleteCustomer(String customerId) throws ClientException, ServiceException, BindingException, RemoteException
public Card addCard(String customerId, Card card) throws ClientException, ServiceException, BindingException, RemoteException
public void setCard(String customerId, String cardId, Card card) throws ClientException, ServiceException, BindingException, RemoteException
public void deleteCard(String customerId, String cardId) throws ClientException, ServiceException, BindingException, RemoteException