Class CSimpleHelper


  • public final class CSimpleHelper
    extends Object
    A set of helper as static imports for the Camel compiled simple language.
    • Method Detail

      • bodyAs

        public static <T> T bodyAs​(org.apache.camel.Message message,
                                   Class<T> type)
      • mandatoryBodyAs

        public static <T> T mandatoryBodyAs​(org.apache.camel.Message message,
                                            Class<T> type)
                                     throws org.apache.camel.InvalidPayloadException
        Throws:
        org.apache.camel.InvalidPayloadException
      • bodyAsIndex

        public static <T> T bodyAsIndex​(org.apache.camel.Message message,
                                        Class<T> type,
                                        int key)
      • bodyAsIndex

        public static <T> T bodyAsIndex​(org.apache.camel.Message message,
                                        Class<T> type,
                                        String key)
      • mandatoryBodyAsIndex

        public static <T> T mandatoryBodyAsIndex​(org.apache.camel.Message message,
                                                 Class<T> type,
                                                 int key)
                                          throws org.apache.camel.InvalidPayloadException
        Throws:
        org.apache.camel.InvalidPayloadException
      • mandatoryBodyAsIndex

        public static <T> T mandatoryBodyAsIndex​(org.apache.camel.Message message,
                                                 Class<T> type,
                                                 String key)
                                          throws org.apache.camel.InvalidPayloadException
        Throws:
        org.apache.camel.InvalidPayloadException
      • header

        public static Object header​(org.apache.camel.Message message,
                                    String name)
      • headerAs

        public static <T> T headerAs​(org.apache.camel.Message message,
                                     String name,
                                     Class<T> type)
      • headerAsIndex

        public static <T> T headerAsIndex​(org.apache.camel.Message message,
                                          Class<T> type,
                                          String name,
                                          String key)
      • exchangeProperty

        public static Object exchangeProperty​(org.apache.camel.Exchange exchange,
                                              String name)
      • exchangePropertyAs

        public static <T> T exchangePropertyAs​(org.apache.camel.Exchange exchange,
                                               String name,
                                               Class<T> type)
      • exchangePropertyAsIndex

        public static <T> T exchangePropertyAsIndex​(org.apache.camel.Exchange exchange,
                                                    Class<T> type,
                                                    String name,
                                                    String key)
      • bodyOneLine

        public static String bodyOneLine​(org.apache.camel.Exchange exchange)
      • exception

        public static Exception exception​(org.apache.camel.Exchange exchange)
      • exceptionAs

        public static <T> T exceptionAs​(org.apache.camel.Exchange exchange,
                                        Class<T> type)
      • exceptionMessage

        public static String exceptionMessage​(org.apache.camel.Exchange exchange)
      • exceptionStacktrace

        public static String exceptionStacktrace​(org.apache.camel.Exchange exchange)
      • threadName

        public static String threadName()
      • hostName

        public static String hostName()
      • routeId

        public static String routeId​(org.apache.camel.Exchange exchange)
      • stepId

        public static String stepId​(org.apache.camel.Exchange exchange)
      • fileName

        public static String fileName​(org.apache.camel.Message message)
      • fileNameNoExt

        public static String fileNameNoExt​(org.apache.camel.Message message)
      • fileNameNoExtSingle

        public static String fileNameNoExtSingle​(org.apache.camel.Message message)
      • fileNameExt

        public static String fileNameExt​(org.apache.camel.Message message)
      • fileNameExtSingle

        public static String fileNameExtSingle​(org.apache.camel.Message message)
      • fileOnlyName

        public static String fileOnlyName​(org.apache.camel.Message message)
      • fileOnlyNameNoExt

        public static String fileOnlyNameNoExt​(org.apache.camel.Message message)
      • fileOnlyNameNoExtSingle

        public static String fileOnlyNameNoExtSingle​(org.apache.camel.Message message)
      • fileParent

        public static String fileParent​(org.apache.camel.Message message)
      • filePath

        public static String filePath​(org.apache.camel.Message message)
      • fileAbsolute

        public static Boolean fileAbsolute​(org.apache.camel.Message message)
      • fileAbsolutePath

        public static String fileAbsolutePath​(org.apache.camel.Message message)
      • fileSize

        public static Long fileSize​(org.apache.camel.Message message)
      • fileModified

        public static Long fileModified​(org.apache.camel.Message message)
      • date

        public static Date date​(org.apache.camel.Exchange exchange,
                                String commandWithOffsets)
      • date

        public static String date​(org.apache.camel.Exchange exchange,
                                  String commandWithOffsets,
                                  String timezone,
                                  String pattern)
      • property

        public static String property​(org.apache.camel.Exchange exchange,
                                      String key,
                                      String defaultValue)
      • ref

        public static Object ref​(org.apache.camel.Exchange exchange,
                                 String key)
      • type

        public static Class<?> type​(org.apache.camel.Exchange exchange,
                                    Class<?> type)
      • type

        public static Object type​(org.apache.camel.Exchange exchange,
                                  Class<?> type,
                                  String field)
      • bean

        public static Object bean​(org.apache.camel.Exchange exchange,
                                  org.apache.camel.spi.Language bean,
                                  String ref,
                                  String method,
                                  Object scope)
      • increment

        public static Object increment​(org.apache.camel.Exchange exchange,
                                       Object number)
      • decrement

        public static Object decrement​(org.apache.camel.Exchange exchange,
                                       Object number)
      • random

        public static int random​(org.apache.camel.Exchange exchange,
                                 Object min,
                                 Object max)
      • skip

        public static org.apache.camel.util.SkipIterator skip​(org.apache.camel.Exchange exchange,
                                                              Object skip)
      • collate

        public static org.apache.camel.support.GroupIterator collate​(org.apache.camel.Exchange exchange,
                                                                     Object group)
      • messageHistory

        public static String messageHistory​(org.apache.camel.Exchange exchange,
                                            boolean detailed)
      • isEqualTo

        public static boolean isEqualTo​(org.apache.camel.Exchange exchange,
                                        Object leftValue,
                                        Object rightValue)
      • isEqualToIgnoreCase

        public static boolean isEqualToIgnoreCase​(org.apache.camel.Exchange exchange,
                                                  Object leftValue,
                                                  Object rightValue)
      • isNotEqualTo

        public static boolean isNotEqualTo​(org.apache.camel.Exchange exchange,
                                           Object leftValue,
                                           Object rightValue)
      • isGreaterThan

        public static boolean isGreaterThan​(org.apache.camel.Exchange exchange,
                                            Object leftValue,
                                            Object rightValue)
      • isGreaterThanOrEqualTo

        public static boolean isGreaterThanOrEqualTo​(org.apache.camel.Exchange exchange,
                                                     Object leftValue,
                                                     Object rightValue)
      • isLessThan

        public static boolean isLessThan​(org.apache.camel.Exchange exchange,
                                         Object leftValue,
                                         Object rightValue)
      • isLessThanOrEqualTo

        public static boolean isLessThanOrEqualTo​(org.apache.camel.Exchange exchange,
                                                  Object leftValue,
                                                  Object rightValue)
      • contains

        public static boolean contains​(org.apache.camel.Exchange exchange,
                                       Object leftValue,
                                       Object rightValue)
      • containsIgnoreCase

        public static boolean containsIgnoreCase​(org.apache.camel.Exchange exchange,
                                                 Object leftValue,
                                                 Object rightValue)
      • regexp

        public static boolean regexp​(org.apache.camel.Exchange exchange,
                                     Object leftValue,
                                     Object rightValue)
      • in

        public static boolean in​(org.apache.camel.Exchange exchange,
                                 Object leftValue,
                                 Object rightValue)
      • range

        public static boolean range​(org.apache.camel.Exchange exchange,
                                    Object leftValue,
                                    Object rightValue)
      • startsWith

        public static boolean startsWith​(org.apache.camel.Exchange exchange,
                                         Object leftValue,
                                         Object rightValue)
      • endsWith

        public static boolean endsWith​(org.apache.camel.Exchange exchange,
                                       Object leftValue,
                                       Object rightValue)
      • is

        public static boolean is​(org.apache.camel.Exchange exchange,
                                 Object leftValue,
                                 Class<?> type)