当前位置: 首页>>代码示例>>Java>>正文


Java AttributeDefinition.getValidationPattern方法代码示例

本文整理汇总了Java中org.kuali.rice.krad.datadictionary.AttributeDefinition.getValidationPattern方法的典型用法代码示例。如果您正苦于以下问题:Java AttributeDefinition.getValidationPattern方法的具体用法?Java AttributeDefinition.getValidationPattern怎么用?Java AttributeDefinition.getValidationPattern使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.krad.datadictionary.AttributeDefinition的用法示例。


在下文中一共展示了AttributeDefinition.getValidationPattern方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getAttributeValidationPatternName

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
 * @param attribute <code>{@link AttributeDefinition}</code>
 * @return String
 */
private String getAttributeValidationPatternName(AttributeDefinition attribute) throws Exception {
    String retval = new String();
    if (attribute.getValidationPattern() != null) {
        retval = attribute.getValidationPattern().getClass().getName();
    }

    if (retval.indexOf(".") > 0) {
        retval = retval.substring(retval.lastIndexOf(".") + 1);
    }
    if (retval.endsWith(VALIDATION_PATTERN_STRING)) {
        retval = retval.substring(0, retval.lastIndexOf(VALIDATION_PATTERN_STRING));
    }

    return retval;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:KualiHelpAction.java

示例2: getAttributeValidatingExpression

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.DataDictionaryService#getAttributeValidatingExpression(java.lang.String)
 */
@Override
public Pattern getAttributeValidatingExpression(String entryName, String attributeName) {
    Pattern regex = null;

    AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
    if (attributeDefinition != null && (attributeDefinition.getValidationPattern() != null)) {
        regex = attributeDefinition.getValidationPattern().getRegexPattern();
    } else {
        // workaround for existing calls which don't bother checking for null return values
        regex = Pattern.compile(".*");
    }

    return regex;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:TestDataDictionaryService.java

示例3: getAttributeValidatingErrorMessageKey

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.DataDictionaryService#getAttributeValidatingErrorMessageKey(java.lang.String, java.lang.String)
 */
@Override
public String getAttributeValidatingErrorMessageKey(String entryName, String attributeName) {
    AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
    if (attributeDefinition != null) {
        if (attributeDefinition.hasValidationPattern()) {
            ValidationPattern validationPattern = attributeDefinition.getValidationPattern();
            return validationPattern.getValidationErrorMessageKey();
        }
    }
    return null;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:TestDataDictionaryService.java

示例4: getAttributeValidatingErrorMessageParameters

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.DataDictionaryService#getAttributeValidatingErrorMessageParameters(java.lang.String, java.lang.String)
 */
@Override
public String[] getAttributeValidatingErrorMessageParameters(String entryName, String attributeName) {
    AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
    if (attributeDefinition != null) {
        if (attributeDefinition.hasValidationPattern()) {
            ValidationPattern validationPattern = attributeDefinition.getValidationPattern();
            String attributeLabel = getAttributeErrorLabel(entryName, attributeName);
            return validationPattern.getValidationErrorMessageParameters(attributeLabel);
        }
    }
    return null;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:TestDataDictionaryService.java

示例5: getAttributeValidatingExpression

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
@Override
public Pattern getAttributeValidatingExpression(String entryName, String attributeName) {
       Pattern regex = null;

       AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
       if (attributeDefinition != null && (attributeDefinition.getValidationPattern() != null)) {
           regex = attributeDefinition.getValidationPattern().getRegexPattern();
       } else {
           // workaround for existing calls which don't bother checking for null return values
           regex = Pattern.compile(".*");
       }

       return regex;
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:DataDictionaryServiceImpl.java

示例6: getAttributeValidatingErrorMessageKey

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
    * @see org.kuali.rice.krad.service.DataDictionaryService#getAttributeValidatingErrorMessageKey(java.lang.String, java.lang.String)
    */
   @Override
public String getAttributeValidatingErrorMessageKey(String entryName, String attributeName) {
       AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
       if (attributeDefinition != null) {
           if (attributeDefinition.hasValidationPattern()) {
               ValidationPattern validationPattern = attributeDefinition.getValidationPattern();
               return validationPattern.getValidationErrorMessageKey();
           }
       }
       return null;
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:DataDictionaryServiceImpl.java

示例7: getAttributeValidatingErrorMessageParameters

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
    * @see org.kuali.rice.krad.service.DataDictionaryService#getAttributeValidatingErrorMessageParameters(java.lang.String, java.lang.String)
    */
   @Override
public String[] getAttributeValidatingErrorMessageParameters(String entryName, String attributeName) {
       AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
       if (attributeDefinition != null) {
           if (attributeDefinition.hasValidationPattern()) {
               ValidationPattern validationPattern = attributeDefinition.getValidationPattern();
               String attributeLabel = getAttributeErrorLabel(entryName, attributeName);
               return validationPattern.getValidationErrorMessageParameters(attributeLabel);
           }
       }
       return null;
   }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:16,代码来源:DataDictionaryServiceImpl.java


注:本文中的org.kuali.rice.krad.datadictionary.AttributeDefinition.getValidationPattern方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。