accessrules.add(new AccessRule("/endentityprofilerules",AccessRule.RULE_ACCEPT,true));
accessrules.add(new AccessRule("/endentityprofilesrules",AccessRule.RULE_ACCEPT,true));
    public void initialize(Admin admin, int caid) throws AdminGroupExistsException{         // Check if admingroup table is empty, if so insert default superuser         // and create "special edit accessrules count group"       try{         Collection result = admingrouphome.findAll();         if(result.size()==0){          // Authorization table is empty, fill with default and special admingroups.           String admingroupname = "Temporary Super Administrator Group";              addAdminGroup(admin, admingroupname, caid);            ArrayList adminentities = new ArrayList();           adminentities.add(new AdminEntity(AdminEntity.WITH_COMMONNAME,AdminEntity.TYPE_EQUALCASEINS,"SuperAdmin",caid));                      addAdminEntities(admin, admingroupname, caid, adminentities);           ArrayList accessrules = new ArrayList();           accessrules.add(new AccessRule("/public_web_user",AccessRule.RULE_ACCEPT,false));           accessrules.add(new AccessRule("/administrator",AccessRule.RULE_ACCEPT,false));           accessrules.add(new AccessRule("/super_administrator",AccessRule.RULE_ACCEPT,false));           accessrules.add(new AccessRule("/ca_functionality",AccessRule.RULE_ACCEPT,true));           accessrules.add(new AccessRule("/ra_functionality",AccessRule.RULE_ACCEPT,true));           accessrules.add(new AccessRule("/log_functionality",AccessRule.RULE_ACCEPT,true));           accessrules.add(new AccessRule("/system_functionality",AccessRule.RULE_ACCEPT,true));           accessrules.add(new AccessRule("/hardtoken_functionality",AccessRule.RULE_ACCEPT,true));                      accessrules.add(new AccessRule("/ca",AccessRule.RULE_ACCEPT,true));            accessrules.add(new AccessRule("/endentityprofilerules",AccessRule.RULE_ACCEPT,true));                       addAccessRules(admin, admingroupname, caid, accessrules);                    }       }catch(FinderException e){}         // Add Special Admin Group       try{          admingrouphome.findByPrimaryKey(new AdminGroupPK(DEFAULTGROUPNAME, ILogSessionLocal.INTERNALCAID));          }catch(FinderException e){         // Add Default Group         try{             AdminGroupDataLocal agdl = admingrouphome.create(DEFAULTGROUPNAME,  ILogSessionLocal.INTERNALCAID);                   ArrayList adminentities = new ArrayList();           adminentities.add(new AdminEntity(AdminEntity.SPECIALADMIN_BATCHCOMMANDLINEADMIN));           adminentities.add(new AdminEntity(AdminEntity.SPECIALADMIN_CACOMMANDLINEADMIN));              adminentities.add(new AdminEntity(AdminEntity.SPECIALADMIN_RACOMMANDLINEADMIN));             adminentities.add(new AdminEntity(AdminEntity.SPECIALADMIN_INTERNALUSER));           agdl.addAdminEntities(adminentities);                    ArrayList accessrules = new ArrayList();           accessrules.add(new AccessRule("/administrator",AccessRule.RULE_ACCEPT,false));           accessrules.add(new AccessRule("/super_administrator",AccessRule.RULE_ACCEPT,false));           accessrules.add(new AccessRule("/ca_functionality",AccessRule.RULE_ACCEPT,true));           accessrules.add(new AccessRule("/ra_functionality",AccessRule.RULE_ACCEPT,true));           accessrules.add(new AccessRule("/log_functionality",AccessRule.RULE_ACCEPT,true));           accessrules.add(new AccessRule("/system_functionality",AccessRule.RULE_ACCEPT,true));           accessrules.add(new AccessRule("/hardtoken_functionality",AccessRule.RULE_ACCEPT,true));                      accessrules.add(new AccessRule("/ca",AccessRule.RULE_ACCEPT,true));            accessrules.add(new AccessRule("/endentityprofilerules",AccessRule.RULE_ACCEPT,true));                      agdl.addAccessRules(accessrules);                      signalForAuthorizationTreeUpdate();         }catch(CreateException ce){}       }    }