Package org.drools.guvnor.client.explorer

Examples of org.drools.guvnor.client.explorer.ClientFactory


    @Test
    public void testSetRootItem() throws Exception {
        IsTreeItem treeItem = mock(IsTreeItem.class);
        ModuleTreeItemView view = mock(ModuleTreeItemView.class);
        ClientFactory clientFactory = mock( ClientFactory.class );

        AssetEditorFactory assetEditorFactory = mock( AssetEditorFactory.class );
        when(
                clientFactory.getAssetEditorFactory()
        ).thenReturn(
                assetEditorFactory
        );
       
        PerspectiveFactory perspectiveFactory = mock( PerspectiveFactory.class );
        when(
                perspectiveFactory.getRegisteredAssetEditorFormats("package")
        ).thenReturn(
                new String[0]
        );

        NavigationViewFactory navigationViewFactory = mock( NavigationViewFactory.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
                navigationViewFactory
        );
        when(
                navigationViewFactory.getModuleTreeItemView()
View Full Code Here


        setUpUserCapabilities( true );
        createPresenter();
    }

    private void createPresenter() {
        ClientFactory clientFactory = mock( ClientFactory.class );

        NavigationViewFactory navigationViewFactory = mock( NavigationViewFactory.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
                navigationViewFactory
        );

        when(
                navigationViewFactory.getModulesTreeView()
        ).thenReturn(
                view
        );

        ModulesTreeItemView knowledgeModulesTreeItemView = mock( ModulesTreeItemView.class );
        when(
                navigationViewFactory.getModulesTreeItemView()
        ).thenReturn(
                knowledgeModulesTreeItemView
        );

        ModuleServiceAsync packageService = mock( ModuleServiceAsync.class );
        when(
                clientFactory.getModuleService()
        ).thenReturn(
                packageService
        );

/*       
View Full Code Here

    private EventBus eventBus;
    private MultiActivityManager activityManager;

    @Before
    public void setUp() throws Exception {
        final ClientFactory clientFactory = mock( ClientFactory.class );
        NavigationViewFactory navigationViewFactory = mock(NavigationViewFactory.class);
        PerspectivesPanelView perspectivesPanelView = mock( PerspectivesPanelView.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
            navigationViewFactory
        );
        when(
                clientFactory.getNavigationViewFactory().getPerspectivesPanelView()
        ).thenReturn(
                perspectivesPanelView
        );
       
        PerspectiveFactory perspectiveFactory = mock(PerspectiveFactory.class);
        when(
                clientFactory.getPerspectiveFactory()
        ).thenReturn(
                perspectiveFactory
        );
       
        when(
                perspectiveFactory.getRegisteredPerspectiveTypes()
        ).thenReturn(
                new String[]{"author", "runtime"}
               
        );
       
        placeController = mock( PlaceController.class );
        when(
                clientFactory.getPlaceController()
        ).thenReturn(
                placeController
        );

        ConfigurationServiceAsync configurationService = mock( ConfigurationServiceAsync.class );
        when(
                clientFactory.getConfigurationService()
        ).thenReturn(
                configurationService
        );

        activityManager = mock( MultiActivityManager.class );
        when(
                clientFactory.getActivityManager()
        ).thenReturn(
                activityManager
        );

        placeHistoryHandler = mock( PlaceHistoryHandler.class );
        when(
                clientFactory.getPlaceHistoryHandler()
        ).thenReturn(
                placeHistoryHandler
        );

        eventBus = mock( EventBus.class );
View Full Code Here

    private SummaryTableView summaryTableView;

    @Before
    public void setUp() {
        summaryTableView = mock( SummaryTableView.class );
        ClientFactory clientFactory = mock( ClientFactory.class );
        summaryTable = new SummaryTable(
                summaryTableView,
                clientFactory );
    }
View Full Code Here

    @Test
    public void testSetRootItem() throws Exception {
        treeItem = mock( IsTreeItem.class );
        view = mock( ModuleTreeItemView.class );
        ClientFactory clientFactory = mock( ClientFactory.class );

        AssetEditorFactory assetEditorFactory = mock( AssetEditorFactory.class );
        when(
                clientFactory.getAssetEditorFactory()
        ).thenReturn(
                assetEditorFactory
        );
       
        PerspectiveFactory perspectiveFactory = mock( PerspectiveFactory.class );
        when(
                perspectiveFactory.getRegisteredAssetEditorFormats("package")
        ).thenReturn(
                new String[0]
        );

        NavigationViewFactory navigationViewFactory = mock( NavigationViewFactory.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
                navigationViewFactory
        );
        when(
                navigationViewFactory.getModuleTreeItemView()
View Full Code Here

        setUpUserCapabilities( true );
        createPresenter();
    }

    private void createPresenter() {
        ClientFactory clientFactory = mock( ClientFactory.class );

        NavigationViewFactory navigationViewFactory = mock( NavigationViewFactory.class );
        when(
                clientFactory.getNavigationViewFactory()
        ).thenReturn(
                navigationViewFactory
        );

        when(
                navigationViewFactory.getModulesTreeView()
        ).thenReturn(
                view
        );

        ModulesTreeItemView knowledgeModulesTreeItemView = mock( ModulesTreeItemView.class );
        when(
                navigationViewFactory.getModulesTreeItemView()
        ).thenReturn(
                knowledgeModulesTreeItemView
        );

        PackageServiceAsync packageService = mock( PackageServiceAsync.class );
        when(
                clientFactory.getPackageService()
        ).thenReturn(
                packageService
        );

/*       
View Full Code Here

     * "StandaloneEditor.html" then the StandaloneGuidedEditorManager is used to
     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppController(clientFactory,eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
            RootLayoutPanel.get().add(new StandaloneEditorManager(clientFactory, eventBus).getBaseLayout());
        } else {
View Full Code Here

    public AssetAttachmentFileWidget(final RuleAsset asset,
                                     final RuleViewer viewer,
                                     ClientFactory clientFactory,
                                     EventBus eventBus) {
        this.viewer = viewer;
        ClientFactory clientFactory1 = clientFactory;
        this.eventBus = eventBus;
        this.asset = asset;
        initWidgets(asset.getUuid(),
                asset.getName());
        initAssetHandlers();
View Full Code Here

    private void createMain() {
        if ( Window.Location.getPath().contains( "StandaloneEditor.html" ) ) {
            RootLayoutPanel.get().add( new StandaloneEditorManager().getBaseLayout() );
        } else {

            ClientFactory clientFactory = GWT.create( ClientFactory.class );
            EventBus eventBus = clientFactory.getEventBus();
            PlaceController placeController = clientFactory.getPlaceController();
            Perspective defaultPlace = new AuthorPerspectivePlace();

            perspectivesPanel = new PerspectivesPanel( clientFactory.getPerspectivesPanelView( hideTitle() ),
                                                       placeController );

            loadPerspectives();

            // TODo: Hide the dropdown if the default one is the only one -Rikkola-
View Full Code Here

     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        SuggestionCompletionCache.getInstance().setEventBus(eventBus);
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppControllerImpl(clientFactory, eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
            RootLayoutPanel.get().add(new StandaloneEditorManager(clientFactory, eventBus).getBaseLayout());
        } else {
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.explorer.ClientFactory

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.