PageRenderTime 59ms CodeModel.GetById 48ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/v3.2/nimbits-tds/src/com/nimbits/client/service/recordedvalues/RecordedValueServiceAsync.java

http://nimbits-server.googlecode.com/
Java | 61 lines | 28 code | 20 blank | 13 comment | 0 complexity | 520faa992024828e5332a8871f212bec MD5 | raw file
 1/*
 2 * Copyright (c) 2010 Tonic Solutions LLC.
 3 *
 4 * http://www.nimbits.com
 5 *
 6 *
 7 * Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
 8 *
 9 * http://www.gnu.org/licenses/gpl.html
10 *
11 * Unless required by applicable law or agreed to in writing, software distributed under the license is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
12 */
13
14package com.nimbits.client.service.recordedvalues;
15
16import com.google.gwt.user.client.rpc.AsyncCallback;
17import com.nimbits.client.exception.NimbitsException;
18import com.nimbits.client.exceptions.CalculationFailedException;
19import com.nimbits.client.model.point.Point;
20import com.nimbits.client.model.point.PointName;
21import com.nimbits.client.model.timespan.Timespan;
22import com.nimbits.client.model.user.User;
23import com.nimbits.client.model.usercontext.UserContext;
24import com.nimbits.client.model.value.Value;
25
26import java.util.Date;
27import java.util.List;
28
29public interface RecordedValueServiceAsync {
30
31
32    void getDataSeries(final List<Point> arrayList, final Timespan timespan, final AsyncCallback<List<Point>> asyncCallback);
33
34    void getTopDataSeries(final Point point, final int maxValues,
35                          final AsyncCallback<Point> asyncCallback);
36
37    void getCurrentValue(final Point p, final AsyncCallback<Value> asyncCallback) throws NimbitsException;
38
39
40    void solveEquation(final Point point, final AsyncCallback<Double> asyncCallback) throws CalculationFailedException, NimbitsException;
41
42    void getPieceOfDataSegment(final Point point, final Timespan timespan, final int start, final int end, final AsyncCallback<List<Value>> asyncCallback);
43
44    void getCurrentValue(final User u, final Point p, final AsyncCallback<Value> callback) throws NimbitsException;
45
46    void getPrevValue(final User u, final Point p, final Date date, final AsyncCallback<Value> callback);
47
48    // void recordValue(final User u, final Point target, final Value value, final AsyncCallback<Value> callback) throws NimbitsException;
49
50    void recordValue(final User u, final PointName pointName, final Value value, final AsyncCallback<Value> callback) throws NimbitsException;
51
52    void recordValue(final Point point, final Value value, final AsyncCallback<Value> asyncCallback) throws NimbitsException;
53
54    void getLastRecordedDate(final List<Point> points, final AsyncCallback<Date> callback);
55
56    void getTopDataSeries(final Point point, int maxValues, final Date endDate, final AsyncCallback<List<Value>> async);
57
58    void getCurrentValue(long pointOwnerId, final PointName pointName, final AsyncCallback<Value> async) throws NimbitsException;
59
60    void recordValue(final UserContext context, final User u, final Point target, final Value value, AsyncCallback<Value> async);
61}