本文整理汇总了Java中org.lpw.tephra.ctrl.validate.Validators.ID属性的典型用法代码示例。如果您正苦于以下问题:Java Validators.ID属性的具体用法?Java Validators.ID怎么用?Java Validators.ID使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.lpw.tephra.ctrl.validate.Validators
的用法示例。
在下文中一共展示了Validators.ID属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: state
@Execute(name = "state", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 22),
@Validate(validator = Validators.BETWEEN, number = {0, 1}, parameter = "state", failureCode = 24),
@Validate(validator = Validators.SIGN),
@Validate(validator = UserService.VALIDATOR_EXISTS, parameter = "id", failureCode = 25)
})
public Object state() {
userService.state(request.get("id"), request.getAsInt("state"));
return "";
}
示例2: notice
@Execute(name = "notice", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 1),
@Validate(validator = Validators.SIGN),
@Validate(validator = PaymentService.VALIDATOR_EXISTS, parameter = "id", failureCode = 11)
})
public Object notice() {
return paymentService.notice(request.get("id"));
}
示例3: query
@Execute(name = "query", validates = {
@Validate(validator = Validators.ID, parameter = "schema", failureCode = 22),
@Validate(validator = Validators.ID, emptyable = true, parameter = "group", failureCode = 23),
@Validate(validator = Validators.SIGN),
@Validate(validator = SchemaService.VALIDATOR_EXISTS, parameter = "schema", failureCode = 29)
})
public Object query() {
return tableService.query(request.get("schema"), request.get("group"), request.get("name"));
}
示例4: restore
@Execute(name = "restore", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 86),
@Validate(validator = Validators.SIGN),
@Validate(validator = ClassifyService.VALIDATOR_EXISTS, parameter = "id", failureCode = 9),
@Validate(validator = ClassifyService.VALIDATOR_CODE_KEY_NOT_EXISTS, parameter = "id", failureCode = 10)
})
public Object restore() {
return super.restore();
}
示例5: delete
@Execute(name = "delete", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 21),
@Validate(validator = Validators.SIGN)
})
public Object delete() {
tableService.delete(request.get("id"));
return "";
}
示例6: query
@Execute(name = "query", validates = {
@Validate(validator = Validators.ID, emptyable = true, parameter = "group", failureCode = 2),
@Validate(validator = SchemaService.VALIDATOR_TYPE, emptyable = true, parameter = "type", failureCode = 5),
@Validate(validator = Validators.SIGN)
})
public Object query() {
return schemaService.query(request.get("group"), request.get("key"), request.get("type"), request.get("ip"), request.get("name"));
}
示例7: state
@Execute(name = "state", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 1),
@Validate(validator = Validators.BETWEEN, number = {0, 1}, parameter = "state", failureCode = 8),
@Validate(validator = Validators.SIGN),
@Validate(validator = PushService.VALIDATOR_EXISTS, parameter = "id", failureCode = 9)
})
public Object state() {
return pushService.state(request.get("id"), request.getAsInt("state"));
}
示例8: delete
@Execute(name = "delete", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 1),
@Validate(validator = Validators.SIGN),
@Validate(validator = SchemaService.VALIDATOR_EXISTS, parameter = "id", failureCode = 12)
})
public Object delete() {
schemaService.delete(request.get("id"));
return "";
}
示例9: join
@Execute(name = "join", validates = {
@Validate(validator = Validators.ID, emptyable = true, parameter = "user", failureCode = 29),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "reason", failureCode = 21),
@Validate(validator = Validators.ID, emptyable = true, parameter = "introducer", failureCode = 28),
@Validate(validator = GroupService.VALIDATOR_EXISTS, parameter = "group", failureCode = 22),
@Validate(validator = UserHelper.VALIDATOR_SIGN_IN)
})
public Object join() {
memberService.join(request.get("group"), request.get("user"), request.get("reason"), request.get("introducer"));
return "";
}
示例10: modify
@Execute(name = "modify", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 1),
@Validate(validator = Validators.NOT_EMPTY, parameter = "code", failureCode = 2),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "code", failureCode = 3),
@Validate(validator = Validators.NOT_EMPTY, parameter = "key", failureCode = 4),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "key", failureCode = 5),
@Validate(validator = Validators.NOT_EMPTY, parameter = "name", failureCode = 6),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "name", failureCode = 7),
@Validate(validator = Validators.SIGN),
@Validate(validator = ClassifyService.VALIDATOR_EXISTS, parameter = "id", failureCode = 9),
@Validate(validator = ClassifyService.VALIDATOR_CODE_KEY_NOT_EXISTS, parameters = {"code", "key", "id"}, failureCode = 10)
})
public Object modify() {
return templates.get().success(classifyService.modify(request.get("id"), request.get("code"), request.get("key"), request.get("value"), request.get("name"), request.getMap()), null);
}
示例11: restore
/**
* (从回收站)还原数据。
* id ID值。
*
* @return ""。
*/
@Execute(name = "restore", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 86),
@Validate(validator = Validators.SIGN)
})
public Object restore() {
getRecycleService().restore(request.get("id"));
return "";
}
示例12: create
@Execute(name = "create", 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, parameter = "owner", failureCode = 3),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "subject", failureCode = 5),
@Validate(validator = Validators.MAX_LENGTH, number = {100}, parameter = "label", failureCode = 6),
@Validate(validator = Validators.NOT_EMPTY, parameter = "content", failureCode = 7),
@Validate(validator = Validators.BETWEEN, number = {0, 5}, parameter = "score", failureCode = 8),
@Validate(validator = UserHelper.VALIDATOR_EXISTS_OR_SIGN_IN, parameter = "author", failureCode = 4)
})
public Object create() {
return commentService.create(request.setToModel(new CommentModel()));
}
示例13: 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"));
}
示例14: source
@Execute(name = "source", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 11),
@Validate(validator = Validators.SIGN),
@Validate(validator = DocService.VALIDATOR_EXISTS, parameter = "id", failureCode = 12)
})
public Object source() {
return docService.source(request.get("id"));
}
示例15: grade
@Execute(name = "grade", validates = {
@Validate(validator = Validators.ID, parameter = "id", failureCode = 22),
@Validate(validator = Validators.BETWEEN, number = {0, 99}, parameter = "grade", failureCode = 23),
@Validate(validator = Validators.SIGN),
@Validate(validator = UserService.VALIDATOR_EXISTS, parameter = "id", failureCode = 25)
})
public Object grade() {
userService.grade(request.get("id"), request.getAsInt("grade"));
return "";
}