This project has retired. For details please refer to its Attic page.
CmisObjectMock 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.runtime;
20  
21  import java.io.Serializable;
22  import java.util.GregorianCalendar;
23  import java.util.List;
24  import java.util.Map;
25  
26  import org.apache.chemistry.opencmis.client.api.CmisObject;
27  import org.apache.chemistry.opencmis.client.api.ItemIterable;
28  import org.apache.chemistry.opencmis.client.api.ObjectId;
29  import org.apache.chemistry.opencmis.client.api.ObjectType;
30  import org.apache.chemistry.opencmis.client.api.OperationContext;
31  import org.apache.chemistry.opencmis.client.api.Policy;
32  import org.apache.chemistry.opencmis.client.api.Property;
33  import org.apache.chemistry.opencmis.client.api.Relationship;
34  import org.apache.chemistry.opencmis.client.api.Rendition;
35  import org.apache.chemistry.opencmis.client.api.TransientCmisObject;
36  import org.apache.chemistry.opencmis.commons.data.Ace;
37  import org.apache.chemistry.opencmis.commons.data.Acl;
38  import org.apache.chemistry.opencmis.commons.data.AllowableActions;
39  import org.apache.chemistry.opencmis.commons.data.CmisExtensionElement;
40  import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
41  import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
42  import org.apache.chemistry.opencmis.commons.enums.ExtensionLevel;
43  import org.apache.chemistry.opencmis.commons.enums.RelationshipDirection;
44  
45  public class CmisObjectMock implements CmisObject, Serializable {
46  
47      /**
48       *
49       */
50      private static final long serialVersionUID = 1L;
51  
52      private final String id;
53  
54      public CmisObjectMock(String id) {
55          this.id = id;
56      }
57  
58      public Acl addAcl(List<Ace> addAces, AclPropagation aclPropagation) {
59          return null;
60      }
61  
62      public Acl applyAcl(List<Ace> addAces, List<Ace> removeAces, AclPropagation aclPropagation) {
63          return null;
64      }
65  
66      public void applyPolicy(ObjectId policyId) {
67      }
68  
69      public void delete(boolean allVersions) {
70      }
71  
72      public Acl getAcl() {
73          return null;
74      }
75  
76      public Acl getAcl(boolean onlyBasicPermissions) {
77          return null;
78      }
79  
80      public AllowableActions getAllowableActions() {
81          return null;
82      }
83  
84      public ObjectType getBaseType() {
85          return null;
86      }
87  
88      public BaseTypeId getBaseTypeId() {
89          return null;
90      }
91  
92      public String getChangeToken() {
93          return null;
94      }
95  
96      public String getCreatedBy() {
97          return null;
98      }
99  
100     public GregorianCalendar getCreationDate() {
101         return null;
102     }
103 
104     public GregorianCalendar getLastModificationDate() {
105         return null;
106     }
107 
108     public String getLastModifiedBy() {
109         return null;
110     }
111 
112     public String getName() {
113         return null;
114     }
115 
116     public List<Policy> getPolicies() {
117         return null;
118     }
119 
120     public List<Property<?>> getProperties() {
121         return null;
122     }
123 
124     public <T> Property<T> getProperty(String id) {
125         return null;
126     }
127 
128     public <T> T getPropertyValue(String id) {
129         return null;
130     }
131 
132     public long getRefreshTimestamp() {
133         return 0;
134     }
135 
136     public List<Relationship> getRelationships() {
137         return null;
138     }
139 
140     public ItemIterable<Relationship> getRelationships(boolean includeSubRelationshipTypes,
141             RelationshipDirection relationshipDirection, ObjectType type, OperationContext context) {
142         return null;
143     }
144 
145     public List<Rendition> getRenditions() {
146         return null;
147     }
148 
149     public ObjectType getType() {
150         return null;
151     }
152 
153     public List<CmisExtensionElement> getExtensions(ExtensionLevel level) {
154         return null;
155     }
156 
157     public void refresh() {
158 
159     }
160 
161     public void refreshIfOld(long durationInMillis) {
162 
163     }
164 
165     public Acl removeAcl(List<Ace> removeAces, AclPropagation aclPropagation) {
166         return null;
167     }
168 
169     public ObjectId updateProperties() {
170         return null;
171     }
172 
173     public CmisObject updateProperties(Map<String, ?> properties) {
174         return null;
175     }
176 
177     public ObjectId updateProperties(Map<String, ?> properties, boolean refresh) {
178         return null;
179     }
180 
181     public void applyPolicy(ObjectId... policyIds) {
182 
183     }
184 
185     public void removePolicy(ObjectId... policyIds) {
186     }
187 
188     public String getId() {
189         return this.id;
190     }
191 
192     public <T> T getAdapter(Class<T> adapterInterface) {
193         return null;
194     }
195 
196     public TransientCmisObject getTransientObject() {
197         return null;
198     }
199 }