View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the Educational Community
3    * License, Version 2.0 (the "License"); you may not use this file except in
4    * compliance with the License. You may obtain a copy of the License at
5    *
6    * http://www.osedu.org/licenses/ECL-2.0
7    *
8    * Unless required by applicable law or agreed to in writing, software
9    * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11   * License for the specific language governing permissions and limitations under
12   * the License.
13   */
14  package org.kuali.student.common.ui.client.service;
15  
16  import com.google.gwt.core.client.GWT;
17  import com.google.gwt.user.client.rpc.RemoteService;
18  import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
19  import com.google.gwt.user.client.rpc.ServiceDefTarget;
20  import java.util.ArrayList;
21  import org.kuali.student.r2.common.dto.LocaleInfo;
22  import org.kuali.student.r2.common.dto.StatusInfo;
23  import org.kuali.student.r2.common.exceptions.DoesNotExistException;
24  import org.kuali.student.r2.common.exceptions.InvalidParameterException;
25  import org.kuali.student.r2.common.exceptions.MissingParameterException;
26  import org.kuali.student.r2.common.exceptions.OperationFailedException;
27  import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
28  import org.kuali.student.r2.common.exceptions.ReadOnlyException;
29  import org.kuali.student.r2.common.exceptions.VersionMismatchException;
30  import org.kuali.student.r2.common.messages.dto.MessageInfo;
31  
32  @RemoteServiceRelativePath("rpcservices/MessagesRpcService")
33  public interface MessagesRpcService extends RemoteService {
34  
35      public static class Util {
36  
37          public static MessagesRpcServiceAsync getInstance(String uri) {
38              MessagesRpcServiceAsync result = GWT.create(MessagesRpcService.class);
39              ((ServiceDefTarget) result).setServiceEntryPoint(GWT.getModuleBaseURL() + uri);
40              return result;
41          }
42      }
43  
44      public ArrayList<LocaleInfo> getLocales()
45              throws InvalidParameterException,
46              MissingParameterException,
47              OperationFailedException,
48              PermissionDeniedException;
49  
50      public ArrayList<String> getMessageGroups()
51              throws InvalidParameterException,
52              MissingParameterException,
53              OperationFailedException,
54              PermissionDeniedException;
55  
56      public MessageInfo getMessage(String localeKey,
57              String messageGroupKey,
58              String messageKey)
59              throws DoesNotExistException,
60              InvalidParameterException,
61              MissingParameterException,
62              OperationFailedException,
63              PermissionDeniedException;
64  
65      public ArrayList<MessageInfo> getMessagesByGroup(String localeKey,
66              String messageGroupKey)
67              throws DoesNotExistException,
68              InvalidParameterException,
69              MissingParameterException,
70              OperationFailedException,
71              PermissionDeniedException;
72  
73      public ArrayList<MessageInfo> getMessagesByGroups(String localeKey,
74              ArrayList<String> messageGroupKeys)
75              throws DoesNotExistException,
76              InvalidParameterException,
77              MissingParameterException,
78              OperationFailedException,
79              PermissionDeniedException;
80  
81      public MessageInfo updateMessage(String localeKey,
82              String messageGroupKey,
83              String messageKey,
84              MessageInfo messageInfo)
85              throws DoesNotExistException,
86              InvalidParameterException,
87              MissingParameterException,
88              OperationFailedException,
89              PermissionDeniedException,
90              ReadOnlyException,
91              VersionMismatchException;
92  
93      public StatusInfo createMessage(MessageInfo messageInfo)
94              throws DoesNotExistException,
95              InvalidParameterException,
96              MissingParameterException,
97              OperationFailedException,
98              PermissionDeniedException;
99  }