Search in sources :

Example 96 with Content

use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.

the class IntroNewContentAction method createNew.

public String createNew() {
    try {
        Content prototype = this.getContentManager().createContentType(this.getContentTypeCode());
        if (null == prototype) {
            this.addFieldError("contentTypeCode", this.getText("error.content.type.invalid"));
            return INPUT;
        }
        prototype.setFirstEditor(this.getCurrentUser().getUsername());
        this.fillSessionAttribute(prototype);
    } catch (Throwable t) {
        _logger.error("error in createNew", t);
        return FAILURE;
    }
    return SUCCESS;
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content)

Example 97 with Content

use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.

the class ContentLinkAttributeAction method getContentGroupCodes.

/**
 * Sovrascrittura del metodo della {@link ContentFinderAction}.
 * Il metodo fà in modo di ricercare i contenuti che hanno, come gruppo proprietario o gruppo abilitato alla visualizzazione,
 * o il gruppo "free" o il gruppo proprietario del contenuto in redazione.
 * @return La lista dei codici dei gruppi del contenuto.
 */
@Override
protected List<String> getContentGroupCodes() {
    List<String> allowedGroups = new ArrayList<String>();
    allowedGroups.add(Group.FREE_GROUP_NAME);
    Content currentContent = this.getContent();
    allowedGroups.add(currentContent.getMainGroup());
    return allowedGroups;
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content) ArrayList(java.util.ArrayList)

Example 98 with Content

use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.

the class PageLinkAttributeAction method getNodeGroupCodes.

@Override
protected Collection<String> getNodeGroupCodes() {
    Set<String> groupCodes = new HashSet<String>();
    groupCodes.add(Group.FREE_GROUP_NAME);
    Content currentContent = this.getContent();
    if (null != currentContent.getMainGroup()) {
        groupCodes.add(currentContent.getMainGroup());
    }
    return groupCodes;
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content) HashSet(java.util.HashSet)

Example 99 with Content

use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.

the class ContentLinkAction method getContentGroupCodes.

/**
 * Sovrascrittura del metodo della {@link ContentFinderAction}.
 * Il metodo fà in modo di ricercare i contenuti che hanno, come gruppo proprietario o gruppo abilitato alla visualizzazione,
 * o il gruppo "free" o il gruppo proprietario del contenuto in redazione.
 */
@Override
protected List<String> getContentGroupCodes() {
    List<String> allowedGroups = new ArrayList<String>();
    allowedGroups.add(Group.FREE_GROUP_NAME);
    Content currentContent = this.getContent();
    allowedGroups.add(currentContent.getMainGroup());
    return allowedGroups;
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content) ArrayList(java.util.ArrayList)

Example 100 with Content

use of com.agiletec.plugins.jacms.aps.system.services.content.model.Content in project entando-core by entando.

the class PageLinkAction method getNodeGroupCodes.

@Override
protected Collection<String> getNodeGroupCodes() {
    Set<String> groupCodes = new HashSet<String>();
    groupCodes.add(Group.FREE_GROUP_NAME);
    Content currentContent = this.getContent();
    if (null != currentContent.getMainGroup()) {
        groupCodes.add(currentContent.getMainGroup());
    }
    return groupCodes;
}
Also used : Content(com.agiletec.plugins.jacms.aps.system.services.content.model.Content) HashSet(java.util.HashSet)

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