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 String getTargetType(); 081 082 /** 083 * Indicates if documentation has been validated by Nuxeo. 084 */ 085 boolean isApproved(); 086 087 /** 088 * Local documentation identifier. 089 */ 090 String getId(); 091 092 /** 093 * UUID of the underlying DocumentModel. 094 */ 095 String getUUID(); 096 097 /** 098 * Returns attachments. 099 */ 100 Map<String, String> getAttachments(); 101 102 /** 103 * Return true if item is a placeholder automatically generated. 104 */ 105 boolean isPlaceHolder(); 106 107 /** 108 * Return the id used by quick editor (can contains a real UUID for existing doc or an artifact id for new one). 109 */ 110 String getEditId(); 111 112 boolean isReadOnly(); 113 114}