}
public Map<String, String> saveUserAddress(String userId, String addressId, String addressDescription, String street1, String street2, String city, String state,
String zip, String country, String phone, String fax, String cell) throws DotDataException {
UserAPI uAPI = APILocator.getUserAPI();
UserWebAPI uWebAPI = WebAPILocator.getUserWebAPI();
WebContext ctx = WebContextFactory.get();
HttpServletRequest request = ctx.getHttpServletRequest();
User user = null;
try {
user = uAPI.loadUserById(userId, uWebAPI.getLoggedInUser(request), !uWebAPI.isLoggedToBackend(request));
} catch (NoSuchUserException e) {
Logger.error(this, e.getMessage(), e);
throw new DotDataException(e.getMessage(), e);
} catch (DotRuntimeException e) {
Logger.error(this, e.getMessage(), e);
throw new DotDataException(e.getMessage(), e);
} catch (PortalException e) {
Logger.error(this, e.getMessage(), e);
throw new DotDataException(e.getMessage(), e);
} catch (SystemException e) {
Logger.error(this, e.getMessage(), e);
throw new DotDataException(e.getMessage(), e);
} catch (DotSecurityException e) {
Logger.error(this, e.getMessage(), e);
throw new DotDataException(e.getMessage(), e);
}
Address ad = new Address();
ad.setAddressId(addressId);
ad.setDescription(addressDescription);
ad.setStreet1(street1);
ad.setStreet2(street2);
ad.setCity(city);
ad.setState(state);
ad.setZip(zip);
ad.setCountry(country);
ad.setPhone(phone);
ad.setFax(fax);
ad.setCell(cell);
try {
uAPI.saveAddress(user, ad, uWebAPI.getLoggedInUser(request), !uWebAPI.isLoggedToBackend(request));
} catch (DotRuntimeException e) {
Logger.error(this, e.getMessage(), e);
throw new DotDataException(e.getMessage(), e);
} catch (PortalException e) {
Logger.error(this, e.getMessage(), e);