use of com.helger.peppol.ui.page.AppPageViewExternal in project peppol-practical by phax.
the class MenuPublic method init.
public static void init(@Nonnull final IMenuTree aMenuTree) {
// Common stuff
aMenuTree.createRootItem(new AppPageViewExternal(CMenuPublic.MENU_INDEX, "Overview", new ClassPathResource("viewpages/en/index.xml")));
// News stuff
{
aMenuTree.createRootItem(new AppPageViewExternal(CMenuPublic.MENU_NEWS, "News", new ClassPathResource("viewpages/en/news.xml")));
}
// Setup stuff
{
final IMenuItemPage aSetup = aMenuTree.createRootItem(new BasePageShowChildren<WebPageExecutionContext>(CMenuPublic.MENU_DOCS, "Technical documentation", aMenuTree));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_SETUP_AP_PH, "Setup Peppol AP", new ClassPathResource("viewpages/en/docs_setup_ap.xml")));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_SETUP_SMP_PHOSS, "Setup phoss SMP", new ClassPathResource("viewpages/en/docs_setup_smp_phoss.xml")));
if (false)
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_SETUP_SMP_CIPA, "Setup CIPA SMP (deprecated)", new ClassPathResource("viewpages/en/invisible/docs_setup_smp_cipa.xml")));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_SMP_SML_INTERPLAY, "SMP and SML interactions", new ClassPathResource("viewpages/en/docs_smp_sml_interplay.xml")));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_SML_SUPPORT, "SML support", new ClassPathResource("viewpages/en/docs_sml_support.xml")));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_DOC_EXCHANGE, "Document exchange explained", new ClassPathResource("viewpages/en/docs_document_exchange.xml")));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_PEPPOL_PKI, "Peppol PKI explained", new ClassPathResource("viewpages/en/docs_peppol_pki.xml")));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_PEPPOL_CERT_UPDATE, "Peppol Certificate update", new ClassPathResource("viewpages/en/docs_peppol_cert_update.xml")));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_PEPPOL_DICT, "Peppol Dictionary/Abbreviations", new ClassPathResource("viewpages/en/docs_peppol_dict.xml")));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_DOCS_SOFTWARE_VENDORS, "Software Vendors and Solutions", new ClassPathResource("viewpages/en/docs_software_vendors.xml")));
// Not needed any more
if (false)
aMenuTree.createItem(aSetup, new AppPageViewExternal("docs-sml-migration", "SML migration information", new ClassPathResource("viewpages/en/invisible/docs_sml_migration.xml")));
}
// Tools stuff
{
final IMenuItemPage aSetup = aMenuTree.createRootItem(new BasePageShowChildren<WebPageExecutionContext>(CMenuPublic.MENU_TOOLS, "Tools", aMenuTree));
aMenuTree.createItem(aSetup, new PagePublicToolsParticipantInformation(CMenuPublic.MENU_TOOLS_PARTICIPANT_INFO));
aMenuTree.createItem(aSetup, new PagePublicToolsIdentifierInformation(CMenuPublic.MENU_TOOLS_ID_INFO));
aMenuTree.createItem(aSetup, new PagePublicToolsSMPSML(CMenuPublic.MENU_TOOLS_SMP_SML));
aMenuTree.createItem(aSetup, new PagePublicToolsTestEndpoints(CMenuPublic.MENU_TOOLS_TEST_ENDPOINTS));
aMenuTree.createItem(aSetup, new AppPageViewExternal(CMenuPublic.MENU_TOOLS_REST_API, "REST API", new ClassPathResource("viewpages/en/rest_api.xml")));
}
// Validation stuff
{
final IMenuItemPage aValidation = aMenuTree.createRootItem(new BasePageShowChildren<WebPageExecutionContext>(CMenuPublic.MENU_VALIDATION, "Document Validation", aMenuTree));
final IMenuItemPage aUpload = aMenuTree.createItem(aValidation, new PagePublicToolsDocumentValidation(CMenuPublic.MENU_VALIDATION_UPLOAD));
aMenuTree.createRedirect("validation-bis2", aUpload);
aMenuTree.createItem(aValidation, new AppPageViewExternal(CMenuPublic.MENU_VALIDATION_DVS, "Document Validation (WebService)", new ClassPathResource("viewpages/en/validation_dvs.xml")));
}
// EN 16931 - CEN/TC 434
{
aMenuTree.createRootItem(new AppPageViewExternal(CMenuPublic.MENU_EN16931, "EN 16931 - CEN/TC 434", new ClassPathResource("viewpages/en/en16931.xml")));
}
aMenuTree.createRootSeparator();
// Newsletter stuff
{
aMenuTree.createRootItem(new PagePublicNewsletterSubscribe(CMenuPublic.MENU_NEWSLETTER_SUBSCRIBE));
aMenuTree.createRootItem(new PagePublicNewsletterUnsubscribe(CMenuPublic.MENU_NEWSLETTER_UNSUBSCRIBE)).attrs().putIn(CMenuPublic.FLAG_FOOTER_COL2, true);
}
// Contact form
{
aMenuTree.createRootItem(new PagePublicContact(CMenuPublic.MENU_CONTACT));
}
aMenuTree.createRootSeparator();
// Register/Login stuff
{
aMenuTree.createRootItem(new PagePublicLogin(CMenuPublic.MENU_LOGIN)).setDisplayFilter(new MenuObjectFilterNoUserLoggedIn());
aMenuTree.createRootItem(new PagePublicSignUp(CMenuPublic.MENU_SIGN_UP)).setDisplayFilter(new MenuObjectFilterNoUserLoggedIn());
}
// Logged in user stuff
{
aMenuTree.createRootItem(new BasePageSecurityChangePassword<WebPageExecutionContext>(CMenuPublic.MENU_CHANGE_PASSWORD)).setDisplayFilter(new MenuObjectFilterUserLoggedIn());
}
aMenuTree.createRootSeparator();
// External stuff
{
aMenuTree.createRootItem(CMenuPublic.MENU_PEPPOL_SERVICE_DESK, new SimpleURL("https://openpeppol.atlassian.net/servicedesk/customer/portal/1"), new ConstantHasDisplayText("OpenPeppol Service Desk (external)"));
}
// Set default
aMenuTree.setDefaultMenuItemID(CMenuPublic.MENU_NEWS);
}
Aggregations