use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.
the class ContentManager method getTypeById.
/**
* Return the content type from the given ID code. The code is extracted
* following the coding conventions: the first three characters are the type
* of the code.
*
* @param contentId the content ID whose content type is extracted.
* @return The content type requested
*/
private Content getTypeById(String contentId) {
String typeCode = contentId.substring(0, 3);
Content type = (Content) super.getEntityTypes().get(typeCode);
return type;
}
use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.
the class ContentManager method reloadEntityReferences.
@Override
public void reloadEntityReferences(String entityId) {
try {
ContentRecordVO contentVo = this.loadContentVO(entityId);
Content content = this.createContent(contentVo, true);
if (content != null) {
this.getContentDAO().reloadPublicContentReferences(content);
}
Content workcontent = this.createContent(contentVo, false);
if (workcontent != null) {
this.getContentDAO().reloadWorkContentReferences(workcontent);
}
_logger.debug("Reloaded content references for content {}", entityId);
} catch (Throwable t) {
_logger.error("Error while reloading content references for content {}", entityId, t);
}
}
use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.
the class BaseContentListHelper method getFilter.
@Override
public EntitySearchFilter getFilter(String contentType, IEntityFilterBean bean, String langCode) {
BaseFilterUtils dom = new BaseFilterUtils();
Content contentPrototype = this.getContentManager().createContentType(contentType);
if (null == contentPrototype) {
return null;
}
return dom.getFilter(contentPrototype, bean, langCode);
}
use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.
the class BaseContentListHelper method getFilters.
@Override
public EntitySearchFilter[] getFilters(String contentType, String filtersShowletParam, String langCode) {
Content contentPrototype = this.getContentManager().createContentType(contentType);
if (null == filtersShowletParam || filtersShowletParam.trim().length() == 0 || null == contentPrototype) {
return null;
}
BaseFilterUtils dom = new BaseFilterUtils();
return dom.getFilters(contentPrototype, filtersShowletParam, langCode);
}
use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.
the class ContentAuthorizationHelper method getAuthorizationInfo.
@Override
@CachePut(value = ICacheInfoManager.DEFAULT_CACHE_NAME, key = "T(com.agiletec.plugins.jacms.aps.system.JacmsSystemConstants).CONTENT_AUTH_INFO_CACHE_PREFIX.concat(#contentId)")
@CacheableInfo(groups = "T(com.agiletec.plugins.jacms.aps.system.services.cache.CmsCacheWrapperManager).getContentCacheGroupsCsv(#contentId)")
public PublicContentAuthorizationInfo getAuthorizationInfo(String contentId) {
PublicContentAuthorizationInfo authInfo = null;
try {
Content content = this.getContentManager().loadContent(contentId, true);
if (null == content) {
_logger.debug("public content {} doesn't exist", contentId);
return null;
}
authInfo = new PublicContentAuthorizationInfo(content, this.getLangManager().getLangs());
} catch (Throwable t) {
_logger.error("error in getAuthorizationInfo for content {}", contentId, t);
}
return authInfo;
}
Aggregations