PageRenderTime 24ms CodeModel.GetById 2ms app.highlight 16ms RepoModel.GetById 2ms app.codeStats 0ms

/v3.2/nimbits-sdk/src/com/nimbits/client/NimbitsClient.java

http://nimbits-server.googlecode.com/
Java | 79 lines | 42 code | 31 blank | 6 comment | 0 complexity | a9dc7d98aabfff8472d2ed813ea57a3d MD5 | raw file
 1package com.nimbits.client;
 2
 3
 4import com.nimbits.client.model.category.Category;
 5import com.nimbits.client.model.category.CategoryName;
 6import com.nimbits.client.model.point.Point;
 7import com.nimbits.client.model.point.PointName;
 8import com.nimbits.client.model.user.User;
 9import com.nimbits.client.model.value.Value;
10import org.apache.http.cookie.Cookie;
11
12import java.io.IOException;
13import java.io.UnsupportedEncodingException;
14import java.util.Date;
15import java.util.List;
16
17/**
18 * Created by IntelliJ IDEA.
19 * User: benjamin
20 * Date: 3/13/11
21 * Time: 12:38 PM
22 */
23public interface NimbitsClient {
24
25    List<User> getUsers();
26
27    Cookie getAuthCookie();
28
29    boolean isLoggedIn();
30
31    String getChart(final String points, final int count);
32
33    String getChartURL(final String points, final int count, final String additionalParams);
34
35    Value recordValue(final PointName pointName, final double value, final Date timestamp) throws IOException;
36
37    Value recordValueWithGet(final PointName pointName, final double value, final Date timestamp) throws IOException;
38
39
40    String recordBatch(final String params);
41
42    Value recordValue(final PointName pointName, final Value v) throws IOException;
43
44    Category addCategory(final CategoryName categoryName) throws UnsupportedEncodingException;
45
46    String deleteCategory(final CategoryName categoryName);
47
48    Point addPoint(final CategoryName categoryName, final PointName pointName);
49
50    Point getPoint(final PointName pointName);
51
52    Point updatePoint(final Point p);
53
54    void deletePoint(final PointName pointName);
55
56    Point addPoint(final Point p, final CategoryName categoryName);
57
58    @SuppressWarnings({"SameParameterValue", "SameParameterValue"})
59    List<Category> getCategories(final boolean includePoints, final boolean includeDiagrams);
60
61    @SuppressWarnings({"SameParameterValue"})
62    Category getCategory(final CategoryName categoryName, final boolean includePoints, final boolean includeDiagrams);
63
64    String currentValue(final PointName pointName) throws IOException;
65
66    Value getCurrentRecordedValue(final PointName pointName);
67
68    List<Value> getSeries(final PointName pointName, final int count);
69
70    List<Value> getSeries(final PointName pointName, final Date startDate, final Date endDate);
71
72    void downloadSeries(final PointName pointName, final Date startDate, final Date endDate, final String filename) throws IOException;
73
74    List<Value> loadSeriesFile(final String fileName) throws IOException;
75
76    byte[] getBinaryFile(final String postUrl, final String params) throws Exception;
77
78    public Object getCurrentDataObject(final PointName pointName, Class<?> cls);
79}