net.anotheria.anosite.gen.shared.action.BaseDefinitionsAction Maven / Gradle / Ivy
/**
********************************************************************************
*** BaseDefinitionsAction.java ***
*** generated by AnoSiteGenerator (ASG), Version: 1.3.3 ***
*** Copyright (C) 2005 - 2010 Anotheria.net, www.anotheria.net ***
*** All Rights Reserved. ***
********************************************************************************
*** Don't edit this code, if you aren't sure ***
*** that you do exactly know what you are doing! ***
*** It's better to invest time in the generator, as into the generated code. ***
********************************************************************************
*/
package net.anotheria.anosite.gen.shared.action;
import java.util.List;
import java.util.ArrayList;
import net.anotheria.maf.bean.FormBean;
import net.anotheria.webutils.bean.NavigationItemBean;
import java.util.Arrays;
public abstract class BaseDefinitionsAction extends BaseAnositeAction{
protected abstract String getTitle();
@Override
protected String getActiveMainNavi() {
return "Definitions";
}
private static final List MY_ROLES = Arrays.asList(new String[]{"admin", "developer"});
protected List getRequiredRoles(){
return MY_ROLES;
}
protected List getSubNavigation(){;
List subNavi = new ArrayList();
subNavi.add(makeMenuItemBean("Generic BoxType", "asgenericdataGenericBoxTypeShow"));
subNavi.add(makeMenuItemBean("Generic BoxHandler", "asgenericdataGenericBoxHandlerDefShow"));
subNavi.add(makeMenuItemBean("Generic Guard", "asgenericdataGenericGuardDefShow"));
subNavi.add(makeMenuItemBean("CustomBoxType", "ascustomdataCustomBoxTypeShow"));
subNavi.add(makeMenuItemBean("CustomBoxHandler", "ascustomdataCustomBoxHandlerDefShow"));
subNavi.add(makeMenuItemBean("CustomGuard", "ascustomdataCustomGuardDefShow"));
subNavi.add(makeMenuItemBean("Federated BoxTypes", "asfederateddataBoxTypeShow"));
subNavi.add(makeMenuItemBean("Federated BoxHandler", "asfederateddataBoxHandlerDefShow"));
subNavi.add(makeMenuItemBean("Federated Guard", "asfederateddataGuardDefShow"));
return subNavi;
}
private NavigationItemBean makeMenuItemBean(String title, String link){
NavigationItemBean bean = new NavigationItemBean();
bean.setCaption(title);
bean.setLink(link);
bean.setActive(title.equals(getTitle()));
return bean;
}
protected boolean isAuthorizationRequired(){
return true;
}
}