01: /*
02: * Copyright 2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.module.gl.util;
17:
18: import java.util.List;
19:
20: /**
21: * This class serves as a wrapper containing references to the feeder status and error messages list. This works around java's
22: * inability to return a value and throw an exception at the same time. Exceptions in KFS are generally needed to force the
23: * framework to rollback a transaction.
24: */
25: public class EnterpriseFeederStatusAndErrorMessagesWrapper {
26: private List<Message> errorMessages;
27: private EnterpriseFeederStatus status;
28:
29: /**
30: * Constructs a EnterpriseFeederStatusAndErrorMessagesWrapper, initializing values to null
31: */
32: public EnterpriseFeederStatusAndErrorMessagesWrapper() {
33: errorMessages = null;
34: status = null;
35: }
36:
37: /**
38: * Gets the errorMessages attribute.
39: *
40: * @return Returns the errorMessages.
41: */
42: public List<Message> getErrorMessages() {
43: return errorMessages;
44: }
45:
46: /**
47: * Sets the errorMessages attribute value.
48: *
49: * @param errorMessages The errorMessages to set.
50: */
51: public void setErrorMessages(List<Message> errorMessages) {
52: this .errorMessages = errorMessages;
53: }
54:
55: /**
56: * Gets the status attribute.
57: *
58: * @return Returns the status.
59: */
60: public EnterpriseFeederStatus getStatus() {
61: return status;
62: }
63:
64: /**
65: * Sets the status attribute value.
66: *
67: * @param status The status to set.
68: */
69: public void setStatus(EnterpriseFeederStatus status) {
70: this.status = status;
71: }
72:
73: }
|