code
stringlengths
23
201k
docstring
stringlengths
17
96.2k
func_name
stringlengths
0
235
language
stringclasses
1 value
repo
stringlengths
8
72
path
stringlengths
11
317
url
stringlengths
57
377
license
stringclasses
7 values
@Override public int hashCode() { return (int) (id ^ (id >>> 32)); }
Understands a pipeline which can be compared based on its material checkin (natural) order
hashCode
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
@Override public String toString() { return "PipelineTimelineEntry{" + "pipelineName='" + pipelineName + '\'' + ", id=" + id + ", counter=" + counter + ", revisions=" + revisions + ", naturalOrder=" + naturalOrder + ...
Understands a pipeline which can be compared based on its material checkin (natural) order
toString
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
public PipelineTimelineEntry previous() { return insertedAfter(); }
Understands a pipeline which can be compared based on its material checkin (natural) order
previous
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
public double naturalOrder() { return naturalOrder; }
Understands a pipeline which can be compared based on its material checkin (natural) order
naturalOrder
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
public void updateNaturalOrder() { double calculatedOrder = calculateNaturalOrder(); if (this.naturalOrder > 0.0 && this.naturalOrder != calculatedOrder) { bomb(String.format("Calculated natural ordering %s is not the same as the existing naturalOrder %s, for pipeline %s, with id %s", calcul...
Understands a pipeline which can be compared based on its material checkin (natural) order
updateNaturalOrder
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
public boolean hasBeenUpdated() { return this.hasBeenUpdated; }
Understands a pipeline which can be compared based on its material checkin (natural) order
hasBeenUpdated
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
private double calculateNaturalOrder() { double previous = 0.0; if (insertedAfter != null) { previous = insertedAfter.naturalOrder; } if (insertedBefore != null) { return (previous + insertedBefore.naturalOrder) / 2.0; } else { return previous ...
Understands a pipeline which can be compared based on its material checkin (natural) order
calculateNaturalOrder
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
public PipelineIdentifier getPipelineLocator() { return new PipelineIdentifier(pipelineName, counter, null); }
Understands a pipeline which can be compared based on its material checkin (natural) order
getPipelineLocator
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
public Map<String, List<Revision>> revisions() { return revisions; }
Understands a pipeline which can be compared based on its material checkin (natural) order
revisions
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Revision revision1 = (Revision) o; return Objects.equals(date, revi...
Understands a pipeline which can be compared based on its material checkin (natural) order
equals
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
@Override public int hashCode() { int result = date != null ? date.hashCode() : 0; result = 31 * result + (revision != null ? revision.hashCode() : 0); result = 31 * result + (folder != null ? folder.hashCode() : 0); return result; }
Understands a pipeline which can be compared based on its material checkin (natural) order
hashCode
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
@Override public String toString() { return "Revision{" + "date=" + date + ", revision='" + revision + '\'' + ", folder='" + folder + '\'' + '}'; }
Understands a pipeline which can be compared based on its material checkin (natural) order
toString
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
public boolean lessThan(Revision revision) { if (this == revision) { return true; } return date.compareTo(revision.date) < 0; }
Understands a pipeline which can be compared based on its material checkin (natural) order
lessThan
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/PipelineTimelineEntry.java
Apache-2.0
public String getMatcher() { return matcher; }
only used by ibatis @java.lang.Deprecated
getMatcher
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public List<String> getMatchers() { List<String> matchers = new Matcher(matcher).toCollection(); Collections.sort(matchers); return matchers; }
only used by ibatis @java.lang.Deprecated
getMatchers
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public String getEmail() { return email; }
only used by ibatis @java.lang.Deprecated
getEmail
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void setEmail(String email) { this.email = StringUtils.trim(email); }
only used by ibatis @java.lang.Deprecated
setEmail
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void setMatcher(String matcher) { this.matcher = new Matcher(matcher).toString(); }
only used by ibatis @java.lang.Deprecated
setMatcher
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
boolean matchModification(MaterialRevisions materialRevisions) { if (StringUtils.isEmpty(this.matcher)) { return false; } return materialRevisions.containsMyCheckin(new Matcher(matcher)); }
only used by ibatis @java.lang.Deprecated
matchModification
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public boolean matchNotification(StageConfigIdentifier stageIdentifier, StageEvent event, MaterialRevisions materialRevisions) { if (!shouldSendEmailToMe()) { return false; } for (NotificationFilter filter : notificationFilters) { if (...
only used by ibatis @java.lang.Deprecated
matchNotification
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } User user = (User) o; if (emailMe != user.emailMe) { return false; } if (ena...
only used by ibatis @java.lang.Deprecated
equals
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (displayName != null ? displayName.hashCode() : 0); result = 31 * result + (matcher != null ? matcher.hashCode() : 0); result =...
only used by ibatis @java.lang.Deprecated
hashCode
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
@Override public String toString() { return String.format("User[name=%s, displayName= %s, matcher=%s, email=%s, emailMe=%s]", name, displayName, matcher, email, emailMe); }
only used by ibatis @java.lang.Deprecated
toString
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public List<NotificationFilter> getNotificationFilters() { return notificationFilters; }
only used by ibatis @java.lang.Deprecated
getNotificationFilters
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void setNotificationFilters(List<NotificationFilter> notificationFilters) { this.notificationFilters = notificationFilters; }
only used by ibatis @java.lang.Deprecated
setNotificationFilters
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
private boolean shouldSendEmailToMe() { return isEmailMe() && !StringUtils.isEmpty(email); }
only used by ibatis @java.lang.Deprecated
shouldSendEmailToMe
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void populateModel(Map<String, Object> model) { model.put("matchers", matcher()); model.put("email", email); model.put("emailMe", emailMe); model.put("notificationFilters", notificationFilters); }
only used by ibatis @java.lang.Deprecated
populateModel
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public Matcher matcher() { return new Matcher(matcher); }
only used by ibatis @java.lang.Deprecated
matcher
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
private void validate(Validator<String> validator, String valueToValidate) throws ValidationException { ValidationBean validationBean = validator.validate(valueToValidate); if (!validationBean.isValid()) { throw new ValidationException(validationBean.getError()); } }
only used by ibatis @java.lang.Deprecated
validate
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void validateMatcher() throws ValidationException { validate(Validator.lengthValidator(255), getMatcher()); }
only used by ibatis @java.lang.Deprecated
validateMatcher
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void validateEmail() throws ValidationException { validate(Validator.lengthValidator(255), getEmail()); validate(Validator.emailValidator(), getEmail()); }
only used by ibatis @java.lang.Deprecated
validateEmail
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void validateLoginName() throws ValidationException { validate(Validator.presenceValidator("Login name field must be non-blank."), getName()); }
only used by ibatis @java.lang.Deprecated
validateLoginName
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public boolean isEnabled() { return enabled; }
only used by ibatis @java.lang.Deprecated
isEnabled
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void disable() { this.enabled = false; }
only used by ibatis @java.lang.Deprecated
disable
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void enable() { this.enabled = true; }
only used by ibatis @java.lang.Deprecated
enable
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public boolean isAnonymous() { return this.name.equals(CaseInsensitiveString.str(Username.ANONYMOUS.getUsername())); }
only used by ibatis @java.lang.Deprecated
isAnonymous
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void addNotificationFilter(NotificationFilter another) { checkForDuplicates(another); notificationFilters.add(another); }
only used by ibatis @java.lang.Deprecated
addNotificationFilter
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
private void checkForDuplicates(NotificationFilter another) { for (NotificationFilter filter : notificationFilters) { if (filter.include(another)) { String message = format("Duplicate notification filter found for: {pipeline: \"%s\", stage: \"%s\", event: \"%s\"}", ...
only used by ibatis @java.lang.Deprecated
checkForDuplicates
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void updateNotificationFilter(NotificationFilter notificationFilter) { Optional<NotificationFilter> optionalFilter = notificationFilters.stream() .filter(filter -> filter.getId() == notificationFilter.getId()) .findFirst(); if (optionalFilter.isEmpty()) { thro...
only used by ibatis @java.lang.Deprecated
updateNotificationFilter
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public void removeNotificationFilter(final long filterId) { List<NotificationFilter> toBeDeleted = notificationFilters.stream().filter(filter1 -> filter1.getId() == filterId).toList(); notificationFilters.removeAll(toBeDeleted); }
only used by ibatis @java.lang.Deprecated
removeNotificationFilter
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
public boolean hasSubscribedFor(String pipelineName, String stageName) { for (NotificationFilter notificationFilter : notificationFilters) { if (notificationFilter.appliesTo(pipelineName, stageName)) { return true; } } return false; }
only used by ibatis @java.lang.Deprecated
hasSubscribedFor
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/User.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/User.java
Apache-2.0
private void extractFrom(PluggableTask task) { PluginConfiguration pluginConfiguration = task.getPluginConfiguration(); pluginId = pluginConfiguration.getId(); pluginConfig = task.configAsMap(); }
This class is serialized and sent over wire to agents. Please watch out what you store as fields. Do not serialize PluggableTask
extractFrom
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
Apache-2.0
@Override public void build(final DefaultGoPublisher publisher, final EnvironmentVariableContext environmentVariableContext, TaskExtension taskExtension, ArtifactExtension artifactExtension, PluginRequestProcessorRegistry pluginRequestProcessorRegistry, Charset consoleLogCharset) { Exe...
This class is serialized and sent over wire to agents. Please watch out what you store as fields. Do not serialize PluggableTask
build
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
Apache-2.0
protected ExecutionResult executeTask(Task task, DefaultGoPublisher publisher, EnvironmentVariableContext environmentVariableContext, Charset consoleLogCharset) { final TaskExecutionContext taskExecutionContext = buildTaskContex...
This class is serialized and sent over wire to agents. Please watch out what you store as fields. Do not serialize PluggableTask
executeTask
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
Apache-2.0
protected TaskExecutionContext buildTaskContext(DefaultGoPublisher publisher, EnvironmentVariableContext environmentVariableContext, Charset consoleLogCharset) { CompositeConsumer errorStreamConsumer = new CompositeConsumer(CompositeConsumer.ERR, publisher);...
This class is serialized and sent over wire to agents. Please watch out what you store as fields. Do not serialize PluggableTask
buildTaskContext
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
Apache-2.0
protected TaskConfig buildTaskConfig(TaskConfig config) { TaskConfig taskExecConfig = new TaskConfig(); for (Property property : config.list()) { taskExecConfig.add(getExecProperty(config, property)); } return taskExecConfig; }
This class is serialized and sent over wire to agents. Please watch out what you store as fields. Do not serialize PluggableTask
buildTaskConfig
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
Apache-2.0
private Property getExecProperty(TaskConfig defaultConfig, Property property) { String key = property.getKey(); String configValue = pluginConfig.get(key) == null ? null : pluginConfig.get(key).get(PluggableTask.VALUE_KEY); return StringUtils.isBlank(configValue) ? defaultConfig.get(key) : new T...
This class is serialized and sent over wire to agents. Please watch out what you store as fields. Do not serialize PluggableTask
getExecProperty
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/domain/builder/pluggableTask/PluggableTaskBuilder.java
Apache-2.0
public void setJobId(Long jobId) { this.jobId = jobId; }
It's at times like this that I get sick of Java
setJobId
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/dto/DurationBean.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/dto/DurationBean.java
Apache-2.0
public void setDuration(long duration) { this.duration = duration; }
It's at times like this that I get sick of Java
setDuration
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/dto/DurationBean.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/dto/DurationBean.java
Apache-2.0
public long getDuration() { return duration; }
It's at times like this that I get sick of Java
getDuration
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/dto/DurationBean.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/dto/DurationBean.java
Apache-2.0
public Long getJobId() { return jobId; }
It's at times like this that I get sick of Java
getJobId
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/dto/DurationBean.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/dto/DurationBean.java
Apache-2.0
public static String cannotDeleteResourceBecauseOfDependentPipelines(String resourceTypeBeingDeleted, CaseInsensitiveString resourceNameBeingDeleted, List<String> dependentPipelines) { return cannotDeleteResourceBecauseOfDependentPipelines(resourceTypeBeingDeleted, resourceNameBeingDeleted.toString(), dependent...
Understands converting the localized message for a given key
cannotDeleteResourceBecauseOfDependentPipelines
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String cannotDeleteResourceBecauseOfDependentPipelines(String resourceTypeBeingDeleted, String resourceNameBeingDeleted, List<String> dependentPipelines) { return "Cannot delete the " + resourceTypeBeingDeleted + " '" + resourceNameBeingDeleted + "' as it is used by pipeline(s): '" + join(dependen...
Understands converting the localized message for a given key
cannotDeleteResourceBecauseOfDependentPipelines
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String cannotDeleteResourceBecauseOfDependentResources(String resourceTypeBeingDeleted, String resourceNameBeingDeleted, String dependentResourceType, List<String> dependentResourceUUIDs) { return String.format("Cannot delete %s '%s' as it is referenced from %s(s) [%s]", resourceTypeBeingDeleted, ...
Understands converting the localized message for a given key
cannotDeleteResourceBecauseOfDependentResources
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToDelete(String resourceType, CaseInsensitiveString resourceName) { return forbiddenToDelete(resourceType, resourceName.toString()); }
Understands converting the localized message for a given key
forbiddenToDelete
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToDelete(String resourceType, String resourceName) { return "Unauthorized to delete " + resourceType + "' " + resourceName + "'"; }
Understands converting the localized message for a given key
forbiddenToDelete
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String staleResourceConfig(String resourceType, String resourceName) { return "Someone has modified the configuration for " + resourceType + " '" + resourceName + "'. Please update your copy of the config with the changes."; }
Understands converting the localized message for a given key
staleResourceConfig
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String staleResourceConfig(String resourceType, CaseInsensitiveString resourceName) { return staleResourceConfig(resourceType, resourceName.toString()); }
Understands converting the localized message for a given key
staleResourceConfig
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToViewPipeline(CaseInsensitiveString pipelineName) { return forbiddenToViewPipeline(pipelineName.toString()); }
Understands converting the localized message for a given key
forbiddenToViewPipeline
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToViewPipeline(String pipelineName) { return "You do not have view permissions for pipeline '" + pipelineName + "'."; }
Understands converting the localized message for a given key
forbiddenToViewPipeline
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String modifiedBy(String who, String when) { return who + " on " + when; }
Understands converting the localized message for a given key
modifiedBy
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String resourceNotFound(String resourceType, String resourceName) { return resourceType + " '" + resourceName + "' not found."; }
Understands converting the localized message for a given key
resourceNotFound
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String resourceNotFound(String resourceType, CaseInsensitiveString resourceName) { return resourceNotFound(resourceType, resourceName.toString()); }
Understands converting the localized message for a given key
resourceNotFound
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToEditGroup(String groupName) { return "Unauthorized to edit '" + groupName + "' group."; }
Understands converting the localized message for a given key
forbiddenToEditGroup
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToEdit() { return "Unauthorized to edit."; }
Understands converting the localized message for a given key
forbiddenToEdit
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToEditPipeline(String pipelineName) { return "Unauthorized to edit '" + pipelineName + "' pipeline."; }
Understands converting the localized message for a given key
forbiddenToEditPipeline
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToEditPipeline(CaseInsensitiveString pipelineName) { return forbiddenToEditPipeline(pipelineName.toString()); }
Understands converting the localized message for a given key
forbiddenToEditPipeline
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToEditResource(String resourceType, String resourceName, String username) { return String.format("Failed to access %s '%s'. User '%s' does not have permission to access %s.", resourceType, resourceName, username, resourceType); }
Understands converting the localized message for a given key
forbiddenToEditResource
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String forbiddenToEditResource(String resourceType, CaseInsensitiveString resourceName, String username) { return forbiddenToEditResource(resourceType, resourceName.toString(), username); }
Understands converting the localized message for a given key
forbiddenToEditResource
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String resourceAlreadyExists(String resourceType, String resourceName) { return "Failed to add " + resourceType + ". The " + resourceType + " '" + resourceName + "' already exists."; }
Understands converting the localized message for a given key
resourceAlreadyExists
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String resourceAlreadyExists(String resourceType, CaseInsensitiveString resourceName) { return resourceAlreadyExists(resourceType, resourceName.toString()); }
Understands converting the localized message for a given key
resourceAlreadyExists
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String tooltipBuildFilePath(String toolName) { if (toolName.equalsIgnoreCase("ANT")) { return "Path to Ant build file. If not specified, the path defaults to 'build.xml'."; } if (toolName.equalsIgnoreCase("NANT")) { return "Relative path to a NAnt build file...
Understands converting the localized message for a given key
tooltipBuildFilePath
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String tooltipDefaultTarget(String toolName) { if (toolName.equalsIgnoreCase("ANT")) { return "Ant target(s) to run. If not specified, the target defaults to 'default'."; } if (toolName.equalsIgnoreCase("NANT")) { return "NAnt target(s) to run. If not specif...
Understands converting the localized message for a given key
tooltipDefaultTarget
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String renamingNotAllowed(String resourceType) { return "Renaming the " + resourceType + " resource is not supported by this API."; }
Understands converting the localized message for a given key
renamingNotAllowed
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String userOperationSuccessful(String operation, int count) { if (operation.equalsIgnoreCase("ENABLE")) { return "Enabled " + count + " user(s) successfully."; } if (operation.equalsIgnoreCase("DISABLE")) { return "Disabled " + count + " user(s) successfully...
Understands converting the localized message for a given key
userOperationSuccessful
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String entityConfigValidationFailed(String entityType, String entityName, String errors) { return "Validations failed for " + entityType + " '" + entityName + "'. Error(s): [" + errors + "]. Please correct and resubmit."; }
Understands converting the localized message for a given key
entityConfigValidationFailed
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String entityConfigValidationFailed(String entityType, String errors) { return "Validations failed for " + entityType + ". Error(s): [" + errors + "]. Please correct and resubmit."; }
Understands converting the localized message for a given key
entityConfigValidationFailed
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String entityConfigValidationFailed(String entityType, CaseInsensitiveString entityName, String errors) { return entityConfigValidationFailed(entityType, entityName.toString(), errors); }
Understands converting the localized message for a given key
entityConfigValidationFailed
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String saveFailedWithReason(String reason) { return "Save failed. " + reason; }
Understands converting the localized message for a given key
saveFailedWithReason
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String composite(String... messages) { return join(messages, " "); }
Understands converting the localized message for a given key
composite
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String resourceDeleteSuccessful(String entityType, String entityName) { return "The " + entityType + " '" + entityName + "' was deleted successfully."; }
Understands converting the localized message for a given key
resourceDeleteSuccessful
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String resourceDeleteSuccessful(String entityType, CaseInsensitiveString entityName) { return resourceDeleteSuccessful(entityType, entityName.toString()); }
Understands converting the localized message for a given key
resourceDeleteSuccessful
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public static String resourcesDeleteSuccessful(String entityType, List<String> names) { return entityType + " '" + join(names, ", ") + "' were deleted successfully."; }
Understands converting the localized message for a given key
resourcesDeleteSuccessful
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/i18n/LocalizedMessage.java
Apache-2.0
public String getValue() { return value; }
Understands What values are selected on multiple agents
getValue
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
public Action getAction() { return action; }
Understands What values are selected on multiple agents
getAction
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
public boolean isEnabled() { return enabled; }
Understands What values are selected on multiple agents
isEnabled
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
public static List<TriStateSelection> forAgentsResources(Set<ResourceConfig> resourceConfigs, Agents agents) { return convert(resourceConfigs, agents, new Assigner<>() { @Override public boolean shouldAssociate(Agent agent, ResourceConfig resourceConfig) { return agent.ge...
Understands What values are selected on multiple agents
forAgentsResources
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public boolean shouldAssociate(Agent agent, ResourceConfig resourceConfig) { return agent.getResourcesAsList().contains(resourceConfig.getName()); }
Understands What values are selected on multiple agents
shouldAssociate
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public String identifier(ResourceConfig resourceConfig) { return resourceConfig.getName(); }
Understands What values are selected on multiple agents
identifier
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public boolean shouldEnable(Agent agent, ResourceConfig resourceConfig) { return true; }
Understands What values are selected on multiple agents
shouldEnable
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
public static List<TriStateSelection> forRoles(Set<Role> allRoles, List<String> users) { return convert(allRoles, users, new Assigner<>() { @Override public boolean shouldAssociate(String user, Role role) { return role.hasMember(new CaseInsensitiveString(user)); ...
Understands What values are selected on multiple agents
forRoles
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public boolean shouldAssociate(String user, Role role) { return role.hasMember(new CaseInsensitiveString(user)); }
Understands What values are selected on multiple agents
shouldAssociate
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public String identifier(Role role) { return CaseInsensitiveString.str(role.getName()); }
Understands What values are selected on multiple agents
identifier
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public boolean shouldEnable(String user, Role role) { return true; }
Understands What values are selected on multiple agents
shouldEnable
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
public static TriStateSelection forSystemAdmin(final AdminsConfig adminsConfig, final Set<Role> allRoles, final UserRoleMatcher userRoleMatcher, List<String> users) { return convert(Set.of(Admin.GO_SYSTEM_ADMIN), users, new Assigner<>() { @Override public boolean shouldAssociate(String u...
Understands What values are selected on multiple agents
forSystemAdmin
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public boolean shouldAssociate(String userName, String ignore) { return adminsConfig.hasUser(new CaseInsensitiveString(userName), userRoleMatcher); }
Understands What values are selected on multiple agents
shouldAssociate
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public String identifier(String ignore) { return Admin.GO_SYSTEM_ADMIN; }
Understands What values are selected on multiple agents
identifier
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public boolean shouldEnable(String userName, String ignore) { List<Role> roles = new ArrayList<>(); for (Role role : allRoles) { if (role.hasMember(new CaseInsensitiveString(userName))) { roles.add(role); ...
Understands What values are selected on multiple agents
shouldEnable
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
static <T,V> List<TriStateSelection> convert(Set<T> assignables, List<V> assignees, Assigner<T,V> associator) { List<TriStateSelection> selections = new ArrayList<>(); for (T t : assignables) { int count = 0; boolean enabled = true; for (V assignee : assignees) { ...
Understands What values are selected on multiple agents
convert
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TriStateSelection that = (TriStateSelection) o; if (action != null ? !action.equals(that.action) : that...
Understands What values are selected on multiple agents
equals
java
gocd/gocd
common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
https://github.com/gocd/gocd/blob/master/common/src/main/java/com/thoughtworks/go/presentation/TriStateSelection.java
Apache-2.0