1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portlet.portletconfiguration.util;
16  
17  import com.liferay.portal.model.PublicRenderParameter;
18  
19  /**
20   * <a href="PublicRenderParameterConfiguration.java.html"><b><i>View Source</i>
21   * </b></a>
22   *
23   * @author Alberto Montero
24   */
25  public class PublicRenderParameterConfiguration {
26  
27      public static final String IGNORE_PREFIX = "lfr-prp-ignore-";
28  
29      public static final String MAPPING_PREFIX = "lfr-prp-mapping-";
30  
31      public PublicRenderParameterConfiguration(
32          PublicRenderParameter publicRenderParameter, String mapping,
33          boolean ignore) {
34  
35          _publicRenderParameter = publicRenderParameter;
36          _mapping = mapping;
37          _ignore = ignore;
38      }
39  
40      public String getIgnoreKey() {
41          return IGNORE_PREFIX + _publicRenderParameter.getIdentifier();
42      }
43  
44      public String getMapping() {
45          return _mapping;
46      }
47  
48      public String getMappingKey() {
49          return MAPPING_PREFIX + _publicRenderParameter.getIdentifier();
50      }
51  
52      public PublicRenderParameter getPublicRenderParameter() {
53          return _publicRenderParameter;
54      }
55  
56      public boolean isIgnore() {
57          return _ignore;
58      }
59  
60      private boolean _ignore;
61      private String _mapping;
62      private PublicRenderParameter _publicRenderParameter;
63  
64  }