Class SecurityUtils


  • public class SecurityUtils
    extends Object
    Utilities for accessing and modifying visibility on `SimpleFeature`s.
    • Constructor Detail

      • SecurityUtils

        public SecurityUtils()
    • Method Detail

      • setFeatureVisibility

        public static org.geotools.api.feature.simple.SimpleFeature setFeatureVisibility​(org.geotools.api.feature.simple.SimpleFeature feature,
                                                                                         String visibility)
        Sets the visibility to the given visibility expression.
        Parameters:
        feature - the `SimpleFeature` to add or update visibility
        visibility - the visibility expression
        Returns:
        feature
      • setFeatureVisibilities

        public static org.geotools.api.feature.simple.SimpleFeature setFeatureVisibilities​(org.geotools.api.feature.simple.SimpleFeature feature,
                                                                                           String... visibilities)
        Sets the visibility to an expression created by joining the given visibilities with "&".
        Parameters:
        feature - the `SimpleFeature` to add or update visibility
        visibilities - a set of visibilities that will be and-ed together
        Returns:
        feature
      • getVisibility

        public static String getVisibility​(org.geotools.api.feature.simple.SimpleFeature feature)
        Parameters:
        feature - the `SimpleFeature` to get the visibility from
        Returns:
        the visibility from feature or null if none
      • copyVisibility

        public static void copyVisibility​(org.geotools.api.feature.simple.SimpleFeature source,
                                          org.geotools.api.feature.simple.SimpleFeature dest)
        Copy the visibility from source to dest.
        Parameters:
        source - the `SimpleFeature` to get the visibility from
        dest - the `SimpleFeature` to set the visibility on
        Throws:
        NullPointerException - if either argument is null