updated APIs after first review. Added comments to all API for proposed behaviour
authortimkelly
Fri, 21 May 2010 12:08:04 -0500
changeset 1386 ea54f91365dc
parent 1385 e626d1981906
child 1387 6bbbd96c7adf
updated APIs after first review. Added comments to all API for proposed behaviour
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2ConfigData.java
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2ConfigPreprocessorInfo.java
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2QueryData.java
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2ConfigData.java
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2QueryData.java
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2QueryUtils.java
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java	Fri May 21 09:12:07 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/SBSv2QueryTests.java	Fri May 21 12:08:04 2010 -0500
@@ -81,29 +81,31 @@
 		}
 		System.out.println("Time for testQueryProductsFromSDKs(): " + getTimingStats());
 		
-		List<ISBSv2ConfigData> baseConfigs = sbsAliasBaseQuery.getBaseSBSConfigurations();
+		HashMap<String, ISBSv2ConfigData> baseConfigs = sbsAliasBaseQuery.getBaseSBSConfigurations();
 		
-		for (ISBSv2ConfigData config : baseConfigs){
-			assertTrue("Configuration should be true : " + config.toString(), config.isBaseConfig());
+		for (String aliasKey : baseConfigs.keySet()){
+			ISBSv2ConfigData config = baseConfigs.get(aliasKey);
+			boolean isBaseConfig = config.getSupportingSDK() == null ? true : false;
+			assertTrue("Configuration should be true : " + config.toString(), isBaseConfig);
 		}
 		assertEquals(18, baseConfigs.size());
 		
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias("armv5_udeb"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias("armv5_urel"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias("winscw_udeb"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias("winscw_urel"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias("armv5_urel_gcce4_4_1"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias("armv5_udeb_gcce4_4_1"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias(null, "armv5_udeb"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias(null, "armv5_urel"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias(null, "winscw_udeb"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias(null, "winscw_urel"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias(null, "armv5_urel_gcce4_4_1"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByAlias(null, "armv5_udeb_gcce4_4_1"));
 		
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning("arm.v5.udeb.rvct2_2"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning("arm.v5.urel.rvct2_2"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning("winscw_base.winscw_debug"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning("winscw_base.winscw_release"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning("arm.v5.urel.gcce4_4_1"));
-		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning("arm.v5.udeb.gcce4_4_1"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning(null, "arm.v5.udeb.rvct2_2"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning(null, "arm.v5.urel.rvct2_2"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning(null, "winscw_base.winscw_debug"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning(null, "winscw_base.winscw_release"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning(null, "arm.v5.urel.gcce4_4_1"));
+		assertNotNull(sbsAliasBaseQuery.getSBSConfigByMeaning(null, "arm.v5.udeb.gcce4_4_1"));
 		
-		assertNull(sbsAliasBaseQuery.getSBSConfigByAlias("armv5_udeb.foobar"));
-		assertNull(sbsAliasBaseQuery.getSBSConfigByMeaning("arm.v5.udeb.foo.bar"));
+		assertNull(sbsAliasBaseQuery.getSBSConfigByAlias(null, "armv5_udeb.foobar"));
+		assertNull(sbsAliasBaseQuery.getSBSConfigByMeaning(null, "arm.v5.udeb.foo.bar"));
 		
 		// Get the Raptor configs that are defined in an SDK
 		ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(SDK_ID1, false);
@@ -126,14 +128,20 @@
 
 		startTime = System.currentTimeMillis();
 		
-		ISBSv2ConfigData config = sbsAliasBaseQuery.getSBSConfigByAlias("armv5_udeb");
+		ISBSv2ConfigData config = sbsAliasBaseQuery.getSBSConfigByAlias(null,  "armv5_udeb");
 		assertNotNull(config);
 		assertEquals("/epoc32/release/armv5/udeb", config.getReleaseDirectory(null));
 		assertEquals("armv5", config.getTraditionalPlatform(null));
 		assertEquals("udeb", config.getTraditionalTarget(null));
 		
-		config = sbsAliasBaseQuery.getSBSConfigByAlias("armv5_udeb_gcce");
-		assertNotNull(config);
+		config = sbsAliasBaseQuery.getSBSConfigByAlias(null, "armv5_udeb_gcce");
+		assertNull(config); // This config should only be defined by SDK suppliers
+		
+		ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(SDK_ID1, false);
+		assertNotNull("Missing SDK on your system: " + SDK_ID1, sdk);
+		config = sbsAliasBaseQuery.getSBSConfigByAlias(sdk, "armv5_udeb_gcce");
+		assertNotNull(config); // This config should only be defined by SDK suppliers
+		
 		// TODO: This should fail if 'SBS_GCCE432BIN is not set
 		// So we should have one test that will fail with known error message
 		// and another that will pass when an env var is set correctly.
@@ -163,6 +171,10 @@
 		
 		assertEquals(2, releaseMap.size());
 		
+		ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(SDK_ID1, false);
+		assertNotNull("Missing SDK on your system: " + SDK_ID1, sdk);
+		releaseMap = SBSv2QueryUtils.queryConfigTargetInfo(aliasOrMeaningArray , sdk);
+		assertEquals(2, releaseMap.size());
 //		String queryResult = getSBSQueryOutput(argList, null);
 //		assertTrue("No output found from " + SBSv2QueryUtils.QUERY_CONFIG_COMMAND, queryResult.length() > 0);
 //		
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2ConfigData.java	Fri May 21 09:12:07 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2ConfigData.java	Fri May 21 12:08:04 2010 -0500
@@ -1,31 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Test the BldInfViewPathHelper class.
+*
+*/
 package com.nokia.carbide.cdt.builder.test.sandbox;
 
-import java.util.List;
-
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 
-/** Data that describes the meaning of a single build configuration */
+/** 
+ * Data that describes the meaning of a single build configuration, as discovered by SBS
+ *  
+ *  @noimplement
+ */
 public interface ISBSv2ConfigData {
 
+	/**
+	 * Get the usable SBS build alias that can be used for the -c parameter
+	 * @return the unique build alias
+	 */
 	String getBuildAlias();
 	
+	/**
+	 * Get the meaning (aka dotted name, component name) fo the build alias. 
+	 * Can also be used as a -c argument in SBS
+	 * @return the meaning
+	 */
 	String getMeaning();
 	
+	/**
+	 * Get the directory for a given SDK where binaries are output
+	 * @param sdk - use null if for base configuration
+	 * @return the portable OS string starting from /epoc32/
+	 */
 	String getReleaseDirectory(ISymbianSDK sdk);
 	
+	/** 
+	 * TODO: This API is not yet defined.
+	 * @param sdk
+	 * @return
+	 */
 	ISBSv2ConfigPreprocessorInfo getBuildData(ISymbianSDK sdk);
 	
+	/**
+	 * Get the name of the folder where executable binaries are written (typically 'debug' or 'release')
+	 * @param sdk - use null for base configuration
+	 * @return string of folder name
+	 */
 	String getTraditionalTarget(ISymbianSDK sdk);
 	
+	/**
+	 * Get the name of the folder where executable binaries are written (component before the target)
+	 * @param sdk - use null for base configuration
+	 * @return string of folder name
+	 */
 	String getTraditionalPlatform(ISymbianSDK sdk);
 	
-	List<ISymbianSDK> getSupportedSDKs();
-	
-	void addSupportedSDK(ISymbianSDK sdk);
+	/**
+	 * Get the SDK for which this configuration was qeuried.
+	 * @return the SDK, or null if it's a base sbs configuration
+	 */
+	ISymbianSDK getSupportingSDK();
 	
-	/**
-	 * Is this configuration supported by the base Raptor install?
-	 * @return 
-	 */
-	boolean isBaseConfig();
 }
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2ConfigPreprocessorInfo.java	Fri May 21 09:12:07 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2ConfigPreprocessorInfo.java	Fri May 21 12:08:04 2010 -0500
@@ -1,9 +1,31 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Test the BldInfViewPathHelper class.
+*
+*/
 package com.nokia.carbide.cdt.builder.test.sandbox;
 
 import java.util.List;
 
 import org.eclipse.core.runtime.IPath;
 
+/**
+ * TODO: This API is not yet developed
+ * 
+ * @noimplement
+ */
 public interface ISBSv2ConfigPreprocessorInfo {
 
 	List<String> getMacroList();
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2QueryData.java	Fri May 21 09:12:07 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/ISBSv2QueryData.java	Fri May 21 12:08:04 2010 -0500
@@ -1,24 +1,95 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Test the BldInfViewPathHelper class.
+*
+*/
 package com.nokia.carbide.cdt.builder.test.sandbox;
 
+import java.util.HashMap;
 import java.util.List;
 
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 
+/**
+ * Interface that wraps all queries to the Symbian Build System (SBSv2/Raptor)
+ * 
+ * @noimplement
+ */
 public interface ISBSv2QueryData {
-
-	void addConfigurationData(ISBSv2ConfigData configData);
+	
+	/**
+	 * For given SDK, add an SBS build configuration
+	 * @param sdk - use null if base SBS data
+	 * @param configData - The configuration to add
+	 */
+	void addConfigurationData(ISymbianSDK sdk, ISBSv2ConfigData configData);
 	
+	/**
+	 * Get all usable SBS configurations for a given SDK, which is the union of
+	 * the SBS base configurations and SDK specific configurations.
+	 * @param sdk - should not be null
+	 * @return -The list of all usable SBS build configurations
+	 * @see {@link ISBSv2QueryData#getSDKSpecificConfigData(ISymbianSDK)}
+	 * @see {@link ISBSv2QueryData#getBaseSBSConfigurations()}
+	 */
 	List<ISBSv2ConfigData> getAllConfigurationsForSDK(ISymbianSDK sdk);
 	
+	/**
+	 * Get the SBS configurations that are defined only by the SDK.
+	 * This does not include configurations that have altered meanings,
+	 * rather they provide a new unique build alias that is not defined in the base SBS installation.
+	 * @param sdk - never null
+	 * @return The unique SBS configurations to a given SDK. An empty list of none.
+	 */
 	List<ISBSv2ConfigData> getSDKSpecificConfigData(ISymbianSDK sdk);
 	
-	List<ISBSv2ConfigData> getBaseSBSConfigurations();
+	/**
+	 * Get the map of build alias to sbs configuration data that Raptor defines
+	 * without input from any SDK
+	 * @return a HashMap of SBS build alias to configuration data
+	 */
+	HashMap<String, ISBSv2ConfigData> getBaseSBSConfigurations();
 	
+	/**
+	 * Get the product variant list for a given SDK
+	 * @param sdk - The SDK, should not be null
+	 * @return The list of product variants
+	 */
 	List<String> getProductsForSDK(ISymbianSDK sdk);
 	
+	/**
+	 * Sets the product variant list by the SDK. Products are typically defined
+	 * under /epoc32/sbs_config/variant_configurations.xml
+	 * @param sdk - The SDK, must not be null
+	 * @param products - The list of build variants that can be applied to any build alias or meaning
+	 */
 	void addProductListForSDK(ISymbianSDK sdk, List<String> products);
 
-	ISBSv2ConfigData getSBSConfigByAlias(String aliase);
+	/**
+	 * Find SBS configuration data for a single build configuration.
+	 * @param sdk - The SDK that contains the build configuration. Null for a base configuration
+	 * @param string - The build alias (e.g. armv5_udeb)
+	 * @return SBS configuration data, or null if not found
+	 */
+	ISBSv2ConfigData getSBSConfigByAlias(ISymbianSDK sdk, String alias);
 
-	ISBSv2ConfigData getSBSConfigByMeaning(String string);
+	/**
+	 * Find SBS configuration data for a single build configuration.
+	 * @param sdk - The SDK that contains the build configuration. Null for a base configuration
+	 * @param string - The build meaning or dotted name (e.g. arm.v5.udeb.rvct2_2)
+	 * @return SBS configuration data, or null if not found
+	 */
+	ISBSv2ConfigData getSBSConfigByMeaning(ISymbianSDK sdk, String meaning);
 }
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2ConfigData.java	Fri May 21 09:12:07 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2ConfigData.java	Fri May 21 12:08:04 2010 -0500
@@ -1,3 +1,20 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Test the BldInfViewPathHelper class.
+*
+*/
 package com.nokia.carbide.cdt.builder.test.sandbox;
 
 import java.util.ArrayList;
@@ -11,6 +28,9 @@
 
 public class SBSv2ConfigData implements ISBSv2ConfigData {
 
+	/** The supporting SDK. May be null if it's a base configuration */
+	ISymbianSDK sdk;
+	
 	/**
 	 * A unique build alias. There can only be one alias definition, but an SDK can change the meaning of the alias 
 	 */
@@ -24,18 +44,12 @@
 	String platform = null;
 	String releaseDirectory = null;
 	
-	/** A configuration that was discovered without using a valid EPOCROOT during an sbs query */
-	private boolean isBaseConfig;
-	List<ISymbianSDK> supportedSDKs = new ArrayList<ISymbianSDK>();
-	
 	public SBSv2ConfigData(String buildAlias, String meaning, ISymbianSDK sdk){
 		this.buildAlias = buildAlias;
 		this.meaning = meaning;
 		if (sdk != null){
-			supportedSDKs.add(sdk);
-		} else {
-			this.isBaseConfig = true; 
-		}
+			this.sdk = sdk;
+		} 
 	}
 
 	@Override
@@ -45,10 +59,6 @@
 
 	@Override
 	public String getMeaning() {
-		// TODO: What do you do if the meaning is different for another SDK?
-		// We need to figure out when there is a meaning conflict, and when to resolve it
-		// A different meaning can mean different output directory and dotted names,
-		// potentially different indexer data
 		return meaning;
 	}
 
@@ -109,23 +119,14 @@
 		return platform;
 	}
 
-	@Override
-	public List<ISymbianSDK> getSupportedSDKs() {
-		return supportedSDKs;
-	}
-
-	@Override
-	public void addSupportedSDK(ISymbianSDK sdk) {
-		supportedSDKs.add(sdk);
-	}
-
-	@Override
-	public boolean isBaseConfig() {
-		return isBaseConfig;
-	}
-	
 	public String toString(){
 		return "Alias = " + buildAlias + " : Meaning = " + meaning;
 	}
 
+	@Override
+	public ISymbianSDK getSupportingSDK() {
+		return sdk;
+	}
+	
+
 }
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2QueryData.java	Fri May 21 09:12:07 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2QueryData.java	Fri May 21 12:08:04 2010 -0500
@@ -1,3 +1,20 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Test the BldInfViewPathHelper class.
+*
+*/
 package com.nokia.carbide.cdt.builder.test.sandbox;
 
 import java.util.ArrayList;
@@ -8,70 +25,62 @@
 
 public class SBSv2QueryData implements ISBSv2QueryData {
 
-	
-	/** alias ==> build config data Map*/
-	HashMap<String, ISBSv2ConfigData> sbsBuildConfigMap = new HashMap<String, ISBSv2ConfigData>();
+	/** alias to ISBSv2ConfigData - These are the standard build configs defined by Raptor, and are treated as virtual by this API */
+	HashMap<String, ISBSv2ConfigData> baseSBSConfigs = new HashMap<String, ISBSv2ConfigData>();
+	/** SDK ==> ISBSv2ConfigData : Contains all the SBS configs particular to a single SDK */
+	HashMap<ISymbianSDK, List<ISBSv2ConfigData>> sbsSDKBuildConfigMap = new HashMap<ISymbianSDK, List<ISBSv2ConfigData>>();
 	HashMap<ISymbianSDK, List<String>> sdkProductVariantList = new HashMap<ISymbianSDK, List<String>>();
 	
 	@Override
-	public void addConfigurationData(ISBSv2ConfigData configData) {
+	public void addConfigurationData(ISymbianSDK sdk, ISBSv2ConfigData configData) {
+		
+		if (sdk == null){
+			baseSBSConfigs.put(configData.getBuildAlias(), configData);
+		}
+		
+		List<ISBSv2ConfigData> configDataForSDK = sbsSDKBuildConfigMap.get(sdk);
 		
-		String buildAlias = configData.getBuildAlias();
-		if (null == sbsBuildConfigMap.get(buildAlias)){
-			sbsBuildConfigMap.put(buildAlias, configData);
-		} else  {
-			// build alias already exists, just add it as a supported SDK
-			ISBSv2ConfigData updateConfig = sbsBuildConfigMap.get(buildAlias);
-			for (ISymbianSDK sdk : configData.getSupportedSDKs()){
-				// Add to the list of already supported SDKs, if any
-				updateConfig.addSupportedSDK(sdk);
-			}
-			sbsBuildConfigMap.put(buildAlias, updateConfig);
+		if (configDataForSDK == null){
+			// This SDK does not exist, create the first entry
+			configDataForSDK = new ArrayList<ISBSv2ConfigData>();
+			configDataForSDK.add(configData);
+			sbsSDKBuildConfigMap.put(sdk, configDataForSDK);
+			return;
 		}
+		
+		configDataForSDK.add(configData);
 	}
 
 	@Override
-	public List<ISBSv2ConfigData> getBaseSBSConfigurations() {
-		List<ISBSv2ConfigData> baseSBSConfigs = new ArrayList<ISBSv2ConfigData>();
-		
-		// get all the base configurations...
-		for (String key : sbsBuildConfigMap.keySet()) {
-			ISBSv2ConfigData configData = sbsBuildConfigMap.get(key);
-			if (configData.isBaseConfig()) {
-				baseSBSConfigs.add(configData);
-			}
-		}
-		
+	public HashMap<String, ISBSv2ConfigData> getBaseSBSConfigurations() {
 		return baseSBSConfigs;
 	}
 	
 	@Override
 	public List<ISBSv2ConfigData> getSDKSpecificConfigData(ISymbianSDK sdk) {
-		List<ISBSv2ConfigData> configsForSDK = new ArrayList<ISBSv2ConfigData>();
+		List<ISBSv2ConfigData> sdkDefinedConfigs =  new ArrayList<ISBSv2ConfigData>();
 		
-		// get all the base configurations...
-		for (String key : sbsBuildConfigMap.keySet()) {
-			ISBSv2ConfigData configData = sbsBuildConfigMap.get(key);
-			if (configData.isBaseConfig()) {
-				continue;
-			}
-			// Not a Raptor-defined config, see if the SDK defined it
-			if (sdk != null){
-				if (configData.getSupportedSDKs().contains(sdk)){
-					configsForSDK.add(configData);
+		for (ISBSv2ConfigData oneConfig : sbsSDKBuildConfigMap.get(sdk)){
+			// check if the alias is already in the base list, if not add it
+			boolean addConfigForReturn = true;
+			for (String alias : baseSBSConfigs.keySet()){
+				ISBSv2ConfigData baseConfig = baseSBSConfigs.get(alias);
+				if (oneConfig.getBuildAlias().equals(baseConfig.getBuildAlias())){
+					addConfigForReturn = false;
+					break;
 				}
 			}
+			if (addConfigForReturn){
+				sdkDefinedConfigs.add(oneConfig);
+			}
 		}
-		
-		return configsForSDK;
+			
+		return sdkDefinedConfigs;
 	}
 	
 	@Override
 	public List<ISBSv2ConfigData> getAllConfigurationsForSDK(ISymbianSDK sdk) {
-		List<ISBSv2ConfigData> allConfigs = new ArrayList<ISBSv2ConfigData>();
-		allConfigs.addAll(getBaseSBSConfigurations());
-		allConfigs.addAll(getSDKSpecificConfigData(sdk));
-		return allConfigs;
+		return sbsSDKBuildConfigMap.get(sdk);
 	}
 
 	@Override
@@ -86,24 +95,46 @@
 			
 			sdkProductVariantList.put(sdk, products);
 		}
-
 	}
 
 	@Override
-	public ISBSv2ConfigData getSBSConfigByAlias(String alias) {
-		return sbsBuildConfigMap.get(alias);
+	public ISBSv2ConfigData getSBSConfigByAlias(ISymbianSDK sdk, String alias) {
+		
+		if (sdk == null){
+			return baseSBSConfigs.get(alias);
+		} else {
+			List<ISBSv2ConfigData> configListForSDK =  sbsSDKBuildConfigMap.get(sdk);
+			
+			for (ISBSv2ConfigData config : configListForSDK){
+				if (config.getBuildAlias().equals(alias)){
+					return config;
+				}
+			}
+		}
+		
+		return null;
 	}
 
 	@Override
-	public ISBSv2ConfigData getSBSConfigByMeaning(String string) {
-		ISBSv2ConfigData configData = null;
-		for (String key : sbsBuildConfigMap.keySet()){
-			if (sbsBuildConfigMap.get(key).getMeaning().equals(string)){
-				return sbsBuildConfigMap.get(key);
+	public ISBSv2ConfigData getSBSConfigByMeaning(ISymbianSDK sdk, String meaning) {
+		if (sdk == null){
+			for (String aliasKey : baseSBSConfigs.keySet()){
+				ISBSv2ConfigData config = baseSBSConfigs.get(aliasKey);
+				if (config.getMeaning().equals(meaning)){
+					return config;
+				}
+			}
+		} else {
+			List<ISBSv2ConfigData> configListForSDK =  sbsSDKBuildConfigMap.get(sdk);
+			
+			for (ISBSv2ConfigData config : configListForSDK){
+				if (config.getMeaning().equals(meaning)){
+					return config;
+				}
 			}
 		}
 		
-		return configData;
+		return null;
 	}
 
 }
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2QueryUtils.java	Fri May 21 09:12:07 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/sandbox/SBSv2QueryUtils.java	Fri May 21 12:08:04 2010 -0500
@@ -1,3 +1,20 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* Test the BldInfViewPathHelper class.
+*
+*/
 package com.nokia.carbide.cdt.builder.test.sandbox;
 
 import java.io.BufferedReader;
@@ -53,7 +70,7 @@
 		for (String aliasKey : sbsAliasMap.keySet()){
 			String meaning = sbsAliasMap.get(aliasKey);
 			SBSv2ConfigData oneSBSConfig = new SBSv2ConfigData(aliasKey, meaning, null);
-			sbsQueryData.addConfigurationData(oneSBSConfig);
+			sbsQueryData.addConfigurationData(null, oneSBSConfig);
 		}
 		
 		/////// Do for each SDK to build up the alias list...
@@ -75,7 +92,7 @@
 			for (String aliasKey : sbsAliasMap.keySet()){
 				String meaning = sbsAliasMap.get(aliasKey);
 				SBSv2ConfigData oneSBSConfig = new SBSv2ConfigData(aliasKey, meaning, sdk);
-				sbsQueryData.addConfigurationData(oneSBSConfig);
+				sbsQueryData.addConfigurationData(sdk, oneSBSConfig);
 			}
 			
 			// Now get the products for each SDK