All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.litongjava.annotation.RequiresPermissions Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.litongjava.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Requires the current subject to have all of the specified permissions.
 * If the subject does not have the required permissions, the method will not be executed.
 *
 * Example:
 * 
 * @RequiresPermissions("account:create")
 * public void createAccount() { ... }
 * 
 *
 * @since 0.9
 */
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface RequiresPermissions {
  /**
   * A single String permission or multiple comma-delimited permissions required for the method invocation.
   */
  String[] value();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy