01: // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
02: // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
03: // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
04: // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
05: // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
06: // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
07: // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
08: // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
09: // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
10: // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
11: // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
12: // POSSIBILITY OF SUCH DAMAGE.
13: //
14: // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
15: package com.metaboss.enterprise.messages;
16:
17: /** Message Container is an abstraction of the collection of messages. It is used to
18: * carry messages around the enterprise. For example business service operation result structure may carry messages.
19: * By implementing this interface message container offers to the message processing code
20: * opportunity to access messages */
21: public interface MessageContainer {
22: /** Returns true if this container contains one or more messages of any kind */
23: public boolean hasMessages();
24:
25: /** Returns combined array of zero or more contained messages of any kind.
26: * This is the convenience method. It can be used, for example, to just get all messages
27: * irrespective of their type and print them out */
28: public Message[] getMessages();
29:
30: /** Returns true if this container contains one or more failure messages. */
31: public boolean hasFailureMessages();
32:
33: /** Returns array of zero or more contained failure messages. */
34: public Message[] getFailureMessages();
35:
36: /** Returns true if this container contains one or more error messages. */
37: public boolean hasErrorMessages();
38:
39: /** Returns array of zero or more contained error messages. */
40: public Message[] getErrorMessages();
41:
42: /** Returns true if this container contains one or more warning messages. */
43: public boolean hasWarningMessages();
44:
45: /** Returns array of zero or more contained warning messages. */
46: public Message[] getWarningMessages();
47:
48: /** Returns true if this container contains one or more information messages */
49: public boolean hasInformationMessages();
50:
51: /** Returns array of zero or more contained information messages */
52: public Message[] getInformationMessages();
53:
54: /** Returns true if this container contains one or more messages with specified Id */
55: public boolean hasMessagesWithId(String pRequiredMessageId);
56:
57: /** Returns array of zero or more messages with specified Id */
58: public Message[] getMessagesWithId(String pRequiredMessageId);
59: }
|