use of org.entando.entando.plugins.jacms.aps.system.services.api.model.JAXBContentType in project entando-core by entando.
the class ApiContentTypeInterface method checkNewEntityType.
@Override
protected void checkNewEntityType(JAXBEntityType jaxbEntityType, IApsEntity newEntityType, StringApiResponse response) throws ApiException, Throwable {
JAXBContentType jaxbContentType = (JAXBContentType) jaxbEntityType;
Content contentType = (Content) newEntityType;
boolean defaultModelCheck = this.checkContentModel(jaxbContentType.getDefaultModelId(), contentType, response);
if (defaultModelCheck) {
contentType.setDefaultModel(String.valueOf(jaxbContentType.getDefaultModelId()));
}
boolean listModelCheck = this.checkContentModel(jaxbContentType.getListModelId(), contentType, response);
if (listModelCheck) {
contentType.setListModel(String.valueOf(jaxbContentType.getListModelId()));
}
}
use of org.entando.entando.plugins.jacms.aps.system.services.api.model.JAXBContentType in project entando-core by entando.
the class ApiContentTypeInterface method checkEntityTypeToUpdate.
@Override
protected void checkEntityTypeToUpdate(JAXBEntityType jaxbEntityType, IApsEntity entityTypeToUpdate, StringApiResponse response) throws ApiException, Throwable {
JAXBContentType jaxbContentType = (JAXBContentType) jaxbEntityType;
Content contentType = (Content) entityTypeToUpdate;
boolean defaultModelCheck = this.checkContentModel(jaxbContentType.getDefaultModelId(), contentType, response);
if (defaultModelCheck) {
contentType.setDefaultModel(String.valueOf(jaxbContentType.getDefaultModelId()));
}
boolean listModelCheck = this.checkContentModel(jaxbContentType.getListModelId(), contentType, response);
if (listModelCheck) {
contentType.setListModel(String.valueOf(jaxbContentType.getListModelId()));
}
}
use of org.entando.entando.plugins.jacms.aps.system.services.api.model.JAXBContentType in project entando-core by entando.
the class ApiContentTypeInterface method createJAXBEntityType.
@Override
protected JAXBEntityType createJAXBEntityType(IApsEntity masterEntityType) {
Content masterContentType = (Content) masterEntityType;
JAXBContentType jaxbContentType = new JAXBContentType(masterContentType);
jaxbContentType.setDefaultModelId(this.extractModelId(masterContentType.getDefaultModel()));
jaxbContentType.setListModelId(this.extractModelId(masterContentType.getListModel()));
return jaxbContentType;
}
Aggregations