001/*
002 *  Copyright 2012 Anyware Services
003 *
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package org.ametys.plugins.newsletter.auto;
017
018import java.util.List;
019
020/**
021 * A content filter result.
022 */
023public class AutomaticNewsletterFilterResult
024{
025    
026    /** A list of content id returned by the filter. */
027    protected List<String> _contentIds;
028    
029    /** The filter metadata set name. */
030    protected String _viewName;
031    
032    /**
033     * Get the contentIds.
034     * @return the contentIds
035     */
036    public List<String> getContentIds()
037    {
038        return _contentIds;
039    }
040    
041    /**
042     * Set the contentIds.
043     * @param contentIds the contentIds to set
044     */
045    public void setContentIds(List<String> contentIds)
046    {
047        this._contentIds = contentIds;
048    }
049    
050    /**
051     * Get the viewName.
052     * @return the viewName
053     */
054    public String getViewName()
055    {
056        return _viewName;
057    }
058    
059    /**
060     * Set the viewName.
061     * @param viewName the viewName to set
062     */
063    public void setViewName(String viewName)
064    {
065        this._viewName = viewName;
066    }
067    
068    /**
069     * Test if the filter has results.
070     * @return true if the filter has results, false otherwise.
071     */
072    public boolean hasResults()
073    {
074        return !_contentIds.isEmpty();
075    }
076    
077}