java.lang.Object
com.evolveum.midpoint.model.common.expression.script.mel.CelTypeMapper
All Implemented Interfaces:
dev.cel.common.types.CelTypeProvider

public class CelTypeMapper extends Object implements dev.cel.common.types.CelTypeProvider
Maintains mapping of XSD types (qnames) and Java types to CEL types
Author:
Radovan Semancik
  • Field Details

    • PROTECTED_STRING_CEL_TYPE

      public static final dev.cel.common.types.CelType PROTECTED_STRING_CEL_TYPE
  • Constructor Details

    • CelTypeMapper

      public CelTypeMapper(PrismContext prismContext)
  • Method Details

    • types

      public com.google.common.collect.ImmutableCollection<dev.cel.common.types.CelType> types()
      Specified by:
      types in interface dev.cel.common.types.CelTypeProvider
    • findType

      public Optional<dev.cel.common.types.CelType> findType(String typeName)
      Specified by:
      findType in interface dev.cel.common.types.CelTypeProvider
    • toXsdType

      @NotNull public static @NotNull QName toXsdType(dev.cel.common.types.CelType celType)
    • getCelToXsdMapping

      public static QName getCelToXsdMapping(dev.cel.common.types.CelType celType)
    • getXsdToCelMapping

      public static dev.cel.common.types.CelType getXsdToCelMapping(QName xsdType)
    • toCelType

      @NotNull public static @NotNull dev.cel.common.types.CelType toCelType(@NotNull @NotNull QName xsdType)
    • toCelType

      public static dev.cel.common.types.CelType toCelType(@NotNull @NotNull Class<?> javaType)
    • toCelType

      @NotNull public static @NotNull dev.cel.common.types.CelType toCelType(@NotNull @NotNull ItemDefinition<?> def)
    • toCelType

      @NotNull public static @NotNull dev.cel.common.types.CelType toCelType(@NotNull @NotNull TypedValue<?> typedValue)
    • toCelNullableType

      @NotNull public static @NotNull dev.cel.common.types.CelType toCelNullableType(@NotNull @NotNull TypedValue<?> typedValue)
    • getCelType

      @Nullable public static @Nullable dev.cel.common.types.CelType getCelType(@NotNull @NotNull QName xsdType)
    • getCelType

      @Nullable public static @Nullable dev.cel.common.types.CelType getCelType(@NotNull @NotNull Class<?> javaType)
    • toJavaType

      @NotNull public static @NotNull Class<?> toJavaType(dev.cel.common.types.CelType celType)
    • toJavaValues

      public static Object[] toJavaValues(Object[] args)
    • toJavaValues

      public static List<?> toJavaValues(Collection<?> args)
    • toJavaValueMap

      public static <K> Map<K,Object> toJavaValueMap(Map<K,Object> celArgs)
    • toJavaValue

      @Nullable public static @Nullable Object toJavaValue(@Nullable @Nullable Object celValue)
    • toJavaValue

      @Nullable public static @Nullable Object toJavaValue(@Nullable @Nullable dev.cel.common.values.CelValue celValue)
    • toCelValue

      public static Object toCelValue(Object javaValue)
    • isCellNull

      public static boolean isCellNull(@Nullable @Nullable Object object)
    • toListMapValue

      public static <IV extends PrismValue, ID extends ItemDefinition<?>> Object toListMapValue(Item<IV,ID> item)
    • toMillis

      public static long toMillis(@NotNull @NotNull Instant instant)
    • toGoogleDuration

      public static com.google.protobuf.Duration toGoogleDuration(Duration xmlDuration)
    • toInstant

      public static Instant toInstant(XMLGregorianCalendar xmlCal)
    • toXmlDuration

      @NotNull public static @NotNull Duration toXmlDuration(@NotNull com.google.protobuf.Duration gDurantion)
    • toXmlGregorianCalendar

      @NotNull public static @NotNull XMLGregorianCalendar toXmlGregorianCalendar(@NotNull @NotNull Instant instant)