本文整理汇总了Java中org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint类的典型用法代码示例。如果您正苦于以下问题:Java SimpleConstraint类的具体用法?Java SimpleConstraint怎么用?Java SimpleConstraint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleConstraint类属于org.kuali.rice.krad.datadictionary.validation.constraint包,在下文中一共展示了SimpleConstraint类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* Processes the SimpleConstraint by calling process on the other smaller constraints it represents and
* putting the results together in ProcessorResult
*
* @return processor result
* @throws AttributeValidationException
* @see MandatoryElementConstraintProcessor#process(org.kuali.rice.krad.datadictionary.validation.result.DictionaryValidationResult,
* Object, org.kuali.rice.krad.datadictionary.validation.constraint.Constraint,
* org.kuali.rice.krad.datadictionary.validation.AttributeValueReader)
*/
@Override
public ProcessorResult process(DictionaryValidationResult result, Object value, final SimpleConstraint constraint,
AttributeValueReader attributeValueReader) throws AttributeValidationException {
ProcessorResult dataTypePR = dataTypeConstraintProcessor.process(result, value, constraint,
attributeValueReader);
ProcessorResult existencePR = existenceConstraintProcessor.process(result, value, constraint,
attributeValueReader);
ProcessorResult rangePR = rangeConstraintProcessor.process(result, value, constraint, attributeValueReader);
ProcessorResult lengthPR = lengthConstraintProcessor.process(result, value, constraint, attributeValueReader);
List<ConstraintValidationResult> cvrList = new ArrayList<ConstraintValidationResult>();
cvrList.addAll(existencePR.getConstraintValidationResults());
cvrList.addAll(rangePR.getConstraintValidationResults());
cvrList.addAll(lengthPR.getConstraintValidationResults());
cvrList.addAll(dataTypePR.getConstraintValidationResults());
return new ProcessorResult(cvrList);
}
示例2: process
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* Processes the SimpleConstraint by calling process on the other smaller constraints it represents and
* putting the results together in ProcessorResult
*
* @return
* @throws AttributeValidationException
* @see MandatoryElementConstraintProcessor#process(org.kuali.rice.krad.datadictionary.validation.result.DictionaryValidationResult,
* Object, org.kuali.rice.krad.datadictionary.validation.constraint.Constraint,
* org.kuali.rice.krad.datadictionary.validation.AttributeValueReader)
*/
@Override
public ProcessorResult process(DictionaryValidationResult result, Object value, final SimpleConstraint constraint,
AttributeValueReader attributeValueReader) throws AttributeValidationException {
ProcessorResult dataTypePR = dataTypeConstraintProcessor.process(result, value, constraint,
attributeValueReader);
ProcessorResult existencePR = existenceConstraintProcessor.process(result, value, constraint,
attributeValueReader);
ProcessorResult rangePR = rangeConstraintProcessor.process(result, value, constraint, attributeValueReader);
ProcessorResult lengthPR = lengthConstraintProcessor.process(result, value, constraint, attributeValueReader);
List<ConstraintValidationResult> cvrList = new ArrayList<ConstraintValidationResult>();
cvrList.addAll(existencePR.getConstraintValidationResults());
cvrList.addAll(rangePR.getConstraintValidationResults());
cvrList.addAll(lengthPR.getConstraintValidationResults());
cvrList.addAll(dataTypePR.getConstraintValidationResults());
return new ProcessorResult(cvrList);
}
示例3: InputFieldBase
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
public InputFieldBase() {
super();
simpleConstraint = new SimpleConstraint();
enableAutoDirectInquiry = true;
enableAutoQuickfinder = true;
}
示例4: init
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
@Override
public void init() {
resolverMap = new HashMap<String, ConstraintResolver<AttributeDefinition>>();
resolverMap.put(SimpleConstraint.class.getName(), new SimpleConstraintResolver<AttributeDefinition>());
resolverMap.put(CaseConstraint.class.getName(), new CaseConstraintResolver<AttributeDefinition>());
resolverMap.put(DataTypeConstraint.class.getName(), new DefinitionConstraintResolver<AttributeDefinition>());
resolverMap.put(LengthConstraint.class.getName(), new DefinitionConstraintResolver<AttributeDefinition>());
resolverMap.put(ValidCharactersConstraint.class.getName(),
new ValidCharactersConstraintResolver<AttributeDefinition>());
resolverMap.put(PrerequisiteConstraint.class.getName(),
new PrerequisiteConstraintsResolver<AttributeDefinition>());
resolverMap.put(MustOccurConstraint.class.getName(), new MustOccurConstraintsResolver<AttributeDefinition>());
}
示例5: getSimpleConstraint
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
@BeanTagAttribute
public SimpleConstraint getSimpleConstraint() {
return this.simpleConstraint;
}
示例6: setSimpleConstraint
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setSimpleConstraint(SimpleConstraint simpleConstraint) {
this.simpleConstraint = simpleConstraint;
}
示例7: ViewAttributeValueReader
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* Constructor for ViewAttributeValueReader, the View must already be indexed and
* the InputFields must have already be initialized for this reader to work properly
*
* @param form model object representing the View's form data
*/
public ViewAttributeValueReader(ViewModel form) {
this.form = form;
ViewPostMetadata viewPostMetadata = form.getViewPostMetadata();
// Copying information stored about InputField in the post metadata to info objects for use by this reader
for (String id : viewPostMetadata.getInputFieldIds()) {
InputFieldConstrainableInfo info = new InputFieldConstrainableInfo();
Object label = viewPostMetadata.getComponentPostData(id, UifConstants.PostMetadata.LABEL);
if (label != null) {
info.setLabel((String) label);
}
Object name = viewPostMetadata.getComponentPostData(id, UifConstants.PostMetadata.PATH);
if (name != null) {
info.setName((String) name);
}
Object validCharactersConstraint = viewPostMetadata.getComponentPostData(id,
UifConstants.PostMetadata.VALID_CHARACTER_CONSTRAINT);
if (validCharactersConstraint != null) {
info.setValidCharactersConstraint((ValidCharactersConstraint) validCharactersConstraint);
}
Object caseConstraint = viewPostMetadata.getComponentPostData(id,
UifConstants.PostMetadata.CASE_CONSTRAINT);
if (caseConstraint != null) {
info.setCaseConstraint((CaseConstraint) caseConstraint);
}
Object prerequisiteConstraints = viewPostMetadata.getComponentPostData(id,
UifConstants.PostMetadata.PREREQ_CONSTSTRAINTS);
if (prerequisiteConstraints != null) {
info.setPrerequisiteConstraints((List<PrerequisiteConstraint>) prerequisiteConstraints);
}
Object mustOccurConstraints = viewPostMetadata.getComponentPostData(id,
UifConstants.PostMetadata.MUST_OCCUR_CONSTRAINTS);
if (mustOccurConstraints != null) {
info.setMustOccurConstraints((List<MustOccurConstraint>) mustOccurConstraints);
}
Object simpleConstraint = viewPostMetadata.getComponentPostData(id,
UifConstants.PostMetadata.SIMPLE_CONSTRAINT);
if (simpleConstraint != null) {
info.setSimpleConstraint((SimpleConstraint) simpleConstraint);
}
inputFields.add(info);
inputFieldMap.put(info.getName(), info);
}
}
示例8: getSimpleConstraint
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public SimpleConstraint getSimpleConstraint() {
return simpleConstraint;
}
示例9: setSimpleConstraint
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* @see org.kuali.rice.krad.datadictionary.validation.ViewAttributeValueReader.InputFieldConstrainableInfo#getSimpleConstraint()
*/
public void setSimpleConstraint(SimpleConstraint simpleConstraint) {
this.simpleConstraint = simpleConstraint;
}
示例10: getConstraintType
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
@Override
public Class<? extends Constraint> getConstraintType() {
return SimpleConstraint.class;
}
示例11: AttributeDefinitionBase
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
public AttributeDefinitionBase() {
super();
simpleConstraint = new SimpleConstraint();
}
示例12: InputField
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
public InputField() {
super();
simpleConstraint = new SimpleConstraint();
}
示例13: setSimpleConstraint
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* Setter for simple constraint
*
* <p>
* When a simple constraint is set on this object ALL simple validation
* constraints set directly will be overridden - recommended to use this or
* the other gets/sets for defining simple constraints, not both.
* </p>
*
* @param simpleConstraint the simple constraint to set
*/
void setSimpleConstraint(SimpleConstraint simpleConstraint);
示例14: getSimpleConstraint
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* Gets the SimpleConstraint which contains settings for required, min, max, minLength, and maxLength.
*
* @return SimpleConstraint object
*/
@Override
public SimpleConstraint getSimpleConstraint() {
return simpleConstraint;
}
示例15: setSimpleConstraint
import org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint; //导入依赖的package包/类
/**
* Sets the SimpleConstraint which contains settings for required, min, max, minLength, and maxLength.
*
* @param simpleConstraint
*/
public void setSimpleConstraint(SimpleConstraint simpleConstraint) {
this.simpleConstraint = simpleConstraint;
}