Search in sources :

Example 1 with BaseFilterUtils

use of com.agiletec.aps.system.common.entity.helper.BaseFilterUtils in project entando-core by entando.

the class ApiDataObjectListBean method getListName.

public String getListName() {
    StringBuffer buffer = new StringBuffer("listName_api");
    buffer.append("-TYPE:" + this.getDataType());
    buffer.append("_FILTERS:");
    if (null != this.getFilters() && this.getFilters().length > 0) {
        BaseFilterUtils filterUtils = new BaseFilterUtils();
        buffer.append(filterUtils.getFilterParam(this.getFilters()));
    } else {
        buffer.append("NULL");
    }
    buffer.append("_CATEGORIES:");
    if (null != this.getCategories() && this.getCategories().length > 0) {
        List<String> categories = Arrays.asList(this.getCategories());
        Collections.sort(categories);
        for (int i = 0; i < categories.size(); i++) {
            if (i > 0) {
                buffer.append("+");
            }
            buffer.append(categories.get(i));
        }
    } else {
        buffer.append("NULL");
    }
    return buffer.toString();
}
Also used : BaseFilterUtils(com.agiletec.aps.system.common.entity.helper.BaseFilterUtils)

Example 2 with BaseFilterUtils

use of com.agiletec.aps.system.common.entity.helper.BaseFilterUtils in project entando-core by entando.

the class BaseDataListHelper method getFilters.

@Override
public EntitySearchFilter[] getFilters(String dataType, String filtersShowletParam, String langCode) {
    DataObject prototype = this.getDataObjectManager().createDataObject(dataType);
    if (null == filtersShowletParam || filtersShowletParam.trim().length() == 0 || null == prototype) {
        return null;
    }
    BaseFilterUtils dom = new BaseFilterUtils();
    return dom.getFilters(prototype, filtersShowletParam, langCode);
}
Also used : DataObject(org.entando.entando.aps.system.services.dataobject.model.DataObject) BaseFilterUtils(com.agiletec.aps.system.common.entity.helper.BaseFilterUtils)

Example 3 with BaseFilterUtils

use of com.agiletec.aps.system.common.entity.helper.BaseFilterUtils 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 4 with BaseFilterUtils

use of com.agiletec.aps.system.common.entity.helper.BaseFilterUtils 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 5 with BaseFilterUtils

use of com.agiletec.aps.system.common.entity.helper.BaseFilterUtils in project entando-core by entando.

the class BaseDataListHelper method getFilter.

@Override
public EntitySearchFilter getFilter(String dataTypeType, IEntityFilterBean bean, String langCode) {
    BaseFilterUtils dom = new BaseFilterUtils();
    DataObject contentPrototype = this.getDataObjectManager().createDataObject(dataTypeType);
    if (null == contentPrototype) {
        return null;
    }
    return dom.getFilter(contentPrototype, bean, langCode);
}
Also used : DataObject(org.entando.entando.aps.system.services.dataobject.model.DataObject) BaseFilterUtils(com.agiletec.aps.system.common.entity.helper.BaseFilterUtils)

Aggregations

BaseFilterUtils (com.agiletec.aps.system.common.entity.helper.BaseFilterUtils)7 Content (com.agiletec.plugins.jacms.aps.system.services.content.model.Content)2 DataObject (org.entando.entando.aps.system.services.dataobject.model.DataObject)2 EntitySearchFilter (com.agiletec.aps.system.common.entity.model.EntitySearchFilter)1 ApsSystemException (com.agiletec.aps.system.exception.ApsSystemException)1 ApiException (org.entando.entando.aps.system.services.api.model.ApiException)1 IUserProfile (org.entando.entando.aps.system.services.userprofile.model.IUserProfile)1