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