diff options
author | Angel Avila | 2016-03-02 09:58:11 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2016-03-02 09:58:11 +0000 |
commit | 640a48c2684153ac0cd054a785cbe136ade0dbab (patch) | |
tree | 876d7aea8dc9ec9e4bfbe4f28d39cf01415de563 /plugins/org.eclipse.osee.account.rest.client/src | |
parent | b4a6440a00ba4adfe1bb26e7c35b1b59a2f31810 (diff) | |
download | org.eclipse.osee-640a48c2684153ac0cd054a785cbe136ade0dbab.tar.gz org.eclipse.osee-640a48c2684153ac0cd054a785cbe136ade0dbab.tar.xz org.eclipse.osee-640a48c2684153ac0cd054a785cbe136ade0dbab.zip |
refactor[ats_ATS253925]: Change ids in Account from int to Long
Change-Id: Ie47850668181faa89d9493ce29c688e1a48c04d6
Diffstat (limited to 'plugins/org.eclipse.osee.account.rest.client/src')
2 files changed, 18 insertions, 18 deletions
diff --git a/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/AccountClient.java b/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/AccountClient.java index a942c26f9aa..bf6d20dfe60 100644 --- a/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/AccountClient.java +++ b/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/AccountClient.java @@ -30,7 +30,7 @@ import org.eclipse.osee.framework.jdk.core.type.ResultSet; * <li>User name</li> * <li>Display name</li> * </ol> - * + * * @author Roberto E. Escobar */ public interface AccountClient { @@ -47,22 +47,22 @@ public interface AccountClient { AccountInfoData createAccount(String userName, AccountInput input); - boolean deleteAccount(String uuid); + boolean deleteAccount(Long accountId); ResultSet<AccountSessionDetailsData> getAccountSessionDataByUniqueField(String accountId); ResultSet<AccountInfoData> getAllAccounts(); - AccountDetailsData getAccountDetailsByUniqueField(String accountId); + AccountDetailsData getAccountDetailsById(Long accountId); - AccountPreferencesData getAccountPreferencesByUniqueField(String accountId); + AccountPreferencesData getAccountPreferencesById(Long accountId); - boolean setAccountActive(String accountId, boolean active); + boolean setAccountActive(Long accountId, boolean active); - boolean isAccountActive(String accountId); + boolean isAccountActive(Long accountId); - boolean setAccountPreferences(String accountId, Map<String, String> preferences); + boolean setAccountPreferences(Long accountId, Map<String, String> preferences); - ResultSet<UnsubscribeInfo> getUnsubscribeUris(String userUuid, Collection<String> groupNames); + ResultSet<UnsubscribeInfo> getUnsubscribeUris(Long accountId, Collection<String> groupNames); } diff --git a/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java b/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java index 163e684140d..f6192e60777 100644 --- a/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java +++ b/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java @@ -116,7 +116,7 @@ public class AccountClientImpl implements AccountClient { } @Override - public boolean deleteAccount(String accountId) { + public boolean deleteAccount(Long accountId) { URI uri = UriBuilder.fromUri(baseUri).path(ACCOUNTS).path(ACCOUNT_ID_TEMPLATE).build(accountId); try { Response response = newTarget(uri).request().delete(); @@ -152,7 +152,7 @@ public class AccountClientImpl implements AccountClient { } @Override - public AccountDetailsData getAccountDetailsByUniqueField(String accountId) { + public AccountDetailsData getAccountDetailsById(Long accountId) { URI uri = UriBuilder.fromUri(baseUri).path(ACCOUNTS).path(ACCOUNT_ID_TEMPLATE).build(accountId); try { return newTarget(uri).request(MediaType.APPLICATION_JSON_TYPE).get(AccountDetailsData.class); @@ -162,7 +162,7 @@ public class AccountClientImpl implements AccountClient { } @Override - public AccountPreferencesData getAccountPreferencesByUniqueField(String accountId) { + public AccountPreferencesData getAccountPreferencesById(Long accountId) { URI uri = UriBuilder.fromUri(baseUri).path(ACCOUNTS).path(ACCOUNT_ID_TEMPLATE).path(ACCOUNT_PREFERENCES).build( accountId); try { @@ -173,7 +173,7 @@ public class AccountClientImpl implements AccountClient { } @Override - public boolean setAccountActive(String accountId, boolean active) { + public boolean setAccountActive(Long accountId, boolean active) { URI uri = UriBuilder.fromUri(baseUri).path(ACCOUNTS).path(ACCOUNT_ID_TEMPLATE).path(ACCOUNT_ACTIVE).build(accountId); @@ -187,7 +187,7 @@ public class AccountClientImpl implements AccountClient { } @Override - public boolean isAccountActive(String accountId) { + public boolean isAccountActive(Long accountId) { URI uri = UriBuilder.fromUri(baseUri).path(ACCOUNTS).path(ACCOUNT_ID_TEMPLATE).path(ACCOUNT_ACTIVE).build(accountId); @@ -218,7 +218,7 @@ public class AccountClientImpl implements AccountClient { } @Override - public boolean setAccountPreferences(String accountId, Map<String, String> preferences) { + public boolean setAccountPreferences(Long accountId, Map<String, String> preferences) { URI uri = UriBuilder.fromUri(baseUri).path(ACCOUNTS).path(ACCOUNT_ID_TEMPLATE).path(ACCOUNT_PREFERENCES).build( accountId); @@ -232,9 +232,9 @@ public class AccountClientImpl implements AccountClient { } } - private ResultSet<SubscriptionData> getSubscriptionsForAccount(String userId) { + private ResultSet<SubscriptionData> getSubscriptionsForAccount(Long accountId) { URI uri = - UriBuilder.fromUri(baseUri).path("subscriptions").path("for-account").path("{account-id}").build(userId); + UriBuilder.fromUri(baseUri).path("subscriptions").path("for-account").path("{account-id}").build(accountId); try { SubscriptionData[] data = newTarget(uri).request(MediaType.APPLICATION_JSON_TYPE).get(SubscriptionData[].class); @@ -245,9 +245,9 @@ public class AccountClientImpl implements AccountClient { } @Override - public ResultSet<UnsubscribeInfo> getUnsubscribeUris(String userUuid, Collection<String> groupNames) { + public ResultSet<UnsubscribeInfo> getUnsubscribeUris(Long accountId, Collection<String> groupNames) { ResultSet<UnsubscribeInfo> toReturn = ResultSets.emptyResultSet(); - ResultSet<SubscriptionData> results = getSubscriptionsForAccount(userUuid); + ResultSet<SubscriptionData> results = getSubscriptionsForAccount(accountId); if (!results.isEmpty()) { List<UnsubscribeInfo> infos = new ArrayList<>(); |