Examples of VersionState


Examples of com.atlassian.maven.plugins.jgitflow.VersionState

    private Map<String, String> getNextVersions(VersionType versionType, ProjectCacheKey cacheKey, List<MavenProject> reactorProjects, MavenProject rootProject, String contextVersion) throws MavenJGitFlowException
    {
        ReleaseContext ctx = contextProvider.getContext();
        String promptLabel = versionType.name().toLowerCase();
        Map<ProjectCacheKey, Map<String, String>> cache = null;
        VersionState versionState = null;
        boolean doAutoVersion = true;

        switch (versionType)
        {
            case RELEASE:
View Full Code Here

Examples of com.atlassian.maven.plugins.jgitflow.VersionState

        try
        {
            JGitFlow flow = jGitFlowProvider.gitFlow();
            ReleaseContext ctx = contextProvider.getContext();

            VersionState initialVersionState = null;
            ProjectCacheKey cacheKey = null;

            switch (branchType)
            {
                case RELEASE:
View Full Code Here

Examples of io.fabric8.api.mxbean.VersionState

        Profile prfB = ProfileBuilder.Factory.create("1.0", "prfB").addParent("prfA").getProfile();
        version10 = VersionBuilder.Factory.create("1.0").addProfiles(Arrays.asList(prfA, prfB)).getVersion();

        ProfileManagement impl = Mockito.mock(ProfileManagement.class);
        Mockito.when(impl.getVersions()).thenReturn(Arrays.asList("1.0"));
        Mockito.when(impl.getVersion("1.0")).thenReturn(new VersionState(version10));
        Mockito.when(impl.getProfile("1.0", "prfA")).thenReturn(new ProfileState(prfA));
        Mockito.when(impl.getProfile("1.0", "prfB")).thenReturn(new ProfileState(prfB));
       
        server = ManagementFactory.getPlatformMBeanServer();
        StandardMBean mxbean = new StandardMBean(impl, ProfileManagement.class, true);
View Full Code Here

Examples of io.fabric8.api.mxbean.VersionState

        Assert.assertEquals("1.0", versions.get(0));
    }

    @Test
    public void testProxyGetVersion() throws Exception {
        VersionState ver10 = proxy.getVersion("1.0");
        List<String> profiles = ver10.getProfiles();
        Assert.assertEquals(2, profiles.size());
        Assert.assertEquals("prfA", ver10.getProfileState("prfA").getId());
        Assert.assertEquals("prfB", ver10.getProfileState("prfB").getId());
    }
View Full Code Here

Examples of io.fabric8.api.mxbean.VersionState

    }

    @Test
    public void testVersionStateRoundTrip() throws Exception {
        CompositeType ctype = getVersionStateType();
        VersionState ver10 = new VersionState(version10);
        ClassLoader classLoader = ver10.getClass().getClassLoader();
        CompositeData cdata = (CompositeData) OpenTypeGenerator.toOpenData(ctype, ver10);
        VersionState result = (VersionState) OpenTypeGenerator.fromOpenData(ctype, classLoader, cdata);
        Assert.assertEquals(ver10, result);
       
        Object json = JSONTypeGenerator.toJSON(cdata);
        cdata = (CompositeData) JSONTypeGenerator.toOpenData(ctype, classLoader, json);
        result = (VersionState) OpenTypeGenerator.fromOpenData(ctype, classLoader, cdata);
View Full Code Here

Examples of io.fabric8.api.mxbean.VersionState

    public void testGetVersion() throws Exception {
       
        // [FABRIC-1172] Jolokia exec operations fail on WildFly
        Assume.assumeFalse(getRuntimeType() == RuntimeType.WILDFLY);
       
        VersionState v10 = getProxy().getVersion("1.0");
        Assert.assertEquals("1.0", v10.getId());
        Assert.assertTrue("Expected empty, but was" + v10.getAttributes(), v10.getAttributes().isEmpty());
        List<String> profiles = v10.getProfiles();
        Assert.assertTrue(profiles.contains("default"));
        Assert.assertTrue(profiles.contains("fabric"));
    }
View Full Code Here

Examples of io.fabric8.api.mxbean.VersionState

        Assume.assumeFalse(getRuntimeType() == RuntimeType.WILDFLY);
       
        ProfileBuilder pbA11 = ProfileBuilder.Factory.create("1.1", "prfA");
        Profile prfA = pbA11.addConfiguration("pidA", Collections.singletonMap("keyA", "valA")).getProfile();
        VersionBuilder vb11 = VersionBuilder.Factory.create("1.1").addProfile(prfA);
        VersionState v11 = getProxy().createVersion(new VersionState(vb11.getVersion()));
        try {
            Assert.assertEquals("1.1", v11.getId());
            Assert.assertTrue(v11.getAttributes().isEmpty());
            Assert.assertEquals("valA", v11.getProfileState("prfA").getConfiguration("pidA").get("keyA"));
        } finally {
            getProxy().deleteVersion("1.1");
        }
    }
View Full Code Here

Examples of io.fabric8.api.mxbean.VersionState

        // [FABRIC-1172] Jolokia exec operations fail on WildFly
        Assume.assumeFalse(getRuntimeType() == RuntimeType.WILDFLY);
       
        // [FABRIC-1169] Profile version attributes leak to other versions
        // VersionState v12 = getProxy().createVersion("1.0", "1.2", Collections.singletonMap("keyA", "valA"));
        VersionState v12 = getProxy().createVersionFrom("1.0", "1.2", null);
        try {
            Assert.assertEquals("1.2", v12.getId());
            //Assert.assertEquals("valA", v12.getAttributes().get("keyA"));
            List<String> profiles = v12.getProfiles();
            Assert.assertTrue(profiles.contains("default"));
            Assert.assertTrue(profiles.contains("fabric"));
        } finally {
            getProxy().deleteVersion("1.2");
        }
View Full Code Here

Examples of io.fabric8.api.mxbean.VersionState

public final class ProfileManagementImpl implements ProfileManagement {

    @Override
    public VersionState createVersion(VersionState versionState) {
        Version version = getProfileManager().createVersion(versionState.toVersion());
        return new VersionState(version);
    }
View Full Code Here

Examples of io.fabric8.api.mxbean.VersionState

    }

    @Override
    public VersionState createVersionFrom(String sourceId, String targetId, Map<String, String> attributes) {
        Version version = getProfileManager().createVersionFrom(sourceId, targetId, attributes);
        return new VersionState(version);
    }
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.