mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
mv com/google/domain/registry google/registry
This change renames directories in preparation for the great package rename. The repository is now in a broken state because the code itself hasn't been updated. However this should ensure that git correctly preserves history for each file.
This commit is contained in:
parent
a41677aea1
commit
5012893c1d
2396 changed files with 0 additions and 0 deletions
53
java/google/registry/module/backend/BUILD
Normal file
53
java/google/registry/module/backend/BUILD
Normal file
|
@ -0,0 +1,53 @@
|
|||
package(
|
||||
default_visibility = ["//java/com/google/domain/registry:registry_project"],
|
||||
)
|
||||
|
||||
|
||||
java_library(
|
||||
name = "backend",
|
||||
srcs = glob(["*.java"]),
|
||||
deps = [
|
||||
"//java/com/google/common/base",
|
||||
"//java/com/google/common/collect",
|
||||
"//java/com/google/common/net",
|
||||
"//java/com/google/domain/registry/backup",
|
||||
"//java/com/google/domain/registry/bigquery",
|
||||
"//java/com/google/domain/registry/config",
|
||||
"//java/com/google/domain/registry/cron",
|
||||
"//java/com/google/domain/registry/dns",
|
||||
"//java/com/google/domain/registry/dns/writer/api",
|
||||
"//java/com/google/domain/registry/dns/writer/dnsupdate",
|
||||
"//java/com/google/domain/registry/export",
|
||||
"//java/com/google/domain/registry/export/sheet",
|
||||
"//java/com/google/domain/registry/flows",
|
||||
"//java/com/google/domain/registry/gcs",
|
||||
"//java/com/google/domain/registry/groups",
|
||||
"//java/com/google/domain/registry/keyring/api",
|
||||
"//java/com/google/domain/registry/mapreduce",
|
||||
"//java/com/google/domain/registry/model",
|
||||
"//java/com/google/domain/registry/monitoring/whitebox",
|
||||
"//java/com/google/domain/registry/rde",
|
||||
"//java/com/google/domain/registry/request",
|
||||
"//java/com/google/domain/registry/request:modules",
|
||||
"//java/com/google/domain/registry/tmch",
|
||||
"//java/com/google/domain/registry/util",
|
||||
"//third_party/java/bouncycastle",
|
||||
"//third_party/java/dagger",
|
||||
"//third_party/java/jsr305_annotations",
|
||||
"//third_party/java/jsr330_inject",
|
||||
"//third_party/java/servlet/servlet_api",
|
||||
],
|
||||
)
|
||||
|
||||
# This rule is used so bazel can generate "backend_jar_deploy.jar" (which
|
||||
# contains transitive dependencies) for deployment to App Engine. It MUST
|
||||
# explicitly depend upon upon anything loaded at runtime, e.g. old servlets
|
||||
# referenced by the module's web.xml file, that isn't statically linked above.
|
||||
java_binary(
|
||||
name = "backend_jar",
|
||||
create_executable = 0,
|
||||
runtime_deps = [
|
||||
":backend",
|
||||
"//java/com/google/domain/registry/monitoring/whitebox", # MetricsTaskServlet
|
||||
],
|
||||
)
|
74
java/google/registry/module/backend/BackendComponent.java
Normal file
74
java/google/registry/module/backend/BackendComponent.java
Normal file
|
@ -0,0 +1,74 @@
|
|||
// Copyright 2016 The Domain Registry Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.module.backend;
|
||||
|
||||
import com.google.domain.registry.bigquery.BigqueryModule;
|
||||
import com.google.domain.registry.config.ConfigModule;
|
||||
import com.google.domain.registry.dns.writer.api.VoidDnsWriterModule;
|
||||
import com.google.domain.registry.export.DriveModule;
|
||||
import com.google.domain.registry.export.sheet.SpreadsheetServiceModule;
|
||||
import com.google.domain.registry.gcs.GcsServiceModule;
|
||||
import com.google.domain.registry.groups.DirectoryModule;
|
||||
import com.google.domain.registry.groups.GroupsModule;
|
||||
import com.google.domain.registry.groups.GroupssettingsModule;
|
||||
import com.google.domain.registry.keyring.api.KeyModule;
|
||||
import com.google.domain.registry.keyring.api.VoidKeyringModule;
|
||||
import com.google.domain.registry.rde.JSchModule;
|
||||
import com.google.domain.registry.request.Modules.AppIdentityCredentialModule;
|
||||
import com.google.domain.registry.request.Modules.DatastoreServiceModule;
|
||||
import com.google.domain.registry.request.Modules.GoogleCredentialModule;
|
||||
import com.google.domain.registry.request.Modules.Jackson2Module;
|
||||
import com.google.domain.registry.request.Modules.ModulesServiceModule;
|
||||
import com.google.domain.registry.request.Modules.URLFetchServiceModule;
|
||||
import com.google.domain.registry.request.Modules.UrlFetchTransportModule;
|
||||
import com.google.domain.registry.request.Modules.UseAppIdentityCredentialForGoogleApisModule;
|
||||
import com.google.domain.registry.request.RequestModule;
|
||||
import com.google.domain.registry.util.SystemClock.SystemClockModule;
|
||||
import com.google.domain.registry.util.SystemSleeper.SystemSleeperModule;
|
||||
|
||||
import dagger.Component;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
/** Dagger component with instance lifetime for "backend" App Engine module. */
|
||||
@Singleton
|
||||
@Component(
|
||||
modules = {
|
||||
AppIdentityCredentialModule.class,
|
||||
BigqueryModule.class,
|
||||
ConfigModule.class,
|
||||
DatastoreServiceModule.class,
|
||||
DirectoryModule.class,
|
||||
DriveModule.class,
|
||||
GcsServiceModule.class,
|
||||
GoogleCredentialModule.class,
|
||||
GroupsModule.class,
|
||||
GroupssettingsModule.class,
|
||||
JSchModule.class,
|
||||
Jackson2Module.class,
|
||||
KeyModule.class,
|
||||
ModulesServiceModule.class,
|
||||
SpreadsheetServiceModule.class,
|
||||
SystemClockModule.class,
|
||||
SystemSleeperModule.class,
|
||||
URLFetchServiceModule.class,
|
||||
UrlFetchTransportModule.class,
|
||||
UseAppIdentityCredentialForGoogleApisModule.class,
|
||||
VoidDnsWriterModule.class,
|
||||
VoidKeyringModule.class,
|
||||
})
|
||||
interface BackendComponent {
|
||||
BackendRequestComponent startRequest(RequestModule requestModule);
|
||||
}
|
39
java/google/registry/module/backend/BackendModule.java
Normal file
39
java/google/registry/module/backend/BackendModule.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
// Copyright 2016 The Domain Registry Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.module.backend;
|
||||
|
||||
import static com.google.domain.registry.model.registry.Registries.assertTldExists;
|
||||
import static com.google.domain.registry.request.RequestParameters.extractRequiredParameter;
|
||||
|
||||
import com.google.domain.registry.request.Parameter;
|
||||
import com.google.domain.registry.request.RequestParameters;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* Dagger module for injecting common settings for all Backend tasks.
|
||||
*/
|
||||
@Module
|
||||
public class BackendModule {
|
||||
|
||||
@Provides
|
||||
@Parameter(RequestParameters.PARAM_TLD)
|
||||
static String provideTld(HttpServletRequest req) {
|
||||
return assertTldExists(extractRequiredParameter(req, RequestParameters.PARAM_TLD));
|
||||
}
|
||||
}
|
114
java/google/registry/module/backend/BackendRequestComponent.java
Normal file
114
java/google/registry/module/backend/BackendRequestComponent.java
Normal file
|
@ -0,0 +1,114 @@
|
|||
// Copyright 2016 The Domain Registry Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.module.backend;
|
||||
|
||||
import com.google.domain.registry.backup.BackupModule;
|
||||
import com.google.domain.registry.backup.CommitLogCheckpointAction;
|
||||
import com.google.domain.registry.backup.DeleteOldCommitLogsAction;
|
||||
import com.google.domain.registry.backup.ExportCommitLogDiffAction;
|
||||
import com.google.domain.registry.backup.RestoreCommitLogsAction;
|
||||
import com.google.domain.registry.cron.CommitLogFanoutAction;
|
||||
import com.google.domain.registry.cron.CronModule;
|
||||
import com.google.domain.registry.cron.TldFanoutAction;
|
||||
import com.google.domain.registry.dns.DnsModule;
|
||||
import com.google.domain.registry.dns.PublishDnsUpdatesAction;
|
||||
import com.google.domain.registry.dns.ReadDnsQueueAction;
|
||||
import com.google.domain.registry.dns.RefreshDnsAction;
|
||||
import com.google.domain.registry.dns.WriteDnsAction;
|
||||
import com.google.domain.registry.export.BigqueryPollJobAction;
|
||||
import com.google.domain.registry.export.ExportDomainListsAction;
|
||||
import com.google.domain.registry.export.ExportRequestModule;
|
||||
import com.google.domain.registry.export.ExportReservedTermsAction;
|
||||
import com.google.domain.registry.export.LoadSnapshotAction;
|
||||
import com.google.domain.registry.export.SyncGroupMembersAction;
|
||||
import com.google.domain.registry.export.UpdateSnapshotViewAction;
|
||||
import com.google.domain.registry.export.sheet.SheetModule;
|
||||
import com.google.domain.registry.export.sheet.SyncRegistrarsSheetAction;
|
||||
import com.google.domain.registry.flows.async.AsyncFlowsModule;
|
||||
import com.google.domain.registry.flows.async.DeleteContactResourceAction;
|
||||
import com.google.domain.registry.flows.async.DeleteHostResourceAction;
|
||||
import com.google.domain.registry.flows.async.DnsRefreshForHostRenameAction;
|
||||
import com.google.domain.registry.mapreduce.MapreduceModule;
|
||||
import com.google.domain.registry.monitoring.whitebox.MetricsExportAction;
|
||||
import com.google.domain.registry.monitoring.whitebox.VerifyEntityIntegrityAction;
|
||||
import com.google.domain.registry.monitoring.whitebox.WhiteboxModule;
|
||||
import com.google.domain.registry.rde.BrdaCopyAction;
|
||||
import com.google.domain.registry.rde.RdeModule;
|
||||
import com.google.domain.registry.rde.RdeReportAction;
|
||||
import com.google.domain.registry.rde.RdeReporter;
|
||||
import com.google.domain.registry.rde.RdeStagingAction;
|
||||
import com.google.domain.registry.rde.RdeUploadAction;
|
||||
import com.google.domain.registry.request.RequestModule;
|
||||
import com.google.domain.registry.request.RequestScope;
|
||||
import com.google.domain.registry.tmch.NordnUploadAction;
|
||||
import com.google.domain.registry.tmch.NordnVerifyAction;
|
||||
import com.google.domain.registry.tmch.TmchCrlAction;
|
||||
import com.google.domain.registry.tmch.TmchDnlAction;
|
||||
import com.google.domain.registry.tmch.TmchModule;
|
||||
import com.google.domain.registry.tmch.TmchSmdrlAction;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
/** Dagger component with per-request lifetime for "backend" App Engine module. */
|
||||
@RequestScope
|
||||
@Subcomponent(
|
||||
modules = {
|
||||
AsyncFlowsModule.class,
|
||||
BackendModule.class,
|
||||
BackupModule.class,
|
||||
CronModule.class,
|
||||
DnsModule.class,
|
||||
ExportRequestModule.class,
|
||||
MapreduceModule.class,
|
||||
RdeModule.class,
|
||||
RequestModule.class,
|
||||
SheetModule.class,
|
||||
TmchModule.class,
|
||||
WhiteboxModule.class,
|
||||
})
|
||||
interface BackendRequestComponent {
|
||||
BigqueryPollJobAction bigqueryPollJobAction();
|
||||
BrdaCopyAction brdaCopyAction();
|
||||
CommitLogCheckpointAction commitLogCheckpointAction();
|
||||
CommitLogFanoutAction commitLogFanoutAction();
|
||||
DeleteContactResourceAction deleteContactResourceAction();
|
||||
DeleteHostResourceAction deleteHostResourceAction();
|
||||
DeleteOldCommitLogsAction deleteOldCommitLogsAction();
|
||||
DnsRefreshForHostRenameAction dnsRefreshForHostRenameAction();
|
||||
ExportCommitLogDiffAction exportCommitLogDiffAction();
|
||||
ExportDomainListsAction exportDomainListsAction();
|
||||
ExportReservedTermsAction exportReservedTermsAction();
|
||||
LoadSnapshotAction loadSnapshotAction();
|
||||
MetricsExportAction metricsExportAction();
|
||||
NordnUploadAction nordnUploadAction();
|
||||
NordnVerifyAction nordnVerifyAction();
|
||||
PublishDnsUpdatesAction publishDnsUpdatesAction();
|
||||
ReadDnsQueueAction readDnsQueueAction();
|
||||
RdeReportAction rdeReportAction();
|
||||
RdeStagingAction rdeStagingAction();
|
||||
RdeUploadAction rdeUploadAction();
|
||||
RdeReporter rdeReporter();
|
||||
RefreshDnsAction refreshDnsAction();
|
||||
RestoreCommitLogsAction restoreCommitLogsAction();
|
||||
SyncGroupMembersAction syncGroupMembersAction();
|
||||
SyncRegistrarsSheetAction syncRegistrarsSheetAction();
|
||||
TldFanoutAction tldFanoutAction();
|
||||
TmchCrlAction tmchCrlAction();
|
||||
TmchDnlAction tmchDnlAction();
|
||||
TmchSmdrlAction tmchSmdrlAction();
|
||||
UpdateSnapshotViewAction updateSnapshotViewAction();
|
||||
WriteDnsAction writeDnsAction();
|
||||
VerifyEntityIntegrityAction verifyEntityIntegrityAction();
|
||||
}
|
58
java/google/registry/module/backend/BackendServlet.java
Normal file
58
java/google/registry/module/backend/BackendServlet.java
Normal file
|
@ -0,0 +1,58 @@
|
|||
// Copyright 2016 The Domain Registry Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package com.google.domain.registry.module.backend;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.domain.registry.request.RequestHandler;
|
||||
import com.google.domain.registry.request.RequestModule;
|
||||
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.Security;
|
||||
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/** Servlet that should handle all requests to our "backend" App Engine module. */
|
||||
public final class BackendServlet extends HttpServlet {
|
||||
|
||||
private static final BackendComponent component = DaggerBackendComponent.create();
|
||||
|
||||
private static final RequestHandler<BackendRequestComponent> requestHandler =
|
||||
RequestHandler.create(BackendRequestComponent.class, FluentIterable
|
||||
.from(asList(BackendRequestComponent.class.getMethods()))
|
||||
.transform(new Function<Method, Method>() {
|
||||
@Override
|
||||
public Method apply(Method method) {
|
||||
method.setAccessible(true); // Make App Engine's security manager happy.
|
||||
return method;
|
||||
}}));
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
Security.addProvider(new BouncyCastleProvider());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void service(HttpServletRequest req, HttpServletResponse rsp) throws IOException {
|
||||
requestHandler.handleRequest(req, rsp, component.startRequest(new RequestModule(req, rsp)));
|
||||
}
|
||||
}
|
16
java/google/registry/module/backend/package-info.java
Normal file
16
java/google/registry/module/backend/package-info.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2016 The Domain Registry Authors. All Rights Reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
@javax.annotation.ParametersAreNonnullByDefault
|
||||
package com.google.domain.registry.module.backend;
|
Loading…
Add table
Add a link
Reference in a new issue