public String getType(String id, String language) { StandardField standardField = getStandardField(id); String type = businessTypeProcessor.getType(standardField.getTypeId(), language); if (type != null) { return type; } throw new RuntimeException(String.format( "找不到ID:[%s]的标准字段对应的Language:[%s]类型。", id, language)); }
public static StandardType getStandardType(StandardField standardField, ClassLoader loader) { BusinessTypeProcessor businessTypeProcessor = getBusinessTypeProcessor(loader); BusinessType businessType = businessTypeProcessor .getBusinessTypes(standardField.getTypeId()); return getStandardType(businessType, loader); }
public String getType(String id, String language) { StandardField standardField = getStandardField(id); String type = businessTypeProcessor.getType(standardField.getTypeId(), language); if (type != null) { return type; } throw new MetadataRuntimeException(STDFIELD_LANGUAGE_TYPE_NOT_EXISTS_ERROR, id, language); }
public static BusinessType getBusinessType(String fieldId, ClassLoader loader) { StandardField field = getStandardField(fieldId, loader); BusinessTypeProcessor businessTypeProcessor = getBusinessTypeProcessor(loader); BusinessType businessType = businessTypeProcessor .getBusinessTypes(field.getTypeId()); return businessType; }
public static StandardType getStandardType(StandardField field) { BusinessTypeProcessor businessTypeProcessor = SpringUtil .getBean(MetadataUtil.BUSINESSTYPEPROCESSOR_BEAN); BusinessType businessType = businessTypeProcessor .getBusinessTypes(field.getTypeId()); StandardTypeProcessor standardTypeProcessor = SpringUtil .getBean(MetadataUtil.STANDARDTYPEPROCESSOR_BEAN); return standardTypeProcessor.getStandardType(businessType.getTypeId()); } }
public static StandardType getStandardType(String fieldId, ClassLoader loader) { StandardField field = getStandardField(fieldId, loader); BusinessTypeProcessor businessTypeProcessor = getBusinessTypeProcessor(loader); BusinessType businessType = businessTypeProcessor .getBusinessTypes(field.getTypeId()); StandardTypeProcessor standardTypeProcessor = getStandardTypeProcessor(loader); return standardTypeProcessor.getStandardType(businessType.getTypeId()); }
public static StandardType getStandardType(String fieldId) { StandardField field = getStandardField(fieldId); BusinessTypeProcessor businessTypeProcessor = SpringUtil .getBean(MetadataUtil.BUSINESSTYPEPROCESSOR_BEAN); BusinessType businessType = businessTypeProcessor .getBusinessTypes(field.getTypeId()); StandardTypeProcessor standardTypeProcessor = SpringUtil .getBean(MetadataUtil.STANDARDTYPEPROCESSOR_BEAN); return standardTypeProcessor.getStandardType(businessType.getTypeId()); }
public void addStandardFields(StandardFields standardFields) { if (standardFields != null && standardFields.getStandardFieldList() != null) { for (StandardField field : standardFields.getStandardFieldList()) { if (standardFieldMap.containsKey(field.getId())) { if (ConfigUtil.isCheckStrict()) { //重复id throw new MetadataRuntimeException(STDFIELD_ADD_ALREADY_ERROR, field.getId()); } else { LOGGER.error(new MetadataRuntimeException(STDFIELD_ADD_ALREADY_ERROR, field.getId())); continue; } } standardFieldMap.put(field.getId(), field); if (field.getNickNames() != null) { for (NickName name : field.getNickNames()) { StandardField newStandardField = new StandardField(); newStandardField.setId(name.getId()); newStandardField.setName(name.getName()); newStandardField.setTitle(name.getTitle()); newStandardField.setDefaultValue(field.getDefaultValue()); newStandardField.setDescription(field.getDescription()); newStandardField.setTypeId(field.getTypeId()); standardFieldMap.put(name.getId(), newStandardField); } } } } }