001 /**
002 * Copyright 2010 The Kuali Foundation Licensed under the
003 * Educational Community License, Version 2.0 (the "License"); you may
004 * not use this file except in compliance with the License. You may
005 * obtain a copy of the License at
006 *
007 * http://www.osedu.org/licenses/ECL-2.0
008 *
009 * Unless required by applicable law or agreed to in writing,
010 * software distributed under the License is distributed on an "AS IS"
011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012 * or implied. See the License for the specific language governing
013 * permissions and limitations under the License.
014 */
015
016 package org.kuali.student.common.ui.client.service;
017
018
019 import org.kuali.student.common.messages.dto.LocaleKeyList;
020 import org.kuali.student.common.messages.dto.Message;
021 import org.kuali.student.common.messages.dto.MessageGroupKeyList;
022 import org.kuali.student.common.messages.dto.MessageList;
023
024 import com.google.gwt.core.client.GWT;
025 import com.google.gwt.user.client.rpc.RemoteService;
026 import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
027 import com.google.gwt.user.client.rpc.ServiceDefTarget;
028
029
030 @RemoteServiceRelativePath("rpcservices/MessagesRpcService")
031 public interface MessagesRpcService extends RemoteService {
032 public static class Util {
033
034 public static MessagesRpcServiceAsync getInstance(String uri) {
035 MessagesRpcServiceAsync result = GWT.create(MessagesRpcService.class);
036 ((ServiceDefTarget)result).setServiceEntryPoint(GWT.getModuleBaseURL() + uri);
037 return result;
038 }
039 }
040
041 public LocaleKeyList getLocales();
042
043 public MessageGroupKeyList getMessageGroups();
044
045 public Message getMessage(
046 String localeKey,
047 String messageGroupKey,
048 String messageKey);
049
050 public MessageList getMessages(
051 String localeKey,
052 String messageGroupKey);
053
054 public MessageList getMessagesByGroups(
055 String localeKey,
056 MessageGroupKeyList messageGroupKeyList);
057
058 public Message updateMessage(
059 String localeKey,
060 String messageGroupKey,
061 String messageKey,
062 Message messageInfo);
063
064 public Message addMessage(Message messageInfo);
065
066 }