mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +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
42
java/google/registry/module/tools/BUILD
Normal file
42
java/google/registry/module/tools/BUILD
Normal file
|
@ -0,0 +1,42 @@
|
|||
package(
|
||||
default_visibility = ["//java/com/google/domain/registry:registry_project"],
|
||||
)
|
||||
|
||||
|
||||
java_library(
|
||||
name = "tools",
|
||||
srcs = glob(["*.java"]),
|
||||
deps = [
|
||||
"//java/com/google/common/base",
|
||||
"//java/com/google/common/collect",
|
||||
"//java/com/google/domain/registry/config",
|
||||
"//java/com/google/domain/registry/export",
|
||||
"//java/com/google/domain/registry/gcs",
|
||||
"//java/com/google/domain/registry/groups",
|
||||
"//java/com/google/domain/registry/keyring/api",
|
||||
"//java/com/google/domain/registry/loadtest",
|
||||
"//java/com/google/domain/registry/mapreduce",
|
||||
"//java/com/google/domain/registry/request",
|
||||
"//java/com/google/domain/registry/request:modules",
|
||||
"//java/com/google/domain/registry/tools/server",
|
||||
"//java/com/google/domain/registry/tools/server/javascrap",
|
||||
"//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 "tools_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 = "tools_jar",
|
||||
create_executable = 0,
|
||||
runtime_deps = [
|
||||
":tools",
|
||||
],
|
||||
)
|
62
java/google/registry/module/tools/ToolsComponent.java
Normal file
62
java/google/registry/module/tools/ToolsComponent.java
Normal file
|
@ -0,0 +1,62 @@
|
|||
// 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.tools;
|
||||
|
||||
import com.google.domain.registry.config.ConfigModule;
|
||||
import com.google.domain.registry.export.DriveModule;
|
||||
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.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.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 "tools" App Engine module. */
|
||||
@Singleton
|
||||
@Component(
|
||||
modules = {
|
||||
AppIdentityCredentialModule.class,
|
||||
ConfigModule.class,
|
||||
DatastoreServiceModule.class,
|
||||
DirectoryModule.class,
|
||||
DriveModule.class,
|
||||
GcsServiceModule.class,
|
||||
GoogleCredentialModule.class,
|
||||
GroupsModule.class,
|
||||
GroupssettingsModule.class,
|
||||
Jackson2Module.class,
|
||||
KeyModule.class,
|
||||
UrlFetchTransportModule.class,
|
||||
UseAppIdentityCredentialForGoogleApisModule.class,
|
||||
SystemClockModule.class,
|
||||
SystemSleeperModule.class,
|
||||
VoidKeyringModule.class,
|
||||
})
|
||||
interface ToolsComponent {
|
||||
ToolsRequestComponent startRequest(RequestModule requestModule);
|
||||
}
|
77
java/google/registry/module/tools/ToolsRequestComponent.java
Normal file
77
java/google/registry/module/tools/ToolsRequestComponent.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
// 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.tools;
|
||||
|
||||
import com.google.domain.registry.export.PublishDetailReportAction;
|
||||
import com.google.domain.registry.loadtest.LoadTestAction;
|
||||
import com.google.domain.registry.loadtest.LoadTestModule;
|
||||
import com.google.domain.registry.mapreduce.MapreduceModule;
|
||||
import com.google.domain.registry.request.RequestModule;
|
||||
import com.google.domain.registry.request.RequestScope;
|
||||
import com.google.domain.registry.tools.server.CreateGroupsAction;
|
||||
import com.google.domain.registry.tools.server.CreatePremiumListAction;
|
||||
import com.google.domain.registry.tools.server.DeleteEntityAction;
|
||||
import com.google.domain.registry.tools.server.DeleteProberDataAction;
|
||||
import com.google.domain.registry.tools.server.GenerateZoneFilesAction;
|
||||
import com.google.domain.registry.tools.server.KillAllCommitLogsAction;
|
||||
import com.google.domain.registry.tools.server.KillAllCrossTldEntitiesAction;
|
||||
import com.google.domain.registry.tools.server.KillAllEppResourcesAction;
|
||||
import com.google.domain.registry.tools.server.ListDomainsAction;
|
||||
import com.google.domain.registry.tools.server.ListHostsAction;
|
||||
import com.google.domain.registry.tools.server.ListPremiumListsAction;
|
||||
import com.google.domain.registry.tools.server.ListRegistrarsAction;
|
||||
import com.google.domain.registry.tools.server.ListReservedListsAction;
|
||||
import com.google.domain.registry.tools.server.ListTldsAction;
|
||||
import com.google.domain.registry.tools.server.ResaveAllEppResourcesAction;
|
||||
import com.google.domain.registry.tools.server.ToolsServerModule;
|
||||
import com.google.domain.registry.tools.server.UpdatePremiumListAction;
|
||||
import com.google.domain.registry.tools.server.VerifyOteAction;
|
||||
import com.google.domain.registry.tools.server.javascrap.BackfillAutorenewBillingFlagAction;
|
||||
import com.google.domain.registry.tools.server.javascrap.CountRecurringBillingEventsAction;
|
||||
|
||||
import dagger.Subcomponent;
|
||||
|
||||
/** Dagger component with per-request lifetime for "tools" App Engine module. */
|
||||
@RequestScope
|
||||
@Subcomponent(
|
||||
modules = {
|
||||
LoadTestModule.class,
|
||||
MapreduceModule.class,
|
||||
RequestModule.class,
|
||||
ToolsServerModule.class,
|
||||
})
|
||||
interface ToolsRequestComponent {
|
||||
BackfillAutorenewBillingFlagAction backfillAutorenewBillingFlagAction();
|
||||
CountRecurringBillingEventsAction countRecurringBillingEventsAction();
|
||||
CreateGroupsAction createGroupsAction();
|
||||
CreatePremiumListAction createPremiumListAction();
|
||||
DeleteEntityAction deleteEntityAction();
|
||||
DeleteProberDataAction deleteProberDataAction();
|
||||
GenerateZoneFilesAction generateZoneFilesAction();
|
||||
KillAllCommitLogsAction killAllCommitLogsAction();
|
||||
KillAllCrossTldEntitiesAction killAllCrossTldEntitiesAction();
|
||||
KillAllEppResourcesAction killAllEppResourcesAction();
|
||||
ListDomainsAction listDomainsAction();
|
||||
ListHostsAction listHostsAction();
|
||||
ListPremiumListsAction listPremiumListsAction();
|
||||
ListRegistrarsAction listRegistrarsAction();
|
||||
ListReservedListsAction listReservedListsAction();
|
||||
ListTldsAction listTldsAction();
|
||||
LoadTestAction loadTestAction();
|
||||
PublishDetailReportAction publishDetailReportAction();
|
||||
ResaveAllEppResourcesAction resaveAllEppResourcesAction();
|
||||
UpdatePremiumListAction updatePremiumListAction();
|
||||
VerifyOteAction verifyOteAction();
|
||||
}
|
58
java/google/registry/module/tools/ToolsServlet.java
Normal file
58
java/google/registry/module/tools/ToolsServlet.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.tools;
|
||||
|
||||
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 "tools" App Engine module. */
|
||||
public final class ToolsServlet extends HttpServlet {
|
||||
|
||||
private static final ToolsComponent component = DaggerToolsComponent.create();
|
||||
|
||||
private static final RequestHandler<ToolsRequestComponent> requestHandler =
|
||||
RequestHandler.create(ToolsRequestComponent.class, FluentIterable
|
||||
.from(asList(ToolsRequestComponent.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)));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue