Package org.apache.ace.client.repository.stateful

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


    assertEquals("The deployment should tell use we need bundle URL 'bundle1-1';", "http://bundle1-1", sgo.getArtifactsFromDeployment()[0].getUrl());
    assertEquals("1", sgo.getCurrentVersion());
   
    final String newVersion = runAndWaitForEvent(new Callable<String>() {
        public String call() throws Exception {
            return sgo.approve();
        }
    }, false, DeploymentVersionObject.TOPIC_ADDED, TOPIC_STATUS_CHANGED);
   
    assertFalse("Immediately after approval, no approval is necessary.", sgo.needsApprove());
    assertEquals("We expect the registration state to be Registered;", RegistrationState.Registered, sgo.getRegistrationState());
View Full Code Here


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

        runAndWaitForEvent(new Callable<Object>() {
            public Object call() throws Exception {
                sgo.approve();
                return null;
            }
        }, false, TOPIC_STATUS_CHANGED);

        assertFalse("We approved the new version by hand, so we should not need approval.", sgo.needsApprove());
View Full Code Here

        m_feature2distributionRepository.create(g, l);

        m_distribution2targetRepository.create(l, sgo.getTargetObject());

        try {
            sgo.approve();
            assertTrue("Without a resource processor for our artifact, approve should go wrong.", false);
        }
        catch (IllegalStateException ise) {
            // expected
        }
View Full Code Here

        attr.put(BundleHelper.KEY_SYMBOLICNAME, "my.processor.bundle");
        attr.put(ArtifactHelper.KEY_MIMETYPE, BundleHelper.MIMETYPE);

        ArtifactObject b2 = m_artifactRepository.create(attr, tags);

        sgo.approve();

        DeploymentVersionObject dep = m_deploymentVersionRepository.getMostRecentDeploymentVersion(sgo.getID());

        DeploymentArtifact[] toDeploy = dep.getDeploymentArtifacts();
View Full Code Here

        // create a deploymentversion
        assertTrue("With the new assignments, the SGO should need approval.", sgo.needsApprove());
       
        runAndWaitForEvent(new Callable<Object>() {
            public Object call() throws Exception {
                sgo.approve();
                return null;
            }
        }, false, TOPIC_STATUS_CHANGED);

        // find the deployment version
View Full Code Here

        // try the simple template
        m_artifact2featureRepository.remove(a2g);
        a1 = m_artifactRepository.importArtifact(simpleTemplateFile.toURI().toURL(), true);
        a2g = m_artifact2featureRepository.create(a1, go);

        sgo.approve();

        // find the deployment version
        dvo = m_deploymentVersionRepository.getMostRecentDeploymentVersion("templatetarget2");
        // sleep for a while, to allow the OBR to process the file.
        Thread.sleep(250);
View Full Code Here

            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();
        assertTrue("The property resolver should be able to resolve 'id'.", target.get("id").startsWith(targetId));
        assertTrue("The property resolver should be able to resolve 'name'.", target.get("name").startsWith("mydistribution"));
View Full Code Here

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

        return result;
View Full Code Here

        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>() {
            public Void call() throws Exception {
                m_repositoryAdmin.commit();
View Full Code Here

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

        return result;
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.