Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2010 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.osedu.org/licenses/ECL-2.0 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.
 
 
 package org.kuali.student.r2.common.messages.service;
 
 import java.util.List;
 
 
 
 
The Message Service allows for the creation and management of messages.

Version:
2.0
Author:
Sri komandur@uw.edu
 
 
 @WebService(name = "MessageService", targetNamespace = .)
 public interface MessageService {

    
Retrieves the list of locales supported by this service.

Parameters:
contextInfo information containing the principalId and locale information about the caller of service operation
Returns:
a list of locales supported by this service
Throws:
org.kuali.student.r2.common.exceptions.InvalidParameterException contextInfo is not valid
org.kuali.student.r2.common.exceptions.MissingParameterException contextInfo is missing or null
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
org.kuali.student.r2.common.exceptions.PermissionDeniedException an authorization failure occurred
 
Retrieves the list of message group keys known by the service

Parameters:
contextInfo information containing the principalId and locale information about the caller of service operation
Returns:
a list of message group keys
Throws:
org.kuali.student.r2.common.exceptions.InvalidParameterException contextInfo is not valid
org.kuali.student.r2.common.exceptions.MissingParameterException contextInfo is missing or null
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
org.kuali.student.r2.common.exceptions.PermissionDeniedException an authorization failure occurred
 
Retrieves message information.

Parameters:
localeInfo the locale information
messageGroupKey an identifier for the message group to which the message belongs
messageKey the identifier for the requested message
contextInfo information containing the principalId and locale information about the caller of service operation
Returns:
the requested message
Throws:
org.kuali.student.r2.common.exceptions.DoesNotExistException messageGroupKey or messageKey is not found
org.kuali.student.r2.common.exceptions.InvalidParameterException contextInfo is not valid
org.kuali.student.r2.common.exceptions.MissingParameterException localeInfo, messageGroupKey, messageKey, or contextInfo is missing or null
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
org.kuali.student.r2.common.exceptions.PermissionDeniedException an authorization failure occurred
 
     public MessageInfo getMessage(@WebParam(name = "localeInfo"LocaleInfo localeInfo, @WebParam(name = "messageGroupKey"String messageGroupKey, @WebParam(name = "messageKey"String messageKey, @WebParam(name = "contextInfo"ContextInfo contextInfothrows DoesNotExistExceptionInvalidParameterExceptionMissingParameterExceptionOperationFailedExceptionPermissionDeniedException;

    
Retrieve messages associated with a locale and group.

Parameters:
localeInfo the locale information
messageGroupKey an identifier for the message group to which the messages belong
contextInfo information containing the principalId and locale information about the caller of service operation
Returns:
a list of Messages
Throws:
org.kuali.student.r2.common.exceptions.DoesNotExistException messageGroupKey is not found
org.kuali.student.r2.common.exceptions.InvalidParameterException loacleInfo or contextInfo is not valid
org.kuali.student.r2.common.exceptions.MissingParameterException localeInfo, messageGroupKey, or contextInfo is missing or null
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
org.kuali.student.r2.common.exceptions.PermissionDeniedException an authorization failure occurred
    public List<MessageInfogetMessagesByGroup(@WebParam(name = "localeInfo"LocaleInfo localeInfo, @WebParam(name = "messageGroupKey"String messageGroupKey, @WebParam(name = "contextInfo"ContextInfo contextInfothrows DoesNotExistExceptionInvalidParameterExceptionMissingParameterExceptionOperationFailedExceptionPermissionDeniedException;

    
Retrieve messages associated with a locale from a specified list of groups.

Parameters:
localeInfo the locale information
messageGroupKeys a list of identifiers for the message groups
contextInfo information containing the principalId and locale information about the caller of service operation
Returns:
the list of Messages belonging to the list of message groups
Throws:
org.kuali.student.r2.common.exceptions.DoesNotExistException localeInfo or a messageGroupKey in messageGroupKeys is not found
org.kuali.student.r2.common.exceptions.InvalidParameterException localeInfo or contextInfo is not valid
org.kuali.student.r2.common.exceptions.MissingParameterException localeInfo, messageGroupKeys, a messageGroupKey in messagegroupKey, or contextInfo is missing or null
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
org.kuali.student.r2.common.exceptions.PermissionDeniedException an authorization failure occurred
    public List<MessageInfogetMessagesByGroups(@WebParam(name = "localeInfo"LocaleInfo localeInfo, @WebParam(name = "messageGroupKeys"List<StringmessageGroupKeys, @WebParam(name = "contextInfo"ContextInfo contextInfothrows DoesNotExistExceptionInvalidParameterExceptionMissingParameterExceptionOperationFailedExceptionPermissionDeniedException;

    
Update message associated with a locale and group.

Parameters:
localeInfo the locale information
messageGroupKey an identifier for the message group to which the messages belong
messageKey the indentifier for the message
messageInfo the message information to be updated
contextInfo information containing the principalId and locale information about the caller of service operation
Returns:
message information
Throws:
org.kuali.student.r2.common.exceptions.DoesNotExistException messageKey is not found
org.kuali.student.r2.common.exceptions.DataValidationErrorException if invalid data
org.kuali.student.r2.common.exceptions.InvalidParameterException localeInfo, messageInfo, or contextInfo is not valid
org.kuali.student.r2.common.exceptions.MissingParameterException localeInfo, messageKey, messageInfo, or contextInfo is missing or null
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
org.kuali.student.r2.common.exceptions.PermissionDeniedException an authorization failure occurred
org.kuali.student.r2.common.exceptions.ReadOnlyException an attempt at supplying information designated as read only
org.kuali.student.r2.common.exceptions.VersionMismatchException an optimistic locking failure or the action was attempted on an out of date version
    public MessageInfo updateMessage(@WebParam(name = "localeInfo"LocaleInfo localeInfo
            @WebParam(name = "messageGroupKey"String messageGroupKey,
            @WebParam(name = "messageKey"String messageKey
            @WebParam(name = "messageInfo"MessageInfo messageInfo
            @WebParam(name = "contextInfo"ContextInfo contextInfo
            throws DoesNotExistException
            DataValidationErrorException,
            InvalidParameterException
            MissingParameterException
            OperationFailedException
            PermissionDeniedException
            ReadOnlyException
            VersionMismatchException;

    
Deletes the message associated with a locale and group for a message key

Parameters:
localeInfo the locale information
messageGroupKey an identifier for the message group to which the messages belong
messageKey an identifier for the Message to be deleted
contextInfo information containing the principalId and information about the caller of service operation
Returns:
the status of the operation. This must always be true.
Throws:
org.kuali.student.r2.common.exceptions.DoesNotExistException messageKey not found for locale
org.kuali.student.r2.common.exceptions.InvalidParameterException localeInfo or contextInfo is not valid
org.kuali.student.r2.common.exceptions.MissingParameterException localeInfo, messageKey, or contextInfo is missing or null
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
org.kuali.student.r2.common.exceptions.PermissionDeniedException an authorization failure occurred
    public StatusInfo deleteMessage(@WebParam(name = "localeInfo"LocaleInfo localeInfo
            @WebParam(name = "messageGroupKey"String messageGroupKey,
            @WebParam(name = "messageKey"String messageKey
            @WebParam(name = "contextInfo"ContextInfo contextInfo
            throws DoesNotExistException
            InvalidParameterException
            MissingParameterException
            OperationFailedException
            PermissionDeniedException;

    
Create a new message for a locale and group.

Parameters:
localeInfo the locale information
messageGroupKey an identifier for the message group
messageKey an identifier for the message within the group
messageInfo the message information to be added
contextInfo information containing the principalId and locale information about the caller of service operation
Returns:
the status of the operation. This must always be true.
Throws:
org.kuali.student.r2.common.exceptions.DataValidationErrorException One or more values invalid for this operation
org.kuali.student.r2.common.exceptions.DoesNotExistException messageGroupKey is not found
org.kuali.student.r2.common.exceptions.InvalidParameterException localeInfo or contetInfo is not valid
org.kuali.student.r2.common.exceptions.MissingParameterException localeInfo, messageGroupKey, or contextInfo is missing or null
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
org.kuali.student.r2.common.exceptions.PermissionDeniedException an authorization failure occurred
    public StatusInfo createMessage(@WebParam(name = "localeInfo"LocaleInfo localeInfo,             
            @WebParam(name = "messageGroupKey"String messageGroupKey,             
            @WebParam(name = "messageKey"String messageKey
            @WebParam(name = "messageInfo"MessageInfo messageInfo
            @WebParam(name = "contextInfo"ContextInfo contextInfo
            throws DoesNotExistException
            InvalidParameterException
            MissingParameterException
            OperationFailedException
            DataValidationErrorException,
            PermissionDeniedException;
    
    
    
Validates a message. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained subobjects or expanded to perform all tests related to this object. If an identifier is present for the message and a record is found for that identifier, the validation checks if the message can be shifted to the new values. If a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object. This is a slightly different pattern from the standard validation as the caller provides the identifier in the create statement instead of the server assigning an identifier.

Parameters:
validationTypeKey Identifier of the extent of validation
messageInfo The message information to be tested.
Returns:
Results from performing the validation
Throws:
org.kuali.student.r2.common.exceptions.DoesNotExistException validationTypeKey not found
org.kuali.student.r2.common.exceptions.InvalidParameterException invalid validationTypeKey, messageInfo
org.kuali.student.r2.common.exceptions.MissingParameterException missing validationTypeKey, messageInfo
org.kuali.student.r2.common.exceptions.OperationFailedException unable to complete request
    public List<ValidationResultInfovalidateProposal(@WebParam(name = "validationTypeKey"String validationTypeKey,
            @WebParam(name = "messageInfo"MessageInfo messageInfo,
            @WebParam(name = "contextInfo"ContextInfo contextInfo
            throws DoesNotExistException
            InvalidParameterException
            MissingParameterException
            OperationFailedException;
New to GrepCode? Check out our FAQ X