Class SecurityUtils

java.lang.Object
org.locationtech.geomesa.security.SecurityUtils

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    copyVisibility(org.geotools.api.feature.simple.SimpleFeature source, org.geotools.api.feature.simple.SimpleFeature dest)
    Copy the visibility from source to dest.
    static String
    getVisibility(org.geotools.api.feature.simple.SimpleFeature feature)
     
    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 "&".
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • SecurityUtils

      public SecurityUtils()
  • Method Details

    • 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