PageRenderTime 22ms CodeModel.GetById 11ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/v3.2/nimbits-tds/src/com/nimbits/client/service/datapoints/PointService.java

http://nimbits-server.googlecode.com/
Java | 73 lines | 36 code | 23 blank | 14 comment | 0 complexity | 9ab2696918af70209dd0b6b88c00822f 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.datapoints;
15
16
17import com.google.gwt.user.client.rpc.RemoteService;
18import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
19import com.nimbits.client.exception.NimbitsException;
20import com.nimbits.client.exceptions.PointExistsException;
21import com.nimbits.client.model.Const;
22import com.nimbits.client.model.category.Category;
23import com.nimbits.client.model.category.CategoryName;
24import com.nimbits.client.model.point.Point;
25import com.nimbits.client.model.point.PointName;
26import com.nimbits.client.model.user.User;
27import com.nimbits.client.model.value.AlertType;
28import com.nimbits.client.model.value.Value;
29
30import java.util.List;
31import java.util.Map;
32import java.util.Set;
33
34@RemoteServiceRelativePath(Const.PARAM_POINT)
35public interface PointService extends RemoteService {
36
37    boolean checkPointProtection(final User loggedInUser, final User pointOwner, final Point p);
38
39    Point addPoint(final PointName pointName, final Category category) throws NimbitsException, PointExistsException;
40
41    Point getPointByName(final User pointOwner, final PointName name) throws NimbitsException;
42
43    Point getPointByID(final User u, final long id) throws NimbitsException;
44
45    List<Point> getPoints() throws NimbitsException;
46
47    List<Point> getPointsByCategory(final Category category) throws NimbitsException;
48
49    Point updatePoint(final Point point) throws NimbitsException;
50
51    void deletePoint(final Point p) throws NimbitsException;
52
53    Map<PointName, Point> getPointsByName(final long pointOwnerId, final Set<PointName> names) throws NimbitsException;
54    //public int getPointCount() throws NotLoggedInException;
55
56    Point movePoint(final PointName pointName, final CategoryName newCategoryName) throws NimbitsException;
57
58    // Point getPublicPointByUUID(final String uuid);
59
60    List<Point> getPoints(final User u) throws NimbitsException;
61
62    Point getPointByUUID(final String uuid) throws NimbitsException;
63
64    AlertType getPointAlertState(final Point point) throws NimbitsException;
65
66    AlertType getPointAlertState(final Point point, final Value value) throws NimbitsException;
67
68    Point copyPoint(final Point point, final PointName newName) throws NimbitsException, PointExistsException;
69
70    Point addPoint(final PointName pointName) throws NimbitsException, PointExistsException;
71
72    Point getPointByID(final long id) throws NimbitsException;
73}