This project has retired. For details please refer to its Attic page.
ObjectInfoImpl 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.impl.server;
20  
21  import java.util.GregorianCalendar;
22  import java.util.List;
23  
24  import org.apache.chemistry.opencmis.commons.data.ObjectData;
25  import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
26  import org.apache.chemistry.opencmis.commons.server.ObjectInfo;
27  import org.apache.chemistry.opencmis.commons.server.RenditionInfo;
28  
29  /**
30   * Implementation of the {@link ObjectInfo} interface.
31   */
32  public class ObjectInfoImpl implements ObjectInfo {
33  
34      private String id;
35      private String name;
36      private String createdBy;
37      private GregorianCalendar creationDate;
38      private GregorianCalendar lastModificationDate;
39      private String typeId;
40      private BaseTypeId baseTypeId;
41      private boolean isCurrentVersion = true;
42      private String versionSeriesId = null;
43      private String workingCopyId = null;
44      private String workingCopyOriginalId = null;
45      private boolean hasContent = true;
46      private String contentType = null;
47      private String fileName = null;
48      private List<RenditionInfo> renditionInfos = null;
49      private boolean supportsRelationships = false;
50      private boolean supportsPolicies = false;
51      private boolean hasAcl = false;
52      private boolean hasParent = true;
53      private boolean supportsDescendants = false;
54      private boolean supportsFolderTree = false;
55      private List<String> relationshipSourceIds = null;
56      private List<String> relationshipTargetIds = null;
57      private ObjectData object = null;
58  
59      public ObjectInfoImpl() {
60      }
61  
62      public ObjectInfoImpl(String id, BaseTypeId baseObjectTypeId) {
63          this.id = id;
64          baseTypeId = baseObjectTypeId;
65      }
66  
67      public String getId() {
68          return id;
69      }
70  
71      public void setId(String id) {
72          this.id = id;
73      }
74  
75      public String getName() {
76          return name;
77      }
78  
79      public void setName(String name) {
80          this.name = name;
81      }
82  
83      public String getCreatedBy() {
84          return createdBy;
85      }
86  
87      public void setCreatedBy(String createdBy) {
88          this.createdBy = createdBy;
89      }
90  
91      public GregorianCalendar getCreationDate() {
92          return creationDate;
93      }
94  
95      public void setCreationDate(GregorianCalendar creationDate) {
96          this.creationDate = creationDate;
97      }
98  
99      public GregorianCalendar getLastModificationDate() {
100         return lastModificationDate;
101     }
102 
103     public void setLastModificationDate(GregorianCalendar lastModificationDate) {
104         this.lastModificationDate = lastModificationDate;
105     }
106 
107     public String getTypeId() {
108         return typeId;
109     }
110 
111     public void setTypeId(String typeId) {
112         this.typeId = typeId;
113     }
114 
115     public BaseTypeId getBaseType() {
116         return baseTypeId;
117     }
118 
119     public void setBaseType(BaseTypeId baseObjectTypeId) {
120         this.baseTypeId = baseObjectTypeId;
121     }
122 
123     public boolean isCurrentVersion() {
124         return isCurrentVersion;
125     }
126 
127     public void setIsCurrentVersion(boolean currentVersion) {
128         this.isCurrentVersion = currentVersion;
129     }
130 
131     public String getVersionSeriesId() {
132         return versionSeriesId;
133     }
134 
135     public void setVersionSeriesId(String versionSeriesId) {
136         this.versionSeriesId = versionSeriesId;
137     }
138 
139     public String getWorkingCopyId() {
140         return workingCopyId;
141     }
142 
143     public void setWorkingCopyId(String workingCopyId) {
144         this.workingCopyId = workingCopyId;
145     }
146 
147     public String getWorkingCopyOriginalId() {
148         return workingCopyOriginalId;
149     }
150 
151     public void setWorkingCopyOriginalId(String workingCopyOriginalId) {
152         this.workingCopyOriginalId = workingCopyOriginalId;
153     }
154 
155     public boolean hasContent() {
156         return hasContent;
157     }
158 
159     public void setHasContent(boolean hasContent) {
160         this.hasContent = hasContent;
161     }
162 
163     public String getContentType() {
164         return contentType;
165     }
166 
167     public void setContentType(String contentType) {
168         this.contentType = contentType;
169     }
170 
171     public String getFileName() {
172         return fileName;
173     }
174 
175     public void setFileName(String fileName) {
176         this.fileName = fileName;
177     }
178 
179     public List<RenditionInfo> getRenditionInfos() {
180         return renditionInfos;
181     }
182 
183     public void setRenditionInfos(List<RenditionInfo> renditions) {
184         this.renditionInfos = renditions;
185     }
186 
187     public boolean supportsRelationships() {
188         return supportsRelationships;
189     }
190 
191     public void setSupportsRelationships(boolean supportsRelationships) {
192         this.supportsRelationships = supportsRelationships;
193     }
194 
195     public boolean supportsPolicies() {
196         return supportsPolicies;
197     }
198 
199     public void setSupportsPolicies(boolean supportsPolicies) {
200         this.supportsPolicies = supportsPolicies;
201     }
202 
203     public boolean hasAcl() {
204         return hasAcl;
205     }
206 
207     public void setHasAcl(boolean hasAcl) {
208         this.hasAcl = hasAcl;
209     }
210 
211     public boolean hasParent() {
212         return hasParent;
213     }
214 
215     public void setHasParent(boolean hasParent) {
216         this.hasParent = hasParent;
217     }
218 
219     public boolean supportsDescendants() {
220         return supportsDescendants;
221     }
222 
223     public void setSupportsDescendants(boolean supportsDescendants) {
224         this.supportsDescendants = supportsDescendants;
225     }
226 
227     public boolean supportsFolderTree() {
228         return supportsFolderTree;
229     }
230 
231     public void setSupportsFolderTree(boolean supportsFolderTree) {
232         this.supportsFolderTree = supportsFolderTree;
233     }
234 
235     public List<String> getRelationshipSourceIds() {
236         return relationshipSourceIds;
237     }
238 
239     public void setRelationshipSourceIds(List<String> relationshipSourceIds) {
240         this.relationshipSourceIds = relationshipSourceIds;
241     }
242 
243     public List<String> getRelationshipTargetIds() {
244         return relationshipTargetIds;
245     }
246 
247     public void setRelationshipTargetIds(List<String> relationshipTargetIds) {
248         this.relationshipTargetIds = relationshipTargetIds;
249     }
250 
251     public ObjectData getObject() {
252         return object;
253     }
254 
255     public void setObject(ObjectData object) {
256         this.object = object;
257     }
258 }