Skip to content

Commit

Permalink
Merge pull request #748 from mderka/spi-refactor
Browse files Browse the repository at this point in the history
Moved spi package to dns.spi as per #742
  • Loading branch information
ajkannan committed Mar 14, 2016
2 parents f5c0587 + 96e380c commit 6be68bc
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.base.MoreObjects;
import com.google.gcloud.spi.DnsRpc;
import com.google.gcloud.dns.spi.DnsRpc;

import java.io.Serializable;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.google.common.collect.Sets;
import com.google.gcloud.Page;
import com.google.gcloud.Service;
import com.google.gcloud.spi.DnsRpc;
import com.google.gcloud.dns.spi.DnsRpc;

import java.io.Serializable;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import com.google.gcloud.Page;
import com.google.gcloud.PageImpl;
import com.google.gcloud.RetryHelper;
import com.google.gcloud.spi.DnsRpc;
import com.google.gcloud.dns.spi.DnsRpc;

import java.util.Map;
import java.util.concurrent.Callable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import com.google.common.collect.ImmutableSet;
import com.google.gcloud.ServiceOptions;
import com.google.gcloud.spi.DefaultDnsRpc;
import com.google.gcloud.spi.DnsRpc;
import com.google.gcloud.spi.DnsRpcFactory;
import com.google.gcloud.dns.spi.DefaultDnsRpc;
import com.google.gcloud.dns.spi.DnsRpc;
import com.google.gcloud.dns.spi.DnsRpcFactory;

import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.google.gcloud.spi;

import static com.google.gcloud.spi.DnsRpc.ListResult.of;
import static com.google.gcloud.spi.DnsRpc.Option.DNS_NAME;
import static com.google.gcloud.spi.DnsRpc.Option.DNS_TYPE;
import static com.google.gcloud.spi.DnsRpc.Option.FIELDS;
import static com.google.gcloud.spi.DnsRpc.Option.NAME;
import static com.google.gcloud.spi.DnsRpc.Option.PAGE_SIZE;
import static com.google.gcloud.spi.DnsRpc.Option.PAGE_TOKEN;
import static com.google.gcloud.spi.DnsRpc.Option.SORTING_ORDER;
package com.google.gcloud.dns.spi;

import static com.google.gcloud.dns.spi.DnsRpc.ListResult.of;
import static com.google.gcloud.dns.spi.DnsRpc.Option.DNS_NAME;
import static com.google.gcloud.dns.spi.DnsRpc.Option.DNS_TYPE;
import static com.google.gcloud.dns.spi.DnsRpc.Option.FIELDS;
import static com.google.gcloud.dns.spi.DnsRpc.Option.NAME;
import static com.google.gcloud.dns.spi.DnsRpc.Option.PAGE_SIZE;
import static com.google.gcloud.dns.spi.DnsRpc.Option.PAGE_TOKEN;
import static com.google.gcloud.dns.spi.DnsRpc.Option.SORTING_ORDER;
import static java.net.HttpURLConnection.HTTP_NOT_FOUND;

import com.google.api.client.http.HttpRequestInitializer;
Expand Down Expand Up @@ -188,7 +188,7 @@ public ListResult<Change> listChangeRequests(String zoneName, Map<Option, ?> opt
request = request.setSortBy(SORT_BY).setSortOrder(SORTING_ORDER.getString(options));
}
ChangesListResponse response = request.execute();
return ListResult.of(response.getNextPageToken(), response.getChanges());
return of(response.getNextPageToken(), response.getChanges());
} catch (IOException ex) {
throw translate(ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.gcloud.spi;
package com.google.gcloud.dns.spi;

import com.google.api.services.dns.model.Change;
import com.google.api.services.dns.model.ManagedZone;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
* limitations under the License.
*/

package com.google.gcloud.spi;
package com.google.gcloud.dns.spi;

import com.google.gcloud.dns.DnsOptions;
import com.google.gcloud.spi.ServiceRpcFactory;

/**
* An interface for DnsRpc factory. Implementation will be loaded via {@link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.fail;

import com.google.gcloud.spi.DnsRpc;
import com.google.gcloud.dns.spi.DnsRpc;

import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import com.google.gcloud.Page;
import com.google.gcloud.RetryParams;
import com.google.gcloud.ServiceOptions;
import com.google.gcloud.spi.DnsRpc;
import com.google.gcloud.spi.DnsRpcFactory;
import com.google.gcloud.dns.spi.DnsRpc;
import com.google.gcloud.dns.spi.DnsRpcFactory;

import org.easymock.Capture;
import org.easymock.EasyMock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import com.google.gcloud.spi.DnsRpc;
import com.google.gcloud.dns.spi.DnsRpc;

import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.gcloud.dns.DnsException;
import com.google.gcloud.spi.DefaultDnsRpc;
import com.google.gcloud.spi.DnsRpc;
import com.google.gcloud.dns.spi.DefaultDnsRpc;
import com.google.gcloud.dns.spi.DnsRpc;

import org.junit.AfterClass;
import org.junit.Before;
Expand Down

0 comments on commit 6be68bc

Please sign in to comment.