This project has retired. For details please refer to its Attic page.
VersioningService xref

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.commons.spi;
20  
21  import java.util.List;
22  
23  import org.apache.chemistry.opencmis.commons.data.Acl;
24  import org.apache.chemistry.opencmis.commons.data.ContentStream;
25  import org.apache.chemistry.opencmis.commons.data.ExtensionsData;
26  import org.apache.chemistry.opencmis.commons.data.ObjectData;
27  import org.apache.chemistry.opencmis.commons.data.Properties;
28  import org.apache.chemistry.opencmis.commons.enums.IncludeRelationships;
29  
30  /**
31   * Versioning Service interface.
32   * 
33   * <p>
34   * <em>
35   * See CMIS 1.0 specification for details on the operations, parameters,
36   * exceptions and the domain model.
37   * </em>
38   * </p>
39   */
40  public interface VersioningService {
41      /**
42       * Create a private working copy of the document.
43       */
44      void checkOut(String repositoryId, Holder<String> objectId, ExtensionsData extension, Holder<Boolean> contentCopied);
45  
46      /**
47       * Reverses the effect of a check-out.
48       */
49      void cancelCheckOut(String repositoryId, String objectId, ExtensionsData extension);
50  
51      /**
52       * Checks-in the private working copy (PWC) document.
53       */
54      void checkIn(String repositoryId, Holder<String> objectId, Boolean major, Properties properties,
55              ContentStream contentStream, String checkinComment, List<String> policies, Acl addAces, Acl removeAces,
56              ExtensionsData extension);
57  
58      /**
59       * Get the latest document object in the version series.
60       */
61      ObjectData getObjectOfLatestVersion(String repositoryId, String objectId, String versionSeriesId, Boolean major,
62              String filter, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
63              String renditionFilter, Boolean includePolicyIds, Boolean includeAcl, ExtensionsData extension);
64  
65      /**
66       * Get a subset of the properties for the latest document object in the
67       * version series.
68       */
69      Properties getPropertiesOfLatestVersion(String repositoryId, String objectId, String versionSeriesId,
70              Boolean major, String filter, ExtensionsData extension);
71  
72      /**
73       * Returns the list of all document objects in the specified version series,
74       * sorted by the property "cmis:creationDate" descending.
75       */
76      List<ObjectData> getAllVersions(String repositoryId, String objectId, String versionSeriesId, String filter,
77              Boolean includeAllowableActions, ExtensionsData extension);
78  }