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 HandlerMessages {
012:
013: private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory(
014: "com.sun.xml.ws.resources.handler");
015: private final static Localizer localizer = new Localizer();
016:
017: public static Localizable localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(
018: Object arg0, Object arg1) {
019: return messageFactory.getMessage(
020: "handler.messageContext.invalid.class", arg0, arg1);
021: }
022:
023: /**
024: * "{0}" is not an allowed value for the property "{1}"
025: *
026: */
027: public static String HANDLER_MESSAGE_CONTEXT_INVALID_CLASS(
028: Object arg0, Object arg1) {
029: return localizer
030: .localize(localizableHANDLER_MESSAGE_CONTEXT_INVALID_CLASS(
031: arg0, arg1));
032: }
033:
034: public static Localizable localizableCANNOT_EXTEND_HANDLER_DIRECTLY(
035: Object arg0) {
036: return messageFactory.getMessage(
037: "cannot.extend.handler.directly", arg0);
038: }
039:
040: /**
041: * Handler {0} must implement LogicalHandler or SOAPHandler.
042: *
043: */
044: public static String CANNOT_EXTEND_HANDLER_DIRECTLY(Object arg0) {
045: return localizer
046: .localize(localizableCANNOT_EXTEND_HANDLER_DIRECTLY(arg0));
047: }
048:
049: public static Localizable localizableHANDLER_NOT_VALID_TYPE(
050: Object arg0) {
051: return messageFactory
052: .getMessage("handler.not.valid.type", arg0);
053: }
054:
055: /**
056: * {0} does not implement one of the handler interfaces.
057: *
058: */
059: public static String HANDLER_NOT_VALID_TYPE(Object arg0) {
060: return localizer
061: .localize(localizableHANDLER_NOT_VALID_TYPE(arg0));
062: }
063:
064: public static Localizable localizableCANNOT_INSTANTIATE_HANDLER(
065: Object arg0, Object arg1) {
066: return messageFactory.getMessage("cannot.instantiate.handler",
067: arg0, arg1);
068: }
069:
070: /**
071: * Unable to instantiate handler: {0} because: {1}
072: *
073: */
074: public static String CANNOT_INSTANTIATE_HANDLER(Object arg0,
075: Object arg1) {
076: return localizer
077: .localize(localizableCANNOT_INSTANTIATE_HANDLER(arg0,
078: arg1));
079: }
080:
081: public static Localizable localizableHANDLER_CHAIN_CONTAINS_HANDLER_ONLY(
082: Object arg0) {
083: return messageFactory.getMessage(
084: "handler.chain.contains.handler.only", arg0);
085: }
086:
087: /**
088: * A HandlerChain can only contain Handler instances: {0}
089: *
090: */
091: public static String HANDLER_CHAIN_CONTAINS_HANDLER_ONLY(Object arg0) {
092: return localizer
093: .localize(localizableHANDLER_CHAIN_CONTAINS_HANDLER_ONLY(arg0));
094: }
095:
096: public static Localizable localizableHANDLER_NESTED_ERROR(
097: Object arg0) {
098: return messageFactory.getMessage("handler.nestedError", arg0);
099: }
100:
101: /**
102: * handler error: {0}
103: *
104: */
105: public static String HANDLER_NESTED_ERROR(Object arg0) {
106: return localizer
107: .localize(localizableHANDLER_NESTED_ERROR(arg0));
108: }
109:
110: public static Localizable localizableHANDLER_PREDESTROY_IGNORE(
111: Object arg0) {
112: return messageFactory.getMessage("handler.predestroy.ignore",
113: arg0);
114: }
115:
116: /**
117: * Exception ignored from invoking handler @PreDestroy method: {0}
118: *
119: */
120: public static String HANDLER_PREDESTROY_IGNORE(Object arg0) {
121: return localizer
122: .localize(localizableHANDLER_PREDESTROY_IGNORE(arg0));
123: }
124:
125: }
|