View Javadoc

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.ChangeEvent;
27  import org.apache.chemistry.opencmis.commons.data.Acl;
28  import org.apache.chemistry.opencmis.commons.enums.ChangeType;
29  import org.apache.chemistry.opencmis.commons.impl.dataobjects.ChangeEventInfoDataImpl;
30  
31  /**
32   * Change Event.
33   */
34  public class ChangeEventImpl extends ChangeEventInfoDataImpl implements ChangeEvent, Serializable {
35  
36      private static final long serialVersionUID = 1L;
37  
38      private String objectId;
39      private Map<String, List<?>> properties;
40      private List<String> policyIds;
41      private Acl acl;
42  
43      public ChangeEventImpl() {
44      }
45  
46      public ChangeEventImpl(ChangeType changeType, GregorianCalendar changeTime, String objectId,
47              Map<String, List<?>> properties, List<String> policyIds, Acl acl) {
48          super(changeType, changeTime);
49          this.objectId = objectId;
50          this.properties = properties;
51          this.policyIds = policyIds;
52          this.acl = acl;
53      }
54  
55      @Override
56      public String getObjectId() {
57          return objectId;
58      }
59  
60      public void setObjectId(String objectId) {
61          this.objectId = objectId;
62      }
63  
64      @Override
65      public Map<String, List<?>> getProperties() {
66          return properties;
67      }
68  
69      public void setProperties(Map<String, List<?>> properties) {
70          this.properties = properties;
71      }
72  
73      @Override
74      public List<String> getPolicyIds() {
75          return policyIds;
76      }
77  
78      public void setPolicyIds(List<String> policyIds) {
79          this.policyIds = policyIds;
80      }
81  
82      @Override
83      public Acl getAcl() {
84          return acl;
85      }
86  
87      public void setAcl(Acl acl) {
88          this.acl = acl;
89      }
90  
91      @Override
92      public String toString() {
93          return "Change Event [change type=" + getChangeType() + ", change time=" + getChangeTime() + ", object id="
94                  + objectId + ", properties=" + properties + ", policy ids=" + policyIds + ", ACL=" + acl + "]"
95                  + super.toString();
96      }
97  }