All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencms.workplace.tools.I_CmsToolHandler Maven / Gradle / Ivy

Go to download

OpenCms is an enterprise-ready, easy to use website content management system based on Java and XML technology. Offering a complete set of features, OpenCms helps content managers worldwide to create and maintain beautiful websites fast and efficiently.

There is a newer version: 18.0
Show newest version
/*
 * This library is part of OpenCms -
 * the Open Source Content Management System
 *
 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
 *
 * 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.
 *
 * For further information about Alkacon Software GmbH & Co. KG, please see the
 * company website: http://www.alkacon.com
 *
 * For further information about OpenCms, please see the
 * project website: http://www.opencms.org
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package org.opencms.workplace.tools;

import org.opencms.file.CmsObject;
import org.opencms.workplace.CmsWorkplace;

import java.util.Map;

/**
 * Interface for an admin tool handler.

* * These handlers are created and managed by the * {@link org.opencms.workplace.tools.CmsToolManager}.

* * @since 6.0.0 */ public interface I_CmsToolHandler { /** * Returns the help text if disabled.

* * @return the help text if disabled */ String getDisabledHelpText(); /** * Returns the group.

* * @return the group */ String getGroup(); /** * Returns the help text.

* * @return the help text */ String getHelpText(); /** * Returns the path to the icon.

* * @return the path to the icon */ String getIconPath(); /** * Returns the link to the tool.

* * @return the link */ String getLink(); /** * Returns the displayed name.

* * @return the name */ String getName(); /** * Returns the evaluated map of parameters.

* * @param wp the workplace context * * @return the parameters map */ Map getParameters(CmsWorkplace wp); /** * Returns the tool path to install the tool in.

* * @return the path */ String getPath(); /** * Returns the relative position in the group.

* * @return the position */ float getPosition(); /** * Returns the name for the menu or navbar.

* * @return the short name */ String getShortName(); /** * Returns an optional confirmation message, displayed in a js confirm dialog.

* * @return the confirmation message */ String getConfirmationMessage(); /** * Returns the path to an optional small(16x16) icon.

* * @return the path to an optional small(16x16) icon */ String getSmallIconPath(); /** * Returns the state of the admin tool for a given cms context.

* * @param cms the cms context * * @return true if enabled */ boolean isEnabled(CmsObject cms); /** * Returns the visibility flag for a given cms context.

* * @param cms the cms context * * @return true if visible */ boolean isVisible(CmsObject cms); /** * Returns the state of the admin tool for a given workplace context.

* * @param wp the workplace context * * @return true if enabled */ boolean isEnabled(CmsWorkplace wp); /** * Returns the visibility flag for a given workplace context.

* * @param wp the workplace context * * @return true if visible */ boolean isVisible(CmsWorkplace wp); /** * Main method that somehow setups the admin tool handler.

* * @param cms the admin context (at opencms-workplace (re-)initialization time) * @param root the root context * @param resourcePath the resource path of the file/folder to use as admin tool * * @return false if something goes wrong */ boolean setup(CmsObject cms, CmsToolRootHandler root, String resourcePath); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy