001: package com.sun.xml.ws.resources;
002:
003: import com.sun.xml.ws.util.localization.Localizable;
004: import com.sun.xml.ws.util.localization.LocalizableMessageFactory;
005: import com.sun.xml.ws.util.localization.Localizer;
006:
007: /**
008: * Defines string formatting method for each constant in the resource file
009: *
010: */
011: public final class XmlmessageMessages {
012:
013: private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory(
014: "com.sun.xml.ws.resources.xmlmessage");
015: private final static Localizer localizer = new Localizer();
016:
017: public static Localizable localizableXML_NULL_HEADERS() {
018: return messageFactory.getMessage("xml.null.headers");
019: }
020:
021: /**
022: * Invalid argument. MimeHeaders=null
023: *
024: */
025: public static String XML_NULL_HEADERS() {
026: return localizer.localize(localizableXML_NULL_HEADERS());
027: }
028:
029: public static Localizable localizableXML_SET_PAYLOAD_ERR() {
030: return messageFactory.getMessage("xml.set.payload.err");
031: }
032:
033: /**
034: * Couldn't set Payload in XMLMessage
035: *
036: */
037: public static String XML_SET_PAYLOAD_ERR() {
038: return localizer.localize(localizableXML_SET_PAYLOAD_ERR());
039: }
040:
041: public static Localizable localizableXML_CONTENT_TYPE_MUSTBE_MULTIPART() {
042: return messageFactory
043: .getMessage("xml.content-type.mustbe.multipart");
044: }
045:
046: /**
047: * Content-Type needs to be Multipart/Related and with type=text/xml
048: *
049: */
050: public static String XML_CONTENT_TYPE_MUSTBE_MULTIPART() {
051: return localizer
052: .localize(localizableXML_CONTENT_TYPE_MUSTBE_MULTIPART());
053: }
054:
055: public static Localizable localizableXML_UNKNOWN_CONTENT_TYPE() {
056: return messageFactory.getMessage("xml.unknown.Content-Type");
057: }
058:
059: /**
060: * Unrecognized Content-Type
061: *
062: */
063: public static String XML_UNKNOWN_CONTENT_TYPE() {
064: return localizer
065: .localize(localizableXML_UNKNOWN_CONTENT_TYPE());
066: }
067:
068: public static Localizable localizableXML_GET_DS_ERR() {
069: return messageFactory.getMessage("xml.get.ds.err");
070: }
071:
072: /**
073: * Couldn't get DataSource
074: *
075: */
076: public static String XML_GET_DS_ERR() {
077: return localizer.localize(localizableXML_GET_DS_ERR());
078: }
079:
080: public static Localizable localizableXML_CONTENT_TYPE_PARSE_ERR() {
081: return messageFactory.getMessage("xml.Content-Type.parse.err");
082: }
083:
084: /**
085: * Error while parsing MimeHeaders for Content-Type
086: *
087: */
088: public static String XML_CONTENT_TYPE_PARSE_ERR() {
089: return localizer
090: .localize(localizableXML_CONTENT_TYPE_PARSE_ERR());
091: }
092:
093: public static Localizable localizableXML_GET_SOURCE_ERR() {
094: return messageFactory.getMessage("xml.get.source.err");
095: }
096:
097: /**
098: * Couldn't return Source
099: *
100: */
101: public static String XML_GET_SOURCE_ERR() {
102: return localizer.localize(localizableXML_GET_SOURCE_ERR());
103: }
104:
105: public static Localizable localizableXML_CANNOT_INTERNALIZE_MESSAGE() {
106: return messageFactory
107: .getMessage("xml.cannot.internalize.message");
108: }
109:
110: /**
111: * Cannot create XMLMessage
112: *
113: */
114: public static String XML_CANNOT_INTERNALIZE_MESSAGE() {
115: return localizer
116: .localize(localizableXML_CANNOT_INTERNALIZE_MESSAGE());
117: }
118:
119: public static Localizable localizableXML_NO_CONTENT_TYPE() {
120: return messageFactory.getMessage("xml.no.Content-Type");
121: }
122:
123: /**
124: * MimeHeaders doesn't contain Content-Type header
125: *
126: */
127: public static String XML_NO_CONTENT_TYPE() {
128: return localizer.localize(localizableXML_NO_CONTENT_TYPE());
129: }
130:
131: public static Localizable localizableXML_ROOT_PART_INVALID_CONTENT_TYPE(
132: Object arg0) {
133: return messageFactory.getMessage(
134: "xml.root.part.invalid.Content-Type", arg0);
135: }
136:
137: /**
138: * Bad Content-Type for Root Part : {0}
139: *
140: */
141: public static String XML_ROOT_PART_INVALID_CONTENT_TYPE(Object arg0) {
142: return localizer
143: .localize(localizableXML_ROOT_PART_INVALID_CONTENT_TYPE(arg0));
144: }
145:
146: public static Localizable localizableXML_INVALID_CONTENT_TYPE(
147: Object arg0) {
148: return messageFactory.getMessage("xml.invalid.content-type",
149: arg0);
150: }
151:
152: /**
153: * Invalid Content-Type: {0}
154: *
155: */
156: public static String XML_INVALID_CONTENT_TYPE(Object arg0) {
157: return localizer
158: .localize(localizableXML_INVALID_CONTENT_TYPE(arg0));
159: }
160:
161: }
|