Package org.rhq.coregui.client.components.view

Examples of org.rhq.coregui.client.components.view.ViewFactory


    }

    private void updateOperationsTab(GroupCategory groupCategory, Set<ResourceTypeFacet> facets) {
        if (updateTab(this.operationsTab,
            groupCategory == GroupCategory.COMPATIBLE && facets.contains(ResourceTypeFacet.OPERATION), true)) {
            updateSubTab(this.operationsTab, this.operationsSchedules, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return viewWithoutHeader(new GroupOperationScheduleListView(groupComposite));
                }
            });
            updateSubTab(this.operationsTab, this.operationsHistory, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return viewWithoutHeader(new GroupOperationHistoryListView(groupComposite));
                }
            });
View Full Code Here


    private void updateAlertsTab(final GroupCategory groupCategory) {
        // alerts tab is always visible, even for mixed groups
        if (updateTab(this.alertsTab, true, true)) {
            // alert history is always available
            updateSubTab(this.alertsTab, this.alertHistory, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    // hide the "new definition" button for mixed groups
                    GroupAlertHistoryView canvas = GroupAlertHistoryView.get(groupComposite);
                    canvas.setShowNewDefinitionButton(groupCategory == GroupCategory.COMPATIBLE);
                    return viewWithoutHeader(canvas);
                }
            });
            // but alert definitions can only be created on compatible groups
            boolean visible = (groupCategory == GroupCategory.COMPATIBLE);
            ViewFactory viewFactory = (!visible) ? null : new ViewFactory() {
                @Override
                public Canvas createView() {
                    return viewWithoutHeader(new GroupAlertDefinitionsView(groupComposite));
                }
            };
View Full Code Here

    private void updateConfigurationTab(GroupCategory groupCategory, Set<ResourceTypeFacet> facets) {
        boolean visible = (groupCategory == GroupCategory.COMPATIBLE && facets
            .contains(ResourceTypeFacet.CONFIGURATION));
        Set<Permission> groupPermissions = this.groupComposite.getResourcePermission().getPermissions();
        if (updateTab(this.configurationTab, visible, visible && groupPermissions.contains(Permission.CONFIGURE_READ))) {
            updateSubTab(this.configurationTab, this.configCurrent, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new GroupResourceConfigurationEditView(groupComposite);
                }
            });
            updateSubTab(this.configurationTab, this.configHistory, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return new HistoryGroupResourceConfigurationView(groupComposite);
                }
            });
View Full Code Here

    private void updateEventsTab(GroupCategory groupCategory, Set<ResourceTypeFacet> facets) {
        // allow mixed groups to show events from supporting resources
        boolean visible = (groupCategory == GroupCategory.MIXED || (groupCategory == GroupCategory.COMPATIBLE && facets
            .contains(ResourceTypeFacet.EVENT)));
        if (updateTab(this.eventsTab, visible, true)) {
            updateSubTab(this.eventsTab, this.eventHistory, true, true, new ViewFactory() {
                @Override
                public Canvas createView() {
                    return viewWithoutHeader(EventCompositeHistoryView.get(groupComposite));
                }
            });
View Full Code Here

        return vLayout;
    }

    private NavigationSection buildSubsystemsSection() {
        NavigationItem tagItem = new NavigationItem(TaggedView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new TaggedView();
            }
        });

        NavigationItem suspectMetricsItem = new NavigationItem(MeasurementOOBView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new MeasurementOOBView();
            }
        });

        NavigationItem recentConfigurationChangesItem = new NavigationItem(
            ResourceConfigurationHistoryListView.VIEW_ID, new ViewFactory() {
                public Canvas createView() {
                    return new SubsystemConfigurationHistoryListView(getGlobalPermissions().contains(
                        Permission.MANAGE_INVENTORY));
                }
            });

        NavigationItem recentOperationsItem = new NavigationItem(OperationHistoryView.SUBSYSTEM_VIEW_ID,
            new ViewFactory() {
                public Canvas createView() {
                    SubsystemOperationHistoryListView v = new SubsystemOperationHistoryListView(getGlobalPermissions().contains(
                        Permission.MANAGE_INVENTORY));
                    v.setShowHeader(false);
                    return v;
                }
            });

        NavigationItem recentAlertsItem = new NavigationItem(AlertHistoryView.SUBSYSTEM_VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                SubsystemRecentAlertsView v = new SubsystemRecentAlertsView(getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
                v.setShowHeader(false);
                return v;
            }
        });

        NavigationItem alertDefinitionsItem = new NavigationItem(AlertDefinitionReportView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new AlertDefinitionReportView();
            }
        });

        NavigationItem recentDriftsItem = new NavigationItem(DriftHistoryView.SUBSYSTEM_VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new SubsystemResourceDriftView(getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
            }
        });
