Examples of needsApprove()


Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

        StatefulTargetObject sgo = findStatefulTarget(targetId);
        assertNotNull("Failed to find our target in the repository?!", sgo);

        // wait until needsApprove is true; depending on timing, this could have happened before or after the TOPIC_ADDED.
        int attempts = 0;
        while (!sgo.needsApprove() && (attempts++ < 10)) {
            Thread.sleep(100);
        }
       
        assertTrue("With the new assignments, the SGO should need approval.", sgo.needsApprove());
        // create a deploymentversion
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

        int attempts = 0;
        while (!sgo.needsApprove() && (attempts++ < 10)) {
            Thread.sleep(100);
        }
       
        assertTrue("With the new assignments, the SGO should need approval.", sgo.needsApprove());
        // create a deploymentversion
        sgo.approve();

        // the preprocessor now has gotten its properties; inspect these
        PropertyResolver target = preprocessor.getProps();
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

        result.addComponent(autoApproveCB);


        final Button approveButton = new Button("Approve changes");
        approveButton.setImmediate(true);
        approveButton.setEnabled(target.needsApprove());

        result.addComponent(approveButton);
       
        // Add a spacer that fill the remainder of the available space...
        result.addComponent(new Label(" "));
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

            }
        });
        autoApproveCB.addListener(new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {
                target.setAutoApprove(event.getButton().booleanValue());
                approveButton.setEnabled(target.needsApprove());
            }
        });
        approveButton.addListener(new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {
                target.approve();
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

            }
        });
        approveButton.addListener(new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {
                target.approve();
                approveButton.setEnabled(target.needsApprove());
            }
        });

        return result;
    }
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

            }
        }, false, ArtifactObject.TOPIC_ADDED, FeatureObject.TOPIC_ADDED, DistributionObject.TOPIC_ADDED,
            Artifact2FeatureAssociation.TOPIC_ADDED, Feature2DistributionAssociation.TOPIC_ADDED,
            Distribution2TargetAssociation.TOPIC_ADDED, TOPIC_STATUS_CHANGED);

        assertTrue("We added some deployment information, so the target should need approval.", sgo.needsApprove());

        sgo.setAutoApprove(true);

        assertTrue("Turning on the autoapprove should not automatically approve whatever was waiting.", sgo.needsApprove());
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

        assertTrue("We added some deployment information, so the target should need approval.", sgo.needsApprove());

        sgo.setAutoApprove(true);

        assertTrue("Turning on the autoapprove should not automatically approve whatever was waiting.", sgo.needsApprove());

        sgo.approve();

        List<Event> events = new ArrayList<Event>();
        runAndWaitForEvent(new Callable<Void>() {
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

                m_repositoryAdmin.commit();
                return null;
            }
        }, false, events, DeploymentVersionObject.TOPIC_ADDED, TOPIC_STATUS_CHANGED, RepositoryAdmin.TOPIC_REFRESH);

        assertFalse("We approved the new version by hand, so we should not need approval.", sgo.needsApprove());
        assertContainsRefreshCause(events, "commit");

        runAndWaitForEvent(new Callable<Object>() {
            public Object call() throws Exception {
                ArtifactObject b = createBasicBundleObject("myBundle2", "1.0", null);
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

                m_repositoryAdmin.commit();
                return null;
            }
        }, false, DeploymentVersionObject.TOPIC_ADDED, TOPIC_STATUS_CHANGED);

        assertFalse("With autoapprove on, adding new deployment information should still not need approval (at least, after the two CHANGED events).", sgo.needsApprove());

        runAndWaitForEvent(new Callable<Object>() {
            public Object call() throws Exception {
                m_statefulTargetRepository.unregister(sgo.getID());
                return null;
View Full Code Here

Examples of org.apache.ace.client.repository.stateful.StatefulTargetObject.needsApprove()

        assertEquals(a2.getURL(), artifact2.getUrl());
        assertEquals("my.processor.pid", artifact2.getDirective(DeploymentArtifact.DIRECTIVE_KEY_PROCESSORID));
        assertEquals(a2.getResourceId(), artifact2.getDirective(DeploymentArtifact.DIRECTIVE_KEY_RESOURCE_ID));
       
        // Now, add a new version of the processor (ACE-373)
        assertFalse("There should be no changes.", sgo.needsApprove());

        attr = new HashMap<String, String>();
        attr.put(ArtifactObject.KEY_URL, "http://myprocessor/v2");
        attr.put(BundleHelper.KEY_RESOURCE_PROCESSOR_PID, "my.processor.pid");
        attr.put(BundleHelper.KEY_SYMBOLICNAME, "my.processor.bundle");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.