This project has retired. For details please refer to its Attic page.
CmisObjectProperties 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.client.api;
20  
21  import java.util.GregorianCalendar;
22  import java.util.List;
23  
24  import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
25  
26  /**
27   * Accessors to CMIS object properties.
28   * <p>
29   * A property might not be available because either the repository didn't
30   * provide it or a property filter was used to retrieve this object.
31   * <p>
32   * The property values represent a snapshot of the object when it was loaded.
33   * The objects and its properties can be out-of-date if the object has been
34   * modified in the repository.
35   * <p>
36   * Implementations of this interface might alter property values without
37   * updating the object in the repository. In this case, the values returned by
38   * these accessors don't reflect the state of the object in the repository.
39   */
40  public interface CmisObjectProperties {
41  
42      /**
43       * Returns a list of all available CMIS properties.
44       */
45      List<Property<?>> getProperties();
46  
47      /**
48       * Returns the requested property. If the property is not available,
49       * <code>null</code> is returned.
50       */
51      <T> Property<T> getProperty(String id);
52  
53      /**
54       * Returns the value of the requested property. If the property is not
55       * available, <code>null</code> is returned.
56       */
57      <T> T getPropertyValue(String id);
58  
59      // convenience accessors
60  
61      /**
62       * Returns the name of this CMIS object (CMIS property
63       * <code>cmis:name</code>).
64       */
65      String getName();
66  
67      /**
68       * Returns the user who created this CMIS object (CMIS property
69       * <code>cmis:createdBy</code>).
70       */
71      String getCreatedBy();
72  
73      /**
74       * Returns the timestamp when this CMIS object has been created (CMIS
75       * property <code>cmis:creationDate</code>).
76       */
77      GregorianCalendar getCreationDate();
78  
79      /**
80       * Returns the user who modified this CMIS object (CMIS property
81       * <code>cmis:lastModifiedBy</code>).
82       */
83      String getLastModifiedBy();
84  
85      /**
86       * Returns the timestamp when this CMIS object has been modified (CMIS
87       * property <code>cmis:lastModificationDate</code>).
88       */
89      GregorianCalendar getLastModificationDate();
90  
91      /**
92       * Returns the id of the base type of this CMIS object (CMIS property
93       * <code>cmis:baseTypeId</code>).
94       */
95      BaseTypeId getBaseTypeId();
96  
97      /**
98       * Returns the base type of this CMIS object (object type identified by
99       * <code>cmis:baseTypeId</code>).
100      */
101     ObjectType getBaseType();
102 
103     /**
104      * Returns the type of this CMIS object (object type identified by
105      * <code>cmis:objectTypeId</code>).
106      */
107     ObjectType getType();
108 
109     /**
110      * Returns the change token (CMIS property <code>cmis:changeToken</code>).
111      */
112     String getChangeToken();
113 }