View Full Code Here

                recentDriftsItem);
        }
    }

    private NavigationSection buildInventorySection() {
        NavigationItem inventorySummaryItem = new NavigationItem(ResourceInstallReport.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new ResourceInstallReport();
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));

        NavigationItem platformSystemInfoItem = new NavigationItem(PlatformSummaryPortlet.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new PlatformSummaryPortlet(true);
            }
        });

        NavigationItem driftComplianceItem = new NavigationItem(DriftComplianceReport.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new DriftComplianceReport();
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_INVENTORY));
View Full Code Here

        return vLayout;
    }

    private NavigationSection buildSecuritySection() {
        NavigationItem usersItem = new NavigationItem(UsersView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new UsersView(getGlobalPermissions().contains(Permission.MANAGE_SECURITY));
            }
        });

        NavigationItem rolesItem = new NavigationItem(RolesView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new RolesView(getGlobalPermissions().contains(Permission.MANAGE_SECURITY));
            }
        });
View Full Code Here

    private NavigationSection buildTopologySection() {
        ProductInfo productInfo = CoreGUI.get().getProductInfo();
        boolean isRHQ = (productInfo != null) && "RHQ".equals(productInfo.getShortName()); // use this to hide experimental features from product

        NavigationItem serversItem = new NavigationItem(ServerTableView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new ServerTableView(null, false);
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_SETTINGS));

        NavigationItem storageNodesItem = new NavigationItem(StorageNodeAdminView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new StorageNodeAdminView();
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_SETTINGS));

        NavigationItem agentsItem = new NavigationItem(AgentTableView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new AgentTableView(null, false);
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_SETTINGS));

        NavigationItem affinityGroupsItem = new NavigationItem(AffinityGroupTableView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new AffinityGroupTableView();
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_SETTINGS));

        NavigationItem partitionEventsItem = new NavigationItem(PartitionEventTableView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new PartitionEventTableView(PartitionEventTableView.VIEW_ID.getTitle());
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_SETTINGS));
View Full Code Here

            navigationItems.toArray(new NavigationItem[] {}));
        return topologyRegion;
    }

    private NavigationSection buildConfigurationSection() {
        NavigationItem systemSettingsItem = new NavigationItem(SystemSettingsView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new SystemSettingsView();
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_SETTINGS));
        systemSettingsItem.setRefreshRequired(true); // refresh so it always reloads the latest settings

        NavigationItem alertTemplatesItem = new NavigationItem(AlertDefinitionTemplateTypeView.VIEW_ID,
            new ViewFactory() {
                public Canvas createView() {
                    return new AlertDefinitionTemplateTypeView();
                }
            });
        alertTemplatesItem.setRefreshRequired(true); // we always need a new page

        NavigationItem driftTemplatesItem = new NavigationItem(DriftDefinitionTemplateTypeView.VIEW_ID,
            new ViewFactory() {
                public Canvas createView() {
                    return new DriftDefinitionTemplateTypeView();
                }
            });
        driftTemplatesItem.setRefreshRequired(true); // we always need a new page

        NavigationItem metricTemplatesItem = new NavigationItem(MetricTemplateTypeView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new MetricTemplateTypeView();
            }
        });
        metricTemplatesItem.setRefreshRequired(true); // we always need a new page

        NavigationItem ignoreResourceTypesItem = new NavigationItem(IgnoreResourceTypesView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new IgnoreResourceTypesView();
            }
        });
        ignoreResourceTypesItem.setRefreshRequired(true); // we always need a new page

        NavigationItem missingResourcePolicyItem = new NavigationItem(
            MissingPolicyResourceTypesView.VIEW_ID,
            new ViewFactory() {
                public Canvas createView() {
                    return new MissingPolicyResourceTypesView();
                }
            });
        missingResourcePolicyItem.setRefreshRequired(true); // we always need a new page

        NavigationItem downloadsItem = new NavigationItem(DownloadsView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new DownloadsView();
            }
        });

        NavigationItem agentPluginsItem = new NavigationItem(AgentPluginTableView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new AgentPluginTableView();
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_SETTINGS));

        NavigationItem serverPluginsItem = new NavigationItem(ServerPluginTableView.VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new ServerPluginTableView();
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_SETTINGS));
View Full Code Here

            downloadsItem, agentPluginsItem,
            serverPluginsItem);
    }

    private NavigationSection buildContentSection() {
        NavigationItem contentSourcesItem = new NavigationItem(PAGE_CONTENT_SOURCES_VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new FullHTMLPane("/portal/rhq/content/listContentProviders-plain.xhtml");
            }
        }, getGlobalPermissions().contains(Permission.MANAGE_REPOSITORIES));

        NavigationItem reposItem = new NavigationItem(PAGE_REPOS_VIEW_ID, new ViewFactory() {
            public Canvas createView() {
                return new FullHTMLPane("/portal/rhq/content/listRepos-plain.xhtml");
            }
        });
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.components.view.ViewFactory

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.