Search in sources :

Example 31 with Content

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

Example 32 with Content

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

Example 33 with Content

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);
}
Also used : BaseFilterUtils(com.agiletec.aps.system.common.entity.helper.BaseFilterUtils) Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content)

Example 34 with Content

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);
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content) BaseFilterUtils(com.agiletec.aps.system.common.entity.helper.BaseFilterUtils)

Example 35 with Content

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

Aggregations

Content (com.agiletec.plugins.jacms.aps.system.services.content.model.Content)227 AttributeInterface (com.agiletec.aps.system.common.entity.model.attribute.AttributeInterface)55 AttributeTracer (com.agiletec.aps.system.common.entity.model.AttributeTracer)35 MonoListAttribute (com.agiletec.aps.system.common.entity.model.attribute.MonoListAttribute)29 ArrayList (java.util.ArrayList)26 ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)17 ActionSupport (com.opensymphony.xwork2.ActionSupport)14 List (java.util.List)14 CompositeAttribute (com.agiletec.aps.system.common.entity.model.attribute.CompositeAttribute)13 HttpSession (javax.servlet.http.HttpSession)13 UserDetails (com.agiletec.aps.system.services.user.UserDetails)12 IPage (com.agiletec.aps.system.services.page.IPage)10 Date (java.util.Date)8 EntitySearchFilter (com.agiletec.aps.system.common.entity.model.EntitySearchFilter)7 ITextAttribute (com.agiletec.aps.system.common.entity.model.attribute.ITextAttribute)7 LinkAttribute (com.agiletec.plugins.jacms.aps.system.services.content.model.extraAttribute.LinkAttribute)7 ResourceInterface (com.agiletec.plugins.jacms.aps.system.services.resource.model.ResourceInterface)7 ApiException (org.entando.entando.aps.system.services.api.model.ApiException)7 ListAttribute (com.agiletec.aps.system.common.entity.model.attribute.ListAttribute)6 TextAttribute (com.agiletec.aps.system.common.entity.model.attribute.TextAttribute)6