Search in sources :

Example 1 with JAXBContentType

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()));
    }
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content) JAXBContentType(org.entando.entando.plugins.jacms.aps.system.services.api.model.JAXBContentType)

Example 2 with JAXBContentType

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()));
    }
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content) JAXBContentType(org.entando.entando.plugins.jacms.aps.system.services.api.model.JAXBContentType)

Example 3 with JAXBContentType

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;
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content) JAXBContentType(org.entando.entando.plugins.jacms.aps.system.services.api.model.JAXBContentType)

Aggregations

Content (com.agiletec.plugins.jacms.aps.system.services.content.model.Content)3 JAXBContentType (org.entando.entando.plugins.jacms.aps.system.services.api.model.JAXBContentType)3