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 ChangeDto(Change change) { requireNonNull(change, "change"); path = change.getPath(); type = change.getType().name(); content = change.getContent(); }
public ChangeDto(Change change) { requireNonNull(change, "change"); path = change.getPath(); type = change.getType().name(); content = change.getContent(); }
public ChangeDto(Change change) { requireNonNull(change, "change"); path = change.getPath(); type = change.getType().name(); content = change.getContent(); }
@Override protected com.linecorp.centraldogma.common.Change<?> doBackward(Change c) { switch (c.getType()) { case UPSERT_JSON: return com.linecorp.centraldogma.common.Change.ofJsonUpsert(c.getPath(), c.getContent()); case UPSERT_TEXT: return com.linecorp.centraldogma.common.Change.ofTextUpsert(c.getPath(), c.getContent()); case REMOVE: return com.linecorp.centraldogma.common.Change.ofRemoval(c.getPath()); case RENAME: return com.linecorp.centraldogma.common.Change.ofRename(c.getPath(), c.getContent()); case APPLY_JSON_PATCH: return com.linecorp.centraldogma.common.Change.ofJsonPatch(c.getPath(), c.getContent()); case APPLY_TEXT_PATCH: return com.linecorp.centraldogma.common.Change.ofTextPatch(c.getPath(), c.getContent()); } throw new Error(); }
@Override protected com.linecorp.centraldogma.common.Change<?> doBackward(Change c) { switch (c.getType()) { case UPSERT_JSON: return com.linecorp.centraldogma.common.Change.ofJsonUpsert(c.getPath(), c.getContent()); case UPSERT_TEXT: return com.linecorp.centraldogma.common.Change.ofTextUpsert(c.getPath(), c.getContent()); case REMOVE: return com.linecorp.centraldogma.common.Change.ofRemoval(c.getPath()); case RENAME: return com.linecorp.centraldogma.common.Change.ofRename(c.getPath(), c.getContent()); case APPLY_JSON_PATCH: return com.linecorp.centraldogma.common.Change.ofJsonPatch(c.getPath(), c.getContent()); case APPLY_TEXT_PATCH: return com.linecorp.centraldogma.common.Change.ofTextPatch(c.getPath(), c.getContent()); } throw new Error(); }