Rename Java packages to use the .google TLD

The dark lord Gosling designed the Java package naming system so that
ownership flows from the DNS system. Since we own the domain name
registry.google, it seems only appropriate that we should use
google.registry as our package name.
This commit is contained in:
Michael Muller 2016-04-26 11:05:00 -04:00 committed by Justine Tunney
parent 5012893c1d
commit c458c05801
1309 changed files with 10981 additions and 10378 deletions

View file

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.domain.registry.util.ObjectifyUtils.OBJECTS_TO_KEYS;
import static com.googlecode.objectify.ObjectifyService.ofy;
import static google.registry.util.ObjectifyUtils.OBJECTS_TO_KEYS;
import static java.util.Arrays.asList;
import com.google.common.base.Functions;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.googlecode.objectify.ObjectifyService.ofy;

View file

@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.DiscreteDomain.integers;
import static com.google.domain.registry.util.DateTimeUtils.START_OF_TIME;
import static com.googlecode.objectify.ObjectifyService.ofy;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
@ -26,17 +26,18 @@ import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.Range;
import com.google.domain.registry.config.RegistryEnvironment;
import com.google.domain.registry.model.Buildable;
import com.google.domain.registry.model.ImmutableObject;
import com.google.domain.registry.model.annotations.NotBackedUp;
import com.google.domain.registry.model.annotations.NotBackedUp.Reason;
import com.google.domain.registry.util.NonFinalForTesting;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import google.registry.config.RegistryEnvironment;
import google.registry.model.Buildable;
import google.registry.model.ImmutableObject;
import google.registry.model.annotations.NotBackedUp;
import google.registry.model.annotations.NotBackedUp.Reason;
import google.registry.util.NonFinalForTesting;
import org.joda.time.DateTime;
import java.util.Random;
@ -45,7 +46,7 @@ import java.util.Random;
* Root for a random commit log bucket.
*
* <p>This is used to shard {@link CommitLogManifest} objects into
* {@link com.google.domain.registry.config.RegistryConfig#getCommitLogBucketCount() N} entity
* {@link google.registry.config.RegistryConfig#getCommitLogBucketCount() N} entity
* groups. This increases transaction throughput, while maintaining the ability to perform
* strongly-consistent ancestor queries.
*

View file

@ -12,22 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.common.base.Preconditions.checkArgument;
import static org.joda.time.DateTimeZone.UTC;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.domain.registry.model.ImmutableObject;
import com.google.domain.registry.model.annotations.NotBackedUp;
import com.google.domain.registry.model.annotations.NotBackedUp.Reason;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Parent;
import google.registry.model.ImmutableObject;
import google.registry.model.annotations.NotBackedUp;
import google.registry.model.annotations.NotBackedUp.Reason;
import org.joda.time.DateTime;
import java.util.ArrayList;

View file

@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.domain.registry.util.DateTimeUtils.START_OF_TIME;
import static com.googlecode.objectify.ObjectifyService.ofy;
import com.google.domain.registry.model.ImmutableObject;
import com.google.domain.registry.model.annotations.NotBackedUp;
import com.google.domain.registry.model.annotations.NotBackedUp.Reason;
import static google.registry.util.DateTimeUtils.START_OF_TIME;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import google.registry.model.ImmutableObject;
import google.registry.model.annotations.NotBackedUp;
import google.registry.model.annotations.NotBackedUp.Reason;
import org.joda.time.DateTime;
/**

View file

@ -12,21 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.domain.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
import static org.joda.time.DateTimeZone.UTC;
import com.google.common.collect.ImmutableSet;
import com.google.domain.registry.model.ImmutableObject;
import com.google.domain.registry.model.annotations.NotBackedUp;
import com.google.domain.registry.model.annotations.NotBackedUp.Reason;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Parent;
import google.registry.model.ImmutableObject;
import google.registry.model.annotations.NotBackedUp;
import google.registry.model.annotations.NotBackedUp.Reason;
import org.joda.time.DateTime;
import java.util.LinkedHashSet;

View file

@ -12,24 +12,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.appengine.api.datastore.EntityTranslator.convertToPb;
import static com.google.appengine.api.datastore.EntityTranslator.createFromPbBytes;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.domain.registry.model.ofy.ObjectifyService.ofy;
import static google.registry.model.ofy.ObjectifyService.ofy;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.common.annotations.VisibleForTesting;
import com.google.domain.registry.model.ImmutableObject;
import com.google.domain.registry.model.annotations.NotBackedUp;
import com.google.domain.registry.model.annotations.NotBackedUp.Reason;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Parent;
import google.registry.model.ImmutableObject;
import google.registry.model.annotations.NotBackedUp;
import google.registry.model.annotations.NotBackedUp.Reason;
/** Representation of a saved entity in a {@link CommitLogManifest} (not deletes). */
@Entity
@NotBackedUp(reason = Reason.COMMIT_LOGS)

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Predicates.in;
@ -20,22 +20,23 @@ import static com.google.common.base.Predicates.not;
import static com.google.common.collect.Maps.filterKeys;
import static com.google.common.collect.Sets.difference;
import static com.google.common.collect.Sets.union;
import static com.google.domain.registry.model.ofy.CommitLogBucket.loadBucket;
import static com.google.domain.registry.util.DateTimeUtils.isBeforeOrAt;
import static com.googlecode.objectify.ObjectifyService.ofy;
import static google.registry.model.ofy.CommitLogBucket.loadBucket;
import static google.registry.util.DateTimeUtils.isBeforeOrAt;
import com.google.common.base.Function;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.domain.registry.model.BackupGroupRoot;
import com.google.domain.registry.model.ImmutableObject;
import com.google.domain.registry.util.Clock;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.VoidWork;
import com.googlecode.objectify.Work;
import google.registry.model.BackupGroupRoot;
import google.registry.model.ImmutableObject;
import google.registry.util.Clock;
import org.joda.time.DateTime;
import java.util.HashSet;

View file

@ -12,28 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.appengine.api.memcache.ErrorHandlers.getConsistentLogAndContinue;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Predicates.not;
import static com.google.domain.registry.util.TypeUtils.hasAnnotation;
import static com.googlecode.objectify.ObjectifyService.factory;
import static google.registry.util.TypeUtils.hasAnnotation;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Iterables;
import com.google.domain.registry.config.RegistryEnvironment;
import com.google.domain.registry.model.EntityClasses;
import com.google.domain.registry.model.ImmutableObject;
import com.google.domain.registry.model.translators.CidrAddressBlockTranslatorFactory;
import com.google.domain.registry.model.translators.CommitLogRevisionsTranslatorFactory;
import com.google.domain.registry.model.translators.CreateAutoTimestampTranslatorFactory;
import com.google.domain.registry.model.translators.CurrencyUnitTranslatorFactory;
import com.google.domain.registry.model.translators.DurationTranslatorFactory;
import com.google.domain.registry.model.translators.InetAddressTranslatorFactory;
import com.google.domain.registry.model.translators.ReadableInstantUtcTranslatorFactory;
import com.google.domain.registry.model.translators.UpdateAutoTimestampTranslatorFactory;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.Objectify;
@ -43,6 +32,18 @@ import com.googlecode.objectify.annotation.EntitySubclass;
import com.googlecode.objectify.impl.translate.TranslatorFactory;
import com.googlecode.objectify.impl.translate.opt.joda.MoneyStringTranslatorFactory;
import google.registry.config.RegistryEnvironment;
import google.registry.model.EntityClasses;
import google.registry.model.ImmutableObject;
import google.registry.model.translators.CidrAddressBlockTranslatorFactory;
import google.registry.model.translators.CommitLogRevisionsTranslatorFactory;
import google.registry.model.translators.CreateAutoTimestampTranslatorFactory;
import google.registry.model.translators.CurrencyUnitTranslatorFactory;
import google.registry.model.translators.DurationTranslatorFactory;
import google.registry.model.translators.InetAddressTranslatorFactory;
import google.registry.model.translators.ReadableInstantUtcTranslatorFactory;
import google.registry.model.translators.UpdateAutoTimestampTranslatorFactory;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicLong;
import java.util.logging.Level;

View file

@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Predicates.notNull;
import static com.google.common.collect.Maps.uniqueIndex;
import static com.google.domain.registry.util.CollectionUtils.union;
import static com.google.domain.registry.util.ObjectifyUtils.OBJECTS_TO_KEYS;
import static com.googlecode.objectify.ObjectifyService.ofy;
import static google.registry.util.CollectionUtils.union;
import static google.registry.util.ObjectifyUtils.OBJECTS_TO_KEYS;
import com.google.appengine.api.datastore.DatastoreFailureException;
import com.google.appengine.api.datastore.DatastoreTimeoutException;
@ -30,16 +30,6 @@ import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.domain.registry.config.RegistryEnvironment;
import com.google.domain.registry.model.annotations.NotBackedUp;
import com.google.domain.registry.model.annotations.VirtualEntity;
import com.google.domain.registry.model.ofy.ReadOnlyWork.KillTransactionException;
import com.google.domain.registry.util.Clock;
import com.google.domain.registry.util.FormattingLogger;
import com.google.domain.registry.util.NonFinalForTesting;
import com.google.domain.registry.util.Sleeper;
import com.google.domain.registry.util.SystemClock;
import com.google.domain.registry.util.SystemSleeper;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.Objectify;
@ -49,6 +39,17 @@ import com.googlecode.objectify.cmd.Deleter;
import com.googlecode.objectify.cmd.Loader;
import com.googlecode.objectify.cmd.Saver;
import google.registry.config.RegistryEnvironment;
import google.registry.model.annotations.NotBackedUp;
import google.registry.model.annotations.VirtualEntity;
import google.registry.model.ofy.ReadOnlyWork.KillTransactionException;
import google.registry.util.Clock;
import google.registry.util.FormattingLogger;
import google.registry.util.NonFinalForTesting;
import google.registry.util.Sleeper;
import google.registry.util.SystemClock;
import google.registry.util.SystemSleeper;
import org.joda.time.DateTime;
import org.joda.time.Duration;

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import java.io.IOException;

View file

@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
import com.google.domain.registry.util.Clock;
package google.registry.model.ofy;
import com.googlecode.objectify.Work;
import google.registry.util.Clock;
/** Wrapper for {@link Work} that disallows mutations and fails the transaction at the end. */
class ReadOnlyWork<R> extends CommitLoggedWork<R> {

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import com.google.common.collect.ImmutableSet;

View file

@ -12,18 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static java.util.Arrays.asList;
import com.google.common.base.Joiner;
import com.google.common.base.Predicate;
import com.google.common.collect.FluentIterable;
import com.google.domain.registry.model.BackupGroupRoot;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.Objectify;
import google.registry.model.BackupGroupRoot;
import org.joda.time.DateTime;
import java.util.Map;

View file

@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.domain.registry.model.ofy;
package google.registry.model.ofy;
import static com.google.common.base.Functions.constant;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.Maps.filterValues;
import static com.google.common.collect.Maps.toMap;
import static com.google.domain.registry.model.ofy.CommitLogBucket.getArbitraryBucketId;
import static com.googlecode.objectify.ObjectifyService.ofy;
import static google.registry.model.ofy.CommitLogBucket.getArbitraryBucketId;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;