use of org.locationtech.geowave.core.store.data.visibility.FallbackVisibilityHandler in project geowave by locationtech.
the class VisibilityOptions method getConfiguredVisibilityHandler.
public VisibilityHandler getConfiguredVisibilityHandler() {
final VisibilityHandler globalVisibilityHandler;
if (visibility != null && visibility.trim().length() > 0) {
globalVisibilityHandler = new GlobalVisibilityHandler(visibility.trim());
} else {
globalVisibilityHandler = null;
}
if (visibilityAttribute != null && visibilityAttribute.trim().length() > 0) {
if (jsonVisibilityAttribute) {
return new JsonFieldLevelVisibilityHandler(visibilityAttribute);
}
return new FieldLevelVisibilityHandler(visibilityAttribute);
}
final VisibilityHandler fieldVisibilityHandler = parseFieldVisibilities();
if (fieldVisibilityHandler == null) {
if (globalVisibilityHandler != null) {
return globalVisibilityHandler;
}
return null;
} else if (globalVisibilityHandler != null) {
return new FallbackVisibilityHandler(new VisibilityHandler[] { fieldVisibilityHandler, globalVisibilityHandler });
}
return fieldVisibilityHandler;
}
Aggregations