public ListAddressesResponse listAddresses(ListAddressesRequest request) throws Exception
{
AkteraUser user = securityContext.getUser();
int firstResult = request.getFirstResult() != null ? request.getFirstResult().intValue() : 0;
int maxResults = request.getMaxResults() != null ? request.getMaxResults().intValue() : - 1;
SortOrder orderDir = request.getOrderDir() != null ? SortOrder.byId(request.getOrderDir())
: SortOrder.ASCENDING;
String orderBy = request.getOrderBy() != null ? request.getOrderBy() : "lastName";
AddressStore store = addressManager.getAddressStoreByName(request.getAddressStoreName());
ListAddressesResponse response = new ListAddressesResponse();
for (Address address : store.createAddressListing(user.getId(), request.getQuery(), orderBy, orderDir,