diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e3c5c6..19ddf1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.2.9] - 2025-01-10 + +* Removed TrustedApplication (#31) + ## [0.2.8] - 2021-04-06 * Changed HTTP method of the zone list call (#23) diff --git a/README.md b/README.md index 18bbf0c..bfb6fbc 100644 --- a/README.md +++ b/README.md @@ -138,16 +138,6 @@ SslContact info(int id, Map customHeaders); List list(Query body, Map customHeaders); ``` -#### TrustedApplication tasks - -```java -TrustedApplication create(TrustedApplication body, Map customHeaders); -TrustedApplication update(TrustedApplication body, Map customHeaders); -void delete(String uuid, Map customHeaders); -TrustedApplication info(String uuid, Map customHeaders); -List list(Query body, Map customHeaders); -``` - #### Domainstudio tasks ```java diff --git a/sdk-client/src/main/java/org/domainrobot/sdk/client/Domainrobot.java b/sdk-client/src/main/java/org/domainrobot/sdk/client/Domainrobot.java index 883d142..52c6f8b 100644 --- a/sdk-client/src/main/java/org/domainrobot/sdk/client/Domainrobot.java +++ b/sdk-client/src/main/java/org/domainrobot/sdk/client/Domainrobot.java @@ -10,7 +10,6 @@ import org.domainrobot.sdk.client.clients.PollClient; import org.domainrobot.sdk.client.clients.SslContactClient; import org.domainrobot.sdk.client.clients.TransferOutClient; -import org.domainrobot.sdk.client.clients.TrustedApplicationClient; import org.domainrobot.sdk.client.clients.ZoneClient; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; @@ -70,12 +69,6 @@ public class Domainrobot { */ public DomainCancelationClient domainCancelation; - /** - * The trusted application service, containing all operations on trusted - * applications. - */ - public TrustedApplicationClient trustedApplication; - private String version = "0.2.8"; /** @@ -107,7 +100,6 @@ public Domainrobot(String user, String context, String password, String baseUrl) poll = new PollClient(user, context, password, baseUrl, version, getRestTemplate()); domainCancelation = new DomainCancelationClient(user, context, password, baseUrl, version, getRestTemplate()); transferOut = new TransferOutClient(user, context, password, baseUrl, version, getRestTemplate()); - trustedApplication = new TrustedApplicationClient(user, context, password, baseUrl, version, getRestTemplate()); } @@ -183,14 +175,6 @@ public void setDomainCancelation(DomainCancelationClient domainCancelation) { this.domainCancelation = domainCancelation; } - public TrustedApplicationClient getTrustedApplication() { - return trustedApplication; - } - - public void setTrustedApplication(TrustedApplicationClient trustedApplication) { - this.trustedApplication = trustedApplication; - } - /** * Setup a RestTemplate with default settings and the * MappingJackson2HttpMessageConverter for json parsing. diff --git a/sdk-client/src/main/java/org/domainrobot/sdk/client/clients/TrustedApplicationClient.java b/sdk-client/src/main/java/org/domainrobot/sdk/client/clients/TrustedApplicationClient.java deleted file mode 100644 index ea2bfca..0000000 --- a/sdk-client/src/main/java/org/domainrobot/sdk/client/clients/TrustedApplicationClient.java +++ /dev/null @@ -1,153 +0,0 @@ - -package org.domainrobot.sdk.client.clients; - -import java.util.List; -import java.util.Map; - -import org.domainrobot.sdk.models.DomainrobotApiException; -import org.domainrobot.sdk.models.generated.JsonResponseDataJsonNoData; -import org.domainrobot.sdk.models.generated.JsonResponseDataTrustedApplication; -import org.domainrobot.sdk.models.generated.Query; -import org.domainrobot.sdk.models.generated.TrustedApplication; -import org.springframework.http.HttpMethod; -import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; - -/** - * Implementation of the trusted application specific API functions. - * - * @author Daniel Linsenmeier - */ -public class TrustedApplicationClient extends AbstractClient { - - RestTemplate template; - - public TrustedApplicationClient(String userName, String context, String password, String baseUrl, String version, - RestTemplate template) { - this.userName = userName; - this.context = context; - this.password = password; - this.baseUrl = baseUrl; - this.version = version; - this.template = template; - } - - /** - * - * Sends a TrustedApplication create request. - * - * @return TrustedApplication - * @throws DomainrobotApiException - */ - public TrustedApplication create(TrustedApplication body, Map customHeaders) - throws DomainrobotApiException, Exception { - RequestEntity request = buildRequestEntity(body, HttpMethod.POST, baseUrl + "/trustedapp", - customHeaders); - ResponseEntity response = null; - try { - response = template.exchange(request, JsonResponseDataTrustedApplication.class); - } catch (Exception e) { - handleException(e); - } - return response.getBody().getData().get(0); - } - - /** - * - * Sends a TrustedApplication update request. - * - * @return TrustedApplication - * @throws DomainrobotApiException - */ - public TrustedApplication update(TrustedApplication body, Map customHeaders) - throws DomainrobotApiException, Exception { - if (body.getUuid() == null) { - throw new IllegalArgumentException("Field TrustedApplication.uuid is missing."); - } - RequestEntity request = buildRequestEntity(body, HttpMethod.PUT, - baseUrl + "/trustedapp/" + body.getUuid().toString(), customHeaders); - ResponseEntity response = null; - try { - response = template.exchange(request, JsonResponseDataTrustedApplication.class); - } catch (Exception e) { - handleException(e); - } - return response.getBody().getData().get(0); - } - - /** - * - * Sends a TrustedApplication delete request. - * - * @throws DomainrobotApiException - */ - public void delete(String uuid, Map customHeaders) throws DomainrobotApiException, Exception { - RequestEntity request = buildRequestEntity(HttpMethod.DELETE, baseUrl + "/trustedapp/" + uuid, - customHeaders); - try { - template.exchange(request, JsonResponseDataJsonNoData.class); - } catch (Exception e) { - handleException(e); - } - return; - } - - /** - * - * Sends a TrustedApplication info request. - * - * @return TrustedApplication - * @throws DomainrobotApiException - */ - public TrustedApplication info(String uuid, Map customHeaders) - throws DomainrobotApiException, Exception { - RequestEntity request = buildRequestEntity(HttpMethod.GET, baseUrl + "/trustedapp/" + uuid, - customHeaders); - ResponseEntity response = null; - try { - response = template.exchange(request, JsonResponseDataTrustedApplication.class); - } catch (Exception e) { - handleException(e); - } - return response.getBody().getData().get(0); - } - - /** - * - * Sends a TrustedApplication list request. - * - *
- *
- * The following keys can be used for filtering, ordering or fetching additional - * data via query parameter:
- * - *
    - *
  • created
  • - *
  • comment
  • - *
  • uuid
  • - *
  • device
  • - *
  • updated
  • - *
  • application
  • - *
- *
- *
- * - * @return List of TrustedApplication - * @throws DomainrobotApiException - */ - public List list(Query body, Map customHeaders, - Map queryParameters) throws DomainrobotApiException, Exception { - RequestEntity request = buildRequestEntity(body, HttpMethod.GET, baseUrl + "/trustedapp/_search", - customHeaders, queryParameters); - ResponseEntity response = null; - try { - response = template.exchange(request, JsonResponseDataTrustedApplication.class); - } catch (Exception e) { - handleException(e); - } - return response.getBody().getData(); - } - -}