All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mule.api.annotations.expression.Groovy Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 * The software in this package is published under the terms of the CPAL v1.0
 * license, a copy of which has been included with this distribution in the
 * LICENSE.txt file.
 */
package org.mule.api.annotations.expression;

import org.mule.api.annotations.meta.Evaluator;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This allows Groovy codes to be executed on the current message.
 *
 * Mule will bind a number of objects to the groovy context:
 *
 * 
    *
  • muleContext - A reference to the MuleContext object.
  • *
  • eventContext - A reference to the event context. This allows you to dispatch events progammatically from your script.
  • *
  • message - The current message.
  • *
  • payload - The payload of the current message. This is just a shortcut to $message.payload.
  • *
  • service - A reference to the current service object.
  • *
  • id - The current event ID. This is a UUID created for events in Mule.
  • *
  • log - A logger that can be used to write to Mule's log file.
  • *
*/ @Target(ElementType.PARAMETER) @Retention(RetentionPolicy.RUNTIME) @Documented @Evaluator("groovy") public @interface Groovy { String value(); boolean optional() default false; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy