public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); case TYPE: return getType(); case CONTENT: return getContent(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case PATH: return getPath(); case TYPE: return getType(); case CONTENT: return getContent(); } throw new IllegalStateException(); }
public static com.linecorp.centraldogma.common.Entry<?> convert( com.linecorp.centraldogma.common.Revision revision, Entry entry) { switch (entry.getType()) { case JSON: try { final JsonNode value = Jackson.readTree(entry.getContent()); return com.linecorp.centraldogma.common.Entry.ofJson(revision, entry.getPath(), value); } catch (IOException e) { throw new UncheckedIOException(e); } case TEXT: return com.linecorp.centraldogma.common.Entry.ofText(revision, entry.getPath(), entry.getContent()); case DIRECTORY: return com.linecorp.centraldogma.common.Entry.ofDirectory(revision, entry.getPath()); default: throw new IllegalArgumentException("unsupported entry type: " + entry.getType()); } }
public static com.linecorp.centraldogma.common.Entry<?> convert( com.linecorp.centraldogma.common.Revision revision, Entry entry) { switch (entry.getType()) { case JSON: try { final JsonNode value = Jackson.readTree(entry.getContent()); return com.linecorp.centraldogma.common.Entry.ofJson(revision, entry.getPath(), value); } catch (IOException e) { throw new UncheckedIOException(e); } case TEXT: return com.linecorp.centraldogma.common.Entry.ofText(revision, entry.getPath(), entry.getContent()); case DIRECTORY: return com.linecorp.centraldogma.common.Entry.ofDirectory(revision, entry.getPath()); default: throw new IllegalArgumentException("unsupported entry type: " + entry.getType()); } }