Package org.apache.axis2.description

Examples of org.apache.axis2.description.Version


    }

    public void testModuleParameterUpdate() throws Exception {
        AxisModule am = new AxisModule();
        am.setName("Module1");
        Version v = new Version("1.0");
        am.setVersion(v);
        pf.getModulePM().handleNewModuleAddition(am, "Module1", "1.0");

        Parameter parm = new Parameter();
        parm.setName("TestParam");
View Full Code Here


    }

    public void testRemoveModule() throws Exception {
        AxisModule am = new AxisModule();
        am.setName("DModule");
        am.setVersion(new Version("1.0"));
        pf.getModulePM().handleNewModuleAddition(am, "DModule", "1.0");

        pf.getModulePM().removeModule(am);
        String modulePath = RegistryResources.MODULES + "DModule" + File.separator + "1.0";
        assertFalse(configRegistry.resourceExists(modulePath));
View Full Code Here

        asvGroup.setServiceGroupName("testAsvG");
        AxisService asv = new AxisService("testAsv");
        asvGroup.addService(asv);
        AxisModule am = new AxisModule();
        am.setName("Module2");
        Version v = new Version("1.0");
        am.setVersion(v);
        pf.getServiceGroupPM().handleNewServiceGroupAddition(asvGroup);
        pf.getServicePM().handleNewServiceAddition(asv);
        pf.getModulePM().handleNewModuleAddition(am, "Module2", "1.0");
        asv.engageModule(am);
View Full Code Here

        assertNotNull(path);
    }

    public void testGetResourcePath3() throws Exception {
        AxisModule am = new AxisModule();
        Version v = new Version("1.0");
        am.setVersion(v);
        am.setName("Module1");
        pf.getModulePM().handleNewModuleAddition(am, "Module1", "1.0");
        String modulePath = RegistryResources.MODULES + "Module1" + "/" + "1.0" + "/";
        String path = PersistenceUtils.getResourcePath(am) + "/";
View Full Code Here

            } else if (versionSplit.length == 1) {
                moduleVersion = versionSplit[0];
            }

            try {
                axismodule.setVersion(new Version(moduleVersion));
            } catch (Exception e) {
                String msg = "Error while setting the version " + moduleVersion + " for the " +
                        "module : " + axismodule.getName();
                log.error(msg);
                throw new AxisFault(msg, e);
View Full Code Here

            module.setModuleClassLoader(deploymentClassLoader);
            module.setParent(axisConfiguration);

            if (module.getName() == null) {
                module.setName("rampart-1.4");
                module.setVersion(new Version("1.4"));
            }
           
            populateModule(axis2ConfigContext, module, rampartURL);
            module.setFileName(rampartURL);
           
View Full Code Here

        Iterator allModules = modules.values().iterator();
        Map<String,Version> defaultModules = new HashMap<String,Version>();
        while (allModules.hasNext()) {
            AxisModule axisModule = (AxisModule) allModules.next();
            String name = axisModule.getName();
            Version currentDefaultVersion = defaultModules.get(name);
            Version version = axisModule.getVersion();
            if (currentDefaultVersion == null ||
                    (version != null && version.compareTo(currentDefaultVersion) > 0)) {
                defaultModules.put(name, version);
            }
        }
        Iterator def_mod_itr = defaultModules.keySet().iterator();
        while (def_mod_itr.hasNext()) {
            String moduleName = (String) def_mod_itr.next();
            Version version = defaultModules.get(moduleName);
            axisConfig.addDefaultModuleVersion(moduleName, version == null ? null : version.toString());
        }
    }
View Full Code Here

        // check whether the module version paramter is there , if so set the module version as that
        Parameter versionParameter = module.getParameter(org.apache.axis2.Constants.MODULE_VERSION);
        if (versionParameter !=null ) {
            String version = (String) versionParameter.getValue();
            try {
                module.setVersion(new Version(version));
            } catch (ParseException ex) {
                throw new AxisFault("The version number '" + version + "' specified by the "
                        + org.apache.axis2.Constants.MODULE_VERSION + " parameter is invalid");
            }
        }
View Full Code Here

        Iterator allModules = modules.values().iterator();
        Map<String,Version> defaultModules = new HashMap<String,Version>();
        while (allModules.hasNext()) {
            AxisModule axisModule = (AxisModule) allModules.next();
            String name = axisModule.getName();
            Version currentDefaultVersion = defaultModules.get(name);
            Version version = axisModule.getVersion();
            if (currentDefaultVersion == null ||
                    (version != null && version.compareTo(currentDefaultVersion) > 0)) {
                defaultModules.put(name, version);
            }
        }
        Iterator def_mod_itr = defaultModules.keySet().iterator();
        while (def_mod_itr.hasNext()) {
            String moduleName = (String) def_mod_itr.next();
            Version version = defaultModules.get(moduleName);
            axisConfig.addDefaultModuleVersion(moduleName, version == null ? null : version.toString());
        }
    }
View Full Code Here

        // check whether the module version paramter is there , if so set the module version as that
        Parameter versionParameter = module.getParameter(org.apache.axis2.Constants.MODULE_VERSION);
        if (versionParameter !=null ) {
            String version = (String) versionParameter.getValue();
            try {
                module.setVersion(new Version(version));
            } catch (ParseException ex) {
                throw new AxisFault("The version number '" + version + "' specified by the "
                        + org.apache.axis2.Constants.MODULE_VERSION + " parameter is invalid");
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.Version

Copyright © 2018 www.massapicom. 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.