mirror of
https://github.com/google/nomulus.git
synced 2025-05-01 12:37:52 +02:00
This adds the terminal step of the Spec11 pipeline- processing the output of the Beam pipeline to send an e-mail to each registrar informing them of identified 'bad urls.' This also factors out methods common between invoicing (which uses similar beam pipeline tools) and spec11 to the common superpackage ReportingModule + ReportingUtils classes. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=210932496
42 lines
1.4 KiB
Java
42 lines
1.4 KiB
Java
// Copyright 2018 The Nomulus 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 google.registry.reporting.spec11;
|
|
|
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
|
|
import dagger.Module;
|
|
import dagger.Provides;
|
|
import google.registry.beam.spec11.Spec11Pipeline;
|
|
import java.lang.annotation.Documented;
|
|
import java.lang.annotation.Retention;
|
|
import javax.inject.Qualifier;
|
|
import org.joda.time.YearMonth;
|
|
|
|
/** Module for dependencies required by Spec11 reporting. */
|
|
@Module
|
|
public class Spec11Module {
|
|
|
|
@Provides
|
|
@Spec11ReportDirectory
|
|
static String provideDirectoryPrefix(YearMonth yearMonth) {
|
|
return Spec11Pipeline.getSpec11Subdirectory(yearMonth.toString("yyyy-MM"));
|
|
}
|
|
|
|
/** Dagger qualifier for the subdirectory we stage to/upload from for Spec11 reports. */
|
|
@Qualifier
|
|
@Documented
|
|
@Retention(RUNTIME)
|
|
@interface Spec11ReportDirectory {}
|
|
}
|