1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * 9 * http://www.apache.org/licenses/LICENSE-2.010 * 11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17packageorg.apache.jetspeed.layout.impl;
1819import java.util.Map;
2021import org.apache.commons.logging.Log;
22import org.apache.commons.logging.LogFactory;
23import org.apache.jetspeed.ajax.AjaxAction;
24import org.apache.jetspeed.ajax.AjaxBuilder;
25import org.apache.jetspeed.layout.PortletActionSecurityBehavior;
26import org.apache.jetspeed.om.common.SecuredResource;
27import org.apache.jetspeed.page.PageManager;
2829/***30 * Abstract Get Resource aaction for folders, pages and links31 *32 * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>33 * @version $Id: $34 */35publicabstractclassBaseGetResourceAction36extendsBasePortletAction37 implements AjaxAction, AjaxBuilder, Constants38 {
39protectedstaticfinal Log log = LogFactory.getLog(BaseSiteUpdateAction.class);
4041publicBaseGetResourceAction(String template,
42 String errorTemplate,
43 PageManager pageManager)
44 {
45super(template, errorTemplate, pageManager);
46 }
4748publicBaseGetResourceAction(String template,
49 String errorTemplate,
50 PortletActionSecurityBehavior securityBehavior)
51 {
52super(template, errorTemplate, securityBehavior);
53 }
5455publicBaseGetResourceAction(String template,
56 String errorTemplate,
57 PageManager pageManager,
58 PortletActionSecurityBehavior securityBehavior)
59 {
60super(template, errorTemplate, pageManager, securityBehavior);
61 }
6263protectedvoid putSecurityInformation(Map resultMap, SecuredResource resource)
64 {
65if (resource.getSecurityConstraints() != null)
66 {
67 resultMap.put(SECURITY_REFS, resource.getSecurityConstraints().getSecurityConstraintsRefs());
68 resultMap.put(SECURITY_DEFS, resource.getSecurityConstraints().getSecurityConstraints());
69 resultMap.put(SECURITY_OWNER, resource.getSecurityConstraints().getOwner());
70 }
71 }
72 }