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 StringFEATURE_VISIBILITY
-
Constructor Summary
Constructors Constructor Description SecurityUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopyVisibility(org.geotools.api.feature.simple.SimpleFeature source, org.geotools.api.feature.simple.SimpleFeature dest)Copy the visibility fromsourcetodest.static StringgetVisibility(org.geotools.api.feature.simple.SimpleFeature feature)static org.geotools.api.feature.simple.SimpleFeaturesetFeatureVisibilities(org.geotools.api.feature.simple.SimpleFeature feature, String... visibilities)Sets the visibility to an expression created by joining the givenvisibilitieswith "&".static org.geotools.api.feature.simple.SimpleFeaturesetFeatureVisibility(org.geotools.api.feature.simple.SimpleFeature feature, String visibility)Sets the visibility to the givenvisibilityexpression.
-
-
-
Field Detail
-
FEATURE_VISIBILITY
public static final String FEATURE_VISIBILITY
- See Also:
- Constant Field Values
-
-
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 givenvisibilityexpression.- Parameters:
feature- the `SimpleFeature` to add or update visibilityvisibility- 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 givenvisibilitieswith "&".- Parameters:
feature- the `SimpleFeature` to add or update visibilityvisibilities- 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
featureor 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 fromsourcetodest.- Parameters:
source- the `SimpleFeature` to get the visibility fromdest- the `SimpleFeature` to set the visibility on- Throws:
NullPointerException- if either argument is null
-
-