Search in sources :

Example 1 with FallbackVisibilityHandler

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;
}
Also used : FieldLevelVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.FieldLevelVisibilityHandler) JsonFieldLevelVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.JsonFieldLevelVisibilityHandler) FallbackVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.FallbackVisibilityHandler) GlobalVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.GlobalVisibilityHandler) FieldLevelVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.FieldLevelVisibilityHandler) FallbackVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.FallbackVisibilityHandler) VisibilityHandler(org.locationtech.geowave.core.store.api.VisibilityHandler) FieldMappedVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.FieldMappedVisibilityHandler) JsonFieldLevelVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.JsonFieldLevelVisibilityHandler) JsonFieldLevelVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.JsonFieldLevelVisibilityHandler) GlobalVisibilityHandler(org.locationtech.geowave.core.store.data.visibility.GlobalVisibilityHandler)

Aggregations

VisibilityHandler (org.locationtech.geowave.core.store.api.VisibilityHandler)1 FallbackVisibilityHandler (org.locationtech.geowave.core.store.data.visibility.FallbackVisibilityHandler)1 FieldLevelVisibilityHandler (org.locationtech.geowave.core.store.data.visibility.FieldLevelVisibilityHandler)1 FieldMappedVisibilityHandler (org.locationtech.geowave.core.store.data.visibility.FieldMappedVisibilityHandler)1 GlobalVisibilityHandler (org.locationtech.geowave.core.store.data.visibility.GlobalVisibilityHandler)1 JsonFieldLevelVisibilityHandler (org.locationtech.geowave.core.store.data.visibility.JsonFieldLevelVisibilityHandler)1