001/*
002 * (C) Copyright 2007 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Nuxeo - initial API and implementation
018 *
019 * $Id: DirectoryTreeManager.java 28950 2008-01-11 13:35:06Z tdelprat $
020 */
021package org.nuxeo.ecm.webapp.directory;
022
023import java.io.Serializable;
024import java.util.List;
025
026public interface DirectoryTreeManager extends Serializable {
027
028    DirectoryTreeNode get(String treeName);
029
030    DirectoryTreeNode getSelectedTree();
031
032    List<DirectoryTreeNode> getDirectoryTrees();
033
034    List<String> getDirectoryTreeNames();
035
036    String getSelectedTreeName();
037
038    void setSelectedTreeName(String treeName);
039
040    boolean isInitialized();
041
042    /**
043     * Returns the internationalized label for a given path of the specified Directory tree. The Directory tree label is
044     * not included.
045     *
046     * @since 5.4
047     */
048    public String getLabelFor(String directoryTreeName, String fullPath);
049
050    /**
051     * Returns the internationalized label for a given path of the specified Directory tree, including or not the
052     * Directory tree label.
053     *
054     * @since 5.4
055     */
056    public String getLabelFor(String directoryTreeName, String fullPath, boolean includeDirectoryTreeLabel);
057
058}