Ignore:
Timestamp:
02/20/14 16:29:00 (10 years ago)
Author:
twagoo
Message:

Refactored FacetSelection?, now an interface with the wicket model implementing it itself

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/pojo/FacetSelection.java

    r4540 r4542  
    1515 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
    1616 */
     17
    1718package eu.clarin.cmdi.vlo.pojo;
    1819
    19 import java.io.Serializable;
    2020import java.util.List;
    21 import java.util.concurrent.CopyOnWriteArrayList;
    22 import org.apache.wicket.model.IModel;
    2321
    2422/**
     
    2624 * @author twagoo
    2725 */
    28 public class FacetSelection implements Serializable {
     26public interface FacetSelection {
    2927
    30     private final String facet;
    31     private final IModel<QueryFacetsSelection> selectionModel;
     28    String getFacet();
    3229
    33     public FacetSelection(String facet, IModel<QueryFacetsSelection> selectionModel) {
    34         this.facet = facet;
    35         this.selectionModel = selectionModel;
    36     }
     30    List<String> getFacetValues();
    3731
    38     public String getFacet() {
    39         return facet;
    40     }
    41 
    42     public QueryFacetsSelection getSelection() {
    43         return selectionModel.getObject();
    44     }
    45 
    46     public List<String> getFacetValues() {
    47         return new CopyOnWriteArrayList<String>(getSelection().getSelectionValues(facet));
    48     }
    49 
     32    QueryFacetsSelection getSelection();
     33   
    5034}
Note: See TracChangeset for help on using the changeset viewer.