Enum PredefinedAnnotationRenderStrategy

    • Enum Constant Detail

      • SERVER_SIDE_MASKING

        public static final PredefinedAnnotationRenderStrategy SERVER_SIDE_MASKING
        Annotations shall be rendered on server side, if the DENY.REMOVE and DENY.CHANGE permissions are present on the annotation. This represents the default behavior.
    • Method Detail

      • values

        public static PredefinedAnnotationRenderStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PredefinedAnnotationRenderStrategy c : PredefinedAnnotationRenderStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PredefinedAnnotationRenderStrategy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getStrategyFrom

        public static AnnotationRenderStrategy getStrategyFrom​(Document document)
        Returns the AnnotationRenderStrategy for the given document. If there is an entry in the document properties with key PROPERTY_KEY, that value will be used to return the AnnotationRenderStrategy to apply. If no property entry is present, or the entry does not point to a valid enum name, the default strategy will be returned.

        This method mainly is for JWT-internal use.

        Parameters:
        document - The document
        Returns:
        the AnnotationRenderStrategy to use for this document (never null)
      • getPredefinedStrategyFrom

        public static PredefinedAnnotationRenderStrategy getPredefinedStrategyFrom​(Document document)
        Returns the PredefinedAnnotationRenderStrategy for the given document. If there is an entry in the document properties with key PROPERTY_KEY, that value will be used. If no entry is present, or the entry does not point to a valid enum name, the DEFAULT_STRATEGY will be returned.

        This method may come handy when the integrating application needs client-side access to the render strategy in order to enforce different behaviour depending on the strategy that was configured server-side.

        Parameters:
        document - The document
        Returns:
        the PredefinedAnnotationRenderStrategy to use (never null). One of CLIENT, SERVER_SIDE_MASKING and DEFAULT_STRATEGY.