001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.configuration;
016    
017    import java.util.Map;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public class Filter {
023    
024            public Filter(String selector1) {
025                    this(new String[] {selector1}, null);
026            }
027    
028            public Filter(String selector1, Map<String, String> variables) {
029                    this(new String[] {selector1}, variables);
030            }
031    
032            public Filter(String selector1, String selector2) {
033                    this(new String[] {selector1, selector2}, null);
034            }
035    
036            public Filter(
037                    String selector1, String selector2, Map<String, String> variables) {
038    
039                    this(new String[] {selector1, selector2}, variables);
040            }
041    
042            public Filter(String selector1, String selector2, String selector3) {
043                    this(new String[] {selector1, selector2, selector3}, null);
044            }
045    
046            public Filter(
047                    String selector1, String selector2, String selector3,
048                    Map<String, String> variables) {
049    
050                    this(new String[] {selector1, selector2, selector3}, variables);
051            }
052    
053            public Filter(String[] selectors, Map<String, String> variables) {
054                    _selectors = selectors;
055                    _variables = variables;
056            }
057    
058            public String[] getSelectors() {
059                    return _selectors;
060            }
061    
062            public Map<String, String> getVariables() {
063                    return _variables;
064            }
065    
066            private String[] _selectors;
067            private Map<String, String> _variables;
068    
069    }