public interface AddressManager
AddressManager
provides methods to retrieve, update, create and update addresses.Modifier and Type | Method and Description |
---|---|
Address |
addAddress(String userID,
Map<String,Object> properties,
boolean autoSave)
Adds an address to the user.
|
Address |
getAddress(String userID,
String path)
Returns the address based on its path.
|
Collection<Address> |
getAddresses(String userID)
Returns the addresses belonging to a user.
|
Address |
getDefaultAddress(String userID)
Returns the generic default address of the user.
|
Address |
getDefaultAddress(String userID,
String type)
Returns the default address that is defined for the given type (e.g.: billing, shipping.).
|
void |
removeAddress(String userID,
Address address,
boolean autoSave)
Removes the address.
|
void |
setDefaultAddress(String userID,
Address address,
boolean autoSave)
Sets the generic default address of the user.
|
void |
setDefaultAddress(String userID,
Address address,
String type,
boolean autoSave)
Sets the default address for the given type (e.g.: billing, shipping.).
|
Address |
updateAddress(String userID,
Address address,
Map<String,Object> properties,
boolean autoSave)
Updates the address.
|
Collection<Address> getAddresses(String userID)
userID
- The user IDnull
if there are noneAddress getAddress(String userID, String path)
userID
- The user IDpath
- The address pathnull if it does not exist or if it does not belong to the user
void removeAddress(String userID, Address address, boolean autoSave) throws AddressException
userID
- The user IDaddress
- The addressautoSave
- If true
the operation is persistedAddressException
- when the address does not belong to the user or when the operation fails.Address addAddress(String userID, Map<String,Object> properties, boolean autoSave) throws AddressException
userID
- The user IDproperties
- The address propertiesautoSave
- If true
the operation is persistedAddressException
- when the operation fails.Address updateAddress(String userID, Address address, Map<String,Object> properties, boolean autoSave) throws AddressException
userID
- The user IDaddress
- The addressproperties
- The address propertiesautoSave
- If true
the operation is persistedAddressException
- when the address does not belong to the user or when the operation fails.Address getDefaultAddress(String userID)
userID
- The user IDAddress getDefaultAddress(String userID, String type)
userID
- The user IDtype
- The type of the default address. E.g.: billing, shipping.
If the type is null
or empty, the generic default address is returned.void setDefaultAddress(String userID, Address address, boolean autoSave) throws AddressException
userID
- The user IDaddress
- The addressautoSave
- If true
the operation is persistedAddressException
- when the address does not belong to the user or when the operation fails.void setDefaultAddress(String userID, Address address, String type, boolean autoSave) throws AddressException
userID
- The user IDaddress
- The addresstype
- The type of the default address. E.g.: billing, shipping.
If the given type is null
or empty, the generic default address is set.autoSave
- If true
the operation is persistedAddressException
- when the address does not belong to the user or when the operation fails."Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"