@Override protected String generateMessage(Message message) { return message.getMessage(); }
/** * @param message the exception message * @param cause the exception that triggered this exception */ public MuleRuntimeException(Message message, Throwable cause) { super(message.getMessage(), cause); }
public String toString() { return this.getMessage(); } }
/** * @param message the exception message */ public MuleRuntimeException(Message message) { super(message.getMessage()); }
@Override public DataHandler put(String key, DataHandler value) { throw new UnsupportedOperationException(CoreMessages.inboundMessageAttachmentsImmutable(key) .getMessage()); }
private ExpressionEvaluator getExpressionEvaluator(String evaluator) { ExpressionEvaluator extractor = (ExpressionEvaluator) evaluators.get(evaluator); if (extractor == null) { throw new IllegalArgumentException(CoreMessages.expressionEvaluatorNotRegistered(evaluator) .getMessage()); } return extractor; }
private boolean validateNewWatermarkValue(Object value) { if (value == null) { if (logger.isInfoEnabled()) { logger.info(CoreMessages.nullWatermark().getMessage()); } return false; } return true; }
public void setMuleContext(MuleContext context) { if (context == null) { throw new IllegalArgumentException(CoreMessages.objectIsNull("muleContext").getMessage()); } muleContext = context; }
@Override public void clear() { throw new UnsupportedOperationException(CoreMessages.inboundMessageAttachmentsImmutable() .getMessage()); } }
protected void setMessage(Message message) { initialise(); this.message = message.getMessage(); i18nMessage = message; }
@Override public DataHandler remove(Object key) { throw new UnsupportedOperationException(CoreMessages.inboundMessageAttachmentsImmutable(key) .getMessage()); }
public static String removeExpressionMarker(String expression) { if (expression == null) { throw new IllegalArgumentException(CoreMessages.objectIsNull("expression").getMessage()); } if (expression.startsWith(DEFAULT_EXPRESSION_PREFIX)) { expression = expression.substring(2, expression.length() - 1); } return expression; }
protected KeyStore loadKeyStore() throws GeneralSecurityException, IOException { KeyStore tempKeyStore = KeyStore.getInstance(keystoreType); InputStream is = IOUtils.getResourceAsStream(keyStoreName, getClass()); if (null == is) { throw new FileNotFoundException( cannotLoadFromClasspath("Keystore: " + keyStoreName).getMessage()); } tempKeyStore.load(is, keyStorePassword.toCharArray()); return tempKeyStore; }
protected void doHeader(MuleContext context) { long currentTime = System.currentTimeMillis(); header.add(CoreMessages.shutdownNormally(new Date()).getMessage()); long duration = 10; if (context.getStartDate() > 0) { duration = currentTime - context.getStartDate(); } header.add(CoreMessages.serverWasUpForDuration(duration).getMessage()); } }
protected void doHeader(MuleContext context) { long currentTime = System.currentTimeMillis(); header.add(CoreMessages.applicationShutdownNormally(context.getConfiguration().getId(), new Date()).getMessage()); long duration = 10; if (context.getStartDate() > 0) { duration = currentTime - context.getStartDate(); } header.add(CoreMessages.applicationWasUpForDuration(duration).getMessage()); } }
@Override public void assignValue(String name, T value, T newValue) { throw new ImmutableElementException( CoreMessages.expressionFinalVariableCannotBeAssignedValue(name).getMessage()); } });
@Override public void assignValue(String name, T value, T newValue) { throw new ImmutableElementException( CoreMessages.expressionFinalVariableCannotBeAssignedValue(name).getMessage()); } });
@Override public void clear() { if (PropertyScope.INBOUND.equals(propertyScope)) { throw new UnsupportedOperationException(CoreMessages.inboundMessagePropertiesImmutable() .getMessage()); } message.clearProperties(propertyScope); }
public void setAsText(String text) { Connector connector = muleContext.getRegistry().lookupConnector(text); if (connector == null) { throw new IllegalArgumentException(CoreMessages.objectNotRegistered("Connector", text).getMessage()); } setValue(connector); } }
public static Message version() { String version = StringUtils.defaultString(MuleManifest.getProductVersion(), notSet().getMessage()); return factory.createMessage(BUNDLE_PATH, 6, version); }