use of org.entando.entando.aps.system.services.dataobject.model.DataObject in project entando-core by entando.
the class ApiDataObjectTypeInterface method checkNewEntityType.
@Override
protected void checkNewEntityType(JAXBEntityType jaxbEntityType, IApsEntity newEntityType, StringApiResponse response) throws ApiException, Throwable {
JAXBDataObjectType jaxbDataObjectType = (JAXBDataObjectType) jaxbEntityType;
DataObject dataType = (DataObject) newEntityType;
boolean defaultModelCheck = this.checkDataObjectModel(jaxbDataObjectType.getDefaultModelId(), dataType, response);
if (defaultModelCheck) {
dataType.setDefaultModel(String.valueOf(jaxbDataObjectType.getDefaultModelId()));
}
boolean listModelCheck = this.checkDataObjectModel(jaxbDataObjectType.getListModelId(), dataType, response);
if (listModelCheck) {
dataType.setListModel(String.valueOf(jaxbDataObjectType.getListModelId()));
}
}
use of org.entando.entando.aps.system.services.dataobject.model.DataObject in project entando-core by entando.
the class BaseDataListHelper method getFilter.
@Override
public EntitySearchFilter getFilter(String dataTypeType, IEntityFilterBean bean, String langCode) {
BaseFilterUtils dom = new BaseFilterUtils();
DataObject contentPrototype = this.getDataObjectManager().createDataObject(dataTypeType);
if (null == contentPrototype) {
return null;
}
return dom.getFilter(contentPrototype, bean, langCode);
}
use of org.entando.entando.aps.system.services.dataobject.model.DataObject in project entando-core by entando.
the class DataObjectHandler method endCreated.
private void endCreated() {
StringBuffer textBuffer = this.getTextBuffer();
if (null != textBuffer) {
Date date = DateConverter.parseDate(textBuffer.toString(), SystemConstants.DATA_TYPE_METADATA_DATE_FORMAT);
((DataObject) this.getCurrentEntity()).setCreated(date);
}
}
use of org.entando.entando.aps.system.services.dataobject.model.DataObject in project entando-core by entando.
the class DataTypeDOM method createEntityType.
@Override
protected IApsEntity createEntityType(Element contentElem, Class entityClass) throws ApsSystemException {
DataObject dataObject = (DataObject) super.createEntityType(contentElem, entityClass);
dataObject.setId(null);
String viewPage = this.extractXmlAttribute(contentElem, "viewpage", true);
if (!viewPage.equals(NULL_VALUE)) {
dataObject.setViewPage(viewPage);
}
String listModel = this.extractXmlAttribute(contentElem, "listmodel", true);
if (!listModel.equals(NULL_VALUE)) {
dataObject.setListModel(listModel);
}
String defaultModel = this.extractXmlAttribute(contentElem, "defaultmodel", true);
if (!defaultModel.equals(NULL_VALUE)) {
dataObject.setDefaultModel(defaultModel);
}
dataObject.setStatus(DataObject.STATUS_NEW);
return dataObject;
}
use of org.entando.entando.aps.system.services.dataobject.model.DataObject in project entando-core by entando.
the class DataTypeDOM method createRootTypeElement.
@Override
protected Element createRootTypeElement(IApsEntity currentEntityType) {
Element typeElement = super.createRootTypeElement(currentEntityType);
DataObject dataObject = (DataObject) currentEntityType;
this.setXmlAttribute(typeElement, "viewpage", dataObject.getViewPage());
this.setXmlAttribute(typeElement, "listmodel", dataObject.getListModel());
this.setXmlAttribute(typeElement, "defaultmodel", dataObject.getDefaultModel());
return typeElement;
}
Aggregations