Interface WebSubscriptionUserAddresses
-
- All Superinterfaces:
EnumWebPersistableState
,Persistable
public interface WebSubscriptionUserAddresses extends Persistable
This interface allows the client to manage multiple addresses associated with aWebUser
in memory and apply all the changes in one call. The changes will be persisted in the metadata when the save on the associated user gets invoked. Until then, the changes are all retained in memory- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebSubscriptionAddress
addNewAddress(int delMode)
This method creates a newWebSubscriptionAddress
with a given delivery mode.WebSubscriptionAddress
get(int i)
This method returns aWebSubscriptionAddress
given an index of the address in the address list.WebSubscriptionAddress
getAddress(java.lang.String id)
This method returns aWebSubscriptionAddress
given the address ID.void
remove(WebSubscriptionAddress address)
This method removes aWebSubscriptionAddress
fromWebSubscriptionUserAddresses
for a user given aWebSubscriptionAddress
.void
remove(java.lang.String addressID)
This method removes anWebSubscriptionAddress
fromWebSubscriptionUserAddresses
for a user given an address ID.void
save()
This methods saves modification of theWebSubscriptionUserAddresses
and persist the changes to the server.void
saveAddress(WebSubscriptionAddress address)
This method adds a newly created or modifiedWebSubscriptionAddress
to a list, so that all the changes can be later saved to the server.void
setDefaultAddress(java.lang.String addressID)
This method sets the default address, making sure that only one address is set to default for the same delivery mode.int
size()
This method returns the size of the WebSubscriptionAddress list.-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
-
-
-
Method Detail
-
size
int size()
This method returns the size of the WebSubscriptionAddress list.- Returns:
- size of the WebSubscriptionAddress list
-
get
WebSubscriptionAddress get(int i) throws WebObjectsException, java.lang.IllegalArgumentException
This method returns aWebSubscriptionAddress
given an index of the address in the address list.- Parameters:
i
-- Returns:
- Throws:
WebObjectsException
java.lang.IllegalArgumentException
-
getAddress
WebSubscriptionAddress getAddress(java.lang.String id) throws WebObjectsException, java.lang.IllegalArgumentException
This method returns aWebSubscriptionAddress
given the address ID.- Parameters:
id
-- Returns:
- Throws:
WebObjectsException
java.lang.IllegalArgumentException
-
addNewAddress
WebSubscriptionAddress addNewAddress(int delMode) throws WebObjectsException
This method creates a newWebSubscriptionAddress
with a given delivery mode.- Parameters:
delMode
-- Returns:
- Throws:
WebObjectsException
-
saveAddress
void saveAddress(WebSubscriptionAddress address)
This method adds a newly created or modifiedWebSubscriptionAddress
to a list, so that all the changes can be later saved to the server.- Parameters:
address
-
-
remove
void remove(WebSubscriptionAddress address) throws WebObjectsException, java.lang.IllegalArgumentException
This method removes aWebSubscriptionAddress
fromWebSubscriptionUserAddresses
for a user given aWebSubscriptionAddress
.- Parameters:
address
-- Throws:
WebObjectsException
java.lang.IllegalArgumentException
-
remove
void remove(java.lang.String addressID) throws WebObjectsException, java.lang.IllegalArgumentException
This method removes anWebSubscriptionAddress
fromWebSubscriptionUserAddresses
for a user given an address ID.- Parameters:
addressID
-- Throws:
WebObjectsException
java.lang.IllegalArgumentException
-
setDefaultAddress
void setDefaultAddress(java.lang.String addressID) throws WebObjectsException
This method sets the default address, making sure that only one address is set to default for the same delivery mode.- Parameters:
addressID
-- Throws:
WebObjectsException
-
save
void save() throws WebObjectsException
This methods saves modification of theWebSubscriptionUserAddresses
and persist the changes to the server.- Throws:
WebObjectsException
-
-