public Object removeHeader(String name) { return message.removeProperty(name, PropertyScope.OUTBOUND); }
public Object remove(Object key) { return message.removeProperty(key.toString(), PropertyScope.OUTBOUND); }
@Override public void processMatch(String matchedValue) { message.removeProperty(matchedValue,getScope()); if (logger.isDebugEnabled()) { logger.debug(String.format("Removing property: '%s' from scope: '%s'", matchedValue, getScope().getScopeName())); } } });
protected void propagateRootMessageIdProperty(MuleMessage message) { String rootId = message.getInboundProperty(MuleProperties.MULE_ROOT_MESSAGE_ID_PROPERTY); if (rootId != null) { message.setMessageRootId(rootId); message.removeProperty(MuleProperties.MULE_ROOT_MESSAGE_ID_PROPERTY, PropertyScope.INBOUND); } }
protected void propagateRootMessageIdProperty(MuleMessage message) { String rootId = message.getInboundProperty(MuleProperties.MULE_ROOT_MESSAGE_ID_PROPERTY); if (rootId != null) { message.setMessageRootId(rootId); message.removeProperty(MuleProperties.MULE_ROOT_MESSAGE_ID_PROPERTY, PropertyScope.INBOUND); } }
protected void warnIfMuleClientSendUsed(MuleMessage message) { final Object remoteSyncProperty = message.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, PropertyScope.INBOUND); if (ObjectUtils.getBoolean(remoteSyncProperty, false) && !endpoint.getExchangePattern().hasResponse()) { logger.warn("MuleClient.send() was used but inbound endpoint " + endpoint.getEndpointURI().getUri().toString() + " is not 'request-response'. No response will be returned."); } message.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, PropertyScope.INBOUND); }
@Override protected MuleEvent processRequest(MuleEvent event) throws MuleException { propertyValue = event.getMessage().removeProperty(propertyName, PropertyScope.INVOCATION); return super.processRequest(event); }
@Override protected List<Object> getRecipients(MuleEvent event) { Object msgRecipients = event.getMessage().removeProperty(RECIPIENTS_PROPERTY); if (msgRecipients == null) { return recipients; } else if (msgRecipients instanceof String) { Object[] split = StringUtils.splitAndTrim(msgRecipients.toString(), getListDelimiter()); return Arrays.<Object>asList(split); } else if (msgRecipients instanceof List) { return new ArrayList<Object>((List<?>) msgRecipients); } else { logger.warn("Recipients on message are neither String nor List but: " + msgRecipients.getClass()); return Collections.emptyList(); } }
protected void deleteProperties(MuleMessage message) { final Set<String> propertyNames = new HashSet<String>(message.getPropertyNames(scope)); for (String expression : deleteProperties) { for (String key : propertyNames) { if (key.matches(expression)) { if (logger.isDebugEnabled()) { logger.debug(String.format("Removing property: '%s' from scope: '%s'", key, scope.getScopeName())); } message.removeProperty(key, scope); } else { // fallback to the plain wildcard for simplicity WildcardFilter filter = new WildcardFilter(expression); if (filter.accept(key)) { message.removeProperty(key, scope); } } } } }
@Override public Object remove(Object key) { if (!(key instanceof String)) { return null; } if (PropertyScope.INBOUND.equals(propertyScope)) { throw new UnsupportedOperationException(CoreMessages.inboundMessagePropertiesImmutable(key) .getMessage()); } else { return message.removeProperty((String) key, propertyScope); } }
protected void warnIfMuleClientSendUsed(MuleMessage message) { final Object remoteSyncProperty = message.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, PropertyScope.INBOUND); if (ObjectUtils.getBoolean(remoteSyncProperty, false) && !messageReceiver.getEndpoint().getExchangePattern().hasResponse()) { logger.warn("MuleClient.send() was used but inbound endpoint " + messageReceiver.getEndpoint().getEndpointURI().getUri().toString() + " is not 'request-response'. No response will be returned."); } message.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY, PropertyScope.INBOUND); }
@Override protected MuleEvent processRequest(MuleEvent event) throws MuleException { // Remove outbound properties that are mapped to SOAP headers, so that the // underlying transport does not include them as headers. List<String> outboundProperties = new ArrayList<>(event.getMessage().getOutboundPropertyNames()); for (String outboundProperty : outboundProperties) { if (outboundProperty.startsWith(SOAP_HEADERS_PROPERTY_PREFIX)) { event.getMessage().removeProperty(outboundProperty, PropertyScope.OUTBOUND); } } return super.processRequest(event); }
protected void renameInScope(String oldKey, String newKey, PropertyScope propertyScope, MuleMessage message) { Object propValue = message.getProperty(oldKey, propertyScope); DataType<?> propertyDataType = message.getPropertyDataType(oldKey, propertyScope); message.removeProperty(oldKey, propertyScope); message.setProperty(newKey, propValue, propertyScope, propertyDataType); }
if (keyValue != null) message.removeProperty(keyValue.toString(), getScope());
methodName = (String)event.getMessage().removeProperty(MuleProperties.MULE_METHOD_PROPERTY, PropertyScope.INVOCATION);
returnMessage.removeProperty(MuleProperties.MULE_REPLY_TO_PROPERTY); returnMessage.removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY);
if (typedValue.getValue() == null || typedValue.getValue() instanceof NullPayload) message.removeProperty(key, getScope());
event.getMessage().removeProperty(MuleProperties.MULE_REMOTE_SYNC_PROPERTY);
Object methodProp = context.getMessage().removeProperty(getMethodProperty(), PropertyScope.INVOCATION); if (methodProp == null)
message.removeProperty(OAuthProperties.HTTP_STATUS, PropertyScope.OUTBOUND); message.removeProperty(OAuthProperties.CALLBACK_LOCATION, PropertyScope.OUTBOUND);