/*
* Copyright 2015-Present Entando Inc. (http://www.entando.com) All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.agiletec.apsadmin.tags;
import com.agiletec.aps.util.ApsWebApplicationUtils;
import com.agiletec.apsadmin.system.ApsAdminSystemConstants;
import org.entando.entando.apsadmin.system.services.shortcut.IShortcutManager;
/**
* Returns a shortcut (or one of its property) through the code.
* You can choose whether to return the entire object (leaving the attribute "property" empty) or a single property.
* The names of the available property of "Shortcut": "id", "descriptionKey", "description", "longDescription", "longDescriptionKey",
* "requiredPermission", "menuSectionCode", "menuSection", "source", "namespace", "actionName", "parameters".
* @author E.Santoboni
*/
public class ShortcutInfoTag extends AbstractObjectInfoTag {
@Override
protected Object getMasterObject(String keyValue) throws Throwable {
IShortcutManager shortcutManager = (IShortcutManager) ApsWebApplicationUtils.getBean(ApsAdminSystemConstants.SHORTCUT_MANAGER, this.pageContext);
return shortcutManager.getShortcut(keyValue);
}
}