org.seedstack.seed.security.data.Restriction Maven / Gradle / Ivy
/**
* Copyright (c) 2013-2016, The SeedStack authors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package org.seedstack.seed.security.data;
import org.seedstack.seed.security.spi.data.DataObfuscationHandler;
import org.seedstack.seed.security.spi.data.NullifyObfuscationHandler;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This annotation will trigger the specified obfuscation when the expression evaluates to false.
*
* @author [email protected]
* @author [email protected]
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
public @interface Restriction {
/**
* The security expression related to the annotated element.
*
* Please use an Expression Language.
*
*/
String value() default "${false}";
/**
* The obfuscation handler to use in case the restriction is false.
*/
Class extends DataObfuscationHandler>> obfuscation() default NullifyObfuscationHandler.class;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy