本文整理了Java中com.linecorp.centraldogma.internal.Util.validateFilePath()
方法的一些代码示例,展示了Util.validateFilePath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.validateFilePath()
方法的具体详情如下:
包路径:com.linecorp.centraldogma.internal.Util
类名称:Util
方法名:validateFilePath
暂无
代码示例来源:origin: line/centraldogma
/**
* Sets the path of the file in Central Dogma.
*/
public CentralDogmaBeanConfigBuilder path(String path) {
this.path = validateFilePath(path, "path");
return this;
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common
/**
* Creates a new instance.
*/
private MergeSource(String path, boolean optional) {
this.path = validateFilePath(path, "path");
this.optional = optional;
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-client-shaded
/**
* Sets the path of the file in Central Dogma.
*/
public CentralDogmaBeanConfigBuilder path(String path) {
this.path = validateFilePath(path, "path");
return this;
}
代码示例来源:origin: line/centraldogma
/**
* Creates a new instance.
*/
private MergeSource(String path, boolean optional) {
this.path = validateFilePath(path, "path");
this.optional = optional;
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-client
/**
* Sets the path of the file in Central Dogma.
*/
public CentralDogmaBeanConfigBuilder path(String path) {
this.path = validateFilePath(path, "path");
return this;
}
代码示例来源:origin: line/centraldogma
/**
* Returns a newly-created {@link Change} whose type is {@link ChangeType#RENAME}.
*
* @param oldPath the old path of the file
* @param newPath the new path of the file
*/
static Change<String> ofRename(String oldPath, String newPath) {
validateFilePath(oldPath, "oldPath");
validateFilePath(newPath, "newPath");
return new DefaultChange<>(oldPath, ChangeType.RENAME, newPath);
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common
/**
* Returns a newly-created {@link Change} whose type is {@link ChangeType#RENAME}.
*
* @param oldPath the old path of the file
* @param newPath the new path of the file
*/
static Change<String> ofRename(String oldPath, String newPath) {
validateFilePath(oldPath, "oldPath");
validateFilePath(newPath, "newPath");
return new DefaultChange<>(oldPath, ChangeType.RENAME, newPath);
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-shaded
/**
* Returns a newly-created {@link Change} whose type is {@link ChangeType#RENAME}.
*
* @param oldPath the old path of the file
* @param newPath the new path of the file
*/
static Change<String> ofRename(String oldPath, String newPath) {
validateFilePath(oldPath, "oldPath");
validateFilePath(newPath, "newPath");
return new DefaultChange<>(oldPath, ChangeType.RENAME, newPath);
}
代码示例来源:origin: line/centraldogma
@JsonCreator
IdentityQuery(@JsonProperty("path") String path) {
this.path = validateFilePath(path, "path");
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common
@JsonCreator
IdentityQuery(@JsonProperty("path") String path) {
this.path = validateFilePath(path, "path");
}
代码示例来源:origin: line/centraldogma
/**
* Retrieves an {@link Entry} at the specified {@code path}.
*
* @return the {@link Entry} at the specified {@code path} if exists.
* The specified {@code other} if there's no such {@link Entry}.
*
* @see #get(Revision, String)
*/
default CompletableFuture<Entry<?>> getOrNull(Revision revision, String path) {
validateFilePath(path, "path");
return find(revision, path, FIND_ONE_WITH_CONTENT).thenApply(findResult -> findResult.get(path));
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server-shaded
/**
* Returns {@code true} if and only if an {@link Entry} exists at the specified {@code path}.
*/
default CompletableFuture<Boolean> exists(Revision revision, String path) {
validateFilePath(path, "path");
return find(revision, path, EXISTS_FIND_OPTIONS).thenApply(result -> !result.isEmpty());
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server
/**
* Retrieves an {@link Entry} at the specified {@code path}.
*
* @return the {@link Entry} at the specified {@code path} if exists.
* The specified {@code other} if there's no such {@link Entry}.
*
* @see #get(Revision, String)
*/
default CompletableFuture<Entry<?>> getOrNull(Revision revision, String path) {
validateFilePath(path, "path");
return find(revision, path, FIND_ONE_WITH_CONTENT).thenApply(findResult -> findResult.get(path));
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server-shaded
/**
* Retrieves an {@link Entry} at the specified {@code path}.
*
* @return the {@link Entry} at the specified {@code path} if exists.
* The specified {@code other} if there's no such {@link Entry}.
*
* @see #get(Revision, String)
*/
default CompletableFuture<Entry<?>> getOrNull(Revision revision, String path) {
validateFilePath(path, "path");
return find(revision, path, GET_FIND_OPTIONS).thenApply(findResult -> findResult.get(path));
}
代码示例来源:origin: line/centraldogma
/**
* Returns {@code true} if and only if an {@link Entry} exists at the specified {@code path}.
*/
default CompletableFuture<Boolean> exists(Revision revision, String path) {
validateFilePath(path, "path");
return find(revision, path, FIND_ONE_WITHOUT_CONTENT).thenApply(result -> !result.isEmpty());
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-server
/**
* Returns {@code true} if and only if an {@link Entry} exists at the specified {@code path}.
*/
default CompletableFuture<Boolean> exists(Revision revision, String path) {
validateFilePath(path, "path");
return find(revision, path, FIND_ONE_WITHOUT_CONTENT).thenApply(result -> !result.isEmpty());
}
代码示例来源:origin: line/centraldogma
DefaultChange(String path, ChangeType type, @Nullable T content) {
this.type = requireNonNull(type, "type");
if (type.contentType() == JsonNode.class) {
validateJsonFilePath(path, "path");
} else {
validateFilePath(path, "path");
}
this.path = path;
this.content = content;
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common
DefaultChange(String path, ChangeType type, @Nullable T content) {
this.type = requireNonNull(type, "type");
if (type.contentType() == JsonNode.class) {
validateJsonFilePath(path, "path");
} else {
validateFilePath(path, "path");
}
this.path = path;
this.content = content;
}
代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-shaded
DefaultChange(String path, ChangeType type, @Nullable T content) {
this.type = requireNonNull(type, "type");
if (type.contentType() == JsonNode.class) {
validateJsonFilePath(path, "path");
} else {
validateFilePath(path, "path");
}
this.path = path;
this.content = content;
}
代码示例来源:origin: line/centraldogma
private static void assertFilePathValidationFailure(String path) {
assertThatThrownBy(() -> validateFilePath(path, "path"))
.isExactlyInstanceOf(IllegalArgumentException.class);
}
内容来源于网络,如有侵权,请联系作者删除!