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.portal.security.permission;
016    
017    import java.util.HashMap;
018    import java.util.HashSet;
019    import java.util.Map;
020    import java.util.Set;
021    
022    /**
023     * @author L??szl?? Csontos
024     */
025    public class PortletResourceActionsBagImpl
026            extends ResourceActionsBagImpl implements PortletResourceActionsBag {
027    
028            public PortletResourceActionsBagImpl() {
029            }
030    
031            public PortletResourceActionsBagImpl(
032                    PortletResourceActionsBag portletResourceActionsBag) {
033    
034                    super(portletResourceActionsBag);
035    
036                    _portletRootModelResources.putAll(
037                            portletResourceActionsBag.getPortletRootModelResources());
038                    _resourceLayoutManagerActions.addAll(
039                            portletResourceActionsBag.getResourceLayoutManagerActions());
040            }
041    
042            @Override
043            public PortletResourceActionsBag clone() {
044                    return new PortletResourceActionsBagImpl(this);
045            }
046    
047            @Override
048            public Map<String, String> getPortletRootModelResources() {
049                    return _portletRootModelResources;
050            }
051    
052            @Override
053            public Set<String> getResourceLayoutManagerActions() {
054                    return _resourceLayoutManagerActions;
055            }
056    
057            private final Map<String, String> _portletRootModelResources =
058                    new HashMap<>();
059            private final Set<String> _resourceLayoutManagerActions = new HashSet<>();
060    
061    }