Examples of needsApprove()


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

        attr.put(BundleHelper.KEY_VERSION, "2.0.0");
        attr.put(ArtifactHelper.KEY_MIMETYPE, BundleHelper.MIMETYPE);

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

        assertTrue("By adding a resource processor, we should have triggered a change that needs to be approved.", sgo.needsApprove());

        sgo.approve();

        runAndWaitForEvent(new Callable<Void>() {
            public Void call() throws Exception {
View Full Code Here

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

        assertTrue("Could not find artifact 2 in deployment", foundArtifact2);

        // Now, let's add a new resource processor that is *older* than the one we already have.
        // Nothing should change.

        assertFalse("There should be no changes.", sgo.needsApprove());

        attr = new HashMap<String, String>();
        attr.put(ArtifactObject.KEY_URL, "http://myprocessor/v1.5");
        attr.put(BundleHelper.KEY_RESOURCE_PROCESSOR_PID, "my.processor.pid");
        attr.put(BundleHelper.KEY_SYMBOLICNAME, "my.processor.bundle");
View Full Code Here

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

        attr.put(BundleHelper.KEY_VERSION, "1.5.0");
        attr.put(ArtifactHelper.KEY_MIMETYPE, BundleHelper.MIMETYPE);

        m_artifactRepository.create(attr, tags);

        assertFalse("By adding an older resource processor, we should not have triggered a change.", sgo.needsApprove());

        cleanUp();

        m_dependencyManager.remove(myHelperService);
    }
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());
       
        sgo.approve();

        runAndWaitForEvent(new Callable<Void>() {
            public Void call() throws Exception {
View Full Code Here

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();
       
       
        runAndWaitForEvent(new Callable<Void>() {
View Full Code Here

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