本文整理汇总了Java中org.kuali.rice.kew.api.validation.RuleValidationContext类的典型用法代码示例。如果您正苦于以下问题:Java RuleValidationContext类的具体用法?Java RuleValidationContext怎么用?Java RuleValidationContext使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RuleValidationContext类属于org.kuali.rice.kew.api.validation包,在下文中一共展示了RuleValidationContext类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validate
import org.kuali.rice.kew.api.validation.RuleValidationContext; //导入依赖的package包/类
/**
* Validates the rule within the given RuleValidationContext.
*
* @return a ValidationResults object representing the results of the validation, if this is
* empty or <code>null</code> this signifies that validation was successful.
*/
@WebMethod(operationName = "validate")
@WebResult(name = "validationResults")
@XmlElement(name = "validationResults", required = false)
ValidationResults validate(
@WebParam(name = "attributeName") String attributeName,
@WebParam(name = "validationContext") RuleValidationContext validationContext) throws RiceIllegalArgumentException;
示例2: validate
import org.kuali.rice.kew.api.validation.RuleValidationContext; //导入依赖的package包/类
@Override
public ValidationResults validate(String attributeName, RuleValidationContext validationContext) {
if (StringUtils.isBlank(attributeName)) {
throw new RiceIllegalArgumentException("attribute name was null or blank");
}
RuleValidationAttribute attr = loadAttribute(attributeName);
return attr.validate(validationContext);
}
示例3: resolveRuleValidationAttribute
import org.kuali.rice.kew.api.validation.RuleValidationContext; //导入依赖的package包/类
@Override
public RuleValidationAttribute resolveRuleValidationAttribute(final String attributeName, String applicationId) throws Exception {
final RuleValidationAttributeExporterService service = findRuleValidationAttributeExporterService(applicationId);
return (RuleValidationAttribute) Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class<?>[] { RuleValidationAttribute.class }, new RuleValidationAttributeInvocationHandler() {
@Override
protected ValidationResults invokeValidate(RuleValidationContext context) throws Exception {
return service.validate(attributeName, context);
}
});
}
示例4: invoke
import org.kuali.rice.kew.api.validation.RuleValidationContext; //导入依赖的package包/类
@Override
public ValidationResults invoke(Object o, Method method, Object[] objects) throws Throwable {
if (!StringUtils.equals(method.getName(), "validate")) {
throw new UnsupportedOperationException("RuleValidationAttribute only supports 'validate'");
}
return invokeValidate((RuleValidationContext) objects[0]);
}
示例5: validate
import org.kuali.rice.kew.api.validation.RuleValidationContext; //导入依赖的package包/类
public ValidationResults validate(RuleValidationContext validationContext) {
invocations++;
return ValidationResults.Builder.create().build();
}
示例6: validate
import org.kuali.rice.kew.api.validation.RuleValidationContext; //导入依赖的package包/类
/**
* Validates the rule within the given RuleValidationContext.
*
* @return a ValidationResults object representing the results of the validation, if this is
* empty or <code>null</code> this signifies that validation was successful.
*/
public ValidationResults validate(RuleValidationContext validationContext);
示例7: invokeValidate
import org.kuali.rice.kew.api.validation.RuleValidationContext; //导入依赖的package包/类
protected abstract ValidationResults invokeValidate(RuleValidationContext context) throws Exception;