public static String getConfigId()

in plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoUtils.java [156:214]


    public static String getConfigId(IModule module) throws Exception {
        Trace.tracePoint("ENTRY", Activator.traceCore, "GeronimoUtils.getConfigId", module);

        Environment environment = null;
        if (isWebModule(module)) {
            JAXBElement<WebApp> element = getWebDeploymentPlan(module);
            if (element != null) {
                WebApp plan = element.getValue();
                if (plan != null)
                    environment = plan.getEnvironment();
            }
        } else if (isEjbJarModule(module)) {
            JAXBElement<OpenejbJar> element = getOpenEjbDeploymentPlan(module);
            if (element != null) {
                OpenejbJar plan = element.getValue();
                if (plan != null)
                    environment = plan.getEnvironment();
            }
        } else if (isEarModule(module)) {
            JAXBElement<Application> element = getApplicationDeploymentPlan(module);
            if (element != null) {
                Application plan = element.getValue();
                if (plan != null)
                    environment = plan.getEnvironment();
            }
        } else if (isRARModule(module)) {
            JAXBElement<Connector> element = getConnectorDeploymentPlan(module);
            if (element != null) {
                Connector plan = element.getValue();
                if (plan != null)
                    environment = plan.getEnvironment();
            }
        }

        if (environment != null && environment.getModuleId() != null) {
            String id = getQualifiedConfigID(environment.getModuleId());
            Trace.tracePoint("EXIT", Activator.traceCore, "GeronimoUtils.getConfigId", id);
            return id;
        }

        if (AriesHelper.isAriesInstalled()) {
            try {
                if (isEBAModule(module)) {
                    AriesHelper.BundleInfo appInfo = AriesHelper.getApplicationBundleInfo(module.getProject());
                    if (appInfo != null) {
                        String id = getQualifiedConfigID(OsgiConstants.APPLICATION_ARTIFACT_GROUP, appInfo.getSymbolicName(), appInfo.getMvnVersion(), OsgiConstants.APPLICATION_ARTIFACT_TYPE);
                        Trace.tracePoint("EXIT", Activator.traceCore, "GeronimoUtils.getConfigId", id);
                        return id;
                    }
                }
            } catch (Exception e) {
                // ignore
            }
        }

        String id = getId(module);
        Trace.tracePoint("EXIT", Activator.traceCore, "GeronimoUtils.getConfigId", id);
        return id;
    }