Class SecurityUtils
java.lang.Object
org.locationtech.geomesa.security.SecurityUtils
Utilities for accessing and modifying visibility on `SimpleFeature`s.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
FEATURE_VISIBILITY
- See Also:
-
-
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 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
- 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
-