attributeValueViewBean.setValue(abstractAttribute.getValueAsString());
return attributeValueViewBean;
}
protected AttributeDefinitionViewBean buildViewBeanAttributeDefinition(final RequestData requestData, final AttributeDefinition attributeDefinition) throws Exception{
AttributeDefinitionViewBean attributeDefinitionViewBean = new AttributeDefinitionViewBean();
attributeDefinitionViewBean.setName(attributeDefinition.getName());
attributeDefinitionViewBean.setDescription(attributeDefinition.getDescription());
attributeDefinitionViewBean.setCode(attributeDefinition.getCode());
attributeDefinitionViewBean.setAttributeType("" + attributeDefinition.getAttributeType());
attributeDefinitionViewBean.setObjectType("" + attributeDefinition.getObjectType());
attributeDefinitionViewBean.setLocalizable(attributeDefinition.isLocalizable());
attributeDefinitionViewBean.setGlobal(attributeDefinition.isGlobal());
attributeDefinitionViewBean.setMultiValue(attributeDefinition.isMultiValue());
attributeDefinitionViewBean.setWithPlanner(attributeDefinition.isWithPlanner());
DateFormat dateFormat = requestUtil.getFormatDate(requestData, DateFormat.MEDIUM, DateFormat.MEDIUM);
Date dateCreate = attributeDefinition.getDateCreate();
if (dateCreate != null) {
attributeDefinitionViewBean.setDateCreate(dateFormat.format(dateCreate));
}
Date dateUpdate = attributeDefinition.getDateUpdate();
if (dateUpdate != null) {
attributeDefinitionViewBean.setDateUpdate(dateFormat.format(dateUpdate));
}
return attributeDefinitionViewBean;
}