001/*
002 * (C) Copyright 2006-2009 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 *     Nuxeo
016 */
017
018package org.nuxeo.ecm.platform.publisher.api;
019
020import org.nuxeo.ecm.core.api.DocumentRef;
021
022import java.io.Serializable;
023
024/**
025 * Interface of a Document that was published into a PublicationNode.
026 *
027 * @author tiry
028 */
029public interface PublishedDocument extends Serializable {
030
031    enum Type {
032        REMOTE, LOCAL, FILE_SYSTEM;
033    }
034
035    DocumentRef getSourceDocumentRef();
036
037    String getSourceRepositoryName();
038
039    String getSourceServer();
040
041    String getSourceVersionLabel();
042
043    String getPath();
044
045    String getParentPath();
046
047    /**
048     * Returns {@code true} if this document is waiting approval, {@code false} otherwise.
049     */
050    boolean isPending();
051
052    /**
053     * Returns the {@code Type} of this PublishedDocument.
054     */
055    Type getType();
056
057}