Examples of needsApprove()


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

        public StatefulTargetObject call() throws Exception {
            return m_statefulTargetRepository.preregister(attr, tags);
        }
    }, false, TargetObject.TOPIC_ADDED, TOPIC_ADDED);
   
    assertTrue("Without any deployment versions, and no information in the shop, we should not need to approve.", !sgo.needsApprove());
    assertEquals("We expect the registration state to be Registered;", RegistrationState.Registered, sgo.getRegistrationState());
    assertEquals("We expect the registration state to be New;", StoreState.New, sgo.getStoreState());
    assertEquals(UNKNOWN_VERSION, sgo.getCurrentVersion());
   
    final ArtifactObject b11 = createBasicBundleObject("bundle1", "1", null);
View Full Code Here

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

        public Distribution2TargetAssociation call() throws Exception {
            return m_distribution2targetRepository.create(l1, sgo.getTargetObject());
        }
    }, false, Distribution2TargetAssociation.TOPIC_ADDED, TOPIC_STATUS_CHANGED);
   
    assertTrue("We added information that influences our target, so we should need to approve it.", sgo.needsApprove());
    assertEquals("We expect the registration state to be Registered;", RegistrationState.Registered, sgo.getRegistrationState());
    assertEquals("We expect the registration state to be Unapproved;", StoreState.Unapproved, sgo.getStoreState());
    assertEquals("According to the shop, this target needs 1 bundle", 1, sgo.getArtifactsFromShop().length);
    assertEquals("According to the deployment, this target needs 0 bundles", 0, sgo.getArtifactsFromDeployment().length);
    assertEquals(UNKNOWN_VERSION, sgo.getCurrentVersion());
View Full Code Here

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

            createBasicDeploymentVersionObject(targetId, "1", b11);
            return null;
        }
    }, false, DeploymentVersionObject.TOPIC_ADDED, TOPIC_STATUS_CHANGED);
   
    assertFalse("We manually created a deployment version that reflects the shop, so no approval should be necessary.", sgo.needsApprove());
    assertEquals("We expect the registration state to be Registered;", RegistrationState.Registered, sgo.getRegistrationState());
    assertEquals("We expect the registration state to be Approved;", StoreState.Approved, sgo.getStoreState());
    assertEquals("According to the shop, this target needs 1 bundle;", 1, sgo.getArtifactsFromShop().length);
    assertEquals("According to the deployment, this target needs 1 bundle;", 1, sgo.getArtifactsFromDeployment().length);
   
View Full Code Here

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

        public ArtifactObject call() throws Exception {
            return createBasicBundleObject("bundle1", "2", null);
        }
    }, false, ArtifactObject.TOPIC_ADDED, Artifact2FeatureAssociation.TOPIC_CHANGED, TOPIC_STATUS_CHANGED);
   
    assertTrue("We added a new version of a bundle that is used by the target, so approval should be necessary.", sgo.needsApprove());
    assertEquals("We expect the registration state to be Registered;", RegistrationState.Registered, sgo.getRegistrationState());
    assertEquals("We expect the registration state to be Unapproved;", StoreState.Unapproved, sgo.getStoreState());
    assertEquals("According to the shop, this target needs 1 bundle", 1, sgo.getArtifactsFromShop().length);
    assertEquals("The shop should tell use we need bundle URL 'bundle1-2';", "http://bundle1-2", sgo.getArtifactsFromShop()[0].getURL());
    assertEquals("According to the deployment, this target needs 1 bundle", 1, sgo.getArtifactsFromDeployment().length);
View Full Code Here

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

        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());
    assertEquals("We expect the registration state to be Approved;", StoreState.Approved, sgo.getStoreState());
    assertEquals("According to the shop, this target needs 1 bundle", 1, sgo.getArtifactsFromShop().length);
    assertEquals("The shop should tell use we need bundle URL 'bundle1-2';", "http://bundle1-2", sgo.getArtifactsFromShop()[0].getURL());
    assertEquals("According to the deployment, this target needs 1 bundle", 1, sgo.getArtifactsFromDeployment().length);
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());

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

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

                sgo.approve();
                return null;
            }
        }, false, TOPIC_STATUS_CHANGED);

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

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

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

                return null;
            }
        }, false, ArtifactObject.TOPIC_ADDED, Artifact2FeatureAssociation.TOPIC_ADDED, TOPIC_STATUS_CHANGED,
            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()

        Artifact2FeatureAssociation a2g = m_artifact2featureRepository.create(a1, go);

        final StatefulTargetObject sgo = findStatefulTarget("templatetarget2");

        // 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;
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.