001/*
002 * This library is part of OpenCms -
003 * the Open Source Content Management System
004 *
005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
006 *
007 * This library is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * This library is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015 * Lesser General Public License for more details.
016 *
017 * For further information about Alkacon Software, please see the
018 * company website: http://www.alkacon.com
019 *
020 * For further information about OpenCms, please see the
021 * project website: http://www.opencms.org
022 *
023 * You should have received a copy of the GNU Lesser General Public
024 * License along with this library; if not, write to the Free Software
025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
026 */
027
028package org.opencms.ui.apps.user;
029
030import org.opencms.file.CmsObject;
031import org.opencms.ui.CmsCssIcon;
032
033/**
034 * Interface for OU tree types.<p>
035 */
036public interface I_CmsOuTreeType {
037
038    /**
039     * Returns the key for the empty-message.<p>
040     *
041     * @return key as string
042     */
043    public String getEmptyMessageKey();
044
045    /**
046     * Get the icon.<p>
047     *
048     * @return CmsCssIcon
049     */
050    public CmsCssIcon getIcon();
051
052    /**
053     * Gets the id of the type.<p>
054     *
055     * @return id string
056     */
057    public String getId();
058
059    /**
060     * Gets the name of the element.<p>
061     *
062     * @return name
063     */
064    public String getName();
065
066    /**
067     * Checks if type is expandable.<p>
068     *
069     * @return true if expandable
070     */
071    public boolean isExpandable();
072
073    /**
074     * Checks if the tree type is group-like.<p>
075     *
076     * @return true for group-like types
077     */
078    public boolean isGroup();
079
080    /**
081     * Checks if the tree type is OU-like.<p>
082     *
083     * @return true for OU-like types
084     */
085    public boolean isOrgUnit();
086
087    /**
088     * Checks if the tree type is role-like.<p>
089     *
090     * @return true for role-like OUs
091     */
092    public boolean isRole();
093
094    /**
095     * Checks if the tree type is user-like.<p>
096     *
097     * @return true for user-like OUs
098     */
099    public boolean isUser();
100
101    /**
102     * Checks if the tree type is available for a given OU.
103     *
104     * @param cms the CMS context
105     * @param ou the OU FQN.
106     *
107     * @return true if the tree type is valid for the OU
108     */
109    public boolean isValidForOu(CmsObject cms, String ou);
110
111    /**
112     * True if type should be shown in OU overview table.<p>
113     *
114     * @return true if the type should be shown in the overview table for an OU
115     */
116    public boolean showInOuTable();
117
118}