@Inject public GitElasticsearchClient(@ConfigProperty(name = "ELASTICSEARCH_HOST", defaultValue = "http://elasticsearch") String elasticsearchHost, @ConfigProperty(name = "ELASTICSEARCH_SERVICE_PORT") String elasticsearchPort, @ConfigProperty(name = "GIT_COLLECTOR_USERNAME") String username, @ConfigProperty(name = "GIT_COLLECTOR_PASSWORD") String password) { super(elasticsearchHost, elasticsearchPort, username, password); }
@Inject public HubotNotifier(@ConfigProperty(name = "HUBOT_USERNAME") String username, @ConfigProperty(name = "HUBOT_PASSWORD") String password, @ConfigProperty(name = "HUBOT_BUILD_ROOM", defaultValue = DEFAULT_ROOM_EXPRESSION) String roomExpression) { this.username = username; this.password = password; this.roomExpression = roomExpression; }
@Inject public GitUserHelper(@ConfigProperty(name = "JENKINS_GOGS_USER") String gitUser, @ConfigProperty(name = "JENKINS_GOGS_PASSWORD") String gitPassword, KubernetesClient kubernetesClient) { this.gitUser = gitUser; this.gitPassword = gitPassword; this.kubernetesClient = kubernetesClient; }
@Inject public ProcessManagerService(@ConfigProperty(name = "JUBE_PROCESS_DIR", defaultValue = "./processes") String storageLocation, @ConfigProperty(name = "JUBE_REMOTE_MAVEN_REPOS", defaultValue = DEFAULT_MAVEN_REPOS) String remoteRepositoryUrls, @ConfigProperty(name = "JUBE_PORT_START", defaultValue = "" + AvailablePortFinder.MIN_PORT_NUMBER) int minPort) throws MalformedObjectNameException, IOException { this(new File(storageLocation), remoteRepositoryUrls, minPort); }
@Inject public GitCollector(@ConfigProperty(name = "GIT_COLLECTOR_WORK_DIRECTORY", defaultValue = "gitCollectorWorkDir") String cloneFolder, @ConfigProperty(name = "GIT_COLLECTOR_SLEEP_PERIOD_MILLIS", defaultValue = "60000") long sleepPeriodMillis, @ConfigProperty(name = "GIT_COLLECTOR_COMMIT_LIMIT_PER_POLL", defaultValue = "100") int commitLimitPerPoll, GitElasticsearchClient elasticsearchClient) throws Exception { this.processor = new GitBuildConfigProcessor(elasticsearchClient, new File(cloneFolder), commitLimitPerPoll); this.collectors = new BuildConfigCollectors(processor, sleepPeriodMillis); this.watcher = new BuildConfigWatcher(collectors); } }
@Inject public ProjectsModel(@ConfigProperty(name = "FORGE_PROJECTS_DIRECTORY", defaultValue = "forgeProjects") String projectsFolder) throws IOException { this.projectsDir = new File(projectsFolder); this.projectsDir.mkdirs(); this.projectsFile = new File(projectsDir, "projects.json"); this.projects = Models.loadJsonValues(projectsFile, ProjectDTO.class); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public String produceStringConfiguration(InjectionPoint injectionPoint) { return getStringPropertyValue(injectionPoint); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Integer produceIntegerConfiguration(InjectionPoint injectionPoint) { return getPropertyWithException(injectionPoint, Integer.class); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Double produceDoubleConfiguration(InjectionPoint injectionPoint) { return getPropertyWithException(injectionPoint, Double.class); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Set<String> produceStringSetConfiguration(InjectionPoint injectionPoint) { String propertyValue = getStringPropertyValue(injectionPoint); String[] values = StringUtils.split(propertyValue, ","); return values == null ? Collections.emptySet() : new HashSet<>(Arrays.asList(values)); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Class produceClassConfiguration(InjectionPoint injectionPoint) { return getPropertyWithException(injectionPoint, Class.class); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Boolean produceBooleanConfiguration(InjectionPoint injectionPoint) { return getPropertyWithException(injectionPoint, Boolean.class); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Float produceFloatConfiguration(InjectionPoint injectionPoint) { return getPropertyWithException(injectionPoint, Float.class); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public List<String> produceStringListConfiguration(InjectionPoint injectionPoint) { String propertyValue = getStringPropertyValue(injectionPoint); String[] values = StringUtils.split(propertyValue, ","); return values == null ? Collections.emptyList() : Arrays.asList(values); }
@Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Long produceLongConfiguration(InjectionPoint injectionPoint) { return getPropertyWithException(injectionPoint, Long.class); }
@Inject public SettingsBean(@ConfigProperty(name= PROPERTY_NAME) Long property2) { this.property2 = property2; }
@Produces @ConfigProperty(name = "ignored") public Object create(final InjectionPoint ip) { return super.getUntypedPropertyValue(ip, ip.getType()); } }
@Override @Alternative @Specializes @Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Boolean produceBooleanConfiguration(InjectionPoint injectionPoint) { return super.produceBooleanConfiguration(injectionPoint); }
@Override @Alternative @Specializes @Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Long produceLongConfiguration(InjectionPoint injectionPoint) { return super.produceLongConfiguration(injectionPoint); }
@Override @Alternative @Specializes @Produces @Dependent @ConfigProperty(name = "ignored") // we actually don't need the name public Integer produceIntegerConfiguration(InjectionPoint injectionPoint) { return super.produceIntegerConfiguration(injectionPoint); }