Codota Logo
com.linecorp.centraldogma.common
Code IndexAdd Codota to your IDE (free)

How to use com.linecorp.centraldogma.common

Best Java code snippets using com.linecorp.centraldogma.common (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: com.linecorp.centraldogma/centraldogma-common-shaded

/**
 * Returns the {@link RevisionRange} whose major value of {@code from} {@link Revision} is lower than
 * or equal to the major value of {@code to} {@link Revision}.
 *
 * @throws IllegalStateException if the {@code from} and {@code to} {@link Revision}s are in the
 *                               different state. They should be either absolute or relative.
 */
public RevisionRange toAscending() {
  if (isAscending() || from.equals(to)) {
    return this;
  }
  return new RevisionRange(to, from);
}
origin: line/centraldogma

@Override
public int hashCode() {
  return (revision.hashCode() * 31 + author.hashCode()) * 31 + (int) (when / 1000);
}
origin: line/centraldogma

/**
 * Returns a newly-created {@link Query} that retrieves the textual content as it is.
 *
 * @param path the path of a file being queried on
 */
static Query<String> ofText(String path) {
  return new IdentityQuery<>(path);
}
origin: line/centraldogma

static EntryDto convert(Entry<?> entry) {
  final EntryDto dto = new EntryDto();
  dto.setRevision(entry.revision().text());
  dto.setPath(entry.path());
  dto.setType(entry.type().name());
  dto.setContent(entry.contentAsText());
  return dto;
}
origin: line/centraldogma

/**
 * Creates a new instance.
 */
public EntryNotFoundException(Revision revision, String path) {
  this(path + " (revision: " + revision.text() + ')');
}
origin: line/centraldogma

/**
 * Returns a newly-created {@link Query} that applies a series of
 * <a href="https://github.com/json-path/JsonPath/blob/master/README.md">JSON path expressions</a>
 * to the content.
 *
 * @param path the path of a file being queried on
 * @param jsonPaths the JSON path expressions to apply
 */
static Query<JsonNode> ofJsonPath(String path, String... jsonPaths) {
  return new JsonPathQuery(path, jsonPaths);
}
origin: line/centraldogma

/**
 * Returns a newly-created {@link Entry} of a directory.
 *
 * @param revision the revision of the directory
 * @param path the path of the directory
 */
public static Entry<Void> ofDirectory(Revision revision, String path) {
  return new Entry<>(revision, path, EntryType.DIRECTORY, null);
}
origin: com.linecorp.centraldogma/centraldogma-common

/**
 * Returns a newly-created {@link Change} whose type is {@link ChangeType#REMOVE}.
 *
 * @param path the path of the file to remove
 */
static Change<Void> ofRemoval(String path) {
  return new DefaultChange<>(path, ChangeType.REMOVE, null);
}
origin: line/centraldogma

@Override
public String contentAsText() {
  if (contentAsText == null) {
    contentAsText = ContentHolder.super.contentAsText();
  }
  return contentAsText;
}
origin: line/centraldogma

@Override
public String contentAsPrettyText() {
  if (contentAsPrettyText == null) {
    contentAsPrettyText = ContentHolder.super.contentAsPrettyText();
  }
  return contentAsPrettyText;
}
origin: com.linecorp.centraldogma/centraldogma-common

/**
 * Returns a newly-created {@link MergeSource} which contains an optional path.
 */
public static MergeSource ofOptional(String path) {
  return new MergeSource(path, true);
}
origin: com.linecorp.centraldogma/centraldogma-server

static EntryDto convert(Entry<?> entry) {
  final EntryDto dto = new EntryDto();
  dto.setRevision(entry.revision().text());
  dto.setPath(entry.path());
  dto.setType(entry.type().name());
  dto.setContent(entry.contentAsText());
  return dto;
}
origin: line/centraldogma

/**
 * Returns the {@link RevisionRange} whose major value of {@code from} {@link Revision} is lower than
 * or equal to the major value of {@code to} {@link Revision}.
 *
 * @throws IllegalStateException if the {@code from} and {@code to} {@link Revision}s are in the
 *                               different state. They should be either absolute or relative.
 */
public RevisionRange toAscending() {
  if (isAscending() || from.equals(to)) {
    return this;
  }
  return new RevisionRange(to, from);
}
origin: com.linecorp.centraldogma/centraldogma-common-shaded

@Override
public int hashCode() {
  return (revision.hashCode() * 31 + author.hashCode()) * 31 + (int) (when / 1000);
}
origin: com.linecorp.centraldogma/centraldogma-common

/**
 * Returns a newly-created {@link Query} that applies a series of
 * <a href="https://github.com/json-path/JsonPath/blob/master/README.md">JSON path expressions</a>
 * to the content.
 *
 * @param path the path of a file being queried on
 * @param jsonPaths the JSON path expressions to apply
 */
static Query<JsonNode> ofJsonPath(String path, String... jsonPaths) {
  return new JsonPathQuery(path, jsonPaths);
}
origin: line/centraldogma

@Override
public String contentAsText() {
  if (contentAsText == null) {
    contentAsText = ContentHolder.super.contentAsText();
  }
  return contentAsText;
}
origin: com.linecorp.centraldogma/centraldogma-common

@Override
public String contentAsPrettyText() {
  if (contentAsPrettyText == null) {
    contentAsPrettyText = ContentHolder.super.contentAsPrettyText();
  }
  return contentAsPrettyText;
}
origin: com.linecorp.centraldogma/centraldogma-server-shaded

static EntryDto convert(Entry<?> entry) {
  final EntryDto dto = new EntryDto();
  dto.setRevision(entry.revision().text());
  dto.setPath(entry.path());
  dto.setType(entry.type().name());
  dto.setContent(entry.contentAsText());
  return dto;
}
origin: com.linecorp.centraldogma/centraldogma-common

/**
 * Returns the {@link RevisionRange} whose major value of {@code from} {@link Revision} is lower than
 * or equal to the major value of {@code to} {@link Revision}.
 *
 * @throws IllegalStateException if the {@code from} and {@code to} {@link Revision}s are in the
 *                               different state. They should be either absolute or relative.
 */
public RevisionRange toAscending() {
  if (isAscending() || from.equals(to)) {
    return this;
  }
  return new RevisionRange(to, from);
}
origin: com.linecorp.centraldogma/centraldogma-common

@Override
public int hashCode() {
  return (revision.hashCode() * 31 + author.hashCode()) * 31 + (int) (when / 1000);
}
com.linecorp.centraldogma.common

Most used classes

  • Entry
    A file or a directory in a repository.
  • Query
    A query on a file.
  • Change
    A modification of an individual Entry.
  • Commit
    A set of Changes and its metadata.
  • Revision
    A revision number of a Commit.A revision number is an integer which refers to a specific point of re
  • MergeQuery,
  • QueryExecutionException,
  • CentralDogmaException,
  • ChangeType,
  • Markup,
  • MergedEntry,
  • RevisionRange,
  • MergeSource,
  • PushResult,
  • ChangeConflictException,
  • EntryNotFoundException,
  • EntryType,
  • ProjectExistsException,
  • ProjectNotFoundException
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now