001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.camel.util; 018 019import java.util.Arrays; 020import java.util.Collections; 021import java.util.LinkedHashSet; 022import java.util.Set; 023 024public class SimpleUtils { 025 026 private static final Set<String> SIMPLE_FUNCTIONS = Collections.unmodifiableSet(new LinkedHashSet<>( 027 Arrays.asList( 028 // Generated by camel build tools - do NOT edit this list! 029 // SIMPLE-FUNCTIONS: START 030 "abs", 031 "assert", 032 "attachment", 033 "attachments", 034 "attachmentscontent", 035 "attachmentscontentas", 036 "attachmentscontentastext", 037 "attachmentsheader", 038 "attachmentsheaderas", 039 "attachmentskeys", 040 "attachmentssize", 041 "average", 042 "base64decode", 043 "base64encode", 044 "bean", 045 "body", 046 "bodyas", 047 "bodyoneline", 048 "bodytype", 049 "camelcontext", 050 "camelid", 051 "capitalize", 052 "ceil", 053 "clearattachments", 054 "collate", 055 "concat", 056 "contains", 057 "convertto", 058 "date", 059 "date-with-timezone", 060 "distinct", 061 "empty", 062 "env", 063 "exception", 064 "exchange", 065 "exchangeid", 066 "exchangeproperty", 067 "filter", 068 "floor", 069 "foreach", 070 "fromrouteid", 071 "function", 072 "hash", 073 "header", 074 "headeras", 075 "headers", 076 "hostname", 077 "id", 078 "iif", 079 "isalpha", 080 "isalphanumeric", 081 "isempty", 082 "isnumeric", 083 "join", 084 "jq", 085 "jsonpath", 086 "kindoftype", 087 "length", 088 "list", 089 "load", 090 "lowercase", 091 "mandatorybodyas", 092 "map", 093 "max", 094 "messageas", 095 "messagehistory", 096 "messagetimestamp", 097 "min", 098 "newempty", 099 "normalizewhitespace", 100 "not", 101 "null", 102 "originalbody", 103 "pad", 104 "pretty", 105 "prettybody", 106 "properties", 107 "propertiesexist", 108 "quote", 109 "random", 110 "range", 111 "ref", 112 "replace", 113 "reverse", 114 "routegroup", 115 "routeid", 116 "safequote", 117 "setheader", 118 "setvariable", 119 "shuffle", 120 "size", 121 "skip", 122 "split", 123 "stepid", 124 "substring", 125 "substringafter", 126 "substringbefore", 127 "substringbetween", 128 "sum", 129 "sys", 130 "threadid", 131 "threadname", 132 "throwexception", 133 "trim", 134 "type", 135 "unquote", 136 "uppercase", 137 "uuid", 138 "val", 139 "variable", 140 "variableas", 141 "variables", 142 "xpath" 143 // SIMPLE-FUNCTIONS: END 144 ))); 145 146 private SimpleUtils() { 147 } 148 149 /** 150 * All the built-in simple language function names (in lower case) 151 */ 152 public static Set<String> getFunctions() { 153 return SIMPLE_FUNCTIONS; 154 } 155 156}