001    /**
002     * Copyright (c) 2000-present 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.portlet;
016    
017    import java.util.HashMap;
018    import java.util.Map;
019    
020    /**
021     * @author Julio Camarero
022     */
023    public class PublicRenderParameters extends HashMap<String, String[]> {
024    
025            public PublicRenderParameters(
026                    Map<String, String[]> map1, Map<String, String[]> map2) {
027    
028                    super(map1);
029    
030                    _map = map2;
031            }
032    
033            @Override
034            public void clear() {
035                    super.clear();
036    
037                    _map.clear();
038            }
039    
040            @Override
041            public String[] put(String key, String[] value) {
042                    _map.put(key, value);
043    
044                    return super.put(key, value);
045            }
046    
047            @Override
048            public void putAll(Map<? extends String, ? extends String[]> map) {
049                    super.putAll(map);
050    
051                    _map.putAll(map);
052            }
053    
054            @Override
055            public String[] remove(Object key) {
056                    _map.remove(key);
057    
058                    return super.remove(key);
059            }
060    
061            private final Map<String, String[]> _map;
062    
063    }