本文整理汇总了Java中org.kuali.rice.krad.util.KRADConstants.MAINTENANCE_ADD_PREFIX属性的典型用法代码示例。如果您正苦于以下问题:Java KRADConstants.MAINTENANCE_ADD_PREFIX属性的具体用法?Java KRADConstants.MAINTENANCE_ADD_PREFIX怎么用?Java KRADConstants.MAINTENANCE_ADD_PREFIX使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.kuali.rice.krad.util.KRADConstants
的用法示例。
在下文中一共展示了KRADConstants.MAINTENANCE_ADD_PREFIX属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: populateAttachmentFile
private void populateAttachmentFile(MaintenanceDocumentBase maintenanceDocument, String propertyName, FormFile propertyValue) {
if(StringUtils.isNotEmpty(((FormFile)propertyValue).getFileName())) {
Object boClass;
String boPropertyName;
Matcher matcher = ELEMENT_IN_COLLECTION.matcher(propertyName);
if (propertyName.startsWith(KRADConstants.MAINTENANCE_ADD_PREFIX)) {
String prefix = matcher.matches() ? "" : KRADConstants.MAINTENANCE_ADD_PREFIX;
String collectionName = parseAddCollectionName(propertyName.substring(prefix.length()));
boClass = maintenanceDocument.getNewMaintainableObject().getNewCollectionLine(collectionName);
boPropertyName = propertyName.substring(prefix.length()).substring(collectionName.length() + 1);
setAttachmentProperty(boClass, boPropertyName, propertyValue);
} else {
boClass = maintenanceDocument.getNewMaintainableObject().getBusinessObject();
boPropertyName = propertyName;
if(StringUtils.isNotEmpty(((FormFile)propertyValue).getFileName())
&& !matcher.matches()) {
maintenanceDocument.setFileAttachment((FormFile) propertyValue);
}
setAttachmentProperty(boClass, boPropertyName, propertyValue);
}
}
}
示例2: setFieldQuickfinder
/**
* Sets a fields quickfinder class and field conversions for an attribute.
*/
@Deprecated
public static Field setFieldQuickfinder(BusinessObject businessObject, String collectionName, boolean addLine, int index,
String attributeName, Field field, List displayedFieldNames, SelectiveReferenceRefresher srr) {
field = setFieldQuickfinder(businessObject, collectionName, addLine, index, attributeName, field, displayedFieldNames);
if (srr != null) {
String collectionPrefix = "";
if ( collectionName != null ) {
if (addLine) {
collectionPrefix = KRADConstants.MAINTENANCE_ADD_PREFIX + collectionName + ".";
}
else {
collectionPrefix = collectionName + "[" + index + "].";
}
}
field.setReferencesToRefresh(convertReferencesToSelectCollectionToString(
srr.getAffectedReferencesFromLookup(businessObject, attributeName, collectionPrefix)));
}
return field;
}
示例3: processAddCollectionLineBusinessRules
public boolean processAddCollectionLineBusinessRules(MaintenanceDocument document, String collectionName,
PersistableBusinessObject bo) {
LOG.debug("processAddCollectionLineBusinessRules");
// setup convenience pointers to the old & new bo
setupBaseConvenienceObjects(document);
// sanity check on the document object
this.validateMaintenanceDocument(document);
boolean success = true;
MessageMap map = GlobalVariables.getMessageMap();
int errorCount = map.getErrorCount();
map.addToErrorPath(MAINTAINABLE_ERROR_PATH);
if (LOG.isDebugEnabled()) {
LOG.debug("processAddCollectionLineBusinessRules - BO: " + bo);
LOG.debug("Before Validate: " + map);
}
//getBoDictionaryService().performForceUppercase(bo);
getMaintDocDictionaryService().validateMaintainableCollectionsAddLineRequiredFields(document,
document.getNewMaintainableObject().getBusinessObject(), collectionName);
String errorPath = KRADConstants.MAINTENANCE_ADD_PREFIX + collectionName;
map.addToErrorPath(errorPath);
getDictionaryValidationService().validateBusinessObject(bo, false);
success &= map.getErrorCount() == errorCount;
success &= dictionaryValidationService.validateDefaultExistenceChecksForNewCollectionItem(
document.getNewMaintainableObject().getBusinessObject(), bo, collectionName);
success &= validateDuplicateIdentifierInDataDictionary(document, collectionName, bo);
success &= processCustomAddCollectionLineBusinessRules(document, collectionName, bo);
map.removeFromErrorPath(errorPath);
map.removeFromErrorPath(MAINTAINABLE_ERROR_PATH);
if (LOG.isDebugEnabled()) {
LOG.debug("After Validate: " + map);
LOG.debug("processAddCollectionLineBusinessRules returning: " + success);
}
return success;
}
示例4: setFieldQuickfinder
public static final Field setFieldQuickfinder(BusinessObject businessObject, String collectionName, boolean addLine, int index,
String attributeName, Field field, List<String> displayedFieldNames, Maintainable maintainable, MaintainableFieldDefinition maintainableFieldDefinition) {
if (maintainableFieldDefinition.getOverrideLookupClass() != null && StringUtils.isNotBlank(maintainableFieldDefinition.getOverrideFieldConversions())) {
if (maintainable != null) {
String collectionPrefix = "";
if (collectionName != null) {
if (addLine) {
collectionPrefix = KRADConstants.MAINTENANCE_ADD_PREFIX + collectionName + ".";
} else {
collectionPrefix = collectionName + "[" + index + "].";
}
}
field.setQuickFinderClassNameImpl(maintainableFieldDefinition.getOverrideLookupClass().getName());
String prefixedFieldConversions = prefixFieldConversionsDestinationsWithCollectionPrefix(maintainableFieldDefinition.getOverrideFieldConversions(), collectionPrefix);
field.setFieldConversions(prefixedFieldConversions);
field.setBaseLookupUrl(LookupUtils.getBaseLookupUrl(false));
field.setReferencesToRefresh(LookupUtils.convertReferencesToSelectCollectionToString(
maintainable.getAffectedReferencesFromLookup(businessObject, attributeName, collectionPrefix)));
}
return field;
}
if (maintainableFieldDefinition.isNoLookup()) {
return field;
}
return LookupUtils.setFieldQuickfinder(businessObject, collectionName, addLine, index,
attributeName, field, displayedFieldNames, maintainable);
}