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

io.overcoded.grid.annotation.GridMenu Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
package io.overcoded.grid.annotation;

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

/**
 * You can put it on a package to define a menu group based on the package in the navigation bar.
 */
@Target(ElementType.PACKAGE)
@Retention(RetentionPolicy.RUNTIME)
public @interface GridMenu {
    /**
     * defines the icon in the menu
     * must be upper case and valid VaadinIcon
     *
     * @return string
     */
    String icon();

    /**
     * defines the base path of the group
     * must starts with `/`
     *
     * @return string
     */
    String path();

    /**
     * defines the label of the group in the menu
     * if not specified, we are using the path (converted)
     *
     * @return string
     */
    String label() default "";

    /**
     * defines the order of the section in the menu
     *
     * @return int
     */
    int order() default Integer.MAX_VALUE;

    /**
     * defines which roles have control over the view.
     * 

* empty, null or * means anybody can access the view, other * values will be checked on runtime with the users roles. * * if not specified: * - every user has access to the grid menu * if specified: * - the path of the package (without trailing slashes) * * Important! * If the actual user doesn't have the required role, the whole section * will be hidden for the user. * * @return String[] */ String[] enabledFor() default {}; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy