Package org.jeecgframework.core.annotation.config

Examples of org.jeecgframework.core.annotation.config.AutoMenu


    Set<Class<?>> classSet = PackagesToScanUtil.getClasses(".*");
    for (Class<?> clazz : classSet) {
      //判断当前类是否设置了菜单注解
      //未设置菜单注解就算在该类的方法上设置了菜单操作按钮注解也不进行菜单操作按钮的匹配
      if (clazz.isAnnotationPresent(AutoMenu.class)) {
        AutoMenu autoMenu = clazz.getAnnotation(AutoMenu.class);
        //菜单名称必须填写,否则不进行菜单和菜单操作按钮的匹配
        if (StringUtil.isNotEmpty(autoMenu.name())) {
          StringBuffer menuKey = new StringBuffer();
          menuKey.append(autoMenu.name());
          menuKey.append(KEY_SPLIT);
          menuKey.append(autoMenu.level() == null ? "" : autoMenu.level());
          menuKey.append(KEY_SPLIT);
          menuKey.append(autoMenu.url() == null ? "" : autoMenu.url());
         
          TSFunction function = null;
          //判断菜单map的key是否包含当前key,不包含则插入一条菜单数据
          if (!functionMap.containsKey(menuKey.toString())) {
            function = new TSFunction();
            function.setFunctionName(autoMenu.name());
            function.setFunctionIframe(null);
            function.setFunctionLevel(Short.valueOf(autoMenu.level()));
            function.setFunctionOrder(Integer.toString(autoMenu.order()));
            function.setFunctionUrl(autoMenu.url());
            function.setTSFunction(null);
           
            String iconId = autoMenu.icon();
            if (StringUtil.isNotEmpty(iconId)) {
              Object obj = this.get(TSIcon.class, iconId);
              if(obj!=null){
                function.setTSIcon((TSIcon)obj);
              }else{
View Full Code Here

TOP

Related Classes of org.jeecgframework.core.annotation.config.AutoMenu

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.