1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.apache.chemistry.opencmis.client.api; 20 21 import java.util.List; 22 23 import org.apache.chemistry.opencmis.commons.data.ContentStreamHash; 24 25 /** 26 * Accessors to CMIS document properties. 27 * 28 * @see CmisObjectProperties 29 */ 30 public interface DocumentProperties { 31 32 /** 33 * Returns {@code true} if this document is immutable (CMIS property 34 * {@code cmis:isImmutable}). 35 * 36 * @return the immutable flag of the document or {@code null} if the 37 * property hasn't been requested, hasn't been provided by the 38 * repository, or the property value isn't set 39 * 40 * @cmis 1.0 41 */ 42 Boolean isImmutable(); 43 44 /** 45 * Returns {@code true} if this document is the latest version (CMIS 46 * property {@code cmis:isLatestVersion}). 47 * 48 * @return the latest version flag of the document or {@code null} if the 49 * property hasn't been requested, hasn't been provided by the 50 * repository, or the property value isn't set 51 * 52 * @cmis 1.0 53 */ 54 Boolean isLatestVersion(); 55 56 /** 57 * Returns {@code true} if this document is a major version (CMIS property 58 * {@code cmis:isMajorVersion}). 59 * 60 * @return the major version flag of the document or {@code null} if the 61 * property hasn't been requested, hasn't been provided by the 62 * repository, or the property value isn't set 63 * 64 * @cmis 1.0 65 */ 66 Boolean isMajorVersion(); 67 68 /** 69 * Returns {@code true} if this document is the latest major version (CMIS 70 * property {@code cmis:isLatestMajorVersion}). 71 * 72 * @return the latest major version flag of the document or {@code null} if 73 * the property hasn't been requested, hasn't been provided by the 74 * repository, or the property value isn't set 75 * 76 * @cmis 1.0 77 */ 78 Boolean isLatestMajorVersion(); 79 80 /** 81 * Returns {@code true} if this document is the PWC (CMIS property 82 * {@code cmis:isPrivateWorkingCopy}). 83 * 84 * @return the PWC flag of the document or {@code null} if the property 85 * hasn't been requested, hasn't been provided by the repository, or 86 * the property value isn't set 87 * 88 * @see Document#isVersionSeriesPrivateWorkingCopy() 89 * 90 * @cmis 1.1 91 */ 92 Boolean isPrivateWorkingCopy(); 93 94 /** 95 * Returns the version label (CMIS property {@code cmis:versionLabel}). 96 * 97 * @return the version label of the document or {@code null} if the property 98 * hasn't been requested, hasn't been provided by the repository, or 99 * the property value isn't set 100 * 101 * @cmis 1.0 102 */ 103 String getVersionLabel(); 104 105 /** 106 * Returns the version series ID (CMIS property {@code cmis:versionSeriesId} 107 * ). 108 * 109 * @return the version series ID of the document or {@code null} if the 110 * property hasn't been requested, hasn't been provided by the 111 * repository, or the property value isn't set 112 * 113 * @cmis 1.0 114 */ 115 String getVersionSeriesId(); 116 117 /** 118 * Returns {@code true} if this version series is checked out (CMIS property 119 * {@code cmis:isVersionSeriesCheckedOut}). 120 * 121 * @return the version series checked out flag of the document or 122 * {@code null} if the property hasn't been requested, hasn't been 123 * provided by the repository, or the property value isn't set 124 * 125 * @cmis 1.0 126 */ 127 Boolean isVersionSeriesCheckedOut(); 128 129 /** 130 * Returns the user who checked out this version series (CMIS property 131 * {@code cmis:versionSeriesCheckedOutBy}). 132 * 133 * @return the user who checked out this version series or {@code null} if 134 * the property hasn't been requested, hasn't been provided by the 135 * repository, or the property value isn't set 136 * 137 * @cmis 1.0 138 */ 139 String getVersionSeriesCheckedOutBy(); 140 141 /** 142 * Returns the PWC ID of this version series (CMIS property 143 * {@code cmis:versionSeriesCheckedOutId}). 144 * <p> 145 * Some repositories provided this value only to the user who checked out 146 * the version series. 147 * 148 * @return the PWC ID of this version series or {@code null} if the property 149 * hasn't been requested, hasn't been provided by the repository, or 150 * the property value isn't set 151 * 152 * @cmis 1.0 153 */ 154 String getVersionSeriesCheckedOutId(); 155 156 /** 157 * Returns the checkin comment (CMIS property {@code cmis:checkinComment}). 158 * 159 * @return the checkin comment of this version or {@code null} if the 160 * property hasn't been requested, hasn't been provided by the 161 * repository, or the property value isn't set 162 * 163 * @cmis 1.0 164 */ 165 String getCheckinComment(); 166 167 /** 168 * Returns the content stream length or -1 if the document has no content 169 * (CMIS property {@code cmis:contentStreamLength}). 170 * 171 * @return the content stream length of this document or -1 if the property 172 * hasn't been requested, hasn't been provided by the repository, or 173 * the document has no content 174 * 175 * @cmis 1.0 176 */ 177 long getContentStreamLength(); 178 179 /** 180 * Returns the content stream MIME type or {@code null} if the document has 181 * no content (CMIS property {@code cmis:contentStreamMimeType}). 182 * 183 * @return the content stream MIME type of this document or {@code null} if 184 * the property hasn't been requested, hasn't been provided by the 185 * repository, or the document has no content 186 * 187 * @cmis 1.0 188 */ 189 String getContentStreamMimeType(); 190 191 /** 192 * Returns the content stream filename or {@code null} if the document has 193 * no content (CMIS property {@code cmis:contentStreamFileName}). 194 * 195 * @return the content stream filename of this document or {@code null} if 196 * the property hasn't been requested, hasn't been provided by the 197 * repository, or the document has no content 198 * @cmis 1.0 199 */ 200 String getContentStreamFileName(); 201 202 /** 203 * Returns the content stream ID or {@code null} if the document has no 204 * content (CMIS property {@code cmis:contentStreamId}). 205 * 206 * @return the content stream ID of this document or {@code null} if the 207 * property hasn't been requested, hasn't been provided by the 208 * repository, or the document has no content 209 * 210 * @cmis 1.0 211 */ 212 String getContentStreamId(); 213 214 /** 215 * Returns the content hashes or {@code null} if the document has no content 216 * (CMIS property {@code cmis:contentStreamHash}). 217 * 218 * @return the list of content hashes or {@code null} if the property hasn't 219 * been requested, hasn't been provided by the repository, or the 220 * document has no content 221 * 222 * @cmis Extension 223 */ 224 List<ContentStreamHash> getContentStreamHashes(); 225 226 /** 227 * Returns the latest accessible state ID or {@code null} if the repository 228 * does not support the Latest State Identifier feature extension (CMIS 229 * property {@code cmis:latestAccessibleStateId }). 230 * 231 * @return the latest accessible state ID or {@code null} 232 * 233 * @cmis Extension 234 */ 235 String getLatestAccessibleStateId(); 236 }