001/* 002 * (C) Copyright 2012 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Antoine Taillefer <ataillefer@nuxeo.com> 016 */ 017package org.nuxeo.drive.adapter; 018 019import java.util.List; 020 021import org.codehaus.jackson.annotate.JsonIgnore; 022import org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem; 023import org.nuxeo.ecm.core.api.Blob; 024import org.nuxeo.ecm.core.api.DocumentModel; 025 026/** 027 * Representation of a folder. 028 * <p> 029 * In the case of a {@link DocumentModel} backed implementation, the backing document is Folderish. Typically a Folder 030 * or a Workspace. 031 * 032 * @author Antoine Taillefer 033 * @see DocumentBackedFolderItem 034 */ 035public interface FolderItem extends FileSystemItem { 036 037 @JsonIgnore 038 List<FileSystemItem> getChildren(); 039 040 boolean getCanCreateChild(); 041 042 FileItem createFile(Blob blob); 043 044 FolderItem createFolder(String name); 045 046}