类org.hibernate.validator.constraints.URL源码实例Demo

下面列出了怎么用org.hibernate.validator.constraints.URL的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: para   文件: ValidationUtils.java
private static boolean isValidSimpleConstraint(String cName, String field, Object actual, LinkedList<String> err) {
	if ("required".equals(cName) && !required().isValid(actual)) {
		err.add(Utils.formatMessage("{0} is required.", field));
		return false;
	} else if (matches(AssertFalse.class, cName) && !falsy().isValid(actual)) {
		err.add(Utils.formatMessage("{0} must be false.", field));
		return false;
	} else if (matches(AssertTrue.class, cName) && !truthy().isValid(actual)) {
		err.add(Utils.formatMessage("{0} must be true.", field));
		return false;
	} else if (matches(Future.class, cName) && !future().isValid(actual)) {
		err.add(Utils.formatMessage("{0} must be in the future.", field));
		return false;
	} else if (matches(Past.class, cName) && !past().isValid(actual)) {
		err.add(Utils.formatMessage("{0} must be in the past.", field));
		return false;
	} else if (matches(URL.class, cName) && !url().isValid(actual)) {
		err.add(Utils.formatMessage("{0} is not a valid URL.", field));
		return false;
	} else if (matches(Email.class, cName) && !email().isValid(actual)) {
		err.add(Utils.formatMessage("{0} is not a valid email.", field));
		return false;
	}
	return true;
}
 
源代码2 项目: retro-game   文件: AllianceController.java
@PostMapping("/alliance/manage/logo/save")
@PreAuthorize("hasPermission(#bodyId, 'ACCESS')")
@Activity(bodies = "#bodyId")
public String manageLogoSave(@RequestParam(name = "body") long bodyId,
                             @RequestParam(name = "alliance") long allianceId,
                             @RequestParam @URL @Size(max = 128) String url) {
  allianceService.saveLogo(bodyId, allianceId, url);
  return "redirect:/alliance/manage?body=" + bodyId + "&alliance=" + allianceId;
}
 
源代码3 项目: shimmer   文件: IHealthClientSettings.java
@URL
public String getApiBaseUrl() {

    return sandboxed
            ? "http://sandboxapi.ihealthlabs.com/OpenApiV2"
            : "https://api.ihealthlabs.com:8443/OpenApiV2";
}
 
源代码4 项目: genie   文件: DefaultDirectoryWriter.java
/**
 * {@inheritDoc}
 *
 * @see org.apache.catalina.servlets.DefaultServlet
 */
@Override
public String toHtml(
    @NotNull final File directory,
    @URL final String requestURL,
    final boolean includeParent
) throws IOException {
    final Directory dir = this.getDirectory(directory, requestURL, includeParent);
    return directoryToHTML(directory.getName(), dir);
}
 
源代码5 项目: genie   文件: DefaultDirectoryWriter.java
/**
 * {@inheritDoc}
 */
@Override
public String toJson(
    @NotNull final File directory,
    @URL final String requestURL,
    final boolean includeParent
) throws Exception {
    final Directory dir = this.getDirectory(directory, requestURL, includeParent);
    return GenieObjectMapper.getMapper().writeValueAsString(dir);
}
 
源代码6 项目: dremio-oss   文件: AwsPropsApi.java
@URL
String getEndpoint();
 
源代码7 项目: dremio-oss   文件: AwsPropsApi.java
@URL
String getStsEndpoint();
 
源代码8 项目: celerio-angular-quickstart   文件: Project.java
@Size(max = 100)
@URL
@Column(name = "URL", length = 100)
public String getUrl() {
    return url;
}
 
源代码9 项目: cm_ext   文件: ParcelDescriptor.java
/**
 * THe user can add a parcel repo URL. If one is specified,
 * it will be added to the remote repository urls so that the
 * associated parcel can show up in CM.
 */
@URL
String getRepoUrl();
 
源代码10 项目: genie   文件: DirectoryWriter.java
/**
 * Convert a given directory to an String containing a full valid HTML page.
 *
 * @param directory     The directory to convert. Not null. Is directory.
 * @param requestURL    The URL of the request that kicked off this process
 * @param includeParent Whether the conversion should include reference to the parent directory.
 * @return String HTML representation of the directory
 * @throws Exception for any conversion problem
 */
String toHtml(
    @NotNull File directory,
    @URL String requestURL,
    boolean includeParent
) throws Exception;
 
源代码11 项目: genie   文件: DirectoryWriter.java
/**
 * Convert a given directory to an String of JSON.
 *
 * @param directory     The directory to convert. Not null. Is directory.
 * @param requestURL    The URL of the request that kicked off this process
 * @param includeParent Whether the conversion should include reference to the parent directory.
 * @return String HTML representation of the directory
 * @throws Exception for any conversion problem
 */
String toJson(
    @NotNull File directory,
    @URL String requestURL,
    boolean includeParent
) throws Exception;
 
 类所在包
 类方法
 同包方法