use of com.agiletec.plugins.jacms.aps.system.services.content.model.ContentRecordVO in project entando-core by entando.
the class RowContentListViewerWidgetAction method joinContent.
public String joinContent() {
try {
this.createValuedShowlet();
ApsProperties config = this.getWidget().getConfig();
this.extractContentProperties(config);
ContentRecordVO contentVo = this.getContentVo(this.getContentId());
if (null == contentVo || !contentVo.isOnLine()) {
return INPUT;
}
List<Properties> contentProperties = this.getContentsProperties();
Properties properties = new Properties();
properties.put("contentId", this.getContentId());
if (!StringUtils.isEmpty(this.getModelId())) {
properties.put("modelId", this.getModelId());
}
contentProperties.add(properties);
String newWidgetParam = RowContentListHelper.fromContentsToParameter(contentProperties);
this.getWidget().getConfig().setProperty("contents", newWidgetParam);
} catch (Throwable t) {
_logger.error("Error joining content", t);
return FAILURE;
}
return SUCCESS;
}
use of com.agiletec.plugins.jacms.aps.system.services.content.model.ContentRecordVO in project entando-core by entando.
the class AbstractContentSearcherDAO method createRecord.
@Override
protected ApsEntityRecord createRecord(ResultSet result) throws Throwable {
ContentRecordVO contentVo = new ContentRecordVO();
contentVo.setId(result.getString("contentid"));
contentVo.setTypeCode(result.getString("contenttype"));
contentVo.setDescr(result.getString("descr"));
contentVo.setStatus(result.getString("status"));
String xmlWork = result.getString("workxml");
contentVo.setCreate(DateConverter.parseDate(result.getString("created"), this.DATE_FORMAT));
contentVo.setModify(DateConverter.parseDate(result.getString("lastmodified"), this.DATE_FORMAT));
String xmlOnLine = result.getString("onlinexml");
contentVo.setOnLine(null != xmlOnLine && xmlOnLine.length() > 0);
contentVo.setSync(xmlWork.equals(xmlOnLine));
String mainGroupCode = result.getString("maingroup");
contentVo.setMainGroupCode(mainGroupCode);
contentVo.setXmlWork(xmlWork);
contentVo.setXmlOnLine(xmlOnLine);
contentVo.setVersion(result.getString("currentversion"));
contentVo.setLastEditor(result.getString("lasteditor"));
return contentVo;
}
use of com.agiletec.plugins.jacms.aps.system.services.content.model.ContentRecordVO in project entando-core by entando.
the class ContentDAO method createEntityRecord.
@Override
protected ApsEntityRecord createEntityRecord(ResultSet res) throws Throwable {
ContentRecordVO contentVo = new ContentRecordVO();
contentVo.setId(res.getString(1));
contentVo.setTypeCode(res.getString(2));
contentVo.setDescription(res.getString(3));
contentVo.setStatus(res.getString(4));
String xmlWork = res.getString(5);
contentVo.setCreate(DateConverter.parseDate(res.getString(6), JacmsSystemConstants.CONTENT_METADATA_DATE_FORMAT));
contentVo.setModify(DateConverter.parseDate(res.getString(7), JacmsSystemConstants.CONTENT_METADATA_DATE_FORMAT));
String xmlOnLine = res.getString(8);
contentVo.setOnLine(null != xmlOnLine && xmlOnLine.length() > 0);
contentVo.setSync(xmlWork.equals(xmlOnLine));
String mainGroupCode = res.getString(9);
contentVo.setMainGroupCode(mainGroupCode);
contentVo.setXmlWork(xmlWork);
contentVo.setXmlOnLine(xmlOnLine);
contentVo.setVersion(res.getString(10));
contentVo.setFirstEditor(res.getString(11));
contentVo.setLastEditor(res.getString(12));
return contentVo;
}
Aggregations