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 String
FEATURE_VISIBILITY
-
Constructor Summary
Constructors Constructor Description SecurityUtils()
-
Method Summary
All Methods Static Methods Concrete Methods 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 fromsource
todest
.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 givenvisibilities
with "&".static org.geotools.api.feature.simple.SimpleFeature
setFeatureVisibility(org.geotools.api.feature.simple.SimpleFeature feature, String visibility)
Sets the visibility to the givenvisibility
expression.
-
-
-
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 givenvisibility
expression.- 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 givenvisibilities
with "&".- 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
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 fromsource
todest
.- Parameters:
source
- the `SimpleFeature` to get the visibility fromdest
- the `SimpleFeature` to set the visibility on- Throws:
NullPointerException
- if either argument is null
-
-