1/*2 * Licensed to the Apache Software Foundation (ASF) under one3 * or more contributor license agreements. See the NOTICE file4 * distributed with this work for additional information5 * regarding copyright ownership. The ASF licenses this file6 * to you under the Apache License, Version 2.0 (the7 * "License"); you may not use this file except in compliance8 * with the License. You may obtain a copy of the License at9 *10 * http://www.apache.org/licenses/LICENSE-2.011 *12 * Unless required by applicable law or agreed to in writing,13 * software distributed under the License is distributed on an14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY15 * KIND, either express or implied. See the License for the16 * specific language governing permissions and limitations17 * under the License.18 */19package org.apache.chemistry.opencmis.client.runtime;
2021import java.util.ArrayList;
22import java.util.List;
2324import org.apache.chemistry.opencmis.client.api.ChangeEvent;
25import org.apache.chemistry.opencmis.client.api.ChangeEvents;
2627publicclassChangeEventsImplimplements ChangeEvents {
2829private String latestChangeLogToken;
30private List<ChangeEvent> events;
31privateboolean hasMoreItems = false;
32privatelong totalNumItems = -1;
3334publicChangeEventsImpl() {
35 }
3637publicChangeEventsImpl(String latestChangeLogToken, List<ChangeEvent> events, boolean hasMoreItems,
38long totalNumItems) {
39this.latestChangeLogToken = latestChangeLogToken;
40this.events = events;
41this.hasMoreItems = hasMoreItems;
42this.totalNumItems = totalNumItems;
43 }
4445 @Override
46public String getLatestChangeLogToken() {
47return latestChangeLogToken;
48 }
4950publicvoid setLatestChangeLogToken(String latestChangeLogToken) {
51this.latestChangeLogToken = latestChangeLogToken;
52 }
5354 @Override
55public List<ChangeEvent> getChangeEvents() {
56if (events == null) {
57 events = new ArrayList<ChangeEvent>();
58 }
5960return events;
61 }
6263publicvoid setChangeEvents(List<ChangeEvent> events) {
64this.events = events;
65 }
6667 @Override
68publicboolean getHasMoreItems() {
69return hasMoreItems;
70 }
7172publicvoid setHasMoreItems(boolean hasMoreItems) {
73this.hasMoreItems = hasMoreItems;
74 }
7576publicvoid setTotalNumItems(long totalNumItems) {
77this.totalNumItems = totalNumItems;
78 }
7980 @Override
81publiclong getTotalNumItems() {
82return totalNumItems;
83 }
84 }