BookmarkablePageLink<Page> schemaLink = new BookmarkablePageLink<Page>("schema", Schema.class);
MetaDataRoleAuthorizationStrategy.authorize(
schemaLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles("Schema", "list"));
page.add(schemaLink);
schemaLink.add(new Image("schemaIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
? IMG_NOTSEL
: "") + "schema" + Constants.PNG_EXT)));
BookmarkablePageLink<Page> usersLink = new BookmarkablePageLink<Page>("users", Users.class);
MetaDataRoleAuthorizationStrategy.authorize(
usersLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles("Users", "list"));
page.add(usersLink);
usersLink.add(new Image("usersIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
? IMG_NOTSEL
: "") + "users" + Constants.PNG_EXT)));
BookmarkablePageLink<Page> rolesLink = new BookmarkablePageLink<Page>("roles", Roles.class);
MetaDataRoleAuthorizationStrategy.authorize(
rolesLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles("Roles", "list"));
page.add(rolesLink);
rolesLink.add(new Image("rolesIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
? IMG_NOTSEL
: "") + "roles" + Constants.PNG_EXT)));
BookmarkablePageLink<Page> resourcesLink = new BookmarkablePageLink<Page>("resources", Resources.class);
MetaDataRoleAuthorizationStrategy.authorize(
resourcesLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles("Resources", "list"));
page.add(resourcesLink);
resourcesLink.add(new Image("resourcesIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
? IMG_NOTSEL
: "") + "resources" + Constants.PNG_EXT)));
BookmarkablePageLink<Page> todoLink = new BookmarkablePageLink<Page>("todo", Todo.class);
MetaDataRoleAuthorizationStrategy.authorize(
todoLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles("Approval", "list"));
page.add(todoLink);
todoLink.add(new Image("todoIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
? IMG_NOTSEL
: "") + "todo" + Constants.PNG_EXT)));
BookmarkablePageLink<Page> reportLink = new BookmarkablePageLink<Page>("reports", Reports.class);
MetaDataRoleAuthorizationStrategy.authorize(
reportLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles("Reports", "list"));
page.add(reportLink);
reportLink.add(new Image("reportsIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
? IMG_NOTSEL
: "") + "reports" + Constants.PNG_EXT)));
BookmarkablePageLink<Page> configurationLink = new BookmarkablePageLink<Page>("configuration",
Configuration.class);
MetaDataRoleAuthorizationStrategy.authorize(
configurationLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration", "list"));
page.add(configurationLink);
configurationLink.add(new Image("configurationIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
? IMG_NOTSEL
: "") + "configuration" + Constants.PNG_EXT)));
BookmarkablePageLink<Page> taskLink = new BookmarkablePageLink<Page>("tasks", Tasks.class);
MetaDataRoleAuthorizationStrategy.authorize(
taskLink, WebPage.ENABLE, xmlRolesReader.getAllAllowedRoles("Tasks", "list"));
page.add(taskLink);
taskLink.add(new Image("tasksIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
? IMG_NOTSEL
: "") + "tasks" + Constants.PNG_EXT)));
page.add(new BookmarkablePageLink<Page>("logout", Logout.class));
}