1/*2 * Copyright 2001-2008 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 *16 */1718package org.apache.juddi.v3.error;
1920import org.apache.juddi.config.ResourceConfig;
2122/**23 * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>24 */25publicclassErrorMessage {
26private String message;
27private String value;
2829publicErrorMessage(String messageCode) {
30this(messageCode, null);
31 }
3233publicErrorMessage(String messageCode, String value) {
34this.message = ResourceConfig.getGlobalMessage(messageCode);
35this.value = value;
36 }
3738public String getMessage() {
39return message;
40 }
4142publicvoid setMessage(String message) {
43this.message = message;
44 }
4546public String getValue() {
47return value;
48 }
4950publicvoid setValue(String value) {
51this.value = value;
52 }
5354public String toString() {
55if (value == null || value.length() == 0)
56return message;
57else58return message + ": " + value;
5960 }
61 }