本文整理汇总了Java中org.lpw.tephra.ctrl.validate.Validators.NOT_EMPTY属性的典型用法代码示例。如果您正苦于以下问题:Java Validators.NOT_EMPTY属性的具体用法?Java Validators.NOT_EMPTY怎么用?Java Validators.NOT_EMPTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.lpw.tephra.ctrl.validate.Validators
的用法示例。
在下文中一共展示了Validators.NOT_EMPTY属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: save
@Execute(name = "save", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "key", failureCode = 2),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "key", failureCode = 3),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "name", failureCode = 4),
@Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "width", failureCode = 5),
@Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "height", failureCode = 6),
@Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "fontMin", failureCode = 7),
@Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "fontMax", failureCode = 8),
@Validate(validator = Validators.NOT_EMPTY, parameter = "chars", failureCode = 9),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "chars", failureCode = 10),
@Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "length", failureCode = 11),
@Validate(validator = Validators.BETWEEN, number = {0, 1}, parameter = "background", failureCode = 12),
@Validate(validator = Validators.SIGN)
})
public Object save() {
return captchaService.save(request.setToModel(new CaptchaModel()));
}
示例2: save
@Execute(name = "save", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "key", failureCode = 1),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "key", failureCode = 2),
@Validate(validator = Validators.ID, emptyable = true, parameter = "owner", failureCode = 3),
@Validate(validator = Validators.NOT_EMPTY, parameter = "subject", failureCode = 5),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "subject", failureCode = 6),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "image", failureCode = 7),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "thumbnail", failureCode = 8),
@Validate(validator = Validators.NOT_EMPTY, parameter = "source", failureCode = 9),
@Validate(validator = UserHelper.VALIDATOR_SIGN_IN),
@Validate(validator = DocService.VALIDATOR_EXISTS, emptyable = true, parameter = "id", failureCode = 12)
})
public Object save() {
return docService.save(request.setToModel(new DocModel()), request.getAsBoolean("markdown"));
}
示例3: query
@Execute(name = "query", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "user", failureCode = 51),
@Validate(validator = Validators.SIGN)
})
public Object query() {
return authService.query(request.get("user"));
}
示例4: prepayQrCode
@Execute(name = "prepay-qr-code", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "key", failureCode = 2),
@Validate(validator = Validators.NOT_EMPTY, parameter = "subject", failureCode = 21),
@Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "amount", failureCode = 22),
@Validate(validator = UserHelper.VALIDATOR_EXISTS_OR_SIGN_IN, parameter = "user", failureCode = 23),
@Validate(validator = WeixinService.VALIDATOR_EXISTS, parameter = "key", failureCode = 24)
})
public Object prepayQrCode() {
weixinService.prepayQrCode(request.get("key"), request.get("user"), request.get("subject"), request.getAsInt("amount"),
request.get("billNo"), request.get("notice"), request.getAsInt("size"), request.get("logo"), response.getOutputStream());
return null;
}
示例5: prepayQrCodeBase64
@Execute(name = "prepay-qr-code-base64", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "key", failureCode = 2),
@Validate(validator = Validators.NOT_EMPTY, parameter = "subject", failureCode = 21),
@Validate(validator = Validators.GREATER_THAN, number = {0}, parameter = "amount", failureCode = 22),
@Validate(validator = UserHelper.VALIDATOR_EXISTS_OR_SIGN_IN, parameter = "user", failureCode = 23),
@Validate(validator = WeixinService.VALIDATOR_EXISTS, parameter = "key", failureCode = 24)
})
public Object prepayQrCodeBase64() {
return weixinService.prepayQrCodeBase64(request.get("key"), request.get("user"), request.get("subject"), request.getAsInt("amount"),
request.get("billNo"), request.get("notice"), request.getAsInt("size"), request.get("logo"));
}
示例6: pass
/**
* 审核通过。
* ids ID集,多个ID间以逗号分隔。
* auditRemark 审核备注,可空。
*
* @return ""。
*/
@Execute(name = "pass", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "ids", failureCode = 81),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "auditRemark", failureCode = 83),
@Validate(validator = Validators.SIGN)
})
public Object pass() {
getAuditService().pass(request.getAsArray("ids"), request.get("auditRemark"));
return "";
}
示例7: get
@Execute(name = "get", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "ids", failureCode = 1),
@Validate(validator = Validators.SIGN)
})
public Object get() {
return snapshotService.get(request.getAsArray("ids"));
}
示例8: pass
@Execute(name = "pass", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "ids", failureCode = 21),
@Validate(validator = Validators.SIGN)
})
public Object pass() {
return logService.pass(request.getAsArray("ids"));
}
示例9: findOrSign
@Execute(name = "find-sign", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "idUidCode", failureCode = 31),
@Validate(validator = Validators.SIGN)
})
public Object findOrSign() {
return userService.findOrSign(request.get("idUidCode"));
}
示例10: pass
@Execute(name = "pass", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "user", failureCode = 1),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "memo", failureCode = 3),
@Validate(validator = UserHelper.VALIDATOR_SIGN_IN),
@Validate(validator = FriendService.VALIDATOR_EXISTS, parameter = "user", failureCode = 4)
})
public Object pass() {
friendService.pass(request.get("user"), request.get("memo"));
return "";
}
示例11: save
@Execute(name = "save", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "type", failureCode = 1),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "type", failureCode = 2),
@Validate(validator = Validators.NOT_EMPTY, parameter = "id1", failureCode = 3),
@Validate(validator = Validators.MAX_LENGTH, number = {36}, parameter = "id1", failureCode = 4),
@Validate(validator = Validators.NOT_EMPTY, parameter = "id2", failureCode = 5),
@Validate(validator = Validators.MAX_LENGTH, number = {36}, parameter = "id2", failureCode = 6)
})
public Object save() {
return linkService.save(request.get("type"), request.get("id1"), request.get("id2"), request.getMap());
}
示例12: delete
@Execute(name = "delete", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "type", failureCode = 1),
@Validate(validator = Validators.NOT_EMPTY, parameter = "id1", failureCode = 3),
@Validate(validator = Validators.NOT_EMPTY, parameter = "id2", failureCode = 5)
})
public Object delete() {
linkService.delete(request.get("type"), request.get("id1"), request.get("id2"));
return "";
}
示例13: create
@Execute(name = "create", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "user", failureCode = 1),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "memo", failureCode = 3),
@Validate(validator = UserHelper.VALIDATOR_SIGN_IN),
})
public Object create() {
friendService.create(request.get("user"), request.get("memo"));
return "";
}
示例14: transfer
@Execute(name = "transfer", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "key", failureCode = 1),
@Validate(validator = Validators.NOT_EMPTY, parameter = "account", failureCode = 11),
@Validate(validator = Validators.MAX_LENGTH, parameter = "account", failureCode = 15),
@Validate(validator = Validators.GREATER_THAN, number = {9}, parameter = "amount", failureCode = 12),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "billNo", failureCode = 16),
@Validate(validator = Validators.SIGN, string = {"ranch-alipay"}),
@Validate(validator = UserHelper.VALIDATOR_EXISTS_OR_SIGN_IN, parameter = "user", failureCode = 13),
@Validate(validator = AlipayService.VALIDATOR_EXISTS, parameter = "key", failureCode = 14)
})
public Object transfer() {
return alipayService.transfer(request.get("key"), request.get("user"), request.get("account"), request.getAsInt("amount"),
request.get("billNo"), request.get("realName"), request.get("showName"), request.get("remark"), request.get("notice"),
request.getMap());
}
示例15: manager
@Execute(name = "manager", validates = {
@Validate(validator = Validators.NOT_EMPTY, parameter = "id", failureCode = 23),
@Validate(validator = UserHelper.VALIDATOR_SIGN_IN),
@Validate(validator = MemberService.VALIDATOR_EXISTS, parameter = "id", failureCode = 24),
@Validate(validator = MemberService.VALIDATOR_MANAGER, parameter = "id", failureCode = 25)
})
public Object manager() {
memberService.manager(request.get("id"));
return "";
}