001/* 002 * (C) Copyright 2006-2010 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 * Thierry Delprat 016 */ 017package org.nuxeo.apidoc.api; 018 019import java.util.List; 020import java.util.Map; 021 022public interface DocumentationItem extends Comparable<DocumentationItem> { 023 024 String TYPE_NAME = "NXDocumentation"; 025 026 String PROP_TARGET = "nxdoc:target"; 027 028 String PROP_TARGET_TYPE = "nxdoc:targetType"; 029 030 String PROP_APPLICABLE_VERSIONS = "nxdoc:applicableVersions"; 031 032 String PROP_DOCUMENTATION_ID = "nxdoc:documentationId"; 033 034 String PROP_NUXEO_APPROVED = "nxdoc:nuxeoApproved"; 035 036 String PROP_TYPE = "nxdoc:type"; 037 038 String PROP_RENDERING_TYPE = "nxdoc:renderingType"; 039 040 /** 041 * Gets Title of the Documentation 042 */ 043 String getTitle(); 044 045 /** 046 * Gets the main content of the Documentation 047 */ 048 String getContent(); 049 050 /** 051 * Gets the type of the documentation (description, how-to, samples ...) 052 */ 053 String getType(); 054 055 /** 056 * Gets the output rendering format for the content (wiki, html ...) 057 */ 058 String getRenderingType(); 059 060 /** 061 * Gets label for the documentation type 062 */ 063 String getTypeLabel(); 064 065 /** 066 * Gets versions. 067 */ 068 List<String> getApplicableVersion(); 069 070 /** 071 * Gets identifier of the target documented artifact 072 */ 073 String getTarget(); 074 075 /** 076 * Gets the Type of the target documented artifact (NXBundle, NXComponent ...). 077 */ 078 String getTargetType(); 079 080 /** 081 * Indicates if documentation has been validated by Nuxeo. 082 */ 083 boolean isApproved(); 084 085 /** 086 * Local documentation identifier. 087 */ 088 String getId(); 089 090 /** 091 * UUID of the underlying DocumentModel. 092 */ 093 String getUUID(); 094 095 /** 096 * Returns attachments. 097 */ 098 Map<String, String> getAttachments(); 099 100 /** 101 * Return true if item is a placeholder automatically generated. 102 */ 103 boolean isPlaceHolder(); 104 105 /** 106 * Return the id used by quick editor (can contains a real UUID for existing doc or an artifact id for new one). 107 */ 108 String getEditId(); 109 110 boolean isReadOnly(); 111 112}