You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by tu...@apache.org on 2015/11/03 12:25:23 UTC

[01/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-17 d511979ef -> a38795e82


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTests.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTests.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTests.java
new file mode 100644
index 0000000..21c14d5
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseAutomatedTests.java
@@ -0,0 +1,1439 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+/**
+* This test class contains automated tests for Pulse application related to
+* 1. Different grid data validations for example - Topology, Server Group, Redundancy Zone
+* 2. Data Browser
+* 3. 
+* 
+*
+* @author  Smita Phad
+* @version 1.0
+* @since   2014-04-02
+*/
+
+package com.vmware.gemfire.tools.pulse.tests;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
+import java.util.TreeMap;
+
+import junit.framework.Assert;
+
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.interactions.Actions;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+class PulseBaseTests extends PulseTests {
+	WebElement element = null;
+	public static int maxWaitTime = 20;
+
+	public WebElement findElementUsingId(String id) {
+		return driver.findElement(By.id(id));
+	}
+	public WebElement findElementUsingXpath(String xpath) {
+		return driver.findElement(By.xpath(xpath));
+	}
+
+	public void clickElementUsingId(String id) {
+		findElementUsingId(id).click();
+	}
+
+	public void clickElementUsingXpath(String xpath) {
+		findElementUsingXpath(xpath).click();
+	}
+
+	public void enterTextUsingId(String id, String textToEnter) {
+		findElementUsingId(id).sendKeys(textToEnter);
+
+	}
+
+	public void enterTextUsingXpath(String xpath, String textToEnter) {
+		findElementUsingXpath(xpath).sendKeys(textToEnter);
+	}
+
+	public String getValueFromPropertiesFile(String key) {
+		return JMXProperties.getInstance().getProperty(key);
+	}
+	
+	public void sendKeysUsingId(String Id, String textToEnter){
+		findElementById(Id).sendKeys(textToEnter);
+	}
+
+	public void waitForElement(WebElement element) {
+		driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);
+		WebDriverWait wait = new WebDriverWait(driver, 20);
+		wait.until(ExpectedConditions.visibilityOf(element));
+	}
+
+	public WebElement findElementById(String id) {
+		return driver.findElement(By.id(id));
+	}
+
+	public WebElement findElementByXpath(String xpath) {
+		return driver.findElement(By.xpath(xpath));
+	}
+
+	public String getTextUsingXpath(String xpath) {
+		return findElementByXpath(xpath).getText();
+	}
+
+	public String getTextUsingId(String id) {
+		return findElementById(id).getText();
+	}
+
+	public String getPersistanceEnabled(Region r) {
+		String persitance = null;
+
+		if (r.getPersistentEnabled()) {
+			persitance = "ON";
+		} else if (!r.getPersistentEnabled()) {
+			persitance = "OFF";
+		}
+		return persitance;
+	}
+
+	public String getPersistanceEnabled(String trueOrFalse) {
+		String persitance = null;
+
+		if (trueOrFalse.contains("true")) {
+			persitance = "ON";
+		} else if (trueOrFalse.contains("false")) {
+			persitance = "OFF";
+		}
+		return persitance;
+	}
+
+	public String HeapUsage(String valueInKB) {
+
+		return null;
+	}
+
+	// WIP - need to work on this --
+	public HashMap<String, HashMap<String, Region>> getRegionDetailsFromUI(String regionName) {
+
+		String[] regionNames = JMXProperties.getInstance().getProperty("regions").split(" ");
+		HashMap<String, HashMap<String, Region>> regionUiMap = new HashMap<String, HashMap<String, Region>>();
+
+		for (String region : regionNames) {
+			HashMap<String, Region> regionMap = regionUiMap.get(region);
+		}
+
+		return regionUiMap;
+	}
+
+	public void validateServerGroupGridData() {
+		List<WebElement> serverGridRows = driver.findElements(By.xpath("//table[@id='memberListSG']/tbody/tr"));
+		int rowsCount = serverGridRows.size();
+		System.out.println(rowsCount);
+		String[][] gridDataFromUI = new String[rowsCount][7];
+
+		for (int j = 2, x = 0; j <= serverGridRows.size(); j++, x++) {
+			for (int i = 0; i <= 6; i++) {
+				gridDataFromUI[x][i] = driver.findElement(
+						By.xpath("//table[@id='memberListSG']/tbody/tr[" + j + "]/td[" + (i + 1) + "]")).getText();
+			}
+		}
+
+		String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
+		HashMap<String, HashMap<String, Member>> sgMap = new HashMap<String, HashMap<String, Member>>();
+
+		for (String member : memberNames) {
+			Member thisMember = new Member(member);
+			String[] sgs = thisMember.getGroups();
+
+			for (String sgName : sgs) {
+				HashMap<String, Member> sgMembers = sgMap.get(sgName);
+				if (sgMembers == null) {
+					sgMembers = new HashMap<String, Member>();
+					sgMap.put(sgName, sgMembers);
+				}
+				sgMembers.put(thisMember.getMember(), thisMember);
+			}
+		}
+
+		for (int i = 0; i < gridDataFromUI.length - 1; i++) {
+			String sgName = gridDataFromUI[i][0];
+			String memName = gridDataFromUI[i][1];
+			Member m = sgMap.get(sgName).get(memName);
+
+			Assert.assertEquals(sgName, gridDataFromUI[i][0]);
+			Assert.assertEquals(memName, gridDataFromUI[i][1]);
+			Assert.assertEquals(m.getMember(), gridDataFromUI[i][2]);
+			Assert.assertEquals(m.getHost(), gridDataFromUI[i][3]);
+			String cupUsage = String.valueOf(m.getCpuUsage());
+			Assert.assertEquals(cupUsage, gridDataFromUI[i][5]);
+		}
+
+	}
+
+	public void validateRedundancyZonesGridData() {
+		List<WebElement> rzGridRows = driver.findElements(By.xpath("//table[@id='memberListRZ']/tbody/tr"));
+		int rowsCount = rzGridRows.size();
+		System.out.println(rowsCount);
+		String[][] gridDataFromUI = new String[rowsCount][7];
+
+		for (int j = 2, x = 0; j <= rzGridRows.size(); j++, x++) {
+			for (int i = 0; i <= 6; i++) {
+				gridDataFromUI[x][i] = driver.findElement(
+						By.xpath("//table[@id='memberListRZ']/tbody/tr[" + j + "]/td[" + (i + 1) + "]")).getText();
+			}
+		}
+
+		String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
+		HashMap<String, HashMap<String, Member>> rzMap = new HashMap<String, HashMap<String, Member>>();
+
+		for (String member : memberNames) {
+			Member thisMember = new Member(member);
+			//String[] rz = thisMember.getRedundancyZone();
+			String sgName = thisMember.getRedundancyZone();
+
+			//for (String sgName : rz) {
+				HashMap<String, Member> rzMembers = rzMap.get(sgName);
+
+				if (rzMembers == null) {
+					rzMembers = new HashMap<String, Member>();
+					rzMap.put(sgName, rzMembers);
+				}
+
+				rzMembers.put(thisMember.getMember(), thisMember);
+			//}
+		}
+
+		for (int i = 0; i < gridDataFromUI.length - 1; i++) {
+			String sgName = gridDataFromUI[i][0];
+			String memName = gridDataFromUI[i][1];
+			Member m = rzMap.get(sgName).get(memName);
+
+			Assert.assertEquals(sgName, gridDataFromUI[i][0]);
+			Assert.assertEquals(memName, gridDataFromUI[i][1]);
+			Assert.assertEquals(m.getMember(), gridDataFromUI[i][2]);
+			Assert.assertEquals(m.getHost(), gridDataFromUI[i][3]);
+			String cupUsage = String.valueOf(m.getCpuUsage());
+			Assert.assertEquals(cupUsage, gridDataFromUI[i][5]);
+		}
+
+	}
+
+	public void validateTopologyGridData() {
+		List<WebElement> rzGridRows = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
+		int rowsCount = rzGridRows.size();
+		System.out.println(rowsCount);
+		String[][] gridDataFromUI = new String[rowsCount][7];
+
+		for (int j = 2, x = 0; j <= rzGridRows.size(); j++, x++) {
+			for (int i = 0; i <= 6; i++) {
+				gridDataFromUI[x][i] = driver.findElement(
+						By.xpath("//table[@id='memberList']/tbody/tr[" + j + "]/td[" + (i + 1) + "]")).getText();
+			}
+		}
+
+		String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
+		HashMap<String, Member> tpMap = new HashMap<String, Member>();
+
+		for (String member : memberNames) {
+			Member thisMember = new Member(member);
+			tpMap.put(thisMember.getMember(), thisMember);
+
+		}
+
+		for (int i = 0; i < gridDataFromUI.length - 1; i++) {
+
+			String memName = gridDataFromUI[i][0];
+			Member m = tpMap.get(memName);
+
+			Assert.assertEquals(m.getMember(), gridDataFromUI[i][0]);
+			Assert.assertEquals(m.getMember(), gridDataFromUI[i][1]);
+			Assert.assertEquals(m.getHost(), gridDataFromUI[i][2]);
+			String cupUsage = String.valueOf(m.getCpuUsage());
+			Assert.assertEquals(cupUsage, gridDataFromUI[i][4]);
+		}
+	}
+
+	public void validateDataPrespectiveGridData() {
+		List<WebElement> serverGridRows = driver.findElements(By.xpath("//table[@id='regionsList']/tbody/tr"));
+		int rowsCount = serverGridRows.size();
+		System.out.println(rowsCount);
+		String[][] gridDataFromUI = new String[rowsCount][7];
+
+		for (int j = 2, x = 0; j <= serverGridRows.size(); j++, x++) {
+			for (int i = 0; i <= 6; i++) {
+				if (i < 5) {
+					gridDataFromUI[x][i] = driver.findElement(
+							By.xpath("//table[@id='regionsList']/tbody/tr[" + j + "]/td[" + (i + 1) + "]")).getText();
+				} else if (i == 5) {
+					gridDataFromUI[x][i] = driver.findElement(
+							By.xpath("//table[@id='regionsList']/tbody/tr[" + j + "]/td[" + (i + 4) + "]")).getText();
+				}
+			}
+		}
+
+		String[] regionNames = JMXProperties.getInstance().getProperty("regions").split(" ");
+		HashMap<String, Region> dataMap = new HashMap<String, Region>();
+
+		for (String region : regionNames) {
+			Region thisRegion = new Region(region);
+			dataMap.put(thisRegion.getName(), thisRegion);
+
+		}
+
+		for (int i = 0; i < gridDataFromUI.length - 1; i++) {
+			String memName = gridDataFromUI[i][0];
+			Region r = dataMap.get(memName);
+
+			Assert.assertEquals(r.getName(), gridDataFromUI[i][0]);
+			Assert.assertEquals(r.getRegionType(), gridDataFromUI[i][1]);
+
+			Assert.assertEquals(String.valueOf(r.getSystemRegionEntryCount()), gridDataFromUI[i][2]);
+			Assert.assertEquals(r.getFullPath(), gridDataFromUI[i][4]);
+			Assert.assertEquals(getPersistanceEnabled(r), gridDataFromUI[i][5]);
+		}
+	}
+
+	public void validateRegionDetailsGridData() {
+		List<WebElement> serverGridRows = driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
+		int rowsCount = serverGridRows.size();
+		System.out.println(rowsCount);
+		String[][] gridDataFromUI = new String[rowsCount][7];
+
+		for (int j = 2, x = 0; j <= serverGridRows.size(); j++, x++) {
+			for (int i = 0; i < 2; i++) {
+				gridDataFromUI[x][i] = driver.findElement(
+						By.xpath("//table[@id='memberList']/tbody/tr[" + j + "]/td[" + (i + 1) + "]")).getText();
+			}
+		}
+
+		String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
+		HashMap<String, Member> tpMap = new HashMap<String, Member>();
+
+		for (String member : memberNames) {
+			Member thisMember = new Member(member);
+			tpMap.put(thisMember.getMember(), thisMember);
+		}
+
+		for (int i = 0; i < gridDataFromUI.length - 1; i++) {
+
+			String memName = gridDataFromUI[i][0];
+			Member m = tpMap.get(memName);
+			Assert.assertEquals(m.getMember(), gridDataFromUI[i][0]);
+		}
+
+	}
+
+	public void navigateToToplogyView(){
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.radioButtonXpath);
+	}
+	
+	public void navigateToServerGroupGView(){
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.radioButtonXpath);
+	}
+	
+	public void navigateToRedundancyZoneView(){
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.radioButtonXpath);
+	}
+	
+	//  ------ 	Topology / Server Group / Redundancy Group - Tree View
+	
+	public void navigateToTopologyTreeView(){
+		navigateToToplogyView();
+		clickElementUsingId(PulseTestLocators.TopologyView.treeMapButtonId);
+	}
+	
+	public void navigateToServerGroupTreeView() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.radioButtonXpath);
+	}
+	
+	public void navigateToRedundancyZonesTreeView() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.radioButtonXpath);
+	}
+	
+	//  ------ 	Topology / Server Group / Redundancy Group - Grid View
+	
+	public void navigateToTopologyGridView() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.radioButtonXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.gridButtonId);
+	}
+
+	public void navigateToServerGroupGridView() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.radioButtonXpath);
+		clickElementUsingId(PulseTestLocators.ServerGroups.gridButtonId);
+	}
+
+	public void navigateToRedundancyZonesGridView() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.radioButtonXpath);
+		clickElementUsingId(PulseTestLocators.RedundancyZone.gridButtonId);
+	}
+	
+	// ----- Data perspective / region details 
+	
+	public void navigateToDataPrespectiveGridView() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.DataPerspectiveView.downarrowButtonXpath);
+		clickElementUsingXpath(PulseTestLocators.DataPerspectiveView.dataViewButtonXpath);
+		clickElementUsingId(PulseTestLocators.DataPerspectiveView.gridButtonId);
+	}
+
+	public void navigateToRegionDetailsView() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.DataPerspectiveView.downarrowButtonXpath);
+		clickElementUsingXpath(PulseTestLocators.DataPerspectiveView.dataViewButtonXpath);
+		// clickElementUsingXpath(PulseTestLocators.RegionDetailsView.regionNameXpath);
+		// // WIP - region navigation defect needs to fixed
+		clickElementUsingXpath(PulseTestLocators.RegionDetailsView.treeMapCanvasXpath);
+	}
+
+	public void navigateToRegionDetailsGridView() {
+		navigateToRegionDetailsView();
+		clickElementUsingXpath(PulseTestLocators.RegionDetailsView.gridButtonXpath);
+	}
+
+	public String getPropertyValue(String propertyKey) {
+		String propertyValue = JMXProperties.getInstance().getProperty(propertyKey);
+		return propertyValue;
+	}
+
+	public void verifyElementPresentById(String id) {
+		WebDriverWait wait = (WebDriverWait) new WebDriverWait(driver, maxWaitTime, 500);
+		wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.id(id)));
+	}
+	
+	public void verifyElementPresentByLinkText(String lnkText) {
+		WebDriverWait wait = (WebDriverWait) new WebDriverWait(driver, maxWaitTime, 500);
+		wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.linkText(lnkText)));
+	}
+
+	public void verifyElementPresentByXpath(String xpath) {
+		WebDriverWait wait = (WebDriverWait) new WebDriverWait(driver, maxWaitTime, 500);
+		wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.xpath(xpath)));
+	}
+
+	public void verifyTextPresrntById(String id, String text) {
+		WebDriverWait wait = (WebDriverWait) new WebDriverWait(driver, maxWaitTime, 500);
+		wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id(id), text));
+	}
+
+	public void verifyTextPresrntByXpath(String xpath, String text) {
+		WebDriverWait wait = (WebDriverWait) new WebDriverWait(driver, maxWaitTime, 500);
+		wait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath(xpath), text));
+	}
+
+	public void verifyElementAttributeById(String id, String attribute, String value) {
+		String actualValue = findElementById(id).getAttribute(attribute);
+		System.out.println(value);
+		System.out.println(actualValue);
+		Assert.assertTrue(actualValue.equals(value) || actualValue.contains(value));
+	}
+
+	
+	public void mouseReleaseById(String id){
+		verifyElementPresentById(id);
+		Actions action = new Actions(driver);
+		WebElement we = driver.findElement(By.id(id));
+		action.moveToElement(we).release().perform();
+		System.out.println("testing");
+	}
+	public void mouseClickAndHoldOverElementById(String id) {
+		verifyElementPresentById(id);
+		Actions action = new Actions(driver);
+		WebElement we = driver.findElement(By.id(id));
+		action.moveToElement(we).clickAndHold().perform();
+	}
+
+	public void mouseOverElementByXpath(String xpath) {
+		Actions action = new Actions(driver);
+		WebElement we = driver.findElement(By.xpath(xpath));
+		action.moveToElement(we).build().perform();
+	}
+
+	
+	public float stringToFloat(String stringValue){		
+		float floatNum = Float.parseFloat(stringValue);	
+		return floatNum;		
+	}
+	
+	public String floatToString(float floatValue){		
+		String stringValue = Float.toString(floatValue);
+		return stringValue;		
+	}
+	
+	
+	public String[] splitString(String stringToSplit, String splitDelimiter){		
+		String [] stringArray = stringToSplit.split(splitDelimiter);
+		return stringArray;		
+	}
+	
+	public void assertMemberSortingByCpuUsage(){		
+		Map<Float, String> memberMap = new TreeMap<Float,String>(Collections.reverseOrder());		
+		String [] membersNames = splitString(JMXProperties.getInstance().getProperty("members"), " ");
+		for (String member : membersNames) {		
+			Member thisMember = new Member(member);
+			memberMap.put(thisMember.getCpuUsage(), thisMember.getMember());
+		}	
+		for(Map.Entry<Float,String> entry : memberMap.entrySet()) {		
+			//here matching painting style to validation that the members are painted according to their cpu usage			
+			String refMemberCPUUsage = null;
+			if(entry.getValue().equalsIgnoreCase("M1")){
+				refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM1;
+			}else if(entry.getValue().equalsIgnoreCase("M2")){
+				refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM2;
+			}else{
+				refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM3;
+			}			
+			Assert.assertTrue(findElementById(entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));			
+	    } 			
+	}	
+
+	public void assertMemberSortingByHeapUsage(){		
+		Map<Long, String> memberMap = new TreeMap<Long,String>(Collections.reverseOrder());		
+		String [] membersNames = splitString(JMXProperties.getInstance().getProperty("members"), " ");
+		for (String member : membersNames) {		
+			Member thisMember = new Member(member);
+			memberMap.put(thisMember.getCurrentHeapSize(), thisMember.getMember());
+		}	
+		for(Entry<Long, String> entry : memberMap.entrySet()) {		
+			//here matching painting style to validation that the members are painted according to their cpu usage			
+			String refMemberCPUUsage = null;
+			if(entry.getValue().equalsIgnoreCase("M1")){
+				refMemberCPUUsage = PulseTestData.Topology.heapUsagePaintStyleM1;
+			}else if(entry.getValue().equalsIgnoreCase("M2")){
+				refMemberCPUUsage = PulseTestData.Topology.heapUsagePaintStyleM2;
+			}else{
+				refMemberCPUUsage = PulseTestData.Topology.heapUsagePaintStyleM3;
+			}			
+			Assert.assertTrue(findElementById(entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));			
+	    } 			
+	}		
+	
+	public void assertMemberSortingBySGCpuUsage(){		
+		Map<Float, String> memberMap = new TreeMap<Float,String>(Collections.reverseOrder());		
+		String [] membersNames = splitString(JMXProperties.getInstance().getProperty("members"), " ");
+		for (String member : membersNames) {		
+			Member thisMember = new Member(member);
+			memberMap.put(thisMember.getCpuUsage(), thisMember.getMember());
+		}	
+		for(Map.Entry<Float,String> entry : memberMap.entrySet()) {		
+			//here matching painting style to validation that the members are painted according to their cpu usage			
+			String refMemberCPUUsage = null;
+			if(entry.getValue().equalsIgnoreCase("M1")){
+				refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM1;
+			}else if(entry.getValue().equalsIgnoreCase("M2")){
+				refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM2;
+			}else{
+				refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM3;
+			}			
+			Assert.assertTrue(findElementById(entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));			
+	    } 			
+	}	
+	
+	
+	public void assertMemeberSortingBySgHeapUsage(){		
+		String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");		
+		HashMap<String, HashMap<String, Member>> sgMap = new HashMap<String, HashMap<String, Member>>();
+		for (String member : memberNames) {
+			Member thisMember = new Member(member);
+			String[] sgs = thisMember.getGroups();
+
+			for (String sgName : sgs) {
+				HashMap<String, Member> sgMembers = sgMap.get(sgName);
+				if (sgMembers == null) {
+					sgMembers = new HashMap<String, Member>();
+					sgMap.put(sgName, sgMembers);
+				}
+				sgMembers.put(thisMember.getMember(), thisMember);
+			}
+		}
+		Map<Float, String> memberMap = new TreeMap<Float,String>(Collections.reverseOrder());		
+		
+		for(int sgId=1; sgId<=3; sgId++){
+			String sgName = "SG1";
+			String memName = "M" + sgId;				
+			Member m = sgMap.get(sgName).get(memName);
+			memberMap.put((float) m.getCurrentHeapSize(), m.getMember());			
+		}			
+		
+		for(Map.Entry<Float,String> entry : memberMap.entrySet()) {		
+			//here matching painting style to validation that the members are painted according to their cpu usage			
+			String refMemberCPUUsage = null;
+			if(entry.getValue().equalsIgnoreCase("M1")){
+				refMemberCPUUsage = PulseTestData.ServerGroups.heapUsagePaintStyleSG1M1;
+			}else if(entry.getValue().equalsIgnoreCase("M2")){
+				refMemberCPUUsage = PulseTestData.ServerGroups.heapUsagePaintStyleSG1M2;
+			}else{
+				refMemberCPUUsage = PulseTestData.ServerGroups.heapUsagePaintStyleSG1M3;
+			}			
+			Assert.assertTrue(findElementById("SG1(!)"+entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));			
+	    } 	
+	}
+	
+	
+	
+	public void assertMemeberSortingBySgCpuUsage(){		
+		String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");		
+		HashMap<String, HashMap<String, Member>> sgMap = new HashMap<String, HashMap<String, Member>>();
+		for (String member : memberNames) {
+			Member thisMember = new Member(member);
+			String[] sgs = thisMember.getGroups();
+
+			for (String sgName : sgs) {
+				HashMap<String, Member> sgMembers = sgMap.get(sgName);
+				if (sgMembers == null) {
+					sgMembers = new HashMap<String, Member>();
+					sgMap.put(sgName, sgMembers);
+				}
+				sgMembers.put(thisMember.getMember(), thisMember);
+			}
+		}
+		Map<Float, String> memberMap = new TreeMap<Float,String>(Collections.reverseOrder());		
+		//SG3(!)M3		
+		for(int sgId=1; sgId<=3; sgId++){
+			String sgName = "SG1";
+			String memName = "M" + sgId;				
+			Member m = sgMap.get(sgName).get(memName);
+			memberMap.put(m.getCpuUsage(), m.getMember());			
+		}			
+		
+		for(Map.Entry<Float,String> entry : memberMap.entrySet()) {		
+			//here matching painting style to validation that the members are painted according to their cpu usage			
+			String refMemberCPUUsage = null;
+			if(entry.getValue().equalsIgnoreCase("M1")){
+				refMemberCPUUsage = PulseTestData.ServerGroups.cpuUsagePaintStyleSG1M1;
+			}else if(entry.getValue().equalsIgnoreCase("M2")){
+				refMemberCPUUsage = PulseTestData.ServerGroups.cpuUsagePaintStyleSG1M2;
+			}else{
+				refMemberCPUUsage = PulseTestData.ServerGroups.cpuUsagePaintStyleSG1M3;
+			}			
+			Assert.assertTrue(findElementById("SG1(!)"+entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));			
+	    } 	
+	}
+	
+	public void assertMemeberSortingByRzHeapUsage(){		
+		String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");			
+		HashMap<String, HashMap<String, Member>> rzMap = new HashMap<String, HashMap<String, Member>>();
+		for (String member : memberNames) {
+			Member thisMember = new Member(member);
+			String sgName = thisMember.getRedundancyZone();
+				HashMap<String, Member> rzMembers = rzMap.get(sgName);
+				
+				if (rzMembers == null) {
+					rzMembers = new HashMap<String, Member>();
+					rzMap.put(sgName, rzMembers);
+				}
+
+				rzMembers.put(thisMember.getMember(), thisMember);
+		}
+		Map<Float, String> memberMap = new TreeMap<Float,String>(Collections.reverseOrder());
+		String rzName = "RZ1 RZ2";
+		String memName = "M1" ;
+		Member m = rzMap.get(rzName).get(memName);
+		memberMap.put((float) m.getCurrentHeapSize(), m.getMember());
+			
+		for(Map.Entry<Float,String> entry : memberMap.entrySet()) {		
+			//here matching painting style to validation that the members are painted according to their cpu usage			
+			String refMemberCPUUsage = null;
+			if(entry.getValue().equalsIgnoreCase("M1")){
+				refMemberCPUUsage = PulseTestData.RedundancyZone.heapUsagePaintStyleRZ1RZ2M1;
+			}else if(entry.getValue().equalsIgnoreCase("M2")){
+				refMemberCPUUsage = PulseTestData.RedundancyZone.heapUsagePaintStyleRZ1RZ2M2;
+			}else{
+				refMemberCPUUsage = PulseTestData.RedundancyZone.heapUsagePaintStyleRZ3M3;
+			}			
+			Assert.assertTrue(findElementById("RZ1 RZ2(!)"+entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));			
+	    } 	
+	}
+	
+	public void assertMemeberSortingByRzCpuUsage(){		
+		String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");			
+		HashMap<String, HashMap<String, Member>> rzMap = new HashMap<String, HashMap<String, Member>>();
+		for (String member : memberNames) {
+			Member thisMember = new Member(member);
+			String sgName = thisMember.getRedundancyZone();
+				HashMap<String, Member> rzMembers = rzMap.get(sgName);
+				
+				if (rzMembers == null) {
+					rzMembers = new HashMap<String, Member>();
+					rzMap.put(sgName, rzMembers);
+				}
+
+				rzMembers.put(thisMember.getMember(), thisMember);
+		}
+		Map<Float, String> memberMap = new TreeMap<Float,String>(Collections.reverseOrder());
+		String rzName = "RZ1 RZ2";
+		String memName = "M1" ;
+		Member m = rzMap.get(rzName).get(memName);
+		memberMap.put(m.getCpuUsage(), m.getMember());
+			
+		for(Map.Entry<Float,String> entry : memberMap.entrySet()) {		
+			//here matching painting style to validation that the members are painted according to their cpu usage			
+			String refMemberCPUUsage = null;
+			if(entry.getValue().equalsIgnoreCase("M1")){
+				refMemberCPUUsage = PulseTestData.RedundancyZone.cpuUsagePaintStyleRZ1RZ2M1;
+			}else if(entry.getValue().equalsIgnoreCase("M2")){
+				refMemberCPUUsage = PulseTestData.RedundancyZone.cpuUsagePaintStyleRZ1RZ2M2;
+			}		
+			Assert.assertTrue(findElementById("RZ1 RZ2(!)"+entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));			
+	    } 	
+	}
+	
+	public List<WebElement> getRegionsFromDataBrowser(){		
+		List<WebElement> regionList = driver.findElements(By.xpath("//span[starts-with(@ID,'treeDemo_')][contains(@id,'_span')]"));		
+		return regionList;
+	}
+}
+
+public class PulseAutomatedTests extends PulseBaseTests {
+
+		
+	@Test
+	public void serverGroupGridDataValidation() {
+		navigateToServerGroupGridView();
+		validateServerGroupGridData();
+	}
+
+	@Test
+	public void redundancyZonesGridDataValidation() {
+		navigateToRedundancyZonesGridView();
+		validateRedundancyZonesGridData();
+	}
+
+	@Test
+	public void topologyGridDataValidation() {
+		navigateToTopologyGridView();
+		validateTopologyGridData();
+	}
+
+	@Test
+	public void dataViewGridDataValidation() {
+		navigateToDataPrespectiveGridView();
+		validateDataPrespectiveGridData();
+	}
+
+	@Test
+	public void regionDetailsGridDataValidation() {
+		navigateToRegionDetailsGridView();
+		validateRegionDetailsGridData();
+
+	}
+
+	@Test
+	public void regionDetailsNavigationTest() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals("/R2", getTextUsingId(PulseTestLocators.RegionDetailsView.regionNameDivId));
+	}
+
+	@Test
+	public void regionName() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.name"), getTextUsingId(PulseTestLocators.RegionDetailsView.regionNameDivId));
+	}
+
+	@Test
+	public void regionPath() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.fullPath"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.regionPathId));
+	}
+
+	@Test
+	public void regionType() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.regionType"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.regionTypeId));
+	}
+
+	@Test
+	public void regionMembers() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.memberCount"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.regionMembersTextId));
+	}
+
+	@Test
+	public void regionEmptyNodes() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.emptyNodes"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.regionEmptyNodesId));
+	}
+
+	@Test
+	public void regionEntryCount() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.systemRegionEntryCount"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.regionEntryCountTextId));
+	}
+
+	@Test
+	public void regionDiskUsage() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.diskUsage"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.regionDiskUsageId));
+	}
+
+	@Test
+	public void regionPersistence() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPersistanceEnabled(getPropertyValue("region.R2.persistentEnabled")),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.regionPersistenceId));
+	}
+
+	@Ignore("WIP")
+	@Test
+	public void regionMemoryUsage() {
+		navigateToRegionDetailsView();
+		// need to check the respective property values
+	}
+
+	@Test
+	public void regionInMemoryRead() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.getsRate"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.inMemoryReadsId));
+
+	}
+
+	@Test
+	public void regionInMemoryWrites() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.putsRate"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.inMemoryWritesId));
+	}
+
+	@Test
+	public void regionDiskRead() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.diskReadsRate"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.diskReadsId));
+	}
+
+	@Test
+	public void regionDiskWrites() {
+		navigateToRegionDetailsView();
+		Assert.assertEquals(getPropertyValue("region.R2.diskWritesRate"),
+				getTextUsingId(PulseTestLocators.RegionDetailsView.diskWritesId));
+	}
+
+	@Test
+	public void clickHostShowsMemberTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH1Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM1Id);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH2Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM2Id);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH3Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM3Id);
+	}
+
+	@Test
+	public void verifyHostTooltipsOfTopologyGraphTest() {		
+		for (int i = 1; i <=3; i++) {
+			clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+			mouseClickAndHoldOverElementById("h" + i);
+			verifyTextPresrntByXpath(PulseTestLocators.TopologyView.hostNameTTXpath, getPropertyValue("member.M" + i + ".host"));
+			verifyTextPresrntByXpath(PulseTestLocators.TopologyView.cpuUsageTTXpath, "0%");
+			verifyTextPresrntByXpath(PulseTestLocators.TopologyView.memoryUsageTTXpath, getPropertyValue("member.M" + i
+					+ ".currentHeapSize"));
+			verifyTextPresrntByXpath(PulseTestLocators.TopologyView.loadAvgTTXpath, getPropertyValue("member.M" + i
+					+ ".loadAverage"));
+			verifyTextPresrntByXpath(PulseTestLocators.TopologyView.soketsTTXpath, getPropertyValue("member.M" + i
+					+ ".totalFileDescriptorOpen"));
+			mouseReleaseById("h" + i);
+			driver.navigate().refresh();
+		}
+	}
+
+	@Ignore("Issues with member tooltip xpath")
+	@Test
+	public void verifyMemberTooltipsOfTopologyGraphTest() {
+
+		verifyElementPresentById(PulseTestLocators.TopologyView.nodeH1Id);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH1Id);
+		mouseClickAndHoldOverElementById(PulseTestLocators.TopologyView.memberM1Id);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.memNameTTXpath, getPropertyValue("member.M1.member"));
+		//verifyTextPresrntByXpath(PulseTestLocators.TopologyView.memCpuUsageTTXpath, getPropertyValue("member.M1.cpuUsage") + "%");
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.jvmPausesTTXpath, getPropertyValue("member.M1.JVMPauses"));
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.regionsTTXpath, getPropertyValue("member.M1.totalRegionCount"));
+		verifyElementPresentById(PulseTestLocators.TopologyView.nodeH2Id);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH2Id);
+		mouseClickAndHoldOverElementById(PulseTestLocators.TopologyView.memberM2Id);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.memNameTTXpath, getPropertyValue("member.M2.member"));
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.memCpuUsageTTXpath, getPropertyValue("member.M2.cpuUsage") + "%");
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.jvmPausesTTXpath, getPropertyValue("member.M2.JVMPauses"));
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.regionsTTXpath, getPropertyValue("member.M2.totalRegionCount"));
+
+		verifyElementPresentById(PulseTestLocators.TopologyView.nodeH3Id);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH3Id);
+		mouseClickAndHoldOverElementById(PulseTestLocators.TopologyView.memberM3Id);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.memNameTTXpath, getPropertyValue("member.M3.member"));
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.memCpuUsageTTXpath, getPropertyValue("member.M3.cpuUsage") + "%");
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.jvmPausesTTXpath, getPropertyValue("member.M3.JVMPauses"));
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.regionsTTXpath, getPropertyValue("member.M3.totalRegionCount"));
+
+	}
+
+	@Test
+	public void VerifyRGraphTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		verifyElementPresentById(PulseTestLocators.TopologyView.nodeH1Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.nodeH2Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.nodeH3Id);
+	}
+
+	@Test
+	public void clickMembersOfTopologyGraphTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH1Id);
+		clickElementUsingId(PulseTestLocators.TopologyView.memberM1Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M1");
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH2Id);
+		clickElementUsingId(PulseTestLocators.TopologyView.memberM2Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M2");
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.nodeH3Id);
+		clickElementUsingId(PulseTestLocators.TopologyView.memberM3Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M3");
+	}
+
+	@Test
+	public void clickTreeMapViewShowingTreeMapTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.treeMapButtonId);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM1Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM2Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM3Id);
+	}
+
+	@Test
+	public void verifyMembersPresentInTreeMapTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.treeMapButtonId);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM1Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM2Id);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM3Id);
+		verifyTextPresrntById(PulseTestLocators.TopologyView.memberM1Id, "M1");
+		verifyTextPresrntById(PulseTestLocators.TopologyView.memberM2Id, "M2");
+		verifyTextPresrntById(PulseTestLocators.TopologyView.memberM3Id, "M3");
+	}
+
+	@Test
+	public void clickMemberNavigatingToCorrespondingRegionTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.treeMapButtonId);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM1Id);
+		verifyTextPresrntById(PulseTestLocators.TopologyView.memberM1Id, "M1");
+		clickElementUsingId(PulseTestLocators.TopologyView.memberM1Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M1");
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.treeMapButtonId);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM2Id);
+		verifyTextPresrntById(PulseTestLocators.TopologyView.memberM2Id, "M2");
+		clickElementUsingId(PulseTestLocators.TopologyView.memberM2Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M2");
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.treeMapButtonId);
+		verifyElementPresentById(PulseTestLocators.TopologyView.memberM3Id);
+		verifyTextPresrntById(PulseTestLocators.TopologyView.memberM3Id, "M3");
+		clickElementUsingId(PulseTestLocators.TopologyView.memberM3Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M3");
+	}
+
+	@Test
+	public void clickGridButtonShowsGridTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.gridButtonId);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.idM1Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.nameM1Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.hostH1Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.idM2Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.nameM2Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.hostH2Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.idM3Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.nameM3Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.hostH3Xpath);
+	}
+
+	@Test
+	public void verifyMembersPresentInGridTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.gridButtonId);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.nameM1Xpath);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.nameM1Xpath, "M1");
+
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.nameM2Xpath);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.nameM2Xpath, "M2");
+
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.nameM3Xpath);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.nameM3Xpath, "M3");
+	}
+
+	@Test
+	public void verifyHostNamesInGridTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.gridButtonId);
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.hostH1Xpath);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.hostH1Xpath, "h1");
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.hostH2Xpath);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.hostH2Xpath, "h2");
+		verifyElementPresentByXpath(PulseTestLocators.TopologyView.hostH3Xpath);
+		verifyTextPresrntByXpath(PulseTestLocators.TopologyView.hostH3Xpath, "h3");
+	}
+
+	@Test
+	public void clickOnGridMemNameNavigatingToCorrespondingRegionTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.gridButtonId);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.nameM1Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M1");
+
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.gridButtonId);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.nameM2Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M2");
+
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.gridButtonId);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.nameM3Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M3");
+	}
+
+	@Test
+	public void verifyMembersPresentInSvrGrpTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrpsRadioXpath);
+		verifyElementPresentById(PulseTestLocators.ServerGroups.serverGrp1Id);
+		verifyElementPresentById(PulseTestLocators.ServerGroups.serverGrp2Id);
+		verifyElementPresentById(PulseTestLocators.ServerGroups.serverGrp3Id);
+
+		verifyElementPresentById(PulseTestLocators.ServerGroups.sg1M1Id);
+		verifyElementPresentById(PulseTestLocators.ServerGroups.sg1M2Id);
+		verifyElementPresentById(PulseTestLocators.ServerGroups.sg1M3Id);
+
+		verifyElementPresentById(PulseTestLocators.ServerGroups.sg2M1Id);
+		verifyElementPresentById(PulseTestLocators.ServerGroups.sg2M2Id);
+
+		verifyElementPresentById(PulseTestLocators.ServerGroups.sg3M3Id);
+	}
+
+	@Test
+	public void expandAndCloseServerGroupsTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		//waitForElement(findElementByXpath(PulseTestLocators.ServerGroups.serverGrpsRadioXpath));
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrpsRadioXpath);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrp1Xpath);
+		verifyElementAttributeById(PulseTestLocators.ServerGroups.serverGrp1Id, "style", "width: 720px; height: 415px;");
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrp1Xpath);
+		verifyElementAttributeById(PulseTestLocators.ServerGroups.serverGrp1Id, "style", "width: 239.667px; height: 399px;");
+
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrp2Xpath);
+		verifyElementAttributeById(PulseTestLocators.ServerGroups.serverGrp2Id, "style", "width: 720px; height: 415px;");
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrp2Xpath);
+		verifyElementAttributeById(PulseTestLocators.ServerGroups.serverGrp2Id, "style", "width: 239.667px; height: 399px;");
+
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrp3Xpath);
+		verifyElementAttributeById(PulseTestLocators.ServerGroups.serverGrp3Id, "style", "width: 720px; height: 415px;");
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrp3Xpath);
+		verifyElementAttributeById(PulseTestLocators.ServerGroups.serverGrp3Id, "style", "width: 239.667px; height: 399px;");
+	}
+
+	@Test
+	public void verifyMembersInServGrpTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrpsRadioXpath);
+
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.serverGrp1Id, "SG1");
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.serverGrp2Id, "SG2");
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.serverGrp3Id, "SG3");
+
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.sg1M1Id, "M1");
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.sg1M2Id, "M2");
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.sg1M3Id, "M3");
+
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.sg2M1Id, "M1");
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.sg2M2Id, "M2");
+
+		verifyTextPresrntById(PulseTestLocators.ServerGroups.sg3M3Id, "M3");
+	}
+
+	@Test
+	public void memberNavigationFromServGrpTest() {
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.serverGrpsRadioXpath);
+		clickElementUsingId(PulseTestLocators.ServerGroups.sg1M1Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M1");
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.sg1M2Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M2");
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.sg1M3Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M3");
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.sg2M1Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M1");
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.sg2M2Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M2");
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.sg3M3Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M3");
+	}
+
+	@Test
+	public void clickServGrpGridButtonShowsGridTest() {
+		navigateToServerGroupGridView();
+		verifyElementPresentByXpath(PulseTestLocators.ServerGroups.idSG1M3Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.ServerGroups.idSG1M2Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.ServerGroups.idSG1M1Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.ServerGroups.nameM3Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.ServerGroups.nameM2Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.ServerGroups.nameM1Xpath);
+
+	}
+
+	@Test
+	public void memberNavigationFromServGrpGridTest() {
+		navigateToServerGroupGridView();
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.idSG1M3Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M3");
+		navigateToServerGroupGridView();
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.idSG1M1Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M1");
+		navigateToServerGroupGridView();
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.idSG1M2Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M2");
+	}
+
+	@Test
+	public void verifyZonePresentTest() {
+		navigateToRedundancyZonesTreeView();
+		verifyElementPresentById(PulseTestLocators.RedundancyZone.zoneRZ1Id);
+		verifyElementPresentById(PulseTestLocators.RedundancyZone.zoneRZ2Id);
+	}
+
+	@Test
+	public void expandAndCloseRdncyZoneTest() {
+		navigateToRedundancyZonesTreeView();
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.zoneRZ1RZ2Xpath);
+		verifyElementAttributeById(PulseTestLocators.RedundancyZone.zoneRZ1Id, "style", "width: 720px; height: 415px;");
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.zoneRZ1RZ2Xpath);
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.zoneRZ2Xpath);
+		verifyElementAttributeById(PulseTestLocators.RedundancyZone.zoneRZ2Id, "style", "width: 720px; height: 415px;");
+
+	}
+
+	@Test
+	public void clickRZMembersNavigationTest() {
+		navigateToRedundancyZonesTreeView();		
+		clickElementUsingId(PulseTestLocators.RedundancyZone.m1RZ1RZ2Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M1");
+		navigateToRedundancyZonesTreeView();
+		clickElementUsingId(PulseTestLocators.RedundancyZone.m2RZ1Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M2");
+		navigateToRedundancyZonesTreeView();
+		clickElementUsingId(PulseTestLocators.RedundancyZone.m3RZ2Id);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M3");
+	}
+
+	@Test
+	public void clickRZGridShowingGridTest() {
+		navigateToRedundancyZonesGridView();
+		verifyElementPresentByXpath(PulseTestLocators.RedundancyZone.idM2Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.RedundancyZone.idM1Xpath);
+		verifyElementPresentByXpath(PulseTestLocators.RedundancyZone.idM3Xpath);
+		verifyTextPresrntByXpath(PulseTestLocators.RedundancyZone.idM2Xpath, "M2");
+		verifyTextPresrntByXpath(PulseTestLocators.RedundancyZone.idM1Xpath, "M1");
+		verifyTextPresrntByXpath(PulseTestLocators.RedundancyZone.idM3Xpath, "M3");
+	}
+
+	@Test
+	public void clickRZGridMembersNavigationTest() {
+		navigateToRedundancyZonesGridView();
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.idM2Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M2");
+		navigateToRedundancyZonesGridView();
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.idM1Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M1");
+		navigateToRedundancyZonesGridView();
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.idM3Xpath);
+		verifyTextPresrntById(PulseTestLocators.RegionDetailsView.memberNameId, "M3");
+	}
+
+
+	@Test
+	public void verifySortingOptionsTest(){
+		clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+		clickElementUsingId(PulseTestLocators.TopologyView.treeMapButtonId);
+		verifyElementPresentById(PulseTestLocators.TopologyView.hotSpotId);
+		clickElementUsingId(PulseTestLocators.TopologyView.hotSpotId);			
+		verifyElementPresentByLinkText("Heap Usage");
+		verifyElementPresentByLinkText("CPU Usage");		
+	}
+	
+	/* 
+	 * HotSpot test scripts - 
+	 */
+	//--- Topology view
+	
+	@Test
+	public void testHotSpotOptPrsntOnTopologyView(){
+		navigateToTopologyTreeView();
+	    Assert.assertEquals(PulseTestData.Topology.hotSpotHeapLbl, getTextUsingId(PulseTestLocators.TopologyView.hotSpotId));	
+	}
+	
+	@Test
+	public void testHotSpotOptionsTopologyView(){	
+		navigateToTopologyTreeView();
+		clickElementUsingId(PulseTestLocators.TopologyView.hotSpotId);
+		Assert.assertEquals(PulseTestData.Topology.hotSpotHeapLbl, getTextUsingXpath(PulseTestLocators.TopologyView.heapUsageXpath));
+		Assert.assertEquals(PulseTestData.Topology.hotSpotCPULbl, getTextUsingXpath(PulseTestLocators.TopologyView.cpuUsageXpath));
+	}
+	
+	@Test
+	public void testCpuUsageNavigationOnTopologyView(){
+		navigateToTopologyTreeView();
+		clickElementUsingId(PulseTestLocators.TopologyView.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.cpuUsageXpath);
+		Assert.assertEquals(PulseTestData.Topology.hotSpotCPULbl, getTextUsingId(PulseTestLocators.TopologyView.hotSpotId));
+	}
+	
+	@Test
+	public void testHeapUsageNavigationOnTopologyView(){
+		navigateToTopologyTreeView();
+		clickElementUsingId(PulseTestLocators.TopologyView.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.heapUsageXpath);
+		Assert.assertEquals(PulseTestData.Topology.hotSpotHeapLbl, getTextUsingId(PulseTestLocators.TopologyView.hotSpotId));
+	}
+
+	@Test
+	public void testSortingUsingCpuUsageOnTopologyView(){
+		navigateToTopologyTreeView();
+		clickElementUsingId(PulseTestLocators.TopologyView.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.cpuUsageXpath);
+		assertMemberSortingByCpuUsage();
+	}
+	
+	@Test
+	public void testSortingUsingHeapUsageOnTopologyView(){
+		navigateToTopologyTreeView();
+		clickElementUsingId(PulseTestLocators.TopologyView.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.TopologyView.heapUsageXpath);
+		assertMemberSortingByHeapUsage();
+	}
+	
+	//--- Server Group view
+	
+	@Test
+	public void testHotSpotOptPrsntOnServerGroupView(){
+		navigateToServerGroupTreeView();
+	    Assert.assertEquals(PulseTestData.ServerGroups.hotSpotHeapLbl, getTextUsingId(PulseTestLocators.ServerGroups.hotSpotId));	
+	}
+	
+	@Test
+	public void testHotSpotOptionsServerGroupView(){	
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.hotSpotId);
+		Assert.assertEquals(PulseTestData.ServerGroups.hotSpotHeapLbl, getTextUsingXpath(PulseTestLocators.ServerGroups.heapUsageXpath));
+		Assert.assertEquals(PulseTestData.ServerGroups.hotSpotCPULbl, getTextUsingXpath(PulseTestLocators.ServerGroups.cpuUsageXpath));		
+	}
+	
+	@Test
+	public void testCpuUsageNavigationOnServerGroupView(){
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.cpuUsageXpath);
+		Assert.assertEquals(PulseTestData.ServerGroups.hotSpotCPULbl, getTextUsingId(PulseTestLocators.ServerGroups.hotSpotId));
+	}
+	
+	@Test
+	public void testHeapUsageNavigationOnServerGroupView(){
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.heapUsageXpath);
+		Assert.assertEquals(PulseTestData.ServerGroups.hotSpotHeapLbl, getTextUsingId(PulseTestLocators.ServerGroups.hotSpotId));
+	}	
+
+	@Test
+	public void testSortingUsingCpuUsageOnServerGroupView(){
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.heapUsageXpath);
+		assertMemeberSortingBySgHeapUsage();
+	}
+	
+	@Test
+	public void testSortingUsingHeapUsageOnServerGroupView(){
+		navigateToServerGroupTreeView();
+		clickElementUsingId(PulseTestLocators.ServerGroups.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.ServerGroups.cpuUsageXpath);
+		assertMemeberSortingBySgCpuUsage();
+	}
+	
+	//--- Redundancy Zone view
+	
+	@Test
+	public void testHotSpotOptPrsntOnRedundancyZoneView(){
+		navigateToRedundancyZonesTreeView();
+	    Assert.assertEquals(PulseTestData.RedundancyZone.hotSpotHeapLbl, getTextUsingId(PulseTestLocators.RedundancyZone.hotSpotId));	
+	}
+	
+	
+	@Test
+	public void testHotSpotOptionsRedundancyZoneView(){	
+		// navigate to Redundancy Zones - Tree View
+		navigateToRedundancyZonesTreeView();
+		clickElementUsingId(PulseTestLocators.RedundancyZone.hotSpotId);
+		Assert.assertEquals(PulseTestData.RedundancyZone.hotSpotHeapLbl, getTextUsingXpath(PulseTestLocators.RedundancyZone.heapUsageXpath));
+		Assert.assertEquals(PulseTestData.RedundancyZone.hotSpotCPULbl, getTextUsingXpath(PulseTestLocators.RedundancyZone.cpuUsageXpath));		
+	}
+	
+	@Test
+	public void testCpuUsageNavigationOnRedundancyZoneView(){
+		// navigate to Redundancy Zones - Tree View
+		navigateToRedundancyZonesTreeView();
+		clickElementUsingId(PulseTestLocators.RedundancyZone.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.cpuUsageXpath);
+		Assert.assertEquals(PulseTestData.RedundancyZone.hotSpotCPULbl, getTextUsingId(PulseTestLocators.RedundancyZone.hotSpotId));
+	}
+	
+	@Test
+	public void testHeapUsageNavigationOnRedundancyZoneView(){
+		// navigate to Redundancy Zones - Tree View
+		navigateToRedundancyZonesTreeView();
+		clickElementUsingId(PulseTestLocators.RedundancyZone.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.heapUsageXpath);
+		Assert.assertEquals(PulseTestData.RedundancyZone.hotSpotHeapLbl, getTextUsingId(PulseTestLocators.RedundancyZone.hotSpotId));
+	}
+	
+	@Test
+	public void testSortingUsingHeapUsageOnRedundancyView(){
+		// navigate to Redundancy Zones - Tree View
+		navigateToRedundancyZonesTreeView();
+		clickElementUsingId(PulseTestLocators.RedundancyZone.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.heapUsageXpath);
+		assertMemeberSortingByRzHeapUsage();
+	}
+	
+	@Test
+	public void testSortingUsingCpuUsageOnRedundancyView(){
+		// navigate to Redundancy Zones - Tree View
+		navigateToRedundancyZonesTreeView();
+		clickElementUsingId(PulseTestLocators.RedundancyZone.hotSpotId);
+		clickElementUsingXpath(PulseTestLocators.RedundancyZone.cpuUsageXpath);
+		assertMemeberSortingByRzCpuUsage();
+	}	
+	
+	@Test
+	public void testDataBrowserFilterFeature(){
+		// navigate to Data browser page
+		loadDataBrowserpage();		
+		List<WebElement> regionLst = getRegionsFromDataBrowser();		
+		String []regionNames = new String[regionLst.size()];		
+		for(int regionIndex = 0; regionIndex < regionLst.size(); regionIndex++){
+			regionNames[regionIndex] = findElementByXpath(PulseTestLocators.DataBrowser.rgnSpanFirstPart + (regionIndex + 1 ) + PulseTestLocators.DataBrowser.rgnSpanSecondPart).getText();
+		}	
+		// type each region name in region filter and verify respective region(s) are displayed in region list
+		for (String region : regionNames) {
+				findElementById(PulseTestLocators.DataBrowser.rgnFilterTxtBoxId).clear();
+				findElementById(PulseTestLocators.DataBrowser.rgnFilterTxtBoxId).sendKeys(region);				
+				
+				List<WebElement> regionLst1 = getRegionsFromDataBrowser();									
+				
+				for(int regionIndex = 1; regionIndex <= regionLst1.size(); regionIndex++){
+					Assert.assertEquals(region,  findElementByXpath(PulseTestLocators.DataBrowser.rgnSpanFirstPart + regionIndex + PulseTestLocators.DataBrowser.rgnSpanSecondPart).getText());
+				}
+		}
+	}
+	
+	@Test
+	public void testDataBrowserFilterPartialRegionName(){
+		// navigate to Data browser page
+		loadDataBrowserpage();		
+		findElementById(PulseTestLocators.DataBrowser.rgnFilterTxtBoxId).clear();
+		
+		// type partial region name in region filter and verify that all the regions that contains that  text displays
+		findElementById(PulseTestLocators.DataBrowser.rgnFilterTxtBoxId).sendKeys(PulseTestData.DataBrowser.partialRgnName);
+		List<WebElement> regionLst = getRegionsFromDataBrowser();		
+		
+		for(int regionIndex = 0; regionIndex < regionLst.size(); regionIndex++){			
+			Assert.assertTrue(findElementByXpath(PulseTestLocators.DataBrowser.rgnSpanFirstPart + 
+					(regionIndex + 1 ) + 
+					PulseTestLocators.DataBrowser.rgnSpanSecondPart).
+					getText().
+					contains(PulseTestData.DataBrowser.partialRgnName));
+		}	
+	}
+	
+	@Test
+	public void testDataBrowserClearButton(){
+		// navigate to Data browser page
+		loadDataBrowserpage();		
+		
+		sendKeysUsingId(PulseTestLocators.DataBrowser.queryEditorTxtBoxId, PulseTestData.DataBrowser.query1Text);		
+		String editorTextBeforeClear = getTextUsingId(PulseTestLocators.DataBrowser.queryEditorTxtBoxId);
+		clickElementUsingXpath(PulseTestLocators.DataBrowser.btnClearXpath);
+		String editorTextAfterClear = getTextUsingId(PulseTestLocators.DataBrowser.queryEditorTxtBoxId);
+		
+		Assert.assertFalse(PulseTestData.DataBrowser.query1Text.equals(editorTextAfterClear));
+	}
+	
+	
+	@Test
+	public void testDataBrowserHistoryQueue(){
+		// navigate to Data browser page
+		loadDataBrowserpage();	
+						
+		List<WebElement> numOfReg = driver.findElements(By.xpath(PulseTestLocators.DataBrowser.divDataRegions));
+		   
+	    for(int i = 1;  i <= numOfReg.size(); i ++){
+	    	if(getTextUsingId("treeDemo_" + i + "_span").equals( PulseTestData.DataBrowser.regName)){	  	    		
+	    		searchByIdAndClick("treeDemo_" + i + "_check"); 	//driver.findElement(By.id("treeDemo_" + i + "_check")).click();
+	    	}
+	    }	
+		
+		sendKeysUsingId(PulseTestLocators.DataBrowser.queryEditorTxtBoxId, PulseTestData.DataBrowser.query1Text);	
+		clickElementUsingId(PulseTestLocators.DataBrowser.btnExecuteQueryId);
+			
+		//Get required datetime format and extract date and hours from date time.
+	    DateFormat dateFormat = new SimpleDateFormat(PulseTestData.DataBrowser.datePattern);
+	    String queryDateTime = dateFormat.format(System.currentTimeMillis());
+	    String queryTime[] = queryDateTime.split(":");	   
+	    
+	    
+	    clickElementUsingId(PulseTestLocators.DataBrowser.historyIcon);	    
+	    List<WebElement> historyLst = driver.findElements(By.xpath(PulseTestLocators.DataBrowser.historyLst));
+	    
+	    String queryText = getTextUsingXpath(PulseTestLocators.DataBrowser.queryText); 	
+  	    String historyDateTime = getTextUsingXpath(PulseTestLocators.DataBrowser.historyDateTime);
+	   	    
+  	    //verify the query text, query datetime in history panel 
+	    Assert.assertTrue(PulseTestData.DataBrowser.query1Text.equals(queryText));	        
+	    Assert.assertTrue(historyDateTime.contains(queryTime[0]));
+	   
+	}	
+}


[27/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.svg
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.svg b/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.svg
new file mode 100644
index 0000000..c6ed83a
--- /dev/null
+++ b/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.svg
@@ -0,0 +1,251 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Font Squirrel.
+Copyright   : Digitized data copyright  2006 Google Corporation
+Foundry     : Ascender Corporation
+Foundry URL : httpwwwascendercorpcom
+</metadata>
+<defs>
+<font id="webfontSruMVOI5" horiz-adv-x="1126" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="530" />
+<glyph unicode=" "  horiz-adv-x="530" />
+<glyph unicode="&#x09;" horiz-adv-x="530" />
+<glyph unicode="&#xa0;" horiz-adv-x="530" />
+<glyph unicode="!" horiz-adv-x="585" d="M117 143q0 41 14 80q10 29 37 51q20 18 55 28.5t70 10.5q33 0 67.5 -10t55.5 -29q23 -20 37 -50.5t14 -80t-14 -77.5q-18 -37 -37 -54q-25 -22 -56 -30q-27 -8 -67 -9q-43 0 -70 9q-31 9 -55 30q-25 20 -37 54q-14 36 -14 77zM121 1462h346l-51 -977h-244z" />
+<glyph unicode="&#x22;" horiz-adv-x="966" d="M133 1462h279l-41 -528h-197zM555 1462h279l-41 -528h-197z" />
+<glyph unicode="#" horiz-adv-x="1320" d="M45 406v206h277l47 232h-252v209h289l77 407h219l-77 -407h198l78 407h215l-78 -407h240v-209h-279l-47 -232h258v-206h-297l-77 -406h-220l78 406h-194l-76 -406h-215l74 406h-238zM539 612h196l47 232h-196z" />
+<glyph unicode="$" d="M98 1044q0 72 29 136q27 59 82 108q52 46 129 74q78 29 170 37v157h137v-151q104 -8 178 -25q90 -20 191 -63l-101 -234q-78 29 -135 47q-55 16 -133 25v-293l39 -14q90 -31 166 -72q74 -39 119 -84q51 -51 69 -102q23 -61 23 -133q0 -78 -27 -140q-27 -63 -78 -110 t-131 -80t-180 -41v-205h-137v201q-86 4 -123 8q-70 8 -104 16q-59 14 -93 27q-41 14 -88 35v264q51 -27 93 -41q33 -12 102 -33q41 -12 106 -26q49 -10 107 -15v318q-4 0 -8 2t-8.5 4t-8.5 4t-8 2q-6 2 -14 6q-86 31 -160 72q-59 33 -113 86q-46 46 -67 104q-23 61 -23 129 zM399 1051q0 -45 27 -78t82 -53v233q-53 -6 -82 -31q-27 -24 -27 -71zM645 328q59 10 86 39q29 33 29 84q0 25 -6 43t-21 32q-16 16 -35 27l-53 27v-252z" />
+<glyph unicode="%" horiz-adv-x="1802" d="M63 1026q0 111 21 193q23 90 61 143q43 59 109 90q65 31 154 31q88 0 151 -31q68 -33 111 -90q45 -61 65 -143q23 -90 23 -193q0 -113 -21 -195q-23 -90 -63 -145q-43 -59 -108.5 -90t-157.5 -31q-84 0 -149.5 31t-108.5 90q-41 55 -64 145.5t-23 194.5zM315 1024 q0 -127 23 -190q23 -61 72 -61.5t73 61.5q23 55 23 190q0 250 -96 250q-49 0 -72 -62q-23 -63 -23 -188zM375 0l811 1462h239l-811 -1462h-239zM1047 442q0 111 20 193q23 90 61 143q43 59 109 90q65 31 154 31q88 0 151 -31q68 -33 111 -90q45 -61 65 -143q23 -90 23 -193 q0 -113 -21 -194q-23 -86 -63 -144q-43 -59 -109 -90q-70 -33 -157 -32q-80 0 -150 32q-61 29 -106 90.5t-66 143.5q-22 90 -22 194zM1298 440q0 -127 23 -190q23 -61 72 -61.5t73 61.5q23 57 23 190q0 250 -96 250q-49 0 -72 -61q-23 -64 -23 -189z" />
+<glyph unicode="&#x26;" horiz-adv-x="1478" d="M82 395q0 76 18 137q16 55 53 108.5t83 90.5q49 41 108 76q-45 57 -65 88q-25 39 -41 84q-20 59 -25 84q-6 43 -6 86q0 78 31 139q33 63 84 105q61 49 131 67q80 23 165 23q88 0 158 -21q72 -20 125 -61q49 -37 82 -101q31 -58 31 -135q0 -66 -23 -127q-20 -53 -59 -106 q-37 -49 -90 -90q-63 -49 -111 -76l260 -268q33 61 62 139q25 66 45 147h317q-20 -78 -35 -120q-18 -55 -49 -127q-18 -41 -61 -125q-27 -53 -78 -121l283 -291h-377l-97 100q-76 -53 -176 -88q-92 -33 -213 -32q-119 0 -217 30q-100 31 -168 84q-70 55 -106 131 q-39 82 -39 170zM403 424q0 -43 17 -80q14 -33 43 -57q28 -25 67 -37q47 -14 84 -14q55 0 111 16q51 14 94 43l-309 330q-55 -45 -80 -90q-27 -48 -27 -111zM489 1122q0 -49 23 -98q18 -41 63 -92q74 41 117 88q39 41 39 104q0 27 -10 52q-8 18 -27 36q-14 14 -36.5 20.5 t-41.5 6.5q-23 0 -45 -6t-41 -19q-16 -10 -30 -36q-11 -19 -11 -56z" />
+<glyph unicode="'" horiz-adv-x="544" d="M133 1462h279l-41 -528h-197z" />
+<glyph unicode="(" horiz-adv-x="692" d="M82 561q0 123 18 246q18 125 56 237q37 117 92 220q53 100 135 198h250q-143 -197 -213 -424q-72 -233 -72 -475q0 -121 19 -237q20 -131 53 -231.5t90 -219.5q43 -90 121 -199h-248q-86 100 -135 193q-57 109 -92 215q-37 114 -56 233q-18 121 -18 244z" />
+<glyph unicode=")" horiz-adv-x="692" d="M61 1462h250q82 -98 135 -198q55 -102 93 -220q37 -113 55 -237q18 -123 18 -246t-18 -244q-18 -120 -55 -233q-35 -106 -93 -215q-49 -92 -135 -193h-248q78 109 121 199q57 119 90 219.5t54 231.5q18 117 18 237q0 242 -72 475q-70 227 -213 424z" />
+<glyph unicode="*" horiz-adv-x="1114" d="M63 1042l39 250l365 -104l-41 368h262l-41 -368l373 104l33 -252l-340 -24l223 -297l-227 -121l-156 313l-137 -311l-236 119l221 297z" />
+<glyph unicode="+" d="M88 612v219h367v369h219v-369h366v-219h-366v-364h-219v364h-367z" />
+<glyph unicode="," horiz-adv-x="593" d="M63 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h280l15 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124q-6 -16 -51 -117h-220z" />
+<glyph unicode="-" horiz-adv-x="657" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="." horiz-adv-x="583" d="M117 143q0 41 14 80q10 29 37 51q20 18 55 28.5t70 10.5q33 0 67.5 -10t55.5 -29q23 -20 37 -50.5t14 -80t-14 -77.5q-18 -37 -37 -54q-25 -22 -56 -30q-27 -8 -67 -9q-43 0 -70 9q-31 9 -55 30q-25 20 -37 54q-14 36 -14 77z" />
+<glyph unicode="/" horiz-adv-x="845" d="M14 0l545 1462h277l-545 -1462h-277z" />
+<glyph unicode="0" d="M63 731q0 182 27 318q27 137 88.5 235t155.5 149.5t229 51.5q125 0 219.5 -51.5t158 -147.5t94 -237.5t30.5 -317.5q0 -182 -27 -315q-29 -141 -88 -238q-57 -92 -157 -147q-94 -51 -230 -51q-127 0 -221 51q-96 53 -156 147q-61 98 -92 238q-31 137 -31 315zM371 731 q0 -252 43 -377t149 -125q104 0 150 125q45 123 45 377t-45 377q-47 127 -150 127q-51 0 -90 -33t-59 -94q-25 -74 -33 -158q-10 -106 -10 -219z" />
+<glyph unicode="1" d="M92 1087l471 375h254v-1462h-309v846v63q0 12 1 37t1 39l4 80q0 14 1 37.5t1 34.5q-2 -2 -7 -8.5t-9 -10.5q-6 -6 -13.5 -12t-15.5 -14q-14 -14 -31 -29q-10 -10 -30 -27l-168 -135z" />
+<glyph unicode="2" d="M78 1274q61 53 94 78q59 43 109 67q63 31 129 47q63 16 159 17q102 0 189 -29q80 -27 141.5 -82t91.5 -131q31 -78 31 -170q0 -84 -31 -164q-31 -82 -82 -155q-47 -68 -121 -150l-145 -151l-176 -177v-14h596v-260h-981v215l344 371l119 129q53 59 90 114q39 57 59 115 q20 55 21 125q0 74 -45 115t-119 41q-80 0 -152 -39q-74 -40 -153 -111z" />
+<glyph unicode="3" d="M57 59v263q35 -18 95 -41q45 -16 100 -31q49 -12 98 -18.5t92 -6.5q82 0 144 17q51 14 90 45q33 27 49 69q14 37 14 88q0 45 -18 82q-18 39 -59 62q-41 25 -109 39q-63 14 -166 14h-104v217h102q88 0 154 16q55 14 96 46q35 27 51 65.5t16 81.5q0 80 -49 123t-153 43 q-43 0 -90 -10q-45 -10 -76 -23q-35 -14 -66 -33q-35 -20 -53 -34l-156 206q57 41 91 58q59 29 108 45q59 18 125 31q55 10 143 10q115 0 197 -23q80 -23 151 -69q61 -41 97 -109q35 -66 35 -147q0 -74 -25 -136q-25 -63 -66 -106q-43 -45 -100 -76q-63 -33 -125 -47v-6 q176 -20 268 -107q90 -84 91 -231q0 -92 -35 -178q-33 -78 -105 -142q-63 -55 -180 -92q-111 -35 -256 -34q-104 0 -221 20q-103 18 -195 59z" />
+<glyph unicode="4" d="M4 303v215l621 944h284v-919h176v-240h-176v-303h-301v303h-604zM276 543h332v248v38q0 8 1 26.5t1 29t1 31t1 32.5l4 64q0 10 1 27.5t1 23.5q0 8 1.5 19.5t1.5 13.5h-9q-2 -4 -41 -88q-18 -41 -51 -95z" />
+<glyph unicode="5" d="M86 59v267q16 -10 82 -37q47 -18 94 -31q63 -16 100 -20q49 -6 95 -7q133 0 205 56q70 55 69 176q0 106 -69.5 163.5t-210.5 57.5q-35 0 -56 -2q-37 -4 -57 -8l-55 -12q-6 -2 -22.5 -5.5t-22.5 -5.5l-123 66l55 745h772v-262h-504l-24 -287q61 12 75 15q43 6 109 6 q92 0 174 -29q74 -27 141 -86q59 -53 94 -139t35 -191q0 -117 -36.5 -213t-108.5 -161q-74 -68 -180 -101q-111 -35 -244 -34q-53 0 -108 6q-70 8 -105 14q-53 10 -94 25q-51 18 -80 34z" />
+<glyph unicode="6" d="M76 621q0 104 12 208q14 117 41 201q29 90 80 176q47 80 127 144q74 59 186 94q111 35 254 35h45q8 0 25.5 -2t25.5 -2q16 0 50 -5q25 -3 43 -6v-247q-27 6 -80 14q-43 6 -86 6q-137 0 -221 -33q-88 -35 -140 -94q-49 -59 -71 -143q-20 -78 -27 -187h12q22 37 49 68 q29 31 66 53q43 27 86 37q45 12 106 12q94 0 170 -30.5t129 -90.5q51 -57 80 -145q29 -90 29 -197q0 -121 -33 -213q-33 -94 -96 -159q-66 -68 -150 -101q-92 -35 -198 -34q-111 0 -203 38.5t-162 116.5q-70 80 -110 201q-39 117 -39 285zM383 510q0 -53 12 -102 q12 -45 39 -91q27 -41 62 -65q37 -25 88 -25q45 0 75.5 14.5t57.5 47.5q25 31 37 80q14 57 14 114q0 104 -45 168q-43 61 -135 62q-47 0 -84 -18.5t-66 -47.5q-25 -25 -41 -63q-14 -35 -14 -74z" />
+<glyph unicode="7" d="M55 1200v260h1008v-194l-533 -1266h-323l520 1200h-672z" />
+<glyph unicode="8" d="M72 371q0 72 22 135q18 55 60 108q33 43 90 84q61 43 108 66q-49 31 -92 67q-39 33 -73.5 82.5t-51.5 98.5q-18 55 -18 118q0 86 37 152q39 70 98 111q63 43 143 65q84 23 170 23q88 0 172 -23q78 -20 142 -65q59 -41 98 -111q35 -61 35 -154q0 -72 -21 -120 q-25 -59 -53 -97q-35 -43 -84 -77t-104 -62q49 -27 114 -70q53 -35 99 -84q41 -45 67 -106q27 -63 27 -133q0 -96 -35 -166t-102 -125q-63 -51 -155.5 -79.5t-199.5 -28.5q-123 0 -211 26q-84 25 -153 78q-61 47 -97 123q-32 72 -32 164zM358 389q0 -40 13 -74 q10 -29 39 -57q25 -25 63 -37q43 -14 88 -14q106 0 157.5 49t51.5 131q0 43 -18 76q-20 37 -45 61q-31 31 -62 54l-70 45l-22 14q-37 -18 -80 -47q-33 -23 -61 -58q-25 -31 -39.5 -65.5t-14.5 -77.5zM408 1106q0 -41 12 -72q12 -29 35 -55q16 -20 49 -41l61 -37q29 14 60 35 q28 18 49 43q23 27 35 55q12 31 12 72q0 37 -12 63q-14 31 -33 48q-23 20 -49 28q-31 10 -64 10q-31 0 -61 -10q-27 -8 -49 -28q-18 -16 -33 -48q-12 -26 -12 -63z" />
+<glyph unicode="9" d="M63 971q0 121 33 213q33 94 97 159q66 68 149 101q92 35 199 35q111 0 202 -39q98 -41 162 -117q72 -86 111 -201q39 -117 39 -284q0 -121 -11 -209q-14 -117 -40.5 -201t-81.5 -176q-47 -80 -127 -143q-74 -59 -187 -95q-111 -35 -254 -34q-6 0 -22.5 1t-24.5 1t-24.5 1 t-24.5 1q-16 0 -49 4q-25 3 -43 6v248q27 -6 80 -15q43 -6 86 -6q139 0 223 33q86 33 137 94q49 57 72 146q20 78 27 184h-13q-22 -37 -49 -68q-29 -31 -65 -53q-45 -27 -86 -37q-49 -12 -107 -12q-95 0 -172 31q-72 29 -127 90t-82 145q-27 82 -27 197zM362 975 q0 -109 46 -168q47 -61 135 -62q47 0 84 18.5t65 47.5q25 25 41 63q14 35 15 74q0 51 -13 101q-14 55 -37 92q-25 39 -63 65q-37 25 -88 25q-45 0 -76 -14.5t-57 -47.5q-27 -35 -39 -79q-13 -49 -13 -115z" />
+<glyph unicode=":" horiz-adv-x="583" d="M117 143q0 41 14 80q10 29 37 51q20 18 55 28.5t70 10.5q33 0 67.5 -10t55.5 -29q23 -20 37 -50.5t14 -80t-14 -77.5q-18 -37 -37 -54q-25 -22 -56 -30q-27 -8 -67 -9q-43 0 -70 9q-31 9 -55 30q-25 20 -37 54q-14 36 -14 77zM117 969q0 41 14 80q10 31 37 53 q20 18 55 28q27 8 70 9q41 0 67 -9q35 -10 55.5 -28.5t37.5 -52.5q14 -31 14 -80q0 -47 -14 -78q-16 -35 -37 -53.5t-55.5 -28.5t-67.5 -10q-35 0 -70 10t-55 29q-27 23 -37 53q-14 39 -14 78z" />
+<glyph unicode=";" horiz-adv-x="593" d="M63 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h280l15 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124q-6 -16 -51 -117h-220zM117 969q0 41 14 80q10 31 37 53q20 18 55 28q27 8 70 9q41 0 67 -9q35 -10 55.5 -28.5t37.5 -52.5q14 -31 14 -80 q0 -47 -14 -78q-16 -35 -37 -53.5t-55.5 -28.5t-67.5 -10q-35 0 -70 10t-55 29q-27 23 -37 53q-14 39 -14 78z" />
+<glyph unicode="&#x3c;" d="M88 641v143l952 496v-240l-643 -317l643 -281v-239z" />
+<glyph unicode="=" d="M88 418v219h952v-219h-952zM88 807v217h952v-217h-952z" />
+<glyph unicode="&#x3e;" d="M88 203v239l643 281l-643 317v240l952 -496v-143z" />
+<glyph unicode="?" horiz-adv-x="937" d="M25 1358q43 25 94 47q59 27 104 41q49 16 110.5 26.5t110.5 10.5q101 0 185 -25q78 -23 139 -72q55 -43 86 -112q31 -68 31 -154q0 -68 -15 -112q-16 -55 -41 -93q-27 -43 -69 -81q-59 -55 -96 -84q-27 -20 -68 -58q-20 -18 -41 -47q-16 -25 -23 -45q-4 -16 -4 -55v-60 h-264v74q0 45 10 92q8 37 33 80q18 31 55 72q37 39 82 74q25 18 70 59q27 23 47 51q16 20 27 53q8 25 8 66q0 57 -39 94q-41 37 -117 37q-68 0 -149 -29q-66 -23 -164 -71zM231 143q0 46 13 80q8 25 39 51q23 20 55 29q37 10 69.5 10t67.5 -10t55 -29q23 -20 37.5 -50.5 t14.5 -80t-15 -77.5q-18 -37 -37 -54q-25 -22 -55 -30q-27 -8 -67 -9q-39 0 -70 9q-29 8 -55 30q-27 25 -39 54q-13 30 -13 77z" />
+<glyph unicode="@" horiz-adv-x="1773" d="M102 602q0 129 27 238q29 119 78 211q51 96 125 176q80 86 168 137q96 57 207 86q113 31 241 31q154 0 291 -51.5t229 -143.5q98 -98 151.5 -229t53.5 -305q0 -92 -22 -189q-20 -86 -70 -166q-47 -74 -115 -118q-70 -45 -163 -46q-41 0 -72 8.5t-62 28.5q-27 18 -47 41 t-32 51h-15q-12 -16 -45 -49q-18 -18 -55 -41q-33 -20 -68 -28q-41 -10 -82 -11q-80 0 -147 29q-66 29 -109 80q-47 57 -67 127q-23 78 -23 162q0 102 31 188q33 90 88 150q59 63 141 96q86 35 187 35q61 0 94 -4q61 -8 92 -15l40 -7t42 -9q20 -4 68 -21l-21 -419 q-2 -14 -2 -43v-27q0 -43 6 -70q4 -23 17 -41q8 -14 24 -22q12 -6 29 -6q37 0 61 26q25 28 43 74q16 43 27 107q8 55 8 131q0 121 -39 227q-37 102 -104.5 170t-159.5 104.5t-203 36.5q-156 0 -270.5 -51t-194.5 -143t-118 -215q-41 -129 -41 -275q0 -135 34 -246 q31 -98 105 -178q68 -74 170 -110q101 -37 233 -37q55 0 115 6q39 4 117 20q84 18 116 29q88 31 107 37v-192q-86 -39 -209 -66q-113 -25 -244 -25q-184 0 -323 52q-150 55 -242 147q-98 98 -149.5 237.5t-51.5 319.5zM711 627q0 -11
 1 39 -162q37 -49 100 -49q37 0 72 20 q33 20 51 56q25 47 31 83q9 49 12 111l12 221q-16 4 -47 8q-18 2 -55 3q-61 0 -101 -25q-41 -25 -65 -66q-25 -39 -37 -94q-12 -53 -12 -106z" />
+<glyph unicode="A" horiz-adv-x="1329" d="M0 0l475 1468h379l477 -1468h-313l-100 348h-504l-101 -348h-313zM489 608h357l-94 320l-19 59q-6 20 -11 43t-13 47q-4 16 -13.5 50t-13.5 50.5t-16 84.5l-11 -52q-8 -41 -14 -63l-9 -31.5t-9.5 -36t-16.5 -63.5l-14 -53q-2 -12 -6 -20.5t-4 -14.5z" />
+<glyph unicode="B" horiz-adv-x="1314" d="M184 0v1462h428q125 0 242 -20q102 -18 174 -62q66 -39 105 -114q37 -70 36 -174q0 -55 -16 -115q-16 -57 -43 -96q-29 -41 -70 -68q-43 -29 -96 -37v-10q53 -12 103 -35q47 -23 83 -61q33 -35 56 -101q20 -59 20 -145q0 -96 -35 -178q-31 -74 -100 -133 q-66 -55 -160 -84q-96 -29 -211 -29h-516zM494 256h182q61 0 102 14q45 16 67.5 39t37.5 64q10 31 10 82q0 47 -10 75q-12 33 -39 58q-29 25 -70 37q-43 12 -106 12h-174v-381zM494 883h161q51 0 97 10q35 8 63 33q27 23 35 51q10 35 10 74q0 84 -53 120q-52 37 -166 37 h-147v-325z" />
+<glyph unicode="C" horiz-adv-x="1304" d="M119 729q0 170 45 305q45 133 133 238q84 100 215 155q129 55 293 56q113 0 219 -27q109 -27 209 -76l-100 -252q-88 43 -164 68q-86 29 -164 29q-88 0 -157.5 -35t-115.5 -98q-43 -61 -69 -158q-25 -92 -25 -207q0 -121 21 -209q20 -86 67 -153q43 -61 113 -95 q68 -33 166 -32q94 0 178 20q102 25 195 57v-260q-33 -14 -95 -35q-31 -10 -96 -22t-100 -14q-70 -4 -111 -4q-170 0 -293 55q-129 57 -204 151q-82 100 -121 235.5t-39 307.5z" />
+<glyph unicode="D" horiz-adv-x="1433" d="M184 0v1462h428q160 0 291 -47q129 -46 221 -135q92 -88 142 -225q49 -135 49 -310q0 -182 -51 -325q-49 -139 -146 -232q-100 -96 -233 -141q-141 -47 -316 -47h-385zM494 256h114q197 0 295 121q98 119 98 360q0 123 -24 211q-23 84 -72 146q-45 57 -114.5 85.5 t-153.5 28.5h-143v-952z" />
+<glyph unicode="E" horiz-adv-x="1146" d="M184 0v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256h-842z" />
+<glyph unicode="F" horiz-adv-x="1122" d="M184 0v1462h838v-254h-533v-377h496v-253h-496v-578h-305z" />
+<glyph unicode="G" horiz-adv-x="1482" d="M119 733q0 168 51 311q49 137 147 236q96 96 239.5 149.5t326.5 53.5q119 0 229.5 -24.5t204.5 -65.5l-103 -248q-76 39 -153 57q-90 23 -180 23q-104 0 -183 -35q-84 -37 -141 -100q-55 -61 -88 -158q-31 -92 -31 -205t21 -197q23 -92 67.5 -155.5t118.5 -100t174 -36.5 q65 0 111 6q57 8 86 14v305h-277v258h580v-758q-78 -25 -117 -34q-76 -20 -123 -27q-86 -12 -133 -16q-71 -6 -147 -6q-164 0 -291 49q-129 51 -213 143q-84 94 -131 236q-45 137 -45 325z" />
+<glyph unicode="H" horiz-adv-x="1484" d="M184 0v1462h310v-573h497v573h309v-1462h-309v631h-497v-631h-310z" />
+<glyph unicode="I" horiz-adv-x="796" d="M66 0v176l178 82v946l-178 82v176h665v-176l-178 -82v-946l178 -82v-176h-665z" />
+<glyph unicode="J" horiz-adv-x="677" d="M-199 -150q25 -6 78 -14q39 -6 88 -6q41 0 86 10q35 8 68 35q31 25 47 66q16 43 16 102v1419h310v-1409q0 -125 -37 -217q-39 -94 -101 -151q-63 -57 -157 -86q-96 -29 -201 -29q-66 0 -115 6q-41 4 -82 16v258z" />
+<glyph unicode="K" horiz-adv-x="1296" d="M184 0v1462h310v-704l122 207l334 497h344l-467 -659l471 -803h-352l-336 608l-116 -86v-522h-310z" />
+<glyph unicode="L" horiz-adv-x="1095" d="M184 0v1462h310v-1206h532v-256h-842z" />
+<glyph unicode="M" horiz-adv-x="1869" d="M184 0v1462h422l316 -1118h6l336 1118h422v-1462h-289v692v60q0 10 1 33.5t1 36t1 38t1 37.5t2 36.5t2 37.5q4 92 6 174h-8l-346 -1145h-285l-321 1147h-9q8 -125 11 -178q2 -25 2 -76l4 -78q0 -12 1 -36.5t1 -35.5v-63v-680h-277z" />
+<glyph unicode="N" horiz-adv-x="1603" d="M184 0v1462h391l574 -1095h6l-6 149q0 10 -2 31.5t-2 34t-1 35t-1 32.5q0 12 -1 34t-1 32v55v692h278v-1462h-393l-575 1106h-9q8 -102 11 -154l6 -135q2 -47 2 -129v-688h-277z" />
+<glyph unicode="O" horiz-adv-x="1546" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q166 0 291 -53q121 -51 203 -151.5t121 -238.5q39 -135 39 -309q0 -172 -39 -307q-41 -141 -121 -240q-76 -94 -205 -151q-123 -55 -291 -55t-291 55q-129 57 -204 151q-80 98 -121 240q-39 135 -39 309z M438 733q0 -119 21 -207q23 -98 61 -155q43 -63 105 -97q66 -35 149 -34q86 0 151.5 34.5t104.5 96.5q41 68 60 155q20 102 20 207t-20 207q-18 88 -60 156q-41 66 -102 98q-63 33 -151.5 33t-151.5 -33q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207z" />
+<glyph unicode="P" horiz-adv-x="1224" d="M184 0v1462h406q135 0 244 -32q104 -33 170 -89q68 -59 98 -143q31 -86 31 -192q0 -92 -29 -185q-27 -84 -96.5 -153.5t-174 -108.5t-268.5 -39h-71v-520h-310zM494 774h61q131 0 197 51q68 51 67 170q0 106 -59.5 159.5t-186.5 53.5h-79v-434z" />
+<glyph unicode="Q" horiz-adv-x="1546" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q166 0 291 -53q121 -51 203 -151.5t121 -238.5q39 -135 39 -309q0 -119 -19 -223q-18 -100 -59 -191q-40 -86 -99 -153q-55 -63 -141 -111l361 -403h-398l-268 330h-12q-2 0 -5.5 -1t-5.5 -1h-10 q-168 0 -291 55q-129 57 -204 151q-80 98 -121 240q-39 135 -39 309zM438 733q0 -119 21 -207q23 -98 61 -155q43 -63 105 -97q66 -35 149 -34q86 0 151.5 34.5t104.5 96.5q41 68 60 155q20 102 20 207t-20 207q-18 88 -60 156q-41 66 -102 98q-63 33 -151.5 33t-151.5 -33 q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207z" />
+<glyph unicode="R" horiz-adv-x="1288" d="M184 0v1462h400q279 0 415 -108q133 -106 134 -330q0 -76 -21 -135q-25 -70 -53 -109q-37 -51 -76 -84q-37 -33 -92 -59l199 -318l73 -116l64 -103l47 -71l16 -29h-344l-317 561h-135v-561h-310zM494 813h84q133 0 186 51q55 53 55 152q0 106 -59 147q-63 45 -187 45h-79 v-395z" />
+<glyph unicode="S" horiz-adv-x="1071" d="M94 68v288q80 -39 96 -45l101 -39q41 -16 100 -26q55 -10 101 -10q51 0 88 12q43 14 59 31q25 25 33 49q10 31 10 63q0 41 -18 72q-23 37 -48 59q-27 25 -77 53l-99 56l-102 57q-53 31 -109 86q-49 49 -84 121q-35 74 -34 172q0 102 32 176q37 84 93 131q63 53 145 80 q90 29 192 29q53 0 103 -6q37 -4 100 -21q39 -10 101 -33q53 -20 102 -43l-100 -241q-55 27 -84 37q-27 10 -76 26q-27 8 -72 17q-37 6 -72 6q-80 0 -120.5 -41t-40.5 -111q0 -37 12 -65.5t41 -53.5q37 -33 70 -51l106 -59q76 -41 137 -82q59 -39 109 -92 q47 -51 71.5 -114.5t24.5 -149.5q0 -98 -33 -177q-33 -76 -98 -133q-63 -55 -158 -86q-92 -31 -215 -30q-102 0 -205 22q-96 21 -182 66z" />
+<glyph unicode="T" horiz-adv-x="1122" d="M41 1204v258h1042v-258h-366v-1204h-309v1204h-367z" />
+<glyph unicode="U" horiz-adv-x="1464" d="M174 520v942h309v-919q0 -76 17 -137q14 -55 47 -95q31 -37 78 -55q41 -16 110 -16q131 0 189 75q59 78 59 230v917h309v-946q0 -113 -34.5 -213t-104.5 -170q-76 -76 -176 -113q-111 -41 -250 -40q-135 0 -238 38q-106 41 -174 109q-63 63 -104 172q-37 98 -37 221z" />
+<glyph unicode="V" horiz-adv-x="1247" d="M0 1462h313l248 -880q4 -10 14 -58q4 -16 7.5 -38.5t9.5 -49.5q10 -47 18 -94q4 -18 8.5 -46t6.5 -36q2 8 6 36t8 46l18 94q4 18 12.5 52t8.5 36q10 47 14 58l244 880h313l-456 -1462h-338z" />
+<glyph unicode="W" horiz-adv-x="1896" d="M0 1462h305l166 -798q2 -10 8 -46l13 -69q4 -27 14 -80q10 -51 14 -82q4 -23 8 -41t7 -33l8 -57q6 47 8 55q6 35 12 74l12 80l15 76l12 63q2 10 5 22.5t3 16.5l203 819h272l203 -819q2 -4 4 -16.5t4 -22.5l13 -63q2 -12 6 -33l8 -43l12 -80q6 -39 13 -74q2 -8 8 -55 q0 4 2 15.5t3 21.5t3 20q6 34 12 74q4 31 15 82q4 18 8 38.5l8 41.5q6 39 12 69l8 46l166 798h305l-352 -1462h-352l-180 721q-2 4 -5 18.5l-5 24.5q-8 33 -13 59l-12 72q-2 14 -7 37.5t-7 34.5q-8 45 -11 65q-2 25 -6 47q-4 -23 -6 -47q-2 -20 -10 -65q-2 -16 -6 -34 l-8 -36l-13 -72q-6 -34 -12 -61q-2 -8 -5 -23.5t-5 -21.5l-178 -719h-353z" />
+<glyph unicode="X" horiz-adv-x="1282" d="M0 0l444 754l-413 708h342l274 -526l268 526h334l-418 -725l453 -737h-354l-299 553l-299 -553h-332z" />
+<glyph unicode="Y" horiz-adv-x="1193" d="M0 1462h336l262 -602l264 602h334l-444 -893v-569h-308v559z" />
+<glyph unicode="Z" horiz-adv-x="1103" d="M49 0v201l619 1005h-600v256h968v-200l-618 -1006h637v-256h-1006z" />
+<glyph unicode="[" horiz-adv-x="677" d="M143 -324v1786h484v-211h-224v-1364h224v-211h-484z" />
+<glyph unicode="\" horiz-adv-x="845" d="M12 1462h277l545 -1462h-277z" />
+<glyph unicode="]" horiz-adv-x="677" d="M51 -113h223v1364h-223v211h484v-1786h-484v211z" />
+<glyph unicode="^" horiz-adv-x="1089" d="M8 520l438 950h144l495 -950h-239l-322 643l-141 -323l-139 -320h-236z" />
+<glyph unicode="_" horiz-adv-x="841" d="M-4 -184h850v-140h-850v140z" />
+<glyph unicode="`" horiz-adv-x="1181" d="M332 1548v21h342q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="a" horiz-adv-x="1175" d="M86 334q0 176 115 262q113 84 340 94l178 6v84q0 70 -39 102.5t-113 32.5q-78 0 -141 -20q-61 -20 -137 -57l-99 202q82 45 187 74q98 27 213 27q211 0 321.5 -98.5t110.5 -297.5v-745h-213l-59 152h-9q-33 -45 -65 -78q-29 -29 -74 -54q-41 -23 -86 -30 q-55 -10 -113 -10q-66 0 -127 22q-59 23 -100 64q-39 39 -65 110q-25 68 -25 158zM399 332q0 -68 33 -99q35 -31 90 -30q43 0 78 14q31 12 62 43q29 29 43 70t14 96v92l-101 -4q-68 -4 -104 -16q-45 -16 -65 -37q-29 -29 -39 -55q-11 -29 -11 -74z" />
+<glyph unicode="b" horiz-adv-x="1243" d="M160 0v1556h305v-362q0 -45 -2 -72q0 -12 -1 -35.5t-3 -35.5q0 -18 -2 -39t-4 -39h12q29 45 47 65q27 31 63 52q49 29 80 36q45 12 101 13q88 0 157 -37q68 -35 121 -111q53 -74 80 -180q29 -111 29 -250q0 -141 -29 -252q-29 -109 -80 -182q-53 -74 -125 -111 q-74 -37 -161 -36q-55 0 -99 12q-47 14 -78 33q-39 25 -59 45q-25 25 -47 53h-21l-51 -123h-233zM465 563q0 -72 10 -143q8 -63 31 -107q20 -41 59 -63.5t90 -22.5q90 0 133 86t43 252q0 164 -43 248q-43 82 -135 82q-49 0 -86 -18q-35 -18 -57 -56q-25 -41 -33 -94 q-8 -55 -12 -131v-33z" />
+<glyph unicode="c" horiz-adv-x="1021" d="M102 553q0 164 37 278q37 113 107 183q70 68 164 96q98 29 215 29q90 0 172 -20.5t159 -59.5l-88 -232q-70 31 -127 47q-61 18 -116 19q-113 0 -160 -84q-51 -90 -51 -254t51 -248q49 -80 156 -80q84 0 157 23q59 18 146 57v-254q-4 -2 -72 -33q-25 -12 -70 -22 q-49 -12 -75 -14q-53 -4 -82 -4q-125 0 -217 32q-100 35 -164 103q-68 71 -105 178q-37 108 -37 260z" />
+<glyph unicode="d" horiz-adv-x="1243" d="M102 557q0 141 29 252q29 109 80 182.5t127 110.5q74 37 160 37q55 0 100 -13q37 -10 80 -34q41 -25 65 -52q25 -29 50 -65h10q-2 12 -5 38.5t-5 41.5q-4 25 -9 71q-4 53 -4 72v358h305v-1556h-233l-59 145h-13q-25 -37 -49 -65q-29 -33 -61 -51q-41 -23 -80 -35 q-49 -14 -101 -14q-88 0 -157 36q-68 35 -121 111q-53 74 -80 180q-29 111 -29 250zM412 553q0 -166 45 -248t143 -82q55 0 92 18.5t62 55.5q20 31 34 94q12 55 13 131v33q0 72 -10 143q-8 57 -33 107q-20 41 -61.5 63.5t-98.5 22.5q-95 0 -141 -86q-45 -84 -45 -252z" />
+<glyph unicode="e" horiz-adv-x="1189" d="M102 551q0 147 37 258t102.5 182.5t161.5 110.5q92 37 207 37t201 -33q90 -35 152 -98q63 -66 96 -160q33 -92 33 -217v-148h-682q4 -68 20 -116q16 -45 53 -86q34 -37 80 -56q47 -18 109 -18q49 0 96 6q57 8 88 16q57 16 86 26.5t86 39.5v-236q-40 -22 -80 -36 q-29 -10 -86 -23q-76 -14 -96 -16q-70 -4 -115 -4q-117 0 -221 34q-96 33 -174 107q-72 70 -113 178q-41 111 -41 252zM416 686h389q0 51 -12.5 94t-36.5 74q-27 33 -60 49q-37 18 -84 19q-84 0 -135 -58q-53 -59 -61 -178z" />
+<glyph unicode="f" horiz-adv-x="792" d="M41 889v147l168 82v82q0 102 27 178q25 70 73 113q45 41 117 59q59 16 152 17q96 0 155 -15q68 -16 107 -32l-72 -224q-20 8 -66 21q-31 8 -79 8q-59 0 -84 -39q-25 -41 -25 -98v-70h227v-229h-227v-889h-305v889h-168z" />
+<glyph unicode="g" horiz-adv-x="1128" d="M20 -182q0 63 21 106q20 45 55 76q33 29 80 53q27 12 92 31q-16 6 -41 25q-22 15 -37 36q-23 33 -28 48q-10 27 -10 53q0 31 10 57q12 33 26 49q20 25 45 43q12 10 62 41q-86 35 -139 121q-51 82 -52 199q0 94 27 162q29 74 82 120q55 49 135 74q86 27 184 27q29 0 46 -2 l49 -7q8 -2 23.5 -5t21.5 -3q18 -2 33 -6h380v-166l-163 -51q18 -29 28 -70q8 -33 8 -79q0 -88 -26 -156q-29 -72 -80 -121q-49 -47 -133 -76q-82 -29 -187 -28q-33 0 -51 2q-27 2 -39 6q-23 -18 -32 -35q-10 -14 -11 -45q0 -20 13 -33q14 -14 34 -20q27 -8 50 -11 q18 -2 57 -2h174q80 0 145 -18q61 -18 109 -57q43 -37 67.5 -96.5t24.5 -139.5q0 -90 -39 -172q-37 -78 -112 -129q-82 -55 -189 -82q-115 -29 -258 -29q-117 0 -199 21q-80 20 -143 63q-57 39 -84 97q-29 61 -29 129zM285 -158q0 -23 10 -49q8 -20 34.5 -40.5t63.5 -28.5 q45 -10 96 -11q156 0 236 43q78 41 78 119q0 63 -49 84q-47 20 -152 21h-141q-27 0 -57.5 -6.5t-57.5 -22.5q-25 -15 -43 -43q-18 -27 -18 -66zM395 752q0 -94 33 -142q35 -49 104 -49q74 0 105 49t31 141.5t-31 143.5q-3
 1 53 -105 53q-137 1 -137 -196z" />
+<glyph unicode="h" horiz-adv-x="1282" d="M160 0v1556h305v-317q0 -57 -2 -88q0 -14 -1 -43t-3 -43q-2 -16 -5 -46t-3 -44h16q49 86 125 125t172 39q90 0 151 -23q63 -23 115 -74q49 -49 74 -127q27 -84 26 -186v-729h-305v653q0 119 -36.5 180.5t-116.5 61.5q-58 0 -99 -25q-39 -25 -63 -69q-25 -47 -35 -117 q-10 -76 -10 -158v-526h-305z" />
+<glyph unicode="i" horiz-adv-x="624" d="M147 1407q0 43 13 72q10 25 35 45q20 18 53 24q41 8 65 8q23 0 64 -8q33 -6 53 -24q25 -20 35 -45q14 -33 14 -72t-14 -72q-10 -25 -34.5 -45t-53.5 -26q-31 -6 -64 -7q-35 0 -65 7q-29 6 -53.5 26.5t-34.5 44.5q-13 29 -13 72zM160 0v1118h305v-1118h-305z" />
+<glyph unicode="j" horiz-adv-x="624" d="M-82 -227q43 -12 57 -15q37 -4 62 -4q18 0 47 8q23 6 39 27q18 23 27 51q10 37 10 84v1194h305v-1239q0 -78 -19 -145q-18 -63 -63 -116.5t-113 -80.5q-70 -29 -168 -29q-49 0 -100 7q-49 6 -84 18v240zM147 1407q0 43 13 72q10 25 35 45q20 18 53 24q41 8 65 8 q23 0 64 -8q33 -6 53 -24q25 -20 35 -45q14 -33 14 -72t-14 -72q-10 -25 -34.5 -45t-53.5 -26q-31 -6 -64 -7q-35 0 -65 7q-29 6 -53.5 26.5t-34.5 44.5q-13 29 -13 72z" />
+<glyph unicode="k" horiz-adv-x="1206" d="M160 0v1556h305v-694l-16 -254h4l112 170l273 340h344l-404 -485l430 -633h-352l-272 430l-119 -82v-348h-305z" />
+<glyph unicode="l" horiz-adv-x="624" d="M160 0v1556h305v-1556h-305z" />
+<glyph unicode="m" horiz-adv-x="1927" d="M160 0v1118h233l41 -143h17q27 45 57.5 73.5t73.5 51.5q40 22 86 30q41 8 90 9q119 0 196 -39q80 -41 123 -125h25q27 45 57 74q29 25 76 51q40 22 86 30q41 8 92 9q182 0 272.5 -96.5t90.5 -313.5v-729h-306v653q0 119 -36.5 180.5t-112.5 61.5q-109 0 -156 -86 q-45 -84 -45 -248v-561h-305v653q0 119 -37 180.5t-112 61.5q-55 0 -96.5 -24.5t-61.5 -69.5q-25 -51 -33 -117q-10 -76 -10 -158v-526h-305z" />
+<glyph unicode="n" horiz-adv-x="1282" d="M160 0v1118h233l41 -143h17q23 41 59 74q29 25 76 51q40 22 86 30q41 8 94 9q88 0 149 -23q63 -23 115 -74q49 -49 74 -127q27 -84 26 -186v-729h-305v653q0 119 -36.5 180.5t-116.5 61.5q-61 0 -100.5 -24.5t-63.5 -69.5q-23 -43 -33 -117q-10 -76 -10 -158v-526h-305z " />
+<glyph unicode="o" horiz-adv-x="1226" d="M102 561q0 145 35 248q37 109 103 180q72 78 161 113q95 37 215 37q111 0 203 -37t162 -113q68 -74 104 -180q39 -113 39 -248q0 -139 -37 -248q-39 -117 -100 -182q-68 -74 -162 -113q-92 -39 -215 -38q-115 0 -204 38q-94 41 -160 113q-70 76 -107 182q-37 109 -37 248 zM414 561q0 -164 47 -252q45 -84 153 -84q106 0 152 84q47 88 47 252q0 166 -47 250q-45 82 -154 82q-106 0 -151 -82q-47 -84 -47 -250z" />
+<glyph unicode="p" horiz-adv-x="1243" d="M160 -492v1610h248l43 -145h14q25 39 47 63q31 35 63 54q49 29 80 36q45 12 101 13q88 0 157 -37q71 -37 123 -111q49 -70 78 -180.5t29 -249.5q0 -141 -29 -252q-27 -104 -82 -182q-53 -74 -125 -111q-74 -37 -159 -36q-55 0 -99 12q-47 14 -78 33q-39 25 -59 45 q-25 25 -47 53h-16q2 -12 5 -33.5t3 -32.5q2 -16 6 -53q2 -18 2 -43v-453h-305zM465 563q0 -72 10 -143q8 -63 31 -107q20 -41 59 -63.5t90 -22.5q90 0 133 86t43 252q0 164 -43 248q-43 82 -135 82q-49 0 -86 -18q-35 -18 -57 -56q-25 -41 -33 -94q-8 -55 -12 -131v-33z " />
+<glyph unicode="q" horiz-adv-x="1243" d="M102 557q0 141 29 252q29 109 80 182.5t127 110.5q74 37 160 37q55 0 100 -13q41 -10 82 -34.5t65 -51.5q25 -29 50 -65h8l24 143h258v-1610h-305v469q0 29 2 48q0 8 2 26.5t2 28.5q0 16 2.5 32.5t4.5 32.5h-13q-29 -45 -47 -65q-27 -31 -63 -51q-43 -25 -80 -35 q-53 -14 -101 -14q-88 0 -157 36q-71 37 -123 111q-53 74 -80 180q-27 105 -27 250zM414 553q0 -170 45 -252t143 -82q55 0 92 19q41 20 62 55q18 33 32 94q12 55 13 131v37q0 72 -10 143q-10 66 -33 107q-25 43 -62 63q-41 23 -96 23q-95 0 -141 -86q-45 -84 -45 -252z" />
+<glyph unicode="r" horiz-adv-x="888" d="M160 0v1118h231l45 -168h15q25 43 53 78q31 37 61 59q37 27 78 39q43 12 100 13h27q6 0 14.5 -1t12.5 -1t13 -2t13 -2q12 0 17 -3v-286q-4 2 -12 2q-7 2 -11 2q-20 4 -29 4q-6 0 -16 1t-14 1h-25q-63 0 -108 -14q-49 -15 -86 -49q-35 -31 -54 -89q-20 -61 -20 -133v-569 h-305z" />
+<glyph unicode="s" horiz-adv-x="983" d="M98 827q0 80 29 136q31 58 86 98q57 41 133 59q77 18 172 19q96 0 191 -23q80 -20 184 -69l-92 -216q-82 39 -146 60q-72 23 -137 22q-61 0 -90 -22q-27 -20 -27 -60q0 -22 7 -36q6 -14 28 -31q33 -25 60 -37q57 -29 98 -47q71 -31 129 -62q55 -29 96 -69q45 -45 64 -90 q23 -55 22 -127q0 -84 -33 -154q-33 -68 -90 -110q-59 -43 -143 -66q-86 -23 -188 -22q-41 0 -103 4q-45 2 -88 12q-72 16 -82 18q-35 10 -78 31v252q37 -18 88 -39q31 -12 93 -29q45 -12 90 -18q57 -8 80 -8q33 0 69 8q29 6 49 20q16 10 27 33q8 16 8 39q0 22 -6 37 q-6 12 -31 35q-14 12 -67 43q-27 14 -119 57q-88 41 -127 66q-61 39 -88 71q-33 37 -51 93q-17 46 -17 122z" />
+<glyph unicode="t" horiz-adv-x="847" d="M47 889v129l168 102l88 236h195v-238h272v-229h-272v-539q0 -63 32 -96q31 -31 84 -31q41 0 86 10q37 8 82 25v-227q-43 -23 -106 -37q-59 -14 -139 -14q-70 0 -135.5 18t-108.5 59q-47 43 -74 113q-27 68 -26 180v539h-146z" />
+<glyph unicode="u" horiz-adv-x="1282" d="M154 389v729h305v-653q0 -121 37 -182q35 -59 116 -60q59 0 101 25q39 25 63 69q23 43 33 117q10 76 10 158v526h305v-1118h-233l-41 143h-16q-23 -41 -60 -73q-29 -25 -76 -52q-35 -18 -86 -28t-94 -10q-82 0 -149 24q-63 23 -115 74q-49 49 -74 127q-26 84 -26 184z " />
+<glyph unicode="v" horiz-adv-x="1103" d="M0 1118h319l185 -637q14 -43 28 -119q14 -70 17 -110h6q2 49 16 113q16 78 29 116l184 637h320l-395 -1118h-314z" />
+<glyph unicode="w" horiz-adv-x="1650" d="M0 1118h303l113 -495q10 -47 18 -93l19 -110q4 -23 8 -50.5l8 -54.5q8 -66 10 -79h6q0 8 4 49q4 45 9 65q4 35 10 72q8 49 12 70q8 49 10 55q4 27 7 35l122 536h336l117 -536q2 -8 6 -31t6 -37l17 -98q6 -31 14 -103q8 -66 8 -77h6q0 6 4.5 30.5t6.5 42.5q8 49 16 107 q4 18 10 56t11 56q8 51 18 95l117 495h299l-305 -1118h-332l-86 391q-2 6 -5 23.5t-5 25.5l-15 70q-8 39 -16 84q-4 25 -9.5 46.5t-9.5 41.5l-18 100.5t-25 122.5h-6q-8 -47 -20.5 -106.5t-22.5 -116.5l-16 -88q-10 -59 -17 -86q-8 -39 -14 -72q-2 -8 -5 -25.5t-5 -23.5 l-90 -387h-328z" />
+<glyph unicode="x" horiz-adv-x="1120" d="M10 0l379 571l-360 547h346l186 -336l189 336h346l-365 -547l381 -571h-346l-205 362l-205 -362h-346z" />
+<glyph unicode="y" horiz-adv-x="1103" d="M0 1118h334l180 -629q16 -57 23 -110q8 -82 10 -107h6q2 14 6 52q4 41 8 57q2 8 5 28.5t6 28.5q0 4 14 51l176 629h336l-442 -1261q-61 -176 -168 -263q-109 -86 -269 -86q-66 0 -90 5q-41 6 -65 12v242q16 -4 53 -9q41 -4 67 -4q47 0 82 13q33 12 58 36q27 27 43 58 q18 34 30 73l19 56z" />
+<glyph unicode="z" horiz-adv-x="935" d="M55 0v180l457 705h-426v233h772v-198l-442 -687h461v-233h-822z" />
+<glyph unicode="{" horiz-adv-x="743" d="M31 449v239q55 0 110 10q47 8 82 31q34 22 49 55q16 37 15 82v318q0 74 18 127q18 51 70 86q49 34 135 49q92 16 215 16v-225q-37 0 -72 -6q-33 -6 -55.5 -22.5t-34.5 -43t-12 -69.5v-299q-6 -187 -234 -222v-12q117 -18 177 -71q59 -55 57 -150v-299q0 -43 12 -69.5 t35 -43.5q20 -14 55 -20q45 -8 72 -8v-226q-123 0 -215 17q-86 15 -135 49q-51 35 -70 86q-18 53 -18 127v315q0 96 -65.5 137.5t-190.5 41.5z" />
+<glyph unicode="|" d="M455 -465v2015h219v-2015h-219z" />
+<glyph unicode="}" horiz-adv-x="743" d="M31 -98q31 0 71 8q37 8 56 20q23 16 35 43t12 70v299q-2 94 57 150q59 53 176 71v12q-227 34 -233 222v299q0 43 -12.5 69.5t-35 43t-55.5 22.5q-31 6 -71 6v225q125 0 217 -16q84 -14 133 -49q51 -35 70 -86q18 -53 18 -127v-318q0 -51 14 -82q15 -34 49 -55 q35 -23 82 -31q55 -10 111 -10v-239q-125 0 -190.5 -41t-65.5 -138v-315q0 -74 -18 -127q-18 -51 -70 -86q-49 -35 -133 -49q-92 -16 -217 -17v226z" />
+<glyph unicode="~" d="M88 551v231q51 55 115 82q61 27 141 27q39 0 55.5 -2t53.5 -10q33 -8 63 -19q53 -20 84 -33q57 -25 66 -26l53 -17q35 -8 45 -10q14 -2 43 -2q25 0 59 10q31 9 62 25q27 12 59 39q29 23 53 47v-231q-102 -109 -256 -109q-39 0 -55 2q-20 2 -55 10q-33 8 -64 19 q-41 14 -82 32l-32.5 13.5l-32.5 13.5q-27 12 -53 19q-18 4 -43 8q-14 2 -45 2q-25 0 -60 -10q-31 -9 -61 -25q-20 -10 -57.5 -39t-55.5 -47z" />
+<glyph unicode="&#xa1;" horiz-adv-x="585" d="M117 -369l51 975h244l51 -975h-346zM117 948q0 47 14 78q14 33 39 53q20 18 55 28.5t66 10.5q35 0 69.5 -10t55.5 -29q27 -23 37 -53q14 -39 14 -78q0 -41 -14 -80q-10 -31 -37 -53q-20 -18 -56 -29q-27 -8 -69 -8q-39 0 -66 8q-35 10 -55 29q-25 20 -39 53 q-14 31 -14 80z" />
+<glyph unicode="&#xa2;" d="M143 743.5q0 143.5 27 241.5t82 170q51 68 127 105q80 41 164 51v172h178v-164q39 0 76 -6q49 -8 73 -15q37 -9 68 -18q37 -10 55 -20l-86 -226l-47 19l-55 18l-55 12q-37 4 -52 4q-70 0 -112 -20q-47 -23 -76 -61q-29 -41 -41 -105q-14 -76 -14 -151q0 -172 57 -250 q57 -80 186 -80q76 0 146 18q74 18 121 43v-239q-61 -33 -112.5 -45.5t-131.5 -16.5v-200h-178v206q-92 12 -166 50q-72 37 -125 104q-55 72 -82 166t-27 237.5z" />
+<glyph unicode="&#xa3;" d="M82 0v248q45 18 76 39q27 16 57 51q20 23 35 70q12 40 12 98v145h-178v219h178v195q0 113 31 192q29 78 88 129q61 53 131 74q80 23 168 23q111 0 199 -25q98 -27 170 -57l-93 -230q-57 23 -129 46q-58 18 -122 18q-68 0 -105 -39q-37 -41 -37 -133v-193h334v-219h-334 v-143q0 -49 -14 -96q-12 -41 -35 -70q-18 -23 -49 -47q-23 -18 -53 -35h678v-260h-1008z" />
+<glyph unicode="&#xa4;" d="M92 1047l148 147l127 -127q41 23 94 39q49 14 102 14q45 0 103 -14q45 -10 94 -41l127 129l149 -143l-129 -129q25 -43 39.5 -92.5t14.5 -106.5q0 -59 -15 -105q-16 -51 -39 -94l125 -125l-145 -145l-127 125q-39 -20 -94 -37q-45 -14 -102.5 -14t-106.5 12 q-43 10 -92 39l-125 -123l-146 145l127 125q-53 94 -53 197q0 59 14 104q16 53 39 93zM375 723q0 -43 14 -74q16 -35 41 -59.5t59 -40.5q31 -14 74 -14q45 0 76 14t61 41q23 20 41 59q14 31 14.5 74t-14.5 74q-18 43 -41 61q-25 23 -61.5 39t-75.5 16q-37 0 -73.5 -16 t-59.5 -39q-25 -25 -41 -61q-14 -31 -14 -74z" />
+<glyph unicode="&#xa5;" d="M8 1462h316l241 -602l244 602h313l-362 -747h194v-178h-245v-138h245v-178h-245v-221h-287v221h-248v178h248v138h-248v178h191z" />
+<glyph unicode="&#xa6;" d="M455 350h219v-815h-219v815zM455 735v815h219v-815h-219z" />
+<glyph unicode="&#xa7;" horiz-adv-x="993" d="M106 59v207q25 -12 84 -37q66 -27 91 -32q23 -6 90 -21q39 -8 84 -8q61 0 94 8q35 8 59 27q22 15 31 37q10 25 10 45t-8 45q-6 20 -29 39q-14 12 -63 39q-33 16 -107 49q-51 20 -137 63q-53 27 -100 74q-41 41 -62 90q-23 55 -22 121q0 41 10 82q10 37 29 69q18 31 43 56 q27 27 51 43q-65 40 -98 98q-35 59 -35 135q0 66 29 119q27 49 83 90q53 39 127 59q70 20 166 21q109 0 191 -23q80 -23 172 -61l-82 -190q-84 39 -139 57q-76 27 -148 26q-80 0 -119 -22q-37 -20 -36 -72q0 -27 12 -47q10 -16 39 -39q31 -23 65 -39q76 -35 97 -43 q71 -28 129 -61q59 -35 100 -76q45 -45 65 -92q23 -51 23 -113q0 -98 -35 -161q-33 -59 -90 -99q66 -43 94 -92q31 -53 31 -127t-31 -133q-33 -61 -88 -102q-61 -45 -139 -66q-86 -23 -182 -22q-113 0 -195 20q-76 18 -154 59zM344 827q0 -61 57 -112q47 -41 174 -99l15 -6 q20 16 28.5 24.5t24.5 33.5q12 18 19 41q6 20 6 47q0 29 -11 59q-8 25 -36 53q-23 23 -72 49.5t-115 49.5q-16 -6 -34.5 -20.5t-28.5 -31.5q-12 -18 -19 -41q-8 -29 -8 -47z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1181" d="M248 1405q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM651 1405q0 41 11 61q12 27 30 41 q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1703" d="M100 731q0 109 27 201q29 98 76 178q53 90 116.5 153.5t153.5 116.5q80 47 178 76q92 27 201 27t201 -27q98 -29 178 -76q90 -53 153.5 -116.5t116.5 -153.5q47 -80 76 -178q27 -92 27 -200.5t-27 -201.5q-29 -98 -76 -178q-53 -90 -116.5 -153.5t-153.5 -116.5 q-80 -47 -178 -76q-92 -27 -201 -26.5t-201 26.5q-98 29 -178 76q-90 53 -153.5 116.5t-116.5 153.5q-47 80 -76 178q-27 92 -27 201zM242 731q0 -127 49 -237q53 -119 129 -195t194 -129q111 -49 238 -49t238 49q119 53 194.5 129t128.5 195q49 111 49 237.5t-49 237.5 q-53 119 -129 194.5t-194 128.5q-111 49 -238 49t-238 -49q-119 -53 -194.5 -129t-128.5 -194q-49 -111 -49 -238zM461 733q0 94 26 189q25 84 78 147q51 61 131 94q82 35 185 35q80 0 159.5 -22.5t145.5 -55.5l-74 -168q-113 57 -217 58q-96 0 -150 -74q-53 -76 -53 -205 q0 -137 47 -207q49 -74 156 -73q53 0 123 16q65 15 123 43v-191q-58 -28 -117 -43q-55 -14 -135 -14q-104 0 -186 35t-134 94q-55 63 -82 150q-26 81 -26 192z" />
+<glyph unicode="&#xaa;" horiz-adv-x="741" d="M47 975q0 61 21 102q18 37 63 68q37 25 100 39q76 16 134 18l90 4q0 63 -29 90t-84 27q-45 0 -88 -16q-59 -23 -102 -45l-66 135q74 37 135 57q74 25 166 25q70 0 119 -19q51 -18 84 -55q34 -37 49 -86q16 -53 16 -113v-442h-135l-31 110q-41 -59 -96 -90 q-59 -33 -125 -32q-43 0 -90 14q-41 12 -69 41q-31 31 -46 70q-16 45 -16 98zM252 977q0 -37 18.5 -55.5t46.5 -18.5q37 0 58 10q25 12 43 31q20 18 28 47q8 25 9 60v36l-82 -6q-31 -2 -62 -14q-27 -10 -37 -23q-16 -20 -18 -32q-4 -25 -4 -35z" />
+<glyph unicode="&#xab;" horiz-adv-x="1196" d="M82 547v26l309 455l219 -119l-217 -348l217 -348l-219 -119zM588 547v26l309 455l219 -119l-217 -348l217 -348l-219 -119z" />
+<glyph unicode="&#xac;" d="M88 612v219h952v-583h-219v364h-733z" />
+<glyph unicode="&#xad;" horiz-adv-x="657" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="&#xae;" horiz-adv-x="1703" d="M100 731q0 109 27 201q29 98 76 178q53 90 116.5 153.5t153.5 116.5q80 47 178 76q92 27 201 27t201 -27q98 -29 178 -76q90 -53 153.5 -116.5t116.5 -153.5q47 -80 76 -178q27 -92 27 -200.5t-27 -201.5q-29 -98 -76 -178q-53 -90 -116.5 -153.5t-153.5 -116.5 q-80 -47 -178 -76q-92 -27 -201 -26.5t-201 26.5q-98 29 -178 76q-90 53 -153.5 116.5t-116.5 153.5q-47 80 -76 178q-27 92 -27 201zM242 731q0 -127 49 -237q53 -119 129 -195t194 -129q111 -49 238 -49t238 49q119 53 194.5 129t128.5 195q49 111 49 237.5t-49 237.5 q-53 119 -129 194.5t-194 128.5q-111 49 -238 49t-238 -49q-119 -53 -194.5 -129t-128.5 -194q-49 -111 -49 -238zM543 272v916h264q184 0 266 -70q84 -72 84 -213q0 -96 -39 -149q-41 -57 -104 -84l237 -400h-254l-178 338h-47v-338h-229zM772 778h31q66 0 94.5 29t28.5 94 q0 29 -8 57q-6 25 -22.5 37.5t-39.5 18.5q-25 6 -55 6h-29v-242z" />
+<glyph unicode="&#xaf;" horiz-adv-x="1024" d="M-6 1556v201h1036v-201h-1036z" />
+<glyph unicode="&#xb0;" horiz-adv-x="876" d="M92 1136.5q0 73.5 26.5 135t74.5 108.5q49 49 110.5 76t135 27t135 -26.5t110.5 -76.5q47 -47 73.5 -108.5t26.5 -135t-26.5 -135t-73.5 -108.5q-46 -46 -111 -74q-61 -27 -134.5 -26.5t-135.5 26.5q-65 28 -110 74q-47 47 -74 108.5t-27 135zM283 1137q0 -31 12 -59.5 t32.5 -49t49.5 -33t61.5 -12.5t59.5 12q33 14 51 33q20 20 32.5 49t12.5 60q0 35 -12 61q-12 29 -33 49q-23 23 -51 35q-27 12 -59.5 12t-61.5 -12q-27 -12 -49 -35q-20 -20 -33 -49q-12 -26 -12 -61z" />
+<glyph unicode="&#xb1;" d="M88 0v219h952v-219h-952zM88 674v219h367v369h219v-369h366v-219h-366v-365h-219v365h-367z" />
+<glyph unicode="&#xb2;" horiz-adv-x="774" d="M47 1354q61 55 146 94q76 35 190 35q61 0 121 -17q49 -14 92 -47q39 -31 61 -78q20 -43 21 -108q0 -46 -12 -86q-14 -47 -39 -82q-37 -53 -70 -86q-61 -61 -102 -98l-105 -95h352v-200h-647v168l224 219l27.5 26.5l29.5 28.5t20 23q37 39 50 59q18 29 24 51q8 33 8 51 q0 37 -24 58q-23 20 -64 20q-43 0 -84 -20q-45 -23 -96 -68z" />
+<glyph unicode="&#xb3;" horiz-adv-x="774" d="M59 639v190q66 -41 131 -65q63 -25 139.5 -25t108.5 27q35 29 35 80q0 25 -8 41q-8 18 -27 33q-14 10 -51 22q-35 10 -80 10h-112v160h92q57 0 84 8q35 10 51 25q14 12 22 35q6 18 7 41q0 39 -25 63.5t-76 24.5q-47 0 -90 -19q-31 -12 -98 -59l-101 141q66 49 138 78 q76 31 178 31q59 0 115 -17q49 -14 92 -47q39 -29 59 -71q23 -45 23 -97q0 -68 -41 -119q-43 -53 -129 -79v-13q51 -8 88 -30t61.5 -49.5t36.5 -61.5q12 -33 12 -68q0 -121 -88 -190.5t-274 -69.5q-84 0 -142 17q-65 18 -131 53z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1181" d="M332 1241v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1288" d="M160 -492v1610h305v-653q0 -121 37 -182q35 -59 119 -60q58 0 98 25q37 23 61.5 70t34.5 116q10 76 10 158v526h305v-1118h-233l-43 150h-12q-31 -80 -88 -127q-53 -43 -127 -43q-49 0 -99 22q-43 20 -73 68l6 -84q2 -25 2 -80q0 -14 1 -40t1 -38v-320h-305z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1339" d="M113 1042q0 150 32 246q33 94 93 158q57 61 143 86q82 25 182 24h604v-1816h-161v1616h-166v-1616h-162v819q-61 -18 -146 -18q-88 0 -172 26q-78 25 -133 84q-51 53 -84 156q-30 94 -30 235z" />
+<glyph unicode="&#xb7;" horiz-adv-x="583" d="M117 723q0 41 14 80q10 29 37 51q25 22 55 31q27 8 70 8q41 0 67 -8q31 -9 56 -31q23 -20 37 -51t14 -80q0 -47 -14 -78q-16 -35 -37 -53.5t-55.5 -28.5t-67.5 -10q-35 0 -70 10t-55 29q-27 23 -37 53q-14 39 -14 78z" />
+<glyph unicode="&#xb8;" horiz-adv-x="419" d="M-37 -303q4 0 15.5 -3t17.5 -5q6 0 19.5 -2t19.5 -4t18.5 -2t18.5 -3q12 -2 34 -2q28 0 50 13q23 12 22.5 49t-37.5 65t-129 43l78 154h193l-27 -61q35 -10 59 -27q37 -25 52 -41q25 -27 36 -53q14 -29 15 -68q0 -59 -14.5 -102t-53.5 -76t-94 -47q-61 -16 -147 -17 q-43 0 -80 7q-45 8 -66 14v168z" />
+<glyph unicode="&#xb9;" horiz-adv-x="774" d="M92 1227l301 235h191v-876h-238v446v51q0 10 1 31t1 31t2 28.5t2 26.5t1 22.5t1 16.5q-4 -6 -16 -18q-6 -4 -10 -10.5t-8.5 -12.5t-10.5 -10t-12 -10q-10 -10 -18 -17l-78 -61z" />
+<glyph unicode="&#xba;" horiz-adv-x="753" d="M57 1116q0 82 22.5 153.5t63.5 114.5q43 45 101 70q59 25 135 25q68 0 125 -24.5t100 -70t68 -114.5q25 -68 24 -154q0 -84 -22 -155q-20 -63 -65.5 -112.5t-100.5 -72.5q-57 -25 -133 -24q-68 0 -127 24q-55 23 -101 72q-43 47 -67 113q-23 61 -23 155zM260 1116 q0 -104 27 -151q29 -49 90 -49.5t88 49.5q27 47 27 151q0 102 -27 150q-27 49 -88.5 49t-89.5 -49q-27 -48 -27 -150z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1196" d="M84 213l217 348l-217 348l219 119l309 -455v-26l-309 -453zM590 213l217 348l-217 348l219 119l309 -455v-26l-309 -453z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1802" d="M1370 1462l-811 -1462h-239l811 1462h239zM47 1227l301 235h191v-876h-238v446v51q0 10 1 31t1 31t2 28.5t2 26.5t1 22.5t1 16.5q-4 -6 -16 -18q-6 -4 -10 -10.5t-8.5 -12.5t-10.5 -10t-12 -10q-10 -10 -18 -17l-78 -61zM1682 151h-125v-151h-238v151h-383v154l385 577 h236v-563h125v-168zM1319 319v164q0 14 1 43t1 45q0 31 4 96q-2 -4 -7 -16t-7 -18q-16 -37 -20 -45q-6 -12 -12.5 -23.5t-10.5 -20.5l-20 -34l-127 -191h198z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1802" d="M1370 1462l-811 -1462h-239l811 1462h239zM47 1227l301 235h191v-876h-238v446v51q0 10 1 31t1 31t2 28.5t2 26.5t1 22.5t1 16.5q-4 -6 -16 -18q-6 -4 -10 -10.5t-8.5 -12.5t-10.5 -10t-12 -10q-10 -10 -18 -17l-78 -61zM1061 768q61 55 146 94q76 35 190 35 q61 0 121 -17q49 -14 92 -47q39 -31 61 -78q20 -43 21 -108q0 -46 -12 -86q-14 -47 -39 -82q-37 -53 -70 -86q-61 -61 -102 -98l-105 -95h352v-200h-647v168l224 219l27.5 26.5l29.5 28.5t20 23q37 39 50 59q18 29 24 51q8 33 8 51q0 37 -24 58q-23 20 -64 20q-43 0 -84 -20 q-45 -23 -96 -68z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1802" d="M1441 1462l-811 -1462h-239l811 1462h239zM1712 151h-125v-151h-238v151h-383v154l385 577h236v-563h125v-168zM1349 319v164q0 14 1 43t1 45q0 31 4 96q-2 -4 -7 -16t-7 -18q-16 -37 -20 -45q-6 -12 -12.5 -23.5t-10.5 -20.5l-20 -34l-127 -191h198zM90 639v190 q66 -41 131 -65q63 -25 139.5 -25t108.5 27q35 29 35 80q0 25 -8 41q-8 18 -27 33q-14 10 -51 22q-35 10 -80 10h-112v160h92q57 0 84 8q35 10 51 25q14 12 22 35q6 18 7 41q0 39 -25 63.5t-76 24.5q-47 0 -90 -19q-31 -12 -98 -59l-101 141q66 49 138 78q76 31 178 31 q59 0 115 -17q49 -14 92 -47q39 -29 59 -71q23 -45 23 -97q0 -68 -41 -119q-43 -53 -129 -79v-13q51 -8 88 -30t61.5 -49.5t36.5 -61.5q12 -33 12 -68q0 -121 -88 -190.5t-274 -69.5q-84 0 -142 17q-65 18 -131 53z" />
+<glyph unicode="&#xbf;" horiz-adv-x="937" d="M66 -29q0 55 14 113q12 47 41 92q27 43 69 82q59 55 97 84l67 57q20 18 41 47q14 20 20.5 45t6.5 56v59h264v-74q0 -45 -10 -92q-8 -37 -33 -80q-23 -39 -55 -71q-49 -49 -82 -74l-72 -59q-27 -23 -47 -52q-12 -16 -25 -53q-8 -25 -8 -65q0 -57 39 -95q40 -37 117 -36 q70 0 149 30q96 37 164 70l103 -221q-66 -37 -95 -49l-104 -39q-49 -16 -110.5 -26.5t-110.5 -10.5q-101 0 -184 24q-74 23 -138 72q-57 45 -87.5 112.5t-30.5 153.5zM369 948q0 47 14 78q14 33 39 53q20 18 55 28.5t66 10.5q35 0 69.5 -10t55.5 -29q27 -23 37 -53 q14 -39 14 -78q0 -41 -14 -80q-10 -31 -37 -53q-20 -18 -56 -29q-27 -8 -69 -8q-39 0 -66 8q-35 10 -55 29q-25 20 -39 53q-14 31 -14 80z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1329" d="M0 0l475 1468h379l477 -1468h-313l-100 348h-504l-101 -348h-313zM489 608h357l-94 320l-19 59q-6 20 -11 43t-13 47q-4 16 -13.5 50t-13.5 50.5t-16 84.5l-11 -52q-8 -41 -14 -63l-9 -31.5t-9.5 -36t-16.5 -63.5l-14 -53q-2 -12 -6 -20.5t-4 -14.5zM320 1886v21h342 q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1329" d="M0 0l475 1468h379l477 -1468h-313l-100 348h-504l-101 -348h-313zM489 608h357l-94 320l-19 59q-6 20 -11 43t-13 47q-4 16 -13.5 50t-13.5 50.5t-16 84.5l-11 -52q-8 -41 -14 -63l-9 -31.5t-9.5 -36t-16.5 -63.5l-14 -53q-2 -12 -6 -20.5t-4 -14.5zM494 1579v27l45 67 q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1329" d="M0 0l475 1468h379l477 -1468h-313l-100 348h-504l-101 -348h-313zM489 608h357l-94 320l-19 59q-6 20 -11 43t-13 47q-4 16 -13.5 50t-13.5 50.5t-16 84.5l-11 -52q-8 -41 -14 -63l-9 -31.5t-9.5 -36t-16.5 -63.5l-14 -53q-2 -12 -6 -20.5t-4 -14.5zM254 1579v27 q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1329" d="M0 0l475 1468h379l477 -1468h-313l-100 348h-504l-101 -348h-313zM489 608h357l-94 320l-19 59q-6 20 -11 43t-13 47q-4 16 -13.5 50t-13.5 50.5t-16 84.5l-11 -52q-8 -41 -14 -63l-9 -31.5t-9.5 -36t-16.5 -63.5l-14 -53q-2 -12 -6 -20.5t-4 -14.5zM275 1577 q6 82 26 137q23 63 53 97q37 41 76 57q43 18 97 18q37 0 79 -16l78 -35q10 -4 36 -17.5t40 -19.5q39 -16 74 -16q29 0 49 26q18 25 31 80h149q-6 -82 -27 -137q-23 -59 -53 -96q-33 -39 -76 -57.5t-96 -18.5q-37 0 -80 16q-18 6 -78 37q-39 20 -75 35q-39 16 -74 17 q-31 0 -49 -27q-20 -29 -31 -80h-149z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1329" d="M0 0l475 1468h379l477 -1468h-313l-100 348h-504l-101 -348h-313zM489 608h357l-94 320l-19 59q-6 20 -11 43t-13 47q-4 16 -13.5 50t-13.5 50.5t-16 84.5l-11 -52q-8 -41 -14 -63l-9 -31.5t-9.5 -36t-16.5 -63.5l-14 -53q-2 -12 -6 -20.5t-4 -14.5zM324 1743q0 41 10 61 q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM727 1743q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8 q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1329" d="M0 0l475 1468h379l477 -1468h-313l-100 348h-504l-101 -348h-313zM489 608h357l-94 320l-19 59q-6 20 -11 43t-13 47q-4 16 -13.5 50t-13.5 50.5t-16 84.5l-11 -52q-8 -41 -14 -63l-9 -31.5t-9.5 -36t-16.5 -63.5l-14 -53q-2 -12 -6 -20.5t-4 -14.5zM918 1566.5 q0 -57.5 -19 -100.5q-18 -41 -55 -75q-35 -33 -80 -48q-49 -16 -100 -16t-101 16q-45 14 -79 48q-27 25 -50 75q-18 43 -18 99q0 57 18 100q20 47 50 74q35 33 79 47q49 16 101 16q49 0 98 -16q47 -16 82 -47q31 -27 53 -74q21 -41 21 -98.5zM760 1565q0 47 -26.5 71.5 t-69.5 24.5t-69.5 -24.5t-26.5 -71.5q0 -45 24 -70q27 -27 72 -27q39 0 69 27q27 25 27 70z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1886" d="M0 0l655 1462h1112v-254h-532v-321h496v-254h-496v-377h532v-256h-841v348h-461l-150 -348h-315zM578 608h348v590h-97z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1304" d="M119 729q0 170 45 305q45 133 133 238q84 100 215 155q129 55 293 56q113 0 219 -27q109 -27 209 -76l-100 -252q-88 43 -164 68q-86 29 -164 29q-88 0 -157.5 -35t-115.5 -98q-43 -61 -69 -158q-25 -92 -25 -207q0 -121 21 -209q20 -86 67 -153q43 -61 113 -95 q68 -33 166 -32q94 0 178 20q102 25 195 57v-260q-33 -14 -95 -35q-31 -10 -96 -22t-100 -14q-70 -4 -111 -4q-170 0 -293 55q-129 57 -204 151q-82 100 -121 235.5t-39 307.5zM471 -303q4 0 15.5 -3t17.5 -5q6 0 19.5 -2t19.5 -4t18.5 -2t18.5 -3q12 -2 34 -2q28 0 50 13 q23 12 22.5 49t-37.5 65t-129 43l78 154h193l-27 -61q35 -10 59 -27q37 -25 52 -41q25 -27 36 -53q14 -29 15 -68q0 -59 -14.5 -102t-53.5 -76t-94 -47q-61 -16 -147 -17q-43 0 -80 7q-45 8 -66 14v168z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1146" d="M184 0v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256h-842zM258 1886v21h342q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1146" d="M184 0v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256h-842zM424 1579v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xca;" horiz-adv-x="1146" d="M184 0v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256h-842zM207 1579v27q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98 q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1146" d="M184 0v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256h-842zM273 1743q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8 q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM676 1743q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xcc;" horiz-adv-x="796" d="M66 0v176l178 82v946l-178 82v176h665v-176l-178 -82v-946l178 -82v-176h-665zM41 1886v21h342q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xcd;" horiz-adv-x="796" d="M66 0v176l178 82v946l-178 82v176h665v-176l-178 -82v-946l178 -82v-176h-665zM238 1579v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xce;" horiz-adv-x="796" d="M66 0v176l178 82v946l-178 82v176h665v-176l-178 -82v-946l178 -82v-176h-665zM-17 1579v27q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98 q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xcf;" horiz-adv-x="796" d="M66 0v176l178 82v946l-178 82v176h665v-176l-178 -82v-946l178 -82v-176h-665zM53 1743q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8 q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM456 1743q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1433" d="M47 596v254h137v612h428q160 0 291 -47q129 -46 221 -135q92 -88 142 -225q49 -135 49 -310q0 -182 -51 -325q-49 -139 -146 -232q-100 -96 -233 -141q-141 -47 -316 -47h-385v596h-137zM494 256h114q197 0 295 121q98 119 98 360q0 123 -24 211q-23 84 -72 146 q-45 57 -114.5 85.5t-153.5 28.5h-143v-358h237v-254h-237v-340z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1603" d="M184 0v1462h391l574 -1095h6l-6 149q0 10 -2 31.5t-2 34t-1 35t-1 32.5q0 12 -1 34t-1 32v55v692h278v-1462h-393l-575 1106h-9q8 -102 11 -154l6 -135q2 -47 2 -129v-688h-277zM394 1577q6 82 26 137q23 63 53 97q37 41 76 57q43 18 97 18q37 0 79 -16l78 -35 q10 -4 36 -17.5t40 -19.5q39 -16 74 -16q29 0 49 26q18 25 31 80h149q-6 -82 -27 -137q-23 -59 -53 -96q-33 -39 -76 -57.5t-96 -18.5q-37 0 -80 16q-18 6 -78 37q-39 20 -75 35q-39 16 -74 17q-31 0 -49 -27q-20 -29 -31 -80h-149z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1546" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q166 0 291 -53q121 -51 203 -151.5t121 -238.5q39 -135 39 -309q0 -172 -39 -307q-41 -141 -121 -240q-76 -94 -205 -151q-123 -55 -291 -55t-291 55q-129 57 -204 151q-80 98 -121 240q-39 135 -39 309z M438 733q0 -119 21 -207q23 -98 61 -155q43 -63 105 -97q66 -35 149 -34q86 0 151.5 34.5t104.5 96.5q41 68 60 155q20 102 20 207t-20 207q-18 88 -60 156q-41 66 -102 98q-63 33 -151.5 33t-151.5 -33q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207zM416 1886v21 h342q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1546" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q166 0 291 -53q121 -51 203 -151.5t121 -238.5q39 -135 39 -309q0 -172 -39 -307q-41 -141 -121 -240q-76 -94 -205 -151q-123 -55 -291 -55t-291 55q-129 57 -204 151q-80 98 -121 240q-39 135 -39 309z M438 733q0 -119 21 -207q23 -98 61 -155q43 -63 105 -97q66 -35 149 -34q86 0 151.5 34.5t104.5 96.5q41 68 60 155q20 102 20 207t-20 207q-18 88 -60 156q-41 66 -102 98q-63 33 -151.5 33t-151.5 -33q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207zM590 1579v27 l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1546" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q166 0 291 -53q121 -51 203 -151.5t121 -238.5q39 -135 39 -309q0 -172 -39 -307q-41 -141 -121 -240q-76 -94 -205 -151q-123 -55 -291 -55t-291 55q-129 57 -204 151q-80 98 -121 240q-39 135 -39 309z M438 733q0 -119 21 -207q23 -98 61 -155q43 -63 105 -97q66 -35 149 -34q86 0 151.5 34.5t104.5 96.5q41 68 60 155q20 102 20 207t-20 207q-18 88 -60 156q-41 66 -102 98q-63 33 -151.5 33t-151.5 -33q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207zM350 1579v27 q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1546" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q166 0 291 -53q121 -51 203 -151.5t121 -238.5q39 -135 39 -309q0 -172 -39 -307q-41 -141 -121 -240q-76 -94 -205 -151q-123 -55 -291 -55t-291 55q-129 57 -204 151q-80 98 -121 240q-39 135 -39 309z M438 733q0 -119 21 -207q23 -98 61 -155q43 -63 105 -97q66 -35 149 -34q86 0 151.5 34.5t104.5 96.5q41 68 60 155q20 102 20 207t-20 207q-18 88 -60 156q-41 66 -102 98q-63 33 -151.5 33t-151.5 -33q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207zM383 1577 q6 82 26 137q23 63 53 97q37 41 76 57q43 18 97 18q37 0 79 -16l78 -35q10 -4 36 -17.5t40 -19.5q39 -16 74 -16q29 0 49 26q18 25 31 80h149q-6 -82 -27 -137q-23 -59 -53 -96q-33 -39 -76 -57.5t-96 -18.5q-37 0 -80 16q-18 6 -78 37q-39 20 -75 35q-39 16 -74 17 q-31 0 -49 -27q-20 -29 -31 -80h-149z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1546" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q166 0 291 -53q121 -51 203 -151.5t121 -238.5q39 -135 39 -309q0 -172 -39 -307q-41 -141 -121 -240q-76 -94 -205 -151q-123 -55 -291 -55t-291 55q-129 57 -204 151q-80 98 -121 240q-39 135 -39 309z M438 733q0 -119 21 -207q23 -98 61 -155q43 -63 105 -97q66 -35 149 -34q86 0 151.5 34.5t104.5 96.5q41 68 60 155q20 102 20 207t-20 207q-18 88 -60 156q-41 66 -102 98q-63 33 -151.5 33t-151.5 -33q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207zM428 1743 q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM831 1743q0 41 11 61q12 27 30 41q16 14 45 25 q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xd7;" d="M109 1024l151 154l301 -299l305 299l154 -150l-305 -305l301 -303l-150 -152l-305 301l-301 -299l-149 152l297 301z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1546" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q86 0 168 -17q76 -14 143 -47l70 111l166 -96l-80 -129q94 -98 141 -244q45 -141 46 -330q0 -172 -39 -307q-41 -141 -121 -240q-76 -94 -205 -151q-123 -55 -291 -55q-178 0 -307 61l-72 -117l-168 94 l82 134q-96 100 -143 247q-47 152 -47 336zM438 733q0 -178 47 -295l457 746q-68 43 -166 43q-88 0 -151 -33q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207zM612 279q37 -20 74 -29q45 -10 88 -10q86 0 151.5 34.5t104.5 96.5q41 68 60 155q20 102 20 207 q0 170 -43 287z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1464" d="M174 520v942h309v-919q0 -76 17 -137q14 -55 47 -95q31 -37 78 -55q41 -16 110 -16q131 0 189 75q59 78 59 230v917h309v-946q0 -113 -34.5 -213t-104.5 -170q-76 -76 -176 -113q-111 -41 -250 -40q-135 0 -238 38q-106 41 -174 109q-63 63 -104 172q-37 98 -37 221z M393 1886v21h342q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xda;" horiz-adv-x="1464" d="M174 520v942h309v-919q0 -76 17 -137q14 -55 47 -95q31 -37 78 -55q41 -16 110 -16q131 0 189 75q59 78 59 230v917h309v-946q0 -113 -34.5 -213t-104.5 -170q-76 -76 -176 -113q-111 -41 -250 -40q-135 0 -238 38q-106 41 -174 109q-63 63 -104 172q-37 98 -37 221z M570 1579v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1464" d="M174 520v942h309v-919q0 -76 17 -137q14 -55 47 -95q31 -37 78 -55q41 -16 110 -16q131 0 189 75q59 78 59 230v917h309v-946q0 -113 -34.5 -213t-104.5 -170q-76 -76 -176 -113q-111 -41 -250 -40q-135 0 -238 38q-106 41 -174 109q-63 63 -104 172q-37 98 -37 221z M317 1579v27q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1464" d="M174 520v942h309v-919q0 -76 17 -137q14 -55 47 -95q31 -37 78 -55q41 -16 110 -16q131 0 189 75q59 78 59 230v917h309v-946q0 -113 -34.5 -213t-104.5 -170q-76 -76 -176 -113q-111 -41 -250 -40q-135 0 -238 38q-106 41 -174 109q-63 63 -104 172q-37 98 -37 221z M393 1743q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM796 1743q0 41 11 61q12 27 30 41 q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1193" d="M0 1462h336l262 -602l264 602h334l-444 -893v-569h-308v559zM422 1579v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xde;" horiz-adv-x="1224" d="M184 0v1462h310v-229h161q127 0 213 -33q94 -35 150 -94q59 -63 86 -145q29 -90 29 -191q0 -94 -25 -180t-84 -152q-61 -68 -153.5 -106.5t-237.5 -38.5h-139v-293h-310zM494 543h84q119 0 182 53q59 51 59 174q0 106 -53 160q-51 51 -168 51h-104v-438z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1394" d="M160 0v1139q0 111 36.5 190.5t106.5 133t164 77.5q102 27 213 27q119 0 209 -21q92 -20 160 -63q66 -43 102 -103q37 -61 37 -139q0 -66 -20.5 -113t-53.5 -86q-35 -41 -70 -67l-69 -53q-41 -33 -53 -45q-20 -20 -21 -43q0 -18 12 -37q8 -14 39 -37q20 -16 68 -45 q41 -25 98 -64q53 -33 86 -63q43 -39 66 -72q27 -39 39 -84q14 -53 14 -106q0 -172 -117 -258q-119 -88 -344 -88q-100 0 -169.5 14t-133.5 49v242q23 -14 59 -31q39 -18 72 -29q37 -12 78 -18q53 -8 74 -8q82 0 125 30.5t43 92.5q0 28 -6 49q-4 16 -29 41q-20 20 -57 45 q-55 37 -97 59q-59 35 -106 68q-29 20 -68 63q-25 29 -39 66q-10 29 -10 75q0 53 20 93q20 41 52 69q37 37 67 58q41 27 68 51q31 27 51 57q20 29 21 72q0 61 -50 102q-47 39 -147 39q-111 0 -162 -49q-53 -49 -53 -152v-1128h-305z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1175" d="M86 334q0 176 115 262q113 84 340 94l178 6v84q0 70 -39 102.5t-113 32.5q-78 0 -141 -20q-61 -20 -137 -57l-99 202q82 45 187 74q98 27 213 27q211 0 321.5 -98.5t110.5 -297.5v-745h-213l-59 152h-9q-33 -45 -65 -78q-29 -29 -74 -54q-41 -23 -86 -30 q-55 -10 -113 -10q-66 0 -127 22q-59 23 -100 64q-39 39 -65 110q-25 68 -25 158zM399 332q0 -68 33 -99q35 -31 90 -30q43 0 78 14q31 12 62 43q29 29 43 70t14 96v92l-101 -4q-68 -4 -104 -16q-45 -16 -65 -37q-29 -29 -39 -55q-11 -29 -11 -74zM240 1548v21h342 q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1175" d="M86 334q0 176 115 262q113 84 340 94l178 6v84q0 70 -39 102.5t-113 32.5q-78 0 -141 -20q-61 -20 -137 -57l-99 202q82 45 187 74q98 27 213 27q211 0 321.5 -98.5t110.5 -297.5v-745h-213l-59 152h-9q-33 -45 -65 -78q-29 -29 -74 -54q-41 -23 -86 -30 q-55 -10 -113 -10q-66 0 -127 22q-59 23 -100 64q-39 39 -65 110q-25 68 -25 158zM399 332q0 -68 33 -99q35 -31 90 -30q43 0 78 14q31 12 62 43q29 29 43 70t14 96v92l-101 -4q-68 -4 -104 -16q-45 -16 -65 -37q-29 -29 -39 -55q-11 -29 -11 -74zM441 1241v27l45 67 q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1175" d="M86 334q0 176 115 262q113 84 340 94l178 6v84q0 70 -39 102.5t-113 32.5q-78 0 -141 -20q-61 -20 -137 -57l-99 202q82 45 187 74q98 27 213 27q211 0 321.5 -98.5t110.5 -297.5v-745h-213l-59 152h-9q-33 -45 -65 -78q-29 -29 -74 -54q-41 -23 -86 -30 q-55 -10 -113 -10q-66 0 -127 22q-59 23 -100 64q-39 39 -65 110q-25 68 -25 158zM399 332q0 -68 33 -99q35 -31 90 -30q43 0 78 14q31 12 62 43q29 29 43 70t14 96v92l-101 -4q-68 -4 -104 -16q-45 -16 -65 -37q-29 -29 -39 -55q-11 -29 -11 -74zM176 1241v27q27 29 57 67 l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1175" d="M86 334q0 176 115 262q113 84 340 94l178 6v84q0 70 -39 102.5t-113 32.5q-78 0 -141 -20q-61 -20 -137 -57l-99 202q82 45 187 74q98 27 213 27q211 0 321.5 -98.5t110.5 -297.5v-745h-213l-59 152h-9q-33 -45 -65 -78q-29 -29 -74 -54q-41 -23 -86 -30 q-55 -10 -113 -10q-66 0 -127 22q-59 23 -100 64q-39 39 -65 110q-25 68 -25 158zM399 332q0 -68 33 -99q35 -31 90 -30q43 0 78 14q31 12 62 43q29 29 43 70t14 96v92l-101 -4q-68 -4 -104 -16q-45 -16 -65 -37q-29 -29 -39 -55q-11 -29 -11 -74zM197 1239q6 82 26 137 q23 63 53 97q37 41 76 57q43 18 97 18q37 0 79 -16l78 -35q10 -4 36 -17.5t40 -19.5q39 -16 74 -16q29 0 49 26q18 25 31 80h149q-6 -82 -27 -137q-23 -59 -53 -96q-33 -39 -76 -57.5t-96 -18.5q-37 0 -80 16q-18 6 -78 37q-39 20 -75 35q-39 16 -74 17q-31 0 -49 -27 q-20 -29 -31 -80h-149z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1175" d="M86 334q0 176 115 262q113 84 340 94l178 6v84q0 70 -39 102.5t-113 32.5q-78 0 -141 -20q-61 -20 -137 -57l-99 202q82 45 187 74q98 27 213 27q211 0 321.5 -98.5t110.5 -297.5v-745h-213l-59 152h-9q-33 -45 -65 -78q-29 -29 -74 -54q-41 -23 -86 -30 q-55 -10 -113 -10q-66 0 -127 22q-59 23 -100 64q-39 39 -65 110q-25 68 -25 158zM399 332q0 -68 33 -99q35 -31 90 -30q43 0 78 14q31 12 62 43q29 29 43 70t14 96v92l-101 -4q-68 -4 -104 -16q-45 -16 -65 -37q-29 -29 -39 -55q-11 -29 -11 -74zM254 1405q0 41 10 61 q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM657 1405q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8 q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1175" d="M86 334q0 176 115 262q113 84 340 94l178 6v84q0 70 -39 102.5t-113 32.5q-78 0 -141 -20q-61 -20 -137 -57l-99 202q82 45 187 74q98 27 213 27q211 0 321.5 -98.5t110.5 -297.5v-745h-213l-59 152h-9q-33 -45 -65 -78q-29 -29 -74 -54q-41 -23 -86 -30 q-55 -10 -113 -10q-66 0 -127 22q-59 23 -100 64q-39 39 -65 110q-25 68 -25 158zM399 332q0 -68 33 -99q35 -31 90 -30q43 0 78 14q31 12 62 43q29 29 43 70t14 96v92l-101 -4q-68 -4 -104 -16q-45 -16 -65 -37q-29 -29 -39 -55q-11 -29 -11 -74zM842 1478.5 q0 -57.5 -19 -100.5q-18 -41 -55 -75q-35 -33 -80 -48q-49 -16 -100 -16t-101 16q-45 14 -79 48q-27 25 -50 75q-18 43 -18 99q0 57 18 100q20 47 50 74q35 33 79 47q49 16 101 16q49 0 98 -16q47 -16 82 -47q31 -27 53 -74q21 -41 21 -98.5zM684 1477q0 47 -26.5 71.5 t-69.5 24.5t-69.5 -24.5t-26.5 -71.5q0 -45 24 -70q27 -27 72 -27q39 0 69 27q27 25 27 70z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1804" d="M86 334q0 176 115 262q113 84 340 94l178 6v84q0 70 -39 102.5t-113 32.5q-78 0 -141 -20q-61 -20 -137 -57l-99 202q82 45 187 74q98 27 213 27q217 0 323 -131q126 129 314 129q115 0 200 -33q90 -35 152 -98q63 -66 96 -160q33 -92 33 -217v-148h-682q4 -68 20.5 -117 t51.5 -85q33 -35 82 -56q45 -18 108 -18q92 0 182 22q92 23 175 66v-236q-40 -22 -80 -36q-29 -10 -86 -23q-76 -14 -97 -16q-70 -4 -114 -4q-125 0 -238 51q-106 49 -176 155q-35 -45 -86 -92q-47 -45 -90 -65q-49 -25 -110.5 -37t-143.5 -12q-66 0 -129 22q-66 23 -109 64 q-46 43 -73 110q-27 66 -27 158zM399 332q0 -68 33 -99q35 -31 90 -30q43 0 78 14q31 12 62 43q29 29 43 70t14 96v92l-101 -4q-68 -4 -104 -16q-45 -16 -65 -37q-29 -29 -39 -55q-11 -29 -11 -74zM1032 686h389q0 51 -12 94t-37 74q-27 33 -59 49q-37 18 -84 19 q-84 0 -135 -58q-54 -59 -62 -178z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1021" d="M102 553q0 164 37 278q37 113 107 183q70 68 164 96q98 29 215 29q90 0 172 -20.5t159 -59.5l-88 -232q-70 31 -127 47q-61 18 -116 19q-113 0 -160 -84q-51 -90 -51 -254t51 -248q49 -80 156 -80q84 0 157 23q59 18 146 57v-254q-4 -2 -72 -33q-25 -12 -70 -22 q-49 -12 -75 -14q-53 -4 -82 -4q-125 0 -217 32q-100 35 -164 103q-68 71 -105 178q-37 108 -37 260zM323 -303q4 0 15.5 -3t17.5 -5q6 0 19.5 -2t19.5 -4t18.5 -2t18.5 -3q12 -2 34 -2q28 0 50 13q23 12 22.5 49t-37.5 65t-129 43l78 154h193l-27 -61q35 -10 59 -27 q37 -25 52 -41q25 -27 36 -53q14 -29 15 -68q0 -59 -14.5 -102t-53.5 -76t-94 -47q-61 -16 -147 -17q-43 0 -80 7q-45 8 -66 14v168z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1189" d="M102 551q0 147 37 258t102.5 182.5t161.5 110.5q92 37 207 37t201 -33q90 -35 152 -98q63 -66 96 -160q33 -92 33 -217v-148h-682q4 -68 20 -116q16 -45 53 -86q34 -37 80 -56q47 -18 109 -18q49 0 96 6q57 8 88 16q57 16 86 26.5t86 39.5v-236q-40 -22 -80 -36 q-29 -10 -86 -23q-76 -14 -96 -16q-70 -4 -115 -4q-117 0 -221 34q-96 33 -174 107q-72 70 -113 178q-41 111 -41 252zM416 686h389q0 51 -12.5 94t-36.5 74q-27 33 -60 49q-37 18 -84 19q-84 0 -135 -58q-53 -59 -61 -178zM264 1548v21h342q15 -34 37 -74l45 -82 q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1189" d="M102 551q0 147 37 258t102.5 182.5t161.5 110.5q92 37 207 37t201 -33q90 -35 152 -98q63 -66 96 -160q33 -92 33 -217v-148h-682q4 -68 20 -116q16 -45 53 -86q34 -37 80 -56q47 -18 109 -18q49 0 96 6q57 8 88 16q57 16 86 26.5t86 39.5v-236q-40 -22 -80 -36 q-29 -10 -86 -23q-76 -14 -96 -16q-70 -4 -115 -4q-117 0 -221 34q-96 33 -174 107q-72 70 -113 178q-41 111 -41 252zM416 686h389q0 51 -12.5 94t-36.5 74q-27 33 -60 49q-37 18 -84 19q-84 0 -135 -58q-53 -59 -61 -178zM447 1241v27l45 67q33 53 47 78q8 12 45 82 q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xea;" horiz-adv-x="1189" d="M102 551q0 147 37 258t102.5 182.5t161.5 110.5q92 37 207 37t201 -33q90 -35 152 -98q63 -66 96 -160q33 -92 33 -217v-148h-682q4 -68 20 -116q16 -45 53 -86q34 -37 80 -56q47 -18 109 -18q49 0 96 6q57 8 88 16q57 16 86 26.5t86 39.5v-236q-40 -22 -80 -36 q-29 -10 -86 -23q-76 -14 -96 -16q-70 -4 -115 -4q-117 0 -221 34q-96 33 -174 107q-72 70 -113 178q-41 111 -41 252zM416 686h389q0 51 -12.5 94t-36.5 74q-27 33 -60 49q-37 18 -84 19q-84 0 -135 -58q-53 -59 -61 -178zM194 1241v27q27 29 57 67l64 78l63 82 q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1189" d="M102 551q0 147 37 258t102.5 182.5t161.5 110.5q92 37 207 37t201 -33q90 -35 152 -98q63 -66 96 -160q33 -92 33 -217v-148h-682q4 -68 20 -116q16 -45 53 -86q34 -37 80 -56q47 -18 109 -18q49 0 96 6q57 8 88 16q57 16 86 26.5t86 39.5v-236q-40 -22 -80 -36 q-29 -10 -86 -23q-76 -14 -96 -16q-70 -4 -115 -4q-117 0 -221 34q-96 33 -174 107q-72 70 -113 178q-41 111 -41 252zM416 686h389q0 51 -12.5 94t-36.5 74q-27 33 -60 49q-37 18 -84 19q-84 0 -135 -58q-53 -59 -61 -178zM266 1405q0 41 10 61q12 27 31 41q18 15 43 25 q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM669 1405q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25 q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xec;" horiz-adv-x="624" d="M465 0h-305v1118h305v-1118zM-45 1548v21h342q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xed;" horiz-adv-x="624" d="M465 0h-305v1118h305v-1118zM146 1241v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xee;" horiz-adv-x="624" d="M465 0h-305v1118h305v-1118zM-105 1241v27q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xef;" horiz-adv-x="624" d="M465 0h-305v1118h305v-1118zM-33 1405q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59z M370 1405q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1181" d="M74 489q0 123 32 216q35 98 90.5 159.5t141.5 96t178 34.5t164 -32q70 -33 100 -80l21 2q-27 86 -78 166q-47 74 -117 133l-231 -144l-101 156l183 113q-4 2 -72 45q-53 33 -82 47l96 170l138 -68q25 -12 120 -73l226 139l100 -154l-174 -106q68 -63 127 -148 q47 -66 88 -168q35 -84 53 -194q18 -104 19 -226q0 -147 -35 -251q-37 -109 -105 -187q-66 -74 -161 -115q-98 -41 -213 -40q-109 0 -203 34q-96 35 -162 99q-68 65 -104 159q-39 100 -39 217zM385 487q0 -61 12 -114q14 -59 35 -90q23 -33 64 -58q35 -20 90 -20 q106 0 151 82q47 84 47 245q0 47 -12 91q-12 45 -34.5 75.5t-63.5 51t-88 20.5q-109 0 -154 -70q-47 -72 -47 -213z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1282" d="M160 0v1118h233l41 -143h17q23 41 59 74q29 25 76 51q40 22 86 30q41 8 94 9q88 0 149 -23q63 -23 115 -74q49 -49 74 -127q27 -84 26 -186v-729h-305v653q0 119 -36.5 180.5t-116.5 61.5q-61 0 -100.5 -24.5t-63.5 -69.5q-23 -43 -33 -117q-10 -76 -10 -158v-526h-305z M248 1239q6 82 26 137q23 63 53 97q37 41 76 57q43 18 97 18q37 0 79 -16l78 -35q10 -4 36 -17.5t40 -19.5q39 -16 74 -16q29 0 49 26q18 25 31 80h149q-6 -82 -27 -137q-23 -59 -53 -96q-33 -39 -76 -57.5t-96 -18.5q-37 0 -80 16q-18 6 -78 37q-39 20 -75 35 q-39 16 -74 17q-31 0 -49 -27q-20 -29 -31 -80h-149z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1226" d="M102 561q0 145 35 248q37 109 103 180q72 78 161 113q95 37 215 37q111 0 203 -37t162 -113q68 -74 104 -180q39 -113 39 -248q0 -139 -37 -248q-39 -117 -100 -182q-68 -74 -162 -113q-92 -39 -215 -38q-115 0 -204 38q-94 41 -160 113q-70 76 -107 182q-37 109 -37 248 zM414 561q0 -164 47 -252q45 -84 153 -84q106 0 152 84q47 88 47 252q0 166 -47 250q-45 82 -154 82q-106 0 -151 -82q-47 -84 -47 -250zM273 1548v21h342q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84 q-39 42 -53 67z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1226" d="M102 561q0 145 35 248q37 109 103 180q72 78 161 113q95 37 215 37q111 0 203 -37t162 -113q68 -74 104 -180q39 -113 39 -248q0 -139 -37 -248q-39 -117 -100 -182q-68 -74 -162 -113q-92 -39 -215 -38q-115 0 -204 38q-94 41 -160 113q-70 76 -107 182q-37 109 -37 248 zM414 561q0 -164 47 -252q45 -84 153 -84q106 0 152 84q47 88 47 252q0 166 -47 250q-45 82 -154 82q-106 0 -151 -82q-47 -84 -47 -250zM434 1241v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53 q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1226" d="M102 561q0 145 35 248q37 109 103 180q72 78 161 113q95 37 215 37q111 0 203 -37t162 -113q68 -74 104 -180q39 -113 39 -248q0 -139 -37 -248q-39 -117 -100 -182q-68 -74 -162 -113q-92 -39 -215 -38q-115 0 -204 38q-94 41 -160 113q-70 76 -107 182q-37 109 -37 248 zM414 561q0 -164 47 -252q45 -84 153 -84q106 0 152 84q47 88 47 252q0 166 -47 250q-45 82 -154 82q-106 0 -151 -82q-47 -84 -47 -250zM196 1241v27q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203 q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1226" d="M102 561q0 145 35 248q37 109 103 180q72 78 161 113q95 37 215 37q111 0 203 -37t162 -113q68 -74 104 -180q39 -113 39 -248q0 -139 -37 -248q-39 -117 -100 -182q-68 -74 -162 -113q-92 -39 -215 -38q-115 0 -204 38q-94 41 -160 113q-70 76 -107 182q-37 109 -37 248 zM414 561q0 -164 47 -252q45 -84 153 -84q106 0 152 84q47 88 47 252q0 166 -47 250q-45 82 -154 82q-106 0 -151 -82q-47 -84 -47 -250zM215 1239q6 82 26 137q23 63 53 97q37 41 76 57q43 18 97 18q37 0 79 -16l78 -35q10 -4 36 -17.5t40 -19.5q39 -16 74 -16q29 0 49 26 q18 25 31 80h149q-6 -82 -27 -137q-23 -59 -53 -96q-33 -39 -76 -57.5t-96 -18.5q-37 0 -80 16q-18 6 -78 37q-39 20 -75 35q-39 16 -74 17q-31 0 -49 -27q-20 -29 -31 -80h-149z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1226" d="M102 561q0 145 35 248q37 109 103 180q72 78 161 113q95 37 215 37q111 0 203 -37t162 -113q68 -74 104 -180q39 -113 39 -248q0 -139 -37 -248q-39 -117 -100 -182q-68 -74 -162 -113q-92 -39 -215 -38q-115 0 -204 38q-94 41 -160 113q-70 76 -107 182q-37 109 -37 248 zM414 561q0 -164 47 -252q45 -84 153 -84q106 0 152 84q47 88 47 252q0 166 -47 250q-45 82 -154 82q-106 0 -151 -82q-47 -84 -47 -250zM266 1405q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59 q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM669 1405q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25 q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xf7;" d="M88 612v219h952v-219h-952zM424 373q0 49 10 71q12 29 31 48q12 12 45 24q23 8 53.5 8t52.5 -8q29 -10 43 -24q18 -18 31 -48q12 -27 12 -71q0 -41 -12 -70t-31 -47q-16 -16 -43 -27q-23 -8 -53.5 -8t-52.5 8q-29 10 -45 27q-18 18 -31 47q-10 23 -10 70zM424 1071 q0 49 10 72q12 29 31 47q12 12 45 24q23 8 53.5 8.5t52.5 -8.5q29 -10 43 -24q18 -18 30.5 -47t12.5 -72q0 -40 -12 -67q-12 -29 -31 -48q-20 -20 -42.5 -28t-53.5 -8t-53 8q-27 10 -45.5 28.5t-30.5 47.5q-10 22 -10 67z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1226" d="M102 561q0 145 35 248q37 109 103 180q72 78 161 113q95 37 215 37q59 0 119 -13q39 -8 109 -36l49 79l160 -96l-62 -98q63 -70 99 -176q35 -109 34 -238q0 -139 -37 -248q-39 -117 -100 -182q-68 -74 -162 -113q-92 -39 -215 -38q-51 0 -108 10q-45 8 -101 28l-57 -94 l-162 90l68 111q-70 76 -109 184.5t-39 251.5zM414 561q0 -86 12 -151l283 458q-41 25 -97 25q-106 0 -151 -82q-47 -84 -47 -250zM539 240q12 -6 36.5 -10.5t38.5 -4.5q106 0 152 84q47 88 47 252q0 63 -6 113z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1282" d="M154 389v729h305v-653q0 -121 37 -182q35 -59 116 -60q59 0 101 25q39 25 63 69q23 43 33 117q10 76 10 158v526h305v-1118h-233l-41 143h-16q-23 -41 -60 -73q-29 -25 -76 -52q-35 -18 -86 -28t-94 -10q-82 0 -149 24q-63 23 -115 74q-49 49 -74 127q-26 84 -26 184z M271 1548v21h342q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15 -22.5t16.5 -25.5t13.5 -19v-27h-203l-82 70l-94 86q-47 43 -84 84q-39 42 -53 67z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1282" d="M154 389v729h305v-653q0 -121 37 -182q35 -59 116 -60q59 0 101 25q39 25 63 69q23 43 33 117q10 76 10 158v526h305v-1118h-233l-41 143h-16q-23 -41 -60 -73q-29 -25 -76 -52q-35 -18 -86 -28t-94 -10q-82 0 -149 24q-63 23 -115 74q-49 49 -74 127q-26 84 -26 184z M461 1241v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1282" d="M154 389v729h305v-653q0 -121 37 -182q35 -59 116 -60q59 0 101 25q39 25 63 69q23 43 33 117q10 76 10 158v526h305v-1118h-233l-41 143h-16q-23 -41 -60 -73q-29 -25 -76 -52q-35 -18 -86 -28t-94 -10q-82 0 -149 24q-63 23 -115 74q-49 49 -74 127q-26 84 -26 184z M217 1241v27q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1282" d="M154 389v729h305v-653q0 -121 37 -182q35 -59 116 -60q59 0 101 25q39 25 63 69q23 43 33 117q10 76 10 158v526h305v-1118h-233l-41 143h-16q-23 -41 -60 -73q-29 -25 -76 -52q-35 -18 -86 -28t-94 -10q-82 0 -149 24q-63 23 -115 74q-49 49 -74 127q-26 84 -26 184z M295 1405q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM698 1405q0 41 11 61q12 27 30 41 q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1103" d="M0 1118h334l180 -629q16 -57 23 -110q8 -82 10 -107h6q2 14 6 52q4 41 8 57q2 8 5 28.5t6 28.5q0 4 14 51l176 629h336l-442 -1261q-61 -176 -168 -263q-109 -86 -269 -86q-66 0 -90 5q-41 6 -65 12v242q16 -4 53 -9q41 -4 67 -4q47 0 82 13q33 12 58 36q27 27 43 58 q18 34 30 73l19 56zM393 1241v27l45 67q33 53 47 78q8 12 45 82q22 40 37 74h342v-21q-16 -23 -33 -43q-43 -49 -47 -53q-27 -29 -57 -57l-64 -58l-59 -53q-16 -14 -31.5 -25.5t-21.5 -17.5h-203z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1243" d="M160 -492v2048h305v-391q0 -35 -2 -57q0 -10 -1 -31.5t-3 -32.5q0 -10 -3 -34.5t-5 -36.5h14q29 45 47 65q27 31 63 52q45 27 82 36q43 12 99 13q88 0 157 -37q68 -35 121 -111q53 -74 80 -180q29 -111 29 -250q0 -141 -29 -252q-29 -115 -78 -182q-52 -74 -123 -111 q-70 -37 -157 -36q-49 0 -101 10q-31 6 -80 30q-35 16 -63 43q-18 16 -47 54h-14q0 -10 4 -30.5t4 -31.5q0 -8 2 -26.5t2 -26.5q2 -16 2 -41v-453h-305zM465 563q0 -72 10 -143q8 -63 31 -107q20 -41 59 -63.5t90 -22.5q90 0 133 86t43 252q0 164 -43 248q-43 82 -135 82 q-49 0 -86 -18q-35 -18 -57 -56q-25 -41 -33 -94q-8 -55 -12 -131v-33z" />
+<glyph unicode="&#xff;" horiz-adv-x="1103" d="M0 1118h334l180 -629q16 -57 23 -110q8 -82 10 -107h6q2 14 6 52q4 41 8 57q2 8 5 28.5t6 28.5q0 4 14 51l176 629h336l-442 -1261q-61 -176 -168 -263q-109 -86 -269 -86q-66 0 -90 5q-41 6 -65 12v242q16 -4 53 -9q41 -4 67 -4q47 0 82 13q33 12 58 36q27 27 43 58 q18 34 30 73l19 56zM209 1405q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25q-18 14 -31 41q-10 20 -10 59zM612 1405 q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#x131;" horiz-adv-x="624" d="M465 0h-305v1118h305v-1118z" />
+<glyph unicode="&#x152;" horiz-adv-x="1929" d="M119 735q0 174 39 309.5t121 235.5q80 98 204.5 151.5t292.5 53.5q53 0 103 -6q61 -8 94 -17h837v-254h-532v-321h496v-254h-496v-377h532v-256h-841q-35 -6 -95 -14q-49 -6 -100 -6q-168 0 -291 55q-129 57 -204 151q-80 98 -121 240q-39 135 -39 309zM438 733 q0 -119 21 -207q23 -98 61 -155q43 -63 105 -97q66 -35 149 -34q53 0 109 10q45 8 86 29v907q-37 23 -84 31q-55 10 -109 10q-88 0 -151 -33q-59 -31 -105 -98q-39 -57 -61 -156q-21 -88 -21 -207z" />
+<glyph unicode="&#x153;" horiz-adv-x="1900" d="M102 561q0 145 35 248q37 109 103 180q72 78 161 113q95 37 215 37q109 0 195 -39q89 -40 154 -117q61 74 157 117q86 39 199 39q115 0 201 -33q90 -35 151 -98q63 -66 96 -160q33 -92 33 -217v-148h-682v-8q6 -129 74 -198.5t188 -69.5q51 0 97 6q57 8 88 16 q57 16 85.5 26.5t86.5 39.5v-236q-40 -22 -80 -36q-29 -10 -86 -23q-76 -14 -96 -16q-70 -4 -115 -4q-113 0 -219 38q-101 37 -172 117q-63 -76 -158 -117q-90 -39 -203 -38q-115 0 -204 38q-94 41 -160 113q-70 76 -107 182q-37 109 -37 248zM414 561q0 -164 47 -252 q45 -84 153 -84q106 0 152 84q47 88 47 252q0 166 -47 250q-45 82 -154 82q-106 0 -151 -82q-47 -84 -47 -250zM1126 686h390q0 51 -12.5 94t-37.5 74q-27 33 -59 49q-37 18 -84 19q-45 0 -76 -15q-35 -16 -59.5 -42.5t-40.5 -73.5q-19 -50 -21 -105z" />
+<glyph unicode="&#x178;" horiz-adv-x="1193" d="M0 1462h336l262 -602l264 602h334l-444 -893v-569h-308v559zM256 1743q0 41 10 61q12 27 31 41q18 15 43 25q23 8 55.5 8t54.5 -8q25 -9 43 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-18 -15 -43 -25q-23 -8 -55.5 -8t-54.5 8q-25 9 -43 25 q-18 14 -31 41q-10 20 -10 59zM659 1743q0 41 11 61q12 27 30 41q16 14 45 25q23 8 56 8q31 0 53 -8q29 -10 45 -25q18 -14 31 -41q12 -25 12 -61q0 -35 -12 -59q-12 -27 -31 -41q-16 -14 -45 -25q-23 -8 -53 -8q-61 0 -101 33q-41 34 -41 100z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1181" d="M176 1241v27q27 29 57 67l64 78l63 82q25 33 52 74h356q27 -41 51 -74q12 -14 21.5 -28.5t17.5 -24.5l23 -29l65 -78l58 -67v-27h-203q-39 25 -107 78q-51 41 -106 98q-59 -59 -107 -98q-66 -53 -102 -78h-203z" />
+<glyph unicode="&#x2da;" horiz-adv-x="1181" d="M842 1478.5q0 -57.5 -19 -100.5q-18 -41 -55 -75q-35 -33 -80 -48q-49 -16 -100 -16t-101 16q-45 14 -79 48q-27 25 -50 75q-18 43 -18 99q0 57 18 100q20 47 50 74q35 33 79 47q49 16 101 16q49 0 98 -16q47 -16 82 -47q31 -27 53 -74q21 -41 21 -98.5zM684 1477 q0 47 -26.5 71.5t-69.5 24.5t-69.5 -24.5t-26.5 -71.5q0 -45 24 -70q27 -27 72 -27q39 0 69 27q27 25 27 70z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1181" d="M197 1239q6 82 26 137q23 63 53 97q37 41 76 57q43 18 97 18q37 0 79 -16l78 -35q10 -4 36 -17.5t40 -19.5q39 -16 74 -16q29 0 49 26q18 25 31 80h149q-6 -82 -27 -137q-23 -59 -53 -96q-33 -39 -76 -57.5t-96 -18.5q-37 0 -80 16q-18 6 -78 37q-39 20 -75 35 q-39 16 -74 17q-31 0 -49 -27q-20 -29 -31 -80h-149z" />
+<glyph unicode="&#x2000;" horiz-adv-x="952" />
+<glyph unicode="&#x2001;" horiz-adv-x="1906" />
+<glyph unicode="&#x2002;" horiz-adv-x="952" />
+<glyph unicode="&#x2003;" horiz-adv-x="1906" />
+<glyph unicode="&#x2004;" horiz-adv-x="634" />
+<glyph unicode="&#x2005;" horiz-adv-x="475" />
+<glyph unicode="&#x2006;" horiz-adv-x="315" />
+<glyph unicode="&#x2007;" horiz-adv-x="315" />
+<glyph unicode="&#x2008;" horiz-adv-x="237" />
+<glyph unicode="&#x2009;" horiz-adv-x="380" />
+<glyph unicode="&#x200a;" horiz-adv-x="104" />
+<glyph unicode="&#x2010;" horiz-adv-x="657" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="&#x2011;" horiz-adv-x="657" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="&#x2012;" horiz-adv-x="657" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1024" d="M82 436v230h860v-230h-860z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2048" d="M82 436v230h1884v-230h-1884z" />
+<glyph unicode="&#x2018;" horiz-adv-x="438" d="M23 983l18 61l16 54q12 41 41 123l49 122l52 119h219q-6 -23 -15.5 -65.5l-13.5 -61.5l-29 -131l-24 -129l-10.5 -62.5l-8.5 -51.5h-280z" />
+<glyph unicode="&#x2019;" horiz-adv-x="438" d="M23 961q10 39 28 126l29 132l24 129l10.5 62.5l8.5 51.5h280l15 -22l-33 -115q-18 -61 -43 -123l-49 -125q-6 -16 -51 -116h-219z" />
+<glyph unicode="&#x201a;" horiz-adv-x="593" d="M63 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h280l15 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124q-6 -16 -51 -117h-220z" />
+<glyph unicode="&#x201c;" horiz-adv-x="905" d="M23 983l18 61l16 54q12 41 41 123l49 122l52 119h219q-6 -23 -15.5 -65.5l-13.5 -61.5l-29 -131l-24 -129l-10.5 -62.5l-8.5 -51.5h-280zM489 983q29 102 33 115l43 123l49 122l52 119h219q-6 -23 -15.5 -65.5l-13.5 -61.5l-29 -131l-24 -129l-10.5 -62.5l-8.5 -51.5 h-280z" />
+<glyph unicode="&#x201d;" horiz-adv-x="905" d="M23 961q10 39 28 126l29 132l24 129l10.5 62.5l8.5 51.5h280l15 -22l-33 -115q-18 -61 -43 -123l-49 -125q-6 -16 -51 -116h-219zM489 961q6 23 15.5 65.5l13.5 60.5l29 132l24 129l10.5 62.5l8.5 51.5h280l15 -22l-33 -115q-18 -61 -43 -123l-49 -125q-6 -16 -51 -116 h-220z" />
+<glyph unicode="&#x201e;" horiz-adv-x="1060" d="M63 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h280l15 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124q-6 -16 -51 -117h-220zM530 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h280l15 -23l-33 -115q-18 -61 -43 -123 q-8 -25 -49 -124q-6 -16 -51 -117h-220z" />
+<glyph unicode="&#x2022;" horiz-adv-x="768" d="M98 748q0 84 23 147q20 61 59 96q40 37 92 56q51 18 113 18q58 0 110.5 -18.5t92.5 -55.5q41 -37 61 -96q23 -63 23 -147q0 -82 -23 -146q-20 -57 -61 -98q-35 -35 -92 -55q-52 -18 -111 -19q-61 0 -113 19q-57 20 -92 55q-39 39 -59 98q-23 64 -23 146z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1748" d="M117 143q0 41 14 80q10 29 37 51q20 18 55 28.5t70 10.5q33 0 67.5 -10t55.5 -29q23 -20 37 -50.5t14 -80t-14 -77.5q-18 -37 -37 -54q-25 -22 -56 -30q-27 -8 -67 -9q-43 0 -70 9q-31 9 -55 30q-25 20 -37 54q-14 36 -14 77zM700 143q0 46 13 80q8 25 39 51q23 20 55 29 q37 10 69.5 10t67.5 -10t55 -29q23 -20 37.5 -50.5t14.5 -80t-15 -77.5q-18 -37 -37 -54q-25 -22 -55 -30q-27 -8 -67 -9q-39 0 -70 9q-29 8 -55 30q-27 25 -39 54q-13 30 -13 77zM1284 143q0 41 14 80q10 29 37 51q20 18 55 28.5t70 10.5q31 0 66 -10t55 -29q27 -23 39 -51 q14 -31 14 -80t-14 -77q-16 -35 -39 -54q-25 -22 -55 -30q-27 -8 -66 -9q-43 0 -69 9q-31 9 -56 30q-25 20 -37 54q-14 36 -14 77z" />
+<glyph unicode="&#x202f;" horiz-adv-x="380" />
+<glyph unicode="&#x2039;" horiz-adv-x="690" d="M82 547v26l309 455l219 -119l-217 -348l217 -348l-219 -119z" />
+<glyph unicode="&#x203a;" horiz-adv-x="690" d="M82 213l217 348l-217 348l219 119l309 -455v-26l-309 -453z" />
+<glyph unicode="&#x2044;" horiz-adv-x="264" d="M657 1462l-811 -1462h-239l811 1462h239z" />
+<glyph unicode="&#x205f;" horiz-adv-x="475" />
+<glyph unicode="&#x20ac;" d="M66 481v178h118q-4 25 -4 33v29v29q0 6 1 14t1 10h-116v176h133q18 117 65 219.5t115 165.5q66 63 168 103q90 35 215 35q104 0 186 -21q86 -22 166 -61l-98 -232q-68 31 -129 49q-55 16 -125 17q-104 0 -172 -70q-70 -72 -90 -205h362v-176h-377q0 -4 -1 -8t-1 -8v-19 v-18v-29q0 -18 2 -33h314v-178h-297q25 -125 96.5 -184t183.5 -59q76 0 148 16q57 12 127 41v-256q-59 -29 -127 -43q-76 -16 -166 -16q-238 0 -379 131q-139 129 -182 370h-137z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1533" d="M16 1313v149h564v-149h-199v-572h-168v572h-197zM625 741v721h247l160 -510l170 510h240v-721h-168v408v25q0 4 1 15t1 17v35q0 6 1 15.5t1 13.5h-6l-174 -529h-142l-165 529h-7q0 -4 1 -15.5t1 -17.5v-33q0 -6 1 -14t1 -12v-19v-418h-163z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1120" d="M0 1120h1120v-1120h-1120v1120z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1415" d="M41 889v147l168 82v82q0 102 27 178q25 70 73 113q45 41 117 59q59 16 152 17q96 0 155 -15q68 -16 107 -32l-72 -224q-20 8 -66 21q-31 8 -79 8q-59 0 -84 -39q-25 -41 -25 -98v-70h227v-229h-227v-889h-305v889h-168zM940 1407q0 43 13 72q10 25 35 45q20 18 53 24 q41 8 65 8q23 0 64 -8q33 -6 53 -24q25 -20 35 -45q14 -33 14 -72t-14 -72q-10 -25 -34.5 -45t-53.5 -26q-31 -6 -64 -7q-35 0 -65 7q-29 6 -53.5 26.5t-34.5 44.5q-13 29 -13 72zM953 0v1118h305v-1118h-305z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1415" d="M41 889v147l168 82v82q0 102 27 178q25 70 73 113q45 41 117 59q59 16 152 17q96 0 155 -15q68 -16 107 -32l-72 -224q-20 8 -66 21q-31 8 -79 8q-59 0 -84 -39q-25 -41 -25 -98v-70h227v-229h-227v-889h-305v889h-168zM953 0v1556h305v-1556h-305z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="2207" d="M41 889v147l168 82v82q0 102 27 178q25 70 73 113q45 41 117 59q59 16 152 17q96 0 155 -15q68 -16 107 -32l-72 -224q-20 8 -66 21q-31 8 -79 8q-59 0 -84 -39q-25 -41 -25 -98v-70h227v-229h-227v-889h-305v889h-168zM834 889v147l168 82v82q0 102 27 178q25 70 73 113 q45 41 117 59q59 16 152 17q96 0 155 -15q68 -16 107 -32l-72 -224q-20 8 -66 21q-31 8 -79 8q-59 0 -84 -39q-25 -41 -25 -98v-70h227v-229h-227v-889h-305v889h-168zM1730 1407q0 43 13 72q10 25 35 45q20 18 53 24q41 8 65 8q23 0 64 -8q33 -6 53 -24q25 -20 35 -45 q14 -33 14 -72t-14 -72q-10 -25 -34.5 -45t-53.5 -26q-31 -6 -64 -7q-35 0 -65 7q-29 6 -53.5 26.5t-34.5 44.5q-13 29 -13 72zM1743 0v1118h305v-1118h-305z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="2207" d="M41 889v147l168 82v82q0 102 27 178q25 70 73 113q45 41 117 59q59 16 152 17q

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.ttf
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.ttf b/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.ttf
new file mode 100644
index 0000000..ee1d9aa
Binary files /dev/null and b/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.ttf differ



[44/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java
new file mode 100644
index 0000000..22a9805
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java
@@ -0,0 +1,581 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.controllers;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseVersion;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.service.PulseService;
+import com.vmware.gemfire.tools.pulse.internal.service.PulseServiceFactory;
+import com.vmware.gemfire.tools.pulse.internal.service.SystemAlertsService;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class PulseController
+ * 
+ * This class contains the implementations for all http Ajax requests needs to
+ * be served in Pulse.
+ * 
+ * @author azambre
+ * @since version 7.5
+ */
+@Controller
+public class PulseController {
+
+  // CONSTANTS
+  private final String DEFAULT_EXPORT_FILENAME = "DataBrowserQueryResult.json";
+  private final String QUERYSTRING_PARAM_ACTION = "action";
+  private final String QUERYSTRING_PARAM_QUERYID = "queryId";
+  private final String ACTION_VIEW = "view";
+  private final String ACTION_DELETE = "delete";
+
+  private String STATUS_REPSONSE_SUCCESS = "success";
+  private String STATUS_REPSONSE_FAIL = "fail";
+
+  private String ERROR_REPSONSE_QUERYNOTFOUND = "No queries found";
+  private String ERROR_REPSONSE_QUERYIDMISSING = "Query id is missing";
+
+  private final JSONObject NoDataJSON = new JSONObject();
+
+  // Shared object to hold pulse version details
+  public static PulseVersion pulseVersion = new PulseVersion();
+  //default is gemfire
+  private static String pulseProductSupport = PulseConstants.PRODUCT_NAME_GEMFIRE;
+
+  @Autowired
+  PulseServiceFactory pulseServiceFactory;
+
+  @RequestMapping(value = "/pulseUpdate", method = RequestMethod.POST)
+  public void getPulseUpdate(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    String pulseData = request.getParameter("pulseData");
+
+    JSONObject responseMap = new JSONObject();
+
+    JSONObject requestMap = null;
+
+    try {
+      requestMap = new JSONObject(pulseData);
+      Iterator<?> keys = requestMap.keys();
+
+      // Execute Services
+      while (keys.hasNext()) {
+        String serviceName = keys.next().toString();
+        try {
+          PulseService pulseService = pulseServiceFactory
+              .getPulseServiceInstance(serviceName);
+          responseMap.put(serviceName, pulseService.execute(request));
+        } catch (Exception serviceException) {
+          LOGGER.warning("serviceException [for service "+serviceName+"] = " + serviceException.getMessage());
+          responseMap.put(serviceName, NoDataJSON);
+        }
+      }
+
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(new JSONException(eJSON),
+          new String[] { "requestMap:"
+              + ((requestMap == null) ? "" : requestMap) });
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+
+    // Create Response
+    response.getOutputStream().write(responseMap.toString().getBytes());
+  }
+
+  @RequestMapping(value = "/authenticateUser", method = RequestMethod.GET)
+  public void authenticateUser(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      responseJSON.put("isUserLoggedIn", this.isUserLoggedIn(request));
+      // Send json response
+      response.getOutputStream().write(responseJSON.toString().getBytes());
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(eJSON, null);
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+  }
+
+  /**
+   * Method isUserLoggedIn Check whether user is logged in or not.
+   * 
+   * @param request
+   * @return boolean
+   */
+  protected boolean isUserLoggedIn(HttpServletRequest request) {
+
+    if (null != request.getUserPrincipal()) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  @RequestMapping(value = "/clusterLogout", method = RequestMethod.GET)
+  public void clusterLogout(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    HttpSession session = request.getSession(false);
+    if (session != null) {
+
+      // End session and redirect
+      session.invalidate();
+    }
+    response.sendRedirect("../Login.html");
+  }
+
+  @RequestMapping(value = "/pulseVersion", method = RequestMethod.GET)
+  public void pulseVersion(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // Reference to repository
+      Repository repository = Repository.get();
+      // set pulse web app url
+      String pulseWebAppUrl = request.getScheme() + "://"
+          + request.getServerName() + ":" + request.getServerPort()
+          + request.getContextPath();
+
+      repository.setPulseWebAppUrl(pulseWebAppUrl);
+
+      // Response
+      responseJSON.put("pulseVersion",
+          PulseController.pulseVersion.getPulseVersion());
+      responseJSON.put("buildId",
+          PulseController.pulseVersion.getPulseBuildId());
+      responseJSON.put("buildDate",
+          PulseController.pulseVersion.getPulseBuildDate());
+      responseJSON.put("sourceDate",
+          PulseController.pulseVersion.getPulseSourceDate());
+      responseJSON.put("sourceRevision",
+          PulseController.pulseVersion.getPulseSourceRevision());
+      responseJSON.put("sourceRepository",
+          PulseController.pulseVersion.getPulseSourceRepository());
+
+    } catch (JSONException eJSON) {
+      LOGGER
+          .logJSONError(eJSON, new String[] { "pulseVersionData :"
+              + PulseController.pulseVersion });
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+
+    // Send json response
+    response.getOutputStream().write(responseJSON.toString().getBytes());
+  }
+
+  @RequestMapping(value = "/clearAlerts", method = RequestMethod.GET)
+  public void clearAlerts(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    int alertType;
+    JSONObject responseJSON = new JSONObject();
+    try {
+      alertType = Integer.valueOf(request.getParameter("alertType"));
+    } catch (NumberFormatException e) {
+      // Empty json response
+      response.getOutputStream().write(responseJSON.toString().getBytes());
+      if (LOGGER.finerEnabled()) {
+        LOGGER.finer(e.getMessage());
+      }
+      return;
+    }
+
+    try {
+      boolean isClearAll = Boolean.valueOf(request.getParameter("clearAll"));
+      // get cluster object
+      Cluster cluster = Repository.get().getCluster();
+      cluster.clearAlerts(alertType, isClearAll);
+      responseJSON.put("status", "deleted");
+      responseJSON.put(
+          "systemAlerts", SystemAlertsService.getAlertsJson(cluster,
+              cluster.getNotificationPageNumber()));
+      responseJSON.put("pageNumber", cluster.getNotificationPageNumber());
+
+      boolean isGFConnected = cluster.isConnectedFlag();
+      if(isGFConnected){
+        responseJSON.put("connectedFlag", isGFConnected);
+      }else{
+        responseJSON.put("connectedFlag", isGFConnected);
+        responseJSON.put("connectedErrorMsg", cluster.getConnectionErrorMsg());
+      }
+
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(eJSON, null);
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+
+    // Send json response
+    response.getOutputStream().write(responseJSON.toString().getBytes());
+  }
+
+  @RequestMapping(value = "/acknowledgeAlert", method = RequestMethod.GET)
+  public void acknowledgeAlert(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    int alertId;
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      alertId = Integer.valueOf(request.getParameter("alertId"));
+    } catch (NumberFormatException e) {
+      // Empty json response
+      response.getOutputStream().write(responseJSON.toString().getBytes());
+      if (LOGGER.finerEnabled()) {
+        LOGGER.finer(e.getMessage());
+      }
+      return;
+    }
+
+    try {
+      // get cluster object
+      Cluster cluster = Repository.get().getCluster();
+
+      // set alert is acknowledged
+      cluster.acknowledgeAlert(alertId);
+      responseJSON.put("status", "deleted");
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(eJSON, null);
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+
+    // Send json response
+    response.getOutputStream().write(responseJSON.toString().getBytes());
+  }
+
+  @RequestMapping(value = "/dataBrowserRegions", method = RequestMethod.GET)
+  public void dataBrowserRegions(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+    List<JSONObject> regionsData = Collections.emptyList();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("clusterName", cluster.getServerName());
+      regionsData = getRegionsJson(cluster);
+      responseJSON.put("clusterRegions", regionsData);
+      responseJSON.put("connectedFlag", cluster.isConnectedFlag());
+      responseJSON.put("connectedErrorMsg", cluster.getConnectionErrorMsg());
+
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(
+          eJSON,
+          new String[] { "clusterName:" + cluster.getServerName(),
+              "clusterRegions:" + regionsData,
+              "connectedFlag:" + cluster.isConnectedFlag(),
+              "connectedErrorMsg:" + cluster.getConnectionErrorMsg() });
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+
+    // Send json response
+    response.getOutputStream().write(responseJSON.toString().getBytes());
+  }
+
+  /**
+   * This method creates json for list of cluster regions
+   * 
+   * @param cluster
+   * @return JSONObject Array List
+   */
+  private List<JSONObject> getRegionsJson(Cluster cluster) throws JSONException {
+
+    Collection<Cluster.Region> clusterRegions = cluster.getClusterRegions()
+        .values();
+    List<JSONObject> regionsListJson = new ArrayList<JSONObject>();
+
+    if (!clusterRegions.isEmpty()) {
+      for (Cluster.Region region : clusterRegions) {
+        JSONObject regionJSON = new JSONObject();
+
+        regionJSON.put("name", region.getName());
+        regionJSON.put("fullPath", region.getFullPath());
+        regionJSON.put("regionType", region.getRegionType());
+        if(region.getRegionType().contains("PARTITION")){
+          regionJSON.put("isPartition", true);
+        }else{
+          regionJSON.put("isPartition", false);
+        }
+        regionJSON.put("memberCount", region.getMemberCount());
+        List<String> regionsMembers = region.getMemberName();
+        JSONArray jsonRegionMembers = new JSONArray();
+        for (int i = 0; i < regionsMembers.size(); i++) {
+          Cluster.Member member = cluster.getMembersHMap().get(
+              regionsMembers.get(i));
+          JSONObject jsonMember = new JSONObject();
+          jsonMember.put("key", regionsMembers.get(i));
+          jsonMember.put("id", member.getId());
+          jsonMember.put("name", member.getName());
+
+          jsonRegionMembers.put(jsonMember);
+        }
+
+        regionJSON.put("members", jsonRegionMembers);
+        regionsListJson.add(regionJSON);
+      }
+    }
+    return regionsListJson;
+  }
+
+  @RequestMapping(value = "/dataBrowserQuery", method = RequestMethod.GET)
+  public void dataBrowserQuery(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    // get query string
+    String query = request.getParameter("query");
+    String members = request.getParameter("members");
+    int limit = 0;
+
+    try {
+      limit = Integer.valueOf(request.getParameter("limit"));
+    } catch (NumberFormatException e) {
+      limit = 0;
+      if (LOGGER.finerEnabled()) {
+        LOGGER.finer(e.getMessage());
+      }
+    }
+
+    JSONObject queryResult = new JSONObject();
+    try {
+
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(query)) {
+        // get cluster object
+        Cluster cluster = Repository.get().getCluster();
+        String userName = request.getUserPrincipal().getName();
+
+        // Call execute query method
+        queryResult = cluster.executeQuery(query, members, limit);
+
+        // Add query in history if query is executed successfully
+        if (!queryResult.has("error")) {
+          // Add html escaped query to history
+          String escapedQuery = StringEscapeUtils.escapeHtml(query);
+          cluster.addQueryInHistory(escapedQuery, userName);
+        }
+      }
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(eJSON, new String[] { "queryResult:" + queryResult });
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+
+    response.getOutputStream().write(queryResult.toString().getBytes());
+  }
+
+  @RequestMapping(value = "/dataBrowserQueryHistory", method = RequestMethod.GET)
+  public void dataBrowserQueryHistory(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    JSONObject responseJSON = new JSONObject();
+    JSONArray queryResult = null;
+    String action = "";
+    try {
+
+      // get cluster object
+      Cluster cluster = Repository.get().getCluster();
+      String userName = request.getUserPrincipal().getName();
+
+      // get query string
+      action = request.getParameter(QUERYSTRING_PARAM_ACTION);
+      if (!StringUtils.isNotNullNotEmptyNotWhiteSpace(action)) {
+        action = ACTION_VIEW;
+      }
+
+      if (action.toLowerCase().equalsIgnoreCase(ACTION_DELETE)) {
+        String queryId = request.getParameter(QUERYSTRING_PARAM_QUERYID);
+        if (StringUtils.isNotNullNotEmptyNotWhiteSpace(queryId)) {
+
+          boolean deleteStatus = cluster.deleteQueryById(userName, queryId);
+          if (deleteStatus) {
+            responseJSON.put("status", STATUS_REPSONSE_SUCCESS);
+          } else {
+            responseJSON.put("status", STATUS_REPSONSE_FAIL);
+            responseJSON.put("error", ERROR_REPSONSE_QUERYNOTFOUND);
+          }
+        } else {
+          responseJSON.put("status", STATUS_REPSONSE_FAIL);
+          responseJSON.put("error", ERROR_REPSONSE_QUERYIDMISSING);
+        }
+      }
+
+      // Get list of past executed queries
+      queryResult = cluster.getQueryHistoryByUserId(userName);
+      responseJSON.put("queryHistory", queryResult);
+
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(eJSON, new String[] { "action:" + action,
+          "queryResult:" + queryResult });
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+    response.getOutputStream().write(responseJSON.toString().getBytes());
+  }
+
+  @RequestMapping(value = "/dataBrowserExport", method = RequestMethod.POST)
+  public void dataBrowserExport(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+
+    // get query string
+    String filename = request.getParameter("filename");
+    String resultContent = request.getParameter("content");
+
+    response.setHeader("Cache-Control", "");
+    response.setHeader("Content-type", "text/plain");
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(filename)) {
+      response.setHeader("Content-Disposition", "attachment; filename="
+          + filename);
+    } else {
+      response.setHeader("Content-Disposition", "attachment; filename="
+          + DEFAULT_EXPORT_FILENAME);
+    }
+
+    if (!StringUtils.isNotNullNotEmptyNotWhiteSpace(resultContent)) {
+      resultContent = "";
+    }
+
+    response.getOutputStream().write(resultContent.getBytes());
+  }
+
+  @RequestMapping(value = "/pulseProductSupport", method = RequestMethod.GET)
+  public void getConfiguredPulseProduct(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      responseJSON.put("product", pulseProductSupport);
+
+      // Send json response
+      response.getOutputStream().write(responseJSON.toString().getBytes());
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(eJSON, null);
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+  }
+
+  @RequestMapping(value = "/getQueryStatisticsGridModel", method = RequestMethod.GET)
+  public void getQueryStatisticsGridModel(HttpServletRequest request,
+      HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    JSONObject responseJSON = new JSONObject();
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+    String userName = request.getUserPrincipal().getName();
+
+    try {
+      String[] arrColNames = Cluster.Statement.getGridColumnNames();
+      String[] arrColAttribs = Cluster.Statement.getGridColumnAttributes();
+      int[] arrColWidths = Cluster.Statement.getGridColumnWidths();
+
+      JSONArray colNamesList = new JSONArray();
+      for (int i = 0; i < arrColNames.length; ++i) {
+        colNamesList.put(arrColNames[i]);
+      }
+
+      JSONArray colModelList = new JSONArray();
+      JSONObject columnJSON = null;
+      for (int i = 0; i < arrColAttribs.length; ++i) {
+        columnJSON = new JSONObject();
+        columnJSON.put("name", arrColAttribs[i]);
+        columnJSON.put("index", arrColAttribs[i]);
+        columnJSON.put("width", arrColWidths[i]);
+        columnJSON.put("sortable", "true");
+        columnJSON.put("sorttype", ((i == 0) ? "String" : "integer"));
+        colModelList.put(columnJSON);
+      }
+
+      responseJSON.put("columnNames", colNamesList);
+      responseJSON.put("columnModels", colModelList);
+      responseJSON.put("clusterName", cluster.getServerName());
+      responseJSON.put("userName", userName);
+
+      // Send json response
+      response.getOutputStream().write(responseJSON.toString().getBytes());
+    } catch (JSONException eJSON) {
+      LOGGER.logJSONError(eJSON, null);
+    } catch (Exception e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine("Exception Occured : " + e.getMessage());
+      }
+    }
+  }
+
+  /**
+   * @return the pulseProductSupport
+   */
+  public static String getPulseProductSupport() {
+    return pulseProductSupport;
+  }
+
+  /**
+   * @param pulseProductSupport
+   *          the pulseProductSupport to set
+   */
+  public static void setPulseProductSupport(String pulseProductSupport) {
+    PulseController.pulseProductSupport = pulseProductSupport;
+  }
+
+}
\ No newline at end of file


[66/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/GenericMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/GenericMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/GenericMessage.java
deleted file mode 100644
index 5921e22..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/GenericMessage.java
+++ /dev/null
@@ -1,807 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * GenericMessage is a light weight message class for holding (key, value) paired
- * data. It holds all primitive values and nested GenericMessage objects. 
- * @author dpark
- *
- */
-public class GenericMessage implements GenericMap, Cloneable
-{
-	private static final long serialVersionUID = 1L;
-	
-	/**
-     * Used to dump messages.
-     */
-    private final static StringBuffer spaces = new StringBuffer("                               ");
-    private static int CHUNK_SIZE_IN_BYTES = 100000;
-    
-    private ArrayList entryList = new ArrayList(10);
-
-
-    /**
-     * Creates an empty ObjectMessage object.
-     */
-    public GenericMessage()
-    {
-    }
-
-    /**
-     * Appends a GenericData object to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, GenericMap value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, value, GenericMap.Entry.TYPE_GENERIC_DATA));
-    }
-    
-    public GenericMap.Entry add(String key, Mappable value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, value, GenericMap.Entry.TYPE_MAPPABLE));
-    }
-
-    /**
-     * Appends a String to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, String value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, value, GenericMap.Entry.TYPE_STRING));
-    }
-
-    /**
-     * Appends a boolean value to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, boolean value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, Boolean.valueOf(value), GenericMap.Entry.TYPE_BOOLEAN));
-    }
-
-    /**
-     * Appends a byte value to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, byte value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, Byte.valueOf(value), GenericMap.Entry.TYPE_BYTE));
-    }
-
-    /**
-     * Appends a short value to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, short value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, Short.valueOf(value), GenericMap.Entry.TYPE_SHORT));
-    }
-
-    /**
-     * Appends a int value to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, int value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, Integer.valueOf(value), GenericMap.Entry.TYPE_INTEGER));
-    }
-
-    /**
-     * Appends a long value to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, long value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, Long.valueOf(value), GenericMap.Entry.TYPE_LONG));
-    }
-
-    /**
-     * Appends a float value to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, float value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, new Float(value), GenericMap.Entry.TYPE_FLOAT));
-    }
-
-    /**
-     * Appends a double value to the message.
-     * @param key  The key identifying the value. Note that this key needs
-     *              not be unique.
-     * @param value The value associated with the specified key.
-     */
-    public GenericMap.Entry add(String key, double value)
-    {
-        if (key == null) {
-            return null;
-        }
-        return addEntry(new GenericMap.Entry(key, new Double(value), GenericMap.Entry.TYPE_DOUBLE));
-    }
-
-    /**
-     * Appends an GenericMap.Entry object to the message.
-     * @param entry The entry associated with the specified key.
-     */
-    public GenericMap.Entry addEntry(Entry entry)
-    {
-        if (entry == null) {
-            return null;
-        }
-        entryList.add(entry);
-        return entry;
-    }
-
-    /**
-     * Returns the Entry object located at the specified index.
-     * @param index The index.
-     */
-    public GenericMap.Entry getEntry(int index)
-    {
-        if (index < 0 || index >= entryList.size()) {
-            return null;
-        }
-        return (Entry)entryList.get(index);
-    }
-
-    /**
-     * Returns the first Entry object identified by the specified key found
-     * in the message. There may be multiple Entry objects associated with
-     * the same key.
-     */
-    public GenericMap.Entry getEntry(String key)
-    {
-        if (key == null) {
-            return null;
-        }
-        GenericMap.Entry array[] = (Entry[])entryList.toArray(new GenericMap.Entry[0]);
-        for (int i = 0; i < array.length; i++) {
-            if (array[i].getKey().equals(key)) {
-                return array[i];
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Returns the first value identified by the specified key found in
-     * the message. There may be multiple Entry objects associated with
-     * the same key.
-     * @param key  The key identifying the interested value.
-     */
-    public Object getValue(String key)
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            return null;
-        }
-        return entry.getValue();
-    }
-
-    public boolean getBoolean(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (val == null) {
-            throw new NullPointerException("The field " + key + " has null value.");
-        }
-        if (entry.getType() != GenericMap.Entry.TYPE_BOOLEAN) {
-            if (val instanceof Boolean == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return ((Boolean)val).booleanValue();
-    }
-
-    public byte getByte(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (val == null) {
-            throw new NullPointerException("The field " + key + " has null value.");
-        }
-        if (entry.getType() != GenericMap.Entry.TYPE_BYTE) {
-            if (val instanceof Byte == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return ((Byte)val).byteValue();
-    }
-
-    public char getChar(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (val == null) {
-            throw new NullPointerException("The field " + key + " has null value.");
-        }
-        if (entry.getType() != GenericMap.Entry.TYPE_CHAR) {
-            if (val instanceof Character == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return ((Character)val).charValue();
-    }
-
-    public short getShort(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (val == null) {
-            throw new NullPointerException("The field " + key + " has null value.");
-        }
-        if (entry.getType() != GenericMap.Entry.TYPE_SHORT) {
-            if (val instanceof Short == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return ((Short)val).shortValue();
-    }
-
-    public int getInt(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (val == null) {
-            throw new NullPointerException("The field " + key + " has null value.");
-        }
-        if (entry.getType() != GenericMap.Entry.TYPE_INTEGER) {
-            if (val instanceof Integer == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return ((Integer)val).intValue();
-    }
-
-    public long getLong(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (val == null) {
-            throw new NullPointerException("The field " + key + " has null value.");
-        }
-        if (entry.getType() != GenericMap.Entry.TYPE_LONG) {
-            if (val instanceof Long == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return ((Long)val).longValue();
-    }
-
-    public float getFloat(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (val == null) {
-            throw new NullPointerException("The field " + key + " has null value.");
-        }
-        if (entry.getType() != GenericMap.Entry.TYPE_LONG) {
-            if (val instanceof Long == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return ((Long)val).longValue();
-    }
-
-    public double getDouble(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (val == null) {
-            throw new NullPointerException("The field " + key + " has null value.");
-        }
-        if (entry.getType() != GenericMap.Entry.TYPE_DOUBLE) {
-            if (val instanceof Double == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return ((Double)val).doubleValue();
-    }
-
-    public String getString(String key) throws NoSuchFieldException, InvalidTypeException
-    {
-        GenericMap.Entry entry = getEntry(key);
-        if (entry == null) {
-            throw new NoSuchFieldException("The field " + key + " is not found.");
-        }
-        Object val = entry.getValue();
-        if (entry.getType() != GenericMap.Entry.TYPE_STRING) {
-            if (val instanceof String == false) {
-                throw new InvalidTypeException("The field " + key + " has the type " + val.getClass().getName());
-            }
-        }
-        return (String)val;
-    }
-
-    /**
-     * Returns the Entry at the specified index position. It returns null if the index
-     * is out of range.
-     */
-    public GenericMap.Entry getEntryAt(int index)
-    {
-        if (index < 0 && index >= size()) {
-            return null;
-        }
-        return (Entry)entryList.get(index);
-    }
-
-    /**
-     * Returns the value found at the specified index position. Ir returns null if
-     * the index is out of range.
-     */
-    public Object getValueAt(int index)
-    {
-        GenericMap.Entry entry = getEntryAt(index);
-        if (entry == null) {
-            return null;
-        }
-        return entry.getValue();
-    }
-
-    /**
-     * Returns the key of the entry found at the specified index position. It returns null
-     * if the index is out of range.
-     */
-    public String getNameAt(int index)
-    {
-        GenericMap.Entry entry = getEntryAt(index);
-        if (entry == null) {
-            return null;
-        }
-        return entry.getKey();
-    }
-
-    /**
-     * Returns the index of the first Entry that matches the specified key.
-     * It returns -1 if not found.
-     * @param key The Entry key.
-     */
-    public int indexOf(String key)
-    {
-        if (key == null) {
-            return -1;
-        }
-        int index = -1;
-        GenericMap.Entry array[] = (Entry[])entryList.toArray(new GenericMap.Entry[0]);
-        for (int i = 0; i < array.length; i++) {
-            if (array[i].getKey().equals(key)) {
-                index = i;
-                break;
-            }
-        }
-        return index;
-    }
-
-    /**
-     * Returns the index of the last Entry that matches the specified key.
-     * It returns -1 if not found.
-     * @param key The Entry key.
-     */
-    public int lastIndexOf(String key)
-    {
-        if (key == null) {
-            return -1;
-        }
-        int index = -1;
-        GenericMap.Entry array[] = (Entry[])entryList.toArray(new GenericMap.Entry[0]);
-        for (int i = array.length - 1; i >= 0; i--) {
-            if (array[i].getKey().equals(key)) {
-                index = i;
-                break;
-            }
-        }
-        return index;
-    }
-
-    /**
-     * Returns the last Entry found in the message. t returns null if the message
-     * does not contain any data.
-     */
-    public GenericMap.Entry getLastEntry()
-    {
-        if (entryList.size() > 0) {
-            return (Entry)entryList.get(entryList.size()-1);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Returns the last value found in the message. t returns null if the message
-     * does not contain any data.
-     */
-    public Object getLastValue()
-    {
-        GenericMap.Entry entry = getLastEntry();
-        if (entry == null) {
-            return null;
-        }
-        return entry.getValue();
-    }
-
-    /**
-     * Returns the first Entry found in the message. It returns null if the message
-     * does not contain any data.
-     */
-    public GenericMap.Entry getFirstEntry()
-    {
-        if (entryList.size() > 0) {
-            return (Entry)entryList.get(0);
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Returns the first value found in the message. It returns null if the message
-     * does not contain any data.
-     */
-    public Object getFirstValue()
-    {
-        GenericMap.Entry entry = getFirstEntry();
-        if (entry == null) {
-            return null;
-        }
-        return entry.getValue();
-    }
-
-    /**
-     * Returns true if the message contains nested ObjectMessage.
-     */
-    public boolean hasGenericData()
-    {
-        GenericMap.Entry data[] = getAllEntries();
-        for (int i = 0; i < data.length; i++) {
-            if (data[i].getValue() instanceof GenericMap) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Removes the specified entry from the message.
-     */
-    public boolean remove(Entry entry)
-    {
-        return entryList.remove(entry);
-    }
-
-    /**
-     * Removes the Entry object at the specified position.
-     */
-    public GenericMap.Entry remove(int index)
-    {
-        return (Entry)entryList.remove(index);
-    }
-    
-    public Collection getEntries()
-    {
-    	return entryList;
-    }
-
-
-    /**
-     * Returns the number of Entry objects contained in this message.
-     */
-    public int size()
-    {
-        return entryList.size();
-    }
-
-    /**
-     * Returns all of the Entry objects in the form of array.
-     */
-    public GenericMap.Entry[] getAllEntries()
-    {
-        return (Entry[])entryList.toArray(new GenericMap.Entry[0]);
-    }
-
-    /**
-     * Returns all of the Entry objects that contain the non-ObjectMessage type,
-     * i.e., no nested messages.
-     */
-    public GenericMap.Entry[] getAllPrimitives()
-    {
-        GenericMap.Entry data[] = getAllEntries();
-        GenericMap.Entry messages[] = new GenericMap.Entry[data.length];
-        int count = 0;
-        for (int i = 0; i < data.length; i++) {
-            if (data[i].getValue() instanceof GenericMap == false) {
-                messages[count++] = data[i];
-            }
-        }
-        GenericMap.Entry m[] = new GenericMap.Entry[count];
-        System.arraycopy(messages, 0, m, 0, count);
-        return m;
-    }
-
-    /**
-     * Returns the number of non-ObjectMessage objects in this message.
-     */
-    public int getPrimitiveCount()
-    {
-        GenericMap.Entry data[] = getAllEntries();
-//        GenericMap.Entry messages[] = new GenericMap.Entry[data.length]; //FindBugs - unused
-        int count = 0;
-        for (int i = 0; i < data.length; i++) {
-            if (data[i].getValue() instanceof GenericMap == false) {
-                count++;
-            }
-        }
-        return count;
-    }
-
-    /**
-     * Returns all of the Entry objects that contain the ObjectMessage type, i.e., nested
-     * messages.
-     */
-    public GenericMap.Entry[] getAllGenericData()
-    {
-        GenericMap.Entry data[] = getAllEntries();
-        GenericMap.Entry messages[] = new GenericMap.Entry[data.length];
-        int count = 0;
-        for (int i = 0; i < data.length; i++) {
-            if (data[i].getValue() instanceof GenericMap) {
-                messages[count++] = data[i];
-            }
-        }
-        GenericMap.Entry m[] = new GenericMap.Entry[count];
-        System.arraycopy(messages, 0, m, 0, count);
-        return m;
-    }
-
-    /**
-     * Returns the number of ObjectMessage objects in this message.
-     */
-    public int getGenericDataCount()
-    {
-        GenericMap.Entry data[] = getAllEntries();
-//        GenericMap.Entry messages[] = new GenericMap.Entry[data.length]; //FindBugs - unused
-        int count = 0;
-        for (int i = 0; i < data.length; i++) {
-            if (data[i].getValue() instanceof GenericMap) {
-                count++;
-            }
-        }
-        return count;
-    }
-
-    public void clear()
-    {
-        entryList.clear();
-    }
-
-    private void convertToString(StringBuffer buffer, GenericMap message, int level)
-    {
-        GenericMap.Entry data[] = message.getAllEntries();
-        for (int i = 0; i < data.length; i++) {
-            if (data[i].getType() == GenericMap.Entry.TYPE_MAPPABLE) {
-                buffer.append(spaces.substring(0, level*3) + data[i].getKey() + "*****" + "\n");
-                convertToString(buffer, (GenericMap)data[i].getValue(), level+1);
-            } else {
-                buffer.append(spaces.substring(0, level*3)+ data[i].getKey() + " = " + data[i].getValue() + "\n");
-            }
-        }
-    }
-
-//    public void convertToString(StringBuffer buffer)
-//    {
-//        if (buffer == null) {
-//            return;
-//        }
-//        convertToString(buffer);
-//    }
-
-    public String toString()
-    {
-        StringBuffer buffer = new StringBuffer(100);
-        convertToString(buffer, this, 0);
-        return buffer.toString();
-    }
-
-    /**
-     * Recursively dumps the message contents to the specified writer.
-     */
-    private void dump(PrintWriter writer, GenericMap message, int level)
-    {
-        GenericMap.Entry data[] = message.getAllEntries();
-        for (int i = 0; i < data.length; i++) {
-            if (data[i].getType() == GenericMap.Entry.TYPE_MAPPABLE) {
-                writer.println(spaces.substring(0, level*3) + data[i].getKey() + "*****");
-                dump(writer, (GenericMap)data[i].getValue(), level+1);
-            } else {
-                writer.println(spaces.substring(0, level*3)+ data[i].getKey() + " = " + data[i].getValue());
-            }
-        }
-    }
-
-    /**
-     * Dumps the message contents to the specified output stream.
-     * @param out   The outputstream to which the contents are dumped.
-     */
-    public void dump(OutputStream out)
-    {
-        if (out == null) {
-            return;
-        }
-        PrintWriter writer = new PrintWriter(out);
-        dump(writer, this, 0);
-        writer.flush();
-    }
-
-    /**
-     * Dumps the message contents to the standard output stream (System.out).
-     */
-    public void dump()
-    {
-       PrintWriter writer = new PrintWriter(System.out);
-       dump(writer, this, 0);
-       writer.flush();
-    }
-
-    private static byte[] serializeDataSerializable(DataSerializable obj) throws IOException
-    {
-        byte[] ba = null;
-        ByteArrayOutputStream baos = new ByteArrayOutputStream(CHUNK_SIZE_IN_BYTES);
-        DataOutputStream dos = new DataOutputStream(baos);
-        DataSerializer.writeObject(obj, dos);
-        dos.flush();
-        ba = baos.toByteArray();
-        
-        return ba;
-    }
-
-    private static Object deserializeDataSerializable(byte[] byteArray)
-        throws IOException, ClassNotFoundException
-    {
-        ByteArrayInputStream bais = new ByteArrayInputStream(byteArray);
-        DataInputStream dis = new DataInputStream(bais);
-        Object obj = DataSerializer.readObject(dis);
-        return obj;
-    }
-
-    private byte[] serialize(Object obj) throws IOException
-    {
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ObjectOutputStream oos = new ObjectOutputStream(baos);
-        oos.writeObject(obj);
-        oos.flush();
-        byte array[] = baos.toByteArray();
-        baos.close();
-        return array;
-    }
-
-    private Object deserialize(byte objArray[]) throws IOException, ClassNotFoundException
-    {
-        ByteArrayInputStream bais = new ByteArrayInputStream(objArray);
-        ObjectInputStream ois = new ObjectInputStream(bais);
-        Object obj = ois.readObject();
-        return obj;
-    }
-
-    /**
-     * Returns a shallow copy of this <tt>ObjectMessage</tt> instance.  (The
-     * elements themselves are not copied.)
-     *
-     * @return  a clone of this <tt>ObjectMessage</tt> instance.
-     */
-    public Object clone()
-    {
-        GenericMessage dup = new GenericMessage();
-        dup.entryList = (ArrayList)this.entryList.clone();
-        return dup;
-    }
-
-	public void fromData(DataInput dataInput) throws IOException, ClassNotFoundException
-	{
-		int count = dataInput.readInt();
-		Entry entry;
-		byte type;
-		String key;
-		Object value;
-		for (int i = 0; i < count; i++) {
-			type = dataInput.readByte();
-			key = DataSerializer.readString(dataInput);
-			value = DataSerializer.readObject(dataInput);
-			entry = new GenericMap.Entry(key, value, type);
-			entryList.add(entry);
-		}
-	}
-
-	public void toData(DataOutput dataOutput) throws IOException
-	{
-		int count = entryList.size();
-		dataOutput.writeInt(count);
-		Entry entry;
-		for (Iterator iterator = entryList.iterator(); iterator.hasNext();) {
-			entry = (Entry)iterator.next();
-			dataOutput.writeByte(entry.getType());
-			DataSerializer.writeString(entry.getKey(), dataOutput);
-			DataSerializer.writeObject(entry.getValue(), dataOutput);
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/InvalidTypeException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/InvalidTypeException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/InvalidTypeException.java
deleted file mode 100644
index 1f2aa30..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/InvalidTypeException.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-/**
- * Thrown when the object type is invalid.
- */
-public class InvalidTypeException extends Exception
-{
-    /**
-     * Constructs an <code>InvalidTypeException</code> with <code>null</code>
-     * as its error detail message.
-     */
-    public InvalidTypeException() {
-	    super();
-    }
-
-    /**
-     * Constructs an <code>InvalidTypeException</code> with the specified detail
-     * message. The error message string <code>s</code> can later be
-     * retrieved by the <code>{@link java.lang.Throwable#getMessage}</code>
-     * method of class <code>java.lang.Throwable</code>.
-     *
-     * @param   s   the detail message.
-     */
-    public InvalidTypeException(String s) {
-	    super(s);
-
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMap.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMap.java
deleted file mode 100644
index 7a06e11..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMap.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.AbstractMap;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * An implementation of a Map that guarantees original order of keys as they
- * are added to the Map.
- */
-public class ListMap extends AbstractMap implements Cloneable, DataSerializable
-{
-	/**
-	 * Version id for Serializable 
-	 */
-	private static final long serialVersionUID = 1L;
-	
-	protected ListSet entrySet = new ListSet();
-
-	/**
-	 * Internal class to implement a Set that uses an ArrayList to keep
-	 * original order of keys
-	 */
-	static protected class ListSet extends AbstractSet implements Serializable
-	{
-		protected ArrayList entryList = new ArrayList();
-
-		public ListSet()
-		{
-			super();
-		}
-
-		public Iterator iterator()
-		{
-			return entryList.iterator();
-		}
-
-		public int size()
-		{
-			return entryList.size();
-		}
-
-		public boolean add(Object o)
-		{
-			boolean retVal = false;
-			if (!entryList.contains(o)) {
-				retVal = entryList.add(o);
-			}
-			return retVal;
-		}
-
-		/**
-		 * Internal method to put the entry by looking for existing entry and *
-		 * returning it or add new entry.
-		 */
-		public Object putEntry(Object entry)
-		{
-			Object retVal = entry;
-			int index = entryList.indexOf(entry);
-			if (index >= 0) {
-				retVal = entryList.get(index);
-			} else {
-				entryList.add(entry);
-			}
-			return retVal;
-		}
-	}
-
-	/**
-	 * Internal class to implement the Map.Entry interface that holds the
-	 * entry objects in the Map.
-	 */
-	static protected class ListEntry implements Entry, Serializable
-	{
-		protected Object key = null;
-
-		protected Object value = null;
-
-		public ListEntry(Object pKey)
-		{
-			key = pKey;
-		}
-
-		public Object getKey()
-		{
-			return key;
-		}
-
-		public Object getValue()
-		{
-			return value;
-		}
-
-		public Object setValue(Object pValue)
-		{
-			Object prevValue = value;
-			value = pValue;
-			return prevValue;
-		}
-
-		public boolean equals(Object o)
-		{
-			boolean retVal = false;
-			Object otherKey = o;
-			if (o instanceof ListEntry) {
-				otherKey = ((ListEntry) o).getKey();
-			}
-			retVal = (key == null && otherKey == null)
-					|| (key != null && key.equals(otherKey));
-			return retVal;
-		}
-
-		public int hashCode()
-		{
-			return (key != null) ? key.hashCode() : 0;
-		}
-	}
-
-	/** 
-	 * Default constructor 
-	 */
-	public ListMap()
-	{
-		super();
-	}
-
-	/**
-	 * Implement put to allow this Map to be writable. If the key represents a
-	 * new element in the Map, then it is added to the end of the Map.
-	 * Otherwise, the existing entry is updated with the new value. 
-	 * 
-	 * @param key
-	 *            the key of the value to set. 
-	 * @param value
-	 *            the value to set. 
-	 * @return the previous value set at this key (null indicates new or
-	 *         previous value was null).
-	 */
-	public Object put(Object key, Object value)
-	{
-		Map.Entry entry = new ListEntry(key);
-		entry = (Map.Entry)entrySet.putEntry(entry);
-		return entry.setValue(value);
-	}
-
-	/** 
-	 * Return the Set that contains a list of Map.Entry objects for this Map. 
-	 */
-	public Set entrySet()
-	{
-		return entrySet;
-	}
-	
-	public Object clone() 
-	{
-		ListMap result = null;
-		try {
-			result = (ListMap)super.clone();
-		} catch (Exception e) {
-			// ignore
-		}
-		return result;
-    }
-
-	public void fromData(DataInput dataInput) throws IOException, ClassNotFoundException 
-	{
-		int size = dataInput.readInt();
-		String key;
-		Object value;
-		for (int i = 0; i < size; i++) {
-			key = DataSerializer.readString(dataInput);
-			value = DataSerializer.readObject(dataInput);
-			put(key, value);
-		}
-	}
-
-	public void toData(DataOutput dataOutput) throws IOException 
-	{
-		dataOutput.writeInt(entrySet.size());
-		Map.Entry entry;
-		for (Iterator iterator = entrySet.iterator(); iterator.hasNext(); ) {
-			entry = (Map.Entry)iterator.next();
-			DataSerializer.writeObject(entry.getKey(), dataOutput);
-			DataSerializer.writeObject(entry.getValue(), dataOutput);
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMapMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMapMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMapMessage.java
deleted file mode 100644
index 5d7ee39..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMapMessage.java
+++ /dev/null
@@ -1,615 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-
-/**
- * ListMapMessage is a light weight map that guarantees the original order of
- * keys as they are added to the map. It holds all primitive values and 
- * nested ListMapMessage objects. 
- * @author dpark
- *
- */
-public class ListMapMessage implements Mappable, Cloneable
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Used to dump messages.
-     */
-    private final static StringBuffer spaces = new StringBuffer("                               ");
-
-    private ListMap map = new ListMap();
-
-    /**
-     * Creates an empty ListMapMessage object.
-     */
-    public ListMapMessage()
-    {
-    }
-
-    /**
-     * Puts a Mappable to the message.
-     * @param name  The unique name identifying the value.
-     * @param mappable The value associated with the specified name.
-     */
-    public void put(String name, Mappable mappable)
-    {
-        map.put(name, mappable);
-    }
-    
-    /**
-     * Puts a Listable to the message.
-     * @param name  The unique name identifying the value.
-     * @param listable The value associated with the specified name.
-     */
-    public void put(String name, Listable listable)
-    {
-        map.put(name, listable);
-    }
-
-
-    /**
-     * Puts a String to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, String value)
-    {
-    	map.put(name, value);
-    }
-
-    /**
-     * Appends a boolean value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, boolean value)
-    {
-    	map.put(name, Boolean.valueOf(value));
-    }
-
-    /**
-     * Puts a byte value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, byte value)
-    {
-        map.put(name, Byte.valueOf(value));
-    }
-
-    /**
-     * Appends a short value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, short value)
-    {
-        map.put(name, Short.valueOf(value));
-    }
-
-    /**
-     * Puts a int value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, int value)
-    {
-        map.put(name, Integer.valueOf(value));
-    }
-
-    /**
-     * Appends a long value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, long value)
-    {
-        map.put(name, Long.valueOf(value));
-    }
-
-    /**
-     * Puts a float value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, float value)
-    {
-        map.put(name, new Float(value));
-    }
-
-    /**
-     * Puts a double value to the message.
-     ** @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, double value)
-    {
-        map.put(name, new Double(value));
-    }
-
-    /**
-     * Returns the object identified by the specified name found
-     * in the message.
-     */
-    public Object getValue(String name)
-    {
-        return map.get(name);
-    }
-
-    /**
-     * Returns the boolean value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public boolean getBoolean(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Boolean) {
-    			return ((Boolean)value).booleanValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-    
-    /**
-     * Returns the byte value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public byte getByte(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Byte) {
-    			return ((Byte)value).byteValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the char value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public char getChar(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Character) {
-    			return ((Character)value).charValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the short value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public short getShort(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Short) {
-    			return ((Short)value).shortValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the int value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public int getInt(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Integer) {
-    			return ((Integer)value).intValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the long value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public long getLong(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Long) {
-    			return ((Long)value).longValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the float value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public float getFloat(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Float) {
-    			return ((Float)value).floatValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the double value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public double getDouble(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Double) {
-    			return ((Double)value).doubleValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-    
-    /**
-     * Returns the String value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public String getString(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof String) {
-    			return (String)value;
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns true if the message contains nested Mappable.
-     */
-    public boolean hasMappable()
-    {
-        Map.Entry entries[] = getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable) {
-                return true;
-            }
-        }
-        return false;
-    }
-    
-    /**
-     * Returns true if the message contains nested Listable.
-     */
-    public boolean hasListable()
-    {
-        Map.Entry entries[] = getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Listable) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Removes the specified entry from the message.
-     */
-    public Object remove(String name)
-    {
-        return map.remove(name);
-    }
-
-    /**
-     * Returns the number of entries in this message.
-     */
-    public int size()
-    {
-        return map.size();
-    }
-    
-    public Collection values()
-    {
-    	return map.values();
-    }
-    
-    public Collection getValues()
-    {
-    	return map.values();
-    }
-    
-    public Set keys()
-    {
-    	return map.keySet();
-    }
-    
-    public Set getKeys()
-    {
-    	return map.keySet();
-    }
-    
-    public Set getEntries()
-    {
-    	return map.entrySet();
-    }
-
-    /**
-     * Returns all of the entries in the form of array.
-     */
-    public Map.Entry[] getAllEntries()
-    {
-        return (Map.Entry[])map.entrySet().toArray(new Map.Entry[0]);
-    }
-
-    /**
-     * Returns all of the primitive entries in the message.
-     */
-    public Map.Entry[] getAllPrimitives()
-    {
-    	Map.Entry entries[] = getAllEntries();
-    	Map.Entry messages[] = new Map.Entry[entries.length];
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable == false) {
-                messages[count++] = entries[i];
-            }
-        }
-        Map.Entry m[] = new Map.Entry[count];
-        System.arraycopy(messages, 0, m, 0, count);
-        return m;
-    }
-
-    /**
-     * Returns the number primitive entries in this message.
-     */
-    public int getPrimitiveCount()
-    {
-        Map.Entry entries[] = getAllEntries();
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable == false) {
-                count++;
-            }
-        }
-        return count;
-    }
-
-    /**
-     * Returns all of the entries that have the ListMapMessage type, i.e., nested
-     * messages.
-     */
-    public Map.Entry[] getAllMappables()
-    {
-    	Map.Entry entries[] = getAllEntries();
-    	Map.Entry messages[] = new Map.Entry[entries.length];
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable) {
-                messages[count++] = entries[i];
-            }
-        }
-        Map.Entry m[] = new Map.Entry[count];
-        System.arraycopy(messages, 0, m, 0, count);
-        return m;
-    }
-    
-    /**
-     * Returns all of the entries that have the ListMapMessage type, i.e., nested
-     * messages.
-     */
-    public Map.Entry[] getAllListables()
-    {
-    	Map.Entry entries[] = getAllEntries();
-    	Map.Entry messages[] = new Map.Entry[entries.length];
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Listable) {
-                messages[count++] = entries[i];
-            }
-        }
-        Map.Entry m[] = new Map.Entry[count];
-        System.arraycopy(messages, 0, m, 0, count);
-        return m;
-    }
-
-    /**
-     * Returns the number of Mappable entries in this message.
-     */
-    public int getMappableCount()
-    {
-    	Map.Entry entries[] = getAllEntries();
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable) {
-                count++;
-            }
-        }
-        return count;
-    }
-    
-    /**
-     * Returns the number of Listable entries in this message.
-     */
-    public int getListableCount()
-    {
-    	Map.Entry entries[] = getAllEntries();
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Listable) {
-                count++;
-            }
-        }
-        return count;
-    }
-
-    /**
-     * Clears the message. It removes all of the entries in the message.
-     *
-     */
-    public void clear()
-    {
-        map.clear();
-    }
-
-    private void convertToString(StringBuffer buffer, Mappable message, int level)
-    {
-    	Map.Entry entries[] = message.getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable) {
-                buffer.append(spaces.substring(0, level*3) + entries[i].getKey() + "*****" + "\n");
-                convertToString(buffer, (Mappable)entries[i].getValue(), level+1);
-            } else {
-                buffer.append(spaces.substring(0, level*3)+ entries[i].getKey() + " = " + entries[i].getValue() + "\n");
-            }
-        }
-    }
-
-//    public void convertToString(StringBuffer buffer)
-//    {
-//        if (buffer == null) {
-//            return;
-//        }
-//        convertToString(buffer);
-//    }
-
-    public String toString()
-    {
-        StringBuffer buffer = new StringBuffer(100);
-        convertToString(buffer, this, 0);
-        return buffer.toString();
-    }
-
-    /**
-     * Recursively dumps the message contents to the specified writer.
-     */
-    private void dump(PrintWriter writer, Mappable message, int level)
-    {
-    	Map.Entry entries[] = message.getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-        	if (entries[i].getValue() instanceof Mappable) {
-                writer.println(spaces.substring(0, level*3) + entries[i].getKey() + "*****");
-                dump(writer, (Mappable)entries[i].getValue(), level+1);
-            } else {
-                writer.println(spaces.substring(0, level*3)+ entries[i].getKey() + " = " + entries[i].getValue());
-            }
-        }
-    }
-
-    /**
-     * Dumps the message contents to the specified output stream.
-     * @param out   The outputstream to which the contents are dumped.
-     */
-    public void dump(OutputStream out)
-    {
-        if (out == null) {
-            return;
-        }
-        PrintWriter writer = new PrintWriter(out);
-        dump(writer, this, 0);
-        writer.flush();
-    }
-
-    /**
-     * Dumps the message contents to the standard output stream (System.out).
-     */
-    public void dump()
-    {
-       PrintWriter writer = new PrintWriter(System.out);
-       dump(writer, this, 0);
-       writer.flush();
-    }
-
-    /**
-     * Returns a shallow copy of this <tt>ListMapMessage</tt> instance.  (The
-     * elements themselves are not copied.)
-     *
-     * @return  a clone of this <tt>ListMapMessage</tt> instance.
-     */
-    public Object clone()
-    {
-        ListMapMessage dup = new ListMapMessage();
-        dup.map = (ListMap)this.map.clone();
-        return dup;
-    }
-
-	public void fromData(DataInput dataInput) throws IOException, ClassNotFoundException
-	{
-	  InternalDataSerializer.invokeFromData(map, dataInput);
-	}
-
-	public void toData(DataOutput dataOutput) throws IOException
-	{
-	  InternalDataSerializer.invokeToData(map, dataOutput);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMessage.java
deleted file mode 100644
index ac31b16..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/ListMessage.java
+++ /dev/null
@@ -1,594 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * ListMessage is a light weight message class for holding only values
- * (no keys). It holds all primitive values and nested ListMessage objects. 
- * @author dpark
- *
- */
-public class ListMessage implements Listable, Cloneable
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Used to dump messages.
-     */
-    private final static StringBuffer spaces = new StringBuffer("                               ");
-
-    private ArrayList entryList = new ArrayList(10);
-
-    /**
-     * Creates an empty ListMessage object.
-     */
-    public ListMessage()
-    {
-    }
-
-    /**
-     * Puts a Listable to the message.
-     * @param listable The nested Listable value to append.
-     */
-    public void add(Listable listable)
-    {
-        entryList.add(listable);
-    }
-    
-    /**
-     * Puts a Mappable to the message.
-     * @param mappable The nested Mappable value to append.
-     */
-    public void add(Mappable mappable)
-    {
-        entryList.add(mappable);
-    }
-
-    /**
-     * Puts a String to the message.
-     * @param value The String value to append.
-     */
-    public void add(String value)
-    {
-    	entryList.add(value);
-    }
-
-    /**
-     * Appends a boolean value to the message.
-     * @param value The boolean value to append.
-     */
-    public void add(boolean value)
-    {
-    	entryList.add(Boolean.valueOf(value));
-    }
-
-    /**
-     * Appends a byte value to the message.
-     * @param value The byte value to append.
-     */
-    public void add(byte value)
-    {
-    	entryList.add(Byte.valueOf(value));
-    }
-
-    /**
-     * Appends a short value to the message.
-     * @param value The short value to append.
-     */
-    public void add(short value)
-    {
-    	entryList.add(Short.valueOf(value));
-    }
-
-    /**
-     * Appends a int value to the message.
-     * @param value The int value to append.
-     */
-    public void add(int value)
-    {
-    	entryList.add(Integer.valueOf(value));
-    }
-
-    /**
-     * Appends a long value to the message.
-     * @param value The long value to append.
-     */
-    public void add(long value)
-    {
-    	entryList.add(Long.valueOf(value));
-    }
-
-    /**
-     * Puts a float value to the message.
-     * @param value The float value to append.
-     */
-    public void add(float value)
-    {
-    	entryList.add(new Float(value));
-    }
-
-    /**
-     * Puts a double value to the message.
-     * @param value The double value to append.
-     */
-    public void add(double value)
-    {
-    	entryList.add(new Double(value));
-    }
-
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     */
-    public Object getValue(int index) throws IndexOutOfBoundsException
-    {
-    	return entryList.get(index);
-    }
-
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public boolean getBoolean(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof Boolean) {
-			return ((Boolean)value).booleanValue();
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-    
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public byte getByte(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof Byte) {
-			return ((Byte)value).byteValue();
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public char getChar(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof Character) {
-			return ((Character)value).charValue();
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public short getShort(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof Short) {
-			return ((Short)value).shortValue();
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public int getInt(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof Integer) {
-			return ((Integer)value).intValue();
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public long getLong(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof Long) {
-			return ((Long)value).intValue();
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-    
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public float getFloat(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof Float) {
-			return ((Float)value).intValue();
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public double getDouble(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof Double) {
-			return ((Double)value).intValue();
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-    
-    /**
-     * Returns the element at the specified position in this list.
-     *
-     * @param  index index of element to return.
-     * @return the element at the specified position in this list.
-     * @throws    IndexOutOfBoundsException if index is out of range <tt>(index
-     * 		  &lt; 0 || index &gt;= size())</tt>.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public String getString(int index) throws IndexOutOfBoundsException, InvalidTypeException
-    {
-    	Object value = getValue(index);
-		if (value instanceof String) {
-			return (String)value;
-		} else {
-			throw new InvalidTypeException("The value at index " + index + " has the type " + value.getClass().getName());
-		}
-    }
-
-    /**
-     * Returns true if the message contains nested Listable.
-     */
-    public boolean hasListable()
-    {
-    	Iterator iterator = entryList.iterator();
-    	while (iterator.hasNext()) {
-    		if (iterator.next() instanceof Listable) {
-    			return true;
-    		}
-    	}
-        return false;
-    }
-
-    /**
-     * Returns true if the message contains nested Mappable.
-     */
-    public boolean hasMappable()
-    {
-    	Iterator iterator = entryList.iterator();
-    	while (iterator.hasNext()) {
-    		if (iterator.next() instanceof Mappable) {
-    			return true;
-    		}
-    	}
-        return false;
-    }
-    
-    /**
-     * Removes the specified entry from the message.
-     */
-    public Object remove(int index)
-    {
-        return entryList.remove(index);
-    }
-
-    /**
-     * Returns the number of entries in this message.
-     */
-    public int size()
-    {
-        return entryList.size();
-    }
-    
-    public Collection values()
-    {
-    	return entryList;
-    }
-    
-    public Collection getValues()
-    {
-    	return entryList;
-    }
-
-    /**
-     * Returns all of the values in the form of array.
-     */
-    public Object[] getAllValues()
-    {
-        return entryList.toArray();
-    }
-
-    /**
-     * Returns all of the primitive entries in the message.
-     */
-    public Object[] getAllPrimitives()
-    {
-    	ArrayList primitiveList = new ArrayList();
-    	Iterator iterator = entryList.iterator();
-    	Object value;
-    	while (iterator.hasNext()) {
-    		value = iterator.next();
-    		if (value instanceof Listable == false) {
-    			primitiveList.add(value);
-    		}
-    	}
-    	return primitiveList.toArray();
-    }
-
-    /**
-     * Returns the number primitive entries in this message.
-     */
-    public int getPrimitiveCount()
-    {
-    	Iterator iterator = entryList.iterator();
-    	int count = 0;
-    	while (iterator.hasNext()) {
-    		if (iterator.next() instanceof Listable == false) {
-    			count++;
-    		}
-    	}
-    	return count;
-    }
-
-    /**
-     * Returns all of the values that have the Listable type, i.e., nested
-     * messages.
-     */
-    public Listable[] getAllListables()
-    {
-    	ArrayList listMessageList = new ArrayList();
-    	Iterator iterator = entryList.iterator();
-    	Object value;
-    	while (iterator.hasNext()) {
-    		value = iterator.next();
-    		if (value instanceof Listable) {
-    			listMessageList.add(value);
-    		}
-    	}
-    	return (Listable[])listMessageList.toArray(new Listable[0]);
-    }
-    
-    /**
-     * Returns all of the values that have the Mappable type, i.e., nested
-     * messages.
-     */
-    public Mappable[] getAllMappables()
-    {
-    	ArrayList listMessageList = new ArrayList();
-    	Iterator iterator = entryList.iterator();
-    	Object value;
-    	while (iterator.hasNext()) {
-    		value = iterator.next();
-    		if (value instanceof Mappable) {
-    			listMessageList.add(value);
-    		}
-    	}
-    	return (Mappable[])listMessageList.toArray(new Mappable[0]);
-    }
-
-    /**
-     * Returns the number of Listable entries in this message.
-     */
-    public int getListableCount()
-    {
-    	Iterator iterator = entryList.iterator();
-    	int count = 0;
-    	while (iterator.hasNext()) {
-    		if (iterator.next() instanceof Listable) {
-    			count++;
-    		}
-    	}
-        return count;
-    }
-    
-    /**
-     * Returns the number of Mappable entries in this message.
-     */
-    public int getMappableCount()
-    {
-    	Iterator iterator = entryList.iterator();
-    	int count = 0;
-    	while (iterator.hasNext()) {
-    		if (iterator.next() instanceof Mappable) {
-    			count++;
-    		}
-    	}
-        return count;
-    }
-
-    /**
-     * Clears the message. It removes all of the values in the message.
-     *
-     */
-    public void clear()
-    {
-        entryList.clear();
-    }
-
-    private void convertToString(StringBuffer buffer, Listable message, int level)
-    {
-    	Object values[] = message.getAllValues();
-        for (int i = 0; i < values.length; i++) {
-            if (values[i] instanceof Listable) {
-                buffer.append(spaces.substring(0, level*3) + values[i] + "*****" + "\n");
-                convertToString(buffer, (Listable)values[i], level+1);
-            } else {
-                buffer.append(spaces.substring(0, level*3)+ values[i] + "\n");
-            }
-        }
-    }
-
-//    public void convertToString(StringBuffer buffer)
-//    {
-//        if (buffer == null) {
-//            return;
-//        }
-//        convertToString(buffer);
-//    }
-
-    public String toString()
-    {
-        StringBuffer buffer = new StringBuffer(100);
-        convertToString(buffer, this, 0);
-        return buffer.toString();
-    }
-
-    /**
-     * Recursively dumps the message contents to the specified writer.
-     */
-    private void dump(PrintWriter writer, Listable message, int level)
-    {
-    	Object values[] = message.getAllValues();
-        for (int i = 0; i < values.length; i++) {
-        	if (values[i] instanceof Listable) {
-                writer.println(spaces.substring(0, level*3) + values[i] + "*****");
-                dump(writer, (Listable)values[i], level+1);
-        	} if (values[i] instanceof Listable) {
-        		writer.println(spaces.substring(0, level*3) + values[i] + "*****");
-                dump(writer, (Mappable)values[i], level+1);
-            } else {
-                writer.println(spaces.substring(0, level*3)+ values[i]);
-            }
-        }
-    }
-    
-    /**
-     * Recursively dumps the message contents to the specified writer.
-     */
-    private void dump(PrintWriter writer, Mappable message, int level)
-    {
-    	Map.Entry entries[] = message.getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-        	if (entries[i].getValue() instanceof Mappable) {
-                writer.println(spaces.substring(0, level*3) + entries[i].getKey() + "*****");
-                dump(writer, (Mappable)entries[i].getValue(), level+1);
-        	} else if (entries[i].getValue() instanceof Listable) {
-                writer.println(spaces.substring(0, level*3) + entries[i].getKey() + "*****");
-                dump(writer, (Listable)entries[i].getValue(), level+1);
-            } else {
-                writer.println(spaces.substring(0, level*3)+ entries[i].getKey() + " = " + entries[i].getValue());
-            }
-        }
-    }
-
-    /**
-     * Dumps the message contents to the specified output stream.
-     * @param out   The outputstream to which the contents are dumped.
-     */
-    public void dump(OutputStream out)
-    {
-        if (out == null) {
-            return;
-        }
-        PrintWriter writer = new PrintWriter(out);
-        dump(writer, this, 0);
-        writer.flush();
-    }
-
-    /**
-     * Dumps the message contents to the standard output stream (System.out).
-     */
-    public void dump()
-    {
-       PrintWriter writer = new PrintWriter(System.out);
-       dump(writer, this, 0);
-       writer.flush();
-    }
-
-    /**
-     * Returns a shallow copy of this <tt>ListMessage</tt> instance.  (The
-     * elements themselves are not copied.)
-     *
-     * @return  a clone of this <tt>ListMessage</tt> instance.
-     */
-    public Object clone()
-    {
-        ListMessage dup = new ListMessage();
-        dup.entryList = (ArrayList)this.entryList.clone();
-        return dup;
-    }
-
-	public void fromData(DataInput dataInput) throws IOException, ClassNotFoundException
-	{
-		entryList = DataSerializer.readArrayList(dataInput);
-	}
-
-	public void toData(DataOutput dataOutput) throws IOException
-	{
-		DataSerializer.writeArrayList(entryList, dataOutput);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/Listable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/Listable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/Listable.java
deleted file mode 100644
index 1095397..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/Listable.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-import java.io.OutputStream;
-import java.util.Collection;
-
-import com.gemstone.gemfire.DataSerializable;
-
-public interface Listable extends DataSerializable
-{
-	public void add(Listable listable);
-	public void add(Mappable listable);
-	public void add(String value);
-	public void add(boolean value);
-	public void add(byte value);
-	public void add(short value);
-	public void add(int value);
-	public void add(long value);
-	public void add(float value);
-	public void add(double value);
-	public Object getValue(int index) throws IndexOutOfBoundsException;
-	public boolean getBoolean(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public byte getByte(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public char getChar(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public short getShort(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public int getInt(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public long getLong(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public float getFloat(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public double getDouble(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public String getString(int index) throws IndexOutOfBoundsException, InvalidTypeException;
-	public boolean hasListable();
-	public boolean hasMappable();
-	public Object remove(int index);
-	public int size();
-	public Collection getValues();
-	public Object[] getAllValues();
-	public Object[] getAllPrimitives();
-	public int getPrimitiveCount();
-	public Listable[] getAllListables();
-	public Mappable[] getAllMappables();
-	public int getListableCount();
-	public int getMappableCount();
-	public void clear();
-	public void dump(OutputStream out);
-	public Object clone();
-}


[15/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.sparkline.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.sparkline.js b/pulse/src/main/webapp/scripts/lib/jquery.sparkline.js
new file mode 100644
index 0000000..3ffb051
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.sparkline.js
@@ -0,0 +1,3001 @@
+/**
+*
+* jquery.sparkline.js
+*
+* v2.0
+* (c) Splunk, Inc
+* Contact: Gareth Watts (gareth@splunk.com)
+* http://omnipotent.net/jquery.sparkline/
+*
+* Generates inline sparkline charts from data supplied either to the method
+* or inline in HTML
+*
+* Compatible with Internet Explorer 6.0+ and modern browsers equipped with the canvas tag
+* (Firefox 2.0+, Safari, Opera, etc)
+*
+* License: New BSD License
+*
+* Copyright (c) 2012, Splunk Inc.
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without modification,
+* are permitted provided that the following conditions are met:
+*
+*     * Redistributions of source code must retain the above copyright notice,
+*       this list of conditions and the following disclaimer.
+*     * Redistributions in binary form must reproduce the above copyright notice,
+*       this list of conditions and the following disclaimer in the documentation
+*       and/or other materials provided with the distribution.
+*     * Neither the name of Splunk Inc nor the names of its contributors may
+*       be used to endorse or promote products derived from this software without
+*       specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+* SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*
+* Usage:
+*  $(selector).sparkline(values, options)
+*
+* If values is undefined or set to 'html' then the data values are read from the specified tag:
+*   <p>Sparkline: <span class="sparkline">1,4,6,6,8,5,3,5</span></p>
+*   $('.sparkline').sparkline();
+* There must be no spaces in the enclosed data set
+*
+* Otherwise values must be an array of numbers or null values
+*    <p>Sparkline: <span id="sparkline1">This text replaced if the browser is compatible</span></p>
+*    $('#sparkline1').sparkline([1,4,6,6,8,5,3,5])
+*    $('#sparkline2').sparkline([1,4,6,null,null,5,3,5])
+*
+* Values can also be specified in an HTML comment, or as a values attribute:
+*    <p>Sparkline: <span class="sparkline"><!--1,4,6,6,8,5,3,5 --></span></p>
+*    <p>Sparkline: <span class="sparkline" values="1,4,6,6,8,5,3,5"></span></p>
+*    $('.sparkline').sparkline();
+*
+* For line charts, x values can also be specified:
+*   <p>Sparkline: <span class="sparkline">1:1,2.7:4,3.4:6,5:6,6:8,8.7:5,9:3,10:5</span></p>
+*    $('#sparkline1').sparkline([ [1,1], [2.7,4], [3.4,6], [5,6], [6,8], [8.7,5], [9,3], [10,5] ])
+*
+* By default, options should be passed in as teh second argument to the sparkline function:
+*   $('.sparkline').sparkline([1,2,3,4], {type: 'bar'})
+*
+* Options can also be set by passing them on the tag itself.  This feature is disabled by default though
+* as there's a slight performance overhead:
+*   $('.sparkline').sparkline([1,2,3,4], {enableTagOptions: true})
+*   <p>Sparkline: <span class="sparkline" sparkType="bar" sparkBarColor="red">loading</span></p>
+* Prefix all options supplied as tag attribute with "spark" (configurable by setting tagOptionPrefix)
+*
+* Supported options:
+*   lineColor - Color of the line used for the chart
+*   fillColor - Color used to fill in the chart - Set to '' or false for a transparent chart
+*   width - Width of the chart - Defaults to 3 times the number of values in pixels
+*   height - Height of the chart - Defaults to the height of the containing element
+*   chartRangeMin - Specify the minimum value to use for the Y range of the chart - Defaults to the minimum value supplied
+*   chartRangeMax - Specify the maximum value to use for the Y range of the chart - Defaults to the maximum value supplied
+*   chartRangeClip - Clip out of range values to the max/min specified by chartRangeMin and chartRangeMax
+*   chartRangeMinX - Specify the minimum value to use for the X range of the chart - Defaults to the minimum value supplied
+*   chartRangeMaxX - Specify the maximum value to use for the X range of the chart - Defaults to the maximum value supplied
+*   composite - If true then don't erase any existing chart attached to the tag, but draw
+*           another chart over the top - Note that width and height are ignored if an
+*           existing chart is detected.
+*   tagValuesAttribute - Name of tag attribute to check for data values - Defaults to 'values'
+*   enableTagOptions - Whether to check tags for sparkline options
+*   tagOptionPrefix - Prefix used for options supplied as tag attributes - Defaults to 'spark'
+*   disableHiddenCheck - If set to true, then the plugin will assume that charts will never be drawn into a
+*           hidden dom element, avoding a browser reflow
+*   disableInteraction - If set to true then all mouseover/click interaction behaviour will be disabled,
+*       making the plugin perform much like it did in 1.x
+*   disableTooltips - If set to true then tooltips will be disabled - Defaults to false (tooltips enabled)
+*   disableHighlight - If set to true then highlighting of selected chart elements on mouseover will be disabled
+*       defaults to false (highlights enabled)
+*   highlightLighten - Factor to lighten/darken highlighted chart values by - Defaults to 1.4 for a 40% increase
+*   tooltipContainer - Specify which DOM element the tooltip should be rendered into - defaults to document.body
+*   tooltipClassname - Optional CSS classname to apply to tooltips - If not specified then a default style will be applied
+*   tooltipOffsetX - How many pixels away from the mouse pointer to render the tooltip on the X axis
+*   tooltipOffsetY - How many pixels away from the mouse pointer to render the tooltip on the r axis
+*   tooltipFormatter  - Optional callback that allows you to override the HTML displayed in the tooltip
+*       callback is given arguments of (sparkline, options, fields)
+*   tooltipChartTitle - If specified then the tooltip uses the string specified by this setting as a title
+*   tooltipFormat - A format string or SPFormat object  (or an array thereof for multiple entries)
+*       to control the format of the tooltip
+*   tooltipPrefix - A string to prepend to each field displayed in a tooltip
+*   tooltipSuffix - A string to append to each field displayed in a tooltip
+*   tooltipSkipNull - If true then null values will not have a tooltip displayed (defaults to true)
+*   tooltipValueLookups - An object or range map to map field values to tooltip strings
+*       (eg. to map -1 to "Lost", 0 to "Draw", and 1 to "Win")
+*   numberFormatter - Optional callback for formatting numbers in tooltips
+*   numberDigitGroupSep - Character to use for group separator in numbers "1,234" - Defaults to ","
+*   numberDecimalMark - Character to use for the decimal point when formatting numbers - Defaults to "."
+*   numberDigitGroupCount - Number of digits between group separator - Defaults to 3
+*
+* There are 7 types of sparkline, selected by supplying a "type" option of 'line' (default),
+* 'bar', 'tristate', 'bullet', 'discrete', 'pie' or 'box'
+*    line - Line chart.  Options:
+*       spotColor - Set to '' to not end each line in a circular spot
+*       minSpotColor - If set, color of spot at minimum value
+*       maxSpotColor - If set, color of spot at maximum value
+*       spotRadius - Radius in pixels
+*       lineWidth - Width of line in pixels
+*       normalRangeMin
+*       normalRangeMax - If set draws a filled horizontal bar between these two values marking the "normal"
+*                      or expected range of values
+*       normalRangeColor - Color to use for the above bar
+*       drawNormalOnTop - Draw the normal range above the chart fill color if true
+*       defaultPixelsPerValue - Defaults to 3 pixels of width for each value in the chart
+*       highlightSpotColor - The color to use for drawing a highlight spot on mouseover - Set to null to disable
+*       highlightLineColor - The color to use for drawing a highlight line on mouseover - Set to null to disable
+*       valueSpots - Specify which points to draw spots on, and in which color.  Accepts a range map
+*
+*   bar - Bar chart.  Options:
+*       barColor - Color of bars for postive values
+*       negBarColor - Color of bars for negative values
+*       zeroColor - Color of bars with zero values
+*       nullColor - Color of bars with null values - Defaults to omitting the bar entirely
+*       barWidth - Width of bars in pixels
+*       colorMap - Optional mappnig of values to colors to override the *BarColor values above
+*                  can be an Array of values to control the color of individual bars or a range map
+*                  to specify colors for individual ranges of values
+*       barSpacing - Gap between bars in pixels
+*       zeroAxis - Centers the y-axis around zero if true
+*
+*   tristate - Charts values of win (>0), lose (<0) or draw (=0)
+*       posBarColor - Color of win values
+*       negBarColor - Color of lose values
+*       zeroBarColor - Color of draw values
+*       barWidth - Width of bars in pixels
+*       barSpacing - Gap between bars in pixels
+*       colorMap - Optional mappnig of values to colors to override the *BarColor values above
+*                  can be an Array of values to control the color of individual bars or a range map
+*                  to specify colors for individual ranges of values
+*
+*   discrete - Options:
+*       lineHeight - Height of each line in pixels - Defaults to 30% of the graph height
+*       thesholdValue - Values less than this value will be drawn using thresholdColor instead of lineColor
+*       thresholdColor
+*
+*   bullet - Values for bullet graphs msut be in the order: target, performance, range1, range2, range3, ...
+*       options:
+*       targetColor - The color of the vertical target marker
+*       targetWidth - The width of the target marker in pixels
+*       performanceColor - The color of the performance measure horizontal bar
+*       rangeColors - Colors to use for each qualitative range background color
+*
+*   pie - Pie chart. Options:
+*       sliceColors - An array of colors to use for pie slices
+*       offset - Angle in degrees to offset the first slice - Try -90 or +90
+*       borderWidth - Width of border to draw around the pie chart, in pixels - Defaults to 0 (no border)
+*       borderColor - Color to use for the pie chart border - Defaults to #000
+*
+*   box - Box plot. Options:
+*       raw - Set to true to supply pre-computed plot points as values
+*             values should be: low_outlier, low_whisker, q1, median, q3, high_whisker, high_outlier
+*             When set to false you can supply any number of values and the box plot will
+*             be computed for you.  Default is false.
+*       showOutliers - Set to true (default) to display outliers as circles
+*       outlierIRQ - Interquartile range used to determine outliers.  Default 1.5
+*       boxLineColor - Outline color of the box
+*       boxFillColor - Fill color for the box
+*       whiskerColor - Line color used for whiskers
+*       outlierLineColor - Outline color of outlier circles
+*       outlierFillColor - Fill color of the outlier circles
+*       spotRadius - Radius of outlier circles
+*       medianColor - Line color of the median line
+*       target - Draw a target cross hair at the supplied value (default undefined)
+*
+*
+*
+*   Examples:
+*   $('#sparkline1').sparkline(myvalues, { lineColor: '#f00', fillColor: false });
+*   $('.barsparks').sparkline('html', { type:'bar', height:'40px', barWidth:5 });
+*   $('#tristate').sparkline([1,1,-1,1,0,0,-1], { type:'tristate' }):
+*   $('#discrete').sparkline([1,3,4,5,5,3,4,5], { type:'discrete' });
+*   $('#bullet').sparkline([10,12,12,9,7], { type:'bullet' });
+*   $('#pie').sparkline([1,1,2], { type:'pie' });
+*/
+
+/*jslint regexp: true, browser: true, jquery: true, white: true, nomen: false, plusplus: false, maxerr: 500, indent: 4 */
+
+(function ($) {
+    'use strict';
+
+    var UNSET_OPTION = {},
+        getDefaults, createClass, SPFormat, clipval, quartile, normalizeValue, normalizeValues,
+        remove, isNumber, all, sum, addCSS, ensureArray, formatNumber, RangeMap,
+        MouseHandler, Tooltip, barHighlightMixin,
+        line, bar, tristate, discrete, bullet, pie, box, defaultStyles, initStyles,
+         VShape, VCanvas_base, VCanvas_canvas, VCanvas_vml, pending, shapeCount = 0;
+
+    /**
+     * Default configuration settings
+     */
+    getDefaults = function () {
+        return {
+            // Settings common to most/all chart types
+            common: {
+                type: 'line',
+                lineColor: '#00f',
+                fillColor: '#cdf',
+                defaultPixelsPerValue: 3,
+                width: 'auto',
+                height: 'auto',
+                composite: false,
+                tagValuesAttribute: 'values',
+                tagOptionsPrefix: 'spark',
+                enableTagOptions: false,
+                enableHighlight: true,
+                highlightLighten: 1.4,
+                tooltipSkipNull: true,
+                tooltipPrefix: '',
+                tooltipSuffix: '',
+                disableHiddenCheck: false,
+                numberFormatter: false,
+                numberDigitGroupCount: 3,
+                numberDigitGroupSep: ',',
+                numberDecimalMark: '.',
+                disableTooltips: false,
+                disableInteraction: false
+            },
+            // Defaults for line charts
+            line: {
+                spotColor: '#f80',
+                highlightSpotColor: '#5f5',
+                highlightLineColor: '#f22',
+                spotRadius: 1.5,
+                minSpotColor: '#f80',
+                maxSpotColor: '#f80',
+                lineWidth: 1,
+                normalRangeMin: undefined,
+                normalRangeMax: undefined,
+                normalRangeColor: '#ccc',
+                drawNormalOnTop: false,
+                chartRangeMin: undefined,
+                chartRangeMax: undefined,
+                chartRangeMinX: undefined,
+                chartRangeMaxX: undefined,
+                tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{y}}{{suffix}}')
+            },
+            // Defaults for bar charts
+            bar: {
+                barColor: '#3366cc',
+                negBarColor: '#f44',
+                stackedBarColor: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
+                    '#dd4477', '#0099c6', '#990099'],
+                zeroColor: undefined,
+                nullColor: undefined,
+                zeroAxis: true,
+                barWidth: 4,
+                barSpacing: 1,
+                chartRangeMax: undefined,
+                chartRangeMin: undefined,
+                chartRangeClip: false,
+                colorMap: undefined,
+                tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{prefix}}{{value}}{{suffix}}')
+            },
+            // Defaults for tristate charts
+            tristate: {
+                barWidth: 4,
+                barSpacing: 1,
+                posBarColor: '#6f6',
+                negBarColor: '#f44',
+                zeroBarColor: '#999',
+                colorMap: {},
+                tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value:map}}'),
+                tooltipValueLookups: { map: { '-1': 'Loss', '0': 'Draw', '1': 'Win' } }
+            },
+            // Defaults for discrete charts
+            discrete: {
+                lineHeight: 'auto',
+                thresholdColor: undefined,
+                thresholdValue: 0,
+                chartRangeMax: undefined,
+                chartRangeMin: undefined,
+                chartRangeClip: false,
+                tooltipFormat: new SPFormat('{{prefix}}{{value}}{{suffix}}')
+            },
+            // Defaults for bullet charts
+            bullet: {
+                targetColor: '#f33',
+                targetWidth: 3, // width of the target bar in pixels
+                performanceColor: '#33f',
+                rangeColors: ['#d3dafe', '#a8b6ff', '#7f94ff'],
+                base: undefined, // set this to a number to change the base start number
+                tooltipFormat: new SPFormat('{{fieldkey:fields}} - {{value}}'),
+                tooltipValueLookups: { fields: {r: 'Range', p: 'Performance', t: 'Target'} }
+            },
+            // Defaults for pie charts
+            pie: {
+                offset: 0,
+                sliceColors: ['#3366cc', '#dc3912', '#ff9900', '#109618', '#66aa00',
+                    '#dd4477', '#0099c6', '#990099'],
+                borderWidth: 0,
+                borderColor: '#000',
+                tooltipFormat: new SPFormat('<span style="color: {{color}}">&#9679;</span> {{value}} ({{percent.1}}%)')
+            },
+            // Defaults for box plots
+            box: {
+                raw: false,
+                boxLineColor: '#000',
+                boxFillColor: '#cdf',
+                whiskerColor: '#000',
+                outlierLineColor: '#333',
+                outlierFillColor: '#fff',
+                medianColor: '#f00',
+                showOutliers: true,
+                outlierIQR: 1.5,
+                spotRadius: 1.5,
+                target: undefined,
+                targetColor: '#4a2',
+                chartRangeMax: undefined,
+                chartRangeMin: undefined,
+                tooltipFormat: new SPFormat('{{field:fields}}: {{value}}'),
+                tooltipFormatFieldlistKey: 'field',
+                tooltipValueLookups: { fields: { lq: 'Lower Quartile', med: 'Median',
+                    uq: 'Upper Quartile', lo: 'Left Outlier', ro: 'Right Outlier',
+                    lw: 'Left Whisker', rw: 'Right Whisker'} }
+            }
+        };
+    };
+
+    // You can have tooltips use a css class other than jqstooltip by specifying tooltipClassname
+    defaultStyles = '.jqstooltip { ' +
+            'position: absolute;' +
+            'left: 0px;' +
+            'top: 0px;' +
+            'visibility: hidden;' +
+            'background: rgb(0, 0, 0) transparent;' +
+            'background-color: rgba(0,0,0,0.6);' +
+            'filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);' +
+            '-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";' +
+            'color: white;' +
+            'font: 10px arial, san serif;' +
+            'text-align: left;' +
+            'white-space: nowrap;' +
+            'padding: 5px;' +
+            'border: 1px solid white;' +
+            '}' +
+            '.jqsfield { ' +
+            'color: white;' +
+            'font: 10px arial, san serif;' +
+            'text-align: left;' +
+            '}';
+
+    initStyles = function() {
+        addCSS(defaultStyles);
+    };
+
+    $(initStyles);
+
+    /**
+     * Utilities
+     */
+
+    createClass = function (/* [baseclass, [mixin, ...]], definition */) {
+        var Class, args;
+        Class = function () {
+            this.init.apply(this, arguments);
+        };
+        if (arguments.length > 1) {
+            if (arguments[0]) {
+                Class.prototype = $.extend(new arguments[0](), arguments[arguments.length - 1]);
+                Class._super = arguments[0].prototype;
+            } else {
+                Class.prototype = arguments[arguments.length - 1];
+            }
+            if (arguments.length > 2) {
+                args = Array.prototype.slice.call(arguments, 1, -1);
+                args.unshift(Class.prototype);
+                $.extend.apply($, args);
+            }
+        } else {
+            Class.prototype = arguments[0];
+        }
+        Class.prototype.cls = Class;
+        return Class;
+    };
+
+    /**
+     * Wraps a format string for tooltips
+     * {{x}}
+     * {{x.2}
+     * {{x:months}}
+     */
+    $.SPFormatClass = SPFormat = createClass({
+        fre: /\{\{([\w.]+?)(:(.+?))?\}\}/g,
+        precre: /(\w+)\.(\d+)/,
+
+        init: function (format, fclass) {
+            this.format = format;
+            this.fclass = fclass;
+        },
+
+        render: function (fieldset, lookups, options) {
+            var self = this,
+                fields = fieldset,
+                match, token, lookupkey, fieldvalue, prec;
+            return this.format.replace(this.fre, function () {
+                var lookup;
+                token = arguments[1];
+                lookupkey = arguments[3];
+                match = self.precre.exec(token);
+                if (match) {
+                    prec = match[2];
+                    token = match[1];
+                } else {
+                    prec = false;
+                }
+                fieldvalue = fields[token];
+                if (fieldvalue === undefined) {
+                    return '';
+                }
+                if (lookupkey && lookups && lookups[lookupkey]) {
+                    lookup = lookups[lookupkey];
+                    if (lookup.get) { // RangeMap
+                        return lookups[lookupkey].get(fieldvalue) || fieldvalue;
+                    } else {
+                        return lookups[lookupkey][fieldvalue] || fieldvalue;
+                    }
+                }
+                if (isNumber(fieldvalue)) {
+                    if (options.get('numberFormatter')) {
+                        fieldvalue = options.get('numberFormatter')(fieldvalue);
+                    } else {
+                        fieldvalue = formatNumber(fieldvalue, prec,
+                            options.get('numberDigitGroupCount'),
+                            options.get('numberDigitGroupSep'),
+                            options.get('numberDecimalMark'));
+                    }
+                }
+                return fieldvalue;
+            });
+        }
+    });
+
+    // convience method to avoid needing the new operator
+    $.spformat = function(format, fclass) {
+        return new SPFormat(format, fclass);
+    };
+
+    clipval = function (val, min, max) {
+        if (val < min) {
+            return min;
+        }
+        if (val > max) {
+            return max;
+        }
+        return val;
+    };
+
+    quartile = function (values, q) {
+        var vl;
+        if (q === 2) {
+            vl = Math.floor(values.length / 2);
+            return values.length % 2 ? values[vl] : (values[vl] + values[vl + 1]) / 2;
+        } else {
+            vl = Math.floor(values.length / 4);
+            return values.length % 2 ? (values[vl * q] + values[vl * q + 1]) / 2 : values[vl * q];
+        }
+    };
+
+    normalizeValue = function (val) {
+        var nf;
+        switch (val) {
+            case 'undefined':
+                val = undefined;
+                break;
+            case 'null':
+                val = null;
+                break;
+            case 'true':
+                val = true;
+                break;
+            case 'false':
+                val = false;
+                break;
+            default:
+                nf = parseFloat(val);
+                if (val == nf) {
+                    val = nf;
+                }
+        }
+        return val;
+    };
+
+    normalizeValues = function (vals) {
+        var i, result = [];
+        for (i = vals.length; i--;) {
+            result[i] = normalizeValue(vals[i]);
+        }
+        return result;
+    };
+
+    remove = function (vals, filter) {
+        var i, vl, result = [];
+        for (i = 0, vl = vals.length; i < vl; i++) {
+            if (vals[i] !== filter) {
+                result.push(vals[i]);
+            }
+        }
+        return result;
+    };
+
+    isNumber = function (num) {
+        return !isNaN(parseFloat(num)) && isFinite(num);
+    };
+
+    formatNumber = function (num, prec, groupsize, groupsep, decsep) {
+        var p, i;
+        num = (prec === false ? parseFloat(num).toString() : num.toFixed(prec)).split('');
+        p = (p = $.inArray('.', num)) < 0 ? num.length : p;
+        if (p < num.length) {
+            num[p] = decsep;
+        }
+        for (i = p - groupsize; i > 0; i -= groupsize) {
+            num.splice(i, 0, groupsep);
+        }
+        return num.join('');
+    };
+
+    // determine if all values of an array match a value
+    // returns true if the array is empty
+    all = function (val, arr, ignoreNull) {
+        var i;
+        for (i = arr.length; i--; ) {
+            if (arr[i] !== val || (!ignoreNull && val === null)) {
+                return false;
+            }
+        }
+        return true;
+    };
+
+    // sums the numeric values in an array, ignoring other values
+    sum = function (vals) {
+        var total = 0, i;
+        for (i = vals.length; i--;) {
+            total += typeof vals[i] === 'number' ? vals[i] : 0;
+        }
+        return total;
+    };
+
+    ensureArray = function (val) {
+        return $.isArray(val) ? val : [val];
+    };
+
+    // http://paulirish.com/2008/bookmarklet-inject-new-css-rules/
+    addCSS = function(css) {
+        var tag;
+        //if ('\v' == 'v') /* ie only */ {
+        if (document.createStyleSheet) {
+            document.createStyleSheet().cssText = css;
+        } else {
+            tag = document.createElement('style');
+            tag.type = 'text/css';
+            document.getElementsByTagName('head')[0].appendChild(tag);
+            tag[(typeof document.body.style.WebkitAppearance == 'string') /* webkit only */ ? 'innerText' : 'innerHTML'] = css;
+        }
+    };
+
+    // Provide a cross-browser interface to a few simple drawing primitives
+    $.fn.simpledraw = function (width, height, useExisting, interact) {
+        var target, mhandler;
+        if (useExisting && (target = this.data('_jqs_vcanvas'))) {
+            return target;
+        }
+        if (width === undefined) {
+            width = $(this).innerWidth();
+        }
+        if (height === undefined) {
+            height = $(this).innerHeight();
+        }
+        if ($.browser.hasCanvas) {
+            target = new VCanvas_canvas(width, height, this, interact);
+        } else if ($.browser.msie) {
+            target = new VCanvas_vml(width, height, this);
+        } else {
+            return false;
+        }
+        mhandler = $(this).data('_jqs_mhandler');
+        if (mhandler) {
+            mhandler.registerCanvas(target);
+        }
+        return target;
+    };
+
+    $.fn.cleardraw = function () {
+        var target = this.data('_jqs_vcanvas');
+        if (target) {
+            target.reset();
+        }
+    };
+
+    $.RangeMapClass = RangeMap = createClass({
+        init: function (map) {
+            var key, range, rangelist = [];
+            for (key in map) {
+                if (map.hasOwnProperty(key) && typeof key === 'string' && key.indexOf(':') > -1) {
+                    range = key.split(':');
+                    range[0] = range[0].length === 0 ? -Infinity : parseFloat(range[0]);
+                    range[1] = range[1].length === 0 ? Infinity : parseFloat(range[1]);
+                    range[2] = map[key];
+                    rangelist.push(range);
+                }
+            }
+            this.map = map;
+            this.rangelist = rangelist || false;
+        },
+
+        get: function (value) {
+            var rangelist = this.rangelist,
+                i, range, result;
+            if ((result = this.map[value]) !== undefined) {
+                return result;
+            }
+            if (rangelist) {
+                for (i = rangelist.length; i--;) {
+                    range = rangelist[i];
+                    if (range[0] <= value && range[1] >= value) {
+                        return range[2];
+                    }
+                }
+            }
+            return undefined;
+        }
+    });
+
+    // Convenience function
+    $.range_map = function(map) {
+        return new RangeMap(map);
+    };
+
+    MouseHandler = createClass({
+        init: function (el, options) {
+            var $el = $(el);
+            this.$el = $el;
+            this.options = options;
+            this.currentPageX = 0;
+            this.currentPageY = 0;
+            this.el = el;
+            this.splist = [];
+            this.tooltip = null;
+            this.over = false;
+            this.displayTooltips = !options.get('disableTooltips');
+            this.highlightEnabled = !options.get('disableHighlight');
+        },
+
+        registerSparkline: function (sp) {
+            this.splist.push(sp);
+            if (this.over) {
+                this.updateDisplay();
+            }
+        },
+
+        registerCanvas: function (canvas) {
+            var $canvas = $(canvas.canvas);
+            this.canvas = canvas;
+            this.$canvas = $canvas;
+            $canvas.mouseenter($.proxy(this.mouseenter, this));
+            $canvas.mouseleave($.proxy(this.mouseleave, this));
+            $canvas.click($.proxy(this.mouseclick, this));
+        },
+
+        reset: function (removeTooltip) {
+            this.splist = [];
+            if (this.tooltip && removeTooltip) {
+                this.tooltip.remove();
+                this.tooltip = undefined;
+            }
+        },
+
+        mouseclick: function (e) {
+            var clickEvent = $.Event('sparklineClick');
+            clickEvent.originalEvent = e;
+            clickEvent.sparklines = this.splist;
+            this.$el.trigger(clickEvent);
+        },
+
+        mouseenter: function (e) {
+            $(document.body).unbind('mousemove.jqs');
+            $(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));
+            this.over = true;
+            this.currentPageX = e.pageX;
+            this.currentPageY = e.pageY;
+            this.currentEl = e.target;
+            if (!this.tooltip && this.displayTooltips) {
+                this.tooltip = new Tooltip(this.options);
+                this.tooltip.updatePosition(e.pageX, e.pageY);
+            }
+            this.updateDisplay();
+        },
+
+        mouseleave: function () {
+            $(document.body).unbind('mousemove.jqs');
+            var splist = this.splist,
+                 spcount = splist.length,
+                 needsRefresh = false,
+                 sp, i;
+            this.over = false;
+            this.currentEl = null;
+
+            if (this.tooltip) {
+                this.tooltip.remove();
+                this.tooltip = null;
+            }
+
+            for (i = 0; i < spcount; i++) {
+                sp = splist[i];
+                if (sp.clearRegionHighlight()) {
+                    needsRefresh = true;
+                }
+            }
+
+            if (needsRefresh) {
+                this.canvas.render();
+            }
+        },
+
+        mousemove: function (e) {
+            this.currentPageX = e.pageX;
+            this.currentPageY = e.pageY;
+            this.currentEl = e.target;
+            if (this.tooltip) {
+                this.tooltip.updatePosition(e.pageX, e.pageY);
+            }
+            this.updateDisplay();
+        },
+
+        updateDisplay: function () {
+            var splist = this.splist,
+                 spcount = splist.length,
+                 needsRefresh = false,
+                 offset = this.$canvas.offset(),
+                 localX = this.currentPageX - offset.left,
+                 localY = this.currentPageY - offset.top,
+                 tooltiphtml, sp, i, result, changeEvent;
+            if (!this.over) {
+                return;
+            }
+            for (i = 0; i < spcount; i++) {
+                sp = splist[i];
+                result = sp.setRegionHighlight(this.currentEl, localX, localY);
+                if (result) {
+                    needsRefresh = true;
+                }
+            }
+            if (needsRefresh) {
+                changeEvent = $.Event('sparklineRegionChange');
+                changeEvent.sparklines = this.splist;
+                this.$el.trigger(changeEvent);
+                if (this.tooltip) {
+                    tooltiphtml = '';
+                    for (i = 0; i < spcount; i++) {
+                        sp = splist[i];
+                        tooltiphtml += sp.getCurrentRegionTooltip();
+                    }
+                    this.tooltip.setContent(tooltiphtml);
+                }
+                if (!this.disableHighlight) {
+                    this.canvas.render();
+                }
+            }
+            if (result === null) {
+                this.mouseleave();
+            }
+        }
+    });
+
+
+    Tooltip = createClass({
+        sizeStyle: 'position: static !important;' +
+            'display: block !important;' +
+            'visibility: hidden !important;' +
+            'float: left !important;',
+
+        init: function (options) {
+            var tooltipClassname = options.get('tooltipClassname', 'jqstooltip'),
+                sizetipStyle = this.sizeStyle,
+                offset;
+            this.container = options.get('tooltipContainer') || document.body;
+            this.tooltipOffsetX = options.get('tooltipOffsetX', 10);
+            this.tooltipOffsetY = options.get('tooltipOffsetY', 12);
+            // remove any previous lingering tooltip
+            $('#jqssizetip').remove();
+            $('#jqstooltip').remove();
+            this.sizetip = $('<div/>', {
+                id: 'jqssizetip',
+                style: sizetipStyle,
+                'class': tooltipClassname
+            });
+            this.tooltip = $('<div/>', {
+                id: 'jqstooltip',
+                'class': tooltipClassname
+            }).appendTo(this.container);
+            // account for the container's location
+            offset = this.tooltip.offset();
+            this.offsetLeft = offset.left;
+            this.offsetTop = offset.top;
+            this.hidden = true;
+            $(window).unbind('resize.jqs scroll.jqs');
+            $(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));
+            this.updateWindowDims();
+        },
+
+        updateWindowDims: function () {
+            this.scrollTop = $(window).scrollTop();
+            this.scrollLeft = $(window).scrollLeft();
+            this.scrollRight = this.scrollLeft + $(window).width();
+            this.updatePosition();
+        },
+
+        getSize: function (content) {
+            this.sizetip.html(content).appendTo(this.container);
+            this.width = this.sizetip.width() + 1;
+            this.height = this.sizetip.height();
+            this.sizetip.remove();
+        },
+
+        setContent: function (content) {
+            if (!content) {
+                this.tooltip.css('visibility', 'hidden');
+                this.hidden = true;
+                return;
+            }
+            this.getSize(content);
+            this.tooltip.html(content)
+                .css({
+                    'width': this.width,
+                    'height': this.height,
+                    'visibility': 'visible'
+                });
+            if (this.hidden) {
+                this.hidden = false;
+                this.updatePosition();
+            }
+        },
+
+        updatePosition: function (x, y) {
+            if (x === undefined) {
+                if (this.mousex === undefined) {
+                    return;
+                }
+                x = this.mousex - this.offsetLeft;
+                y = this.mousey - this.offsetTop;
+
+            } else {
+                this.mousex = x = x - this.offsetLeft;
+                this.mousey = y = y - this.offsetTop;
+            }
+            if (!this.height || !this.width || this.hidden) {
+                return;
+            }
+
+            y -= this.height + this.tooltipOffsetY;
+            x += this.tooltipOffsetX;
+
+            if (y < this.scrollTop) {
+                y = this.scrollTop;
+            }
+            if (x < this.scrollLeft) {
+                x = this.scrollLeft;
+            } else if (x + this.width > this.scrollRight) {
+                x = this.scrollRight - this.width;
+            }
+
+            this.tooltip.css({
+                'left': x,
+                'top': y
+            });
+        },
+
+        remove: function () {
+            this.tooltip.remove();
+            this.sizetip.remove();
+            this.sizetip = this.tooltip = undefined;
+            $(window).unbind('resize.jqs scroll.jqs');
+        }
+    });
+
+    pending = [];
+    $.fn.sparkline = function (userValues, userOptions) {
+        return this.each(function () {
+            var options = new $.fn.sparkline.options(this, userOptions),
+                 $this = $(this),
+                 render, i;
+            render = function () {
+                var values, width, height, tmp, mhandler, sp, vals;
+                if (userValues === 'html' || userValues === undefined) {
+                    vals = this.getAttribute(options.get('tagValuesAttribute'));
+                    if (vals === undefined || vals === null) {
+                        vals = $this.html();
+                    }
+                    values = vals.replace(/(^\s*<!--)|(-->\s*$)|\s+/g, '').split(',');
+                } else {
+                    values = userValues;
+                }
+
+                width = options.get('width') === 'auto' ? values.length * options.get('defaultPixelsPerValue') : options.get('width');
+                if (options.get('height') === 'auto') {
+                    if (!options.get('composite') || !$.data(this, '_jqs_vcanvas')) {
+                        // must be a better way to get the line height
+                        tmp = document.createElement('span');
+                        tmp.innerHTML = 'a';
+                        $this.html(tmp);
+                        height = $(tmp).innerHeight() || $(tmp).height();
+                        $(tmp).remove();
+                        tmp = null;
+                    }
+                } else {
+                    height = options.get('height');
+                }
+
+                if (!options.get('disableInteraction')) {
+                    mhandler = $.data(this, '_jqs_mhandler');
+                    if (!mhandler) {
+                        mhandler = new MouseHandler(this, options);
+                        $.data(this, '_jqs_mhandler', mhandler);
+                    } else if (!options.get('composite')) {
+                        mhandler.reset();
+                    }
+                } else {
+                    mhandler = false;
+                }
+
+                if (options.get('composite') && !$.data(this, '_jqs_vcanvas')) {
+                    if (!$.data(this, '_jqs_errnotify')) {
+                        alert('Attempted to attach a composite sparkline to an element with no existing sparkline');
+                        $.data(this, '_jqs_errnotify', true);
+                    }
+                    return;
+                }
+
+                sp = new $.fn.sparkline[options.get('type')](this, values, options, width, height);
+
+                sp.render();
+
+                if (mhandler) {
+                    mhandler.registerSparkline(sp);
+                }
+            };
+            // jQuery 1.3.0 completely changed the meaning of :hidden :-/
+            if (($(this).html() && !options.get('disableHiddenCheck') && $(this).is(':hidden')) || ($.fn.jquery < '1.3.0' && $(this).parents().is(':hidden')) || !$(this).parents('body').length) {
+                if (!options.get('composite') && $.data(this, '_jqs_pending')) {
+                    // remove any existing references to the element
+                    for (i = pending.length; i; i--) {
+                        if (pending[i - 1][0] == this) {
+                            pending.splice(i - 1, 1);
+                        }
+                    }
+                }
+                pending.push([this, render]);
+                $.data(this, '_jqs_pending', true);
+            } else {
+                render.call(this);
+            }
+        });
+    };
+
+    $.fn.sparkline.defaults = getDefaults();
+
+
+    $.sparkline_display_visible = function () {
+        var el, i, pl;
+        var done = [];
+        for (i = 0, pl = pending.length; i < pl; i++) {
+            el = pending[i][0];
+            if ($(el).is(':visible') && !$(el).parents().is(':hidden')) {
+                pending[i][1].call(el);
+                $.data(pending[i][0], '_jqs_pending', false);
+                done.push(i);
+            } else if (!$(el).closest('html').length && !$.data(el, '_jqs_pending')) {
+                // element has been inserted and removed from the DOM
+                // If it was not yet inserted into the dom then the .data request
+                // will return true.
+                // removing from the dom causes the data to be removed.
+                $.data(pending[i][0], '_jqs_pending', false);
+                done.push(i);
+            }
+        }
+        for (i = done.length; i; i--) {
+            pending.splice(done[i - 1], 1);
+        }
+    };
+
+
+    /**
+     * User option handler
+     */
+    $.fn.sparkline.options = createClass({
+        init: function (tag, userOptions) {
+            var extendedOptions, defaults, base, tagOptionType;
+            this.userOptions = userOptions = userOptions || {};
+            this.tag = tag;
+            this.tagValCache = {};
+            defaults = $.fn.sparkline.defaults;
+            base = defaults.common;
+            this.tagOptionsPrefix = userOptions.enableTagOptions && (userOptions.tagOptionsPrefix || base.tagOptionsPrefix);
+
+            tagOptionType = this.getTagSetting('type');
+            if (tagOptionType === UNSET_OPTION) {
+                extendedOptions = defaults[userOptions.type || base.type];
+            } else {
+                extendedOptions = defaults[tagOptionType];
+            }
+            this.mergedOptions = $.extend({}, base, extendedOptions, userOptions);
+        },
+
+
+        getTagSetting: function (key) {
+            var prefix = this.tagOptionsPrefix,
+                val, i, pairs, keyval;
+            if (prefix === false || prefix === undefined) {
+                return UNSET_OPTION;
+            }
+            if (this.tagValCache.hasOwnProperty(key)) {
+                val = this.tagValCache.key;
+            } else {
+                val = this.tag.getAttribute(prefix + key);
+                if (val === undefined || val === null) {
+                    val = UNSET_OPTION;
+                } else if (val.substr(0, 1) === '[') {
+                    val = val.substr(1, val.length - 2).split(',');
+                    for (i = val.length; i--;) {
+                        val[i] = normalizeValue(val[i].replace(/(^\s*)|(\s*$)/g, ''));
+                    }
+                } else if (val.substr(0, 1) === '{') {
+                    pairs = val.substr(1, val.length - 2).split(',');
+                    val = {};
+                    for (i = pairs.length; i--;) {
+                        keyval = pairs[i].split(':', 2);
+                        val[keyval[0].replace(/(^\s*)|(\s*$)/g, '')] = normalizeValue(keyval[1].replace(/(^\s*)|(\s*$)/g, ''));
+                    }
+                } else {
+                    val = normalizeValue(val);
+                }
+                this.tagValCache.key = val;
+            }
+            return val;
+        },
+
+        get: function (key, defaultval) {
+            var tagOption = this.getTagSetting(key),
+                result;
+            if (tagOption !== UNSET_OPTION) {
+                return tagOption;
+            }
+            return (result = this.mergedOptions[key]) === undefined ? defaultval : result;
+        }
+    });
+
+
+    $.fn.sparkline._base = createClass({
+        disabled: false,
+
+        init: function (el, values, options, width, height) {
+            this.el = el;
+            this.$el = $(el);
+            this.values = values;
+            this.options = options;
+            this.width = width;
+            this.height = height;
+            this.currentRegion = undefined;
+        },
+
+        /**
+         * Setup the canvas
+         */
+        initTarget: function () {
+            var interactive = !this.options.get('disableInteraction');
+            if (!(this.target = this.$el.simpledraw(this.width, this.height, this.options.get('composite'), interactive))) {
+                this.disabled = true;
+            } else {
+                this.canvasWidth = this.target.pixelWidth;
+                this.canvasHeight = this.target.pixelHeight;
+            }
+        },
+
+        /**
+         * Actually render the chart to the canvas
+         */
+        render: function () {
+            if (this.disabled) {
+                this.el.innerHTML = '';
+                return false;
+            }
+            return true;
+        },
+
+        /**
+         * Return a region id for a given x/y co-ordinate
+         */
+        getRegion: function (x, y) {
+        },
+
+        /**
+         * Highlight an item based on the moused-over x,y co-ordinate
+         */
+        setRegionHighlight: function (el, x, y) {
+            var currentRegion = this.currentRegion,
+                highlightEnabled = !this.options.get('disableHighlight'),
+                newRegion;
+            if (x > this.canvasWidth || y > this.canvasHeight || x < 0 || y < 0) {
+                return null;
+            }
+            newRegion = this.getRegion(el, x, y);
+            if (currentRegion !== newRegion) {
+                if (currentRegion !== undefined && highlightEnabled) {
+                    this.removeHighlight();
+                }
+                this.currentRegion = newRegion;
+                if (newRegion !== undefined && highlightEnabled) {
+                    this.renderHighlight();
+                }
+                return true;
+            }
+            return false;
+        },
+
+        /**
+         * Reset any currently highlighted item
+         */
+        clearRegionHighlight: function () {
+            if (this.currentRegion !== undefined) {
+                this.removeHighlight();
+                this.currentRegion = undefined;
+                return true;
+            }
+            return false;
+        },
+
+        renderHighlight: function () {
+            this.changeHighlight(true);
+        },
+
+        removeHighlight: function () {
+            this.changeHighlight(false);
+        },
+
+        changeHighlight: function (highlight)  {},
+
+        /**
+         * Fetch the HTML to display as a tooltip
+         */
+        getCurrentRegionTooltip: function () {
+            var options = this.options,
+                header = '',
+                entries = [],
+                fields, formats, formatlen, fclass, text, i,
+                showFields, showFieldsKey, newFields, fv,
+                formatter, format, fieldlen, j;
+            if (this.currentRegion === undefined) {
+                return '';
+            }
+            fields = this.getCurrentRegionFields();
+            formatter = options.get('tooltipFormatter');
+            if (formatter) {
+                return formatter(this, options, fields);
+            }
+            if (options.get('tooltipChartTitle')) {
+                header += '<div class="jqs jqstitle">' + options.get('tooltipChartTitle') + '</div>\n';
+            }
+            formats = this.options.get('tooltipFormat');
+            if (!formats) {
+                return '';
+            }
+            if (!$.isArray(formats)) {
+                formats = [formats];
+            }
+            if (!$.isArray(fields)) {
+                fields = [fields];
+            }
+            showFields = this.options.get('tooltipFormatFieldlist');
+            showFieldsKey = this.options.get('tooltipFormatFieldlistKey');
+            if (showFields && showFieldsKey) {
+                // user-selected ordering of fields
+                newFields = [];
+                for (i = fields.length; i--;) {
+                    fv = fields[i][showFieldsKey];
+                    if ((j = $.inArray(fv, showFields)) != -1) {
+                        newFields[j] = fields[i];
+                    }
+                }
+                fields = newFields;
+            }
+            formatlen = formats.length;
+            fieldlen = fields.length;
+            for (i = 0; i < formatlen; i++) {
+                format = formats[i];
+                if (typeof format === 'string') {
+                    format = new SPFormat(format);
+                }
+                fclass = format.fclass || 'jqsfield';
+                for (j = 0; j < fieldlen; j++) {
+                    if (!fields[j].isNull || !options.get('tooltipSkipNull')) {
+                        $.extend(fields[j], {
+                            prefix: options.get('tooltipPrefix'),
+                            suffix: options.get('tooltipSuffix')
+                        });
+                        text = format.render(fields[j], options.get('tooltipValueLookups'), options);
+                        entries.push('<div class="' + fclass + '">' + text + '</div>');
+                    }
+                }
+            }
+            if (entries.length) {
+                return header + entries.join('\n');
+            }
+            return '';
+        },
+
+        getCurrentRegionFields: function () {},
+
+        calcHighlightColor: function (color, options) {
+            var highlightColor = options.get('highlightColor'),
+                lighten = options.get('highlightLighten'),
+                parse, mult, rgbnew, i;
+            if (highlightColor) {
+                return highlightColor;
+            }
+            if (lighten) {
+                // extract RGB values
+                parse = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(color) || /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(color);
+                if (parse) {
+                    rgbnew = [];
+                    mult = color.length === 4 ? 16 : 1;
+                    for (i = 0; i < 3; i++) {
+                        rgbnew[i] = clipval(Math.round(parseInt(parse[i + 1], 16) * mult * lighten), 0, 255);
+                    }
+                    return 'rgb(' + rgbnew.join(',') + ')';
+                }
+
+            }
+            return color;
+        }
+
+    });
+
+    barHighlightMixin = {
+        changeHighlight: function (highlight) {
+            var currentRegion = this.currentRegion,
+                target = this.target,
+                shapeids = this.regionShapes[currentRegion],
+                newShapes;
+            // will be null if the region value was null
+            if (shapeids) {
+                newShapes = this.renderRegion(currentRegion, highlight);
+                if ($.isArray(newShapes) || $.isArray(shapeids)) {
+                    target.replaceWithShapes(shapeids, newShapes);
+                    this.regionShapes[currentRegion] = $.map(newShapes, function (newShape) {
+                        return newShape.id;
+                    });
+                } else {
+                    target.replaceWithShape(shapeids, newShapes);
+                    this.regionShapes[currentRegion] = newShapes.id;
+                }
+            }
+        },
+
+        render: function () {
+            var values = this.values,
+                target = this.target,
+                regionShapes = this.regionShapes,
+                shapes, ids, i, j;
+
+            if (!this.cls._super.render.call(this)) {
+                return;
+            }
+            for (i = values.length; i--;) {
+                shapes = this.renderRegion(i);
+                if (shapes) {
+                    if ($.isArray(shapes)) {
+                        ids = [];
+                        for (j = shapes.length; j--;) {
+                            shapes[j].append();
+                            ids.push(shapes[j].id);
+                        }
+                        regionShapes[i] = ids;
+                    } else {
+                        shapes.append();
+                        regionShapes[i] = shapes.id; // store just the shapeid
+                    }
+                } else {
+                    // null value
+                    regionShapes[i] = null;
+                }
+            }
+            target.render();
+        }
+    };
+
+    /**
+     * Line charts
+     */
+    $.fn.sparkline.line = line = createClass($.fn.sparkline._base, {
+        type: 'line',
+
+        init: function (el, values, options, width, height) {
+            line._super.init.call(this, el, values, options, width, height);
+            this.vertices = [];
+            this.regionMap = [];
+            this.xvalues = [];
+            this.yvalues = [];
+            this.yminmax = [];
+            this.hightlightSpotId = null;
+            this.lastShapeId = null;
+            this.initTarget();
+        },
+
+        getRegion: function (el, x, y) {
+            var i,
+                regionMap = this.regionMap; // maps regions to value positions
+            for (i = regionMap.length; i--;) {
+                if (regionMap[i] !== null && x >= regionMap[i][0] && x <= regionMap[i][1]) {
+                    return regionMap[i][2];
+                }
+            }
+            return undefined;
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                isNull: this.yvalues[currentRegion] === null,
+                x: this.xvalues[currentRegion],
+                y: this.yvalues[currentRegion],
+                color: this.options.get('lineColor'),
+                fillColor: this.options.get('fillColor'),
+                offset: currentRegion
+            };
+        },
+
+        renderHighlight: function () {
+            var currentRegion = this.currentRegion,
+                target = this.target,
+                vertex = this.vertices[currentRegion],
+                options = this.options,
+                spotRadius = options.get('spotRadius'),
+                highlightSpotColor = options.get('highlightSpotColor'),
+                highlightLineColor = options.get('highlightLineColor'),
+                highlightSpot, highlightLine;
+
+            if (!vertex) {
+                return;
+            }
+            if (spotRadius && highlightSpotColor) {
+                highlightSpot = target.drawCircle(vertex[0], vertex[1],
+                    spotRadius, undefined, highlightSpotColor);
+                this.highlightSpotId = highlightSpot.id;
+                target.insertAfterShape(this.lastShapeId, highlightSpot);
+            }
+            if (highlightLineColor) {
+                highlightLine = target.drawLine(vertex[0], this.canvasTop, vertex[0],
+                    this.canvasTop + this.canvasHeight, highlightLineColor);
+                this.highlightLineId = highlightLine.id;
+                target.insertAfterShape(this.lastShapeId, highlightLine);
+            }
+        },
+
+        removeHighlight: function () {
+            var target = this.target;
+            if (this.highlightSpotId) {
+                target.removeShapeId(this.highlightSpotId);
+                this.highlightSpotId = null;
+            }
+            if (this.highlightLineId) {
+                target.removeShapeId(this.highlightLineId);
+                this.highlightLineId = null;
+            }
+        },
+
+        scanValues: function () {
+            var values = this.values,
+                valcount = values.length,
+                xvalues = this.xvalues,
+                yvalues = this.yvalues,
+                yminmax = this.yminmax,
+                i, val, isStr, isArray, sp;
+            for (i = 0; i < valcount; i++) {
+                val = values[i];
+                isStr = typeof(values[i]) === 'string';
+                isArray = typeof(values[i]) === 'object' && values[i] instanceof Array;
+                sp = isStr && values[i].split(':');
+                if (isStr && sp.length === 2) { // x:y
+                    xvalues.push(Number(sp[0]));
+                    yvalues.push(Number(sp[1]));
+                    yminmax.push(Number(sp[1]));
+                } else if (isArray) {
+                    xvalues.push(val[0]);
+                    yvalues.push(val[1]);
+                    yminmax.push(val[1]);
+                } else {
+                    xvalues.push(i);
+                    if (values[i] === null || values[i] === 'null') {
+                        yvalues.push(null);
+                    } else {
+                        yvalues.push(Number(val));
+                        yminmax.push(Number(val));
+                    }
+                }
+            }
+            if (this.options.get('xvalues')) {
+                xvalues = this.options.get('xvalues');
+            }
+
+            this.maxy = this.maxyorg = Math.max.apply(Math, yminmax);
+            this.miny = this.minyorg = Math.min.apply(Math, yminmax);
+
+            this.maxx = Math.max.apply(Math, xvalues);
+            this.minx = Math.min.apply(Math, xvalues);
+
+            this.xvalues = xvalues;
+            this.yvalues = yvalues;
+            this.yminmax = yminmax;
+
+        },
+
+        processRangeOptions: function () {
+            var options = this.options,
+                normalRangeMin = options.get('normalRangeMin'),
+                normalRangeMax = options.get('normalRangeMax');
+
+            if (normalRangeMin !== undefined) {
+                if (normalRangeMin < this.miny) {
+                    this.miny = normalRangeMin;
+                }
+                if (normalRangeMax > this.maxy) {
+                    this.maxy = normalRangeMax;
+                }
+            }
+            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.miny)) {
+                this.miny = options.get('chartRangeMin');
+            }
+            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.maxy)) {
+                this.maxy = options.get('chartRangeMax');
+            }
+            if (options.get('chartRangeMinX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMinX') < this.minx)) {
+                this.minx = options.get('chartRangeMinX');
+            }
+            if (options.get('chartRangeMaxX') !== undefined && (options.get('chartRangeClipX') || options.get('chartRangeMaxX') > this.maxx)) {
+                this.maxx = options.get('chartRangeMaxX');
+            }
+
+        },
+
+        drawNormalRange: function (canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey) {
+            var normalRangeMin = this.options.get('normalRangeMin'),
+                normalRangeMax = this.options.get('normalRangeMax'),
+                ytop = canvasTop + Math.round(canvasHeight - (canvasHeight * ((normalRangeMax - this.miny) / rangey))),
+                height = Math.round((canvasHeight * (normalRangeMax - normalRangeMin)) / rangey);
+            this.target.drawRect(canvasLeft, ytop, canvasWidth, height, undefined, this.options.get('normalRangeColor')).append();
+        },
+
+        render: function () {
+            var options = this.options,
+                target = this.target,
+                canvasWidth = this.canvasWidth,
+                canvasHeight = this.canvasHeight,
+                vertices = this.vertices,
+                spotRadius = options.get('spotRadius'),
+                regionMap = this.regionMap,
+                rangex, rangey, yvallast,
+                canvasTop, canvasLeft,
+                vertex, path, paths, x, y, xnext, xpos, xposnext,
+                last, next, yvalcount, lineShapes, fillShapes, plen,
+                valueSpots, color, xvalues, yvalues, i;
+
+            if (!line._super.render.call(this)) {
+                return;
+            }
+
+            this.scanValues();
+            this.processRangeOptions();
+
+            xvalues = this.xvalues;
+            yvalues = this.yvalues;
+
+            if (!this.yminmax.length || this.yvalues.length < 2) {
+                // empty or all null valuess
+                return;
+            }
+
+            canvasTop = canvasLeft = 0;
+
+            rangex = this.maxx - this.minx === 0 ? 1 : this.maxx - this.minx;
+            rangey = this.maxy - this.miny === 0 ? 1 : this.maxy - this.miny;
+            yvallast = this.yvalues.length - 1;
+
+            if (spotRadius && (canvasWidth < (spotRadius * 4) || canvasHeight < (spotRadius * 4))) {
+                spotRadius = 0;
+            }
+            if (spotRadius) {
+                // adjust the canvas size as required so that spots will fit
+                if (options.get('minSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.miny)) {
+                    canvasHeight -= Math.ceil(spotRadius);
+                }
+                if (options.get('maxSpotColor') || (options.get('spotColor') && yvalues[yvallast] === this.maxy)) {
+                    canvasHeight -= Math.ceil(spotRadius);
+                    canvasTop += Math.ceil(spotRadius);
+                }
+                if ((options.get('minSpotColor') || options.get('maxSpotColor')) && (yvalues[0] === this.miny || yvalues[0] === this.maxy)) {
+                    canvasLeft += Math.ceil(spotRadius);
+                    canvasWidth -= Math.ceil(spotRadius);
+                }
+                if (options.get('spotColor') ||
+                    (options.get('minSpotColor') || options.get('maxSpotColor') &&
+                        (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {
+                    canvasWidth -= Math.ceil(spotRadius);
+                }
+            }
+
+
+            canvasHeight--;
+
+            if (options.get('normalRangeMin') && !options.get('drawNormalOnTop')) {
+                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
+            }
+
+            path = [];
+            paths = [path];
+            last = next = null;
+            yvalcount = yvalues.length;
+            for (i = 0; i < yvalcount; i++) {
+                x = xvalues[i];
+                xnext = xvalues[i + 1];
+                y = yvalues[i];
+                xpos = canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex));
+                xposnext = i < yvalcount - 1 ? canvasLeft + Math.round((xnext - this.minx) * (canvasWidth / rangex)) : canvasWidth;
+                next = xpos + ((xposnext - xpos) / 2);
+                regionMap[i] = [last || 0, next, i];
+                last = next;
+                if (y === null) {
+                    if (i) {
+                        if (yvalues[i - 1] !== null) {
+                            path = [];
+                            paths.push(path);
+                            vertices.push(null);
+                        }
+                    }
+                } else {
+                    if (y < this.miny) {
+                        y = this.miny;
+                    }
+                    if (y > this.maxy) {
+                        y = this.maxy;
+                    }
+                    if (!path.length) {
+                        // previous value was null
+                        path.push([xpos, canvasTop + canvasHeight]);
+                    }
+                    vertex = [xpos, canvasTop + Math.round(canvasHeight - (canvasHeight * ((y - this.miny) / rangey)))];
+                    path.push(vertex);
+                    vertices.push(vertex);
+                }
+            }
+
+            lineShapes = [];
+            fillShapes = [];
+            plen = paths.length;
+            for (i = 0; i < plen; i++) {
+                path = paths[i];
+                if (path.length) {
+                    if (options.get('fillColor')) {
+                        path.push([path[path.length - 1][0], (canvasTop + canvasHeight)]);
+                        fillShapes.push(path.slice(0));
+                        path.pop();
+                    }
+                    // if there's only a single point in this path, then we want to display it
+                    // as a vertical line which means we keep path[0]  as is
+                    if (path.length > 2) {
+                        // else we want the first value
+                        path[0] = [path[0][0], path[1][1]];
+                    }
+                    lineShapes.push(path);
+                }
+            }
+
+            // draw the fill first, then optionally the normal range, then the line on top of that
+            plen = fillShapes.length;
+            for (i = 0; i < plen; i++) {
+                target.drawShape(fillShapes[i],
+                    options.get('fillColor'), options.get('fillColor')).append();
+            }
+
+            if (options.get('normalRangeMin') && options.get('drawNormalOnTop')) {
+                this.drawNormalRange(canvasLeft, canvasTop, canvasHeight, canvasWidth, rangey);
+            }
+
+            plen = lineShapes.length;
+            for (i = 0; i < plen; i++) {
+                target.drawShape(lineShapes[i], options.get('lineColor'), undefined,
+                    options.get('lineWidth')).append();
+            }
+
+            if (spotRadius && options.get('valueSpots')) {
+                valueSpots = options.get('valueSpots');
+                if (valueSpots.get === undefined) {
+                    valueSpots = new RangeMap(valueSpots);
+                }
+                for (i = 0; i < yvalcount; i++) {
+                    color = valueSpots.get(yvalues[i]);
+                    if (color) {
+                        target.drawCircle(canvasLeft + Math.round((xvalues[i] - this.minx) * (canvasWidth / rangex)),
+                            canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[i] - this.miny) / rangey))),
+                            spotRadius, undefined,
+                            color).append();
+                    }
+                }
+
+            }
+            if (spotRadius && options.get('spotColor')) {
+                target.drawCircle(canvasLeft + Math.round((xvalues[xvalues.length - 1] - this.minx) * (canvasWidth / rangex)),
+                    canvasTop + Math.round(canvasHeight - (canvasHeight * ((yvalues[yvallast] - this.miny) / rangey))),
+                    spotRadius, undefined,
+                    options.get('spotColor')).append();
+            }
+            if (this.maxy !== this.minyorg) {
+                if (spotRadius && options.get('minSpotColor')) {
+                    x = xvalues[$.inArray(this.minyorg, yvalues)];
+                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
+                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.minyorg - this.miny) / rangey))),
+                        spotRadius, undefined,
+                        options.get('minSpotColor')).append();
+                }
+                if (spotRadius && options.get('maxSpotColor')) {
+                    x = xvalues[$.inArray(this.maxyorg, yvalues)];
+                    target.drawCircle(canvasLeft + Math.round((x - this.minx) * (canvasWidth / rangex)),
+                        canvasTop + Math.round(canvasHeight - (canvasHeight * ((this.maxyorg - this.miny) / rangey))),
+                        spotRadius, undefined,
+                        options.get('maxSpotColor')).append();
+                }
+            }
+
+            this.lastShapeId = target.getLastShapeId();
+            this.canvasTop = canvasTop;
+            target.render();
+        }
+    });
+
+    /**
+     * Bar charts
+     */
+    $.fn.sparkline.bar = bar = createClass($.fn.sparkline._base, barHighlightMixin, {
+        type: 'bar',
+
+        init: function (el, values, options, width, height) {
+            var barWidth = parseInt(options.get('barWidth'), 10),
+                barSpacing = parseInt(options.get('barSpacing'), 10),
+                chartRangeMin = options.get('chartRangeMin'),
+                chartRangeMax = options.get('chartRangeMax'),
+                chartRangeClip = options.get('chartRangeClip'),
+                stackMin = Infinity,
+                stackMax = -Infinity,
+                isStackString, groupMin, groupMax, stackRanges,
+                numValues, i, vlen, range, zeroAxis, xaxisOffset, min, max, clipMin, clipMax,
+                stacked, vlist, j, slen, svals, val, yoffset, yMaxCalc, canvasHeightEf;
+            bar._super.init.call(this, el, values, options, width, height);
+
+            // scan values to determine whether to stack bars
+            for (i = 0, vlen = values.length; i < vlen; i++) {
+                val = values[i];
+                isStackString = typeof(val) === 'string' && val.indexOf(':') > -1;
+                if (isStackString || $.isArray(val)) {
+                    stacked = true;
+                    if (isStackString) {
+                        val = values[i] = normalizeValues(val.split(':'));
+                    }
+                    val = remove(val, null); // min/max will treat null as zero
+                    groupMin = Math.min.apply(Math, val);
+                    groupMax = Math.max.apply(Math, val);
+                    if (groupMin < stackMin) {
+                        stackMin = groupMin;
+                    }
+                    if (groupMax > stackMax) {
+                        stackMax = groupMax;
+                    }
+                }
+            }
+
+            this.stacked = stacked;
+            this.regionShapes = {};
+            this.barWidth = barWidth;
+            this.barSpacing = barSpacing;
+            this.totalBarWidth = barWidth + barSpacing;
+            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
+
+            this.initTarget();
+
+            if (chartRangeClip) {
+                clipMin = chartRangeMin === undefined ? -Infinity : chartRangeMin;
+                clipMax = chartRangeMax === undefined ? Infinity : chartRangeMax;
+            }
+
+            numValues = [];
+            stackRanges = stacked ? [] : numValues;
+            var stackTotals = [];
+            var stackRangesNeg = [];
+            for (i = 0, vlen = values.length; i < vlen; i++) {
+                if (stacked) {
+                    vlist = values[i];
+                    values[i] = svals = [];
+                    stackTotals[i] = 0;
+                    stackRanges[i] = stackRangesNeg[i] = 0;
+                    for (j = 0, slen = vlist.length; j < slen; j++) {
+                        val = svals[j] = chartRangeClip ? clipval(vlist[j], clipMin, clipMax) : vlist[j];
+                        if (val !== null) {
+                            if (val > 0) {
+                                stackTotals[i] += val;
+                            }
+                            if (stackMin < 0 && stackMax > 0) {
+                                if (val < 0) {
+                                    stackRangesNeg[i] += Math.abs(val);
+                                } else {
+                                    stackRanges[i] += val;
+                                }
+                            } else {
+                                stackRanges[i] += Math.abs(val - (val < 0 ? stackMax : stackMin));
+                            }
+                            numValues.push(val);
+                        }
+                    }
+                } else {
+                    val = chartRangeClip ? clipval(values[i], clipMin, clipMax) : values[i];
+                    val = values[i] = normalizeValue(val);
+                    if (val !== null) {
+                        numValues.push(val);
+                    }
+                }
+            }
+            this.max = max = Math.max.apply(Math, numValues);
+            this.min = min = Math.min.apply(Math, numValues);
+            this.stackMax = stackMax = stacked ? Math.max.apply(Math, stackTotals) : max;
+            this.stackMin = stackMin = stacked ? Math.min.apply(Math, numValues) : min;
+
+            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < min)) {
+                min = options.get('chartRangeMin');
+            }
+            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > max)) {
+                max = options.get('chartRangeMax');
+            }
+
+            this.zeroAxis = zeroAxis = options.get('zeroAxis', true);
+            if (min <= 0 && max >= 0 && zeroAxis) {
+                xaxisOffset = 0;
+            } else if (zeroAxis == false) {
+                xaxisOffset = min;
+            } else if (min > 0) {
+                xaxisOffset = min;
+            } else {
+                xaxisOffset = max;
+            }
+            this.xaxisOffset = xaxisOffset;
+
+            range = stacked ? (Math.max.apply(Math, stackRanges) + Math.max.apply(Math, stackRangesNeg)) : max - min;
+
+            // as we plot zero/min values a single pixel line, we add a pixel to all other
+            // values - Reduce the effective canvas size to suit
+            this.canvasHeightEf = (zeroAxis && min < 0) ? this.canvasHeight - 2 : this.canvasHeight - 1;
+
+            if (min < xaxisOffset) {
+                yMaxCalc = (stacked && max >= 0) ? stackMax : max;
+                yoffset = (yMaxCalc - xaxisOffset) / range * this.canvasHeight;
+                if (yoffset !== Math.ceil(yoffset)) {
+                    this.canvasHeightEf -= 2;
+                    yoffset = Math.ceil(yoffset);
+                }
+            } else {
+                yoffset = this.canvasHeight;
+            }
+            this.yoffset = yoffset;
+
+            if ($.isArray(options.get('colorMap'))) {
+                this.colorMapByIndex = options.get('colorMap');
+                this.colorMapByValue = null;
+            } else {
+                this.colorMapByIndex = null;
+                this.colorMapByValue = options.get('colorMap');
+                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
+                    this.colorMapByValue = new RangeMap(this.colorMapByValue);
+                }
+            }
+
+            this.range = range;
+        },
+
+        getRegion: function (el, x, y) {
+            var result = Math.floor(x / this.totalBarWidth);
+            return (result < 0 || result >= this.values.length) ? undefined : result;
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion,
+                values = ensureArray(this.values[currentRegion]),
+                result = [],
+                value, i;
+            for (i = values.length; i--;) {
+                value = values[i];
+                result.push({
+                    isNull: value === null,
+                    value: value,
+                    color: this.calcColor(i, value, currentRegion),
+                    offset: currentRegion
+                });
+            }
+            return result;
+        },
+
+        calcColor: function (stacknum, value, valuenum) {
+            var colorMapByIndex = this.colorMapByIndex,
+                colorMapByValue = this.colorMapByValue,
+                options = this.options,
+                color, newColor;
+            if (this.stacked) {
+                color = options.get('stackedBarColor');
+            } else {
+                color = (value < 0) ? options.get('negBarColor') : options.get('barColor');
+            }
+            if (value === 0 && options.get('zeroColor') !== undefined) {
+                color = options.get('zeroColor');
+            }
+            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
+                color = newColor;
+            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
+                color = colorMapByIndex[valuenum];
+            }
+            return $.isArray(color) ? color[stacknum % color.length] : color;
+        },
+
+        /**
+         * Render bar(s) for a region
+         */
+        renderRegion: function (valuenum, highlight) {
+            var vals = this.values[valuenum],
+                options = this.options,
+                xaxisOffset = this.xaxisOffset,
+                result = [],
+                range = this.range,
+                stacked = this.stacked,
+                target = this.target,
+                x = valuenum * this.totalBarWidth,
+                canvasHeightEf = this.canvasHeightEf,
+                yoffset = this.yoffset,
+                y, height, color, isNull, yoffsetNeg, i, valcount, val, minPlotted, allMin;
+
+            vals = $.isArray(vals) ? vals : [vals];
+            valcount = vals.length;
+            val = vals[0];
+            isNull = all(null, vals);
+            allMin = all(xaxisOffset, vals, true);
+
+            if (isNull) {
+                if (options.get('nullColor')) {
+                    color = highlight ? options.get('nullColor') : this.calcHighlightColor(options.get('nullColor'), options);
+                    y = (yoffset > 0) ? yoffset - 1 : yoffset;
+                    return target.drawRect(x, y, this.barWidth - 1, 0, color, color);
+                } else {
+                    return undefined;
+                }
+            }
+            yoffsetNeg = yoffset;
+            for (i = 0; i < valcount; i++) {
+                val = vals[i];
+
+                if (stacked && val === xaxisOffset) {
+                    if (!allMin || minPlotted) {
+                        continue;
+                    }
+                    minPlotted = true;
+                }
+
+                if (range > 0) {
+                    height = Math.floor(canvasHeightEf * ((Math.abs(val - xaxisOffset) / range))) + 1;
+                } else {
+                    height = 1;
+                }
+                if (val < xaxisOffset || (val === xaxisOffset && yoffset === 0)) {
+                    y = yoffsetNeg;
+                    yoffsetNeg += height;
+                } else {
+                    y = yoffset - height;
+                    yoffset -= height;
+                }
+                color = this.calcColor(i, val, valuenum);
+                if (highlight) {
+                    color = this.calcHighlightColor(color, options);
+                }
+                result.push(target.drawRect(x, y, this.barWidth - 1, height - 1, color, color));
+            }
+            if (result.length === 1) {
+                return result[0];
+            }
+            return result;
+        }
+    });
+
+    /**
+     * Tristate charts
+     */
+    $.fn.sparkline.tristate = tristate = createClass($.fn.sparkline._base, barHighlightMixin, {
+        type: 'tristate',
+
+        init: function (el, values, options, width, height) {
+            var barWidth = parseInt(options.get('barWidth'), 10),
+                barSpacing = parseInt(options.get('barSpacing'), 10);
+            tristate._super.init.call(this, el, values, options, width, height);
+
+            this.regionShapes = {};
+            this.barWidth = barWidth;
+            this.barSpacing = barSpacing;
+            this.totalBarWidth = barWidth + barSpacing;
+            this.values = $.map(values, Number);
+            this.width = width = (values.length * barWidth) + ((values.length - 1) * barSpacing);
+
+            if ($.isArray(options.get('colorMap'))) {
+                this.colorMapByIndex = options.get('colorMap');
+                this.colorMapByValue = null;
+            } else {
+                this.colorMapByIndex = null;
+                this.colorMapByValue = options.get('colorMap');
+                if (this.colorMapByValue && this.colorMapByValue.get === undefined) {
+                    this.colorMapByValue = new RangeMap(this.colorMapByValue);
+                }
+            }
+            this.initTarget();
+        },
+
+        getRegion: function (el, x, y) {
+            return Math.floor(x / this.totalBarWidth);
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                isNull: this.values[currentRegion] === undefined,
+                value: this.values[currentRegion],
+                color: this.calcColor(this.values[currentRegion], currentRegion),
+                offset: currentRegion
+            };
+        },
+
+        calcColor: function (value, valuenum) {
+            var values = this.values,
+                options = this.options,
+                colorMapByIndex = this.colorMapByIndex,
+                colorMapByValue = this.colorMapByValue,
+                color, newColor;
+
+            if (colorMapByValue && (newColor = colorMapByValue.get(value))) {
+                color = newColor;
+            } else if (colorMapByIndex && colorMapByIndex.length > valuenum) {
+                color = colorMapByIndex[valuenum];
+            } else if (values[valuenum] < 0) {
+                color = options.get('negBarColor');
+            } else if (values[valuenum] > 0) {
+                color = options.get('posBarColor');
+            } else {
+                color = options.get('zeroBarColor');
+            }
+            return color;
+        },
+
+        renderRegion: function (valuenum, highlight) {
+            var values = this.values,
+                options = this.options,
+                target = this.target,
+                canvasHeight, height, halfHeight,
+                x, y, color;
+
+            canvasHeight = target.pixelHeight;
+            halfHeight = Math.round(canvasHeight / 2);
+
+            x = valuenum * this.totalBarWidth;
+            if (values[valuenum] < 0) {
+                y = halfHeight;
+                height = halfHeight - 1;
+            } else if (values[valuenum] > 0) {
+                y = 0;
+                height = halfHeight - 1;
+            } else {
+                y = halfHeight - 1;
+                height = 2;
+            }
+            color = this.calcColor(values[valuenum], valuenum);
+            if (color === null) {
+                return;
+            }
+            if (highlight) {
+                color = this.calcHighlightColor(color, options);
+            }
+            return target.drawRect(x, y, this.barWidth - 1, height - 1, color, color);
+        }
+    });
+
+    /**
+     * Discrete charts
+     */
+    $.fn.sparkline.discrete = discrete = createClass($.fn.sparkline._base, barHighlightMixin, {
+        type: 'discrete',
+
+        init: function (el, values, options, width, height) {
+            discrete._super.init.call(this, el, values, options, width, height);
+
+            this.regionShapes = {};
+            this.values = values = $.map(values, Number);
+            this.min = Math.min.apply(Math, values);
+            this.max = Math.max.apply(Math, values);
+            this.range = this.max - this.min;
+            this.width = width = options.get('width') === 'auto' ? values.length * 2 : this.width;
+            this.interval = Math.floor(width / values.length);
+            this.itemWidth = width / values.length;
+            if (options.get('chartRangeMin') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMin') < this.min)) {
+                this.min = options.get('chartRangeMin');
+            }
+            if (options.get('chartRangeMax') !== undefined && (options.get('chartRangeClip') || options.get('chartRangeMax') > this.max)) {
+                this.max = options.get('chartRangeMax');
+            }
+            this.initTarget();
+            if (this.target) {
+                this.lineHeight = options.get('lineHeight') === 'auto' ? Math.round(this.canvasHeight * 0.3) : options.get('lineHeight');
+            }
+        },
+
+        getRegion: function (el, x, y) {
+            return Math.floor(x / this.itemWidth);
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                isNull: this.values[currentRegion] === undefined,
+                value: this.values[currentRegion],
+                offset: currentRegion
+            };
+        },
+
+        renderRegion: function (valuenum, highlight) {
+            var values = this.values,
+                options = this.options,
+                min = this.min,
+                max = this.max,
+                range = this.range,
+                interval = this.interval,
+                target = this.target,
+                canvasHeight = this.canvasHeight,
+                lineHeight = this.lineHeight,
+                pheight = canvasHeight - lineHeight,
+                ytop, val, color, x;
+
+            val = clipval(values[valuenum], min, max);
+            x = valuenum * interval;
+            ytop = Math.round(pheight - pheight * ((val - min) / range));
+            color = (options.get('thresholdColor') && val < options.get('thresholdValue')) ? options.get('thresholdColor') : options.get('lineColor');
+            if (highlight) {
+                color = this.calcHighlightColor(color, options);
+            }
+            return target.drawLine(x, ytop, x, ytop + lineHeight, color);
+        }
+    });
+
+    /**
+     * Bullet charts
+     */
+    $.fn.sparkline.bullet = bullet = createClass($.fn.sparkline._base, {
+        type: 'bullet',
+
+        init: function (el, values, options, width, height) {
+            var min, max;
+            bullet._super.init.call(this, el, values, options, width, height);
+
+            // values: target, performance, range1, range2, range3
+            values = $.map(values, Number);
+            min = Math.min.apply(Math, values);
+            max = Math.max.apply(Math, values);
+            if (options.get('base') === undefined) {
+                min = min < 0 ? min : 0;
+            } else {
+                min = options.get('base');
+            }
+            this.min = min;
+            this.max = max;
+            this.range = max - min;
+            this.shapes = {};
+            this.valueShapes = {};
+            this.regiondata = {};
+            this.width = width = options.get('width') === 'auto' ? '4.0em' : width;
+            this.target = this.$el.simpledraw(width, height, options.get('composite'));
+            if (!values.length) {
+                this.disabled = true;
+            }
+            this.initTarget();
+        },
+
+        getRegion: function (el, x, y) {
+            var shapeid = this.target.getShapeAt(el, x, y);
+            return (shapeid !== undefined && this.shapes[shapeid] !== undefined) ? this.shapes[shapeid] : undefined;
+        },
+
+        getCurrentRegionFields: function () {
+            var currentRegion = this.currentRegion;
+            return {
+                fieldkey: currentRegion.substr(0, 1),
+                value: this.values[currentRegion.substr(1)],
+                region: currentRegion
+            };
+        },
+
+        changeHighlight: function (highlight) {
+            var currentRegion = this.currentRegion,
+                shapeid = this.valueShapes[currentRegion],
+                shape;
+            delete this.shapes[shapeid];
+            switch (currentRegion.substr(0, 1)) {
+                case 'r':
+                    shape = this.renderRange(currentRegion.substr(1), highlight);
+                    break;
+                case 'p':
+                    shape = this.renderPerformance(highlight);
+                    

<TRUNCATED>


[21/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/excanvas.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/excanvas.js b/pulse/src/main/webapp/scripts/lib/excanvas.js
new file mode 100644
index 0000000..00b316c
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/excanvas.js
@@ -0,0 +1,1416 @@
+// Copyright 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+// Known Issues:
+//
+// * Patterns only support repeat.
+// * Radial gradient are not implemented. The VML version of these look very
+//   different from the canvas one.
+// * Clipping paths are not implemented.
+// * Coordsize. The width and height attribute have higher priority than the
+//   width and height style values which isn't correct.
+// * Painting mode isn't implemented.
+// * Canvas width/height should is using content-box by default. IE in
+//   Quirks mode will draw the canvas using border-box. Either change your
+//   doctype to HTML5
+//   (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype)
+//   or use Box Sizing Behavior from WebFX
+//   (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html)
+// * Non uniform scaling does not correctly scale strokes.
+// * Optimize. There is always room for speed improvements.
+
+// Only add this code if we do not already have a canvas implementation
+if (!document.createElement('canvas').getContext) {
+
+(function() {
+
+  // alias some functions to make (compiled) code shorter
+  var m = Math;
+  var mr = m.round;
+  var ms = m.sin;
+  var mc = m.cos;
+  var abs = m.abs;
+  var sqrt = m.sqrt;
+
+  // this is used for sub pixel precision
+  var Z = 10;
+  var Z2 = Z / 2;
+
+  var IE_VERSION = +navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];
+
+  /**
+   * This funtion is assigned to the <canvas> elements as element.getContext().
+   * @this {HTMLElement}
+   * @return {CanvasRenderingContext2D_}
+   */
+  function getContext() {
+    return this.context_ ||
+        (this.context_ = new CanvasRenderingContext2D_(this));
+  }
+
+  var slice = Array.prototype.slice;
+
+  /**
+   * Binds a function to an object. The returned function will always use the
+   * passed in {@code obj} as {@code this}.
+   *
+   * Example:
+   *
+   *   g = bind(f, obj, a, b)
+   *   g(c, d) // will do f.call(obj, a, b, c, d)
+   *
+   * @param {Function} f The function to bind the object to
+   * @param {Object} obj The object that should act as this when the function
+   *     is called
+   * @param {*} var_args Rest arguments that will be used as the initial
+   *     arguments when the function is called
+   * @return {Function} A new function that has bound this
+   */
+  function bind(f, obj, var_args) {
+    var a = slice.call(arguments, 2);
+    return function() {
+      return f.apply(obj, a.concat(slice.call(arguments)));
+    };
+  }
+
+  function encodeHtmlAttribute(s) {
+    return String(s).replace(/&/g, '&amp;').replace(/"/g, '&quot;');
+  }
+
+  function addNamespace(doc, prefix, urn) {
+    if (!doc.namespaces[prefix]) {
+      doc.namespaces.add(prefix, urn, '#default#VML');
+    }
+  }
+
+  function addNamespacesAndStylesheet(doc) {
+    addNamespace(doc, 'g_vml_', 'urn:schemas-microsoft-com:vml');
+    addNamespace(doc, 'g_o_', 'urn:schemas-microsoft-com:office:office');
+
+    // Setup default CSS.  Only add one style sheet per document
+    if (!doc.styleSheets['ex_canvas_']) {
+      var ss = doc.createStyleSheet();
+      ss.owningElement.id = 'ex_canvas_';
+      ss.cssText = 'canvas{display:inline-block;overflow:hidden;' +
+          // default size is 300x150 in Gecko and Opera
+          'text-align:left;width:300px;height:150px}';
+    }
+  }
+
+  // Add namespaces and stylesheet at startup.
+  addNamespacesAndStylesheet(document);
+
+  var G_vmlCanvasManager_ = {
+    init: function(opt_doc) {
+      var doc = opt_doc || document;
+      // Create a dummy element so that IE will allow canvas elements to be
+      // recognized.
+      doc.createElement('canvas');
+      doc.attachEvent('onreadystatechange', bind(this.init_, this, doc));
+    },
+
+    init_: function(doc) {
+      // find all canvas elements
+      var els = doc.getElementsByTagName('canvas');
+      for (var i = 0; i < els.length; i++) {
+        this.initElement(els[i]);
+      }
+    },
+
+    /**
+     * Public initializes a canvas element so that it can be used as canvas
+     * element from now on. This is called automatically before the page is
+     * loaded but if you are creating elements using createElement you need to
+     * make sure this is called on the element.
+     * @param {HTMLElement} el The canvas element to initialize.
+     * @return {HTMLElement} the element that was created.
+     */
+    initElement: function(el) {
+      if (!el.getContext) {
+        el.getContext = getContext;
+
+        // Add namespaces and stylesheet to document of the element.
+        addNamespacesAndStylesheet(el.ownerDocument);
+
+        // Remove fallback content. There is no way to hide text nodes so we
+        // just remove all childNodes. We could hide all elements and remove
+        // text nodes but who really cares about the fallback content.
+        el.innerHTML = '';
+
+        // do not use inline function because that will leak memory
+        el.attachEvent('onpropertychange', onPropertyChange);
+        el.attachEvent('onresize', onResize);
+
+        var attrs = el.attributes;
+        if (attrs.width && attrs.width.specified) {
+          // TODO: use runtimeStyle and coordsize
+          // el.getContext().setWidth_(attrs.width.nodeValue);
+          el.style.width = attrs.width.nodeValue + 'px';
+        } else {
+          el.width = el.clientWidth;
+        }
+        if (attrs.height && attrs.height.specified) {
+          // TODO: use runtimeStyle and coordsize
+          // el.getContext().setHeight_(attrs.height.nodeValue);
+          el.style.height = attrs.height.nodeValue + 'px';
+        } else {
+          el.height = el.clientHeight;
+        }
+        //el.getContext().setCoordsize_()
+      }
+      return el;
+    }
+  };
+
+  function onPropertyChange(e) {
+    var el = e.srcElement;
+
+    switch (e.propertyName) {
+      case 'width':
+        el.getContext().clearRect();
+        el.style.width = el.attributes.width.nodeValue + 'px';
+        // In IE8 this does not trigger onresize.
+        el.firstChild.style.width =  el.clientWidth + 'px';
+        break;
+      case 'height':
+        el.getContext().clearRect();
+        el.style.height = el.attributes.height.nodeValue + 'px';
+        el.firstChild.style.height = el.clientHeight + 'px';
+        break;
+    }
+  }
+
+  function onResize(e) {
+    var el = e.srcElement;
+    if (el.firstChild) {
+      el.firstChild.style.width =  el.clientWidth + 'px';
+      el.firstChild.style.height = el.clientHeight + 'px';
+    }
+  }
+
+  G_vmlCanvasManager_.init();
+
+  // precompute "00" to "FF"
+  var decToHex = [];
+  for (var i = 0; i < 16; i++) {
+    for (var j = 0; j < 16; j++) {
+      decToHex[i * 16 + j] = i.toString(16) + j.toString(16);
+    }
+  }
+
+  function createMatrixIdentity() {
+    return [
+      [1, 0, 0],
+      [0, 1, 0],
+      [0, 0, 1]
+    ];
+  }
+
+  function matrixMultiply(m1, m2) {
+    var result = createMatrixIdentity();
+
+    for (var x = 0; x < 3; x++) {
+      for (var y = 0; y < 3; y++) {
+        var sum = 0;
+
+        for (var z = 0; z < 3; z++) {
+          sum += m1[x][z] * m2[z][y];
+        }
+
+        result[x][y] = sum;
+      }
+    }
+    return result;
+  }
+
+  function copyState(o1, o2) {
+    o2.fillStyle     = o1.fillStyle;
+    o2.lineCap       = o1.lineCap;
+    o2.lineJoin      = o1.lineJoin;
+    o2.lineWidth     = o1.lineWidth;
+    o2.miterLimit    = o1.miterLimit;
+    o2.shadowBlur    = o1.shadowBlur;
+    o2.shadowColor   = o1.shadowColor;
+    o2.shadowOffsetX = o1.shadowOffsetX;
+    o2.shadowOffsetY = o1.shadowOffsetY;
+    o2.strokeStyle   = o1.strokeStyle;
+    o2.globalAlpha   = o1.globalAlpha;
+    o2.font          = o1.font;
+    o2.textAlign     = o1.textAlign;
+    o2.textBaseline  = o1.textBaseline;
+    o2.arcScaleX_    = o1.arcScaleX_;
+    o2.arcScaleY_    = o1.arcScaleY_;
+    o2.lineScale_    = o1.lineScale_;
+  }
+
+  var colorData = {
+    aliceblue: '#F0F8FF',
+    antiquewhite: '#FAEBD7',
+    aquamarine: '#7FFFD4',
+    azure: '#F0FFFF',
+    beige: '#F5F5DC',
+    bisque: '#FFE4C4',
+    black: '#000000',
+    blanchedalmond: '#FFEBCD',
+    blueviolet: '#8A2BE2',
+    brown: '#A52A2A',
+    burlywood: '#DEB887',
+    cadetblue: '#5F9EA0',
+    chartreuse: '#7FFF00',
+    chocolate: '#D2691E',
+    coral: '#FF7F50',
+    cornflowerblue: '#6495ED',
+    cornsilk: '#FFF8DC',
+    crimson: '#DC143C',
+    cyan: '#00FFFF',
+    darkblue: '#00008B',
+    darkcyan: '#008B8B',
+    darkgoldenrod: '#B8860B',
+    darkgray: '#A9A9A9',
+    darkgreen: '#006400',
+    darkgrey: '#A9A9A9',
+    darkkhaki: '#BDB76B',
+    darkmagenta: '#8B008B',
+    darkolivegreen: '#556B2F',
+    darkorange: '#FF8C00',
+    darkorchid: '#9932CC',
+    darkred: '#8B0000',
+    darksalmon: '#E9967A',
+    darkseagreen: '#8FBC8F',
+    darkslateblue: '#483D8B',
+    darkslategray: '#2F4F4F',
+    darkslategrey: '#2F4F4F',
+    darkturquoise: '#00CED1',
+    darkviolet: '#9400D3',
+    deeppink: '#FF1493',
+    deepskyblue: '#00BFFF',
+    dimgray: '#696969',
+    dimgrey: '#696969',
+    dodgerblue: '#1E90FF',
+    firebrick: '#B22222',
+    floralwhite: '#FFFAF0',
+    forestgreen: '#228B22',
+    gainsboro: '#DCDCDC',
+    ghostwhite: '#F8F8FF',
+    gold: '#FFD700',
+    goldenrod: '#DAA520',
+    grey: '#808080',
+    greenyellow: '#ADFF2F',
+    honeydew: '#F0FFF0',
+    hotpink: '#FF69B4',
+    indianred: '#CD5C5C',
+    indigo: '#4B0082',
+    ivory: '#FFFFF0',
+    khaki: '#F0E68C',
+    lavender: '#E6E6FA',
+    lavenderblush: '#FFF0F5',
+    lawngreen: '#7CFC00',
+    lemonchiffon: '#FFFACD',
+    lightblue: '#ADD8E6',
+    lightcoral: '#F08080',
+    lightcyan: '#E0FFFF',
+    lightgoldenrodyellow: '#FAFAD2',
+    lightgreen: '#90EE90',
+    lightgrey: '#D3D3D3',
+    lightpink: '#FFB6C1',
+    lightsalmon: '#FFA07A',
+    lightseagreen: '#20B2AA',
+    lightskyblue: '#87CEFA',
+    lightslategray: '#778899',
+    lightslategrey: '#778899',
+    lightsteelblue: '#B0C4DE',
+    lightyellow: '#FFFFE0',
+    limegreen: '#32CD32',
+    linen: '#FAF0E6',
+    magenta: '#FF00FF',
+    mediumaquamarine: '#66CDAA',
+    mediumblue: '#0000CD',
+    mediumorchid: '#BA55D3',
+    mediumpurple: '#9370DB',
+    mediumseagreen: '#3CB371',
+    mediumslateblue: '#7B68EE',
+    mediumspringgreen: '#00FA9A',
+    mediumturquoise: '#48D1CC',
+    mediumvioletred: '#C71585',
+    midnightblue: '#191970',
+    mintcream: '#F5FFFA',
+    mistyrose: '#FFE4E1',
+    moccasin: '#FFE4B5',
+    navajowhite: '#FFDEAD',
+    oldlace: '#FDF5E6',
+    olivedrab: '#6B8E23',
+    orange: '#FFA500',
+    orangered: '#FF4500',
+    orchid: '#DA70D6',
+    palegoldenrod: '#EEE8AA',
+    palegreen: '#98FB98',
+    paleturquoise: '#AFEEEE',
+    palevioletred: '#DB7093',
+    papayawhip: '#FFEFD5',
+    peachpuff: '#FFDAB9',
+    peru: '#CD853F',
+    pink: '#FFC0CB',
+    plum: '#DDA0DD',
+    powderblue: '#B0E0E6',
+    rosybrown: '#BC8F8F',
+    royalblue: '#4169E1',
+    saddlebrown: '#8B4513',
+    salmon: '#FA8072',
+    sandybrown: '#F4A460',
+    seagreen: '#2E8B57',
+    seashell: '#FFF5EE',
+    sienna: '#A0522D',
+    skyblue: '#87CEEB',
+    slateblue: '#6A5ACD',
+    slategray: '#708090',
+    slategrey: '#708090',
+    snow: '#FFFAFA',
+    springgreen: '#00FF7F',
+    steelblue: '#4682B4',
+    tan: '#D2B48C',
+    thistle: '#D8BFD8',
+    tomato: '#FF6347',
+    turquoise: '#40E0D0',
+    violet: '#EE82EE',
+    wheat: '#F5DEB3',
+    whitesmoke: '#F5F5F5',
+    yellowgreen: '#9ACD32'
+  };
+
+
+  function getRgbHslContent(styleString) {
+    var start = styleString.indexOf('(', 3);
+    var end = styleString.indexOf(')', start + 1);
+    var parts = styleString.substring(start + 1, end).split(',');
+    // add alpha if needed
+    if (parts.length != 4 || styleString.charAt(3) != 'a') {
+      parts[3] = 1;
+    }
+    return parts;
+  }
+
+  function percent(s) {
+    return parseFloat(s) / 100;
+  }
+
+  function clamp(v, min, max) {
+    return Math.min(max, Math.max(min, v));
+  }
+
+  function hslToRgb(parts){
+    var r, g, b, h, s, l;
+    h = parseFloat(parts[0]) / 360 % 360;
+    if (h < 0)
+      h++;
+    s = clamp(percent(parts[1]), 0, 1);
+    l = clamp(percent(parts[2]), 0, 1);
+    if (s == 0) {
+      r = g = b = l; // achromatic
+    } else {
+      var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+      var p = 2 * l - q;
+      r = hueToRgb(p, q, h + 1 / 3);
+      g = hueToRgb(p, q, h);
+      b = hueToRgb(p, q, h - 1 / 3);
+    }
+
+    return '#' + decToHex[Math.floor(r * 255)] +
+        decToHex[Math.floor(g * 255)] +
+        decToHex[Math.floor(b * 255)];
+  }
+
+  function hueToRgb(m1, m2, h) {
+    if (h < 0)
+      h++;
+    if (h > 1)
+      h--;
+
+    if (6 * h < 1)
+      return m1 + (m2 - m1) * 6 * h;
+    else if (2 * h < 1)
+      return m2;
+    else if (3 * h < 2)
+      return m1 + (m2 - m1) * (2 / 3 - h) * 6;
+    else
+      return m1;
+  }
+
+  var processStyleCache = {};
+
+  function processStyle(styleString) {
+    if (styleString in processStyleCache) {
+      return processStyleCache[styleString];
+    }
+
+    var str, alpha = 1;
+
+    styleString = String(styleString);
+    if (styleString.charAt(0) == '#') {
+      str = styleString;
+    } else if (/^rgb/.test(styleString)) {
+      var parts = getRgbHslContent(styleString);
+      var str = '#', n;
+      for (var i = 0; i < 3; i++) {
+        if (parts[i].indexOf('%') != -1) {
+          n = Math.floor(percent(parts[i]) * 255);
+        } else {
+          n = +parts[i];
+        }
+        str += decToHex[clamp(n, 0, 255)];
+      }
+      alpha = +parts[3];
+    } else if (/^hsl/.test(styleString)) {
+      var parts = getRgbHslContent(styleString);
+      str = hslToRgb(parts);
+      alpha = parts[3];
+    } else {
+      str = colorData[styleString] || styleString;
+    }
+    return processStyleCache[styleString] = {color: str, alpha: alpha};
+  }
+
+  var DEFAULT_STYLE = {
+    style: 'normal',
+    variant: 'normal',
+    weight: 'normal',
+    size: 10,
+    family: 'sans-serif'
+  };
+
+  // Internal text style cache
+  var fontStyleCache = {};
+
+  function processFontStyle(styleString) {
+    if (fontStyleCache[styleString]) {
+      return fontStyleCache[styleString];
+    }
+
+    var el = document.createElement('div');
+    var style = el.style;
+    try {
+      style.font = styleString;
+    } catch (ex) {
+      // Ignore failures to set to invalid font.
+    }
+
+    return fontStyleCache[styleString] = {
+      style: style.fontStyle || DEFAULT_STYLE.style,
+      variant: style.fontVariant || DEFAULT_STYLE.variant,
+      weight: style.fontWeight || DEFAULT_STYLE.weight,
+      size: style.fontSize || DEFAULT_STYLE.size,
+      family: style.fontFamily || DEFAULT_STYLE.family
+    };
+  }
+
+  function getComputedStyle(style, element) {
+    var computedStyle = {};
+
+    for (var p in style) {
+      computedStyle[p] = style[p];
+    }
+
+    // Compute the size
+    var canvasFontSize = parseFloat(element.currentStyle.fontSize),
+        fontSize = parseFloat(style.size);
+
+    if (typeof style.size == 'number') {
+      computedStyle.size = style.size;
+    } else if (style.size.indexOf('px') != -1) {
+      computedStyle.size = fontSize;
+    } else if (style.size.indexOf('em') != -1) {
+      computedStyle.size = canvasFontSize * fontSize;
+    } else if(style.size.indexOf('%') != -1) {
+      computedStyle.size = (canvasFontSize / 100) * fontSize;
+    } else if (style.size.indexOf('pt') != -1) {
+      computedStyle.size = fontSize / .75;
+    } else {
+      computedStyle.size = canvasFontSize;
+    }
+
+    // Different scaling between normal text and VML text. This was found using
+    // trial and error to get the same size as non VML text.
+    computedStyle.size *= 0.981;
+
+    return computedStyle;
+  }
+
+  function buildStyle(style) {
+    return style.style + ' ' + style.variant + ' ' + style.weight + ' ' +
+        style.size + 'px ' + style.family;
+  }
+
+  var lineCapMap = {
+    'butt': 'flat',
+    'round': 'round'
+  };
+
+  function processLineCap(lineCap) {
+    return lineCapMap[lineCap] || 'square';
+  }
+
+  /**
+   * This class implements CanvasRenderingContext2D interface as described by
+   * the WHATWG.
+   * @param {HTMLElement} canvasElement The element that the 2D context should
+   * be associated with
+   */
+  function CanvasRenderingContext2D_(canvasElement) {
+    this.m_ = createMatrixIdentity();
+
+    this.mStack_ = [];
+    this.aStack_ = [];
+    this.currentPath_ = [];
+
+    // Canvas context properties
+    this.strokeStyle = '#000';
+    this.fillStyle = '#000';
+
+    this.lineWidth = 1;
+    this.lineJoin = 'miter';
+    this.lineCap = 'butt';
+    this.miterLimit = Z * 1;
+    this.globalAlpha = 1;
+    this.font = '10px sans-serif';
+    this.textAlign = 'left';
+    this.textBaseline = 'alphabetic';
+    this.canvas = canvasElement;
+
+    var cssText = 'width:' + canvasElement.clientWidth + 'px;height:' +
+        canvasElement.clientHeight + 'px;overflow:hidden;position:absolute';
+    var el = canvasElement.ownerDocument.createElement('div');
+    el.style.cssText = cssText;
+    canvasElement.appendChild(el);
+
+    var overlayEl = el.cloneNode(false);
+    // Use a non transparent background.
+    overlayEl.style.backgroundColor = 'red';
+    overlayEl.style.filter = 'alpha(opacity=0)';
+    canvasElement.appendChild(overlayEl);
+
+    this.element_ = el;
+    this.arcScaleX_ = 1;
+    this.arcScaleY_ = 1;
+    this.lineScale_ = 1;
+  }
+
+  var contextPrototype = CanvasRenderingContext2D_.prototype;
+  contextPrototype.clearRect = function() {
+    if (this.textMeasureEl_) {
+      this.textMeasureEl_.removeNode(true);
+      this.textMeasureEl_ = null;
+    }
+    this.element_.innerHTML = '';
+  };
+
+  contextPrototype.beginPath = function() {
+    // TODO: Branch current matrix so that save/restore has no effect
+    //       as per safari docs.
+    this.currentPath_ = [];
+  };
+
+  contextPrototype.moveTo = function(aX, aY) {
+    var p = getCoords(this, aX, aY);
+    this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y});
+    this.currentX_ = p.x;
+    this.currentY_ = p.y;
+  };
+
+  contextPrototype.lineTo = function(aX, aY) {
+    var p = getCoords(this, aX, aY);
+    this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y});
+
+    this.currentX_ = p.x;
+    this.currentY_ = p.y;
+  };
+
+  contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
+                                            aCP2x, aCP2y,
+                                            aX, aY) {
+    var p = getCoords(this, aX, aY);
+    var cp1 = getCoords(this, aCP1x, aCP1y);
+    var cp2 = getCoords(this, aCP2x, aCP2y);
+    bezierCurveTo(this, cp1, cp2, p);
+  };
+
+  // Helper function that takes the already fixed cordinates.
+  function bezierCurveTo(self, cp1, cp2, p) {
+    self.currentPath_.push({
+      type: 'bezierCurveTo',
+      cp1x: cp1.x,
+      cp1y: cp1.y,
+      cp2x: cp2.x,
+      cp2y: cp2.y,
+      x: p.x,
+      y: p.y
+    });
+    self.currentX_ = p.x;
+    self.currentY_ = p.y;
+  }
+
+  contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) {
+    // the following is lifted almost directly from
+    // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes
+
+    var cp = getCoords(this, aCPx, aCPy);
+    var p = getCoords(this, aX, aY);
+
+    var cp1 = {
+      x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_),
+      y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_)
+    };
+    var cp2 = {
+      x: cp1.x + (p.x - this.currentX_) / 3.0,
+      y: cp1.y + (p.y - this.currentY_) / 3.0
+    };
+
+    bezierCurveTo(this, cp1, cp2, p);
+  };
+
+  contextPrototype.arc = function(aX, aY, aRadius,
+                                  aStartAngle, aEndAngle, aClockwise) {
+    aRadius *= Z;
+    var arcType = aClockwise ? 'at' : 'wa';
+
+    var xStart = aX + mc(aStartAngle) * aRadius - Z2;
+    var yStart = aY + ms(aStartAngle) * aRadius - Z2;
+
+    var xEnd = aX + mc(aEndAngle) * aRadius - Z2;
+    var yEnd = aY + ms(aEndAngle) * aRadius - Z2;
+
+    // IE won't render arches drawn counter clockwise if xStart == xEnd.
+    if (xStart == xEnd && !aClockwise) {
+      xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something
+                       // that can be represented in binary
+    }
+
+    var p = getCoords(this, aX, aY);
+    var pStart = getCoords(this, xStart, yStart);
+    var pEnd = getCoords(this, xEnd, yEnd);
+
+    this.currentPath_.push({type: arcType,
+                           x: p.x,
+                           y: p.y,
+                           radius: aRadius,
+                           xStart: pStart.x,
+                           yStart: pStart.y,
+                           xEnd: pEnd.x,
+                           yEnd: pEnd.y});
+
+  };
+
+  contextPrototype.rect = function(aX, aY, aWidth, aHeight) {
+    this.moveTo(aX, aY);
+    this.lineTo(aX + aWidth, aY);
+    this.lineTo(aX + aWidth, aY + aHeight);
+    this.lineTo(aX, aY + aHeight);
+    this.closePath();
+  };
+
+  contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
+    var oldPath = this.currentPath_;
+    this.beginPath();
+
+    this.moveTo(aX, aY);
+    this.lineTo(aX + aWidth, aY);
+    this.lineTo(aX + aWidth, aY + aHeight);
+    this.lineTo(aX, aY + aHeight);
+    this.closePath();
+    this.stroke();
+
+    this.currentPath_ = oldPath;
+  };
+
+  contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
+    var oldPath = this.currentPath_;
+    this.beginPath();
+
+    this.moveTo(aX, aY);
+    this.lineTo(aX + aWidth, aY);
+    this.lineTo(aX + aWidth, aY + aHeight);
+    this.lineTo(aX, aY + aHeight);
+    this.closePath();
+    this.fill();
+
+    this.currentPath_ = oldPath;
+  };
+
+  contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) {
+    var gradient = new CanvasGradient_('gradient');
+    gradient.x0_ = aX0;
+    gradient.y0_ = aY0;
+    gradient.x1_ = aX1;
+    gradient.y1_ = aY1;
+    return gradient;
+  };
+
+  contextPrototype.createRadialGradient = function(aX0, aY0, aR0,
+                                                   aX1, aY1, aR1) {
+    var gradient = new CanvasGradient_('gradientradial');
+    gradient.x0_ = aX0;
+    gradient.y0_ = aY0;
+    gradient.r0_ = aR0;
+    gradient.x1_ = aX1;
+    gradient.y1_ = aY1;
+    gradient.r1_ = aR1;
+    return gradient;
+  };
+
+  contextPrototype.drawImage = function(image, var_args) {
+    var dx, dy, dw, dh, sx, sy, sw, sh;
+
+    // to find the original width we overide the width and height
+    var oldRuntimeWidth = image.runtimeStyle.width;
+    var oldRuntimeHeight = image.runtimeStyle.height;
+    image.runtimeStyle.width = 'auto';
+    image.runtimeStyle.height = 'auto';
+
+    // get the original size
+    var w = image.width;
+    var h = image.height;
+
+    // and remove overides
+    image.runtimeStyle.width = oldRuntimeWidth;
+    image.runtimeStyle.height = oldRuntimeHeight;
+
+    if (arguments.length == 3) {
+      dx = arguments[1];
+      dy = arguments[2];
+      sx = sy = 0;
+      sw = dw = w;
+      sh = dh = h;
+    } else if (arguments.length == 5) {
+      dx = arguments[1];
+      dy = arguments[2];
+      dw = arguments[3];
+      dh = arguments[4];
+      sx = sy = 0;
+      sw = w;
+      sh = h;
+    } else if (arguments.length == 9) {
+      sx = arguments[1];
+      sy = arguments[2];
+      sw = arguments[3];
+      sh = arguments[4];
+      dx = arguments[5];
+      dy = arguments[6];
+      dw = arguments[7];
+      dh = arguments[8];
+    } else {
+      throw Error('Invalid number of arguments');
+    }
+
+    var d = getCoords(this, dx, dy);
+
+    var w2 = sw / 2;
+    var h2 = sh / 2;
+
+    var vmlStr = [];
+
+    var W = 10;
+    var H = 10;
+
+    // For some reason that I've now forgotten, using divs didn't work
+    vmlStr.push(' <g_vml_:group',
+                ' coordsize="', Z * W, ',', Z * H, '"',
+                ' coordorigin="0,0"' ,
+                ' style="width:', W, 'px;height:', H, 'px;position:absolute;');
+
+    // If filters are necessary (rotation exists), create them
+    // filters are bog-slow, so only create them if abbsolutely necessary
+    // The following check doesn't account for skews (which don't exist
+    // in the canvas spec (yet) anyway.
+
+    if (this.m_[0][0] != 1 || this.m_[0][1] ||
+        this.m_[1][1] != 1 || this.m_[1][0]) {
+      var filter = [];
+
+      // Note the 12/21 reversal
+      filter.push('M11=', this.m_[0][0], ',',
+                  'M12=', this.m_[1][0], ',',
+                  'M21=', this.m_[0][1], ',',
+                  'M22=', this.m_[1][1], ',',
+                  'Dx=', mr(d.x / Z), ',',
+                  'Dy=', mr(d.y / Z), '');
+
+      // Bounding box calculation (need to minimize displayed area so that
+      // filters don't waste time on unused pixels.
+      var max = d;
+      var c2 = getCoords(this, dx + dw, dy);
+      var c3 = getCoords(this, dx, dy + dh);
+      var c4 = getCoords(this, dx + dw, dy + dh);
+
+      max.x = m.max(max.x, c2.x, c3.x, c4.x);
+      max.y = m.max(max.y, c2.y, c3.y, c4.y);
+
+      vmlStr.push('padding:0 ', mr(max.x / Z), 'px ', mr(max.y / Z),
+                  'px 0;filter:progid:DXImageTransform.Microsoft.Matrix(',
+                  filter.join(''), ", sizingmethod='clip');");
+
+    } else {
+      vmlStr.push('top:', mr(d.y / Z), 'px;left:', mr(d.x / Z), 'px;');
+    }
+
+    vmlStr.push(' ">' ,
+                '<g_vml_:image src="', image.src, '"',
+                ' style="width:', Z * dw, 'px;',
+                ' height:', Z * dh, 'px"',
+                ' cropleft="', sx / w, '"',
+                ' croptop="', sy / h, '"',
+                ' cropright="', (w - sx - sw) / w, '"',
+                ' cropbottom="', (h - sy - sh) / h, '"',
+                ' />',
+                '</g_vml_:group>');
+
+    this.element_.insertAdjacentHTML('BeforeEnd', vmlStr.join(''));
+  };
+
+  contextPrototype.stroke = function(aFill) {
+    var lineStr = [];
+    var lineOpen = false;
+
+    var W = 10;
+    var H = 10;
+
+    lineStr.push('<g_vml_:shape',
+                 ' filled="', !!aFill, '"',
+                 ' style="position:absolute;width:', W, 'px;height:', H, 'px;"',
+                 ' coordorigin="0,0"',
+                 ' coordsize="', Z * W, ',', Z * H, '"',
+                 ' stroked="', !aFill, '"',
+                 ' path="');
+
+    var newSeq = false;
+    var min = {x: null, y: null};
+    var max = {x: null, y: null};
+
+    for (var i = 0; i < this.currentPath_.length; i++) {
+      var p = this.currentPath_[i];
+      var c;
+
+      switch (p.type) {
+        case 'moveTo':
+          c = p;
+          lineStr.push(' m ', mr(p.x), ',', mr(p.y));
+          break;
+        case 'lineTo':
+          lineStr.push(' l ', mr(p.x), ',', mr(p.y));
+          break;
+        case 'close':
+          lineStr.push(' x ');
+          p = null;
+          break;
+        case 'bezierCurveTo':
+          lineStr.push(' c ',
+                       mr(p.cp1x), ',', mr(p.cp1y), ',',
+                       mr(p.cp2x), ',', mr(p.cp2y), ',',
+                       mr(p.x), ',', mr(p.y));
+          break;
+        case 'at':
+        case 'wa':
+          lineStr.push(' ', p.type, ' ',
+                       mr(p.x - this.arcScaleX_ * p.radius), ',',
+                       mr(p.y - this.arcScaleY_ * p.radius), ' ',
+                       mr(p.x + this.arcScaleX_ * p.radius), ',',
+                       mr(p.y + this.arcScaleY_ * p.radius), ' ',
+                       mr(p.xStart), ',', mr(p.yStart), ' ',
+                       mr(p.xEnd), ',', mr(p.yEnd));
+          break;
+      }
+
+
+      // TODO: Following is broken for curves due to
+      //       move to proper paths.
+
+      // Figure out dimensions so we can do gradient fills
+      // properly
+      if (p) {
+        if (min.x == null || p.x < min.x) {
+          min.x = p.x;
+        }
+        if (max.x == null || p.x > max.x) {
+          max.x = p.x;
+        }
+        if (min.y == null || p.y < min.y) {
+          min.y = p.y;
+        }
+        if (max.y == null || p.y > max.y) {
+          max.y = p.y;
+        }
+      }
+    }
+    lineStr.push(' ">');
+
+    if (!aFill) {
+      appendStroke(this, lineStr);
+    } else {
+      appendFill(this, lineStr, min, max);
+    }
+
+    lineStr.push('</g_vml_:shape>');
+
+    this.element_.insertAdjacentHTML('beforeEnd', lineStr.join(''));
+  };
+
+  function appendStroke(ctx, lineStr) {
+    var a = processStyle(ctx.strokeStyle);
+    var color = a.color;
+    var opacity = a.alpha * ctx.globalAlpha;
+    var lineWidth = ctx.lineScale_ * ctx.lineWidth;
+
+    // VML cannot correctly render a line if the width is less than 1px.
+    // In that case, we dilute the color to make the line look thinner.
+    if (lineWidth < 1) {
+      opacity *= lineWidth;
+    }
+
+    lineStr.push(
+      '<g_vml_:stroke',
+      ' opacity="', opacity, '"',
+      ' joinstyle="', ctx.lineJoin, '"',
+      ' miterlimit="', ctx.miterLimit, '"',
+      ' endcap="', processLineCap(ctx.lineCap), '"',
+      ' weight="', lineWidth, 'px"',
+      ' color="', color, '" />'
+    );
+  }
+
+  function appendFill(ctx, lineStr, min, max) {
+    var fillStyle = ctx.fillStyle;
+    var arcScaleX = ctx.arcScaleX_;
+    var arcScaleY = ctx.arcScaleY_;
+    var width = max.x - min.x;
+    var height = max.y - min.y;
+    if (fillStyle instanceof CanvasGradient_) {
+      // TODO: Gradients transformed with the transformation matrix.
+      var angle = 0;
+      var focus = {x: 0, y: 0};
+
+      // additional offset
+      var shift = 0;
+      // scale factor for offset
+      var expansion = 1;
+
+      if (fillStyle.type_ == 'gradient') {
+        var x0 = fillStyle.x0_ / arcScaleX;
+        var y0 = fillStyle.y0_ / arcScaleY;
+        var x1 = fillStyle.x1_ / arcScaleX;
+        var y1 = fillStyle.y1_ / arcScaleY;
+        var p0 = getCoords(ctx, x0, y0);
+        var p1 = getCoords(ctx, x1, y1);
+        var dx = p1.x - p0.x;
+        var dy = p1.y - p0.y;
+        angle = Math.atan2(dx, dy) * 180 / Math.PI;
+
+        // The angle should be a non-negative number.
+        if (angle < 0) {
+          angle += 360;
+        }
+
+        // Very small angles produce an unexpected result because they are
+        // converted to a scientific notation string.
+        if (angle < 1e-6) {
+          angle = 0;
+        }
+      } else {
+        var p0 = getCoords(ctx, fillStyle.x0_, fillStyle.y0_);
+        focus = {
+          x: (p0.x - min.x) / width,
+          y: (p0.y - min.y) / height
+        };
+
+        width  /= arcScaleX * Z;
+        height /= arcScaleY * Z;
+        var dimension = m.max(width, height);
+        shift = 2 * fillStyle.r0_ / dimension;
+        expansion = 2 * fillStyle.r1_ / dimension - shift;
+      }
+
+      // We need to sort the color stops in ascending order by offset,
+      // otherwise IE won't interpret it correctly.
+      var stops = fillStyle.colors_;
+      stops.sort(function(cs1, cs2) {
+        return cs1.offset - cs2.offset;
+      });
+
+      var length = stops.length;
+      var color1 = stops[0].color;
+      var color2 = stops[length - 1].color;
+      var opacity1 = stops[0].alpha * ctx.globalAlpha;
+      var opacity2 = stops[length - 1].alpha * ctx.globalAlpha;
+
+      var colors = [];
+      for (var i = 0; i < length; i++) {
+        var stop = stops[i];
+        colors.push(stop.offset * expansion + shift + ' ' + stop.color);
+      }
+
+      // When colors attribute is used, the meanings of opacity and o:opacity2
+      // are reversed.
+      lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"',
+                   ' method="none" focus="100%"',
+                   ' color="', color1, '"',
+                   ' color2="', color2, '"',
+                   ' colors="', colors.join(','), '"',
+                   ' opacity="', opacity2, '"',
+                   ' g_o_:opacity2="', opacity1, '"',
+                   ' angle="', angle, '"',
+                   ' focusposition="', focus.x, ',', focus.y, '" />');
+    } else if (fillStyle instanceof CanvasPattern_) {
+      if (width && height) {
+        var deltaLeft = -min.x;
+        var deltaTop = -min.y;
+        lineStr.push('<g_vml_:fill',
+                     ' position="',
+                     deltaLeft / width * arcScaleX * arcScaleX, ',',
+                     deltaTop / height * arcScaleY * arcScaleY, '"',
+                     ' type="tile"',
+                     // TODO: Figure out the correct size to fit the scale.
+                     //' size="', w, 'px ', h, 'px"',
+                     ' src="', fillStyle.src_, '" />');
+       }
+    } else {
+      var a = processStyle(ctx.fillStyle);
+      var color = a.color;
+      var opacity = a.alpha * ctx.globalAlpha;
+      lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity,
+                   '" />');
+    }
+  }
+
+  contextPrototype.fill = function() {
+    this.stroke(true);
+  };
+
+  contextPrototype.closePath = function() {
+    this.currentPath_.push({type: 'close'});
+  };
+
+  function getCoords(ctx, aX, aY) {
+    var m = ctx.m_;
+    return {
+      x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2,
+      y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
+    };
+  };
+
+  contextPrototype.save = function() {
+    var o = {};
+    copyState(this, o);
+    this.aStack_.push(o);
+    this.mStack_.push(this.m_);
+    this.m_ = matrixMultiply(createMatrixIdentity(), this.m_);
+  };
+
+  contextPrototype.restore = function() {
+    if (this.aStack_.length) {
+      copyState(this.aStack_.pop(), this);
+      this.m_ = this.mStack_.pop();
+    }
+  };
+
+  function matrixIsFinite(m) {
+    return isFinite(m[0][0]) && isFinite(m[0][1]) &&
+        isFinite(m[1][0]) && isFinite(m[1][1]) &&
+        isFinite(m[2][0]) && isFinite(m[2][1]);
+  }
+
+  function setM(ctx, m, updateLineScale) {
+    if (!matrixIsFinite(m)) {
+      return;
+    }
+    ctx.m_ = m;
+
+    if (updateLineScale) {
+      // Get the line scale.
+      // Determinant of this.m_ means how much the area is enlarged by the
+      // transformation. So its square root can be used as a scale factor
+      // for width.
+      var det = m[0][0] * m[1][1] - m[0][1] * m[1][0];
+      ctx.lineScale_ = sqrt(abs(det));
+    }
+  }
+
+  contextPrototype.translate = function(aX, aY) {
+    var m1 = [
+      [1,  0,  0],
+      [0,  1,  0],
+      [aX, aY, 1]
+    ];
+
+    setM(this, matrixMultiply(m1, this.m_), false);
+  };
+
+  contextPrototype.rotate = function(aRot) {
+    var c = mc(aRot);
+    var s = ms(aRot);
+
+    var m1 = [
+      [c,  s, 0],
+      [-s, c, 0],
+      [0,  0, 1]
+    ];
+
+    setM(this, matrixMultiply(m1, this.m_), false);
+  };
+
+  contextPrototype.scale = function(aX, aY) {
+    this.arcScaleX_ *= aX;
+    this.arcScaleY_ *= aY;
+    var m1 = [
+      [aX, 0,  0],
+      [0,  aY, 0],
+      [0,  0,  1]
+    ];
+
+    setM(this, matrixMultiply(m1, this.m_), true);
+  };
+
+  contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) {
+    var m1 = [
+      [m11, m12, 0],
+      [m21, m22, 0],
+      [dx,  dy,  1]
+    ];
+
+    setM(this, matrixMultiply(m1, this.m_), true);
+  };
+
+  contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) {
+    var m = [
+      [m11, m12, 0],
+      [m21, m22, 0],
+      [dx,  dy,  1]
+    ];
+
+    setM(this, m, true);
+  };
+
+  /**
+   * The text drawing function.
+   * The maxWidth argument isn't taken in account, since no browser supports
+   * it yet.
+   */
+  contextPrototype.drawText_ = function(text, x, y, maxWidth, stroke) {
+    var m = this.m_,
+        delta = 1000,
+        left = 0,
+        right = delta,
+        offset = {x: 0, y: 0},
+        lineStr = [];
+
+    var fontStyle = getComputedStyle(processFontStyle(this.font),
+                                     this.element_);
+
+    var fontStyleString = buildStyle(fontStyle);
+
+    var elementStyle = this.element_.currentStyle;
+    var textAlign = this.textAlign.toLowerCase();
+    switch (textAlign) {
+      case 'left':
+      case 'center':
+      case 'right':
+        break;
+      case 'end':
+        textAlign = elementStyle.direction == 'ltr' ? 'right' : 'left';
+        break;
+      case 'start':
+        textAlign = elementStyle.direction == 'rtl' ? 'right' : 'left';
+        break;
+      default:
+        textAlign = 'left';
+    }
+
+    // 1.75 is an arbitrary number, as there is no info about the text baseline
+    switch (this.textBaseline) {
+      case 'hanging':
+      case 'top':
+        offset.y = fontStyle.size / 1.75;
+        break;
+      case 'middle':
+        break;
+      default:
+      case null:
+      case 'alphabetic':
+      case 'ideographic':
+      case 'bottom':
+        offset.y = -fontStyle.size / 2.25;
+        break;
+    }
+
+    switch(textAlign) {
+      case 'right':
+        left = delta;
+        right = 0.05;
+        break;
+      case 'center':
+        left = right = delta / 2;
+        break;
+    }
+
+    var d = getCoords(this, x + offset.x, y + offset.y);
+
+    lineStr.push('<g_vml_:line from="', -left ,' 0" to="', right ,' 0.05" ',
+                 ' coordsize="100 100" coordorigin="0 0"',
+                 ' filled="', !stroke, '" stroked="', !!stroke,
+                 '" style="position:absolute;width:1px;height:1px;">');
+
+    if (stroke) {
+      appendStroke(this, lineStr);
+    } else {
+      // TODO: Fix the min and max params.
+      appendFill(this, lineStr, {x: -left, y: 0},
+                 {x: right, y: fontStyle.size});
+    }
+
+    var skewM = m[0][0].toFixed(3) + ',' + m[1][0].toFixed(3) + ',' +
+                m[0][1].toFixed(3) + ',' + m[1][1].toFixed(3) + ',0,0';
+
+    var skewOffset = mr(d.x / Z) + ',' + mr(d.y / Z);
+
+    lineStr.push('<g_vml_:skew on="t" matrix="', skewM ,'" ',
+                 ' offset="', skewOffset, '" origin="', left ,' 0" />',
+                 '<g_vml_:path textpathok="true" />',
+                 '<g_vml_:textpath on="true" string="',
+                 encodeHtmlAttribute(text),
+                 '" style="v-text-align:', textAlign,
+                 ';font:', encodeHtmlAttribute(fontStyleString),
+                 '" /></g_vml_:line>');
+
+    this.element_.insertAdjacentHTML('beforeEnd', lineStr.join(''));
+  };
+
+  contextPrototype.fillText = function(text, x, y, maxWidth) {
+    this.drawText_(text, x, y, maxWidth, false);
+  };
+
+  contextPrototype.strokeText = function(text, x, y, maxWidth) {
+    this.drawText_(text, x, y, maxWidth, true);
+  };
+
+  contextPrototype.measureText = function(text) {
+    if (!this.textMeasureEl_) {
+      var s = '<span style="position:absolute;' +
+          'top:-20000px;left:0;padding:0;margin:0;border:none;' +
+          'white-space:pre;"></span>';
+      this.element_.insertAdjacentHTML('beforeEnd', s);
+      this.textMeasureEl_ = this.element_.lastChild;
+    }
+    var doc = this.element_.ownerDocument;
+    this.textMeasureEl_.innerHTML = '';
+    this.textMeasureEl_.style.font = this.font;
+    // Don't use innerHTML or innerText because they allow markup/whitespace.
+    this.textMeasureEl_.appendChild(doc.createTextNode(text));
+    return {width: this.textMeasureEl_.offsetWidth};
+  };
+
+  /******** STUBS ********/
+  contextPrototype.clip = function() {
+    // TODO: Implement
+  };
+
+  contextPrototype.arcTo = function() {
+    // TODO: Implement
+  };
+
+  contextPrototype.createPattern = function(image, repetition) {
+    return new CanvasPattern_(image, repetition);
+  };
+
+  // Gradient / Pattern Stubs
+  function CanvasGradient_(aType) {
+    this.type_ = aType;
+    this.x0_ = 0;
+    this.y0_ = 0;
+    this.r0_ = 0;
+    this.x1_ = 0;
+    this.y1_ = 0;
+    this.r1_ = 0;
+    this.colors_ = [];
+  }
+
+  CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) {
+    aColor = processStyle(aColor);
+    this.colors_.push({offset: aOffset,
+                       color: aColor.color,
+                       alpha: aColor.alpha});
+  };
+
+  function CanvasPattern_(image, repetition) {
+    assertImageIsValid(image);
+    switch (repetition) {
+      case 'repeat':
+      case null:
+      case '':
+        this.repetition_ = 'repeat';
+        break
+      case 'repeat-x':
+      case 'repeat-y':
+      case 'no-repeat':
+        this.repetition_ = repetition;
+        break;
+      default:
+        throwException('SYNTAX_ERR');
+    }
+
+    this.src_ = image.src;
+    this.width_ = image.width;
+    this.height_ = image.height;
+  }
+
+  function throwException(s) {
+    throw new DOMException_(s);
+  }
+
+  function assertImageIsValid(img) {
+    if (!img || img.nodeType != 1 || img.tagName != 'IMG') {
+      throwException('TYPE_MISMATCH_ERR');
+    }
+    if (img.readyState != 'complete') {
+      throwException('INVALID_STATE_ERR');
+    }
+  }
+
+  function DOMException_(s) {
+    this.code = this[s];
+    this.message = s +': DOM Exception ' + this.code;
+  }
+  var p = DOMException_.prototype = new Error;
+  p.INDEX_SIZE_ERR = 1;
+  p.DOMSTRING_SIZE_ERR = 2;
+  p.HIERARCHY_REQUEST_ERR = 3;
+  p.WRONG_DOCUMENT_ERR = 4;
+  p.INVALID_CHARACTER_ERR = 5;
+  p.NO_DATA_ALLOWED_ERR = 6;
+  p.NO_MODIFICATION_ALLOWED_ERR = 7;
+  p.NOT_FOUND_ERR = 8;
+  p.NOT_SUPPORTED_ERR = 9;
+  p.INUSE_ATTRIBUTE_ERR = 10;
+  p.INVALID_STATE_ERR = 11;
+  p.SYNTAX_ERR = 12;
+  p.INVALID_MODIFICATION_ERR = 13;
+  p.NAMESPACE_ERR = 14;
+  p.INVALID_ACCESS_ERR = 15;
+  p.VALIDATION_ERR = 16;
+  p.TYPE_MISMATCH_ERR = 17;
+
+  // set up externs
+  G_vmlCanvasManager = G_vmlCanvasManager_;
+  CanvasRenderingContext2D = CanvasRenderingContext2D_;
+  CanvasGradient = CanvasGradient_;
+  CanvasPattern = CanvasPattern_;
+  DOMException = DOMException_;
+})();
+
+} // if
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/grid.locale-en.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/grid.locale-en.js b/pulse/src/main/webapp/scripts/lib/grid.locale-en.js
new file mode 100644
index 0000000..e3fa2fd
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/grid.locale-en.js
@@ -0,0 +1,169 @@
+;(function($){
+/**
+ * jqGrid English Translation
+ * Tony Tomov tony@trirand.com
+ * http://trirand.com/blog/ 
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+**/
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+	defaults : {
+		recordtext: "View {0} - {1} of {2}",
+		emptyrecords: "No records to view",
+		loadtext: "Loading...",
+		pgtext : "Page {0} of {1}"
+	},
+	search : {
+		caption: "Search...",
+		Find: "Find",
+		Reset: "Reset",
+		odata : ['equal', 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain'],
+		groupOps: [	{ op: "AND", text: "all" },	{ op: "OR",  text: "any" }	],
+		matchText: " match",
+		rulesText: " rules"
+	},
+	edit : {
+		addCaption: "Add Record",
+		editCaption: "Edit Record",
+		bSubmit: "Submit",
+		bCancel: "Cancel",
+		bClose: "Close",
+		saveData: "Data has been changed! Save changes?",
+		bYes : "Yes",
+		bNo : "No",
+		bExit : "Cancel",
+		msg: {
+			required:"Field is required",
+			number:"Please, enter valid number",
+			minValue:"value must be greater than or equal to ",
+			maxValue:"value must be less than or equal to",
+			email: "is not a valid e-mail",
+			integer: "Please, enter valid integer value",
+			date: "Please, enter valid date value",
+			url: "is not a valid URL. Prefix required ('http://' or 'https://')",
+			nodefined : " is not defined!",
+			novalue : " return value is required!",
+			customarray : "Custom function should return array!",
+			customfcheck : "Custom function should be present in case of custom checking!"
+			
+		}
+	},
+	view : {
+		caption: "View Record",
+		bClose: "Close"
+	},
+	del : {
+		caption: "Delete",
+		msg: "Delete selected record(s)?",
+		bSubmit: "Delete",
+		bCancel: "Cancel"
+	},
+	nav : {
+		edittext: "",
+		edittitle: "Edit selected row",
+		addtext:"",
+		addtitle: "Add new row",
+		deltext: "",
+		deltitle: "Delete selected row",
+		searchtext: "",
+		searchtitle: "Find records",
+		refreshtext: "",
+		refreshtitle: "Reload Grid",
+		alertcap: "Warning",
+		alerttext: "Please, select row",
+		viewtext: "",
+		viewtitle: "View selected row"
+	},
+	col : {
+		caption: "Select columns",
+		bSubmit: "Ok",
+		bCancel: "Cancel"
+	},
+	errors : {
+		errcap : "Error",
+		nourl : "No url is set",
+		norecords: "No records to process",
+		model : "Length of colNames <> colModel!"
+	},
+	formatter : {
+		integer : {thousandsSeparator: ",", defaultValue: '0'},
+		number : {decimalSeparator:".", thousandsSeparator: ",", decimalPlaces: 2, defaultValue: '0.00'},
+		currency : {decimalSeparator:".", thousandsSeparator: ",", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
+		date : {
+			dayNames:   [
+				"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat",
+				"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
+			],
+			monthNames: [
+				"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+				"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+			],
+			AmPm : ["am","pm","AM","PM"],
+			S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th';},
+			srcformat: 'Y-m-d',
+			newformat: 'n/j/Y',
+			masks : {
+				// see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
+				// and see http://docs.jquery.com/UI/Datepicker/formatDate
+				// and https://github.com/jquery/globalize#dates for alternative formats used frequently
+				// one can find on https://github.com/jquery/globalize/tree/master/lib/cultures many
+				// information about date, time, numbers and currency formats used in different countries
+				// one should just convert the information in PHP format
+				ISO8601Long:"Y-m-d H:i:s",
+				ISO8601Short:"Y-m-d",
+				// short date:
+				//    n - Numeric representation of a month, without leading zeros
+				//    j - Day of the month without leading zeros
+				//    Y - A full numeric representation of a year, 4 digits
+				// example: 3/1/2012 which means 1 March 2012
+				ShortDate: "n/j/Y", // in jQuery UI Datepicker: "M/d/yyyy"
+				// long date:
+				//    l - A full textual representation of the day of the week
+				//    F - A full textual representation of a month
+				//    d - Day of the month, 2 digits with leading zeros
+				//    Y - A full numeric representation of a year, 4 digits
+				LongDate: "l, F d, Y", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy"
+				// long date with long time:
+				//    l - A full textual representation of the day of the week
+				//    F - A full textual representation of a month
+				//    d - Day of the month, 2 digits with leading zeros
+				//    Y - A full numeric representation of a year, 4 digits
+				//    g - 12-hour format of an hour without leading zeros
+				//    i - Minutes with leading zeros
+				//    s - Seconds, with leading zeros
+				//    A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+				FullDateTime: "l, F d, Y g:i:s A", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy h:mm:ss tt"
+				// month day:
+				//    F - A full textual representation of a month
+				//    d - Day of the month, 2 digits with leading zeros
+				MonthDay: "F d", // in jQuery UI Datepicker: "MMMM dd"
+				// short time (without seconds)
+				//    g - 12-hour format of an hour without leading zeros
+				//    i - Minutes with leading zeros
+				//    A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+				ShortTime: "g:i A", // in jQuery UI Datepicker: "h:mm tt"
+				// long time (with seconds)
+				//    g - 12-hour format of an hour without leading zeros
+				//    i - Minutes with leading zeros
+				//    s - Seconds, with leading zeros
+				//    A - Uppercase Ante meridiem and Post meridiem (AM or PM)
+				LongTime: "g:i:s A", // in jQuery UI Datepicker: "h:mm:ss tt"
+				SortableDateTime: "Y-m-d\\TH:i:s",
+				UniversalSortableDateTime: "Y-m-d H:i:sO",
+				// month with year
+				//    Y - A full numeric representation of a year, 4 digits
+				//    F - A full textual representation of a month
+				YearMonth: "F, Y" // in jQuery UI Datepicker: "MMMM, yyyy"
+			},
+			reformatAfterEdit : false
+		},
+		baseLinkUrl: '',
+		showAction: '',
+		target: '',
+		checkbox : {disabled:true},
+		idName : 'id'
+	}
+});
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/html5.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/html5.js b/pulse/src/main/webapp/scripts/lib/html5.js
new file mode 100644
index 0000000..74c9564
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/html5.js
@@ -0,0 +1,3 @@
+/*! HTML5 Shiv pre3.5 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+  Uncompressed source: https://github.com/aFarkas/html5shiv  */
+(function(a,b){function h(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function i(){var a=l.elements;return typeof a=="string"?a.split(" "):a}function j(a){var b={},c=a.createElement,f=a.createDocumentFragment,g=f();a.createElement=function(a){l.shivMethods||c(a);var f;return b[a]?f=b[a].cloneNode():e.test(a)?f=(b[a]=c(a)).cloneNode():f=c(a),f.canHaveChildren&&!d.test(a)?g.appendChild(f):f},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(a){return b[a]=c(a),g.createElement(a),'c("'+a+'")'})+");return n}")(l,g)}function k(a){var b;return a.documentShived?a:(l.shivCSS&&!f&&(b=!!h(a,"article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio{display:none}canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden]{display:
 none}audio[controls]{display:inline-block;*display:inline;*zoom:1}mark{background:#FF0;color:#000}")),g||(b=!j(a)),b&&(a.documentShived=b),a)}function p(a){var b,c=a.getElementsByTagName("*"),d=c.length,e=RegExp("^(?:"+i().join("|")+")$","i"),f=[];while(d--)b=c[d],e.test(b.nodeName)&&f.push(b.applyElement(q(b)));return f}function q(a){var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(n+":"+a.nodeName);while(d--)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function r(a){var b,c=a.split("{"),d=c.length,e=RegExp("(^|[\\s,>+~])("+i().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),f="$1"+n+"\\:$2";while(d--)b=c[d]=c[d].split("}"),b[b.length-1]=b[b.length-1].replace(e,f),c[d]=b.join("}");return c.join("{")}function s(a){var b=a.length;while(b--)a[b].removeNode()}function t(a){var b,c,d=a.namespaces,e=a.parentWindow;return!o||a.printShived?a:(typeof d[n]=="undefined"&&d.add(n),e.attachEvent("onbeforeprint",function(){var d,e,f,g=
 a.styleSheets,i=[],j=g.length,k=Array(j);while(j--)k[j]=g[j];while(f=k.pop())if(!f.disabled&&m.test(f.media)){for(d=f.imports,j=0,e=d.length;j<e;j++)k.push(d[j]);try{i.push(f.cssText)}catch(l){}}i=r(i.reverse().join("")),c=p(a),b=h(a,i)}),e.attachEvent("onafterprint",function(){s(c),b.removeNode(!0)}),a.printShived=!0,a)}var c=a.html5||{},d=/^<|^(?:button|form|map|select|textarea|object|iframe)$/i,e=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,f,g;(function(){var c=b.createElement("a");c.innerHTML="<xyz></xyz>",f="hidden"in c,f&&typeof injectElementWithStyles=="function"&&injectElementWithStyles("#modernizr{}",function(b){b.hidden=!0,f=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).display=="none"}),g=c.childNodes.length==1||function(){try{b.createElement("a")}catch(a){return!0}var c=b.createDocumentFragment();return typeo
 f c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()})();var l={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:k};a.html5=l,k(b);var m=/^$|\b(?:all|print)\b/,n="html5shiv",o=!g&&function(){var c=b.documentElement;return typeof b.namespaces!="undefined"&&typeof b.parentWindow!="undefined"&&typeof c.applyElement!="undefined"&&typeof c.removeNode!="undefined"&&typeof a.attachEvent!="undefined"}();l.type+=" print",l.shivPrint=t,t(b)})(this,document)
\ No newline at end of file


[67/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/GfshVersion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/GfshVersion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/GfshVersion.java
deleted file mode 100644
index 9215598..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/GfshVersion.java
+++ /dev/null
@@ -1,455 +0,0 @@
-/*
- *  =========================================================================
- *  Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *  ========================================================================
- */
-package com.gemstone.gemfire.internal.tools.gfsh.app;
-
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.InetAddress;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.internal.ClassPathLoader;
-import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-
-/**
- * This class provides build and version information about gfsh.
- * It gathers this information from the resource property file
- * for this class.
- * 
- * @author abhishek
- */
-/* This class has most of the code 'copied' from GemFireVersion.java.
- * The differences are:
- * 1. RESOURCE_NAME is "GfshVersion.properties";
- * 2. Uses same error strings as GemFireVersion - only resource name/path differs
- * 3. Methods asString & print accept different argument and have slightly 
- * different behaviour. 
- */
-public class GfshVersion {
-  protected static String RESOURCE_NAME = "GfshVersion.properties";
-
-  private static final Pattern MAJOR_MINOR = Pattern.compile("(\\d+)\\.(\\d*)(.*)");
-  
-  /** The singleton instance */
-  private static GfshVersion instance;
-
-  /** Constant for the GemFire version Resource Property entry */
-  private static final String PRODUCT_NAME = "Product-Name";
-
-  /** Constant for the GemFire version Resource Property entry */
-  private static final String PRODUCT_VERSION = "Product-Version";
-
-  /** Constant for the source code date Resource Property entry */
-  private static final String SOURCE_DATE = "Source-Date";
-
-  /** Constant for the source code revision Resource Property entry */
-  private static final String SOURCE_REVISION = "Source-Revision";
-
-  /** Constant for the source code repository Resource Property entry */
-  private static final String SOURCE_REPOSITORY = "Source-Repository";
-
-  /** Constant for the build date Resource Property entry */
-  private static final String BUILD_DATE = "Build-Date";
-
-  /** Constant for the build id Resource Property entry */
-  private static final String BUILD_ID = "Build-Id";
-
-  /** Constant for the build Java version Resource Property entry */
-  private static final String BUILD_PLATFORM = "Build-Platform";
-
-  /** Constant for the build Java version Resource Property entry */
-  private static final String BUILD_JAVA_VERSION = "Build-Java-Version";
-  
-  ////////////////////  Instance Fields  ////////////////////
-  
-  /** Error message to display instead of the version information */
-  private String error = null;
-
-  /** The name of this product */
-  private String productName;
-
-  /** This product's version */
-  private String gfshVersion;
-
-  /** The date that the source code for GemFire was last updated */  
-  private String sourceDate;
-
-  /** The revision of the source code used to build GemFire */  
-  private String sourceRevision;
-
-  /** The repository in which the source code for GemFire resides */  
-  private String sourceRepository;
-
-  /** The date on which GemFire was built */
-  private String buildDate;
-
-  /** The ID of the GemFire build */
-  private String buildId;
-
-  /** The platform on which GemFire was built */
-  private String buildPlatform;
-
-  /** The version of Java that was used to build GemFire */
-  private String buildJavaVersion;  
-  
-  /* Just to log gfsh jar version in GemFire Server logs */  
-  static {
-    try {
-      Cache cache = CacheFactory.getAnyInstance();
-      if (cache != null && cache.isServer() && cache.getLogger() != null) {
-        cache.getLogger().config("gfsh version: " + getJavaCodeVersion());
-      }
-    } catch (CacheClosedException e) {
-      // Ignore, this is just to get handle on log writer.
-    }
-  }
-  
-  ////////////////////  Constructor  ////////////////////
-
-  /**
-   * Private constructor that read the resource properties
-   * and extracts interesting pieces of information from it
-   */
-  private GfshVersion() {
-    String gfeVersionPath  = GemFireVersion.class.getPackage().getName().replace('.', '/');    
-    String gfshVersionPath = GfshVersion.class.getPackage().getName().replace('.', '/');    
-    gfshVersionPath = gfshVersionPath + "/" + RESOURCE_NAME;
-    
-    String xtraGfshVersionPath = gfshVersionPath.substring(gfeVersionPath.length() + 1);
-    
-    InputStream is = ClassPathLoader.getLatest().getResourceAsStream(getClass(), gfshVersionPath);
-    if (is == null) {
-      error = LocalizedStrings.GemFireVersion_COULD_NOT_FIND_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_0.toLocalizedString(xtraGfshVersionPath);
-      return;
-    }
-
-    Properties props = new Properties();
-    try {
-      props.load(is);
-    } catch (Exception ex) {
-      error = LocalizedStrings.GemFireVersion_COULD_NOT_READ_PROPERTIES_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_0_BECAUSE_1.toLocalizedString(new Object[] {xtraGfshVersionPath, ex});
-      return;
-    }
-    
-    this.productName = props.getProperty(PRODUCT_NAME);
-    if (this.productName == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {PRODUCT_NAME, xtraGfshVersionPath});
-      return;
-    }
-    this.gfshVersion = props.getProperty(PRODUCT_VERSION);
-    if (this.gfshVersion == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {PRODUCT_VERSION, xtraGfshVersionPath});
-      return;
-    }
-    this.sourceDate = props.getProperty(SOURCE_DATE);
-    if (this.sourceDate == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {SOURCE_DATE, xtraGfshVersionPath});
-      return;
-    }
-    this.sourceRevision = props.getProperty(SOURCE_REVISION);
-    if (this.sourceRevision == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {SOURCE_REVISION, xtraGfshVersionPath});
-      return;
-    }
-    this.sourceRepository = props.getProperty(SOURCE_REPOSITORY);
-    if (this.sourceRepository == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {SOURCE_REPOSITORY, xtraGfshVersionPath});
-      return;
-    }
-    this.buildDate = props.getProperty(BUILD_DATE);
-    if (this.buildDate == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {BUILD_DATE, xtraGfshVersionPath});
-      return;
-    }
-    this.buildId = props.getProperty(BUILD_ID);
-    if (this.buildId == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {BUILD_ID, xtraGfshVersionPath});
-      return;
-    }
-    this.buildPlatform = props.getProperty(BUILD_PLATFORM);
-    if (this.buildPlatform == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {BUILD_PLATFORM, xtraGfshVersionPath});
-      return;
-    }
-    this.buildJavaVersion = props.getProperty(BUILD_JAVA_VERSION);
-    if (this.buildJavaVersion == null) {
-      error = LocalizedStrings.GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1.toLocalizedString(new Object[] {BUILD_JAVA_VERSION, xtraGfshVersionPath});
-      return;
-    }
-  }
-  
-  ////////////////////  Static Methods  ////////////////////
-
-  /**
-   * Returns (or creates) the singleton instance of this class
-   */
-  private static GfshVersion getInstance() {
-    if (instance == null) {
-      instance = new GfshVersion();
-    }
-
-    return instance;
-  }
-
-  /**
-   * Returns the name of this product
-   */
-  public static String getProductName() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.productName;
-    }
-  }
-
-  /**
-   * Returns the version of GemFire being used
-   */
-  public static String getGfshVersion() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.gfshVersion;
-    }
-  }
-
-  public static String getJavaCodeVersion() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      StringBuilder result = new StringBuilder(80);
-      result.append(GfshVersion.getGfshVersion())
-        .append(' ')
-        .append(GfshVersion.getBuildId())
-        .append(' ')
-        .append(GfshVersion.getBuildDate())
-        .append(" javac ")
-        .append(GfshVersion.getBuildJavaVersion());
-      return result.toString();
-    }
-  }
-
-  /**
-   * Returns the date of the source code from which GemFire was built
-   */
-  public static String getSourceDate() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.sourceDate;
-    }
-  }
-
-  /**
-   * Returns the revision of the source code on which GemFire was
-   * built.
-   *
-   */
-  public static String getSourceRevision() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.sourceRevision;
-    }
-  }
-
-  /**
-   * Returns the source code repository from which GemFire was built.
-   *
-   */
-  public static String getSourceRepository() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.sourceRepository;
-    }
-  }
-
-  /**
-   * Returns the date on which GemFire was built
-   */
-  public static String getBuildDate() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.buildDate;
-    }
-  }
-
-  /**
-   * Returns the id of the GemFire build
-   */
-  public static String getBuildId() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.buildId;
-    }
-  }
-
-  /**
-   * Returns the platform on which GemFire was built
-   */
-  public static String getBuildPlatform() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.buildPlatform;
-    }
-  }
-
-  /**
-   * Returns the version of Java used to build GemFire
-   */
-  public static String getBuildJavaVersion() {
-    GfshVersion v = getInstance();
-    if (v.error != null) {
-      return v.error;
-
-    } else {
-      return v.buildJavaVersion;
-    }
-  }
-  
-  /**
-   * Encodes all available version information into a string and then
-   * returns that string.
-   * 
-   * @param printSourceInfo
-   *        Should information about the source code be printed?
-   */
-  public static String asString(boolean printSourceInfo) {
-    StringWriter sw = new StringWriter(256);
-    PrintWriter pw = new PrintWriter(sw);
-    print(pw, printSourceInfo);
-    pw.flush();
-    return sw.toString();
-  }
-
-  /**
-   * Prints all available version information to the given
-   * <code>PrintWriter</code> in a standard format.
-   * 
-   * @param pw
-   *          writer to write version info to
-   * @param printSourceInfo
-   *          Should information about the source code be printed?
-   */
-  protected static void print(PrintWriter pw, boolean printSourceInfo) {
-    String jarVersion = GfshVersion.getJavaCodeVersion().trim();
-    pw.println(getProductName() + " version: " + jarVersion);
-
-    /*
-     * TODO: GemFireVersion here compares the version info read by
-     * GemFireVersion and available in product/lib directory. The 'version
-     * CREATE' option to create the gfsh version file is not added currently. As
-     * gfsh releases could be different than GemFire release, could we still use
-     * product/lib?
-     */
-
-    if (printSourceInfo) {
-      String sourceRevision = GfshVersion.getSourceRevision();
-      pw.println("Source revision: " + sourceRevision);
-
-      String sourceRepository = GfshVersion.getSourceRepository();
-      pw.println("Source repository: " + sourceRepository);
-    }
-
-    InetAddress host = null;
-    try {
-      host = SocketCreator.getLocalHost();
-    } catch (VirtualMachineError err) {
-      SystemFailure.initiateFailure(err);
-      // If this ever returns, rethrow the error. We're poisoned
-      // now, so don't let this thread continue.
-      throw err;
-    } catch (Throwable t) {
-      // Whenever you catch Error or Throwable, you must also
-      // catch VirtualMachineError (see above). However, there is
-      // _still_ a possibility that you are dealing with a cascading
-      // error condition, so you also need to check to see if the JVM
-      // is still usable:
-      SystemFailure.checkFailure();
-    }
-
-    int cpuCount = Runtime.getRuntime().availableProcessors();
-    pw.println(LocalizedStrings.GemFireVersion_RUNNING_ON_0
-        .toLocalizedString(host + ", " + cpuCount + " cpu(s)" + ", "
-            + System.getProperty("os.arch") + " "
-            + System.getProperty("os.name") + " "
-            + System.getProperty("os.version")));
-
-    pw.flush();
-  }
-
-  public static int getMajorVersion(String v) {
-    int majorVersion = 0;
-    Matcher m = MAJOR_MINOR.matcher(v);
-    if (m.matches()) {
-      String digits = m.group(1);
-      if (digits != null && digits.length() > 0) {
-        majorVersion = Integer.decode(digits).intValue();
-      }
-    }
-    return majorVersion;
-  }
-
-  public static int getMinorVersion(String v) {
-    int minorVersion = 0;
-    Matcher m = MAJOR_MINOR.matcher(v);
-    if (m.matches()) {
-      String digits = m.group(2);
-      if (digits != null && digits.length() > 0) {
-        minorVersion = Integer.decode(digits).intValue();
-      }
-    }
-    return minorVersion;
-  }
-  
-  ///////////////////////  Main Program  ////////////////////
-
-  /**
-   * Populates the gemfireVersion.properties file
-   */
-  public final static void main(String args[]) {    
-//    System.out.println("-------------------------------------------------");
-//    
-//    System.out.println(asString(false));
-//    
-//    System.out.println("-------------------------------------------------");
-//    
-    System.out.println(asString(true));    
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/Nextable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/Nextable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/Nextable.java
deleted file mode 100644
index 54b9c22..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/Nextable.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app;
-
-import java.util.List;
-
-public interface Nextable
-{
-	List next(Object arg) throws Exception;
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/ServerExecutable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/ServerExecutable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/ServerExecutable.java
deleted file mode 100644
index 9ad2f6a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/ServerExecutable.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app;
-
-public interface ServerExecutable
-{
-	Object execute(String command, String regionPath, Object arg) throws Exception;
-	
-	byte getCode();
-	
-	String getCodeMessage();
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregateFunctionTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregateFunctionTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregateFunctionTask.java
deleted file mode 100644
index 7b3eb4f..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregateFunctionTask.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.aggregator;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.command.AbstractCommandTask;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-/**
- * AggregateFunctionTask is used by Aggregator.
- * 
- * @author dpark
- */
-public class AggregateFunctionTask extends AbstractCommandTask 
-{
-	private static final long serialVersionUID = 1L;
-	
-	private String regionFullPath;
-	private AggregateFunction function;
-	
-	// Default constructor required for serialization
-	public AggregateFunctionTask()
-	{
-	}
-	
-	public AggregateFunctionTask(AggregateFunction function, String regionFullPath)
-	{
-		this.function = function;
-		this.regionFullPath = regionFullPath;
-	}
-	
-	public CommandResults runTask(Object userData) 
-	{
-		CommandResults results = new CommandResults();
-		try {
-			AggregatorPeer aggregator = new AggregatorPeer(regionFullPath);
-			results.setDataObject(aggregator.aggregate(function));
-		} catch (Exception ex) {
-			results.setCode(CommandResults.CODE_ERROR);
-			results.setException(ex);
-		}
-		return results;
-	}
-
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException 
-	{
-		super.fromData(input);
-		regionFullPath = DataSerializer.readString(input);
-		function = (AggregateFunction)DataSerializer.readObject(input);
-	}
-
-	public void toData(DataOutput output) throws IOException 
-	{
-		super.toData(output);
-		DataSerializer.writeString(regionFullPath, output);
-		DataSerializer.writeObject(function, output);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/Aggregator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/Aggregator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/Aggregator.java
deleted file mode 100644
index e09d72c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/Aggregator.java
+++ /dev/null
@@ -1,549 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.aggregator;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.CommandClient;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.CommandException;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-
-/**
- * Aggregator invokes a specified aggregate function on a specified region.
- * Aggregator works only in the client/server topology. As such, it requires endpoints
- * that specifies one or more cache servers to connect to. It also requires 
- * the full path of a command region with which it will communicate with the
- * cache server(s) listed in the endpoints. The command region path must be
- * unique per distributed system. If there are multiple distributed systems
- * that an aggregation needs to be performed on, then the command region
- * path must be unique for each distributed system. For example, given DS1
- * and DS2, DS1 can be assigned to "/command1" and DS2 to "/command2". It is
- * not permitted to share, however, "/command1" with both distributed systems. 
- * <p>
- * Aggregator internally keeps track of all aggregators created. If an 
- * aggregator already exists under a given commandRegionFullPath, 
- * then the endpoints of the existing aggregator will be used for all 
- * subsequently created aggregators. This also applies to the aggregators created
- * by the addAggregator() method. 
- * <p>
- * To remove all aggregators, invoke the static method closeAll(). Use this 
- * method with a care. All aggregators will be closed, and hence, none of them will
- * be valid after this call.
- * 
- * @author dpark
- *
- */
-public class Aggregator
-{
-	/**
-	 * The hashmap that contains the global aggregator counts. 
-	 */
-	private static HashMap allAggregatorsMap = new HashMap();
-	
-	/**
-	 * SingleAggregator owned by this aggregator.
-	 */
-	private SingleAggregator thisAggregator;
-	
-	/**
-	 * All SingleAggregator objects added by addAggregator() and the constructor.
-	 */
-	private SingleAggregator singleAggregators[];
-	
-	/**
-	 * The aggregator map that contains all SingleAggregator objects added by 
-	 * addAggregator() and the constructor. it contains 
-	 * (commandRegionFullPath, SingleAggregator) pairs.
-	 */
-	private HashMap aggregatorMap = new HashMap(3);
-	
-	/**
-	 * The aggregate invokation timeout in msec. The default value is 30000 msec (or 30 sec).
-	 */
-	private long timeout = 30000;
-	
-	/**
-	 * Creates an aggregator with the specified command region path and endpoints.
-	 * The cache servers specified in the endpoints must have also defined 
-	 * the specified command region, otherwise, aggregate() will throw an exception.
-	 * 
-	 * @param commandRegionFullPath The full path of the command region used to
-	 *                              communicate with the cache servers listed in 
-	 *                              the endpoints. The cache servers must pre-define 
-	 *                              the command region, otherwise, aggregate() will 
-	 *                              throw an exception.
-	 * @param endpoints The endpoints of cache server(s) that host the command region.
-	 *                  The endpoints format is "end1=host1:port1,end2=host2:port2".
-	 */
-	public Aggregator(String commandRegionFullPath, String endpoints)
-	{
-		commandRegionFullPath = getCanonicalRegionPath(commandRegionFullPath);
-		thisAggregator = new SingleAggregator(commandRegionFullPath, endpoints);
-		synchronized (aggregatorMap) {
-			singleAggregators = new SingleAggregator[1];
-			singleAggregators[0] = thisAggregator;
-			aggregatorMap.put(commandRegionFullPath, thisAggregator);
-			allAggregatorsMap.put(commandRegionFullPath, new AggregatorCount(thisAggregator));
-			incrementCount(commandRegionFullPath);
-		}
-	}
-	
-	/**
-	 * Creates an aggregator with the specified command client.
-	 * The cache servers must have also defined the command region defined,
-	 * otherwise, aggregate() will throw an exception.
-	 * 
-	 * @param commandClient The command client to be used for sending aggregate requests
-	 *                      to the cache servers.
-	 */
-	public Aggregator(CommandClient commandClient)
-	{
-		thisAggregator = new SingleAggregator(commandClient);
-		String commandRegionFullPath = commandClient.getOutboxRegionFullPath();
-		synchronized (aggregatorMap) {
-			singleAggregators = new SingleAggregator[1];
-			singleAggregators[0] = thisAggregator;
-			aggregatorMap.put(commandRegionFullPath, thisAggregator);
-			allAggregatorsMap.put(commandRegionFullPath, new AggregatorCount(thisAggregator));
-			incrementCount(commandRegionFullPath);
-		}
-	}
-	
-	/**
-	 * Increments the reference count of the specified aggregator.
-	 * @param commandRegionFullPath The full path of the command region. 
-	 * @return The incremented count. Returns -1 if the specified aggregator
-	 *         does not exist.
-	 */
-	private static int incrementCount(String commandRegionFullPath)
-	{
-		AggregatorCount ac = (AggregatorCount)allAggregatorsMap.get(commandRegionFullPath);
-		if (ac == null) {
-			return -1;
-		}
-		ac.count++;
-		return ac.count;
-	}
-	
-	/**
-	 * Decrements the reference count of the specified aggregator.
-	 * If the decremented count is 0, then the aggregator is removed 
-	 * from allAggregateorsMap. The caller must close the aggregator
-	 * if the decremented count is 0.
-	 * @param commandRegionFullPath The full path of the command region. 
-	 * @return The decremented count. Returns -1 if the specified aggregator
-	 *         does not exist.
-	 */
-	private static int decrementCount(String commandRegionFullPath)
-	{
-		AggregatorCount ac = (AggregatorCount)allAggregatorsMap.get(commandRegionFullPath);
-		if (ac == null) {
-			return -1;
-		}
-		ac.count--;
-		if (ac.count <= 0) {
-			allAggregatorsMap.remove(commandRegionFullPath);
-		}
-		
-		return ac.count;
-	}
-	
-	/**
-	 * Returns the reference count of the specified aggregator.
-	 * @param commandRegionFullPath The full path of the command region. 
-	 */
-	private static int getCount(String commandRegionFullPath)
-	{
-		AggregatorCount ac = (AggregatorCount)allAggregatorsMap.get(commandRegionFullPath);
-		if (ac == null) {
-			return 0;
-		} 
-		
-		return ac.count;
-	}
-	
-	/**
-	 * Adds an aggregator. If the specified commandRegionFullPath has already been added
-	 * in this aggregator, this call is silently ignored. It is important to note that 
-	 * the specified endpoints is honored per unique commandRegionFullPath. That means 
-	 * if another aggregator is already created or added with the same commandRegionFullPath,
-	 * then that aggregator is used instead. A new aggregator will be created only if
-	 * there is no aggregator found with the same commandRegionFullPath. In other words,
-	 * the endpoints will not be assigned if there exist another aggregator that has 
-	 * the same commandRegionFullPath. It is ignored silently and the exiting aggregator
-	 * is used instead. Note that the exiting aggregator might have been assigned
-	 * to a different endpoints.  
-	 * 
-	 * @param commandRegionFullPath The full path of the command region used to
-	 *                              communicate with the cache servers listed in 
-	 *                              the endpoints. The cache servers must pre-define 
-	 *                              the command region, otherwise, aggregate() will 
-	 *                              throw an exception.
-	 * @param endpoints The endpoints of cache server(s) that host the command region.
-	 *                  The endpoints format is "end1=host1:port1,end2=host2:port2".
-	 * @throws AggregatorException Thrown if there is a cache related error. 
-	 */
-	public void addAggregator(String commandRegionFullPath, String endpoints) throws AggregatorException
-	{
-		if (isClosed()) {
-			throw new AggregatorException("Aggregator closed. Unable to add the specified aggregator. Please create a new Aggregator first.");
-		}
-		
-		synchronized (aggregatorMap) {
-			commandRegionFullPath = getCanonicalRegionPath(commandRegionFullPath);
-			SingleAggregator aggregator = (SingleAggregator)aggregatorMap.get(commandRegionFullPath);
-			if (aggregator == null) {
-				aggregator = new SingleAggregator(commandRegionFullPath, endpoints);
-				aggregatorMap.put(commandRegionFullPath, aggregator);
-				incrementCount(commandRegionFullPath);
-				allAggregatorsMap.put(commandRegionFullPath, new AggregatorCount(aggregator));
-				singleAggregators = (SingleAggregator[])aggregatorMap.values().toArray(new SingleAggregator[0]);
-			}
-		}
-	}
-	
-	/**
-	 * Removes the aggregator identified by the commandRegionFullPath from this aggregator.
-	 * @param commandRegionFullPath The full path of the command region used to
-	 *                              communicate with the cache servers listed in 
-	 *                              the endpoints.
-	 * @throws AggregatorException Thrown if there is a cache related error or
-	 *                             this aggregator's commandRegionFullPath is same
-	 *                             as the specified commandRegionFullPath. To remove
-	 *                             this aggregator, invoke close() instead.
-	 */
-	public void removeAggregator(String commandRegionFullPath) throws AggregatorException
-	{
-		commandRegionFullPath = getCanonicalRegionPath(commandRegionFullPath);
-		if (thisAggregator.getCommandRegionFullPath().equals(commandRegionFullPath)) {
-			throw new AggregatorException("Removing the primary (this) aggregator is not allowed. Please use close() instead.");
-		}
-		
-		remove(commandRegionFullPath);
-	}
-	
-	/**
-	 * Removes the specified aggregator. It closes the aggregator if the
-	 * reference count is 0.
-	 * 
-	 * @param commandRegionFullPath The full path of the command region used to
-	 *                              communicate with the cache servers listed in 
-	 *                              the endpoints.
-	 * @throws AggregatorException
-	 */
-	private void remove(String commandRegionFullPath) throws AggregatorException
-	{
-		synchronized (aggregatorMap) {
-			SingleAggregator aggregator = (SingleAggregator)aggregatorMap.remove(commandRegionFullPath);
-			if (aggregator != null) {
-				decrementCount(commandRegionFullPath);
-				if (getCount(commandRegionFullPath) <= 0) {
-					aggregator.close();
-				}
-			}
-		}
-	}
-	
-	/**
-	 * Closes this aggregator and removes all added aggregator. This aggregator
-	 * is empty upon return of this call and no longer valid. The aggregate() 
-	 * method will throw an exception if close() has been invoked.
-	 * 
-	 * @throws AggregatorException Thrown if there is a cache related error.
-	 */
-	public void close() throws AggregatorException
-	{
-		synchronized (aggregatorMap) {
-			
-			String paths[] = (String[])aggregatorMap.keySet().toArray(new String[0]);
-			for (int i = 0; i < paths.length; i++) {
-				remove(paths[i]);
-			}
-			aggregatorMap.clear();
-			singleAggregators = new SingleAggregator[0];
-			thisAggregator = null;
-		}
-	}
-	
-	/**
-	 * Returns true if this aggregator is closed. If true, then this
-	 * aggregator is no longer valid. All references to this object
-	 * should be set to null so that it can be garbage collected.
-	 * @return whether aggregator is closed
-	 */
-	public boolean isClosed()
-	{
-		return thisAggregator == null;
-	}
-	
-	/**
-	 * Closes all aggregators. All aggregators will be no longer valid
-	 * after this call.
-	 */
-	public static void closeAll()
-	{
-		AggregatorCount acs[] = (AggregatorCount[])allAggregatorsMap.keySet().toArray(new AggregatorCount[0]);
-		for (int i = 0; i < acs.length; i++) {
-			try {
-				acs[i].aggregator.close();
-			} catch (AggregatorException e) {
-				// ignore - do not throw an exception
-				// because one of them failed. continue
-				// closing all others.
-			}
-		}
-		allAggregatorsMap.clear();
-	}
-	
-	/**
-	 * Executes the specified function and returns an aggregated result defined
-	 * by the function. 
-	 * 
-	 * @param function The aggregate function to execute.
-	 * @param regionFullPath The region on which the aggregate function to be
-	 * 						 performed.
-	 * @return Returns the result from the specified function. See the function
-	 * 			definition for the return type.
-	 * @throws AggregatorException Thrown if there is a cache related error.
-	 */
-	public synchronized Object aggregate(AggregateFunction function, String regionFullPath) throws AggregatorException
-	{
-		if (isClosed()) {
-			throw new AggregatorException("Aggregator closed. Unable to aggregate. Please create a new Aggregator.");
-		}
-		
-		SingleAggregator aggregators[] = this.singleAggregators;
-
-		// If only one aggregator then no need to use separate threads.
-		// Return the result using the current thread. 
-		if (aggregators.length == 1) {
-			return aggregators[0].aggregate(function, regionFullPath);
-		}
-
-		// Need to spawn threads to parallelize the aggregate fuction
-		// execution on different distributed systems. Assign
-		// a thread per aggregator (or distributed system).
-		ArrayList resultsList = new ArrayList();
-		ArrayList exceptionList = new ArrayList();
-		long count = aggregators.length;
-		for (int i = 0; i < count; i++) {
-			new Thread(new DSAggregator(function, aggregators[i], regionFullPath, resultsList, exceptionList)).start();
-		}
-		
-		// Wait and collect results returned by all aggregators.
-		// resultsList contains results from all distributed systems.
-		boolean allResponded = false;
-		long startTime = System.currentTimeMillis();
-		do {
-			try {
-				wait(timeout);
-				synchronized (resultsList) {
-					allResponded = resultsList.size() == count;
-					if (allResponded == false) {
-						if (exceptionList.isEmpty() == false) {
-							break;
-						}
-					}
-				}
-				if (allResponded == false && System.currentTimeMillis() - startTime >= timeout) {
-					break;
-				}
-			} catch (InterruptedException e) {
-				// ignore
-			}
-		} while (allResponded == false);
-		
-		// If all responded then aggregate the results by invoking the
-		// AggregateFunction.aggregateDistributedSystems(), which is
-		// responsible for aggregating the results.
-		if (allResponded == false) {
-			
-			// Throw exception if not all responded
-			if (exceptionList.isEmpty() == false) {
-				
-				throw new AggregatorException("Distributed System Error. Errors from " 
-						+ exceptionList.size() 
-						+ " distributed system(s). See getClientExceptions()", 
-						(Throwable[])exceptionList.toArray(new Throwable[0]));
-			} else {
-				throw new AggregatorException("The aggregate operation timed out. Not all distributed systems responded within the timeout period of " + timeout + " msec.");
-			}
-		} else {
-			Object results[] = resultsList.toArray();
-			return function.aggregateDistributedSystems(results);
-		}
-	}
-	
-	/**
-	 * Returns the timeout value in msec. The default value is 30000 msec (or 30 seconds)
-	 */
-	public long getTimeout() 
-	{
-		return timeout;
-	}
-
-	/**
-	 * Sets the timeout in msec. The default value is 30000 msec (or 30 seconds)
-	 * @param timeout The timeout value in msec.
-	 */
-	public void setTimeout(long timeout) 
-	{
-		this.timeout = timeout;
-	}
-	
-	/**
-	 * Returns the full path of the command region.
-	 */
-	public String getCommandRegionFullPath()
-	{
-		return thisAggregator.getCommandRegionFullPath();
-	}
-	
-	/**
-	 * Returns the endpoints.
-	 */
-	public String getEndpoints()
-	{
-		return thisAggregator.getEndpoints();
-	}
-	
-	/**
-	 * Returns the canonical region path.
-	 * @param regionPath The region path to convert to a canonical form.
-	 */
-	private String getCanonicalRegionPath(String regionPath)
-	{
-		// Remove leading and trailing spaces.
-		regionPath = regionPath.trim();
-		
-		// must begin with '/'.
-		if (regionPath.startsWith("/") == false) {
-			regionPath = "/" + regionPath;
-		}
-		
-		return regionPath;
-	}
-	
-	/**
-	 * Notifies the results.
-	 */
-	private synchronized void notifyResults()
-	{
-		notify();
-	}
-	
-	/**
-	 * DSAggregator is a Runnable that each aggregate thread uses
-	 * to keep aggregate context information separate from others.
-	 */
-	class DSAggregator implements Runnable
-	{
-		private AggregateFunction function;
-		private SingleAggregator aggregator;
-		private ArrayList resultsList;
-		private ArrayList exceptionList;
-		private String regionFullPath;
-		
-		DSAggregator(AggregateFunction function, SingleAggregator aggregator, String regionFullPath, ArrayList resultsList, ArrayList exceptionList)
-		{
-			this.function = function;
-			this.aggregator = aggregator;
-			this.regionFullPath = regionFullPath;
-			this.resultsList = resultsList;
-			this.exceptionList = exceptionList;
-		}
-		
-		public void run()
-		{
-			try {
-				Object results = aggregator.aggregate(function, regionFullPath);
-				synchronized (resultsList) {
-					resultsList.add(results);
-				}
-				notifyResults();
-			} catch (AggregatorException ex) {
-				synchronized (resultsList) {
-					exceptionList.add(ex);
-				}
-				notifyResults();
-			}
-		}
-	}
-	
-	//FindBugs - make static inner class
-	static class AggregatorCount
-	{
-		public int count = 0;
-		public SingleAggregator aggregator;
-		
-		AggregatorCount(SingleAggregator aggregator)
-		{
-			this.aggregator = aggregator;
-		}
-	}
-}
-
-/**
- * SingleAggregator holds CommandClient information of an aggregator.
- */
-class SingleAggregator
-{
-	private CommandClient commandClient;
-	
-	SingleAggregator(String commandRegionFullPath, String endpoints)
-	{
-		commandClient = new CommandClient(commandRegionFullPath, endpoints);
-	}
-	
-	SingleAggregator(CommandClient commandClient)
-	{
-		this.commandClient = commandClient;
-	}
-	
-	/**
-	 * 
-	 * @param function
-	 * @param regionFullPath
-	 * @return Returns null of isListenerEnabled() is true. In that case, the
-	 *         aggregated results are delivered to the registered AggregatedDataListeners.
-	 * @throws AggregatorException
-	 */
-	Object aggregate(AggregateFunction function, String regionFullPath) throws AggregatorException
-	{
-		try {
-			CommandResults results = commandClient.execute(new AggregateFunctionTask(function, regionFullPath));
-			if (results.getCode() != CommandResults.CODE_NORMAL) {
-				throw new AggregatorException(results.getCodeMessage(), results.getException());
-			}
-			return results.getDataObject();
-		} catch (Exception ex) {
-			throw new AggregatorException(ex);
-		}
-	}
-	
-	String getCommandRegionFullPath()
-	{
-		return commandClient.getOutboxRegionFullPath();
-	}
-	
-	String getEndpoints()
-	{
-		return commandClient.getEndpoints();
-	}
-	
-	public void close() throws AggregatorException
-	{
-		try {
-			commandClient.close();
-		} catch (CommandException ex) {
-			throw new AggregatorException(ex);
-		}
-	}
-	
-	public boolean isClosed()
-	{
-		return commandClient.isClosed();
-	}
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregatorException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregatorException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregatorException.java
deleted file mode 100644
index 0e59aba..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregatorException.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.aggregator;
-
-/**
- * AggregatorException is thrown by Aggregator if there is
- * any error related to the aggregator.
- * 
- * @author dpark
- *
- */
-public class AggregatorException extends Exception
-{
-	private static final long serialVersionUID = 1L;
-	
-	private Throwable functionExceptions[];
-	
-    public AggregatorException()
-    {
-        super();
-    }
-    public AggregatorException(String message)
-    {
-        super(message);
-    }
-
-    public AggregatorException(String message, Throwable cause)
-    {
-        super(message, cause);
-    }
-
-    public AggregatorException(Throwable cause)
-    {
-        super(cause);
-    }
-    
-    public AggregatorException(String message, Throwable functionExceptions[])
-    {
-    	super(message);
-    	this.functionExceptions = functionExceptions;
-    }
-    
-    /**
-     * The exception caught in AggregateFunction.run().
-     * @return exception caught in AggregateFunction.run()
-     */
-    public Throwable[] getFunctionExceptions()
-    {
-    	return functionExceptions;
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregatorPeer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregatorPeer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregatorPeer.java
deleted file mode 100644
index 35f15e5..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/AggregatorPeer.java
+++ /dev/null
@@ -1,254 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.aggregator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregatorPartitionFunction;
-
-/**
- * AggregatorPeer is experimental use only. If the application is a peer member 
- * hosting the specified region, then this class may provide better performance
- * than Aggregator, which uses the client/server topology. It also does not 
- * require the command region to be created unless the method 
- * aggregate(AggregateFunction function, Aggregator aggregatorClient) is used.
- * In which case, the command region is created by Aggregator.
- * 
- * @author dpark
- *
- */
-public class AggregatorPeer
-{
-	PartitionedRegion region;
-	Execution execution;
-	
-	// 30 sec timeout;
-	private long timeout = 30000;
-	private Set routingKeySet;
-	
-	/**
-	 * Creates a AggregatorPeer object with the specified region path.
-	 * @param regionFullPath The full path of the partitioned region on 
-	 * 						which aggregation operations are to be executed. 
-	 */
-	public AggregatorPeer(String regionFullPath)
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		region = (PartitionedRegion)cache.getRegion(regionFullPath);
-		init();
-	}
-	
-	/**
-	 * Creates an AggregatorPeer object with the specified partitioned region.
-	 * @param region The partitioned region on which aggregation operations 
-	 * 				are to be executed.
-	 */
-	public AggregatorPeer(Region region)
-	{
-		this.region = (PartitionedRegion)region;
-		init();
-	}
-	
-	private void init()
-	{
-		execution = FunctionService.onMembers(region.getCache().getDistributedSystem());
-		int totalNumBuckets = region.getPartitionAttributes().getTotalNumBuckets();
-		routingKeySet = new CopyOnWriteArraySet();
-		for (int i = 0; i < totalNumBuckets; i++) {
-			routingKeySet.add(i);
-		}
-	}
-	
-	public void setRoutingKeys(Set routingKeySet)
-	{
-		this.routingKeySet = routingKeySet;
-	}
-	
-	public Set getRoutingKeys()
-	{
-		return routingKeySet;
-	}
-	
-	public Region getRegion()
-	{
-		return region;
-	}
-	
-	public Object aggregate(AggregateFunction function) throws AggregatorException
-	{
-		return aggregate(function, routingKeySet);
-	}
-	
-	/**
-	 * Executes the specified function in each of the partition buckets identified
-	 * by the specified routingKeySet. 
-	 * @param function aggregate function to execute.
-	 * @param routingKeySet A set of RoutingKey objects that identify the
-	 *                      partition buckets in which the function to be executed. 
-	 * @return Returns aggregate results. The result type is specified by the function 
-	 * 	       passed in. 
-	 * @throws AggregatorException
-	 */
-	private Object aggregate(AggregateFunction function, Set routingKeySet) throws AggregatorException
-	{
-		try {
-			Object obj = execution.withArgs(function).execute(AggregatorPartitionFunction.ID).getResult();
-			if (obj instanceof List) {
-				List list = (List)obj;
-				return function.aggregate(list);
-			} else if (obj instanceof Map) {
-				// GFE 6.3 support
-				Map map = (Map)obj;
-				ArrayList list = new ArrayList();
-				Collection<List> col = map.values();
-				for (List list2 : col) {
-					list.addAll(list2);
-				}
-				return function.aggregate(list);
-			} else {
-				throw new AggregatorException("Unsupported aggregate result type: " + obj.getClass().getName());
-			}
-		} catch (Exception ex) {
-			throw new AggregatorException(ex);
-		}
-	}
-
-	public synchronized Object aggregate(AggregateFunction function, Aggregator aggregatorClient)  throws AggregatorException
-	{
-		if (aggregatorClient == null) {
-			return aggregate(function);
-		} else {
-			ArrayList resultsList = new ArrayList();
-			ArrayList exceptionList = new ArrayList();
-			long count = 2;
-			new Thread(new LocalAggregator(function, resultsList, exceptionList)).start();
-			
-			for (int i = 0; i < count - 1; i++) {
-				new Thread(new DSAggregator(function, aggregatorClient, resultsList, exceptionList)).start();
-			}
-			boolean allResponded = false;
-			long startTime = System.currentTimeMillis();
-			do {
-				try {
-					wait(timeout);
-					synchronized (resultsList) {
-						allResponded = resultsList.size() == count;
-						if (allResponded == false) {
-							if (exceptionList.isEmpty() == false) {
-								break;
-							}
-						}
-					}
-					if (allResponded == false && System.currentTimeMillis() - startTime >= timeout) {
-						break;
-					}
-				} catch (InterruptedException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
-			} while (allResponded == false);
-			
-			if (allResponded == false) {
-				if (exceptionList.isEmpty() == false) {
-					
-					throw new AggregatorException("Distributed System Error. Errors from " 
-							+ exceptionList.size() 
-							+ " distributed system(s). See getClientExceptions()", 
-							(Throwable[])exceptionList.toArray(new Throwable[0]));
-				} else {
-					throw new AggregatorException("The aggregate operation timedout. Not all distributed systems responded within the timeout period of " + timeout + " msec.");
-				}
-			} else {
-				Object results[] = resultsList.toArray();
-				return function.aggregateDistributedSystems(results);
-			}
-		}
-	}
-	
-	public long getTimeout() 
-	{
-		return timeout;
-	}
-
-	public void setTimeout(long timeout) 
-	{
-		this.timeout = timeout;
-	}
-	
-	private synchronized void notifyResults()
-	{
-		notify();
-	}
-	
-	class LocalAggregator implements Runnable
-	{
-		private AggregateFunction function;
-		private ArrayList resultsList;
-		private ArrayList exceptionList;
-		
-		LocalAggregator(AggregateFunction function, ArrayList resultsList, ArrayList exceptionList)
-		{
-			this.function = function;
-			this.resultsList = resultsList;
-			this.exceptionList = exceptionList;
-		}
-		
-		public void run()
-		{
-			try {
-				Object results = aggregate(function);
-				synchronized (resultsList) {
-					resultsList.add(results);
-				}
-				notifyResults();
-			} catch (AggregatorException ex) {
-				synchronized (resultsList) {
-					exceptionList.add(ex);
-				}
-				notifyResults();
-			}
-		}
-	}
-	
-	class DSAggregator implements Runnable
-	{
-		private AggregateFunction function;
-		private Aggregator aggregatorClient;
-		private ArrayList resultsList;
-		private ArrayList exceptionList;
-		
-		DSAggregator(AggregateFunction function, Aggregator aggregatorClient, ArrayList resultsList, ArrayList exceptionList)
-		{
-			this.function = function;
-			this.aggregatorClient = aggregatorClient;
-			this.resultsList = resultsList;
-			this.exceptionList = exceptionList;
-		}
-		
-		public void run()
-		{
-			try {
-				Object results = aggregatorClient.aggregate(function, region.getFullPath());
-				synchronized (resultsList) {
-					resultsList.add(results);
-				}
-				notifyResults();
-			} catch (AggregatorException ex) {
-				synchronized (resultsList) {
-					exceptionList.add(ex);
-				}
-				notifyResults();
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/LocalRegionInfoFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/LocalRegionInfoFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/LocalRegionInfoFunction.java
deleted file mode 100644
index 8f1e1db..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/LocalRegionInfoFunction.java
+++ /dev/null
@@ -1,235 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.functions.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-
-public class LocalRegionInfoFunction implements AggregateFunction, DataSerializable
-{
-	private static final long serialVersionUID = 1L;
-
-	private String regionPath;
-
-	private static boolean priorTo6011 = true;
-
-	static {
-		priorTo6011 = isPriorTo6011();
-	}
-
-	static boolean isPriorTo6011()
-	{
-		String gemfireVersion = GemFireVersion.getGemFireVersion();
-		String split[] = gemfireVersion.split("\\.");
-		int major = 0;
-		int minor = 0;
-		int update = 0;
-		int update2 = 0;
-		for (int i = 0; i < split.length; i++) {
-			switch (i) {
-			case 0:
-				major = Integer.parseInt(split[i]);
-				break;
-			case 1:
-				try {
-					minor = Integer.parseInt(split[i]);
-				} catch (NumberFormatException ex) {
-					minor = Integer.parseInt(split[i].substring(0, 1));
-				}
-				break;
-			case 2:
-        try {
-          update = Integer.parseInt(split[i]);
-        } catch (NumberFormatException ex) {
-          // non-number. ignore
-        }
-				break;
-			case 3:
-        try {
-          update2 = Integer.parseInt(split[i]);
-        } catch (NumberFormatException ex) {
-          // non-number. ignore.
-        }
-				break;
-			}
-		}
-
-		if (major < 6) {
-			return true; // 7
-		} else if (minor > 0) {
-			return false; // 6.1
-		} else if (update < 1) {
-			return true; // 6.0.0
-		} else if (update > 1) {
-			return false; // 6.0.2
-		} else if (update2 <= 0) {
-			return true; // 6.0.1.0
-		} else {
-			return false; // 6.0.1.1
-		}
-
-	}
-
-	public LocalRegionInfoFunction()
-	{
-	}
-
-	public LocalRegionInfoFunction(String regionPath)
-	{
-		this.regionPath = regionPath;
-	}
-
-	public String getRegionPath()
-	{
-		return regionPath;
-	}
-
-	public void setRegionPath(String regionPath)
-	{
-		this.regionPath = regionPath;
-	}
-
-	public AggregateResults run(FunctionContext context)
-	{
-		AggregateResults results = new AggregateResults();
-		Cache cache = CacheFactory.getAnyInstance();
-		DistributedSystem ds = cache.getDistributedSystem();
-		DistributedMember member = ds.getDistributedMember();
-
-		Region region = cache.getRegion(regionPath);
-		if (region == null) {
-			results.setCode(AggregateResults.CODE_ERROR);
-			results.setCodeMessage("Undefined region: " + regionPath);
-			return results;
-		}
-
-		MapMessage message = new MapMessage();
-		message.put("MemberId", member.getId());
-		message.put("MemberName", ds.getName());
-		message.put("Host", member.getHost());
-		// message.put("IpAddress",
-		// dataSet.getNode().getMemberId().getIpAddress().getHostAddress());
-		// message.put("Port", parent.getNode().getMemberId().getPort());
-		message.put("Pid", member.getProcessId());
-		message.put("RegionPath", regionPath);
-
-		boolean isPR = region instanceof PartitionedRegion;
-		message.put("IsPR", isPR);
-		if (isPR) {
-			PartitionedRegion pr = (PartitionedRegion) region;
-			SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy h:mm:ss.SSS a");
-			message.put("LastAccessedTime", format.format(new Date(pr.getLastAccessedTime())));
-			message.put("LastModifiedTime", format.format(new Date(pr.getLastModifiedTime())));
-
-			// total local primary bucket size
-			int totalRegionSize = 0;
-			// if (priorTo6011) { // 5.7 - 6.0.1
-			// The following call is not returning the primary bucket regions.
-			// totalRegionSize = PartitionRegionHelper.getLocalData(pr).size();
-
-			// getDataStore() is null if peer client
-			if (pr.getDataStore() == null) {
-				message.put("IsPeerClient", true);
-			} else {
-				List<Integer> bucketIdList = pr.getDataStore().getLocalPrimaryBucketsListTestOnly();
-				for (Integer bucketId : bucketIdList) {
-					BucketRegion bucketRegion;
-					try {
-						bucketRegion = pr.getDataStore().getInitializedBucketForId(null, bucketId);
-						totalRegionSize += bucketRegion.size();
-					} catch (ForceReattemptException e) {
-						// ignore
-					}
-				}
-				message.put("IsPeerClient", false);
-			}
-
-			// } else {
-			// // The following call is not returning the primary bucket
-			// regions.
-			// // totalRegionSize =
-			// PartitionRegionHelper.getLocalData(pr).size();
-			//				
-			// Region localRegion = new LocalDataSet(pr,
-			// pr.getDataStore().getAllLocalPrimaryBucketIds());
-			// totalRegionSize = localRegion.size();
-			// }
-			message.put("RegionSize", totalRegionSize);
-
-		} else {
-			message.put("IsPeerClient", false);
-			message.put("RegionSize", region.size());
-			message.put("Scope", region.getAttributes().getScope().toString());
-		}
-		message.put("DataPolicy", region.getAttributes().getDataPolicy().toString());
-
-		// info.evictionPolicy =
-		// region.getAttributes().getEvictionAttributes().getAlgorithm();
-
-		results.setDataObject(message);
-		return results;
-	}
-
-	/**
-	 * Returns a java.util.List of LocalRegionInfo objects;
-	 */
-	public Object aggregate(List list)
-	{
-		ArrayList resultList = new ArrayList();
-		for (int i = 0; i < list.size(); i++) {
-			AggregateResults results = (AggregateResults) list.get(i);
-			if (results.getCode() == AggregateResults.CODE_ERROR) {
-				// MapMessage info = new MapMessage();
-				// info.put("Code", results.getCode());
-				// info.put("CodeMessage", results.getCodeMessage());
-				// info.put("RegionPath", regionPath);
-				// resultList.add(info);
-				// break;
-				// ignore - occurs only if undefined region
-				continue;
-			}
-			if (results.getDataObject() != null) {
-				resultList.add(results.getDataObject());
-			}
-		}
-		return resultList;
-	}
-
-	public Object aggregateDistributedSystems(Object[] results)
-	{
-		ArrayList list = new ArrayList();
-		for (int i = 0; i < results.length; i++) {
-			list.add(results[i]);
-		}
-		return list;
-	}
-
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException
-	{
-		regionPath = DataSerializer.readString(input);
-	}
-
-	public void toData(DataOutput output) throws IOException
-	{
-		DataSerializer.writeString(regionPath, output);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/RegionCreateFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/RegionCreateFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/RegionCreateFunction.java
deleted file mode 100644
index f43b356..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/RegionCreateFunction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.functions.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionCreateTask;
-
-public class RegionCreateFunction implements AggregateFunction, DataSerializable
-{	
-	private static final long serialVersionUID = 1L;
-
-	private RegionCreateTask regionCreateTask;
-	
-	public RegionCreateFunction()
-	{
-	}
-	
-	public RegionCreateFunction(RegionCreateTask regionCreateTask)
-	{
-		this.regionCreateTask = regionCreateTask;
-	}
-	
-	public RegionCreateTask getRegionCreateAllTask() 
-	{
-		return regionCreateTask;
-	}
-
-	public void setRegionCreateAllTask(RegionCreateTask regionCreateAllTask) 
-	{
-		this.regionCreateTask = regionCreateAllTask;
-	}
-	
-	public AggregateResults run(FunctionContext context) 
-	{
-		AggregateResults results = new AggregateResults();
-		results.setDataObject(regionCreateTask.runTask(null));
-		return results;
-	}
-
-	/**
-	 * Returns a java.util.List of LocalRegionInfo objects;
-	 */
-	public Object aggregate(List list)
-	{
-		ArrayList resultList = new ArrayList();
-		for (int i = 0; i < list.size(); i++) {
-			AggregateResults results = (AggregateResults)list.get(i);
-			if (results.getDataObject() != null) {
-				resultList.add(results.getDataObject());
-			}
-		}
-		return resultList;
-	}
-	
-	public Object aggregateDistributedSystems(Object[] results)
-	{
-		ArrayList list = new ArrayList();
-		for (int i = 0; i < results.length; i++) {
-			list.add(results[i]);
-		}
-		return list;
-	}
-	
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException 
-	{
-		regionCreateTask = (RegionCreateTask)DataSerializer.readObject(input);
-	}
-
-	public void toData(DataOutput output) throws IOException 
-	{
-		DataSerializer.writeObject(regionCreateTask, output);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/RegionDestroyFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/RegionDestroyFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/RegionDestroyFunction.java
deleted file mode 100644
index fc1b031..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/aggregator/functions/util/RegionDestroyFunction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.functions.util;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionDestroyTask;
-
-public class RegionDestroyFunction implements AggregateFunction, DataSerializable
-{	
-	private static final long serialVersionUID = 1L;
-
-	private RegionDestroyTask regionDestroyTask;
-	
-	public RegionDestroyFunction()
-	{
-	}
-	
-	public RegionDestroyFunction(String regionPath)
-	{
-		this.regionDestroyTask = new RegionDestroyTask(regionPath);
-	}
-	
-	public RegionDestroyFunction(RegionDestroyTask regionDestroyTask)
-	{
-		this.regionDestroyTask = regionDestroyTask;
-	}
-	
-	public RegionDestroyTask getRegionDestroyTask() 
-	{
-		return regionDestroyTask;
-	}
-
-	public void setRegionCreateAllTask(RegionDestroyTask regionDestroyTask) 
-	{
-		this.regionDestroyTask = regionDestroyTask;
-	}
-	
-	public AggregateResults run(FunctionContext context) 
-	{
-		AggregateResults results = new AggregateResults();
-		results.setDataObject(regionDestroyTask.runTask(null));
-		return results;
-	}
-
-	/**
-	 * Returns a java.util.List of LocalRegionInfo objects;
-	 */
-	public Object aggregate(List list)
-	{
-		ArrayList resultList = new ArrayList();
-		for (int i = 0; i < list.size(); i++) {
-			AggregateResults results = (AggregateResults)list.get(i);
-			if (results.getDataObject() != null) {
-				resultList.add(results.getDataObject());
-			}
-		}
-		return resultList;
-	}
-	
-	public Object aggregateDistributedSystems(Object[] results)
-	{
-		ArrayList list = new ArrayList();
-		for (int i = 0; i < results.length; i++) {
-			list.add(results[i]);
-		}
-		return list;
-	}
-	
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException 
-	{
-		regionDestroyTask = (RegionDestroyTask)DataSerializer.readObject(input);
-	}
-
-	public void toData(DataOutput output) throws IOException 
-	{
-		DataSerializer.writeObject(regionDestroyTask, output);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/CacheBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/CacheBase.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/CacheBase.java
deleted file mode 100644
index f0dc3f6..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/CacheBase.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache;
-
-/*=========================================================================
- * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *========================================================================
- */
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.text.MessageFormat;
-import java.util.Properties;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheExistsException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.internal.OSProcess;
-
-@SuppressWarnings("deprecation")
-public class CacheBase 
-{
-	/**
-	 * The system region that holds system-level data for configuration
-	 * and real-time state updates. 
-	 */
-	public final static String PROPERTY_SYSTEM_REGION_PATH = "systemRegionPath";
-	
-	protected DistributedSystem distributedSystem;
-	protected Cache cache;
-	protected LogWriter logger;
-
-	public static void startLocator(String address, int port, String logFile)
-			throws IOException 
-	{
-		InetAddress inetAddress = InetAddress.getByName(address);
-		Locator.startLocatorAndDS(port, new File(logFile), inetAddress, new Properties());
-	}
-
-	public CacheBase()
-	{
-	}
-	
-	protected void initializeCache() throws CacheException, IOException {
-		
-		try {
-			InstantiatorClassLoader.loadDataSerializables();
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		} catch (ClassNotFoundException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		
-		open();
-	}
-  
-  protected void initializeLogStatsResources() {
-    String gemfirePropertyFile = System.getProperty("gemfirePropertyFile");
-    Properties props = new Properties();
-    try {
-      if (gemfirePropertyFile != null) {
-        File propFile = new File(gemfirePropertyFile);
-        if (propFile.exists()) {
-          FileInputStream fis = new FileInputStream(gemfirePropertyFile);
-          props.load(fis);
-          fis.close();
-        }
-      }
-    } catch (IOException e) {
-      //Ignore here.
-    }
-    
-    String pid = String.valueOf(OSProcess.getId());
-
-    String logFile = System.getProperty("gemfire.log-file");
-    if (logFile == null) {
-      logFile = props.getProperty("log-file");
-      if (logFile == null) {
-        String gfshLogFileFormat = System.getProperty("gfsh.log-file-format");
-        logFile = MessageFormat.format(gfshLogFileFormat, new Object[] { pid });
-        System.setProperty("gemfire.log-file", logFile);
-      }
-    }
-
-    String statArchive = System.getProperty("gemfire.statistic-archive-file");
-    if (statArchive == null) {
-        statArchive = props.getProperty("statistic-archive-file");
-      if (statArchive == null) {
-        String gfshLogFileFormat = System.getProperty("gfsh.stat-file-format");
-        statArchive = MessageFormat.format(gfshLogFileFormat, new Object[] { pid });
-        System.setProperty("gemfire.statistic-archive-file", statArchive);
-      }
-    }
-  }
-	
-	protected void open() throws IOException {
-		// Create distributed system properties
-		Properties properties = new Properties();
-
-		// Connect to the distributed system
-		distributedSystem = DistributedSystem.connect(properties);
-
-		try {
-			// Create cache
-			cache = CacheFactory.create(distributedSystem);
-			cache.setLockLease(10); // 10 second time out
-			
-			int bridgeServerPort = Integer.getInteger("bridgeServerPort", 0).intValue();
-			String groups = System.getProperty("serverGroups");
-			String[] serverGroups = null;
-			if (groups != null) {
-				serverGroups = groups.split(",");
-			}
-			if (bridgeServerPort != 0) {
-				cache.setIsServer(true);
-				com.gemstone.gemfire.cache.server.CacheServer server = cache.addCacheServer();
-				server.setPort(bridgeServerPort);
-				server.setNotifyBySubscription(true);
-				server.setGroups(serverGroups);
-				server.start();
-			}
-		} catch (CacheExistsException ex) {
-			cache = CacheFactory.getAnyInstance();
-		}
-		if (cache != null) {
-			logger = cache.getLogger();
-		}
-	}
-	
-	protected void close()
-	{
-		if (cache != null) {
-			cache.close();
-		}
-	}
-	
-	public DistributedSystem getDistributedSystem()
-	{
-		return distributedSystem;
-	}
-	
-	public Cache getGemFireCache()
-	{
-		return cache;
-	}
-
-//	Findbugs - wait not in loop - also seems unused code
-	public void waitForever() throws InterruptedException {
-		Object obj = new Object();
-		synchronized (obj) {
-			obj.wait();
-		}
-	}
-	
-	public LogWriter getLogger()
-	{
-		return cache.getLogger();
-	}
-
-	public static void main(String[] args) throws Exception {
-		CacheBase base = new CacheBase();
-		base.initializeCache();
-	}
-
-	public Cache getCache()
-	{
-		return cache;
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/InstantiatorClassLoader.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/InstantiatorClassLoader.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/InstantiatorClassLoader.java
deleted file mode 100644
index f5de572..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/InstantiatorClassLoader.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.LineNumberReader;
-
-public class InstantiatorClassLoader
-{
-	/**
-	 * Loads the DataSerializable classes from the relative file path
-	 * specified by the system property "dataSerializableFilePath". If not
-	 * defined then the default relative file path, "etc/DataSerializables.txt",
-	 * is read. The file must contain fully-qualified class names separated
-	 * by a new line. Lines that begin with # or that have white spaces only 
-	 * are ignored. For example,
-	 * <p>
-	 * <table cellpadding=0 cellspacing=0>
-	 * <tr># Trade objects</tr>
-	 * <tr>foo.data.Trade</tr>
-	 * <tr>foo.data.Price</tr>
-	 * <tr>foo.data.Order</tr>
-	 * <tr>#
-	 * <tr># Info objects</tr>
-	 * <tr>foo.info.Company</tr>
-	 * <tr>foo.info.Employee</tr>
-	 * <tr>foo.info.Customer</tr>
-	 * </table>
-	 * 
-	 * @throws IOException Thrown if unable to read the file.
-	 * @throws ClassNotFoundException Thrown if any one of classes in the file is
-	 *                     undefined.
-	 * @return Returns a comma separated list of loaded class paths.
-	 */
-	public static String loadDataSerializables() throws IOException, ClassNotFoundException
-	{
-		String dataSerializableFilePath = System.getProperty("dataSerializableFilePath", "etc/DataSerializables.txt");
-		return loadDataSerializables(dataSerializableFilePath);
-	}
-	
-	/**
-	 * Loads the DataSerializable classes from the specified relative file path.
-	 * The file must contain fully-qualified class names separated
-	 * by a new line. Lines that begin with # or that have white spaces only 
-	 * are ignored. For example,
-	 * <p>
-	 * <table cellpadding=0 cellspacing=0>
-	 * <tr># Trade objects</tr>
-	 * <tr>foo.data.Trade</tr>
-	 * <tr>foo.data.Price</tr>
-	 * <tr>foo.data.Order</tr>
-	 * <tr>#
-	 * <tr># Info objects</tr>
-	 * <tr>foo.info.Company</tr>
-	 * <tr>foo.info.Employee</tr>
-	 * <tr>foo.info.Customer</tr>
-	 * </table>
-	 * 
-	 * @param filePath The relative or absolute file path.
-	 * @return Returns a comma separated list of loaded class paths.
-	 * @throws IOException Thrown if unable to read the file.
-	 * @throws ClassNotFoundException Thrown if any one of classes in the file is
-	 *                     undefined.
-	 */
-	public static String loadDataSerializables(String filePath) throws IOException, ClassNotFoundException
-	{
-		filePath = filePath.trim();
-		File file;
-		if (filePath.startsWith("/") || filePath.indexOf(':') >= 0) {
-			// absolute path
-			file = new File(filePath);
-		} else {
-			String userDir = System.getProperty("user.dir");
-			file = new File(userDir, filePath);
-		}
-		
-		LineNumberReader reader = new LineNumberReader(new FileReader(file));
-		String line = reader.readLine();
-		String className;
-		StringBuffer buffer = new StringBuffer(1000);
-		while (line != null) {
-			className = line.trim();
-			if (className.length() > 0 && className.startsWith("#") == false) {
-				Class.forName(className);
-				buffer.append(className);
-				buffer.append(", ");
-			}
-			line = reader.readLine();
-		}
-		reader.close();
-		String classList;
-		int endIndex = buffer.lastIndexOf(", "); // 8
-		if (endIndex == buffer.length() - 2) {
-			classList = buffer.substring(0, endIndex);
-		} else {
-			classList = buffer.toString();
-		}
-		return classList;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/GenericMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/GenericMap.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/GenericMap.java
deleted file mode 100644
index 1e2ff5e..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/GenericMap.java
+++ /dev/null
@@ -1,196 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Collection;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-
-public interface GenericMap extends DataSerializable
-{
-	public Entry add(String key, GenericMap value);
-	public Entry add(String key, Mappable value);
-	public Entry add(String key, String value);
-	public Entry add(String key, boolean value);
-	public Entry add(String key, byte value);
-	public Entry add(String key, short value);
-	public Entry add(String key, int value);
-	public Entry add(String key, long value);
-	public Entry add(String key, float value);
-	public Entry add(String key, double value);
-	public Entry addEntry(Entry entry);
-	public Entry getEntry(int index);
-	public Entry getEntry(String key);
-	public Object getValue(String key);
-	public boolean getBoolean(String key) throws NoSuchFieldException, InvalidTypeException;
-	public byte getByte(String key) throws NoSuchFieldException, InvalidTypeException;
-	public char getChar(String key) throws NoSuchFieldException, InvalidTypeException;
-	public short getShort(String key) throws NoSuchFieldException, InvalidTypeException;
-	public int getInt(String key) throws NoSuchFieldException, InvalidTypeException;
-	public long getLong(String key) throws NoSuchFieldException, InvalidTypeException;
-	public float getFloat(String key) throws NoSuchFieldException, InvalidTypeException;
-	public double getDouble(String key) throws NoSuchFieldException, InvalidTypeException;
-	public String getString(String key) throws NoSuchFieldException, InvalidTypeException;
-	public Entry getEntryAt(int index);
-	public Object getValueAt(int index);
-	public String getNameAt(int index);
-	public int indexOf(String key);
-	public int lastIndexOf(String key);
-	public Entry getLastEntry();
-	public Object getLastValue();
-	public Entry getFirstEntry();
-	public Object getFirstValue();
-	public boolean hasGenericData();
-	public boolean remove(Entry entry);
-	public Entry remove(int index);
-	public Collection getEntries();
-	public int size();
-	public Entry[] getAllEntries();
-	public Entry[] getAllPrimitives();
-	public int getPrimitiveCount();
-	public Entry[] getAllGenericData();
-	public int getGenericDataCount();
-	public void clear();
-	public void dump(OutputStream out);
-	public Object clone();
-	
-	/**
-	 * Entry is an element that contains a (key, value) pair. This
-	 * class is exclusively used by GenericMessage.
-	 */
-	public static class Entry implements DataSerializable
-	{
-	    /**
-	     * The value type is TYPE_OBJECT if it is a non-primitive and non-MapMessage
-	     * type.
-	     */
-	    public final static byte      TYPE_GENERIC_DATA = 1;
-
-	    /**
-	     * The value type is TYPE_MAPPABLE if it is Mappable type.
-	     */
-	    public final static byte      TYPE_MAPPABLE = 2;
-
-	    public final static byte      TYPE_BYTE = 3;
-	    public final static byte      TYPE_CHAR = 4;
-	    public final static byte      TYPE_DOUBLE = 5;
-	    public final static byte      TYPE_FLOAT = 6;
-	    public final static byte      TYPE_INTEGER = 7;
-	    public final static byte      TYPE_LONG = 8;
-	    public final static byte      TYPE_SHORT = 9;
-	    public final static byte      TYPE_BOOLEAN = 10;
-	    public final static byte      TYPE_STRING = 11;
-
-	    private byte type = TYPE_GENERIC_DATA;
-	    private String key;
-	    private Object value;
-
-	    public Entry()
-	    {
-	    }
-	    
-	    /**
-	     * Creates a new Entry object.
-	     * @param key  The key identifying the value.
-	     * @param value The value.
-	     * @param type  The value type.
-	     */
-	    public Entry(String key, Object value, byte type)
-	    {
-	        this.key = key;
-	        this.value = value;
-	        this.type = type;
-	    }
-
-	    /**
-	     * Creates a new Entry object. The value type is set to the default
-	     * type TYPE_GENERIC_DATA.
-	     * @param key  The key identifying the value.
-	     * @param value The value.
-	     */
-	    public Entry(String key, GenericMap value)
-	    {
-	        this(key, value, TYPE_GENERIC_DATA);
-	    }
-
-	    /**
-	     * Returns the key identifying the value.
-	     */
-	    public String getKey()
-	    {
-	        return key;
-	    }
-
-	    /**
-	     * Returns the value.
-	     */
-	    public Object getValue()
-	    {
-	        return value;
-	    }
-
-	    /**
-	     * Returns the value type.
-	     */
-	    public short getType()
-	    {
-	        return type;
-	    }
-	    
-	    public int intValue() throws InvalidTypeException
-	    {
-	    	if (type == TYPE_INTEGER) {
-	    		return ((Integer)value).intValue();
-	    	} else if (type == TYPE_LONG) {
-	    		return ((Long)value).intValue();
-	    	} else if (type == TYPE_BYTE) {
-	    		return ((Byte)value).intValue();
-	    	} else if (type == TYPE_CHAR) {
-	    		return Character.getNumericValue(((Character)value).charValue());
-	    	} else if (type == TYPE_SHORT) {
-	    		return ((Short)value).intValue();
-	    	} else if (type == TYPE_FLOAT) {
-	    		return ((Float)value).intValue();
-	    	} else if (type == TYPE_DOUBLE) {
-	    		return ((Double)value).intValue();
-	    	} else if (type == TYPE_BOOLEAN) {
-	    		if (((Boolean)value).booleanValue()) {
-	    			return 1;
-	    		} else {
-	    			return 0;
-	    		}
-	    	} else {
-	    		throw new InvalidTypeException(value.getClass() + ": Unable to convert object to int.");
-	    	}
-	    }
-	    
-	    public boolean isPrimitive()
-	    {
-	    	return type == TYPE_BYTE || 
-	    			type == TYPE_CHAR ||
-	    			type == TYPE_DOUBLE ||
-	    			type == TYPE_FLOAT ||
-	    			type == TYPE_INTEGER ||
-	    			type == TYPE_LONG ||
-	    			type == TYPE_SHORT ||
-	    			type == TYPE_BOOLEAN;
-	    }
-
-		public void fromData(DataInput dataInput) throws IOException, ClassNotFoundException
-		{
-			type = dataInput.readByte();
-			key = DataSerializer.readString(dataInput);
-			value = DataSerializer.readObject(dataInput);
-		}
-
-		public void toData(DataOutput dataOutput) throws IOException
-		{
-			dataOutput.writeByte(type);
-			DataSerializer.writeString(key, dataOutput);
-			DataSerializer.writeObject(value, dataOutput);
-		}
-	}
-}


[72/79] incubator-geode git commit: GEODE-300: New gradle build file for pulse

Posted by tu...@apache.org.
GEODE-300: New gradle build file for pulse

Adding a gradle build for pulse. Modified project gradle scripts to
include pulse during build.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/fc7fcf9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/fc7fcf9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/fc7fcf9c

Branch: refs/heads/feature/GEODE-17
Commit: fc7fcf9c13f86885316daf642a94cb75d4cec144
Parents: 5f82490
Author: Nitin Lamba <ni...@ampool.io>
Authored: Tue Sep 1 14:48:27 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:54:35 2015 +0530

----------------------------------------------------------------------
 build.gradle                                    |   8 +-
 gemfire-assembly/build.gradle                   |   9 +-
 .../management/internal/AgentUtilJUnitTest.java |  14 +-
 pulse/build.gradle                              | 149 +++++++++++++++++++
 settings.gradle                                 |   1 +
 5 files changed, 169 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index d7b4965..44be620 100755
--- a/build.gradle
+++ b/build.gradle
@@ -374,11 +374,9 @@ subprojects {
         maxHeapSize '768m'
         jvmArgs = ['-XX:+HeapDumpOnOutOfMemoryError', '-XX:MaxPermSize=256M', '-ea']
 
-        systemProperties = [
-          'gemfire.DEFAULT_MAX_OPLOG_SIZE' : '10',
-          'gemfire.disallowMcastDefaults'  : 'true',
-          'jline.terminal'                 : 'jline.UnsupportedTerminal',
-        ]
+        systemProperty 'gemfire.DEFAULT_MAX_OPLOG_SIZE', '10'
+        systemProperty 'gemfire.disallowMcastDefaults', 'true'
+        systemProperty 'jline.terminal', 'jline.UnsupportedTerminal'
 
         def eol = System.getProperty('line.separator')
         def progress = new File(resultsDir, "$test.name-progress.txt")

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index f65930d..c4d9581 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -27,6 +27,7 @@ dependencies {
   archives project(':gemfire-core')  
   archives project(':gemfire-web')
   archives project(':gemfire-web-api')
+  archives project(':pulse')
 
   testCompile project(path: ':gemfire-junit', configuration: 'testOutput')
   testCompile project(path: ':gemfire-core', configuration: 'testOutput')
@@ -184,7 +185,7 @@ distributions {
 
         // include this jar        
         from project(":gemfire-web-api").jar.outputs.files.getFiles()
-        
+
         // dependency jars
         from depsJar
         from gfshDepsJar
@@ -198,6 +199,12 @@ distributions {
           exclude '*.jar'
         }
       }
+
+      into ('tools/Pulse') {
+        from (project(":pulse").configurations.archives.allArtifacts.files) {
+          exclude '*.jar'
+        }
+      }
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java b/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
index cd2c429..5c897d0 100644
--- a/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
+++ b/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
@@ -51,12 +51,14 @@ public class AgentUtilJUnitTest {
     assertNotNull(gemFireWarLocation, "GemFire REST API WAR File was not found");
   }
 
-  @Ignore("This test should be activated when pulse gets added to Geode")
-  @Test
-  public void testPulseWarExists() {
-    String gemFireWarLocation = agentUtil.getPulseWarLocation();
-    assertNotNull(gemFireWarLocation, "Pulse WAR File was not found");
-  }
+  /*
+   * This test should be activated when pulse gets added to Geode
+   */
+   @Test
+   public void testPulseWarExists() {
+   String gemFireWarLocation = agentUtil.getPulseWarLocation();
+   assertNotNull(gemFireWarLocation, "Pulse WAR File was not found");
+   }
 
   private String getGemfireVersion() {
     String version = null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/pulse/build.gradle
----------------------------------------------------------------------
diff --git a/pulse/build.gradle b/pulse/build.gradle
new file mode 100755
index 0000000..b2bd5fc
--- /dev/null
+++ b/pulse/build.gradle
@@ -0,0 +1,149 @@
+apply plugin: 'war'
+
+sourceSets {// Force new dependencies only - do no inherit from parent project
+  main {
+    resources {
+      exclude('**/*.txt')
+      exclude('**/gemfire*.properties')
+      exclude('**/sqlfire.properties')
+    }
+  }
+  test {
+    output.resourcesDir = output.classesDir
+    resources {
+      include('**/pulse.properties')
+    }
+  }
+}
+
+dependencies {
+  compile 'org.apache.commons:com.springsource.org.apache.commons.beanutils:1.8.0'
+  compile 'org.apache.commons:com.springsource.org.apache.commons.collections:3.2.0'
+  compile 'org.apache.commons:com.springsource.org.apache.commons.digester:1.8.1'
+  compile 'org.apache.commons:com.springsource.org.apache.commons.logging:1.1.1'
+  compile 'commons-lang:commons-lang:2.6'
+  compile 'org.springframework.ldap:spring-ldap-core:1.3.2.RELEASE'
+  compile 'org.springframework.security:spring-security-config:3.1.7.RELEASE'
+  compile 'org.springframework.security:spring-security-core:3.1.7.RELEASE'
+  compile 'org.springframework.security:spring-security-ldap:3.1.7.RELEASE'
+  compile 'org.springframework.security:spring-security-web:3.1.7.RELEASE'
+  compile 'org.springframework:spring-tx:3.2.12.RELEASE'
+
+  providedCompile 'commons-logging:commons-logging:1.1.3'
+  providedCompile 'commons-codec:commons-codec:1.6'
+  providedCompile 'org.apache.httpcomponents:fluent-hc:4.3.3'
+  providedCompile 'org.apache.httpcomponents:httpclient:4.3.3'
+  providedCompile 'org.apache.httpcomponents:httpclient-cache:4.3.3'
+  providedCompile 'org.apache.httpcomponents:httpcore:4.3.2'
+  providedCompile 'org.apache.httpcomponents:httpmime:4.3.3'
+
+  provided 'org.mortbay.jetty:servlet-api:2.5-20081211'
+
+  testCompile 'junit:junit:4.10'
+  testCompile 'org.apache.tomcat.embed:tomcat-embed-core:7.0.30'
+  testCompile 'org.apache.tomcat.embed:tomcat-embed-jasper:7.0.30'
+  testCompile 'org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.30'
+  testCompile 'org.seleniumhq.selenium:selenium-server-standalone:2.41.0'
+//  testCompile 'org.seleniumhq.selenium:selenium-server:2.47.1'
+
+  // Required only for creating test categories
+//  testPulseCompile project(path: ':gemfire-junit', configuration: 'testOutput')
+
+}
+
+jar {
+  from sourceSets.main.output
+}
+
+artifacts {
+  archives jar
+}
+
+def pulseWarFile = "pulse.war"
+
+war {
+  // TODO include the jar but exclude the classes from the war file?
+//  classpath jar
+//  rootSpec.exclude("**/*.class")
+//  includeEmptyDirs = false
+
+//  from('release/3rdparty_licenses') {
+//    include 'open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt'
+//    into '.'
+//    rename { String fileName ->
+//      fileName.replace("open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt", "oslicenses.txt")
+//    }
+//  }
+
+  archiveName pulseWarFile
+}
+
+test {
+
+  include '**/junit/*.class'
+  exclude '**/AllTests.class'
+  exclude '**/Base*.class'
+
+  systemProperty 'pulse.propfile', "$projectDir/src/test/resources/test.properties"
+  systemProperty 'pulse.war', "$buildDir/libs/$pulseWarFile"
+
+  useJUnit {
+    // TODO: Classify and add categories to different Pulse tests
+//    includeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.DistributedTest'
+  }
+
+  // show standard out and standard error of the test JVM(s) on the console
+  testLogging.showStandardStreams = true
+
+}
+
+integrationTest {
+
+// Run tests individually
+//  include '**/PulseUITest.class'
+//  include '**/PulseTests.class'
+//  include '**/PulseAutomatedTests.class'
+
+  include '**/*Tests.class'
+  include '**/*Test.class'
+  exclude '**/AllTests.class'
+  exclude '**/junit/*.class'
+  exclude '**/Base*.class'
+
+  systemProperty 'pulse.propfile', "$projectDir/src/test/resources/test.properties"
+  systemProperty 'pulse.war', "$buildDir/libs/$pulseWarFile"
+
+  useJUnit() {
+
+    // TODO: Classify and add categories to different Pulse tests
+//    includeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.DistributedTest'
+
+  }
+  // show standard out and standard error of the test JVM(s) on the console
+  testLogging.showStandardStreams = true
+
+}
+
+// TODO: Implement checkMissedTests & classify/ add categories to different Pulse tests
+//This target does not run any tests. Rather, it validates that there are no
+//tests that are missing a category annotation
+//checkMissedTests {
+//  include '**/*Tests.class'
+//  include '**/*Test.class'
+//  exclude '**/AllTests.class'
+//  exclude '**/Base*.class'
+//
+//  useJUnit {
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
+//  }
+//
+//  beforeTest { descriptor ->
+//    throw new GradleException("The test " + descriptor.getClassName() + "." + descriptor.getName() + " does not include a junit category.");
+//  }
+//
+//}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 4b2da7b..a3b34bb 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -7,6 +7,7 @@ include 'gemfire-junit'
 include 'gemfire-core'
 include 'gemfire-web'
 include 'gemfire-web-api'
+include 'pulse'
 include 'gemfire-assembly'
 include 'gemfire-rebalancer'
 


[62/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/ls.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/ls.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/ls.java
deleted file mode 100644
index 298d048..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/ls.java
+++ /dev/null
@@ -1,584 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.gemstone.gemfire.cache.CacheStatistics;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Nextable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.functions.util.LocalRegionInfoFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.ListMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-public class ls implements CommandExecutable, Nextable
-{
-	private static final String HIDDEN_REGION_NAME_PREFIX = "_"; // 1 underscore
-	
-	private static final int TYPE_LOCAL_REGION = 0;
-	private static final int TYPE_REMOTE_REGION = 1;
-	public final static int TYPE_REMOTE_KEYS = 2;
-	
-	private Gfsh gfsh;
-	private Region localRegion;
-	private Iterator localRegionIterator;
-	private List localKeyList;
-	private int lastRowPrinted = 0;
-	
-	public ls(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-		gfsh.addEnumCommand("ls -e");
-		gfsh.addEnumCommand("ls -k");
-		gfsh.addEnumCommand("ls -s");
-	}
-	
-	public void help()
-	{
-		gfsh.println("ls [-a|-c|-e|-k|-m|-p|-r|-s] [region path] | [-?]");
-		gfsh.println("     List subregions or region entries in the current path or in the");
-		gfsh.println("     specified path. If no option specified, then it lists all region");
-		gfsh.println("     names except the hidden region names. A hidden region name begins");
-		gfsh.println("     with the prefix " + HIDDEN_REGION_NAME_PREFIX + " (1 underscore).");
-		gfsh.println("     -a  List all regions. This option lists all regions including the region");
-		gfsh.println("         names that begin with the prefix " + HIDDEN_REGION_NAME_PREFIX);
-		gfsh.println("         (1 underscore).");
-		gfsh.println("     -c  List cache server information.");
-		gfsh.println("     -e  List local entries up to the fetch size.");
-		gfsh.println("     -k  List server keys up to the fetch size. The keys are enumerated. Use");
-		gfsh.println("         the key numbers to get values using the 'get -k' command.");
-		gfsh.println("         If partitioned region, then it displays the entries in only the");
-		gfsh.println("         connected server's local dataset due to the potentially large size");
-		gfsh.println("         of the partitioned region.");
-		gfsh.println("     -m  List region info of all peer members.");
-		gfsh.println("     -p  List the local data set of the partitioned region entries in the");
-		gfsh.println("         server up to the fetch size. If the region is not a partitioned");
-		gfsh.println("         region then print the region entries (same as 'ls -s' in that case.)");
-		gfsh.println("     -r  Recursively list all sub-region paths.");
-		gfsh.println("     -s  List server entries up to the fetch size. If partitioned region,");
-		gfsh.println("         then it displays the entries in only the connected server's local");
-		gfsh.println("         dataset due to the potentially large size of the partitioned region.");
-		
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("ls -?")) {
-			help();
-			return;
-		} 
-		
-		// reset 
-		localKeyList = null;
-		
-		if (command.startsWith("ls -a")) {
-			ls_a(command);
-		} else if (command.startsWith("ls -c")) {
-			ls_c(command);
-		} else if (command.startsWith("ls -e")) {
-			ls_e(command);
-		} else if (command.startsWith("ls -k")) {
-			ls_k(command);
-		} else if (command.startsWith("ls -m")) {
-			ls_m(command);
-		} else if (command.startsWith("ls -r")) {
-			ls_r(command);
-		} else if (command.startsWith("ls -s")) {
-			ls_s(command);
-		} else if (command.startsWith("ls -p")) {
-			ls_p(command);
-		} else if (command.startsWith("ls")) {
-			ls(command);
-		}
-	}
-	
-	private void ls_a(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList<String>();
-		Gfsh.parseCommand(command, list);
-		String regionPath;
-		if (list.size() == 2) {
-			regionPath = gfsh.getCurrentPath();
-		} else {
-			regionPath = (String) list.get(2);
-			if(!isRegionArgValid(regionPath)){
-			  return;
-			}
-		}
-		listRegions(regionPath, true);
-	}
-	
-	private void ls_c(String command) throws Exception
-	{
-		
-	  String regionPath = retrievePath(command);
-		
-		if (regionPath.equals("/")) {
-			gfsh.println("Error: invalid region \"/\". Change to a valid region or specify the region path, i.e. ls -c /foo");
-			return;
-		}
-		
-		if(!isRegionArgValid(regionPath)){
-		  return;
-		}
-		regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-
-		long startTime = System.currentTimeMillis();
-		List<AggregateResults> results = (List<AggregateResults>)gfsh.getAggregator().aggregate(new GfshFunction(command, regionPath, null), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-		
-		for (AggregateResults aggregateResults : results) {
-			GfshData data = (GfshData)aggregateResults.getDataObject();
-			ListMessage message = (ListMessage)data.getDataObject();
-			gfsh.println("--------------------------------------");
-			gfsh.println("MemberId = " + data.getMemberInfo().getMemberId());
-			gfsh.println("MemberName = " + data.getMemberInfo().getMemberName());
-			gfsh.println("Host = " + data.getMemberInfo().getHost());
-			gfsh.println("Pid = " + data.getMemberInfo().getPid());
-			gfsh.println();
-			Mappable mappables[] = message.getAllMappables();
-			for (int i = 0; i < mappables.length; i++) {
-				Set<String> keySet = mappables[i].getKeys();
-				List<String> keyList = new ArrayList<String>(keySet);
-				java.util.Collections.sort(keyList);
-				for (String key : keyList) {
-					Object value = mappables[i].getValue(key);
-					gfsh.println("   " + key + " = " + value);
-				}
-				gfsh.println();
-			}
-			gfsh.println("--------------------------------------");
-			gfsh.println();
-		}
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-	
-	private void ls_m(String command) throws Exception
-	{
-	  String regionPath = retrievePath(command);
-		
-		if (regionPath.equals("/")) {
-			gfsh.println("Error: invalid region \"/\". Change to a valid region or specify the region path, i.e. ls -a /foo");
-			return;
-		}
-		
-		if(!isRegionArgValid(regionPath)){
-      return;
-    }
-		
-		regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-
-		long startTime = System.currentTimeMillis();
-		List<Mappable> resultList = (List<Mappable>)gfsh.getAggregator().aggregate(new LocalRegionInfoFunction(regionPath), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-		
-		// First, set the member list in gfsh. This call sorts the list by member id.
-		// The member list is kept by gfsh for commands like 'pr' that need to 
-		// lookup member ids.
-		resultList = gfsh.setMemberList(resultList);
-		
-		boolean isPR = false;
-		int totalRegionSize = 0;
-		for (int i = 0; i < resultList.size(); i++) {
-			MapMessage info = (MapMessage)resultList.get(i);
-			try {
-				if (info.getByte("Code") == AggregateResults.CODE_ERROR) {
-					gfsh.println("Error: " + info.getString("CodeMessage"));
-					return;
-				}
-			} catch (Exception ex) {
-				// ignore
-			}
-			isPR = info.getBoolean("IsPR");
-			if (isPR) {
-				totalRegionSize += info.getInt("RegionSize");
-			}
-		}
-		
-		PrintUtil.printMappableList(resultList);
-		if (isPR) {
-			gfsh.println("Total Region Size: " + totalRegionSize);
-		}
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-	
-	private void ls_k(String command) throws Exception
-	{
-	  String regionPath = retrievePath(command);
-		
-		if (regionPath.equals("/")) {
-			gfsh.println("Error: invalid region \"/\". Change to a valid region or specify the region path, i.e. ls -k /foo");
-			return;
-		}
-		
-		if(!isRegionArgValid(regionPath)){
-      return;
-    }
-		
-		regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-		
-		// ---------- Get keys using select ----------------
-//		// get keys from the server
-//		// ls -k
-//		select s = (select)gfsh.getCommand("select");
-//		// get the keys but limit it to 1000
-//		localKeyList = s.getRemoteKeys(regionPath, 1000);
-		// -------------------------------------------------
-		
-		// ---------- Get keys using function (QueryTask) -------------
-		localKeyList = listRegionKeys(regionPath, true, true);
-		// ------------------------------------------------------------
-		
-		
-		gfsh.setLsKeyList(localKeyList);
-		next n = (next)gfsh.getCommand("next");
-		n.setCommand(getClass().getSimpleName(), TYPE_REMOTE_KEYS);
-		
-	}
-	
-	private void ls_r(String command) throws Exception
-	{
-	  String regionPath = retrievePath(command);
-
-		String regionPaths[];
-		if (regionPath.equals("/")) {
-			regionPaths = RegionUtil.getAllRegionPaths(gfsh.getCache(), true);
-		} else {
-		  if(!isRegionArgValid(regionPath)){
-        return;
-      }
-		  regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-			Region<?, ?> region = RegionUtil.getLocalRegion(regionPath);
-			regionPaths = RegionUtil.getAllRegionPaths(region, true);
-		}
-
-		for (int i = 0; i < regionPaths.length; i++) {
-			gfsh.println(regionPaths[i]);
-		}
-	}
-	
-  private void ls_s(String command) throws Exception
-	{
-    String regionPath = retrievePath(command);
-		
-		if (regionPath.equals("/")) {
-			gfsh.println("Error: invalid region \"/\". Change to a valid region or specify the region path, i.e. ls -k /foo");
-			return;
-		}
-		
-		if(!isRegionArgValid(regionPath)){
-      return;
-    }
-		// Show only the local dataset entries if it's a partitioned regions
-		listRegionEntries(regionPath, true, true);
-	}
-	
-	private void ls_p(String command) throws Exception
-	{
-	  String regionPath = retrievePath(command);
-		
-		if (regionPath.equals("/")) {
-			gfsh.println("Error: invalid region \"/\". Change to a valid region or specify the region path, i.e. ls -k /foo");
-			return;
-		}
-		if(!isRegionArgValid(regionPath)){
-      return;
-    }
-		listRegionEntries(regionPath, true, true);
-	}
-	
-	private void ls(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String path;
-		if (list.size() == 1) {
-			path = gfsh.getCurrentPath();
-		} else {
-			path = (String) list.get(1);
-		}
-		
-		listRegions(path, false);
-	}
-	
-	private void listRegions(String path, boolean listAllRegions) throws Exception
-	{
-		Region region = null;
-		Set regionSet;
-		if (path.equals("/")) {
-			regionSet = gfsh.getCache().rootRegions();
-		} else {
-			path = gfsh.getFullPath(path, gfsh.getCurrentPath());
-			region = gfsh.getCache().getRegion(path);
-			if (region == null) {
-				gfsh.println("Error: Region undefined. Invalid path: " + path + ". Use absolute path.");
-				return;
-			}
-			regionSet = region.subregions(false);
-		}
-		
-		if (regionSet.size() == 0) {
-			gfsh.println("Subregions: none");
-		} else {
-			gfsh.println("Subregions:");
-		}
-		List regionList = new ArrayList();
-		for (Iterator itr = regionSet.iterator(); itr.hasNext();) {
-			Region rgn = (Region) itr.next();
-			String name = rgn.getName();
-			if (listAllRegions == false && name.startsWith(HIDDEN_REGION_NAME_PREFIX)) {
-				continue;
-			}
-			regionList.add(name);
-		}
-		Collections.sort(regionList);
-		for (Iterator<String> itr = regionList.iterator(); itr.hasNext();) {
-			String name = itr.next();
-			for (Iterator itr2 = regionSet.iterator(); itr2.hasNext();) {
-				Region rgn = (Region) itr2.next();
-				String regionName = rgn.getName();
-				if (name.equals(regionName)) {
-					gfsh.println("   " + name);
-					if (rgn.getAttributes().getStatisticsEnabled()) {
-						CacheStatistics stats = rgn.getStatistics();
-						gfsh.println("      " + stats);
-					}
-					break;
-				}
-			}
-		}
-		gfsh.println();
-	}
-	
-	public List listRegionKeys(String regionPath, boolean nextEnabled, boolean isPRLocalData) throws Exception
-	{
-		regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-		
-		// get keys from the server
-		// ls -k
-		boolean keysOnly = true;
-		long startTime = System.currentTimeMillis();
-		CommandResults cr = gfsh.getCommandClient().execute(new QueryTask(regionPath, gfsh.getFetchSize(), nextEnabled, isPRLocalData, keysOnly));
-		long stopTime = System.currentTimeMillis();
-		if (cr.getCode() == QueryTask.ERROR_QUERY) {
-			gfsh.println(cr.getCodeMessage());
-			return null;
-		}
-		QueryResults results = (QueryResults) cr.getDataObject();
-		if (results == null) {
-			gfsh.println("No results");
-			return null;
-		}
-
-		if (regionPath == null) {
-			localKeyList = null;
-			lastRowPrinted = 0;
-		}
-		List keyList = localKeyList;
-		if (keyList == null) {
-			localKeyList = keyList = new ArrayList();
-		}
-		List list = (List)results.getResults();
-		if (gfsh.isShowResults()) {
-			lastRowPrinted = PrintUtil.printList(list, 0, 1, list.size(), results.getActualSize(), keyList);
-		} else {
-			gfsh.println(" Fetch size: " + gfsh.getFetchSize());
-			gfsh.println("   Returned: " + list.size() + "/" + results.getActualSize());
-		}
-		if (results.isPR()) {
-			gfsh.println("Partitioned region local dataset retrieval. The actual size maybe larger.");
-		}
-	
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-
-		gfsh.setLsKeyList(keyList);
-		next n = (next)gfsh.getCommand("next");
-		n.setCommand(getClass().getSimpleName(), TYPE_REMOTE_REGION);
-		return keyList;
-	}
-	
-	public List listRegionEntries(String regionPath, boolean nextEnabled, boolean isPRLocalData) throws Exception
-	{
-		regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-		
-		// get entries from the server
-		// ls -s
-		long startTime = System.currentTimeMillis();
-		CommandResults cr = gfsh.getCommandClient().execute(new QueryTask(regionPath, gfsh.getFetchSize(), nextEnabled, isPRLocalData));
-		long stopTime = System.currentTimeMillis();
-		if (cr.getCode() == QueryTask.ERROR_QUERY) {
-			gfsh.println(cr.getCodeMessage());
-			return null;
-		}
-		QueryResults results = (QueryResults) cr.getDataObject();
-		if (results == null) {
-			gfsh.println("No results");
-			return null;
-		}
-
-		if (regionPath == null) {
-			localKeyList = null;
-			lastRowPrinted = 0;
-		}
-		List keyList = localKeyList;
-		if (keyList == null) {
-			localKeyList = keyList = new ArrayList();
-		}
-		Map map = (Map)results.getResults();
-		if (gfsh.isShowResults()) {
-			lastRowPrinted = PrintUtil.printEntries(map, 0, 1, map.size(), results.getActualSize(), keyList);
-		} else {
-			gfsh.println(" Fetch size: " + gfsh.getFetchSize());
-			gfsh.println("   Returned: " + map.size() + "/" + results.getActualSize());
-		}
-		if (results.isPR()) {
-			gfsh.println("Partitioned region local dataset retrieval. The actual size maybe larger.");
-		}
-	
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-
-		gfsh.setLsKeyList(keyList);
-		next n = (next)gfsh.getCommand("next");
-		n.setCommand(getClass().getSimpleName(), TYPE_REMOTE_REGION);
-		return keyList;
-	}
-	
-	public List next(Object userData) throws Exception
-	{
-		int nexType = (Integer)userData;
-		if (nexType == TYPE_LOCAL_REGION) {
-			if (localRegion == null) {
-				return null;
-			}
-			int rowsPrinted = PrintUtil.printEntries(localRegion, localRegionIterator, lastRowPrinted, lastRowPrinted+1, gfsh.getFetchSize(), localKeyList);
-			lastRowPrinted = lastRowPrinted + rowsPrinted;
-		} else if (nexType == TYPE_REMOTE_REGION) {
-			CommandResults cr = gfsh.getCommandClient().execute(new QueryTask(null, gfsh.getFetchSize(), true));
-			QueryResults results = (QueryResults)cr.getDataObject();
-			Map map = (Map)results.getResults();
-			if (map != null) {
-				int rowsPrinted;
-				rowsPrinted = PrintUtil.printEntries(map, lastRowPrinted, lastRowPrinted+1, map.size(), results.getActualSize(), localKeyList);
-				if (results.isPR()) {
-					gfsh.println("Partitioned region local dataset retrieval. The actual size maybe larger.");
-				}
-				lastRowPrinted = lastRowPrinted + rowsPrinted;
-			}
-			
-		} else if (nexType == TYPE_REMOTE_KEYS) {
-			
-			// ---------- Get keys using select ----------------
-//			select s = (select)gfsh.getCommand("select");
-//			List list = s.select(null, true);
-			// -------------------------------------------------
-			
-			// ---------- Get keys using function (QueryTask) -------------
-			CommandResults cr = gfsh.getCommandClient().execute(new QueryTask(null, gfsh.getFetchSize(), true));
-			QueryResults results = (QueryResults)cr.getDataObject();
-			List list = (List)results.getResults();
-			if (list != null) {
-				int rowsPrinted;
-				rowsPrinted = PrintUtil.printList(list, lastRowPrinted, lastRowPrinted+1, list.size(), results.getActualSize(), localKeyList);
-				if (results.isPR()) {
-					gfsh.println("Partitioned region local dataset retrieval. The actual size maybe larger.");
-				}
-				lastRowPrinted = lastRowPrinted + rowsPrinted;
-			}
-			// ------------------------------------------------------------
-		
-			if (localKeyList == null) {
-				localKeyList = list;
-			} else if (list != null) {
-				localKeyList.addAll(list);
-			}
-		}
-		next n = (next)gfsh.getCommand("next");
-		n.setCommand(getClass().getSimpleName(), nexType);
-		
-		return null;
-	}
-	
-	private void ls_e(String command) throws Exception
-	{
-	  String regionPath = retrievePath(command);
-
-		localRegion = null;
-    if (!regionPath.equals("/")) {
-      if(!isRegionArgValid(regionPath)){
-        return;
-      }
-      regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-      localRegion = gfsh.getCache().getRegion(regionPath);
-			localKeyList = new ArrayList();
-			localRegionIterator = localRegion.entrySet().iterator();
-			lastRowPrinted = PrintUtil.printEntries(localRegion, localRegionIterator, 0, 1, gfsh.getFetchSize(), localKeyList);
-			gfsh.setLsKeyList(localKeyList);
-			
-			next n = (next)gfsh.getCommand("next");
-			n.setCommand(getClass().getSimpleName(), TYPE_LOCAL_REGION);
-			gfsh.println();
-		}
-	}
-	
-	private boolean isOption(Object object) {
-    Pattern pattern = Pattern.compile("^-[acmkrspe]");
-    Matcher matcher = pattern.matcher(object.toString());
-    if(matcher.matches()){
-      return true;
-    } else {
-      return false;
-    }
-  }
-	
-	private boolean isRegionArgValid(String regionPath){
-	  String fullRegionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-    Region<?, ?> region = RegionUtil.getLocalRegion(fullRegionPath);
-    if (region == null) {
-      if(isOption(regionPath)){
-        gfsh.println("Error: ls does not support mulitple options");
-      }else{
-        gfsh.println("Error: region does not exist - " + regionPath);
-      }
-      return false;
-    }
-    return true;
-	}
-	
-	private String retrievePath(String command){
-	  LinkedList<String> list = new LinkedList<String>();
-    Gfsh.parseCommand(command, list);
-    String regionPath;
-    if (list.size() == 2) {
-      regionPath = gfsh.getCurrentPath();
-    } else {
-      regionPath = (String) list.get(2);
-    }
-    return regionPath;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/mkdir.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/mkdir.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/mkdir.java
deleted file mode 100644
index 1db7b05..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/mkdir.java
+++ /dev/null
@@ -1,253 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.functions.util.RegionCreateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionCreateTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.RegionAttributeInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-public class mkdir implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public mkdir(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("mkdir [-g|-s] | [-?] <region path> [<attributes>]");
-		gfsh.println("      [data-policy=");
-		gfsh.println("     Create a region remotely and/or locally (local only by default). The region path can be");
-		gfsh.println("     absolute or relative.");
-		gfsh.println("     -g Create a region for all peers.");
-		gfsh.println("     -s Create a region for the connected server only.");
-		gfsh.println("     Region attributes:");
-		gfsh.println("        " + RegionAttributeInfo.CONCURRENCY_LEVEL + "=<integer [16]>");
-		gfsh.println("        " + RegionAttributeInfo.DATA_POLICY + "=" + getDataPolicyValues() + " [" + DataPolicy.NORMAL.toString().toLowerCase().replace('_', '-') + "]");
-		gfsh.println("        " + RegionAttributeInfo.EARLY_ACK + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.ENABLE_ASYNC_CONFLATION + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.ENABLE_GATEWAY + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.ENABLE_SUBSCRIPTION_CONFLATION + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.HUB_ID + "=<string>");
-		gfsh.println("        " + RegionAttributeInfo.IGNORE_JTA + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.INDEX_UPDATE_TYPE + "=" + getIndexUpdateTypeValues() + " [asynchronous]");
-		gfsh.println("        " + RegionAttributeInfo.INITIAL_CAPACITY + "=<integer> [16]");
-		gfsh.println("        " + RegionAttributeInfo.IS_LOCK_GRANTOR + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.LOAD_FACTOR + "=<float> [0.75]");
-		gfsh.println("        " + RegionAttributeInfo.MULTICAST_ENABLED + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.PUBLISHER + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.STATISTICS_ENABLED + "=" + getTrueFalseValues() + " [false]");
-		gfsh.println("        " + RegionAttributeInfo.SCOPE + "=" + getScopeValues() + " [" + Scope.DISTRIBUTED_NO_ACK.toString().toLowerCase().replace('_', '-') + "]");
-		gfsh.println("     Partition attributes:");
-		gfsh.println("        " + RegionAttributeInfo.LOCAL_MAX_MEMORY + "=<MB [90% of local heap]>");
-		gfsh.println("        " + RegionAttributeInfo.REDUNDANT_COPIES + "=<integer [0]>");
-		gfsh.println("        " + RegionAttributeInfo.TOTAL_MAX_MEMORY + "=<MB>");
-		gfsh.println("        " + RegionAttributeInfo.TOTAL_NUM_BUCKETS + "=<integer [113]>");
-		gfsh.println("     Region attribute elements:");
-		gfsh.println("        " + RegionAttributeInfo.ENTRY_IDLE_TIME_ACTION + "=" + getExpirationValues() + " [" + ExpirationAttributes.DEFAULT.getAction().toString().toLowerCase().replace('_', '-') + "]>");
-		gfsh.println("        " + RegionAttributeInfo.ENTRY_IDLE_TIME_TIMEOUT + "=<integer [" + ExpirationAttributes.DEFAULT.getTimeout() + "]>");
-		gfsh.println("        " + RegionAttributeInfo.ENTRY_TIME_TO_LIVE_ACTION + "=" + getExpirationValues() + " [" + ExpirationAttributes.DEFAULT.getAction().toString().toLowerCase().replace('_', '-') + "]>");
-		gfsh.println("        " + RegionAttributeInfo.ENTRY_TIME_TO_LIVE_TIMEOUT + "=<integer [" + ExpirationAttributes.DEFAULT.getTimeout() + "]>");
-		gfsh.println("        " + RegionAttributeInfo.REGION_IDLE_TIME_ACTION + "=" + getExpirationValues() + " [" + ExpirationAttributes.DEFAULT.getAction().toString().toLowerCase().replace('_', '-') + "]>");
-		gfsh.println("        " + RegionAttributeInfo.REGION_IDLE_TIME_TIMEOUT + "=<integer [" + ExpirationAttributes.DEFAULT.getTimeout() + "]>");
-		gfsh.println("        " + RegionAttributeInfo.REGION_TIME_TO_LIVE_ACTION + "=" + getExpirationValues() + " [" + ExpirationAttributes.DEFAULT.getAction().toString().toLowerCase().replace('_', '-') + "]>");
-		gfsh.println("        " + RegionAttributeInfo.REGION_TIME_TO_LIVE_TIMEOUT + "=<integer [" + ExpirationAttributes.DEFAULT.getTimeout() + "]>");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("mkdir -?")) {
-			help();
-		} else if (command.startsWith("mkdir -g")) {
-			mkdir_g(command);
-		} else if (command.startsWith("mkdir -s")) {
-			mkdir_s(command);
-		} else {
-			mkdir_local(command);
-		}
-	}
-	
-	private RegionAttributeInfo parseAttributes(String attributes) throws Exception
-	{
-		if (attributes == null) {
-			return null;
-		}
-		attributes = attributes.trim();
-		if (attributes.length() == 0) {
-			return null;
-		}
-		RegionAttributeInfo attributeInfo = new RegionAttributeInfo();
-		String split[] = attributes.split(" ");
-		for (int i = 0; i < split.length; i++) {
-			String pair[] = split[i].split("=");
-			attributeInfo.setAttribute(pair[0], pair[1]);
-		}
-		return attributeInfo;
-	}
-	
-	private void mkdir_g(String command) throws Exception
-	{	
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String fullPath;
-		String attributes;
-		RegionAttributeInfo attributeInfo = null;
-		if (list.size() == 2) {
-			fullPath = gfsh.getCurrentPath();
-		} else {
-			String regionPath = (String) list.get(2);
-			String currentPath = gfsh.getCurrentPath();
-			fullPath = gfsh.getFullPath(regionPath, currentPath);
-			attributes = "";
-			for (int i = 3; i < list.size(); i++) {
-				attributes += list.get(i) + " ";
-			}
-			attributeInfo = parseAttributes(attributes);
-		}
-		
-		if (fullPath.equals(gfsh.getCurrentPath())) {
-			gfsh.println("Error: must define region path: mkdir [-g] <regionPath>");
-		} else {
-			// create for the entire peers
-			List<CommandResults> resultList = (List)gfsh.getAggregator().aggregate(new RegionCreateFunction(new RegionCreateTask(fullPath, attributeInfo)), gfsh.getAggregateRegionPath());
-			int i = 1;
-			for (CommandResults commandResults : resultList) {
-				MemberInfo memberInfo = (MemberInfo)commandResults.getDataObject();
-				gfsh.print(i + ". " + memberInfo.getMemberName() + "(" + memberInfo.getMemberId() + ")" + ": ");
-				if (commandResults.getCode() == RegionCreateTask.SUCCESS_CREATED) {
-					Region region;
-					if (gfsh.isLocator()) {
-						region = RegionUtil.getRegion(fullPath, Scope.LOCAL, DataPolicy.NORMAL, gfsh.getPool(), false);
-					} else {
-						region = RegionUtil.getRegion(fullPath, Scope.LOCAL, DataPolicy.NORMAL, gfsh.getEndpoints());
-					}
-					gfsh.println("region created: " + region.getFullPath());
-				} else {
-					gfsh.println("error - " + commandResults.getCodeMessage());
-				}
-				i++;
-			}
-		}
-	}
-	
-	private void mkdir_s(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = "";
-		String attributes;
-		RegionAttributeInfo attributeInfo = null;
-		if (list.size() == 2) {
-			regionPath = gfsh.getCurrentPath();
-		} else {
-      if (!"/".equals(gfsh.getCurrentPath())) {
-        regionPath = gfsh.getCurrentPath();
-      }
-			regionPath = regionPath + "/" + (String) list.get(2);
-			attributes = "";
-			for (int i = 3; i < list.size(); i++) {
-				attributes += list.get(i) + " ";
-			}
-			attributeInfo = parseAttributes(attributes);
-		}
-		
-		if (regionPath.equals(gfsh.getCurrentPath())) {
-			gfsh.println("Error: must define region path: mkdir [-s] <regionPath>");
-		} else {
-			// create for the server only
-			CommandResults commandResults = gfsh.getCommandClient().execute(new RegionCreateTask(regionPath, attributeInfo));
-			MemberInfo memberInfo = (MemberInfo)commandResults.getDataObject();
-			gfsh.print(memberInfo.getMemberName() + "(" + memberInfo.getMemberId() + ")" + ": ");
-			if (commandResults.getCode() == RegionCreateTask.SUCCESS_CREATED) {
-				Region region = RegionUtil.getRegion(regionPath, Scope.LOCAL, DataPolicy.NORMAL, null);
-				gfsh.println("region created: " + region.getFullPath());
-			} else {
-				gfsh.println("error - " + commandResults.getCodeMessage());
-			}
-		}
-	}
-	
-	private void mkdir_local(String command) throws Exception
-	{
-		int index = command.indexOf(" ");
-		if (index == -1) {
-			gfsh.println("Current region: " + gfsh.getCurrentPath());
-		} else {
-			Cache cache = gfsh.getCache();
-			Region region;
-			String newPath = command.substring(index).trim();
-			String fullPath = gfsh.getFullPath(newPath, gfsh.getCurrentPath());
-			if (fullPath == null) {
-				gfsh.println("Error: region path must be provided. mkdir <regionPath>");
-			} else {
-				// absolute path
-				region = cache.getRegion(fullPath);
-				if (region != null) {
-					gfsh.println("Region already exists: " + region.getFullPath());
-					return;
-				}
-				if (gfsh.isLocator()) {
-					region = RegionUtil.getRegion(fullPath, Scope.LOCAL, DataPolicy.NORMAL, gfsh.getPool(), false);
-				} else {
-					region = RegionUtil.getRegion(fullPath, Scope.LOCAL, DataPolicy.NORMAL, gfsh.getEndpoints());
-				}
-				gfsh.println("Region created: " + region.getFullPath());
-			}
-		}
-	}
-	
-	
-	private static String getDataPolicyValues()
-	{
-		String all = DataPolicy.EMPTY + "|" +
-					DataPolicy.NORMAL + "|" +
-					DataPolicy.PARTITION + "|" +
-					DataPolicy.PERSISTENT_REPLICATE + "|" +
-					DataPolicy.PRELOADED + "|" +
-					DataPolicy.REPLICATE;
-		return all.toLowerCase().replace('_', '-');
-	}
-	
-	private static String getScopeValues()
-	{
-		String all = Scope.DISTRIBUTED_NO_ACK + "|" +
-					Scope.DISTRIBUTED_ACK + "|" +
-					Scope.GLOBAL + "|" +
-					Scope.LOCAL;
-		return all.toLowerCase().replace('_', '-');
-	}
-	
-	private static String getTrueFalseValues()
-	{
-		return "true|false";
-	}
-	
-	private static String getIndexUpdateTypeValues()
-	{
-		return "asynchronous|synchronous";
-	}
-	
-	private static String getExpirationValues()
-	{
-		String all = ExpirationAction.DESTROY + "|" +
-					ExpirationAction.INVALIDATE + "|" +
-					ExpirationAction.LOCAL_DESTROY + "|" +
-					ExpirationAction.LOCAL_INVALIDATE;
-		return all.toLowerCase().replace('_', '-');
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/next.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/next.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/next.java
deleted file mode 100644
index 5fb23ab..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/next.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.List;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Nextable;
-
-public class next implements CommandExecutable
-{
-	private Gfsh gfsh;
-	private String command;
-	private Object userData;
-	
-	public next(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("next | n [-?]");
-		gfsh.println("     Fetch the next set of query results.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("next -?")) {
-			help();
-		} else {
-			next();
-		}
-	}
-	
-	public void setCommand(String command, Object userData)
-	{
-		this.command = command;
-		this.userData = userData;
-	}
-	
-	public void setCommand(String command)
-	{
-		setCommand(command, null);
-	}
-	
-	public String getCommand()
-	{
-		return command;
-	}
-	
-	public Object getUserData()
-	{
-		return userData;
-	}
-	
-	public List next() throws Exception
-	{
-		Nextable nextable = (Nextable)gfsh.getCommand(command);
-		return nextable.next(userData);
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/optional/look.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/optional/look.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/optional/look.java
deleted file mode 100644
index 7d1ec35..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/optional/look.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands.optional;
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Nextable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.IndexInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.LookupService;
-import com.gemstone.gemfire.internal.tools.gfsh.app.commands.next;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-
-public class look implements CommandExecutable, Nextable
-{
-	private static LookupService lookupService;
-	
-	private Gfsh gfsh;
-	
-	public look(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-		gfsh.addEnumCommand("look");
-	}
-	
-	public void help()
-	{
-		gfsh.println("look [-i] | [-?] | [<query predicate>]");
-		gfsh.println("     Execute the compound key lookup service. This command requires");
-		gfsh.println("     the server to configure the gfcommand addon component,");
-		gfsh.println("     com.gemstone.gemfire.internal.tools.gfsh.cache.index.IndexBuilder");
-		gfsh.println("        <query predicate>: field=val1 and field2='val1'");
-		gfsh.println("                          and field3=to_date('<date>', '<format>'");
-		gfsh.println("           Primitives: no quotes");
-		gfsh.println("           String: 'string value' (single quotes)");
-		gfsh.println("           java.util.Date: to_date('<date>', '<format'>, i.e.,");
-		gfsh.println("                           to_date('10/18/2008', 'MM/dd/yyyy'");
-		gfsh.println("     -k Retrieve keys only. Values are not returned.");
-		gfsh.println("     -i Print compound key index information.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("look -?")) {
-			help();
-		} else if (command.startsWith("look -i")) {
-			look_i(command);
-		} else if (command.startsWith("look")) {
-			look(command);
-		}
-	}
-	
-	private LookupService getLookupService()
-	{
-		if (lookupService == null) {
-			lookupService = new LookupService(gfsh.getCommandClient());
-		}
-		return lookupService;
-	}
-	
-	private void look(String command) throws Exception
-	{
-		if (gfsh.getCurrentRegion() == null) {
-			gfsh.println("Error: Region undefined. Use 'cd' to change region first before executing this command.");
-			return;
-		}
-
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		
-		boolean keysOnly = false;
-		String input = null;
-		for (int i = 1; i < list.size(); i++) {
-			String token = (String)list.get(i);
-			if (token.equals("-k")) {
-				keysOnly = true;
-			} else {
-				input = token;
-			}
-		}
-		
-		if (input == null) {
-			gfsh.println("Error: look requires query predicate");
-		} else {
-			Object key = null;
-			if (keysOnly) {
-				key = gfsh.getQueryKey(list, 2);
-			} else {
-				key = gfsh.getQueryKey(list, 1);
-			}
-			
-			long startTime = 0;
-			long stopTime = 0;
-			ArrayList keyList = new ArrayList();
-			LookupService lookup = getLookupService();
-			if (keysOnly) {
-				startTime = System.currentTimeMillis();
-				Set set = lookup.keySet(gfsh.getCurrentPath(), key);
-				stopTime = System.currentTimeMillis();
-				if (gfsh.isShowResults()) {
-					PrintUtil.printSet(set, gfsh.getFetchSize(), keyList);
-				} else {
-					gfsh.println("Fetch size: " + gfsh.getFetchSize());
-					gfsh.println("   Results: " + set.size() + 
-							", Returned: " + set.size() + "/" + set.size());
-				}
-			} else {
-				startTime = System.currentTimeMillis();
-				Map map = lookup.entryMap(gfsh.getCurrentPath(), key);
-				stopTime = System.currentTimeMillis();
-
-				if (gfsh.isShowResults()) {
-					PrintUtil.printEntries(map, gfsh.getFetchSize(), keyList);
-				} else {
-					gfsh.println("Fetch size: " + gfsh.getFetchSize());
-					gfsh.println("   Results: " + map.size() + 
-							", Returned: " + map.size() + "/" + map.size());
-				}
-			}
-			gfsh.setLsKeyList(keyList);
-			if (gfsh.isShowTime()) {
-				gfsh.println("elapsed (msec): " + (stopTime - startTime));
-			}
-			next n = (next)gfsh.getCommand("next");
-			n.setCommand(getClass().getSimpleName());
-		}
-	}
-	
-	private void look_i(String command) throws Exception
-	{
-		if (gfsh.getCurrentRegion() == null) {
-			gfsh.println("Error: Region undefined. Use 'cd' to change region first before executing this command.");
-			return;
-		}
-		
-		// look -i
-		LookupService lookup = getLookupService();
-		IndexInfo[] indexInfoArray = lookup.getIndexInfoArray(gfsh.getCurrentPath());
-		if (indexInfoArray == null) {
-			System.out.println("No index info available for " + gfsh.getCurrentPath());
-		} else {
-			for (int i = 0; i < indexInfoArray.length; i++) {
-				IndexInfo indexInfo = indexInfoArray[i];
-				System.out.println((i + 1) + ". IndexInfo:");
-				System.out.println("   indexListSize = " + indexInfo.indexListSize);
-				System.out.println("   indexMapSize = " + indexInfo.indexMapSize);
-				System.out.println("   minSetSize = " + indexInfo.minSetSize);
-				System.out.println("   maxSetSize = " + indexInfo.maxSetSize);
-				System.out.println("   minSetQueryKey = " + indexInfo.minSetQueryKey);
-				System.out.println("   maxSetQueryKey = " + indexInfo.maxSetQueryKey);
-				System.out.println();
-			}
-		}
-	}
-	
-	// Next not supported
-	public List next(Object userData) throws Exception
-	{
-		gfsh.println("The command next is not supported for look.");
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/optional/perf.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/optional/perf.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/optional/perf.java
deleted file mode 100644
index 7e43361..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/optional/perf.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands.optional;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-public class perf implements CommandExecutable
-{
-	private static final String HIDDEN_REGION_NAME_PREFIX = "_"; // 1 underscore
-	
-	private Gfsh gfsh;
-//	Findbugs - unused fields
-//	private Region localRegion;
-//	private Iterator localRegionIterator;
-//	private List localKeyList;
-//	private int lastRowPrinted = 0;
-	
-	public perf(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("perf [-threads <count>]");
-		gfsh.println("     [-payload <size>]");
-		gfsh.println("     [-type put|get|delete|putall|getall|deleteall <batch size>]");
-		gfsh.println("     [-input random|sequence");
-		gfsh.println("     [-size <total entry size or count>");
-		gfsh.println("     [-key int|long|string|<class name>");
-		gfsh.println("     [-loop <count>]");
-		gfsh.println("     [-interval <count>]");
-		gfsh.println("     [<region path>]");
-		gfsh.println("     [-?]");
-		gfsh.println("     Measure throughput rates and \"put\" latency.");
-		gfsh.println("     -threads <count> The number of threads to concurrently put data into");
-		gfsh.println("         the fabric. Default: 1");
-		gfsh.println("     -payload <size> The payliod size in bytes. Perf puts byte arrays of the");
-		gfsh.println("         specified size into the fabric. Default: 100 bytes.");
-		gfsh.println("     -type put|get|delete|putall|getall|deleteall <batch size>");
-		gfsh.println("         The operation type. <batch size> is for '*all' only. Default: put");
-		gfsh.println("     -input  The input type. 'random' selects keys randomly from the range of");
-		gfsh.println("        <total entry size>. 'sequnce' sequntial keys from 1 to <total entry size");
-		gfsh.println("        and repeats until the loop count is exhausted. Default: random");
-		gfsh.println("     -size   The total size of the cache. This option is only for '-type put'");
-		gfsh.println("         and '-type putall'.");
-		gfsh.println("     -key int|long|string|<class name>  The key type. The keys of the type");
-		gfsh.println("         int or long are numerical values incremented in the loop. The keys");
-		gfsh.println("         of type string are String values formed by the prefix and the numerical");
-		gfsh.println("         values that are incremented in the loop. The default prefix is \"key\".");
-		gfsh.println("         The keys of type <class name> are supplied by the class that implements");
-		gfsh.println("         the com.gemstone.gemfire.addons.gfsh.data.PerfKey interface. The class");
-		gfsh.println("         implements getKey(int keyNum) which returns a Serializable or preferrably");
-		gfsh.println("         DataSerializable object.");
-		gfsh.println("     -loop <count>  The number of iterations per thread. Each thread invokes");
-		gfsh.println("         put() or putAll() per iteration. Default: 10000");
-		gfsh.println("     -inteval <count> The display interval. Each thread prints the average");
-		gfsh.println("         throughput and latency after each interval interation count. Default: 1000");
-		gfsh.println("     <region path>  The region to put data into. Default: current region.");
-		gfsh.println("     Default: perf -threads 1 -payload 100 -type put -input random -size 10000 -loop 10000 -interval 1000 ./");
-		
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("perf -?")) {
-			help();
-			return;
-		} 
-		
-		perf(command);
-	}
-	
-	private void perf(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		
-		int threadCount = 1;
-		int payloadSize = 100;
-		int putAllSize = 1;
-		int loopCount = 10000;
-		int interval = 1000;
-		String regionPath = null;
-		
-		int listSize = list.size();
-		for (int i = 1; i < listSize; i++) {
-			String arg = list.get(i);
-			if (arg.equals("-threads")) {
-				i++;
-				if (i >= listSize) {
-					gfsh.println("Error: '-threads' requires <count>");
-					return;
-				}
-				threadCount = Integer.parseInt(list.get(i));
-			} else if (arg.equals("-payload")) {
-				i++;
-				if (i >= listSize) {
-					gfsh.println("Error: '-payload' requires <size>");
-					return;
-				}
-				payloadSize = Integer.parseInt(list.get(i));
-			} else if (arg.equals("-putall")) {
-				i++;
-				if (i >= listSize) {
-					gfsh.println("Error: '-putall' requires <batch size>");
-					return;
-				}
-				putAllSize = Integer.parseInt(list.get(i));
-			} else if (arg.equals("-loop")) {
-				i++;
-				if (i >= listSize) {
-					gfsh.println("Error: '-loop' requires <count>");
-					return;
-				}
-				loopCount = Integer.parseInt(list.get(i));
-			} else if (arg.equals("-interval")) {
-				i++;
-				if (i >= listSize) {
-					gfsh.println("Error: '-interval' requires <count>");
-					return;
-				}
-				interval = Integer.parseInt(list.get(i));
-			} else {
-				regionPath = list.get(i);
-			}
-		}
-		if (regionPath == null) {
-			regionPath = gfsh.getCurrentPath();
-		}
-		
-		benchmark(threadCount, payloadSize, putAllSize, loopCount, interval, regionPath);
-	}
-	
-	private void benchmark(int threadCount, 
-			int payloadSize, 
-			int putAllSize,
-			int loopCount,
-			int interval,
-			String regionPath)
-	{
-		
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/pr.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/pr.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/pr.java
deleted file mode 100644
index d2d8551..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/pr.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.Aggregator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-public class pr implements CommandExecutable
-{
-	private Gfsh gfsh;
-
-	public pr(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("pr -b | -?");
-//		gfsh.println("pr [-k <member number> | -m <member id>] select <tuples where ...> | -?");
-//		gfsh.println("     Execute the specified query in the optionally specified member.");
-//		gfsh.println("           The query is executed on the local dataset of the member");
-//		gfsh.println("           if the '-m' or '-k' option is specified.");
-//		gfsh.println("     -k <member number>  Execute the query on the specified member identified");
-//		gfsh.println("           by the member number. The member numbers are the row numbers shown");
-//		gfsh.println("           in the member list displayed by executing 'size -m' or 'ls -m'.");
-//		gfsh.println("           Note that the query is executed on the local");
-//		gfsh.println("           dataset of the member if this options is specified.");
-//		gfsh.println("     -m <member id>  Execute the query on the specified member identified");
-//		gfsh.println("           the member id. The member Ids can be obtained by executing"); 
-//		gfsh.println("           'size -m' or 'ls -m'. Note that the query is executed on the local");
-//		gfsh.println("           data set of the member if this options is specified.");
-		gfsh.println("     -b    Display partitioned region bucket information");
-		
-		gfsh.println();
-	}
-	
-	private void usage()
-	{
-//		gfsh.println("pr [-k <member number> | -m <member id>] select <tuples where ...> | -?");
-		gfsh.println("pr -b | -?");
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			usage();
-			return;
-		}
-		if (list.contains("-?")) {
-			help();
-		} else if (command.contains("-b")) {
-			pr_b(command);
-		} else {
-			String queryString = command;
-			
-			pr(command, true);
-		}
-	}
-	
-	private void pr_b(String command) throws Exception
-	{
-		String regionPath = gfsh.getCurrentPath();
-
-		Aggregator aggregator = gfsh.getAggregator();
-		long startTime = System.currentTimeMillis();
-		List<AggregateResults> results = (List<AggregateResults>) gfsh.getAggregator().aggregate(
-				new GfshFunction("pr", regionPath, new Object[] { "-b" }), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-
-		int primaryBucketCount = 0;
-		int redundantBucketCount = 0;
-		int totalNumBuckets = 0;
-		int i = 0;
-		for (AggregateResults aggregateResults : results) {
-			GfshData data = (GfshData) aggregateResults.getDataObject();
-			totalNumBuckets = (Integer)data.getUserData();
-//			if (aggregateResults.getCode() == AggregateResults.CODE_ERROR) {
-//				gfsh.println("Error: " + aggregateResults.getCodeMessage());
-//				if (gfsh.isDebug() && aggregateResults.getException() != null) {
-//					aggregateResults.getException().printStackTrace();
-//				}
-//				break;
-//			}
-			Object value = data.getDataObject();
-			if (value != null) {
-				
-//				if (simulate) {
-//					columnName = "Simulated Stats";
-//				} else {
-//					columnName = "Rebalanced Stats";
-//				}
-				MemberInfo memberInfo = data.getMemberInfo();
-				Map map = (Map) value;
-//				Map primaryMap = (Map)map.get("Primary");
-				List<Mappable> primaryList = (List<Mappable>)map.get("Primary");
-				i++;
-//				gfsh.println(i + ". " + memberInfo.getMemberName() + " (" + memberInfo.getMemberId() + ")");
-				gfsh.println(i + ". Primary Buckets - " + memberInfo.getMemberName() + " (" + memberInfo.getMemberId() + ")");
-				PrintUtil.printMappableList(primaryList, "BucketId");
-				gfsh.println();
-//				Map redundantMap = (Map)map.get("Redundant");
-				List<Mappable> redundantList = (List<Mappable>)map.get("Redundant");
-				gfsh.println(i + ". Redundant Buckets - " + memberInfo.getMemberName() + " (" + memberInfo.getMemberId() + ")");
-				PrintUtil.printMappableList(redundantList, "BucketId");
-				gfsh.println();
-				
-				primaryBucketCount += primaryList.size();
-				redundantBucketCount += redundantList.size();
-			}
-		}
-		gfsh.println();
-		gfsh.println("   Primary Bucket Count: " + primaryBucketCount);
-		gfsh.println(" Redundant Bucket Count: " + redundantBucketCount);
-		gfsh.println("total-num-buckets (max): " + totalNumBuckets);
-		
-		gfsh.println();
-		
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-	
-	private void printMappableList(MemberInfo memberInfo, List<Mappable> list, int row) throws Exception
-	{
-		String columnName = "Bucket";
-		if (list != null) {
-			gfsh.println(row + ". " + memberInfo.getMemberName() + " (" + memberInfo.getMemberId() + ")");
-			PrintUtil.printMappableList(list);
-			gfsh.println();
-		}
-	}
-
-//	private void printMap(MemberInfo memberInfo, Map map, int row) throws Exception
-//	{
-//		String columnName = "Bucket";
-//		Set<Map.Entry> entrySet = map.entrySet();
-//		if (map != null && map.size() > 0) {
-//			gfsh.println(row + ". " + memberInfo.getMemberName() + " (" + memberInfo.getMemberId() + ")");
-//			PrintUtil.printEntries(map, map.size(), null, columnName, "Value", false, gfsh.isShowResults());
-//			gfsh.println();
-//		}
-//	}
-	
-	public List getRemoteKeys(String regionPath) throws Exception
-	{
-		List list = pr("select e.key from " + regionPath + ".entries e", true);	
-		return list;
-	}
-	
-	public List pr(String queryString, boolean nextEnabled) throws Exception
-	{
-		long startTime = System.currentTimeMillis();
-		CommandResults cr = gfsh.getCommandClient().execute(new QueryTask(queryString, gfsh.getFetchSize(), nextEnabled, true));
-		long stopTime = System.currentTimeMillis();
-		if (cr.getCode() == QueryTask.ERROR_QUERY) {
-			gfsh.println(cr.getCodeMessage());
-			return null;
-		}
-		QueryResults results = (QueryResults) cr.getDataObject();
-		if (results == null) {
-			gfsh.println("No results");
-			return null;
-		}
-
-		List list = null;
-		Object obj = results.getResults();
-		if (obj instanceof SelectResults) {
-			SelectResults sr = (SelectResults) results.getResults();
-			list = sr.asList();
-			int startRowNum = results.getReturnedSize() - sr.size() + 1;
-			if (gfsh.isShowResults()) {
-				int rowsPrinted = PrintUtil.printSelectResults(sr, 0, startRowNum, sr.size());
-				gfsh.println("Fetch size: " + gfsh.getFetchSize());
-				gfsh.println("   Results: " + sr.size()
-						+ ", Returned: " + results.getReturnedSize() + "/" + results.getActualSize());
-				next n = (next)gfsh.getCommand("next");
-				
-				// route the next command to select, which has the display routine
-				n.setCommand("select");
-			} else {
-				gfsh.println("Fetch size: " + gfsh.getFetchSize());
-				gfsh.println("   Results: " + sr.size() + 
-						", Returned: " + results.getReturnedSize() + "/" + results.getActualSize());
-			}
-		} else {
-			gfsh.println("Results: " + obj);
-		}
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-		return list;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/property.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/property.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/property.java
deleted file mode 100644
index 4ad167c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/property.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.ArrayList;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-public class property implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public property(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("property [<key>[=<value>]] | [-u <key>] | [?] ");
-		gfsh.println("   Sets the property that can be used using ${key},");
-		gfsh.println("   which gfsh expands with the matching value.");
-		gfsh.println();
-		gfsh.println("   -u <key> This option unsets (removes) the property.");
-		gfsh.println("            'property <key>=' (with no value) also removes the");
-		gfsh.println("             property (key).");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("property -?")) {
-			help();
-		} else if (command.startsWith("property -u")) {
-			property_u(command);
-		} else {
-			property(command);
-		}
-	}
-	
-	private void property_u(String command)
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			return;
-		} 
-		
-		String key = list.get(2);
-		gfsh.setProperty(key, null);
-	}
-	
-	private void property(String command)
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() == 1) {
-			// list all properties
-			gfsh.printProperties();
-			gfsh.println();
-			return;
-		} 
-		
-		String prop = "";
-		for (int i = 1; i < list.size(); i++) {
-			prop += list.get(i) + " ";
-		}
-		prop = prop.trim();
-		int index = prop.indexOf("=");
-		
-		if (index == -1) {
-			// show the property value
-			String key = list.get(1);
-			String value = gfsh.getProperty(key);
-			gfsh.println(key + "=" + value);
-		} else {
-			
-			String key = prop.substring(0, index);
-			String value = prop.substring(index+1);
-			
-			gfsh.setProperty(key, value);
-		}
-		
-		gfsh.println();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/put.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/put.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/put.java
deleted file mode 100644
index 22d550b..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/put.java
+++ /dev/null
@@ -1,490 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.lang.reflect.Method;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ReflectionUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.ObjectUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-
-public class put implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public put(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("put [-k] [-v] | [-?] (<key1>,<value1>)(<key2>,<value2>)...");
-		gfsh.println("put (<key1>,<value1>)(<key2>,<value2>)...");
-		gfsh.println("put -k (<key num1>,<value1>)(<key num2>,<value2>)...");
-		gfsh.println("put -v (<key1>,<value num1>)(<key2>,<value num2>)...");
-		gfsh.println("put -k -v (<key num1>,<value num1>)(<key num2>,<value num2>)...");
-		gfsh.println("     Put entries in both local and remote regions.");
-		gfsh.println("     All changes will be reflected in the server(s) also.");
-		gfsh.println("     Keys are enumerated when one of the following commands");
-		gfsh.println("     is executed: " + gfsh.getEnumCommands());
-		gfsh.println();
-		gfsh.println("     <key> and <value> support primitive, String, and java.util.Date");
-		gfsh.println("     types. These types must be specifed with special tags as follows:");
-		gfsh.println("         <decimal>b|B - Byte      (e.g., 1b)");
-		gfsh.println("         <decimal>c|C - Character (e.g., 1c)");
-		gfsh.println("         <decimal>s|S - Short     (e.g., 12s)");
-		gfsh.println("         <decimal>i|I - Integer   (e.g., 15 or 15i)");
-		gfsh.println("         <decimal>l|L - Long      (e.g., 20l)");
-		gfsh.println("         <decimal>f|F - Float     (e.g., 15.5 or 15.5f)");
-		gfsh.println("         <decimal>d|D - Double    (e.g., 20.0d)");
-		gfsh.println("         '<string with \\ delimiter>' (e.g., '\\'Wow!\\'!' Hello, world')");
-		gfsh.println("         to_date('<date string>', '<simple date format>')");
-		gfsh.println("                       (e.g., to_date('04/10/2009', 'MM/dd/yyyy')");
-		gfsh.println();
-		gfsh.println("     If a suffix letter is not specifed then it is read as Integer");
-		gfsh.println("     unless the decimal point or the letter 'e' or 'E' is specified,");
-		gfsh.println("     in which case, it is read as Double. Note that if the <key> or");
-		gfsh.println("     <value> class is used then a suffix letter is *not* required.");
-		gfsh.println();
-		gfsh.println("     <key> The key class defined by the 'key' command is used");
-		gfsh.println("           to construct the key object.");
-		gfsh.println("     <value> The value class defined by the 'value' command is used");
-		gfsh.println("           to construct the value object.");
-		gfsh.println("     The <key> and <value> objects are created using the following");
-		gfsh.println("     format:");
-		gfsh.println("         <property name1>=<property value1> and ");
-		gfsh.println("         <property name2>=<property value2> and ...");
-		gfsh.println();
-		gfsh.println("     -k Put enumerated keys. If this option is not specified, then");
-		gfsh.println("        <key> is expected.");
-		gfsh.println("     -v Put enumerated values. If this option is not specified, then");
-		gfsh.println("        <value> is expected.");
-		gfsh.println();
-		gfsh.println("     Examples:");
-		gfsh.println("        put (15L, to_date('04/10/2009', 'MM/dd/yyyy')");
-		gfsh.println("        put ('GEMSTONE', Price=125.50 and Date=to_date('04/09/2009',\\");
-		gfsh.println("             'MM/dd/yyyy')");
-		gfsh.println("        put -k -v (1, 5)  - puts the enum key 1 with the enum 5 value");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("put -?")) {
-			help();
-		} else {
-			put(command);
-		}
-	}
-	
-	private void put(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		
-		boolean keyEnumerated = false;
-		boolean valueEnumerated = false;
-		
-		String val;
-		int keyIndex = 0;
-		
-		for (int i = 1; i < list.size(); i++) {
-			val = list.get(i);
-			if (val.equals("-k")) {
-				keyEnumerated = true;
-			} else if (val.equals("-v")) {
-				valueEnumerated = true;
-			} else {
-				keyIndex = i;
-				break;
-			}
-		}
-		
-		Region region = gfsh.getCurrentRegion();
-		String numbers;
-		Object key;
-
-		if (region != null) {
-      Map map = getEntryMap(list, keyEnumerated, valueEnumerated,
-          keyIndex);
-      region.putAll(map);
-      PrintUtil.printEntries(region, map.keySet(), null);
-    } else {
-      gfsh.println("Error: Please 'cd' to the required region to perform put.");
-    }
-	}
-	
-	/**
-	 * Returns the index of the enclosed parenthesis, i.e., ')'.
-	 * @param buffer
-	 * @param startIndex
-	 * @return the index of the enclosed parenthesis
-	 */
-	private int getEnclosingParenthesis(StringBuffer buffer, int startIndex)
-	{
-		int enclosedIndex = -1;
-		int parenCount = 0;
-		boolean inQuote = false;
-		// to_date('04/09/2009', 'MM/dd/yyyy')
-		for (int i = startIndex; i < buffer.length(); i++) {
-			char c = buffer.charAt(i);
-			if (c == '(') {
-				if (inQuote == false) {
-					parenCount++;
-				}
-			} else if (c == ')') {
-				if (inQuote == false) {
-					parenCount--;
-				}
-				if (parenCount == 0) {
-					enclosedIndex = i;
-					break;
-				}
-			} else if (c == '\'') {
-				inQuote = !inQuote;
-			} 
-		}
-		return enclosedIndex;
-	}
-	
-	private Map getEntryMap(List<String> list, boolean keyEnumerated, boolean valueEnumerated, int startIndex) throws Exception
-	{
-		String pairs = "";
-		for (int i = startIndex; i < list.size(); i++) {
-			pairs += list.get(i) + " ";
-		}
-		
-		Map<String, Method> keySetterMap = ReflectionUtil.getAllSettersMap(gfsh.getQueryKeyClass());
-		Map<String, Method> valueSetterMap = ReflectionUtil.getAllSettersMap(gfsh.getValueClass());
-		Region region = gfsh.getCurrentRegion();
-		
-		// (x='1,2,3' and y='2',a='hello, world' and b='test')
-		HashMap map = new HashMap();
-		StringBuffer buffer = new StringBuffer(pairs);
-		boolean keySearch = false;
-		boolean fieldSearch = false;
-		boolean openQuote = false;
-		boolean delimiter = false;
-		boolean quoted = false;
-		boolean openParen = false;
-		String fieldString = "";
-		String valueString = "";
-		String and = "";
-		
-		Object key = null;
-		Object value = null;
-		for (int i = 0; i < buffer.length(); i++) {
-			char c = buffer.charAt(i);
-			if (c == '(') {
-				if (openQuote == false) {
-				
-					String function = null;
-					String functionCall = null;
-					String functionString = null;
-					if (valueString.length() > 0) {
-						functionString = valueString;
-					} else if (fieldString.length() > 0) {
-						functionString = fieldString;
-					}
-					if (functionString != null) {
-	
-						// it's a function
-	
-						// get enclosed parenthesis
-						int enclosedIndex = getEnclosingParenthesis(buffer, i);
-						
-						function = functionString.toLowerCase();
-						if (enclosedIndex == -1) {
-							throw new ParseException("Malformed function call: " + function, i);
-						} 
-						
-						functionCall = function + buffer.substring(i, enclosedIndex+1);
-						if (gfsh.isDebug()) {
-							gfsh.println("functionCall = |" + functionCall + "|");
-						}
-						i = enclosedIndex;
-					}
-					if (functionCall != null) {
-						if (valueString.length() > 0) {
-							valueString = functionCall;
-						} else if (fieldString.length() > 0) {
-							fieldString = functionCall;
-						}
-									
-					} else {
-						key = null;
-						value = null;
-						keySearch = true;
-						fieldSearch = true;
-						fieldString = "";
-						valueString = "";
-					}
-					
-					quoted = false;
-	
-					continue;
-				}
-				
-			} else if (c == '=') {
-				if (keySearch && key == null && keyEnumerated == false) {
-				  if (gfsh.getQueryKeyClass() == null) {
-            throw new ClassNotFoundException("Undefined key class. Use the 'key' command to set the class name");
-          }
-					key = gfsh.getQueryKeyClass().newInstance();
-				}
-				if (keySearch == false && value == null && valueEnumerated == false) {
-					if (gfsh.getValueClass() == null) {
-						throw new ClassNotFoundException("Undefined value class. Use the 'value' command to set the class name");
-					}
-					value = gfsh.getValueClass().newInstance();
-				}
-				fieldSearch = false;
-				continue;
-			} else if (c == ')') {
-				if (openQuote == false) {
-					if (gfsh.isDebug()) {
-						gfsh.println("v: field = " + fieldString);
-						gfsh.println("v: value = " + valueString);
-						gfsh.println();
-					}
-					if (valueEnumerated) {
-						Object k = gfsh.getKeyFromKeyList(Integer.parseInt(fieldString));
-						if (k == null) {
-							gfsh.println("Error: value not found in the cache for the key number " + fieldString);
-							gfsh.println("       run 'key -l' to view the enumerated keys.");
-							map.clear();
-							break;
-						}
-						value = region.get(k);
-						if (key == null) {
-							gfsh.println("Error: value not in the cache - " + fieldString);
-							map.clear();
-							break;
-						} 
-						if (gfsh.isDebug()) {
-							gfsh.println("k = " + k);
-							gfsh.println("key = " + key);
-							gfsh.println("value = " + value);
-						}
-					} else {
-						if (valueString.length() == 0) {
-							// primitive
-							value = ObjectUtil.getPrimitive(gfsh, fieldString, quoted);
-						} else {
-							updateObject(valueSetterMap, value, fieldString, valueString);
-						}
-					}
-					
-					map.put(key, value);
-					
-					fieldSearch = true;
-					quoted = false;
-					fieldString = "";
-					valueString = "";
-					key = null;
-					and = "";
-					continue;
-				}
-			} else if (c == '\\') {
-				// ignore and treat the next character as a character
-				delimiter = true;
-				continue;
-			} else if (c == '\'') {
-				if (delimiter) {
-					delimiter = false;
-				} else {
-					if (openQuote) {
-						quoted = true;
-					}
-					openQuote = !openQuote;
-					continue;
-				}
-			} else if (c == ' ') {
-				if (openQuote == false) {
-					boolean andExpected = false;
-					if (keySearch) {
-						if (gfsh.isDebug()) {
-							gfsh.println("k: field = " + fieldString);
-							gfsh.println("k: value = " + valueString);
-							gfsh.println();
-						}
-						if (fieldString.length() > 0) {
-							updateObject(keySetterMap, key, fieldString, valueString);
-							andExpected = true;
-						}
-					} else {
-						if (gfsh.isDebug()) {
-							gfsh.println("v: field = " + fieldString);
-							gfsh.println("v: value = " + valueString);
-							gfsh.println();
-						}
-						if (fieldString.length() > 0) {
-							updateObject(valueSetterMap, value, fieldString, valueString);
-							andExpected = true;
-						}
-					}
-					
-					if (andExpected) {
-						and = "";
-						int index = -1;
-						for (int j = i; j < buffer.length(); j++) {
-							and += buffer.charAt(j);
-							and = and.trim().toLowerCase();
-							if (and.equals("and")) {
-								index = j;
-								break;
-							} else if (and.length() > 3) {
-								break;
-							}
-						}
-						if (index != -1) {
-							i = index;
-						}
-					}
-					
-					fieldSearch = true;
-					fieldString = "";
-					valueString = "";
-					and = "";
-					quoted = false;
-					continue;
-				}
-			}
-			
-			if (c == ',') {
-				
-				// if ',' is not enclosed in quotes...
-				if (openQuote == false) {
-					
-					fieldString = fieldString.trim();
-					valueString = valueString.trim();
-					
-					// end of key
-					if (gfsh.isDebug()) {
-						gfsh.println("k: field = " + fieldString);
-						gfsh.println("k: value = " + valueString);
-						gfsh.println();
-					}
-					
-					if (keySearch) {
-						if (keyEnumerated) {
-							key = gfsh.getKeyFromKeyList(Integer.parseInt(fieldString));
-							if (key == null) {
-								gfsh.println("Error: value not found in the cache for the key number " + fieldString);
-								gfsh.println("       run 'key -l' to view the enumerated keys.");
-								map.clear();
-								break;
-							}
-						} else {
-							if (valueString.length() == 0) {
-								key = ObjectUtil.getPrimitive(gfsh, fieldString, quoted);
-							} else {
-								updateObject(keySetterMap, key, fieldString, valueString);
-							}
-						}
-					} else {
-						
-						if (valueEnumerated) {
-							Object k = gfsh.getKeyFromKeyList(Integer.parseInt(fieldString));
-							value = region.get(k);
-							if (value == null) {
-								gfsh.println("Error: undefined value num " + fieldString);
-								map.clear();
-								break;
-							}
-						} else {
-							if (valueString.length() == 0) {
-								value = ObjectUtil.getPrimitive(gfsh, fieldString, quoted);
-							} else {
-								
-								updateObject(valueSetterMap, value, fieldString, valueString);
-							}
-						}
-						
-					}
-					
-					fieldSearch = true;
-					keySearch = false;
-					quoted = false;
-					fieldString = "";
-					valueString = "";
-					and = "";
-					continue;
-				}	
-			} 
-			
-			if (fieldSearch) {
-				fieldString += c;
-			} else if (quoted == false) {
-				valueString += c;
-			}
-		}
-		
-		return map;
-	}
-	
-	private Object getFunctionValue(String functionCall) throws ParseException
-	{
-		if (functionCall.startsWith("to_date")) {
-			return gfsh.getDate(functionCall);
-		}
-		return null;
-	}
-	
-	private void updateObject(Map<String, Method> setterMap, Object obj, String field, String value) throws Exception
-	{
-		String setterMethodName = "set" + field.trim();
-		Method setterMethod = setterMap.get(setterMethodName);
-		if (setterMethod == null) {
-			return;
-		}
-		
-		Class types[] = setterMethod.getParameterTypes();
-		Class arg = types[0];
-		if (arg == byte.class || arg == Byte.class) {
-			setterMethod.invoke(obj, Byte.parseByte(value));
-		} else if (arg == char.class || arg == Character.class) {
-			setterMethod.invoke(obj, value.charAt(0));
-		} else if (arg == short.class || arg == Short.class) {
-			setterMethod.invoke(obj, Short.parseShort(value));
-		} else if (arg == int.class || arg == Integer.class) {
-			setterMethod.invoke(obj, Integer.parseInt(value));
-		} else if (arg == long.class || arg == Long.class) {
-			setterMethod.invoke(obj, Long.parseLong(value));
-		} else if (arg == float.class || arg == Float.class) {
-			setterMethod.invoke(obj, Float.parseFloat(value));
-		} else if (arg == double.class || arg == Double.class) {
-			setterMethod.invoke(obj, Double.parseDouble(value));
-		} else if (arg == Date.class) {
-			Date date = gfsh.getDate(value);
-			if (date == null) {
-				gfsh.println("   Unable to parse date.");
-			} else {
-				setterMethod.invoke(obj, date);
-			}
-		} else if (arg == String.class) {
-			setterMethod.invoke(obj, value);
-		} else {
-			gfsh.println("   Unsupported type: " + setterMethod.getName() + "(" + arg.getName() + ")");
-			return;
-		}
-	}
-
-	public static void main(String[] args) throws Exception
-	{
-		String command = "put (x=123 and y='2' and z=123, a='hello, world' and b=12)(x='abc' and y='de' and z=456, a='test1' and b=99')";
-		ArrayList list = new ArrayList();
-		Gfsh gfsh = new Gfsh(new String[0]);
-		put p = new put(gfsh);
-		p.getEntryMap(list, false, false, 1);	
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/pwd.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/pwd.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/pwd.java
deleted file mode 100644
index 862aa63..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/pwd.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-public class pwd implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public pwd(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("pwd [-?]");
-		gfsh.println("     Display the current region path.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("pwd -?")) {
-			help();
-		} else {
-			pwd();
-		}
-	}
-	
-	@SuppressFBWarnings(value="NM_METHOD_CONSTRUCTOR_CONFUSION",justification="This is method and not constructor")
-	private void pwd()
-	{
-		gfsh.println(gfsh.getCurrentPath());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rebalance.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rebalance.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rebalance.java
deleted file mode 100644
index 1afca99..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rebalance.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.Aggregator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-
-public class rebalance implements CommandExecutable
-{
-	private Gfsh gfsh;
-
-	public rebalance(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-
-	public void help()
-	{
-//		gfsh.println("rebalance -k <member number> | -m <member id> [-s|-r] | [-?]");
-		gfsh.println("rebalance -m <member id> [-s|-r] [-t <timeout in msec>] | [-?]");
-		gfsh.println("     Rebalance partition regions held by the specified member.");
-		gfsh.println("     By default, gfsh immediately returns after the rebalance command");
-		gfsh.println("     execution. To determine the completion of rebalancing, excute");
-		gfsh.println("     'size -m' or 'pr -b'. To wait for the rebalancing to complete,");
-		gfsh.println("     supply the '-t' option with the timeout interval in msec.");
-//		gfsh.println("     -k <member number>  Rebalance the specified member identified");
-//		gfsh.println("           by the member number. The member numbers are the row numbers shown");
-//		gfsh.println("           in the member list displayed by executing 'size -m' or 'ls -m'.");
-		gfsh.println("     -m <member id>  Execute the rebalance command on the specified member.");
-		gfsh.println("           The member Ids can be obtained by executing 'size -m' or 'ls -m'."); 
-		gfsh.println("     -s Simulate rebalancing. Actual rebalancing is NOT performed.");
-		gfsh.println("     -r Rebalance. Actual rebalancing is performed.");
-		gfsh.println("     -t <timeout in msec> Timeout rebalbancing after the specified");
-		gfsh.println("          time interval. Rebalancing will continue but gfsh will");
-		gfsh.println("          timeout upon reaching the specified time interval. This option");
-		gfsh.println("          must be used with the '-r' option. It has no effect with other");
-		gfsh.println("          options.");
-	}
-
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("rebalance -?")) {
-			help();
-		} else {
-			rebalance(command);
-		}
-	}
-
-	private Object getKeyFromInput(List list, int index) throws Exception
-	{
-		String input = (String) list.get(index);
-		Object key = null;
-		if (input.startsWith("'")) {
-			int lastIndex = -1;
-			if (input.endsWith("'") == false) {
-				lastIndex = input.length();
-			} else {
-				lastIndex = input.lastIndexOf("'");
-			}
-			if (lastIndex <= 1) {
-				gfsh.println("Error: Invalid key. Empty string not allowed.");
-				return null;
-			}
-			key = input.substring(1, lastIndex); // lastIndex exclusive
-		} else {
-			key = gfsh.getQueryKey(list, index);
-		}
-		return key;
-	}
-
-	private void rebalance(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			gfsh.println("Error: 'rebalance' requries a key number or member id");
-			return;
-		}
-
-		String regionPath = gfsh.getCurrentPath();
-		boolean simulate = true;
-		Object key = null;
-		String memberId = null;
-		long timeout = 0;
-		for (int i = 1; i < list.size(); i++) {
-			String token = list.get(i);
-			if (token.equals("-k")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-k' requires key number");
-					return;
-				}
-				int keyNum = Integer.parseInt((String) list.get(++i));
-				key = gfsh.getKeyFromKeyList(keyNum);
-
-			} else if (token.equals("-m")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-m' requires member Id");
-					return;
-				}
-				memberId = (String) list.get(++i);
-			} else if (token.equals("-s")) {
-				simulate = true;
-			} else if (token.equals("-r")) {
-				simulate = false;
-			} else if (token.equals("-t")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-t' requires a timeout value");
-					return;
-				}
-				timeout = Integer.parseInt(list.get(++i));
-			}
-		}
-
-		if (key == null && memberId == null) {
-			gfsh.println("Error: member Id not defined.");
-			return;
-		}
-		
-		
-		// Execute rebalance
-		executeRebalance(regionPath, memberId, simulate, timeout);
-	}
-
-	private void executeRebalance(String regionPath, String memberId, boolean simulate, long timeout) throws Exception
-	{
-		String currentPath = gfsh.getCurrentPath();
-		String fullPath = gfsh.getFullPath(regionPath, currentPath);
-
-		Aggregator aggregator = gfsh.getAggregator();
-		long startTime = System.currentTimeMillis();
-		List<AggregateResults> results = (List<AggregateResults>) gfsh.getAggregator().aggregate(
-				new GfshFunction("rebalance", regionPath, new Object[] { memberId, simulate, timeout }), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-
-		int i = 0;
-		for (AggregateResults aggregateResults : results) {
-			GfshData data = (GfshData) aggregateResults.getDataObject();
-//			if (aggregateResults.getCode() == AggregateResults.CODE_ERROR) {
-//				gfsh.println("Error: " + aggregateResults.getCodeMessage());
-//				if (gfsh.isDebug() && aggregateResults.getException() != null) {
-//					aggregateResults.getException().printStackTrace();
-//				}
-//				break;
-//			}
-			MemberInfo memberInfo = data.getMemberInfo();
-			Object value = data.getDataObject();
-			if (value != null) {
-				String columnName;
-				if (simulate) {
-					columnName = "Simulated Stats";
-				} else {
-					columnName = "Rebalanced Stats";
-				}
-				
-				Map map = (Map) value;
-				Set<Map.Entry> entrySet = map.entrySet();
-				if (map != null && map.size() > 0) {
-					i++;
-					gfsh.println(i + ". " + memberInfo.getMemberName() + " (" + memberInfo.getMemberId() + ")");
-					PrintUtil.printEntries(map, map.size(), null, columnName, "Value", false, gfsh.isShowResults());
-					gfsh.println();
-				}
-			} else if (memberId.equals(memberInfo.getMemberId())) {
-				if (simulate == false) {
-					gfsh.println("Reblancing has been completed or is being performed by " + memberInfo.getMemberName() + " (" + memberInfo.getMemberId() + ")");
-					gfsh.println("Use 'size -m' or 'pr -b' to view rebalance completion.");
-					gfsh.println();
-				}
-			}
-		}
-		gfsh.println();
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/refresh.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/refresh.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/refresh.java
deleted file mode 100644
index 9185b4b..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/refresh.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionPathTask;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-public class refresh implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public refresh(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("refresh [-?]");
-		gfsh.println("     Refresh the entire local cache. It fetches region");
-		gfsh.println("     information from all servers and updates local regions.");
-		gfsh.println("     It creates new regions found in the servers in the local VM.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("refresh -?")) {
-			help();
-		} else {
-			refresh();
-		}
-	}
-	
-	@SuppressFBWarnings(value="NM_METHOD_CONSTRUCTOR_CONFUSION",justification="This is method and not constructor")
-	private void refresh()
-	{
-		if (gfsh.isConnected() == false) {
-			gfsh.println("Error: gfsh is not connected to a server. Use the 'connect' command to connect first. aborting refresh");
-		}
-		
-		CommandResults results = gfsh.getCommandClient().execute(new RegionPathTask(false, true));
-		String[] regionPaths = (String[]) results.getDataObject();
-		if (regionPaths != null) {
-			Region region;
-			for (int i = 0; i < regionPaths.length; i++) {
-				if (gfsh.isLocator()) {
-					region = RegionUtil.getRegion(regionPaths[i], Scope.LOCAL, DataPolicy.NORMAL, gfsh.getPool(), false);
-				} else {
-					region = RegionUtil.getRegion(regionPaths[i], Scope.LOCAL, DataPolicy.NORMAL, gfsh.getEndpoints());
-				}
-//				if (region != null) {
-//					region.setUserAttribute(regionInfo);
-//				}
-			}
-			gfsh.println("refreshed");
-		}
-		
-		gfsh.refreshAggregatorRegion();
-	}
-}


[41/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
new file mode 100644
index 0000000..27aed67
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
@@ -0,0 +1,2529 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.management.ManagementFactory;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.ResourceBundle;
+import java.util.Set;
+
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.AttributeNotFoundException;
+import javax.management.InstanceNotFoundException;
+import javax.management.IntrospectionException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.Notification;
+import javax.management.NotificationListener;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.TabularData;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+import javax.rmi.ssl.SslRMIClientSocketFactory;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.JmxManagerFinder.JmxManagerInfo;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class JMXDataUpdater Class used for creating JMX connection and getting all
+ * the required MBeans
+ *
+ * @author Anand Hariharan
+ *
+ * @since version 7.0.Beta 2012-09-23
+ */
+public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
+
+  private final PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  private final ResourceBundle resourceBundle = Repository.get()
+      .getResourceBundle();
+
+  private JMXConnector conn = null;
+  private MBeanServerConnection mbs;
+  private final String serverName;
+  private final String port;
+  private final String userName;
+  private final String userPassword;
+  private Boolean isAddedNotiListner = false;
+  private final Cluster cluster;
+
+  // MBean object names
+  private ObjectName MBEAN_OBJECT_NAME_SYSTEM_DISTRIBUTED;
+  private ObjectName MBEAN_OBJECT_NAME_REGION_DISTRIBUTED;
+  private ObjectName MBEAN_OBJECT_NAME_MEMBER;
+  private ObjectName MBEAN_OBJECT_NAME_MEMBER_MANAGER;
+  private ObjectName MBEAN_OBJECT_NAME_STATEMENT_DISTRIBUTED;
+  private ObjectName MBEAN_OBJECT_NAME_TABLE_AGGREGATE;
+
+  private Set<ObjectName> systemMBeans = null;
+
+  private final String opSignature[] = { String.class.getName(),
+      String.class.getName(), int.class.getName() };
+
+  /**
+   * constructor used for creating JMX connection
+   */
+  public JMXDataUpdater(String server, String port, Cluster cluster) {
+    this.serverName = server;
+    this.port = port;
+    this.userName = cluster.getJmxUserName();
+    this.userPassword = cluster.getJmxUserPassword();
+    this.cluster = cluster;
+
+    try {
+      // Initialize MBean object names
+      this.MBEAN_OBJECT_NAME_SYSTEM_DISTRIBUTED = new ObjectName(
+          PulseConstants.OBJECT_NAME_SYSTEM_DISTRIBUTED);
+      this.MBEAN_OBJECT_NAME_REGION_DISTRIBUTED = new ObjectName(
+          PulseConstants.OBJECT_NAME_REGION_DISTRIBUTED);
+      this.MBEAN_OBJECT_NAME_MEMBER_MANAGER = new ObjectName(
+          PulseConstants.OBJECT_NAME_MEMBER_MANAGER);
+      this.MBEAN_OBJECT_NAME_MEMBER = new ObjectName(
+          PulseConstants.OBJECT_NAME_MEMBER);
+      this.MBEAN_OBJECT_NAME_STATEMENT_DISTRIBUTED = new ObjectName(
+          PulseConstants.OBJECT_NAME_STATEMENT_DISTRIBUTED);
+
+      // For SQLFire
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        this.MBEAN_OBJECT_NAME_TABLE_AGGREGATE = new ObjectName(
+            PulseConstants.OBJECT_NAME_TABLE_AGGREGATE);
+      }
+
+    } catch (MalformedObjectNameException e) {
+      if (LOGGER.severeEnabled()) {
+        LOGGER.severe(e.getMessage(), e);
+      }
+    } catch (NullPointerException e) {
+      if (LOGGER.severeEnabled()) {
+        LOGGER.severe(e.getMessage(), e);
+      }
+    }
+
+  }
+
+  private JMXConnector getJMXConnection() {
+    JMXConnector connection = null;
+    // Reference to repository
+    Repository repository = Repository.get();
+    try {
+
+      String jmxSerURL = "";
+
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(resourceBundle.getString("LOG_MSG_USE_LOCATOR_VALUE") + ":"
+            + repository.getJmxUseLocator());
+      }
+
+      if (repository.getJmxUseLocator()) {
+
+        String locatorHost = repository.getJmxHost();
+        int locatorPort = Integer.parseInt(repository.getJmxPort());
+
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info(resourceBundle.getString("LOG_MSG_HOST") + " : "
+              + locatorHost + " & " + resourceBundle.getString("LOG_MSG_PORT")
+              + " : " + locatorPort);
+        }
+
+        InetAddress inetAddr = InetAddress.getByName(locatorHost);
+
+        if ((inetAddr instanceof Inet4Address)
+            || (inetAddr instanceof Inet6Address)) {
+
+          if (inetAddr instanceof Inet4Address) {
+            // Locator has IPv4 Address
+            if (LOGGER.infoEnabled()) {
+              LOGGER.info(resourceBundle
+                  .getString("LOG_MSG_LOCATOR_IPV4_ADDRESS")
+                  + " - "
+                  + inetAddr.toString());
+            }
+          } else {
+            // Locator has IPv6 Address
+            if (LOGGER.infoEnabled()) {
+              LOGGER.info(resourceBundle
+                  .getString("LOG_MSG_LOCATOR_IPV6_ADDRESS")
+                  + " - "
+                  + inetAddr.toString());
+            }
+          }
+
+          JmxManagerInfo jmxManagerInfo = JmxManagerFinder
+              .askLocatorForJmxManager(inetAddr, locatorPort, 15000,
+                  repository.isUseSSLLocator());
+
+          if (jmxManagerInfo.port == 0) {
+            if (LOGGER.infoEnabled()) {
+              LOGGER.info(resourceBundle
+                  .getString("LOG_MSG_LOCATOR_COULD_NOT_FIND_MANAGER"));
+            }
+          } else {
+            if (LOGGER.infoEnabled()) {
+              LOGGER.info(resourceBundle
+                  .getString("LOG_MSG_LOCATOR_FOUND_MANAGER")
+                  + " : "
+                  + resourceBundle.getString("LOG_MSG_HOST")
+                  + " : "
+                  + jmxManagerInfo.host
+                  + " & "
+                  + resourceBundle.getString("LOG_MSG_PORT")
+                  + " : "
+                  + jmxManagerInfo.port
+                  + (jmxManagerInfo.ssl ? resourceBundle
+                      .getString("LOG_MSG_WITH_SSL") : resourceBundle
+                      .getString("LOG_MSG_WITHOUT_SSL")));
+            }
+
+            jmxSerURL = formJMXServiceURLString(jmxManagerInfo.host,
+                String.valueOf(jmxManagerInfo.port));
+          }
+
+        } /*
+           * else if (inetAddr instanceof Inet6Address) { // Locator has IPv6
+           * Address if(LOGGER.infoEnabled()){
+           * LOGGER.info(resourceBundle.getString
+           * ("LOG_MSG_LOCATOR_IPV6_ADDRESS")); } // update message to display
+           * on UI cluster.setConnectionErrorMsg(resourceBundle.getString(
+           * "LOG_MSG_JMX_CONNECTION_IPv6_ADDRESS"));
+           *
+           * }
+           */else {
+          // Locator has Invalid locator Address
+          if (LOGGER.infoEnabled()) {
+            LOGGER
+                .info(resourceBundle.getString("LOG_MSG_LOCATOR_BAD_ADDRESS"));
+          }
+          // update message to display on UI
+          cluster.setConnectionErrorMsg(resourceBundle
+              .getString("LOG_MSG_JMX_CONNECTION_BAD_ADDRESS"));
+
+        }
+
+      } else {
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info(resourceBundle.getString("LOG_MSG_HOST") + " : "
+              + this.serverName + " & "
+              + resourceBundle.getString("LOG_MSG_PORT") + " : " + this.port);
+        }
+        jmxSerURL = formJMXServiceURLString(this.serverName, this.port);
+      }
+
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(jmxSerURL)) {
+        JMXServiceURL url = new JMXServiceURL(jmxSerURL);
+
+        // String[] creds = {"controlRole", "R&D"};
+        String[] creds = { this.userName, this.userPassword };
+        Map<String, Object> env = new HashMap<String, Object>();
+
+        env.put(JMXConnector.CREDENTIALS, creds);
+
+        if (repository.isUseSSLManager()) {
+          // use ssl to connect
+          env.put("com.sun.jndi.rmi.factory.socket",
+              new SslRMIClientSocketFactory());
+        }
+
+        connection = JMXConnectorFactory.connect(url, env);
+
+        // Register Pulse URL if not already present in the JMX Manager
+        registerPulseUrlToManager(connection);
+      }
+    } catch (Exception e) {
+      if (e instanceof UnknownHostException) {
+        // update message to display on UI
+        cluster.setConnectionErrorMsg(resourceBundle
+            .getString("LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST"));
+      }
+
+      // write errors
+      StringWriter swBuffer = new StringWriter();
+      PrintWriter prtWriter = new PrintWriter(swBuffer);
+      e.printStackTrace(prtWriter);
+      LOGGER.severe("Exception Details : " + swBuffer.toString() + "\n");
+      if (this.conn != null) {
+        try {
+          this.conn.close();
+        } catch (Exception e1) {
+          LOGGER.severe("Error closing JMX connection " + swBuffer.toString()
+              + "\n");
+        }
+        this.conn = null;
+      }
+    }
+
+    return connection;
+  }
+
+  private String formJMXServiceURLString(String host, String port)
+      throws UnknownHostException {
+    /*
+     * String jmxSerURL = "service:jmx:rmi://" + serverName + "/jndi/rmi://" +
+     * serverName + ":" + port + "/jmxrmi";
+     */
+    String jmxSerURL = "";
+    if (host.equalsIgnoreCase("localhost")) {
+      // Create jmx service url for 'localhost'
+      jmxSerURL = "service:jmx:rmi://" + host + "/jndi/rmi://" + host + ":"
+          + port + "/jmxrmi";
+    } else {
+      InetAddress inetAddr = InetAddress.getByName(host);
+      if (inetAddr instanceof Inet4Address) {
+        // Create jmx service url for IPv4 address
+        jmxSerURL = "service:jmx:rmi://" + host + "/jndi/rmi://" + host + ":"
+            + port + "/jmxrmi";
+      } else if (inetAddr instanceof Inet6Address) {
+        // Create jmx service url for IPv6 address
+        jmxSerURL = "service:jmx:rmi://[" + host + "]/jndi/rmi://[" + host + "]:"
+            + port + "/jmxrmi";
+      }
+    }
+
+    return jmxSerURL;
+  }
+
+  // Method registers Pulse URL if not already present in the JMX Manager
+  private void registerPulseUrlToManager(JMXConnector connection)
+      throws IOException, AttributeNotFoundException,
+      InstanceNotFoundException, MBeanException, ReflectionException,
+      MalformedObjectNameException, InvalidAttributeValueException {
+    if (LOGGER.infoEnabled()) {
+      LOGGER.info(resourceBundle
+          .getString("LOG_MSG_REGISTERING_APP_URL_TO_MANAGER"));
+    }
+
+    // Reference to repository
+    Repository repository = Repository.get();
+
+    // Register Pulse URL if not already present in the JMX Manager
+    if (connection != null) {
+      MBeanServerConnection mbsc = connection.getMBeanServerConnection();
+
+      Set<ObjectName> mbeans = mbsc.queryNames(
+          this.MBEAN_OBJECT_NAME_MEMBER_MANAGER, null);
+
+      for (ObjectName mbeanName : mbeans) {
+        String presentUrl = (String) mbsc.getAttribute(mbeanName,
+            PulseConstants.MBEAN_MANAGER_ATTRIBUTE_PULSEURL);
+        String pulseWebAppUrl = repository.getPulseWebAppUrl();
+        if (pulseWebAppUrl != null
+            && (presentUrl == null || !pulseWebAppUrl.equals(presentUrl))) {
+          if (LOGGER.fineEnabled()) {
+            LOGGER.fine(resourceBundle
+                .getString("LOG_MSG_SETTING_APP_URL_TO_MANAGER"));
+          }
+          Attribute pulseUrlAttr = new Attribute(
+              PulseConstants.MBEAN_MANAGER_ATTRIBUTE_PULSEURL, pulseWebAppUrl);
+          mbsc.setAttribute(mbeanName, pulseUrlAttr);
+        } else {
+          if (LOGGER.fineEnabled()) {
+            LOGGER.fine(resourceBundle
+                .getString("LOG_MSG_APP_URL_ALREADY_PRESENT_IN_MANAGER"));
+          }
+        }
+      }
+    }
+  }
+
+  private boolean isConnected() {
+    // Reference to repository
+    Repository repository = Repository.get();
+    if (repository.getIsEmbeddedMode()) {
+      if (this.mbs == null) {
+        this.mbs = ManagementFactory.getPlatformMBeanServer();
+        cluster.setConnectedFlag(true);
+      }
+    } else {
+      try {
+        if (this.conn == null) {
+          cluster.setConnectedFlag(false);
+          cluster.setConnectionErrorMsg(resourceBundle
+              .getString("LOG_MSG_JMX_CONNECTION_NOT_FOUND")
+              + " "
+              + resourceBundle.getString("LOG_MSG_JMX_GETTING_NEW_CONNECTION"));
+          if (LOGGER.fineEnabled()) {
+            LOGGER.fine(resourceBundle
+                .getString("LOG_MSG_JMX_CONNECTION_NOT_FOUND")
+                + " "
+                + resourceBundle.getString("LOG_MSG_JMX_GET_NEW_CONNECTION"));
+          }
+          this.conn = getJMXConnection();
+          if (this.conn != null) {
+            this.mbs = this.conn.getMBeanServerConnection();
+            cluster.setConnectedFlag(true);
+          } else {
+            if (LOGGER.infoEnabled()) {
+              LOGGER.info(resourceBundle
+                  .getString("LOG_MSG_JMX_CONNECTION_NOT_FOUND"));
+            }
+            return false;
+          }
+        } else {
+          if (LOGGER.fineEnabled()) {
+            LOGGER.fine(resourceBundle
+                .getString("LOG_MSG_JMX_CONNECTION_IS_AVAILABLE"));
+          }
+          cluster.setConnectedFlag(true);
+          if (this.mbs == null) {
+            this.mbs = this.conn.getMBeanServerConnection();
+          }
+        }
+      } catch (Exception e) {
+        this.mbs = null;
+        if (this.conn != null) {
+          try {
+            this.conn.close();
+          } catch (Exception e1) {
+            LOGGER.severe(e);
+          }
+        }
+        this.conn = null;
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+  /**
+   * function used for updating Cluster Data.
+   */
+  @Override
+  public boolean updateData() {
+    try {
+      if (!this.isConnected()) {
+        return false;
+      }
+
+      // deleted Members
+      cluster.getDeletedMembers().clear();
+      for (Entry<String, Cluster.Member> memberSet : cluster.getMembersHMap()
+          .entrySet()) {
+        cluster.getDeletedMembers().add(memberSet.getKey());
+      }
+
+      // Deleted Regions
+      cluster.getDeletedRegions().clear();
+      for (Cluster.Region region : cluster.getClusterRegions().values()) {
+        cluster.getDeletedRegions().add(region.getFullPath());
+      }
+
+      // try {
+
+      // Cluster
+      this.systemMBeans = this.mbs.queryNames(
+          this.MBEAN_OBJECT_NAME_SYSTEM_DISTRIBUTED, null);
+      for (ObjectName sysMBean : this.systemMBeans) {
+        updateClusterSystem(sysMBean);
+      }
+
+      // Cluster Regions/Tables
+      Set<ObjectName> regionMBeans = this.mbs.queryNames(
+          this.MBEAN_OBJECT_NAME_REGION_DISTRIBUTED, null);
+
+      Set<ObjectName> tableMBeans = this.mbs.queryNames(
+          this.MBEAN_OBJECT_NAME_TABLE_AGGREGATE, null);
+
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        // For SQLfire
+        for (ObjectName tableMBean : tableMBeans) {
+          String regNameFromTable = StringUtils
+              .getRegionNameFromTableName(tableMBean.getKeyProperty("table"));
+          for (ObjectName regionMBean : regionMBeans) {
+            String regionName = regionMBean.getKeyProperty("name");
+            if (regNameFromTable.equals(regionName)) {
+              updateClusterRegion(regionMBean);
+              // Increment cluster region count
+              cluster.setTotalRegionCount(cluster.getTotalRegionCount() + 1);
+              break;
+            }
+          }
+        }
+      } else {
+        // For Gemfire
+        for (ObjectName regMBean : regionMBeans) {
+          updateClusterRegion(regMBean);
+        }
+      }
+
+      // Remove deleted regions from cluster's regions list
+      for (Iterator<String> it = cluster.getDeletedRegions().iterator(); it
+          .hasNext();) {
+        cluster.removeClusterRegion(it.next());
+      }
+
+      // Cluster Members
+      Set<ObjectName> memberMBeans = this.mbs.queryNames(
+          this.MBEAN_OBJECT_NAME_MEMBER, null);
+      for (ObjectName memMBean : memberMBeans) {
+        // member regions
+        if (memMBean.getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE) != null) {
+          if (memMBean
+              .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE)
+              .equals(PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_REGION)) {
+
+            if (PulseConstants.PRODUCT_NAME_SQLFIRE
+                .equalsIgnoreCase(PulseController.getPulseProductSupport())) {
+              // For SQLfire
+              for (ObjectName tableMBean : tableMBeans) {
+                String regNameFromTable = StringUtils
+                    .getRegionNameFromTableName(tableMBean
+                        .getKeyProperty("table"));
+                String regionName = memMBean.getKeyProperty("name");
+                if (regNameFromTable.equals(regionName)) {
+                  updateMemberRegion(memMBean);
+                  break;
+                }
+              }
+            } else {
+              // For Gemfire
+              updateMemberRegion(memMBean);
+            }
+
+          } else if (memMBean.getKeyProperty(
+              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE).equals(
+              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_CACHESERVER)) {
+            updateMemberClient(memMBean);
+          }
+          // Gateway Receiver Attributes
+          else if (memMBean.getKeyProperty(
+              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE).equals(
+              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYRECEIVER)) {
+            updateGatewayReceiver(memMBean);
+          } else if (memMBean.getKeyProperty(
+              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE).equals(
+              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYSENDER)) {
+              updateGatewaySender(memMBean);
+          } else if(memMBean.getKeyProperty(
+              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE).equals(
+              PulseConstants.MBEAN_KEY_PROPERTY_SERVICE_VALUE_ASYNCEVENTQUEUE)){
+
+              // AsyncEventQueue
+              updateAsyncEventQueue(memMBean);
+          }
+        } else {
+          // Cluster Member
+          updateClusterMember(memMBean);
+        }
+      }
+
+      // Cluster Query Statistics
+      Set<ObjectName> statementObjectNames = this.mbs.queryNames(
+          this.MBEAN_OBJECT_NAME_STATEMENT_DISTRIBUTED, null);
+      //LOGGER.info("statementObjectNames = " + statementObjectNames);
+      for (ObjectName stmtObjectName : statementObjectNames) {
+        //LOGGER.info("stmtObjectName = " + stmtObjectName);
+        updateClusterStatement(stmtObjectName);
+      }
+    } catch (IOException ioe) {
+
+      // write errors
+      StringWriter swBuffer = new StringWriter();
+      PrintWriter prtWriter = new PrintWriter(swBuffer);
+      ioe.printStackTrace(prtWriter);
+      LOGGER.severe("IOException Details : " + swBuffer.toString() + "\n");
+      this.mbs = null;
+      if (this.conn != null) {
+        try {
+          this.conn.close();
+        } catch (IOException e1) {
+          LOGGER.severe("Error closing JMX connection " + swBuffer.toString()
+              + "\n");
+        }
+      }
+
+      return false;
+    }
+
+    // If there were members deleted, remove them from the membersList &
+    // physicalToMember.
+    Iterator<String> iterator = cluster.getDeletedMembers().iterator();
+    while (iterator.hasNext()) {
+      String memberKey = iterator.next();
+      if (cluster.getMembersHMap().containsKey(memberKey)) {
+        Cluster.Member member = cluster.getMembersHMap().get(memberKey);
+        List<Cluster.Member> memberArrList = cluster.getPhysicalToMember().get(
+            member.getHost());
+        if (memberArrList != null) {
+          if (memberArrList.contains(member)) {
+            String host = member.getHost();
+            cluster.getPhysicalToMember().get(member.getHost()).remove(member);
+
+            if (cluster.getPhysicalToMember().get(member.getHost()).size() == 0) {
+              cluster.getPhysicalToMember().remove(host);
+            }
+          }
+        }
+        cluster.getMembersHMap().remove(memberKey);
+      }
+
+    }
+
+    return true;
+  }
+
+  /**
+   * function used to get attribute values of Cluster System and map them to
+   * cluster vo
+   *
+   * @param mbeanName
+   *          Cluster System MBean
+   * @throws IOException
+   *
+   */
+  private void updateClusterSystem(ObjectName mbeanName) throws IOException {
+    try {
+      if (!this.isAddedNotiListner) {
+        this.mbs.addNotificationListener(mbeanName, this, null, new Object());
+        this.isAddedNotiListner = true;
+      }
+
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        // Reset to zero
+        cluster.setServerCount(0);
+        cluster.setTotalRegionCount(0);
+      } else {
+        String[] serverCnt = (String[]) (this.mbs.invoke(mbeanName,
+            PulseConstants.MBEAN_OPERATION_LISTSERVERS, null, null));
+        cluster.setServerCount(serverCnt.length);
+      }
+
+      TabularData table = (TabularData) (this.mbs.invoke(mbeanName,
+          PulseConstants.MBEAN_OPERATION_VIEWREMOTECLUSTERSTATUS, null, null));
+
+      Collection<CompositeData> rows = (Collection<CompositeData>) table
+          .values();
+      cluster.getWanInformationObject().clear();
+      for (CompositeData row : rows) {
+        final Object key = row.get("key");
+        final Object value = row.get("value");
+        cluster.getWanInformationObject().put((String) key, (Boolean) value);
+      }
+
+      AttributeList attributeList = this.mbs.getAttributes(mbeanName,
+          PulseConstants.CLUSTER_MBEAN_ATTRIBUTES);
+
+      for (int i = 0; i < attributeList.size(); i++) {
+
+        Attribute attribute = (Attribute) attributeList.get(i);
+
+        if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_MEMBERCOUNT)) {
+          cluster.setMemberCount(getIntegerAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMCLIENTS)) {
+          cluster.setClientConnectionCount(getIntegerAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_DISTRIBUTEDSYSTEMID)) {
+          cluster.setClusterId(getIntegerAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_LOCATORCOUNT)) {
+          cluster.setLocatorCount(getIntegerAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMRUNNIGFUNCTION)) {
+          try {
+            cluster.setRunningFunctionCount(getIntegerAttribute(
+                attribute.getValue(), attribute.getName()));
+          } catch (Exception e) {
+            cluster.setRunningFunctionCount(0);
+            continue;
+          }
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_REGISTEREDCQCOUNT)) {
+          cluster.setRegisteredCQCount(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMSUBSCRIPTIONS)) {
+          cluster.setSubscriptionCount(getIntegerAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMTXNCOMMITTED)) {
+          cluster.setTxnCommittedCount(getIntegerAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMTXNROLLBACK)) {
+          cluster.setTxnRollbackCount(getIntegerAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_TOTALHEAPSIZE)) {
+          cluster.setTotalHeapSize(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_USEDHEAPSIZE)) {
+          try {
+            cluster.setUsedHeapSize(getLongAttribute(attribute.getValue(),
+                attribute.getName()));
+          } catch (Exception e) {
+            cluster.setUsedHeapSize((long) 0);
+            continue;
+          }
+          cluster.getMemoryUsageTrend().add(cluster.getUsedHeapSize());
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONENTRYCOUNT)) {
+          cluster.setTotalRegionEntryCount(getLongAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_CURRENTENTRYCOUNT)) {
+          cluster.setCurrentQueryCount(getIntegerAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_TOTALDISKUSAGE)) {
+          try {
+            cluster.setTotalBytesOnDisk(getLongAttribute(attribute.getValue(),
+                attribute.getName()));
+          } catch (Exception e) {
+            cluster.setTotalBytesOnDisk((long) 0);
+            continue;
+          }
+          cluster.getTotalBytesOnDiskTrend().add(cluster.getTotalBytesOnDisk());
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+          cluster.setDiskWritesRate(getFloatAttribute(attribute.getValue(),
+              attribute.getName()));
+          cluster.getThroughoutWritesTrend().add(cluster.getDiskWritesRate());
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_AVERAGEWRITES)) {
+          try {
+            cluster.setWritePerSec(getFloatAttribute(attribute.getValue(),
+                attribute.getName()));
+          } catch (Exception e) {
+            cluster.setWritePerSec(0);
+            continue;
+          }
+          cluster.getWritePerSecTrend().add(cluster.getWritePerSec());
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_AVERAGEREADS)) {
+          try {
+            cluster.setReadPerSec(getFloatAttribute(attribute.getValue(),
+                attribute.getName()));
+          } catch (Exception e) {
+            cluster.setReadPerSec(0);
+            continue;
+          }
+          cluster.getReadPerSecTrend().add(cluster.getReadPerSec());
+
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_QUERYREQUESTRATE)) {
+          cluster.setQueriesPerSec(getFloatAttribute(attribute.getValue(),
+              attribute.getName()));
+          cluster.getQueriesPerSecTrend().add(cluster.getQueriesPerSec());
+
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+          cluster.setDiskReadsRate(getFloatAttribute(attribute.getValue(),
+              attribute.getName()));
+          cluster.getThroughoutReadsTrend().add(cluster.getDiskReadsRate());
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_JVMPAUSES)) {
+          long trendVal = determineCurrentJVMPauses(
+              PulseConstants.JVM_PAUSES_TYPE_CLUSTER, "",
+              getLongAttribute(attribute.getValue(), attribute.getName()));
+          cluster.setGarbageCollectionCount(trendVal);
+          cluster.getGarbageCollectionTrend().add(
+              cluster.getGarbageCollectionCount());
+
+        }
+
+        // For SQLfire or Gemfire
+        if (PulseConstants.PRODUCT_NAME_SQLFIRE
+            .equalsIgnoreCase(PulseController.getPulseProductSupport())) {
+          // For SQLfire
+          // Do nothing
+        } else {
+          // For Gemfire
+          if (attribute.getName().equals(
+              PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONCOUNT)) {
+            cluster.setTotalRegionCount(getIntegerAttribute(
+                attribute.getValue(), attribute.getName()));
+          }
+        }
+
+      }
+
+      // SQLFIRE attributes
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+
+        try { // get sqlfire cluster mbean
+
+          ObjectName sfMemberMbeansObjectName = new ObjectName(
+              PulseConstants.OBJECT_NAME_SF_CLUSTER);
+
+          Set<ObjectName> sfCluserMBeans = this.mbs.queryNames(
+              sfMemberMbeansObjectName, null);
+
+          for (ObjectName sfCluserMBean : sfCluserMBeans) {
+
+            AttributeList attrList = this.mbs.getAttributes(sfCluserMBean,
+                PulseConstants.SF_CLUSTER_MBEAN_ATTRIBUTES);
+
+            for (int i = 0; i < attrList.size(); i++) {
+
+              Attribute attribute = (Attribute) attrList.get(i);
+
+              if (attribute.getName().equals(
+                  PulseConstants.MBEAN_ATTRIBUTE_PROCEDURECALLSINPROGRESS)) {
+                try {
+                  cluster.setRunningFunctionCount(getIntegerAttribute(
+                      attribute.getValue(), attribute.getName()));
+                } catch (Exception e) {
+                  cluster.setRunningFunctionCount(0);
+                  continue;
+                }
+              } else if (attribute
+                  .getName()
+                  .equals(
+                      PulseConstants.MBEAN_ATTRIBUTE_NETWORKSERVERCLIENTCONNECTIONSTATS)) {
+                // set number of cluster's clients
+                CompositeData nscConnStats = (CompositeData) attribute
+                    .getValue();
+
+                cluster.setClientConnectionCount(getLongAttribute(nscConnStats
+                    .get(PulseConstants.COMPOSITE_DATA_KEY_CONNECTIONSACTIVE),
+                    PulseConstants.COMPOSITE_DATA_KEY_CONNECTIONSACTIVE));
+              }
+            }
+            break;
+          }
+
+        } catch (MalformedObjectNameException e) {
+          LOGGER.warning(e);
+        } catch (NullPointerException e) {
+          LOGGER.warning(e);
+        }
+
+      }
+
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    } catch (MBeanException anfe) {
+      LOGGER.warning(anfe);
+    }
+  }
+
+  /**
+   * function used to get attribute values of Gateway Receiver and map them to
+   * GatewayReceiver inner class object
+   *
+   * @param mbeanName
+   * @return GatewayReceiver object
+   * @throws InstanceNotFoundException
+   * @throws IntrospectionException
+   * @throws ReflectionException
+   * @throws IOException
+   * @throws AttributeNotFoundException
+   * @throws MBeanException
+   *
+   *
+   */
+  private Cluster.GatewayReceiver initGatewayReceiver(ObjectName mbeanName)
+      throws InstanceNotFoundException, IntrospectionException,
+      ReflectionException, IOException, AttributeNotFoundException,
+      MBeanException {
+
+    Cluster.GatewayReceiver gatewayReceiver = new Cluster.GatewayReceiver();
+
+    AttributeList attributeList = this.mbs.getAttributes(mbeanName,
+        PulseConstants.GATEWAY_MBEAN_ATTRIBUTES);
+
+    for (int i = 0; i < attributeList.size(); i++) {
+      Attribute attribute = (Attribute) attributeList.get(i);
+
+      if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_PORT)) {
+        gatewayReceiver.setListeningPort(getIntegerAttribute(
+            attribute.getValue(), attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_EVENTRECEIVEDDATE)) {
+        gatewayReceiver.setLinkThroughput(getFloatAttribute(
+            attribute.getValue(), attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AVEARGEBATCHPROCESSINGTIME)) {
+        gatewayReceiver.setAvgBatchProcessingTime(getLongAttribute(
+            attribute.getValue(), attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_RUNNING)) {
+        gatewayReceiver.setStatus(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      }
+    }
+    return gatewayReceiver;
+  }
+
+  /**
+   * function used to get attribute values of Gateway Sender and map them to
+   * GatewaySender inner class object
+   *
+   * @param mbeanName
+   * @return
+   * @throws InstanceNotFoundException
+   * @throws IntrospectionException
+   * @throws ReflectionException
+   * @throws IOException
+   * @throws AttributeNotFoundException
+   * @throws MBeanException
+   */
+  private Cluster.GatewaySender initGatewaySender(ObjectName mbeanName)
+      throws InstanceNotFoundException, IntrospectionException,
+      ReflectionException, IOException, AttributeNotFoundException,
+      MBeanException {
+
+    Cluster.GatewaySender gatewaySender = new Cluster.GatewaySender();
+    AttributeList attributeList = this.mbs.getAttributes(mbeanName,
+        PulseConstants.GATEWAYSENDER_MBEAN_ATTRIBUTES);
+
+    for (int i = 0; i < attributeList.size(); i++) {
+      Attribute attribute = (Attribute) attributeList.get(i);
+      if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_EVENTRECEIVEDDATE)) {
+        gatewaySender.setLinkThroughput(getFloatAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_BATCHSIZE)) {
+        gatewaySender.setBatchSize(getIntegerAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_SENDERID)) {
+        gatewaySender.setId(getStringAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_EVENTQUEUESIZE)) {
+        gatewaySender.setQueueSize(getIntegerAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_RUNNING)) {
+        gatewaySender.setStatus(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_PRIMARY)) {
+        gatewaySender.setPrimary(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_PERSISTENCEENABLED)) {
+        gatewaySender.setPersistenceEnabled(getBooleanAttribute(
+            attribute.getValue(), attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_PARALLEL)) {
+        gatewaySender.setSenderType(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_REMOTE_DS_ID)) {
+        gatewaySender.setRemoteDSId(getIntegerAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_EVENTS_EXCEEDING_ALERT_THRESHOLD)) {
+        gatewaySender.setEventsExceedingAlertThreshold(getIntegerAttribute(attribute.getValue(),
+            attribute.getName()));
+      }
+    }
+    return gatewaySender;
+  }
+
+  /**
+   * function used for getting list of Gateway Senders from mBean for giving
+   * member and update the list of gateway senders for respective member object
+   *
+   * @param mbeanName
+   * @param memberName
+   * @throws InstanceNotFoundException
+   * @throws IntrospectionException
+   * @throws ReflectionException
+   * @throws IOException
+   * @throws AttributeNotFoundException
+   * @throws MBeanException
+   *
+   */
+  private void updateGatewaySender(ObjectName mbeanName) throws IOException {
+
+    try {
+      String memberName = mbeanName
+          .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER);
+
+      if (cluster.getMembersHMap().containsKey(memberName)) {
+        Cluster.Member existingMember = cluster.getMembersHMap()
+            .get(memberName);
+        Cluster.GatewaySender gatewaySender = initGatewaySender(mbeanName);
+        for (Iterator<Cluster.GatewaySender> it = existingMember
+            .getGatewaySenderList().iterator(); it.hasNext();) {
+          Cluster.GatewaySender exisGatewaySender = it.next();
+          if ((exisGatewaySender.getId()).equals(gatewaySender.getId())) {
+            it.remove();
+            break;
+          }
+        }
+
+        // Add gateway sender
+        existingMember.getGatewaySenderList().add(gatewaySender);
+
+      } else {
+        Cluster.Member member = new Cluster.Member();
+        member.setName(memberName);
+        member.setId(memberName);
+        Cluster.GatewaySender gatewaySender = initGatewaySender(mbeanName);
+        member.getGatewaySenderList().add(gatewaySender);
+        cluster.getMembersHMap().put(memberName, member);
+      }
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    } catch (MBeanException me) {
+      LOGGER.warning(me);
+    } catch (AttributeNotFoundException anfe) {
+      LOGGER.warning(anfe);
+    } catch (IntrospectionException ire) {
+      LOGGER.warning(ire);
+    }
+  }
+
+  /**
+   * function used to get attribute values of Async Event Queue and map them to
+   * Async Event Queue  inner class object
+   *
+   * @param mbeanName
+   * @return
+   * @throws InstanceNotFoundException
+   * @throws IntrospectionException
+   * @throws ReflectionException
+   * @throws IOException
+   * @throws AttributeNotFoundException
+   * @throws MBeanException
+   */
+  private Cluster.AsyncEventQueue initAsyncEventQueue(ObjectName mbeanName)
+      throws InstanceNotFoundException, IntrospectionException,
+      ReflectionException, IOException, AttributeNotFoundException,
+      MBeanException {
+
+    Cluster.AsyncEventQueue asyncEventQueue = new Cluster.AsyncEventQueue();
+    AttributeList attributeList = this.mbs.getAttributes(mbeanName,
+        PulseConstants.ASYNC_EVENT_QUEUE_MBEAN_ATTRIBUTES);
+
+    for (int i = 0; i < attributeList.size(); i++) {
+      Attribute attribute = (Attribute) attributeList.get(i);
+      if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AEQ_ASYNCEVENTID)) {
+        asyncEventQueue.setId(getStringAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AEQ_ASYNC_EVENT_LISTENER)) {
+        asyncEventQueue.setAsyncEventListener(getStringAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_CONFLATION_ENABLED)) {
+        asyncEventQueue.setBatchConflationEnabled(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_TIME_INTERVAL)) {
+        asyncEventQueue.setBatchTimeInterval(getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AEQ_BATCH_SIZE)) {
+        asyncEventQueue.setBatchSize(getIntegerAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AEQ_EVENT_QUEUE_SIZE)) {
+        asyncEventQueue.setEventQueueSize(getIntegerAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AEQ_PARALLEL)) {
+        asyncEventQueue.setParallel(getBooleanAttribute(
+            attribute.getValue(), attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AEQ_PRIMARY)) {
+        asyncEventQueue.setPrimary(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      }
+    }
+    return asyncEventQueue;
+  }
+
+  /**
+   * function used for getting list of Gateway Senders from mBean for giving
+   * member and update the list of gateway senders for respective member object
+   *
+   * @param mbeanName
+   * @param memberName
+   * @throws InstanceNotFoundException
+   * @throws IntrospectionException
+   * @throws ReflectionException
+   * @throws IOException
+   * @throws AttributeNotFoundException
+   * @throws MBeanException
+   *
+   */
+  private void updateAsyncEventQueue(ObjectName mbeanName) throws IOException {
+    try {
+      String memberName = mbeanName
+          .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER);
+
+      if (cluster.getMembersHMap().containsKey(memberName)) {
+        Cluster.Member existingMember = cluster.getMembersHMap()
+            .get(memberName);
+        Cluster.AsyncEventQueue asyncQ = initAsyncEventQueue(mbeanName);
+        for (Iterator<Cluster.AsyncEventQueue> it = existingMember.getAsyncEventQueueList().iterator(); it.hasNext();) {
+          Cluster.AsyncEventQueue exisAsyncEventQueue = it.next();
+          if ((exisAsyncEventQueue.getId()).equals(asyncQ.getId())) {
+            it.remove();
+            break;
+          }
+        }
+
+        // Add async event queue
+        existingMember.getAsyncEventQueueList().add(asyncQ);
+      } else {
+        Cluster.Member member = new Cluster.Member();
+        member.setName(memberName);
+        member.setId(memberName);
+
+        Cluster.AsyncEventQueue asyncQ = initAsyncEventQueue(mbeanName);
+        member.getAsyncEventQueueList().add(asyncQ);
+
+        cluster.getMembersHMap().put(memberName, member);
+      }
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    } catch (MBeanException me) {
+      LOGGER.warning(me);
+    } catch (AttributeNotFoundException anfe) {
+      LOGGER.warning(anfe);
+    } catch (IntrospectionException ire) {
+      LOGGER.warning(ire);
+    }
+  }
+
+  /**
+   * function used for getting a Gateway Receiver from mBean for giving member
+   * and update the gateway receiver for respective member object
+   *
+   * @param mbeanName
+   * @param memberName
+   * @throws InstanceNotFoundException
+   * @throws IntrospectionException
+   * @throws ReflectionException
+   * @throws IOException
+   * @throws AttributeNotFoundException
+   * @throws MBeanException
+   *
+   */
+  private void updateGatewayReceiver(ObjectName mbeanName) throws IOException {
+
+    try {
+      String memberName = mbeanName
+          .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER);
+
+      if (cluster.getMembersHMap().containsKey(memberName)) {
+        Cluster.Member existingMember = cluster.getMembersHMap()
+            .get(memberName);
+        Cluster.GatewayReceiver gatewayReceiver = initGatewayReceiver(mbeanName);
+        existingMember.setGatewayReceiver(gatewayReceiver);
+      } else {
+        Cluster.Member member = new Cluster.Member();
+        member.setName(memberName);
+        member.setId(memberName);
+        Cluster.GatewayReceiver gatewayReceiver = initGatewayReceiver(mbeanName);
+        member.setGatewayReceiver(gatewayReceiver);
+        cluster.getMembersHMap().put(memberName, member);
+      }
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    } catch (MBeanException me) {
+      LOGGER.warning(me);
+    } catch (AttributeNotFoundException anfe) {
+      LOGGER.warning(anfe);
+    } catch (IntrospectionException ire) {
+      LOGGER.warning(ire);
+    }
+  }
+
+  /**
+   * function used for getting member clients from mbean and update the clients
+   * information in member object's client arraylist
+   *
+   * @param mbeanName
+   * @param memberName
+   * @throws InstanceNotFoundException
+   * @throws IntrospectionException
+   * @throws ReflectionException
+   * @throws IOException
+   * @throws MBeanException
+   * @throws AttributeNotFoundException
+   *
+   */
+  private void updateMemberClient(ObjectName mbeanName) throws IOException {
+
+    try {
+      String memberName = mbeanName
+          .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER);
+
+      if (cluster.getMembersHMap().containsKey(memberName)) {
+        Cluster.Member existingMember = cluster.getMembersHMap()
+            .get(memberName);
+        HashMap<String, Cluster.Client> memberClientsHM = new HashMap<String, Cluster.Client>();
+
+        existingMember.setMemberPort(""
+            + this.mbs.getAttribute(mbeanName,
+                PulseConstants.MBEAN_ATTRIBUTE_PORT));
+
+        CompositeData[] compositeData = (CompositeData[]) (this.mbs.invoke(
+            mbeanName, PulseConstants.MBEAN_OPERATION_SHOWALLCLIENTS, null,
+            null));
+        for (CompositeData cmd : compositeData) {
+          Cluster.Client client = new Cluster.Client();
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_CLIENTID)) {
+            client.setId((String) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_CLIENTID));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_NAME)) {
+            client.setName((String) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_NAME));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_HOSTNAME)) {
+            client.setHost((String) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_HOSTNAME));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_QUEUESIZE)) {
+            client.setQueueSize((Integer) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_QUEUESIZE));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_PROCESSCPUTIME)) {
+            client.setProcessCpuTime((Long) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_PROCESSCPUTIME));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_UPTIME)) {
+            client.setUptime((Long) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_UPTIME));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_NUMOFTHREADS)) {
+            client.setThreads((Integer) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_NUMOFTHREADS));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_NUMOFGETS)) {
+            client.setGets((Integer) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_NUMOFGETS));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_NUMOFPUTS)) {
+            client.setPuts((Integer) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_NUMOFPUTS));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_CPUS)) {
+            client.setCpus((Integer) cmd
+                .get(PulseConstants.COMPOSITE_DATA_KEY_CPUS));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_CPUS)) {
+            client.setCpuUsage(0);
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_CONNECTED)){
+            client.setConnected((Boolean) cmd.get(PulseConstants.COMPOSITE_DATA_KEY_CONNECTED));
+          }
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_CLIENTCQCOUNT)){ 
+        	client.setClientCQCount((Integer) cmd.get(PulseConstants.COMPOSITE_DATA_KEY_CLIENTCQCOUNT)); 
+          } 
+          if (cmd.containsKey(PulseConstants.COMPOSITE_DATA_KEY_SUBSCRIPTIONENABLED)){ 
+            client.setSubscriptionEnabled((Boolean) cmd.get(PulseConstants.COMPOSITE_DATA_KEY_SUBSCRIPTIONENABLED)); 
+          } 
+          memberClientsHM.put(client.getId(), client);
+        }
+        existingMember.updateMemberClientsHMap(memberClientsHM);
+      }
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    } catch (MBeanException me) {
+      LOGGER.warning(me);
+    } catch (AttributeNotFoundException anfe) {
+      LOGGER.warning(anfe);
+    }
+  }
+
+  /**
+   * Add member specific region information on the region
+   *
+   * @param regionFullPath
+   * @param region
+   */
+  private void updateRegionOnMembers(String regionFullPath, Cluster.Region region) throws IOException {
+
+    try{
+        List<String> memberNamesTemp = region.getMemberName();
+        ArrayList<String> memberNames = new ArrayList<String>(memberNamesTemp);
+
+        List<Cluster.RegionOnMember> regionOnMemberList = new ArrayList<Cluster.RegionOnMember>();
+        List<Cluster.RegionOnMember> regionOnMemberListNew = new ArrayList<Cluster.RegionOnMember>();
+        Cluster.RegionOnMember[] regionOnMemberNames = region.getRegionOnMembers();
+
+        if ((regionOnMemberNames != null) && (regionOnMemberNames.length > 0)) {
+          regionOnMemberList = new ArrayList<Cluster.RegionOnMember>(Arrays.asList(regionOnMemberNames));
+        }
+        LOGGER.fine("updateRegionOnMembers : # regionOnMembers objects in region = " + regionOnMemberList.size());
+
+        for(Cluster.RegionOnMember anRom : regionOnMemberList) {
+
+          for(String memberName : memberNames){
+            if(anRom.getMemberName().equals(memberName)){
+              // Add regionOnMember object in new list
+              regionOnMemberListNew.add(anRom);
+
+              LOGGER.fine("updateRegionOnMembers : Processing existing Member name = " + anRom.getMemberName());
+              String objectNameROM = PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_REGION + regionFullPath + PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_MEMBER + anRom.getMemberName();
+              ObjectName regionOnMemberMBean = new ObjectName(objectNameROM);
+              LOGGER.fine("updateRegionOnMembers : Object name = " + regionOnMemberMBean.getCanonicalName());
+
+              AttributeList attributeList = this.mbs.getAttributes(regionOnMemberMBean, PulseConstants.REGION_ON_MEMBER_MBEAN_ATTRIBUTES);
+              for (int i = 0; i < attributeList.size(); i++) {
+                Attribute attribute = (Attribute) attributeList.get(i);
+                  if (attribute.getName().equals(
+                      PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE)) {
+                    anRom.setEntrySize(getLongAttribute(attribute.getValue(),
+                        attribute.getName()));
+                    LOGGER.fine("updateRegionOnMembers : anRom.getEntrySize() = " + anRom.getEntrySize());
+                  } else if (attribute.getName().equals(
+                      PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT)) {
+                    anRom.setEntryCount(getLongAttribute(attribute.getValue(),
+                        attribute.getName()));
+                    LOGGER.fine("updateRegionOnMembers : anRom.getEntryCount() = " + anRom.getEntryCount());
+                  } else if (attribute.getName().equals(
+                      PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE)) {
+                    anRom.setPutsRate(getFloatAttribute(attribute.getValue(),
+                        attribute.getName()));
+                    LOGGER.fine("updateRegionOnMembers : anRom.getPutsRate() = " + anRom.getPutsRate());
+                  } else if (attribute.getName().equals(
+                      PulseConstants.MBEAN_ATTRIBUTE_GETSRATE)) {
+                    anRom.setGetsRate(getFloatAttribute(attribute.getValue(),
+                        attribute.getName()));
+                    LOGGER.fine("updateRegionOnMembers : anRom.getGetsRate() = " + anRom.getGetsRate());
+                  } else if (attribute.getName().equals(
+                      PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+                    anRom.setDiskGetsRate(getFloatAttribute(attribute.getValue(),
+                        attribute.getName()));
+                    LOGGER.fine("updateRegionOnMembers : anRom.getDiskGetsRate() = " + anRom.getDiskGetsRate());
+                  } else if (attribute.getName().equals(
+                      PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+                    anRom.setDiskPutsRate(getFloatAttribute(attribute.getValue(),
+                        attribute.getName()));
+                    LOGGER.fine("updateRegionOnMembers : anRom.getDiskPutsRate() = " + anRom.getDiskPutsRate());
+                  } else if (attribute.getName().equals(
+                      PulseConstants.MBEAN_ATTRIBUTE_LOCALMAXMEMORY)) {
+                    anRom.setLocalMaxMemory(getIntegerAttribute(attribute.getValue(),
+                        attribute.getName()));
+                    LOGGER.fine("updateRegionOnMembers : anRom.getLocalMaxMemory() = " + anRom.getLocalMaxMemory());
+                  }
+              }
+
+              anRom.getGetsPerSecTrend().add(anRom.getGetsRate());
+              anRom.getPutsPerSecTrend().add(anRom.getPutsRate());
+              anRom.getDiskReadsPerSecTrend().add(anRom.getDiskGetsRate());
+              anRom.getDiskWritesPerSecTrend().add(anRom.getDiskPutsRate());
+              LOGGER.fine("updateRegionOnMembers : Existing member on region : getGetsRate() = " + anRom.getGetsPerSecTrend().size() + ", getPutsRate() = "
+                  + anRom.getPutsPerSecTrend().size() + ", getDiskGetsRate() = " + anRom.getDiskReadsPerSecTrend().size() + ", getDiskPutsRate() = "
+                  + anRom.getDiskWritesPerSecTrend().size());
+
+              //remove existing member names from list so only new ones will remain
+              memberNames.remove(anRom.getMemberName());
+
+              break;
+            }
+          }
+        }
+
+        LOGGER.fine("updateRegionOnMembers : Loop over remaining member names and adding new member in region. Existing count = " + regionOnMemberList.size());
+        LOGGER.fine("updateRegionOnMembers : Remaining new members in this region = " + memberNames.size());
+        //loop over the remaining regions members and add new members for this region
+        for(String memberName : memberNames) {
+          String objectNameROM = PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_REGION + regionFullPath + PulseConstants.OBJECT_NAME_REGION_ON_MEMBER_MEMBER + memberName;
+          ObjectName regionOnMemberMBean = new ObjectName(objectNameROM);
+          Cluster.RegionOnMember regionOnMember = new Cluster.RegionOnMember();
+          regionOnMember.setMemberName(memberName);
+          regionOnMember.setRegionFullPath(regionFullPath);
+          AttributeList attributeList = this.mbs.getAttributes(regionOnMemberMBean, PulseConstants.REGION_ON_MEMBER_MBEAN_ATTRIBUTES);
+          for (int i = 0; i < attributeList.size(); i++) {
+            Attribute attribute = (Attribute) attributeList.get(i);
+              if (attribute.getName().equals(
+                  PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE)) {
+                regionOnMember.setEntrySize(getLongAttribute(attribute.getValue(),
+                    attribute.getName()));
+              } else if (attribute.getName().equals(
+                  PulseConstants.MBEAN_ATTRIBUTE_ENTRYCOUNT)) {
+                regionOnMember.setEntryCount(getLongAttribute(attribute.getValue(),
+                    attribute.getName()));
+              } else if (attribute.getName().equals(
+                  PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE)) {
+                regionOnMember.setPutsRate(getFloatAttribute(attribute.getValue(),
+                    attribute.getName()));
+              } else if (attribute.getName().equals(
+                  PulseConstants.MBEAN_ATTRIBUTE_GETSRATE)) {
+                regionOnMember.setGetsRate(getFloatAttribute(attribute.getValue(),
+                    attribute.getName()));
+              } else if (attribute.getName().equals(
+                  PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+                regionOnMember.setDiskGetsRate(getFloatAttribute(attribute.getValue(),
+                    attribute.getName()));
+              } else if (attribute.getName().equals(
+                  PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+                regionOnMember.setDiskPutsRate(getFloatAttribute(attribute.getValue(),
+                    attribute.getName()));
+              } else if (attribute.getName().equals(
+                  PulseConstants.MBEAN_ATTRIBUTE_LOCALMAXMEMORY)) {
+                regionOnMember.setLocalMaxMemory(getIntegerAttribute(attribute.getValue(),
+                    attribute.getName()));
+              }
+          }
+
+          regionOnMember.getGetsPerSecTrend().add(regionOnMember.getGetsRate());
+          regionOnMember.getPutsPerSecTrend().add(regionOnMember.getPutsRate());
+          regionOnMember.getDiskReadsPerSecTrend().add(regionOnMember.getDiskGetsRate());
+          regionOnMember.getDiskWritesPerSecTrend().add(regionOnMember.getDiskPutsRate());
+
+          LOGGER.fine("updateRegionOnMembers : Adding New member on region : getGetsRate() = " + regionOnMember.getGetsRate() + ", getPutsRate() = "
+              + regionOnMember.getPutsRate() + ", getDiskGetsRate() = " + regionOnMember.getDiskGetsRate() + ", getDiskPutsRate() = "
+              + regionOnMember.getDiskPutsRate());
+
+          regionOnMemberListNew.add(regionOnMember);
+        }
+
+        //set region on member
+        region.setRegionOnMembers(regionOnMemberListNew);
+        LOGGER.fine("updateRegionOnMembers : Total regions on member in region " + region.getFullPath() + " after update = " + region.getRegionOnMembers().length);
+    } catch (MalformedObjectNameException e) {
+      LOGGER.warning(e);
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    }
+  }
+
+  /**
+   * function used to get attribute values of Cluster Region and map them to
+   * cluster region vo
+   *
+   * @param mbeanName
+   *          Cluster Region MBean
+   * @throws IOException
+   * @throws ReflectionException
+   * @throws IntrospectionException
+   * @throws InstanceNotFoundException
+   * @throws MBeanException
+   * @throws AttributeNotFoundException
+   */
+  private void updateClusterRegion(ObjectName mbeanName) throws IOException {
+
+    try {
+
+      AttributeList attributeList = this.mbs.getAttributes(mbeanName,
+          PulseConstants.REGION_MBEAN_ATTRIBUTES);
+
+      // retrieve the full path of the region
+      String regionFullPath = null;
+      for (int i = 0; i < attributeList.size(); i++) {
+        Attribute attribute = (Attribute) attributeList.get(i);
+
+        if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_FULLPATH)) {
+          regionFullPath = getStringAttribute(attribute.getValue(),
+              attribute.getName());
+          break;
+        }
+      }
+
+      Cluster.Region region = cluster.getClusterRegions().get(regionFullPath);
+
+      if (null == region) {
+        region = new Cluster.Region();
+      }
+
+      for (int i = 0; i < attributeList.size(); i++) {
+
+        Attribute attribute = (Attribute) attributeList.get(i);
+
+        if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_MEMBERS)) {
+          String memName[] = (String[]) attribute.getValue();
+          region.getMemberName().clear();
+          for (int k = 0; k < memName.length; k++) {
+            region.getMemberName().add(memName[k]);
+          }
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_FULLPATH)) {
+          region.setFullPath(getStringAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+          region.setDiskReadsRate(getFloatAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+          region.setDiskWritesRate(getFloatAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_EMPTYNODES)) {
+          region.setEmptyNode(getIntegerAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_GETSRATE)) {
+          region.setGetsRate(getFloatAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_LRUEVICTIONRATE)) {
+          region.setLruEvictionRate(getFloatAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_PUTSRATE)) {
+          region.setPutsRate(getFloatAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_REGIONTYPE)) {
+          region.setRegionType(getStringAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE)) {
+          region.setEntrySize(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_SYSTEMREGIONENTRYCOUNT)) {
+          region.setSystemRegionEntryCount(getLongAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_MEMBERCOUNT)) {
+          region.setMemberCount(getIntegerAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_PERSISTENTENABLED)) {
+          region.setPersistentEnabled(getBooleanAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NAME)) {
+          region.setName(getStringAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_GATEWAYENABLED)) {
+          region.setWanEnabled(getBooleanAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_DISKUSAGE)) {
+          region.setDiskUsage(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        }
+      }
+
+      try{// Added for Rolling upgrade
+    	  CompositeData compositeData = (CompositeData) (this.mbs.invoke(mbeanName,
+    	          PulseConstants.MBEAN_OPERATION_LISTREGIONATTRIBUTES, null, null));
+
+    	      if (compositeData != null) {
+    	        if (compositeData
+    	            .containsKey(PulseConstants.COMPOSITE_DATA_KEY_COMPRESSIONCODEC)) {
+    	          String regCompCodec = (String) compositeData
+    	              .get(PulseConstants.COMPOSITE_DATA_KEY_COMPRESSIONCODEC);
+    	          if (null != regCompCodec) {
+    	            region.setCompressionCodec(regCompCodec);
+    	          }
+    	        }
+    	        if (compositeData
+    	            .containsKey(PulseConstants.COMPOSITE_DATA_KEY_ENABLEOFFHEAPMEMORY)) {
+    	          region.setEnableOffHeapMemory((Boolean) compositeData
+    	              .get(PulseConstants.COMPOSITE_DATA_KEY_ENABLEOFFHEAPMEMORY));
+    	        }
+    	        if (compositeData
+    	            .containsKey(PulseConstants.COMPOSITE_DATA_KEY_HDFSWRITEONLY)) {
+    	          region.setHdfsWriteOnly((Boolean) compositeData
+    	              .get(PulseConstants.COMPOSITE_DATA_KEY_HDFSWRITEONLY));
+    	        }
+    	      }
+      } catch (MBeanException anfe) {
+          LOGGER.warning(anfe);
+          region.setHdfsWriteOnly(false);
+          region.setEnableOffHeapMemory(false);
+          region.setCompressionCodec("NA");
+      }catch (javax.management.RuntimeMBeanException invalidOe) {
+    	    region.setHdfsWriteOnly(false);
+            region.setEnableOffHeapMemory(false);
+            region.setCompressionCodec("NA");
+           // LOGGER.info("Some of the Pulse elements are not available currently. There might be a GemFire upgrade going on.");
+      }
+      
+
+      // TODO : Uncomment below code when sql fire mbean attributes are
+      // available
+      /*
+       * // IF SQLFIRE if
+       * (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+       * .getPulseProductSupport())) {
+       *
+       * try { String tableName = this.getTableNameFromRegionName(region
+       * .getFullPath());
+       *
+       * ObjectName tableObjName = new ObjectName(
+       * PulseConstants.OBJECT_NAME_TABLE_AGGREGATE_PATTERN + tableName);
+       *
+       * AttributeList tableAttributeList = this.mbs.getAttributes(
+       * tableObjName, PulseConstants.SF_TABLE_MBEAN_ATTRIBUTES);
+       *
+       * for (int i = 0; i < tableAttributeList.size(); i++) {
+       *
+       * Attribute attribute = (Attribute) tableAttributeList.get(i);
+       *
+       * if (attribute.getName().equals(
+       * PulseConstants.MBEAN_ATTRIBUTE_ENTRYSIZE)) {
+       * System.out.println("[SQLfire] setting entry size");
+       * region.setEntrySize(getLongAttribute(attribute.getValue(),
+       * attribute.getName())); } else if (attribute.getName().equals(
+       * PulseConstants.MBEAN_ATTRIBUTE_NUMBEROFROWS)) {
+       * System.out.println("[SQLfire] setting num of rows");
+       * region.setSystemRegionEntryCount(getLongAttribute(
+       * attribute.getValue(), attribute.getName())); } } } catch
+       * (MalformedObjectNameException e) { LOGGER.warning(e); } catch
+       * (NullPointerException e) { LOGGER.warning(e); } }
+       */
+
+      // Add to map even if region is present. If region is already there it
+      // will be a no-op.
+
+      //add for each member
+      updateRegionOnMembers(regionFullPath, region);
+
+      cluster.addClusterRegion(regionFullPath, region);
+      cluster.getDeletedRegions().remove(region.getFullPath());
+      // Memory Reads and writes
+      region.getPutsPerSecTrend().add(region.getPutsRate());
+      region.getGetsPerSecTrend().add(region.getGetsRate());
+      // Disk Reads and Writes
+      region.getDiskReadsPerSecTrend().add(region.getDiskReadsRate());
+      region.getDiskWritesPerSecTrend().add(region.getDiskWritesRate());
+
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    } 
+  }
+
+  private static boolean isQuoted(String value) {
+    final int len = value.length();
+    if (len < 2 || value.charAt(0) != '"' || value.charAt(len - 1) != '"') {
+      return false;
+    } else {
+      return true;
+    }
+  }
+
+  private void updateClusterStatement(ObjectName mbeanName) throws IOException {
+
+    try {
+
+      AttributeList attributeList = this.mbs.getAttributes(mbeanName,
+          PulseConstants.STATEMENT_MBEAN_ATTRIBUTES);
+      // retrieve the full path of the region
+      String statementDefinition = mbeanName.getKeyProperty("name");
+
+      if (isQuoted(statementDefinition)) {
+        statementDefinition = ObjectName.unquote(statementDefinition);
+      }
+
+      Cluster.Statement statement = cluster.getClusterStatements().get(
+          statementDefinition);
+
+      if (null == statement) {
+        statement = new Cluster.Statement();
+        statement.setQueryDefinition(statementDefinition);
+      }
+
+      for (int i = 0; i < attributeList.size(); i++) {
+
+        Attribute attribute = (Attribute) attributeList.get(i);
+
+        if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESCOMPILED)) {
+          statement.setNumTimesCompiled(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTION)) {
+          statement.setNumExecution(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTIONSINPROGRESS)) {
+          statement.setNumExecutionsInProgress(getLongAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESGLOBALINDEXLOOKUP)) {
+          statement.setNumTimesGlobalIndexLookup(getLongAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMROWSMODIFIED)) {
+          statement.setNumRowsModified(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_PARSETIME)) {
+          statement.setParseTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_BINDTIME)) {
+          statement.setBindTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_OPTIMIZETIME)) {
+          statement.setOptimizeTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_ROUTINGINFOTIME)) {
+          statement.setRoutingInfoTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_GENERATETIME)) {
+          statement.setGenerateTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_TOTALCOMPILATIONTIME)) {
+          statement.setTotalCompilationTime(getLongAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_EXECUTIONTIME)) {
+          statement.setExecutionTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_PROJECTIONTIME)) {
+          statement.setProjectionTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_TOTALEXECUTIONTIME)) {
+          statement.setTotalExecutionTime(getLongAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_ROWSMODIFICATIONTIME)) {
+          statement.setRowsModificationTime(getLongAttribute(
+              attribute.getValue(), attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_QNNUMROWSSEEN)) {
+          statement.setqNNumRowsSeen(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_QNMSGSENDTIME)) {
+          statement.setqNMsgSendTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        } else if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_QNMSGSERTIME)) {
+          statement.setqNMsgSerTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        }
+        if (attribute.getName().equals(
+            PulseConstants.MBEAN_ATTRIBUTE_QNRESPDESERTIME)) {
+          statement.setqNRespDeSerTime(getLongAttribute(attribute.getValue(),
+              attribute.getName()));
+        }
+      }
+
+      cluster.addClusterStatement(statementDefinition, statement);
+      // TODO : to store data for sparklines later
+      /*
+       * region.getPutsPerSecTrend().add(region.getPutsRate());
+       * region.getGetsPerSecTrend().add(region.getGetsRate());
+       */
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    }
+  }
+
+  /**
+   * function used to iterate through all member attributes and return the
+   * updated member
+   *
+   * @param attrs
+   * @param mbeanName
+   * @param member
+   * @return
+   * @throws IOException
+   * @throws ReflectionException
+   * @throws InstanceNotFoundException
+   */
+  private Cluster.Member initializeMember(ObjectName mbeanName,
+      Cluster.Member member) throws InstanceNotFoundException,
+      ReflectionException, IOException {
+
+    AttributeList attributeList = this.mbs.getAttributes(mbeanName,
+        PulseConstants.MEMBER_MBEAN_ATTRIBUTES);
+
+    for (int i = 0; i < attributeList.size(); i++) {
+
+      Attribute attribute = (Attribute) attributeList.get(i);
+
+      if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_GEMFIREVERSION)) {
+        if (member.getGemfireVersion() == null) {
+          // Set Member's GemFire Version if not set already
+          String gemfireVersion = obtainGemfireVersion(getStringAttribute(
+              attribute.getValue(), attribute.getName()));
+          member.setGemfireVersion(gemfireVersion);
+        }
+      } else if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_MANAGER)) {
+        member.setManager(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_TOTALREGIONCOUNT)) {
+        member.setTotalRegionCount(getIntegerAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_LOCATOR)) {
+        member.setLocator(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_TOTALDISKUSAGE)) {
+        member.setTotalDiskUsage(getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_SERVER)) {
+        member.setServer(getBooleanAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_TOTALFILEDESCRIPTOROPEN)) {
+        member.setTotalFileDescriptorOpen(getLongAttribute(
+            attribute.getValue(), attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_LOADAVERAGE)) {
+        member.setLoadAverage(getDoubleAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_DISKWRITESRATE)) {
+        member.setThroughputWrites(getFloatAttribute(attribute.getValue(),
+            attribute.getName()));
+        member.getThroughputWritesTrend().add(member.getThroughputWrites());
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_DISKREADSRATE)) {
+        member.setThroughputReads(getFloatAttribute(attribute.getValue(),
+            attribute.getName()));
+        member.getThroughputReadsTrend().add(member.getThroughputReads());
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_JVMPAUSES)) {
+        long trendVal = determineCurrentJVMPauses(
+            PulseConstants.JVM_PAUSES_TYPE_MEMBER, member.getName(),
+            getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+        member.setGarbageCollectionCount(trendVal);
+        member.getGarbageCollectionSamples().add(
+            member.getGarbageCollectionCount());
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_USEDMEMORY)) {
+        member.setCurrentHeapSize(getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+        member.getHeapUsageSamples().add(member.getCurrentHeapSize());
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_MAXMEMORY)) {
+        member.setMaxHeapSize(getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_NUMTHREADS)) {
+        member.setNumThreads(getIntegerAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_MEMBERUPTIME)) {
+        member.setUptime(getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName()
+          .equals(PulseConstants.MBEAN_ATTRIBUTE_HOST)) {
+        member.setHost(getStringAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_TOTALBYTESONDISK)) {
+        member.setTotalBytesOnDisk(getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+        member.getTotalBytesOnDiskSamples().add(member.getTotalBytesOnDisk());
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_CPUUSAGE)) {
+        member.setCpuUsage(getFloatAttribute(attribute.getValue(),
+            attribute.getName()));
+        member.getCpuUsageSamples().add(member.getCpuUsage());
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_HOSTCPUUSAGE)) {
+        // Float value is expected for host cpu usage.
+        // TODO Remove Float.valueOf() when float value is provided in mbean
+        member.setHostCpuUsage(Float.valueOf(getIntegerAttribute(
+            attribute.getValue(), attribute.getName())));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_MEMBER)) {
+        member.setName(getStringAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(PulseConstants.MBEAN_ATTRIBUTE_ID)) {
+        member.setId(getStringAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AVERAGEREADS)) {
+        member.setGetsRate(getFloatAttribute(attribute.getValue(),
+            attribute.getName()));
+        member.getGetsPerSecond().add(member.getGetsRate());
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_AVERAGEWRITES)) {
+        member.setPutsRate(getFloatAttribute(attribute.getValue(),
+            attribute.getName()));
+        member.getPutsPerSecond().add(member.getPutsRate());
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_OFFHEAPFREESIZE)) {
+        member.setOffHeapFreeSize(getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_OFFHEAPUSEDSIZE)) {
+        member.setOffHeapUsedSize(getLongAttribute(attribute.getValue(),
+            attribute.getName()));
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_SERVERGROUPS)) {
+        String sgValues[] = (String[]) attribute.getValue();
+        member.getServerGroups().clear();
+        for (int k = 0; k < sgValues.length; k++) {
+          member.getServerGroups().add(sgValues[k]);
+        }
+      } else if (attribute.getName().equals(
+          PulseConstants.MBEAN_ATTRIBUTE_REDUNDANCYZONES)) {
+        /*String rzValues[] = (String[]) attribute.getValue();
+        member.getRedundancyZones().clear();
+        for (int k = 0; k < rzValues.length; k++) {
+          member.getRedundancyZones().add(rzValues[k]);
+        }*/
+
+        String rzValue = "";
+        if(null != attribute.getValue()){
+          rzValue = getStringAttribute(attribute.getValue(),
+              attribute.getName());
+        }
+        member.getRedundancyZones().clear();
+        if(!rzValue.isEmpty()){
+          member.getRedundancyZones().add(rzValue);
+        }
+      }
+    }
+
+    // SQLFire specific attributes
+    if (PulseController.getPulseProductSupport().equalsIgnoreCase(
+        PulseConstants.PRODUCT_NAME_SQLFIRE)) {
+
+      try {
+        // get sqlfire mbeans
+        String memberName = mbeanName
+            .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER);
+
+        ObjectName sfMemberMbeansObjectName = new ObjectName(
+            PulseConstants.OBJECT_NAME_SF_MEMBER_PATTERN + memberName);
+
+        Set<ObjectName> sfMemberMBeans = this.mbs.queryNames(
+            sfMemberMbeansObjectName, null);
+        for (ObjectName sfMemberMBean : sfMemberMBeans) {
+
+          AttributeList attrList = this.mbs.getAttributes(sfMemberMBean,
+              PulseConstants.SF_MEMBER_MBEAN_ATTRIBUTES);
+          for (int i = 0; i < attrList.size(); i++) {
+
+            Attribute attribute = (Attribute) attrList.get(i);
+
+            if (attribute.getName().equals(
+                PulseConstants.MBEAN_ATTRIBUTE_DATASTORE)) {
+              member.setServer(getBooleanAttribute(attribute.getValue(),
+                  attribute.getName()));
+
+              // Update Server count
+              if (member.isServer()) {
+                cluster.setServerCount(cluster.getServerCount() + 1);
+              }
+            } else if (attribute.getName().equals(
+                    PulseConstants.MBEAN_ATTRIBUTE_NETWORKSERVERCLIENTCONNECTIONSTATS)) {
+
+              CompositeData nscConnStats = (CompositeData) attribute.getValue();
+
+              // Update sqlfire client count
+              member.setNumSqlfireClients(getLongAttribute(nscConnStats
+                  .get(PulseConstants.COMPOSITE_DATA_KEY_CONNECTIONSACTIVE),
+                  PulseConstants.COMPOSITE_DATA_KEY_CONNECTIONSACTIVE));
+            }
+          }
+          break;
+        }
+
+      } catch (MalformedObjectNameException e) {
+        LOGGER.warning(e);
+      } catch (NullPointerException e) {
+        LOGGER.warning(e);
+      }
+
+    }
+
+    return member;
+  }
+
+  /**
+   * function used to get attribute values of Cluster Member and map them to
+   * cluster member vo
+   *
+   * @param mbeanName
+   *          Cluster Member MBean
+   * @throws IOException
+   * @throws ReflectionException
+   * @throws IntrospectionException
+   * @throws InstanceNotFoundException
+   * @throws MBeanException
+   * @throws AttributeNotFoundException
+   *
+   */
+  private void updateClusterMember(ObjectName mbeanName) throws IOException {
+
+    try {
+      String memberName = mbeanName
+          .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER);
+
+      Cluster.Member clusterMember = cluster.getMembersHMap().get(memberName);
+
+      if (clusterMember != null) // checking if member exists or not
+      {
+        cluster.getDeletedMembers().remove(memberName);
+      } else {
+        clusterMember = new Cluster.Member();
+        cluster.getMembersHMap().put(memberName, clusterMember);
+      }
+
+      // initialize member and add to cluster's member list
+      clusterMember = initializeMember(mbeanName, clusterMember);
+      ArrayList<Cluster.Member> memberArrList = (ArrayList<Cluster.Member>) cluster
+          .getPhysicalToMember().get(clusterMember.getHost());
+      if (memberArrList != null) {
+        if (!memberArrList.contains(clusterMember)) {
+          memberArrList.add(clusterMember);
+        }
+      } else {
+        ArrayList<Cluster.Member> memberList = new ArrayList<Cluster.Member>();
+        memberList.add(clusterMember);
+        cluster.getPhysicalToMember().put(clusterMember.getHost(), memberList);
+      }
+    } catch (InstanceNotFoundException infe) {
+      LOGGER.warning(infe);
+    } catch (ReflectionException re) {
+      LOGGER.warning(re);
+    }
+  }
+
+  // /**
+  // * function used for creating member key with a combination
+  // * of member id and and member name
+  // * in key we are replacing ":" with "-" for both member id and name
+  // * @param id
+  // * @param name
+  // * @return
+  // */
+  // private String getMemberNameOrId(String id, String name){
+  // String key;
+  // if (id != null) {
+  // id = id.replace(":", "-");
+  // }
+  // if (name != null) {
+  // name = name.replace(":", "-");
+  // }
+  // key = id+name;
+  // return key;
+  // }
+  /**
+   * function used to handle Float data type if the value for mbean for an
+   * attribute is null then return 0.0 as default value else return the
+   * attribute value
+   *
+   * @param name
+   * @param mbs
+   * @param mBeanName
+   * @return
+   */
+  private Float getFloatAttribute(Object object, String name) {
+    try {
+      if (!(object.getClass().equals(Float.class))) {
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info("************************Unexpected type for attribute: "
+              + name + " Expected type: " + Float.class.getName()
+              + " Received type: " + object.getClass().getName()
+              + "************************");
+        }
+        return Float.valueOf(0.0f);
+      } else {
+        return (Float) object;
+      }
+    } catch (Exception e) {
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info("Exception Occured: " + e.getMessage());
+      }
+      return Float.valueOf(0.0f);
+    }
+  }
+
+  /**
+   * function used to handle Integer data type if the value for mbean for an
+

<TRUNCATED>


[63/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/classloader.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/classloader.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/classloader.java
deleted file mode 100644
index d06ff7d..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/classloader.java
+++ /dev/null
@@ -1,323 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.Instantiator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.InstantiatorClassLoader;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ClassFinder;
-import com.gemstone.gemfire.internal.tools.gfsh.app.pogo.KeyType;
-import com.gemstone.gemfire.internal.tools.gfsh.app.pogo.KeyTypeManager;
-
-public class classloader implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public classloader(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("class [-c <fully-qualified class name>] [-id <class id>]");
-		gfsh.println("      [-d  <DataSerializables.txt>");
-		gfsh.println("      [-jar <jar paths>]");
-		gfsh.println("      [-dir <dir path>]");
-		gfsh.println("      [-?]");
-		gfsh.println("   Load Instantiator registered data classes. All data classes");
-		gfsh.println("   that use a static block to register class ids via Instantiator");
-		gfsh.println("   must be preloaded using this command. Note that this command");
-		gfsh.println("   is NOT equivalent to setting CLASSPATH. As always, the classes");
-		gfsh.println("   and jar files must be in the class path before starting gfsh.");
-		gfsh.println("   Please run 'gfsh -?' to see more details.");
-		gfsh.println("     -c <fully-qualified class name> Load the specified class.");
-		gfsh.println("           The specified class typically contains a static block");
-		gfsh.println("           that registers class ids using GemFire Instantiator.");
-		gfsh.println("     -id <class id> if the class ID for the cass name specified with");
-		gfsh.println("            the option '-c' is not defined by Instantiator then");
-		gfsh.println("            the '-id' option must be used to assign the class id");
-		gfsh.println("            that matches the instantiator class id defined in the");
-		gfsh.println("            server's cache.xml file. This options is supported for");
-		gfsh.println("            GFE 6.x or greater.");
-		gfsh.println("     -d <DataSerializables.txt> Load the classes listed");
-		gfsh.println("           in the specified file. The file path can be relative");
-		gfsh.println("           or absolute.");
-		gfsh.println("     -jar <jar paths> Load all classes in the jar paths. The jar paths");
-		gfsh.println("            can be separated by ',', ';', or ':'. The jar paths");
-		gfsh.println("            can be relative or absolute.");
-		gfsh.println("     -dir <directory> Load all classes in the directory.");
-		gfsh.println("            The directory path can be relative or absolute.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("class -?")) {
-			help();
-		} else if (command.startsWith("class -c")) {
-			class_c(command);
-		} else if (command.startsWith("class -id")) {
-			class_c(command);
-		} else if (command.startsWith("class -dir")) {
-			class_dir(command);
-		} else if (command.startsWith("class -d")) {
-			class_d(command);
-		} else if (command.startsWith("class -jar")) {
-			class_jar(command);
-		} else {
-			gfsh.println("Error: invalid command - " + command);
-		}
-	}
-	
-	private void class_c(String command)
-	{
-		ArrayList list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		
-		if (list.size() < 2) {
-			gfsh.println("Error: must specify an option. Run 'class -?' for options");
-			return;
-		}
-		if (list.size() < 3) {
-			if (list.get(1).equals("-c")) {
-				gfsh.println("Error: must specify a fully-qualified class name");
-			} else if (list.get(1).equals("-id")) {
-				gfsh.println("Error: must specify the class id");
-			}
-			return;
-		}
-		
-		String className = null;
-		boolean classIdSpecified = false;
-		int classId = 0;
-		for (int i = 1; i < list.size(); i++) {
-			String val = (String)list.get(i);
-			if (val.equals("-c")) {
-				i++;
-				if (list.size() <= i) {
-					gfsh.println("Error: class name not specified");
-					return;
-				}
-				className = (String)list.get(i);
-			} else if (val.equals("-id")) {
-				i++;
-				if (list.size() <= i) {
-					gfsh.println("Error: class id not specified");
-					return;
-				}
-				classIdSpecified = true;
-				try {
-					classId = Integer.parseInt((String)list.get(i));
-				} catch (Exception ex) {
-					gfsh.println("Error: " + ex.getMessage());
-				}
-			}
-		}
-		
-		if (className == null) {
-			gfsh.println("Error: class name not specified");
-			return;
-		}
-		
-		try {
-			final Class clazz = Class.forName(className);
-			if (classIdSpecified) {
-				Instantiator.register(new Instantiator(clazz, classId)
-				{
-					public DataSerializable newInstance()
-					{
-						DataSerializable obj = null;
-						try {
-							obj =  (DataSerializable)clazz.newInstance();
-						} catch (Exception ex) {
-							gfsh.println("Error: unable to create a new instance of " + clazz.getCanonicalName());
-							if (gfsh.isDebug()) {
-								ex.printStackTrace();
-							}
-						}
-						return obj;
-					}
-				});
-			}
-			gfsh.println("class loaded: " + clazz.getName());
-		} catch (Exception e) {
-			gfsh.println("Error: " + e.getClass().getSimpleName() + " - " + e.getMessage());
-			if (gfsh.isDebug()) {
-				e.printStackTrace();
-			}
-		}
-	}
-	
-	private void class_d(String command)
-	{
-		ArrayList list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			gfsh.println("Error: must specify the file path of DataSerializables.txt");
-			return;
-		}
-		
-		String filePath = (String)list.get(2);
-		
-		try {
-			InstantiatorClassLoader.loadDataSerializables(filePath);
-			gfsh.println();
-			gfsh.println("application classes successfully loaded: " + filePath);
-		} catch (Exception e) {
-			gfsh.println("Error: " + e.getClass().getSimpleName() + " - " + e.getMessage() + ". Aborted.");
-			if (gfsh.isDebug()) {
-				e.printStackTrace();
-			}
-		}
-	}
-
-	private void class_jar(String command)
-	{
-		ArrayList list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			gfsh.println("Error: must specify the jar paths");
-			return;
-		}
-		
-		String jarPaths = (String)list.get(2);
-		if (jarPaths == null) {
-			return;
-		}
-		jarPaths = jarPaths.trim();
-		if (jarPaths.length() == 0) {
-			return;
-		}
-		
-		String pathSeparator = System.getProperty("path.separator");
-		try {
-			jarPaths = jarPaths.replace(pathSeparator.charAt(0), ',');
-			String split[] = jarPaths.split(",");
-			URL url[] = new URL[split.length];
-			ArrayList<String> classNameList = new ArrayList();
-			for (int i = 0; i < split.length; i++) {
-				String path = split[i];
-				File file = new File(path);
-				URI uri = file.toURI();
-				url[i] = uri.toURL();
-				String[] classNames = ClassFinder.getAllClassNames(path);
-				for (int j = 0; j < classNames.length; j++) {
-					classNameList.add(classNames[j]);
-				}
-			}
-			URLClassLoader cl = new URLClassLoader(url);
-			for (String className : classNameList) {
-				Class<?> cls = Class.forName(className, true, cl);
-				
-				// KeyType registration
-				if (KeyType.class.isAssignableFrom(cls) && 
-					cls.getSimpleName().matches(".*_v\\d++$") == false) 
-				{
-					Method method = cls.getMethod("getKeyType", (Class[])null);
-					KeyType keyType = (KeyType)method.invoke(cls, (Object[])null);
-					KeyTypeManager.registerKeyType(keyType);
-				}
-			}
-      gfsh.println();
-      gfsh.println("application classes successfully loaded from: " + jarPaths);
-		} catch (Exception ex) {
-			gfsh.println("Error: " + ex.getClass().getSimpleName() + " - " + ex.getMessage());
-			if (gfsh.isDebug()) {
-				ex.printStackTrace();
-			}
-		}
-	}
-	
-	private void class_dir(String command)
-	{
-		ArrayList list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			gfsh.println("Error: must specify the directory path");
-			return;
-		}
-		
-		String dirPath = (String)list.get(2);
-		if (dirPath == null) {
-			return;
-		}
-		dirPath = dirPath.trim();
-		if (dirPath.length() == 0) {
-			return;
-		}
-		
-		File file = new File(dirPath);
-		if (file.exists() == false) {
-			return;
-		}
-		
-		ArrayList<File> jarFileList = getJarFiles(file);
-		try {
-			ArrayList<String> classNameList = new ArrayList<String>();
-			URL url[] = new URL[jarFileList.size()];
-			int i = 0;
-			for (File file2 : jarFileList) {
-				URI uri = file2.toURI();
-				url[i++] = uri.toURL();
-				String[] classNames = ClassFinder.getAllClassNames(file2.getAbsolutePath());
-				for (int j = 0; j < classNames.length; j++) {
-					classNameList.add(classNames[j]);
-				}
-			}
-			URLClassLoader cl = new URLClassLoader(url);
-			for (String className : classNameList) {
-				Class.forName(className, true, cl);
-			}
-      gfsh.println();
-			gfsh.println("application classes successfully loaded from: " + dirPath);
-		} catch (Exception ex) {
-			gfsh.println("Error: " + ex.getClass().getSimpleName() + " - " + ex.getMessage());
-			if (gfsh.isDebug()) {
-				ex.printStackTrace();
-			}
-		}
-	}
-	
-	private ArrayList<File> getJarFiles(File dir)
-	{
-		return getJarFiles(dir, new ArrayList<File>());
-	}
-	
-	private ArrayList<File> getJarFiles(File dir, ArrayList<File> fileList)
-	{
-		File files[] = dir.listFiles(new FileFilter() {
-
-			public boolean accept(File pathname)
-			{
-				return (pathname.isDirectory() == false && pathname.getName().endsWith(".jar"));
-			}
-		});
-		
-		for (int i = 0; i < files.length; i++) {
-			fileList.add(files[i]);
-		}
-		
-		File dirs[] = dir.listFiles(new FileFilter() {
-
-			public boolean accept(File pathname)
-			{
-				return pathname.isDirectory();
-			}
-		});
-		
-		for (int i = 0; i < dirs.length; i++) {
-			fileList = getJarFiles(dirs[i], fileList);
-		}
-		
-		return fileList;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/clear.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/clear.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/clear.java
deleted file mode 100644
index f874694..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/clear.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.Aggregator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.CommandClient;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionClearTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-public class clear implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public clear(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("clear [-a|-g|-s] [<region path>] | [-?]");
-		gfsh.println("     Clear the local region. If <region path> is not specified");
-		gfsh.println("     then it clears the current region. The region path");
-		gfsh.println("     can be absolute or relative.");
-		gfsh.println("     -a Clear both the local region and the server region.");
-		gfsh.println("        The region clear will be distributed to other caches if the");
-		gfsh.println("        scope is not Scope.LOCAL.");
-		gfsh.println("     -g Clear globally. Clear the local region and all server");
-		gfsh.println("        regions regardless of scope. This option also clears server");
-		gfsh.println("        regions with Scope.LOCAL. Use this option to clear partioned");
-		gfsh.println("        regions. GFE 5.7 partitioned region is not supported.");
-		gfsh.println("     -s Clear only the server region. The local region is not cleared.");
-		gfsh.println("        The region clear will be distributed to other caches if the");
-		gfsh.println("        scope is not Scope.LOCAL.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("clear -?")) {
-			help();
-		} else if (command.startsWith("clear -a")) {
-			clear_a(command);
-		} else if (command.startsWith("clear -g")) {
-			clear_g(command);
-		} else if (command.startsWith("clear -s")) {
-			clear_s(command);
-		} else {
-			clear_local(command);
-		}
-	}
-	
-	private void clear_local(String command)
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 1) {
-			regionPath = (String)list.get(1);
-		} else {
-			regionPath = gfsh.getCurrentPath();
-		}
-		clearLocalRegion(regionPath);
-	}
-	
-	private void clearLocalRegion(String regionPath)
-	{	
-		Region region = gfsh.getCache().getRegion(regionPath);
-		if (region == null) {
-			gfsh.println("Error: Undefined region path " + regionPath);
-		} else {
-			region.localClear();
-			gfsh.println("Local region cleared: " + region.getFullPath());
-		}
-	}
-	
-	private void clear_a(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 2) {
-			regionPath = (String)list.get(2);
-		} else {
-			regionPath = gfsh.getCurrentPath();
-		}
-		
-		clear_server(regionPath, false);
-		clearLocalRegion(regionPath);
-	}
-	
-	private void clear_g(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 2) {
-			regionPath = (String)list.get(2);
-		} else {
-			regionPath = gfsh.getCurrentPath();
-		}
-		
-		clear_server(regionPath, true);
-		clearLocalRegion(regionPath);
-	}
-	
-	private void clear_s(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 2) {
-			regionPath = (String)list.get(2);
-		} else {
-			regionPath = gfsh.getCurrentPath();
-		}
-		
-		clear_server(regionPath, false);
-	}
-	
-	private void clear_server(String regionPath, boolean global) throws Exception
-	{
-		if (regionPath == null) {
-			return;
-		}
-		
-		String currentPath = gfsh.getCurrentPath();
-		String fullPath = gfsh.getFullPath(regionPath, currentPath);
-		if (fullPath == null) {
-			gfsh.println("Error: invalid region path");
-		} else if (fullPath.equals("/")) {
-			gfsh.println("Error: cannot clear top level");
-		} else {
-			
-			String confirmation = gfsh.getLine("This command will clear the region " + fullPath + " from the server(s). \nDo you want to proceed? (yes|no): ");
-			if (confirmation.equalsIgnoreCase("yes") == false) {
-				gfsh.println("Command aborted.");
-				return;
-			}
-			
-			if (global) {
-				
-				Aggregator aggregator = gfsh.getAggregator();
-				List<AggregateResults> results = (List<AggregateResults>)gfsh.getAggregator().aggregate(new GfshFunction("clear", fullPath, null), gfsh.getAggregateRegionPath());
-				
-				int i = 1;
-				for (AggregateResults aggregateResults : results) {
-					GfshData data = (GfshData)aggregateResults.getDataObject();
-					if (data.getDataObject() != null) {
-						MapMessage message = (MapMessage)data.getDataObject();
-						if (message.getBoolean("IsPeerClient")) {
-							continue;
-						}
-					}
-					MemberInfo memberInfo = data.getMemberInfo();
-					gfsh.print(i + ". " + memberInfo.getMemberName() + "(" + memberInfo.getMemberId() + ")" + ": ");
-					if (aggregateResults.getCode() == AggregateResults.CODE_ERROR) {
-						gfsh.println("error - " + aggregateResults.getCodeMessage());
-						if (gfsh.isDebug() && aggregateResults.getException() != null) {
-							aggregateResults.getException().printStackTrace();
-						}
-					} else {
-						Region region = RegionUtil.getRegion(fullPath, Scope.LOCAL, DataPolicy.NORMAL, null);
-						gfsh.println("region cleared: " + region.getFullPath());
-					}
-					i++;
-				}
-			} else {
-				CommandClient commandClient = gfsh.getCommandClient();
-				CommandResults commandResults = commandClient.execute(new RegionClearTask(fullPath));
-				MemberInfo memberInfo = (MemberInfo)commandResults.getDataObject();
-				gfsh.print(memberInfo.getMemberName() + "(" + memberInfo.getMemberId() + ")" + ": ");
-				if (commandResults.getCode() == RegionClearTask.ERROR_REGION_CLEAR) {
-					gfsh.println("error - " + commandResults.getCodeMessage());
-					if (gfsh.isDebug() && commandResults.getException() != null) {
-						commandResults.getException().printStackTrace();
-					}
-				} else {
-					Region region = RegionUtil.getRegion(regionPath, Scope.LOCAL, DataPolicy.NORMAL, null);
-					gfsh.println("region cleared: " + region.getFullPath());
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/connect.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/connect.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/connect.java
deleted file mode 100644
index 121ad3e..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/connect.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.ArrayList;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-public class connect implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public connect(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-//		gfsh.println("connect [-s <host:port> | -l <host:port> [<server group>]] [-r <region path>] | [-?]");
-		gfsh.println("connect [-s <host:port> | -l <host:port> [<server group>]] | [-?]");
-		gfsh.println("     -s <host:port>  Connect to the specified cache servers.");
-		gfsh.println("     -l <host:port> [<server group>] Connect to the specified locator");
-		gfsh.println("           and the server group if specified.");
-		//TODO: with integrated gfsh, we should not allow command regions other than __command
-//		gfsh.println("     -r <region path>  Use the specified region in making connection.");
-//		gfsh.println("            The default region path is '/__command'.");
-		gfsh.println("     -t <readTimeout>  readTimeout in msec.");
-		gfsh.println("            The default value is 300000 ms (5 min).");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("connect -?")) {
-			help();
-		} else {
-			connect(command);
-      if (gfsh.isConnected()) {
-        gfsh.execute("refresh");
-      }
-		}
-	}
-	
-	private void connect(String command)
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			gfsh.println("Error: incomplete command.");
-			return;
-		} 
-		String endpoints = null;
-		String locators = null;
-//		String regionPath = null;
-		String serverGroup = null;
-		int readTimeout = 300000;
-		try {
-			for (int i = 1; i < list.size(); i++) {
-				String token = list.get(i);
-				if (token.equals("-s")) {
-					i++;
-					endpoints = list.get(i);
-				} else if (token.equals("-l")) {
-					i++;
-					locators = list.get(i);
-					if (i < list.size() - 1) {
-						if (list.get(i+1).startsWith("-") == false) {
-							serverGroup = list.get(++i);
-						}
-					}
-				} /*else if (token.equals("-r")) {
-					i++;
-					regionPath = list.get(i);
-				}*/ else if (token.equals("-t")) {
-					i++;
-					readTimeout = Integer.parseInt(list.get(i));
-				}
-			}
-		} catch (Exception ex) {
-			gfsh.println("Error: invalid command - " + command);
-			return;
-		}
-		
-		if (endpoints != null && locators != null) {
-			gfsh.println("Error: invalid command. -s and -l are not allowed together.");
-		}
-		
-//		if (regionPath != null) {
-//			gfsh.setCommandRegionPath(regionPath);
-//		}
-		if (endpoints != null) {
-			gfsh.setEndpoints(endpoints, false, null, readTimeout);
-			connect();
-		}
-		if (locators != null) {
-			gfsh.setEndpoints(locators, true, serverGroup, readTimeout);
-			connect();
-		}
-	}
-	
-	@SuppressFBWarnings(value="NM_METHOD_CONSTRUCTOR_CONFUSION",justification="This is method and not constructor")
-	private void connect()
-	{
-		try {
-			gfsh.reconnect();
-			gfsh.setCurrentPath("/");
-			gfsh.setCurrentRegion(null);
-			if (gfsh.isConnected()) {
-				gfsh.println("connected: " + gfsh.getEndpoints());
-			} else {
-				gfsh.println("Error: Endpoints set but unable to connect: " + gfsh.getEndpoints());
-			}
-			
-		} catch (Exception ex) {
-			gfsh.println(gfsh.getCauseMessage(ex));
-      if (gfsh.isDebug()) {
-        ex.printStackTrace();
-      }
-		}
-
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/db.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/db.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/db.java
deleted file mode 100644
index e9ac31a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/db.java
+++ /dev/null
@@ -1,312 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.ArrayList;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.DBUtil;
-
-/**
- * Bulk copy to/from database.
- * @author dpark
- *
- */
-public class db implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	private DBUtil dbUtil;
-	
-	public db(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-
-	public void help()
-	{
-		gfsh.println("db [{<region path> | <oql>} {in | out} {<table name> | <sql>}]");
-		gfsh.println("   [-k [<primary column>]]");
-		gfsh.println("   [-v [primary column]]");
-		gfsh.println("   [-b <batch size>]");
-		gfsh.println("db [-driver <jdbc driver>]"); 
-		gfsh.println("   [-url <jdbc url>]");
-		gfsh.println("   [-u <user name>]");
-		gfsh.println("   [-p <password>]");
-		gfsh.println("db [-?]");
-		gfsh.println("   Load database contents into a region or store region contents to.");
-		gfsh.println("   a database table. db has 2 distinctive commands. 'db -driver...'");
-		gfsh.println("   to initialize database and 'db region_path...' to load/store ");
-		gfsh.println("   from/to database. Note that if the region is a partitioned region");
-		gfsh.println("   then the 'out' option retrieves data only from the local dataset");
-		gfsh.println("   the connected server due to the potentially large size of the");
-		gfsh.println("   partitioend region.");
-		gfsh.println();
-		gfsh.println("   {<region path> | <oql>} region path or OQL query statement. <region path>");
-		gfsh.println("               stores all of the region entries into the database table.");
-		gfsh.println("               If <oql>, the query tuples must match table column names.");
-		gfsh.println("   {in | out} 'in' for load data into the region from the database");
-		gfsh.println("              'out' for store data out to the database from the region.");
-		gfsh.println("   {<table name> | <sql>} table name or SQL query statement. <table name>");
-		gfsh.println("              loads the entire table contents.");
-		gfsh.println();
-		gfsh.println("   Requirements:");
-		gfsh.println("      The data class must have getter and setter methods for the matching");
-		gfsh.println("      query tuples. db supports case-insensitive table column names.");
-		gfsh.println("   Examples:");
-		gfsh.println("      To connect to a dababase:");
-		gfsh.println("         db -driver com.mysql.jdbc.Driver -url jdbc:mysql://localhost/market \\");
-		gfsh.println("         -u root -p root");
-		gfsh.println("      To store the /prices region entries to the price_table database table:");
-		gfsh.println("         db /prices out price_table");
-		gfsh.println("      To load database query results to a region:");
-		gfsh.println("         db /prices in \"select * from price_table");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("db -?")) {
-			help();
-		} else {
-			db(command);
-		}
-	}
-	
-	public String getDbInitCommand()
-	{
-		String dbSettings = null;
-		if (dbUtil != null) {
-			
-			String url = dbUtil.getUrl();
-			String driverName = dbUtil.getDriverName();
-			String userName = dbUtil.getUserName();
-			
-			if (url == null || driverName == null) {
-				return null;
-			}
-			
-			dbSettings = "db ";
-			if (url != null) {
-				dbSettings += "-url " + url;
-			}
-			if (driverName != null) {
-				dbSettings += " -driver " + driverName;
-			}
-			if (userName != null) {
-				dbSettings += " -u " + userName;
-			}
-		}
-		return dbSettings;
-	}
-	
-	private void db(String command) throws Exception
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		
-		
-		// options
-		boolean optionSpecified = false;
-		String driver = null;
-		String url = null;
-		String user = null;
-		String password = null;
-		boolean storeKeys = false;
-		boolean storeValues = false;
-		boolean isKeyPrimary = false;
-		boolean isValuePrimary = false;
-		String primaryColumn = null;
-		int batchSize = 1000;
-		for (int i = 0; i < list.size(); i++) {
-			String val = list.get(i);
-			if (val.equals("-driver")) {
-				i++;
-				if (list.size() > i) {
-					driver = list.get(i);
-				}
-				optionSpecified = true;
-			} else if (val.equals("-url")) {
-				i++;
-				if (list.size() > i) {
-					url = list.get(i);
-				}
-				optionSpecified = true;
-			} else if (val.equals("-u")) {
-				i++;
-				if (list.size() > i) {
-					user = list.get(i);
-				}
-				optionSpecified = true;
-			} else if (val.equals("-p")) {
-				i++;
-				if (list.size() > i) {
-					password = list.get(i);
-				}
-				optionSpecified = true;
-			} else if (val.equals("-k")) {
-				storeKeys = true;
-				if (list.size() > i+1 && list.get(i+1).startsWith("-") == false) {
-					i++;
-					primaryColumn = list.get(i);
-					isKeyPrimary = true;
-				}
-			} else if (val.equals("-v")) {
-				storeValues = true;
-				if (list.size() > i+1 && list.get(i+1).startsWith("-") == false) {
-					i++;
-					primaryColumn = list.get(i);
-					isValuePrimary = true;
-				}
-			} else if (val.equals("-b")) {
-				i++;
-				if (list.size() > i) {
-					val = list.get(i);
-					batchSize = Integer.parseInt(val);
-				}
-			}
-		}
-		
-		if (optionSpecified) {
-			if (driver == null) {
-				gfsh.println("Error: -driver not specified.");
-				return;
-			}
-			if (url == null) {
-				gfsh.println("Error: -url not specified.");
-				return;
-			}
-			
-			dbUtil = DBUtil.initialize(driver, url, user, password);
-			if (dbUtil != null) {
-				gfsh.println("Database connected.");
-			}
-			return;
-		}
-    
-    if (dbUtil == null) {
-      gfsh.println("Error: Not connected to database.");
-      return;
-    }
-		
-		// Data load/store
-		
-		// Parse command inputs
-		if (list.size() < 4) {
-			gfsh.println("Error: incomplete db command. Run db -? for help.");
-			return;
-		} 
-		String fullPath = null;
-		String regionPath = list.get(1);
-		String directionType = list.get(2);
-		
-		
-		// region 
-		Cache cache = CacheFactory.getAnyInstance();
-		Region region = null;
-		String oql = null;
-		if (regionPath.startsWith("select ") == false) {
-			regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-			region = cache.getRegion(regionPath);
-			if (region == null) {
-				gfsh.println("Error: region undefined - " + regionPath);
-				return;
-			}
-		} else {
-			oql = regionPath;
-		}
-		
-		// in | out
-		boolean isIn = false;
-		if (directionType.equalsIgnoreCase("in")) {
-			isIn = true;
-		} else if (directionType.equalsIgnoreCase("out")) {
-			isIn = false;
-		} else {
-			gfsh.println("Error: invalid direction type - " + directionType);
-			return;
-		}
-		
-		// table or query
-		
-		if (isIn) {
-			String sql = list.get(3); // sql can be a table name. if table, select * is performed
-			dbIn(region, sql, primaryColumn);
-		} else {
-			String tableName = list.get(3);
-			if (storeKeys == false && storeValues == false) {
-				storeValues = true;
-			}
-			
-			// value primary overrides key primary. 
-			// cannot have two primary columns. only one primary allowed.
-			if (isValuePrimary) {
-				isKeyPrimary = false;
-			}
-			int storeType = DBUtil.TYPE_VALUES;
-			if (storeKeys && storeValues) {
-				storeType = DBUtil.TYPE_KEYS_VALUES;
-			} else if (storeKeys) {
-				storeType = DBUtil.TYPE_KEYS;
-			}
-			dbOut(regionPath, tableName, storeType, primaryColumn, isKeyPrimary, batchSize);
-		}
-	}
-	
-	private void dbIn(Region region, String sql, String primaryColumn) throws Exception
-	{
-		long startTime = System.currentTimeMillis();
-		int rowCount = dbUtil.loadDB(gfsh, region, gfsh.getQueryKeyClass(), gfsh.getValueClass(), sql, primaryColumn);
-		long stopTime = System.currentTimeMillis();
-		
-		gfsh.println("db in complete");
-		gfsh.println("       To (region): " + region.getFullPath());
-		gfsh.println("   From (database): " + sql);
-		gfsh.println("         Row count: " + rowCount);
-		if (gfsh.isShowTime()) {
-			gfsh.println("    elapsed (msec): " + (stopTime - startTime));
-		}
-	}	
-
-//	private void dbOut(Region region, String tableName, 
-//			int storeType, String primaryColumn, 
-//			boolean isKeyPrimary) throws Exception
-//	{
-//		long startTime = System.currentTimeMillis();
-//		int rowCount = dbUtil.storeDB(gfsh, region, tableName, storeType, primaryColumn, isKeyPrimary);
-//		long stopTime = System.currentTimeMillis();
-//
-//		gfsh.println("db out complete");
-//		gfsh.println("   Copied from: " + region.getFullPath());
-//		gfsh.println("     Copied to: " + tableName);
-//		gfsh.println("     Row count: " + rowCount);
-//		if (gfsh.isShowTime()) {
-//			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-//		}	
-//	}
-//	
-	private void dbOut(String regionPath, String tableName, 
-			int storeType, String primaryColumn, 
-			boolean isKeyPrimary, int batchSize) throws Exception
-	{
-		long startTime = System.currentTimeMillis();
-		int rowCount = dbUtil.storeDB(gfsh, regionPath, tableName, storeType, primaryColumn, isKeyPrimary, batchSize);
-		long stopTime = System.currentTimeMillis();
-
-		if (rowCount == -1) {
-			return;
-		}
-		
-		gfsh.println("db out complete");
-		gfsh.println("   From (region): " + regionPath);
-		gfsh.println("   To (database): " + tableName);
-		gfsh.println("       Row count: " + rowCount);
-		
-		if (gfsh.isShowTime()) {
-			gfsh.println("  elapsed (msec): " + (stopTime - startTime));
-		}
-		
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/debug.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/debug.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/debug.java
deleted file mode 100644
index 329d0aa..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/debug.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.ArrayList;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-public class debug implements CommandExecutable {
-	private Gfsh gfsh;
-
-	public debug(Gfsh gfsh) {
-		this.gfsh = gfsh;
-	}
-
-	public void help() {
-		gfsh.println("debug [true|false] | [-?]");
-		gfsh.println("     Toggle the debug setting. If debug is true then execptions");
-		gfsh.println("     are printed to stdout.");
-		gfsh.println();
-	}
-
-	public void execute(String command) throws Exception {
-		if (command.startsWith("debug -?")) {
-			help();
-		} else {
-			debug(command);
-		}
-	}
-
-	private void debug(String command) {
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() >= 2) {
-			if (list.get(1).equalsIgnoreCase("true")
-					|| list.get(1).equalsIgnoreCase("false")) {
-				boolean enable = list.get(1).equalsIgnoreCase("true");
-				gfsh.setDebug(enable);
-			} else {
-				gfsh.println("Invalid option:" + list.get(1));
-				gfsh.println("Check help for valid options.");
-				return;
-			}
-		} else {
-			gfsh.setDebug(!gfsh.isDebug());
-		}
-		gfsh.println("debug is " + (gfsh.isDebug() ? "on" : "off"));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/deploy.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/deploy.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/deploy.java
deleted file mode 100644
index 377b040..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/deploy.java
+++ /dev/null
@@ -1,271 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-
-public class deploy implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	private static int BUFFER_SIZE = 10000;
-	
-	public deploy(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("deploy [-jar <jar paths>]");
-		gfsh.println("       [-dir [-r] <directory>]");
-		gfsh.println("       [-?]");
-		gfsh.println("   Deploys the specified jar or class files to all of the servers.");
-		gfsh.println("     -jar <jar paths> Load all classes in the jar paths. The jar paths");
-		gfsh.println("            can be separated by ',', ';', or ':'. The jar paths");
-		gfsh.println("            can be relative or absolute.");
-		gfsh.println("     -dir [-r] <directory> Load all jar files in the directory.");
-		gfsh.println("            '-r' recursively loads all jar files including sub-directories.");
-		gfsh.println("            The directory path can be relative or absolute.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("deploy -?")) {
-			help();
-		} else if (command.startsWith("deploy -dir")) {
-			deploy_dir(command);
-		} else if (command.startsWith("deploy -jar")) {
-			deploy_jar(command);
-		} else {
-			gfsh.println("Error: invalid command - " + command);
-		}
-	}
-	
-	private byte[] readJar(File file) throws FileNotFoundException, IOException
-	{
-		FileInputStream fis = new FileInputStream(file);
-		ArrayList<byte[]> byteList = new ArrayList<byte[]>();
-		int bytesRead;
-		int lastBytesRead = 0;
-		byte buffer[];
-		do {
-			buffer = new byte[BUFFER_SIZE];
-			bytesRead = fis.read(buffer);
-			if (bytesRead != -1) {
-				lastBytesRead = bytesRead;
-				byteList.add(buffer);
-			}
-		} while (bytesRead != -1);
-		fis.close();
-		
-		int lastIndex = byteList.size() - 1;
-		int bufferLength = lastIndex *  BUFFER_SIZE + lastBytesRead;
-		int destPos = 0;
-		buffer = new byte[bufferLength];
-		for (int j = 0; j < lastIndex; j++) {
-			byte srcBuffer[] = byteList.get(j);
-			destPos = j * BUFFER_SIZE;
-			System.arraycopy(srcBuffer, 0, buffer, destPos, srcBuffer.length);
-		}
-		if (lastIndex >= 0) {
-			byte srcBuffer[] = byteList.get(lastIndex);
-			destPos = lastIndex * BUFFER_SIZE;
-			System.arraycopy(srcBuffer, 0, buffer, destPos, lastBytesRead);
-		}
-		
-		return buffer;
-	}
-	
-	private void deploy(String[] jarPaths)
-	{
-		if (jarPaths == null || jarPaths.length == 0) {
-			gfsh.println("Error: must specify the jar path(s)");
-			return;
-		}
-		
-		try {
-			String jarNames[] = new String[jarPaths.length];
-			byte[][] payloadBuffers = new byte[jarPaths.length][];			
-			
-			// Read all jar files
-			for (int i = 0; i < jarPaths.length; i++) {
-				String path = jarPaths[i];
-				if (path == null) {
-					continue;
-				}
-				path = path.trim();
-				File file = new File(path);
-				jarNames[i] = file.getName();
-				payloadBuffers[i] = readJar(file);
-			}
-			
-			// Send payloadBuffers to all servers
-			long startTime = System.currentTimeMillis();
-			List<AggregateResults> results = (List<AggregateResults>) gfsh.getAggregator().aggregate(
-					new GfshFunction("deploy", null, new Object[] { "-jar", jarNames, payloadBuffers }), gfsh.getAggregateRegionPath());
-			long stopTime = System.currentTimeMillis();
-			
-			int i = 1;
-			for (AggregateResults aggregateResults : results) {
-				GfshData data = (GfshData)aggregateResults.getDataObject();
-				MemberInfo memberInfo = data.getMemberInfo();
-				String message = (String)data.getDataObject();
-				gfsh.print(i + ". " + memberInfo.getMemberName() + "(" + memberInfo.getMemberId() + ")" + ": ");
-				gfsh.println(message);
-				i++;
-			}
-			
-			gfsh.print("deployed files: ");
-			for (i = 0; i < jarNames.length - 1; i++) {
-				gfsh.print(jarNames[i] + ", ");
-			}
-			if (jarNames.length > 0) {
-				gfsh.println(jarNames[jarNames.length - 1]);
-			}
-			gfsh.println();
-			
-			if (gfsh.isShowTime()) {
-				gfsh.println("elapsed (msec): " + (stopTime - startTime));
-			}
-			
-		} catch (Exception ex) {
-			gfsh.println("Error: " + ex.getClass().getSimpleName() + " - " + ex.getMessage());
-			if (gfsh.isDebug()) {
-				ex.printStackTrace();
-			}
-		}
-	}
-
-	private void deploy_jar(String command)
-	{
-		ArrayList list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			gfsh.println("Error: must specify the jar path(s)");
-			return;
-		}
-
-		String jarPaths = "";
-		for (int i = 2; i < list.size(); i++) {
-			jarPaths += list.get(i);
-		}
-		jarPaths = jarPaths.trim();
-
-		String pathSeparator = System.getProperty("path.separator");
-		jarPaths = jarPaths.replace(pathSeparator.charAt(0), ',');
-		String split[] = jarPaths.split(",");
-		deploy(split);
-	}	
-	
-	private void deploy_dir(String command)
-	{
-		ArrayList list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			gfsh.println("Error: must specify the directory path");
-			return;
-		}
-		
-		String dirPath = (String)list.get(2);
-		if (dirPath == null) {
-			return;
-		}
-		dirPath = dirPath.trim();
-		if (dirPath.length() == 0) {
-			gfsh.println("Error: directory not specified");
-			return;
-		}
-		
-		File file = new File(dirPath);
-		if (file.exists() == false) {
-			gfsh.println("Error: direcotry " + dirPath + " does not exist");
-			return;
-		}
-		
-		ArrayList<File> jarFileList = getJarFiles(file, false);
-		if (jarFileList.size() == 0) {
-			gfsh.println("jar files not found in directory " + dirPath);
-			return;
-		}
-		
-		String jarPaths[] = new String[jarFileList.size()];
-		int i = 0;
-		for (File file2 : jarFileList) {
-			jarPaths[i++] = file2.getAbsolutePath();
-		}
-		deploy(jarPaths);
-		
-//		byte[][] payloadBuffers = new byte[jarFileList.size()][];		
-//		try {
-//		
-//			// Read all jar files
-//			for (int i = 0; i < jarFileList.size(); i++) {
-//				File file2 = jarFileList.get(i);
-//				payloadBuffers[i] = readJar(file2);
-//			}
-//			
-//			// Determine the jar names
-//			for (int i = 0; i < jarFileList.size(); i++) {
-//				File file2 = jarFileList.get(i);
-//				jarPaths[i] = file2.getAbsolutePath();
-//			}
-//			
-//			deploy(jarPaths);
-//			
-//		} catch (Exception ex) {
-//			gfsh.println("Error: " + ex.getClass().getSimpleName() + " - " + ex.getMessage());
-//			if (gfsh.isDebug()) {
-//				ex.printStackTrace();
-//			}
-//		}
-	}
-	
-	private ArrayList<File> getJarFiles(File dir, boolean recursive)
-	{
-		return getJarFiles(dir, new ArrayList<File>(), recursive);
-	}
-	
-	private ArrayList<File> getJarFiles(File dir, ArrayList<File> fileList, boolean recursive)
-	{
-		File files[] = dir.listFiles(new FileFilter() {
-
-			public boolean accept(File pathname)
-			{
-				return (pathname.isDirectory() == false && pathname.getName().endsWith(".jar"));
-			}
-		});
-		
-		for (int i = 0; i < files.length; i++) {
-			fileList.add(files[i]);
-		}
-		
-		if (recursive) {
-			File dirs[] = dir.listFiles(new FileFilter() {
-	
-				public boolean accept(File pathname)
-				{
-					return pathname.isDirectory();
-				}
-			});
-			
-			for (int i = 0; i < dirs.length; i++) {
-				fileList = getJarFiles(dirs[i], fileList, recursive);
-			}
-		}
-		
-		return fileList;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/echo.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/echo.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/echo.java
deleted file mode 100644
index 27a851c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/echo.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.ArrayList;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-public class echo implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public echo(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("echo [true|false] [<message>] | [-?]");
-		gfsh.println("     Toggle the echo setting. If echo is true then input");
-		gfsh.println("     commands are echoed to stdout. If <message> is specified");
-		gfsh.println("     it is printed without toggling echo. It expands properties.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("echo -?")) {
-			help();
-		} else {
-			echo(command);
-		}
-	}
-	
-	private void echo(String command)
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() >= 2) {
-			if (list.get(1).equalsIgnoreCase("true")) {
-				gfsh.setEcho(true);
-			} else if (list.get(1).equalsIgnoreCase("false")) {
-				gfsh.setEcho(false);
-			} else {
-				// message
-				// command is already trimmed. no need to trim
-				int index = command.indexOf(' ');
-				String message = command.substring(index+1);
-				gfsh.println(message);
-				return;
-			}
-
-		} else {
-			gfsh.setEcho(!gfsh.isEcho());
-		}
-		
-		gfsh.println("echo is " + (gfsh.isEcho() ? "true" : "false"));
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/fetch.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/fetch.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/fetch.java
deleted file mode 100644
index 819d05a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/fetch.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-public class fetch implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public fetch(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("fetch [-?] <size>");
-		gfsh.println("     Set the fetch size of the query result set.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("fetch -?")) {
-			help();
-		} else {
-			fetch(command);
-		}
-	}
-	
-	private void fetch(String command)
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			gfsh.println("fetch = " + gfsh.getFetchSize());
-			gfsh.println("   Use fetch <size> to set the fetch size");
-		} else {
-			try {
-				gfsh.setFetchSize(Integer.parseInt(list.get(1).toString()));
-			} catch (Exception ex) {
-				System.out.println("Error: " + ex.getMessage());
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/gc.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/gc.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/gc.java
deleted file mode 100644
index ea77de3..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/gc.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.Aggregator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-
-public class gc implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public gc(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("gc [-g] [-m <member id>] | [-?]");
-		gfsh.println("     Force gc on the connected server or all of the servers.");
-		gfsh.println("     -g  Force gc globally on all servers.");
-		gfsh.println("     -m <member id>  Force gc on the specified member. The member id can");
-		gfsh.println("            be obtained by executing 'size -m' or 'ls -m'");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("gc -?")) {
-			help();
-		} else if (command.startsWith("gc -g")) {
-			gc(command);
-		} else if (command.startsWith("gc -m")) {
-			gc(command);
-		} else {
-			gfsh.println("Error: invalid gc option.");
-		}
-	}
-	
-	private void gc(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		
-		boolean isGlobal = false;
-		String memberId = null;
-		if (command.startsWith("gc -m")) {
-			if (list.size() > 2) {
-				memberId = list.get(2);
-			}
-		} else if (command.startsWith("gc -g")) {
-			isGlobal = true;
-		}
-		
-		if (isGlobal == false && memberId == null) {
-			gfsh.println("Error: invalid option. 'gc -m' requires <member id>. Use 'size -m' or 'ls -m' to list member ids.");
-			return;
-		}
-		
-		String confirmation = gfsh.getLine("This command forc gc on the server(s).\nDo you want to proceed? (yes|no): ");
-		if (confirmation.equalsIgnoreCase("yes") == false) {
-			gfsh.println("Command aborted.");
-			return;
-		}
-		
-		Aggregator aggregator = gfsh.getAggregator();
-		List<AggregateResults> results = (List<AggregateResults>)gfsh.getAggregator().aggregate(new GfshFunction("gc", gfsh.getCurrentPath(), memberId), gfsh.getAggregateRegionPath());
-		int i = 1;
-		for (AggregateResults aggregateResults : results) {
-			GfshData data = (GfshData)aggregateResults.getDataObject();
-			MemberInfo memberInfo = data.getMemberInfo();
-			if (isGlobal || (memberId != null && memberId.equals(memberInfo.getMemberId()))) {
-				gfsh.print(i + ". " + memberInfo.getMemberName() + "(" + memberInfo.getMemberId() + ")" + ": ");
-				if (aggregateResults.getCode() == AggregateResults.CODE_ERROR) {
-					gfsh.println("error - " + aggregateResults.getCodeMessage());
-					if (gfsh.isDebug() && aggregateResults.getException() != null) {
-						aggregateResults.getException().printStackTrace();
-					}
-				} else {
-					gfsh.println("GC forced");
-				}
-			}
-			i++;
-		}
-//		gfsh.getCommandClient().execute(new ForceGCTask());
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/get.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/get.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/get.java
deleted file mode 100644
index 2ea5dd6..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/get.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.ObjectUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-
-public class get implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public get(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("get [<query predicate>] | [-k <number list>] | [-?]");
-		gfsh.println("     Get value from the current region.");
-		gfsh.println("        <query predicate>: field=val1 and field2='val1' \\");
-		gfsh.println("                           and field3=to_date('<date>', '<format>')");
-		gfsh.println("     Data formats: primitives, String, and java.util.Date");
-		gfsh.println("         <decimal>b|B - Byte      (e.g., 1b)");
-		gfsh.println("         <decimal>c|C - Character (e.g., 1c)");
-		gfsh.println("         <decimal>s|S - Short     (e.g., 12s)");
-		gfsh.println("         <decimal>i|I - Integer   (e.g., 15 or 15i)");
-		gfsh.println("         <decimal>l|L - Long      (e.g., 20l)");
-		gfsh.println("         <decimal>f|F - Float     (e.g., 15.5 or 15.5f)");
-		gfsh.println("         <decimal>d|D - Double    (e.g., 20.0d)");
-		gfsh.println("         '<string with \\ delimiter>' (e.g., '\\'Wow!\\'!' Hello, world')");
-		gfsh.println("         to_date('<date string>', '<simple date format>')");
-		gfsh.println("                       (e.g., to_date('04/10/2009', 'MM/dd/yyyy')");
-		gfsh.println("     -k <number list>   Get values from the current region using the");
-		gfsh.println("                        enumerated keys. Use 'ls -k' to get the list");
-		gfsh.println("                        of enumerated keys.");
-		gfsh.println("     <number list> format: num1 num2 num3-num5 ... e.g., 'get -k 1 2 4 10-20'");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("get -?")) {
-			help();
-		} else if (command.startsWith("get -k")) {
-			get_k(command);
-		} else if (command.startsWith("get")) {
-			get(command);
-		}
-	}
-	
-	private void get(String command) throws Exception
-	{
-		if (gfsh.getCurrentRegion() == null) {
-			gfsh.println("Error: Region undefined. Use 'cd' to change region first before executing this command.");
-			return;
-		}
-
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			gfsh.println("Error: get requires a query predicate");
-		} else {
-			String input = (String) list.get(1);
-			Object key = null;
-			Object value;
-			if (input.startsWith("'")) {
-				int lastIndex = -1;
-				if (input.endsWith("'") == false) {
-					lastIndex = input.length();
-				} else {
-					lastIndex = input.lastIndexOf("'");
-				}
-				if (lastIndex <= 1) {
-					gfsh.println("Error: Invalid key. Empty string not allowed.");
-					return;
-				}
-				key = input.subSequence(1, lastIndex); // lastIndex exclusive
-			} else {
-				key = ObjectUtil.getPrimitive(gfsh, input, false);
-				if (key == null) {
-					key = gfsh.getQueryKey(list, 1);
-				}
-			}
-			if (key == null) {
-				return;
-			}
-			long startTime = System.currentTimeMillis();
-			value = gfsh.getCurrentRegion().get(key);
-			long stopTime = System.currentTimeMillis();
-			
-			if (value == null) {
-				gfsh.println("Key not found.");
-				return;
-			}
-			
-			HashMap keyMap = new HashMap();
-			keyMap.put(1, key);
-			PrintUtil.printEntries(gfsh.getCurrentRegion(), keyMap, null);
-			if (gfsh.isShowTime()) {
-				gfsh.println("elapsed (msec): " + (stopTime - startTime));
-			}
-		}
-	}
-	
-	private void get_k(String command) throws Exception
-	{
-		if (gfsh.getCurrentRegion() == null) {
-			gfsh.println("Error: Region undefined. Use 'cd' to change region first before executing this command.");
-			return;
-		}
-		
-		// get -k #
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			gfsh.println("Error: get -k requires number(s)");
-			return;
-		}
-		
-		if (gfsh.getLsKeyList() == null) {
-			gfsh.println("Error: No keys obtained. Execute 'ls -k' first to obtain the keys");
-			return;
-		}
-		
-		Map keyMap = gfsh.getKeyMap(list, 2);
-		long startTime = System.currentTimeMillis();
-		gfsh.getCurrentRegion().getAll(keyMap.values());
-		long stopTime = System.currentTimeMillis();
-		if (gfsh.isShowResults()) {
-			PrintUtil.printEntries(gfsh.getCurrentRegion(), keyMap, null);
-		} else {
-			gfsh.println("Fetched: " + keyMap.size());
-		}
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/help.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/help.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/help.java
deleted file mode 100644
index de09c8a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/help.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-public class help implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public help(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	
-	@SuppressFBWarnings(value="NM_METHOD_CONSTRUCTOR_CONFUSION",justification="This is method and not constructor")
-	public void help()
-	{
-		gfsh.println("help or ?");
-		gfsh.println("     List command descriptions");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-    
-		if (command.startsWith("help -?")) {
-			help();
-		} else {
-	    String[] splitted = command.split(" ");
-	    if (splitted.length > 1) {
-	      gfsh.showHelp(splitted[1]);
-      } else {
-        gfsh.showHelp();
-      }
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/index.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/index.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/index.java
deleted file mode 100644
index 8c4bef0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/index.java
+++ /dev/null
@@ -1,395 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.Aggregator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-
-public class index implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	private enum TASK {
-		LIST,
-		CREATE,
-		DELETE,
-		STATS
-	}
-	
-	private static List<String>mappableKeyList;
-	private static List<String>mappableStatsList;
-	
-	static {
-		mappableKeyList = new ArrayList();
-		Collections.addAll(mappableKeyList, "Name", "Type", "Expression", "From");
-		mappableStatsList = new ArrayList();
-		Collections.addAll(mappableStatsList, "Name", "Type", "Expression", "From", "Keys", "Values", "Updates", "TotalUpdateTime", "TotalUses");	
-	}
-
-	public index(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-
-	public void help()
-	{
-          gfsh.println("index [-m <member id>|-g] -n <index name> -e <expression> -from <from clause>");  
-          gfsh.println("      [-i <imports>]");
-          gfsh.println("      [-primary|-functional] ");
-          gfsh.println("      [-r <region path>]");
-          gfsh.println("      [-?]");
-          gfsh.println("      Creates the specified index in the current or specified region.");
-          gfsh.println("      -m <member id> Execute the index command on the specified member only");
-          gfsh.println("      -g Execute the index command on all members");
-          gfsh.println("      -n <index name> Unique index name.");
-          gfsh.println("      -e Index expression.");
-          gfsh.println("      -from <from clause>  From clause.");
-          gfsh.println("      [-i <imports>] Import statments separated by ; in double quotes,");
-          gfsh.println("                    e.g., -i \"import com.foo.ClassA;import com.fool.ClassB\"");
-          gfsh.println("      [-primary|-functional] Create a primary index or a functional index.");
-          gfsh.println("                    Default: -functional");
-          gfsh.println("index [-m <member id>|-g] [-all] [-r <region path>]");
-          gfsh.println("      List indexes created in the current or specified region. Default: -g");
-          gfsh.println("      -stats Display index statistics along with index info.");
-          gfsh.println("      -m <member id> Execute the index command on the specified member only");
-          gfsh.println("      -g Execute the index command on all members");
-          gfsh.println("      -all List indexes in all regions.");
-          gfsh.println("      [-r <region path>] Region path. If not specified, the current region");
-          gfsh.println("                         is used.");
-          gfsh.println("index -stats [-m <member id>|-g] [-all] [-r <region path>]");
-          gfsh.println("      Display index statistics in the current or specified region. Default: -g");
-          gfsh.println("      -m <member id> Execute the index command on the specified member only");
-          gfsh.println("      -g Execute the index command on all members");
-          gfsh.println("      -all Display statistics for all indexes in all regions.");
-          gfsh.println("index -d [-m <member id>|-g] -n <index name>|-region|-all [-r <region path>]");  
-          gfsh.println("      Delete the specified index in the current or specified region. Default: -g");
-          gfsh.println("      -m <member id> Execute the index command on the specified member only");
-          gfsh.println("      -g Execute the index command on all members");
-          gfsh.println("      -all Delete indexes in all regions.");
-          gfsh.println("      -n <index name> Delete the specified index in the current or specified region.");
-          gfsh.println("      -region Delete all indexes in the current or specified region.");
-	}
-
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("index -?")) {
-			help();
-		} else {
-			index(command);
-		}
-	}
-
-	private void index(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-
-		String regionPath = null;
-		boolean all = false;
-		boolean delete = false;
-		boolean isRegion = false;
-		String indexName = null;
-		String expression = null;
-		String fromClause = null;
-		String imports = null;
-		boolean global = false;
-		String memberId = null;
-		boolean isFunctionalIndex = true;
-		boolean stats = false;
-		for (int i = 1; i < list.size(); i++) {
-			String token = list.get(i);
-			if (token.equals("-all")) {
-				all = true;
-			} else if (token.equals("-d")) {
-				delete = true;
-			} else if (token.equals("-region")) {
-				isRegion = true;
-			} else if (token.equals("-r")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-r' requires region path");
-					return;
-				}
-				regionPath = (String) list.get(++i);
-			} else if (token.equals("-n")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-n' requires index name");
-					return;
-				}
-				indexName = (String) list.get(++i);
-			} else if (token.equals("-e")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-e' requires expression");
-					return;
-				}
-				expression = (String) list.get(++i);
-			} else if (token.equals("-from")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-from' requires from-clause");
-					return;
-				}
-				fromClause = (String) list.get(++i);
-			} else if (token.equals("-i")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-i' requires imports");
-					return;
-				}
-				imports = (String) list.get(++i);
-			} else if (token.equals("-m")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-m' requires member Id");
-					return;
-				}
-				memberId = (String) list.get(++i);
-			} else if (token.equals("-g")) {
-				global = true;
-			} else if (token.equals("-primary")) {
-				isFunctionalIndex = false;
-			} else if (token.equals("-functional")) {
-				isFunctionalIndex = true;
-			} else if (token.equals("-stats")) {
-				stats = true;
-			} else {
-				gfsh.println("Error: invalid directive '" + token + "'");
-				return;
-			}
-		}
-		
-		if (global && memberId != null) {
-			gfsh.println("Error: only one option is allowed: '-g' or '-m'");
-			return;
-		}
-		if (delete && stats) {
-			gfsh.println("Error: only one option is allowed: '-d' or '-stats'");
-			return;
-		}
-
-		TASK task = TASK.LIST;
-		if (delete) {
-			task = TASK.DELETE;
-		} else if (indexName == null) {
-			task = TASK.LIST;
-		} else if (stats) {
-			task = TASK.STATS;
-		} else {
-			task = TASK.CREATE;
-		}
-	
-		
-		switch (task) {
-		case LIST:
-			listIndexes(regionPath, memberId, all, stats);
-			break;
-		case CREATE:
-			createIndexes(regionPath, memberId, indexName, isFunctionalIndex, expression, fromClause, imports);
-			break;
-		case DELETE:
-			if (indexName != null && (all || isRegion)) {
-				gfsh.println("Error: '-n' not allowed with '-region' or '-all'");
-				return;
-			} 
-			if (indexName == null && all == false && isRegion == false) {
-				gfsh.println("Error: '-d' requires '-n', '-region' or '-all'");
-				return;
-			}
-			com.gemstone.gemfire.internal.tools.gfsh.app.function.command.index.DeleteType deleteType;
-			if (all) {
-				deleteType = com.gemstone.gemfire.internal.tools.gfsh.app.function.command.index.DeleteType.DELETE_ALL_INDEXES;
-			} else if (isRegion) {
-				deleteType = com.gemstone.gemfire.internal.tools.gfsh.app.function.command.index.DeleteType.DELETE_REGION_INDEXES;
-			} else {
-				deleteType = com.gemstone.gemfire.internal.tools.gfsh.app.function.command.index.DeleteType.DELETE_INDEX;
-			}
-			deleteIndexes(deleteType, regionPath, memberId, indexName);
-			break;
-		}
-		
-	}
-	
-	private void listIndexes(String regionPath, String memberId, boolean isAll, boolean isStats) throws Exception
-	{
-		// Collect indexes from all members and display common and different sets
-		String currentPath = gfsh.getCurrentPath();
-		if (regionPath == null) {
-			regionPath = currentPath;
-		}
-		String fullPath = gfsh.getFullPath(regionPath, currentPath);
-	
-		Aggregator aggregator = gfsh.getAggregator();
-		long startTime = System.currentTimeMillis();
-		List<AggregateResults> results = (List<AggregateResults>) gfsh.getAggregator().aggregate(
-				new GfshFunction("index", fullPath, new Object[] { "-list", memberId, isAll, isStats }), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-		int i = 0;
-		for (AggregateResults aggregateResults : results) {
-			GfshData data = (GfshData)aggregateResults.getDataObject();
-			if (data != null) {
-				Object obj = data.getDataObject();
-				if (obj instanceof List) {
-					List<Mappable> mappableList = (List<Mappable>)data.getDataObject();
-					if (mappableList != null) {
-						gfsh.println(++i + ". " + data.getMemberInfo().getMemberId() + " (" + data.getMemberInfo().getMemberName() + "): ");
-						if (mappableList.size() > 0) {
-							Mappable mappable = mappableList.get(0);
-							if (mappable.size() < mappableStatsList.size()) {
-								isStats = false;
-							}
-							if (isStats) {
-								PrintUtil.printMappableList(mappableList, "Name", mappableStatsList);
-							} else {
-								PrintUtil.printMappableList(mappableList, "Name", mappableKeyList);
-							}
-						}
-						gfsh.println();
-					}
-				} else if (obj != null) {
-					gfsh.println(++i + ". " + data.getMemberInfo().getMemberId() + " (" + data.getMemberInfo().getMemberName() + "): " + obj);
-					gfsh.println();
-				}
-			}
-		}
-		if (i == 0) {
-			gfsh.println("Indexes not found");
-			gfsh.println();
-		}
-	}
-
-	/**
-	 * 
-	 * @param regionPath
-	 * @param memberId  If null, creates index on all members.
-	 * @param indexName
-	 * @param isFunctionalIndex
-	 * @param expression
-	 * @param fromClause
-	 * @throws Exception
-	 */
-	private void createIndexes(String regionPath, 
-			String memberId, 
-			String indexName, 
-			boolean isFunctionalIndex, 
-			String expression, 
-			String fromClause,
-			String imports) throws Exception
-	{
-		
-		if (indexName == null) {
-			gfsh.println("Error: '-n' (index name) is not specified.");
-			return;
-		}
-		if (expression == null) {
-			gfsh.println("Error: '-e' (index expression) is not specified.");
-			return;
-		}
-		if (fromClause == null) {
-			gfsh.println("Error: '-from' (from clause) is not specified.");
-			return;
-		}
-		
-		String currentPath = gfsh.getCurrentPath();
-		String fullPath = gfsh.getFullPath(regionPath, currentPath);
-
-		Aggregator aggregator = gfsh.getAggregator();
-		long startTime = System.currentTimeMillis();
-		List<AggregateResults> results = (List<AggregateResults>) gfsh.getAggregator().aggregate(
-				new GfshFunction("index", fullPath, new Object[] { "-create", memberId, indexName, isFunctionalIndex, expression, fromClause, imports }), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-
-		int i = 0;
-		for (AggregateResults aggregateResults : results) {
-			
-			GfshData data = (GfshData) aggregateResults.getDataObject();
-			if (data == null) {
-				i++;
-				gfsh.println(i + ". " + aggregateResults.getCodeMessage());
-			} else {
-				MemberInfo memberInfo = data.getMemberInfo();
-				Object value = data.getDataObject();
-				if (value != null) {
-					i++;
-					gfsh.println(i + ". " + memberInfo.getMemberId() + " (" + memberInfo.getMemberName() + "): " + value);	
-				} else if (aggregateResults.getCodeMessage() != null) {
-					i++;
-					gfsh.print(i + ". " + memberInfo.getMemberId() + " (" + memberInfo.getMemberName() + "): ");
-					gfsh.println(aggregateResults.getCodeMessage());
-				}
-			}
-		}
-		gfsh.println();
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-	
-	private void deleteIndexes(com.gemstone.gemfire.internal.tools.gfsh.app.function.command.index.DeleteType deleteType, String regionPath, String memberId, String indexName) throws Exception
-	{
-		String message = "";
-		switch (deleteType) {
-		case DELETE_INDEX:
-		case DELETE_REGION_INDEXES:
-			if (regionPath == null) {
-				regionPath = gfsh.getCurrentPath();
-			}
-			break;
-		}
-		
-		// Collect indexes from all members and display common and different sets
-		String currentPath = gfsh.getCurrentPath();
-		String fullPath = gfsh.getFullPath(regionPath, currentPath);
-
-		switch (deleteType) {
-		case DELETE_INDEX:
-			message = "This command will remove the " + indexName + " index from the " + fullPath + "region. \nDo you want to proceed? (yes|no): ";
-			break;
-		case DELETE_REGION_INDEXES:
-			message = "This command will remove all of the indexes in the " + fullPath + " region. \nDo you want to proceed? (yes|no): ";
-			break;
-		case DELETE_ALL_INDEXES:
-			message = "This command will remove all of the indexes from all of the members. \nDo you want to proceed? (yes|no): ";
-			break;
-		}
-		String confirmation = gfsh.getLine(message);
-		if (confirmation.equalsIgnoreCase("yes") == false) {
-			gfsh.println("Command aborted.");
-			return;
-		}
-		
-		Aggregator aggregator = gfsh.getAggregator();
-		long startTime = System.currentTimeMillis();
-		List<AggregateResults> results = (List<AggregateResults>) gfsh.getAggregator().aggregate(
-				new GfshFunction("index", fullPath, new Object[] { "-delete", deleteType, memberId, indexName }), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-		
-		int i = 0;
-		for (AggregateResults aggregateResults : results) {
-			
-			GfshData data = (GfshData) aggregateResults.getDataObject();
-			if (data == null) {
-				i++;
-				gfsh.println(i + ". " + aggregateResults.getCodeMessage());
-			} else {
-				MemberInfo memberInfo = data.getMemberInfo();
-				Object value = data.getDataObject();
-				if (value != null) {
-					i++;
-					gfsh.print(i + ". " + memberInfo.getMemberId() + " (" + memberInfo.getMemberName() + "): ");
-					gfsh.println(value);
-				}
-			}
-		}
-		gfsh.println();
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/key.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/key.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/key.java
deleted file mode 100644
index 116e4ee..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/key.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-
-public class key implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public key(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("key [-l] [<class name>] | [-?]");
-		gfsh.println("     Set the key class to be used for the 'get', 'put' and 'query'");
-		gfsh.println("     commands. Use the 'value' command to set the value class name.");
-		gfsh.println("     -l List the last enumerated keys. These keys were obtained");
-		gfsh.println("        by executing one of the following commands: ");
-		gfsh.println("        " + gfsh.getEnumCommands());
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("key -?")) {
-			help();
-		} else if (command.startsWith("key -l")) {
-			key_l();
-		} else {
-			key(command);
-		}
-	}
-	
-	private void key(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			gfsh.println("key = " + gfsh.getQueryKeyClassName());
-			gfsh.println("   Use key <class name> to set the key class");
-		} else {
-			if (list.size() > 1) {
-				gfsh.setKeyClass((String) list.get(1));
-			}
-		}
-	}
-	
-	private void key_l() throws Exception
-	{
-		List keyList = gfsh.getLsKeyList();
-		if (gfsh.getLsKeyList() == null) {
-			gfsh.println("Error: Key list undefined. The folowing commands create the key list: ");
-			gfsh.println("       " + gfsh.getEnumCommands());
-			return;
-		}
-	
-		PrintUtil.printList(keyList);
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/local.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/local.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/local.java
deleted file mode 100644
index 1f51742..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/local.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Nextable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-
-public class local implements CommandExecutable, Nextable
-{
-	private Gfsh gfsh;
-	private SelectResults selectResults;
-	int lastRowPrinted = 0;
-	
-	public local(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("local [-?] <query>");
-		gfsh.println("     Execute the specified query on the local cache.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("local -?")) {
-			help();
-		} else {
-			local(command);
-		}
-	}
-	
-	public List next(Object userData) throws Exception
-	{
-		if (selectResults == null) {
-			return null;
-		}
-	
-		if (gfsh.isShowResults()) {
-			int rowsPrinted = PrintUtil.printSelectResults(selectResults, lastRowPrinted, lastRowPrinted+1, gfsh.getFetchSize());
-			lastRowPrinted = lastRowPrinted + rowsPrinted;
-			gfsh.println("Fetch size: " + gfsh.getFetchSize());
-			gfsh.println("   Results: " + selectResults.size()
-					+ ", Returned: " + lastRowPrinted + "/" + selectResults.size());
-		} else {
-			gfsh.println("Fetch size: " + gfsh.getFetchSize());
-			gfsh.println("    Results: " + selectResults.size());
-		}
-		return null;
-	}
-	
-	private void local(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			gfsh.println("Error: local requires a query statment");
-		} else {
-			String queryString = "";
-			for (int i = 1; i < list.size(); i++) {
-				queryString += list.get(i) + " ";
-			}
-			QueryService queryService = gfsh.getCache().getQueryService();
-			Query query = queryService.newQuery(queryString);
-			
-			long startTime = System.currentTimeMillis();
-			Object obj = query.execute();
-			long stopTime = System.currentTimeMillis();
-			
-			selectResults = null;
-			if (obj instanceof SelectResults) {
-				selectResults = (SelectResults)obj;
-				if (gfsh.isShowResults()) {
-					int rowsPrinted = PrintUtil.printSelectResults(selectResults, 0, 1, gfsh.getFetchSize());
-					lastRowPrinted = rowsPrinted;
-					gfsh.println("Fetch size: " + gfsh.getFetchSize());
-					gfsh.println("   Results: " + selectResults.size()
-							+ ", Returned: " + lastRowPrinted + "/" + selectResults.size());
-					next n = (next)gfsh.getCommand("next");
-					n.setCommand(getClass().getSimpleName());
-				} else {
-					gfsh.println("Fetch size: " + gfsh.getFetchSize());
-					gfsh.println("   Results: " + selectResults.size());
-				}
-			} else {
-				gfsh.println("Results: " + obj);
-			}
-			if (gfsh.isShowTime()) {
-				gfsh.println("elapsed (msec): " + (stopTime - startTime));
-			}
-		}
-	}
-}


[23/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/bread-crumb.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/bread-crumb.png b/pulse/src/main/webapp/images/bread-crumb.png
new file mode 100644
index 0000000..2dac9c7
Binary files /dev/null and b/pulse/src/main/webapp/images/bread-crumb.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/bubble_arrow.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/bubble_arrow.png b/pulse/src/main/webapp/images/bubble_arrow.png
new file mode 100644
index 0000000..4a9fc8b
Binary files /dev/null and b/pulse/src/main/webapp/images/bubble_arrow.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/chart-active.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/chart-active.png b/pulse/src/main/webapp/images/chart-active.png
new file mode 100644
index 0000000..3edee7b
Binary files /dev/null and b/pulse/src/main/webapp/images/chart-active.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/chart.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/chart.png b/pulse/src/main/webapp/images/chart.png
new file mode 100644
index 0000000..9900e53
Binary files /dev/null and b/pulse/src/main/webapp/images/chart.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/checkbox.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/checkbox.png b/pulse/src/main/webapp/images/checkbox.png
new file mode 100644
index 0000000..d576984
Binary files /dev/null and b/pulse/src/main/webapp/images/checkbox.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/chkbox.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/chkbox.png b/pulse/src/main/webapp/images/chkbox.png
new file mode 100644
index 0000000..08a246d
Binary files /dev/null and b/pulse/src/main/webapp/images/chkbox.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/copy_icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/copy_icon.png b/pulse/src/main/webapp/images/copy_icon.png
new file mode 100644
index 0000000..8064c08
Binary files /dev/null and b/pulse/src/main/webapp/images/copy_icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/correct_icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/correct_icon.png b/pulse/src/main/webapp/images/correct_icon.png
new file mode 100644
index 0000000..171f870
Binary files /dev/null and b/pulse/src/main/webapp/images/correct_icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/correct_small_icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/correct_small_icon.png b/pulse/src/main/webapp/images/correct_small_icon.png
new file mode 100644
index 0000000..33e0020
Binary files /dev/null and b/pulse/src/main/webapp/images/correct_small_icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/correct_white_icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/correct_white_icon.png b/pulse/src/main/webapp/images/correct_white_icon.png
new file mode 100644
index 0000000..fa7ccca
Binary files /dev/null and b/pulse/src/main/webapp/images/correct_white_icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/cross.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/cross.png b/pulse/src/main/webapp/images/cross.png
new file mode 100644
index 0000000..2c377f8
Binary files /dev/null and b/pulse/src/main/webapp/images/cross.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/dataViewWanEnabled.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/dataViewWanEnabled.png b/pulse/src/main/webapp/images/dataViewWanEnabled.png
new file mode 100644
index 0000000..1b45d54
Binary files /dev/null and b/pulse/src/main/webapp/images/dataViewWanEnabled.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/dd_active.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/dd_active.png b/pulse/src/main/webapp/images/dd_active.png
new file mode 100644
index 0000000..0eb13dd
Binary files /dev/null and b/pulse/src/main/webapp/images/dd_active.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/dd_arrow.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/dd_arrow.png b/pulse/src/main/webapp/images/dd_arrow.png
new file mode 100644
index 0000000..fca8a3e
Binary files /dev/null and b/pulse/src/main/webapp/images/dd_arrow.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-locators-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-locators-others.png b/pulse/src/main/webapp/images/error-locators-others.png
new file mode 100644
index 0000000..09e8dcd
Binary files /dev/null and b/pulse/src/main/webapp/images/error-locators-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-locators.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-locators.png b/pulse/src/main/webapp/images/error-locators.png
new file mode 100644
index 0000000..57de662
Binary files /dev/null and b/pulse/src/main/webapp/images/error-locators.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-manager-locator-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-manager-locator-others.png b/pulse/src/main/webapp/images/error-manager-locator-others.png
new file mode 100644
index 0000000..01e6443
Binary files /dev/null and b/pulse/src/main/webapp/images/error-manager-locator-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-manager-locator.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-manager-locator.png b/pulse/src/main/webapp/images/error-manager-locator.png
new file mode 100644
index 0000000..88a8268
Binary files /dev/null and b/pulse/src/main/webapp/images/error-manager-locator.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-managers-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-managers-others.png b/pulse/src/main/webapp/images/error-managers-others.png
new file mode 100644
index 0000000..0f0a217
Binary files /dev/null and b/pulse/src/main/webapp/images/error-managers-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-managers.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-managers.png b/pulse/src/main/webapp/images/error-managers.png
new file mode 100644
index 0000000..21f8135
Binary files /dev/null and b/pulse/src/main/webapp/images/error-managers.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-message-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-message-icon.png b/pulse/src/main/webapp/images/error-message-icon.png
new file mode 100644
index 0000000..9c734a9
Binary files /dev/null and b/pulse/src/main/webapp/images/error-message-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-msg-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-msg-icon.png b/pulse/src/main/webapp/images/error-msg-icon.png
new file mode 100644
index 0000000..5249929
Binary files /dev/null and b/pulse/src/main/webapp/images/error-msg-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-others.png b/pulse/src/main/webapp/images/error-others.png
new file mode 100644
index 0000000..892f7a9
Binary files /dev/null and b/pulse/src/main/webapp/images/error-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-otheruser.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-otheruser.png b/pulse/src/main/webapp/images/error-otheruser.png
new file mode 100644
index 0000000..9f2fca2
Binary files /dev/null and b/pulse/src/main/webapp/images/error-otheruser.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error-status-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error-status-icon.png b/pulse/src/main/webapp/images/error-status-icon.png
new file mode 100644
index 0000000..c81cbd9
Binary files /dev/null and b/pulse/src/main/webapp/images/error-status-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/error.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/error.png b/pulse/src/main/webapp/images/error.png
new file mode 100644
index 0000000..894429a
Binary files /dev/null and b/pulse/src/main/webapp/images/error.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph-active.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph-active.png b/pulse/src/main/webapp/images/graph-active.png
new file mode 100644
index 0000000..b0f182d
Binary files /dev/null and b/pulse/src/main/webapp/images/graph-active.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph.png b/pulse/src/main/webapp/images/graph.png
new file mode 100644
index 0000000..14e816d
Binary files /dev/null and b/pulse/src/main/webapp/images/graph.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph/key-statistics-graph.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph/key-statistics-graph.png b/pulse/src/main/webapp/images/graph/key-statistics-graph.png
new file mode 100644
index 0000000..7ef1c95
Binary files /dev/null and b/pulse/src/main/webapp/images/graph/key-statistics-graph.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph/memory-usage-graph.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph/memory-usage-graph.png b/pulse/src/main/webapp/images/graph/memory-usage-graph.png
new file mode 100644
index 0000000..5091bc3
Binary files /dev/null and b/pulse/src/main/webapp/images/graph/memory-usage-graph.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph/reads.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph/reads.png b/pulse/src/main/webapp/images/graph/reads.png
new file mode 100644
index 0000000..53daeeb
Binary files /dev/null and b/pulse/src/main/webapp/images/graph/reads.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph/throughput-writes-graph.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph/throughput-writes-graph.png b/pulse/src/main/webapp/images/graph/throughput-writes-graph.png
new file mode 100644
index 0000000..a19530b
Binary files /dev/null and b/pulse/src/main/webapp/images/graph/throughput-writes-graph.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph/topology.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph/topology.png b/pulse/src/main/webapp/images/graph/topology.png
new file mode 100644
index 0000000..363cda1
Binary files /dev/null and b/pulse/src/main/webapp/images/graph/topology.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph/treeview.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph/treeview.png b/pulse/src/main/webapp/images/graph/treeview.png
new file mode 100644
index 0000000..fb5f138
Binary files /dev/null and b/pulse/src/main/webapp/images/graph/treeview.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/graph/writes.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/graph/writes.png b/pulse/src/main/webapp/images/graph/writes.png
new file mode 100644
index 0000000..507af42
Binary files /dev/null and b/pulse/src/main/webapp/images/graph/writes.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/grid-active.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/grid-active.png b/pulse/src/main/webapp/images/grid-active.png
new file mode 100644
index 0000000..926f971
Binary files /dev/null and b/pulse/src/main/webapp/images/grid-active.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/grid.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/grid.png b/pulse/src/main/webapp/images/grid.png
new file mode 100644
index 0000000..60c9b42
Binary files /dev/null and b/pulse/src/main/webapp/images/grid.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/header-bg-bottom-border.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/header-bg-bottom-border.png b/pulse/src/main/webapp/images/header-bg-bottom-border.png
new file mode 100644
index 0000000..2320273
Binary files /dev/null and b/pulse/src/main/webapp/images/header-bg-bottom-border.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/hide_ico.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/hide_ico.png b/pulse/src/main/webapp/images/hide_ico.png
new file mode 100644
index 0000000..4c00e7c
Binary files /dev/null and b/pulse/src/main/webapp/images/hide_ico.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/history-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/history-icon.png b/pulse/src/main/webapp/images/history-icon.png
new file mode 100644
index 0000000..20e1a72
Binary files /dev/null and b/pulse/src/main/webapp/images/history-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/history-remove.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/history-remove.png b/pulse/src/main/webapp/images/history-remove.png
new file mode 100644
index 0000000..9312ba8
Binary files /dev/null and b/pulse/src/main/webapp/images/history-remove.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/hor-spiltter-dot.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/hor-spiltter-dot.png b/pulse/src/main/webapp/images/hor-spiltter-dot.png
new file mode 100644
index 0000000..4096e1e
Binary files /dev/null and b/pulse/src/main/webapp/images/hor-spiltter-dot.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/icons members/locators.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/icons members/locators.png b/pulse/src/main/webapp/images/icons members/locators.png
new file mode 100644
index 0000000..307f570
Binary files /dev/null and b/pulse/src/main/webapp/images/icons members/locators.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/icons members/locators_others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/icons members/locators_others.png b/pulse/src/main/webapp/images/icons members/locators_others.png
new file mode 100644
index 0000000..13b9620
Binary files /dev/null and b/pulse/src/main/webapp/images/icons members/locators_others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/icons members/managers.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/icons members/managers.png b/pulse/src/main/webapp/images/icons members/managers.png
new file mode 100644
index 0000000..d83d4fa
Binary files /dev/null and b/pulse/src/main/webapp/images/icons members/managers.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/icons members/managers_locators.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/icons members/managers_locators.png b/pulse/src/main/webapp/images/icons members/managers_locators.png
new file mode 100644
index 0000000..fb061a6
Binary files /dev/null and b/pulse/src/main/webapp/images/icons members/managers_locators.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/icons members/managers_others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/icons members/managers_others.png b/pulse/src/main/webapp/images/icons members/managers_others.png
new file mode 100644
index 0000000..56b7fa7
Binary files /dev/null and b/pulse/src/main/webapp/images/icons members/managers_others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/icons members/others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/icons members/others.png b/pulse/src/main/webapp/images/icons members/others.png
new file mode 100644
index 0000000..3906e98
Binary files /dev/null and b/pulse/src/main/webapp/images/icons members/others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/info-msg-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/info-msg-icon.png b/pulse/src/main/webapp/images/info-msg-icon.png
new file mode 100644
index 0000000..c2da59a
Binary files /dev/null and b/pulse/src/main/webapp/images/info-msg-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/lastLine.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/lastLine.png b/pulse/src/main/webapp/images/lastLine.png
new file mode 100644
index 0000000..f7e5b16
Binary files /dev/null and b/pulse/src/main/webapp/images/lastLine.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/line.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/line.png b/pulse/src/main/webapp/images/line.png
new file mode 100644
index 0000000..96c24bb
Binary files /dev/null and b/pulse/src/main/webapp/images/line.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/mask-bg.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/mask-bg.png b/pulse/src/main/webapp/images/mask-bg.png
new file mode 100644
index 0000000..6ac2963
Binary files /dev/null and b/pulse/src/main/webapp/images/mask-bg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/membersName_arror-off.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/membersName_arror-off.png b/pulse/src/main/webapp/images/membersName_arror-off.png
new file mode 100644
index 0000000..2cb55fc
Binary files /dev/null and b/pulse/src/main/webapp/images/membersName_arror-off.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/membersName_arror-on.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/membersName_arror-on.png b/pulse/src/main/webapp/images/membersName_arror-on.png
new file mode 100644
index 0000000..b4d127d
Binary files /dev/null and b/pulse/src/main/webapp/images/membersName_arror-on.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/minus.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/minus.png b/pulse/src/main/webapp/images/minus.png
new file mode 100644
index 0000000..630c0ea
Binary files /dev/null and b/pulse/src/main/webapp/images/minus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-locators-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-locators-others.png b/pulse/src/main/webapp/images/normal-locators-others.png
new file mode 100644
index 0000000..fd3cd58
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-locators-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-locators.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-locators.png b/pulse/src/main/webapp/images/normal-locators.png
new file mode 100644
index 0000000..840873b
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-locators.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-manager-locator-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-manager-locator-others.png b/pulse/src/main/webapp/images/normal-manager-locator-others.png
new file mode 100644
index 0000000..3a9df66
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-manager-locator-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-manager-locator.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-manager-locator.png b/pulse/src/main/webapp/images/normal-manager-locator.png
new file mode 100644
index 0000000..437a409
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-manager-locator.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-managers-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-managers-others.png b/pulse/src/main/webapp/images/normal-managers-others.png
new file mode 100644
index 0000000..afb4656
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-managers-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-managers.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-managers.png b/pulse/src/main/webapp/images/normal-managers.png
new file mode 100644
index 0000000..e65c6e4
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-managers.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-others.png b/pulse/src/main/webapp/images/normal-others.png
new file mode 100644
index 0000000..f6a9cb6
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-otheruser.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-otheruser.png b/pulse/src/main/webapp/images/normal-otheruser.png
new file mode 100644
index 0000000..0646fef
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-otheruser.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal-status-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal-status-icon.png b/pulse/src/main/webapp/images/normal-status-icon.png
new file mode 100644
index 0000000..a3074c5
Binary files /dev/null and b/pulse/src/main/webapp/images/normal-status-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/normal.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/normal.png b/pulse/src/main/webapp/images/normal.png
new file mode 100644
index 0000000..c34b082
Binary files /dev/null and b/pulse/src/main/webapp/images/normal.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/orange-msg-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/orange-msg-icon.png b/pulse/src/main/webapp/images/orange-msg-icon.png
new file mode 100644
index 0000000..daec3e7
Binary files /dev/null and b/pulse/src/main/webapp/images/orange-msg-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/pivotal-logo.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/pivotal-logo.png b/pulse/src/main/webapp/images/pivotal-logo.png
new file mode 100644
index 0000000..7811bce
Binary files /dev/null and b/pulse/src/main/webapp/images/pivotal-logo.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/plus.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/plus.png b/pulse/src/main/webapp/images/plus.png
new file mode 100644
index 0000000..22440f1
Binary files /dev/null and b/pulse/src/main/webapp/images/plus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/plusMinusIcon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/plusMinusIcon.png b/pulse/src/main/webapp/images/plusMinusIcon.png
new file mode 100644
index 0000000..edd84de
Binary files /dev/null and b/pulse/src/main/webapp/images/plusMinusIcon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/popup-arrow.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/popup-arrow.png b/pulse/src/main/webapp/images/popup-arrow.png
new file mode 100644
index 0000000..89e25eb
Binary files /dev/null and b/pulse/src/main/webapp/images/popup-arrow.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/popup-close-button.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/popup-close-button.png b/pulse/src/main/webapp/images/popup-close-button.png
new file mode 100644
index 0000000..3c95f7d
Binary files /dev/null and b/pulse/src/main/webapp/images/popup-close-button.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/pulse-monitoring-gemfirexd-old.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/pulse-monitoring-gemfirexd-old.png b/pulse/src/main/webapp/images/pulse-monitoring-gemfirexd-old.png
new file mode 100644
index 0000000..2a032ba
Binary files /dev/null and b/pulse/src/main/webapp/images/pulse-monitoring-gemfirexd-old.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/pulse-monitoring-gemfirexd.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/pulse-monitoring-gemfirexd.png b/pulse/src/main/webapp/images/pulse-monitoring-gemfirexd.png
new file mode 100644
index 0000000..caf9cba
Binary files /dev/null and b/pulse/src/main/webapp/images/pulse-monitoring-gemfirexd.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/pulse-monitoring-sqlfire.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/pulse-monitoring-sqlfire.png b/pulse/src/main/webapp/images/pulse-monitoring-sqlfire.png
new file mode 100644
index 0000000..9537694
Binary files /dev/null and b/pulse/src/main/webapp/images/pulse-monitoring-sqlfire.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/pulse-monitoring.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/pulse-monitoring.png b/pulse/src/main/webapp/images/pulse-monitoring.png
new file mode 100644
index 0000000..3530b1d
Binary files /dev/null and b/pulse/src/main/webapp/images/pulse-monitoring.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/radio-off.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/radio-off.png b/pulse/src/main/webapp/images/radio-off.png
new file mode 100644
index 0000000..3aba4d1
Binary files /dev/null and b/pulse/src/main/webapp/images/radio-off.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/radio-on.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/radio-on.png b/pulse/src/main/webapp/images/radio-on.png
new file mode 100644
index 0000000..f6efd88
Binary files /dev/null and b/pulse/src/main/webapp/images/radio-on.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/radio.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/radio.png b/pulse/src/main/webapp/images/radio.png
new file mode 100644
index 0000000..b769123
Binary files /dev/null and b/pulse/src/main/webapp/images/radio.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/regionIcons.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/regionIcons.png b/pulse/src/main/webapp/images/regionIcons.png
new file mode 100644
index 0000000..30bf699
Binary files /dev/null and b/pulse/src/main/webapp/images/regionIcons.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/rightBorder.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/rightBorder.png b/pulse/src/main/webapp/images/rightBorder.png
new file mode 100644
index 0000000..0f4b2df
Binary files /dev/null and b/pulse/src/main/webapp/images/rightBorder.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/searchIcon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/searchIcon.png b/pulse/src/main/webapp/images/searchIcon.png
new file mode 100644
index 0000000..db93ea9
Binary files /dev/null and b/pulse/src/main/webapp/images/searchIcon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/seperator.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/seperator.png b/pulse/src/main/webapp/images/seperator.png
new file mode 100644
index 0000000..53ebba2
Binary files /dev/null and b/pulse/src/main/webapp/images/seperator.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/server.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/server.png b/pulse/src/main/webapp/images/server.png
new file mode 100644
index 0000000..c5fd61d
Binary files /dev/null and b/pulse/src/main/webapp/images/server.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-locators-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-locators-others.png b/pulse/src/main/webapp/images/severe-locators-others.png
new file mode 100644
index 0000000..5d1d603
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-locators-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-locators.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-locators.png b/pulse/src/main/webapp/images/severe-locators.png
new file mode 100644
index 0000000..23569bd
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-locators.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-manager-locator-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-manager-locator-others.png b/pulse/src/main/webapp/images/severe-manager-locator-others.png
new file mode 100644
index 0000000..6a6f1bd
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-manager-locator-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-manager-locator.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-manager-locator.png b/pulse/src/main/webapp/images/severe-manager-locator.png
new file mode 100644
index 0000000..dec8418
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-manager-locator.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-managers-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-managers-others.png b/pulse/src/main/webapp/images/severe-managers-others.png
new file mode 100644
index 0000000..1b9b58d
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-managers-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-managers.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-managers.png b/pulse/src/main/webapp/images/severe-managers.png
new file mode 100644
index 0000000..20e4f5d
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-managers.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-msg-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-msg-icon.png b/pulse/src/main/webapp/images/severe-msg-icon.png
new file mode 100644
index 0000000..d1a31ef
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-msg-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-others.png b/pulse/src/main/webapp/images/severe-others.png
new file mode 100644
index 0000000..afa797d
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-otheruser.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-otheruser.png b/pulse/src/main/webapp/images/severe-otheruser.png
new file mode 100644
index 0000000..648f792
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-otheruser.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe-status-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe-status-icon.png b/pulse/src/main/webapp/images/severe-status-icon.png
new file mode 100644
index 0000000..e159451
Binary files /dev/null and b/pulse/src/main/webapp/images/severe-status-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/severe.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/severe.png b/pulse/src/main/webapp/images/severe.png
new file mode 100644
index 0000000..8ca2b3e
Binary files /dev/null and b/pulse/src/main/webapp/images/severe.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/show_ico.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/show_ico.png b/pulse/src/main/webapp/images/show_ico.png
new file mode 100644
index 0000000..f5565e3
Binary files /dev/null and b/pulse/src/main/webapp/images/show_ico.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/spacer.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/spacer.png b/pulse/src/main/webapp/images/spacer.png
new file mode 100644
index 0000000..88ab963
Binary files /dev/null and b/pulse/src/main/webapp/images/spacer.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/sqlfire.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/sqlfire.png b/pulse/src/main/webapp/images/sqlfire.png
new file mode 100644
index 0000000..9537694
Binary files /dev/null and b/pulse/src/main/webapp/images/sqlfire.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/status-down.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/status-down.png b/pulse/src/main/webapp/images/status-down.png
new file mode 100644
index 0000000..68bc7b3
Binary files /dev/null and b/pulse/src/main/webapp/images/status-down.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/status-up.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/status-up.png b/pulse/src/main/webapp/images/status-up.png
new file mode 100644
index 0000000..bac3637
Binary files /dev/null and b/pulse/src/main/webapp/images/status-up.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/subServer.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/subServer.png b/pulse/src/main/webapp/images/subServer.png
new file mode 100644
index 0000000..ac89e88
Binary files /dev/null and b/pulse/src/main/webapp/images/subServer.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/tab-bottom-bg.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/tab-bottom-bg.png b/pulse/src/main/webapp/images/tab-bottom-bg.png
new file mode 100644
index 0000000..ce06942
Binary files /dev/null and b/pulse/src/main/webapp/images/tab-bottom-bg.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/treeView-img.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/treeView-img.png b/pulse/src/main/webapp/images/treeView-img.png
new file mode 100644
index 0000000..42ba3ed
Binary files /dev/null and b/pulse/src/main/webapp/images/treeView-img.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/ui-anim_basic_16x16.gif
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/ui-anim_basic_16x16.gif b/pulse/src/main/webapp/images/ui-anim_basic_16x16.gif
new file mode 100644
index 0000000..084ecb8
Binary files /dev/null and b/pulse/src/main/webapp/images/ui-anim_basic_16x16.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/ver-spiltter-dot.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/ver-spiltter-dot.png b/pulse/src/main/webapp/images/ver-spiltter-dot.png
new file mode 100644
index 0000000..d72eae1
Binary files /dev/null and b/pulse/src/main/webapp/images/ver-spiltter-dot.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-locators-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-locators-others.png b/pulse/src/main/webapp/images/warning-locators-others.png
new file mode 100644
index 0000000..7a70358
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-locators-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-locators.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-locators.png b/pulse/src/main/webapp/images/warning-locators.png
new file mode 100644
index 0000000..da09443
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-locators.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-manager-locator-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-manager-locator-others.png b/pulse/src/main/webapp/images/warning-manager-locator-others.png
new file mode 100644
index 0000000..26aed1e
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-manager-locator-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-manager-locator.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-manager-locator.png b/pulse/src/main/webapp/images/warning-manager-locator.png
new file mode 100644
index 0000000..7b2538d
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-manager-locator.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-managers-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-managers-others.png b/pulse/src/main/webapp/images/warning-managers-others.png
new file mode 100644
index 0000000..23b3313
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-managers-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-managers.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-managers.png b/pulse/src/main/webapp/images/warning-managers.png
new file mode 100644
index 0000000..dce93f6
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-managers.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-msg-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-msg-icon.png b/pulse/src/main/webapp/images/warning-msg-icon.png
new file mode 100644
index 0000000..1b4b623
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-msg-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-others.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-others.png b/pulse/src/main/webapp/images/warning-others.png
new file mode 100644
index 0000000..676b2bf
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-others.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-otheruser.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-otheruser.png b/pulse/src/main/webapp/images/warning-otheruser.png
new file mode 100644
index 0000000..216e850
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-otheruser.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning-status-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning-status-icon.png b/pulse/src/main/webapp/images/warning-status-icon.png
new file mode 100644
index 0000000..783957b
Binary files /dev/null and b/pulse/src/main/webapp/images/warning-status-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/warning.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/warning.png b/pulse/src/main/webapp/images/warning.png
new file mode 100644
index 0000000..c299a9d
Binary files /dev/null and b/pulse/src/main/webapp/images/warning.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/yellow-msg-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/yellow-msg-icon.png b/pulse/src/main/webapp/images/yellow-msg-icon.png
new file mode 100644
index 0000000..a0b2519
Binary files /dev/null and b/pulse/src/main/webapp/images/yellow-msg-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/index.html b/pulse/src/main/webapp/index.html
new file mode 100644
index 0000000..f2448ad
--- /dev/null
+++ b/pulse/src/main/webapp/index.html
@@ -0,0 +1,49 @@
+<!doctype html>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<title>Pulse</title>
+
+    <!--  CSS Files -->
+    <!-- <link rel="stylesheet" type="text/css" href="css/jquery.min.css" /> -->
+    <!--  END CSS FILES -->  
+    
+    <!-- JS FILES -->
+    <script type="text/javascript" src="scripts/lib/jquery-1.7.2.js"></script>
+    <script type="text/javascript" src="scripts/lib/jquery.i18n.properties.js"></script>
+    <script  type="text/javascript" src="scripts/pulsescript/common.js"></script>
+    <script  type="text/javascript" src="scripts/pulsescript/pages/index.js"></script>
+    <!-- END JS FILES -->
+    <script type="text/javascript">
+    function redirectPage(){
+      var paramHost = GetParam("host");
+      var paramPort = GetParam("port");
+      
+      //set host value in cookie 
+      if(paramHost != ''){
+        setCookie('host', paramHost, 5)
+      }else{
+        setCookie('host', '', -5)
+      }
+      
+      //set port value in cookie 
+      if(paramPort != ''){
+        setCookie('port', paramPort, 5)
+      }else{
+        setCookie('port', '', -5)
+      }
+      
+      // redirect user on Login Page 
+      window.location.href = "Login.html";
+    }
+    </script>
+</head>
+<body onload="redirectPage();">
+    <!-- <div class="example-content">
+	    <input type="button" value="English" onclick="javascript: changeLocale('', 'index');"></input>
+	    <input type="button" value="French" onclick="javascript: changeLocale('fr', 'index');"></input>
+    </div>
+      
+    <div><p><span id="I18NTEXT"> </span></p></div> -->
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/default.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/default.properties b/pulse/src/main/webapp/properties/default.properties
new file mode 100644
index 0000000..46903d7
--- /dev/null
+++ b/pulse/src/main/webapp/properties/default.properties
@@ -0,0 +1,4 @@
+# All properties which are common between GemFire & SQLFire are to be added here. 
+# No property to repeat in specific files of GemFire and SQLFire products
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/default_en.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/default_en.properties b/pulse/src/main/webapp/properties/default_en.properties
new file mode 100644
index 0000000..46903d7
--- /dev/null
+++ b/pulse/src/main/webapp/properties/default_en.properties
@@ -0,0 +1,4 @@
+# All properties which are common between GemFire & SQLFire are to be added here. 
+# No property to repeat in specific files of GemFire and SQLFire products
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/gemfire.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/gemfire.properties b/pulse/src/main/webapp/properties/gemfire.properties
new file mode 100644
index 0000000..9ee4fc6
--- /dev/null
+++ b/pulse/src/main/webapp/properties/gemfire.properties
@@ -0,0 +1,28 @@
+# All properties for GemFire are to be added here. 
+# No property to repeat from default file
+pulse-writeputpersec-custom=Write/Sec.
+pulse-readgetpersec-custom=Read/Sec.
+pulse-writes-custom=Writes
+pulse-reads-custom=Reads
+pulse-monitoring-custom=images/pulse-monitoring.png
+pulse-aboutimg-custom=images/about.png
+pulse-help-custom=http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html
+pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-regionstableCaps-custom=Regions
+pulse-rtSummaryBySize-custom=Regions Summary - By Entry Count
+pulse-regionstablePath-custom=Region Path:&nbsp;
+pulse-regionstableType-custom=Region Type:&nbsp;
+pulse-regionstableMembers-custom=Region Members
+pulse-memberRegionsTables-custom=Member Regions
+pulse-regionstableInvolved-custom=Regions Involved
+pulse-regiontabletooltip-custom=Regions
+pulse-writesRate-custom=Writes Rate
+pulse-readsRate-custom=Reads Rate
+pulse-regiontablePathColName-custom=Region Path
+pulse-regiontableName-custom=Region Name
+pulse-regionMemoryUsage-custom=Memory Usage
+pulse-regionDiskReadsWrites-custom=Disk Reads/Writes
+pulse-regionMemoryReadsWrites-custom=Reads/Writes
+pulse-entrysize-custom=Entry Size
+pulse-entrycount-custom=Entry Count
+pulse-functionprocedureCaps-custom=Functions

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/gemfire_en.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/gemfire_en.properties b/pulse/src/main/webapp/properties/gemfire_en.properties
new file mode 100644
index 0000000..9ee4fc6
--- /dev/null
+++ b/pulse/src/main/webapp/properties/gemfire_en.properties
@@ -0,0 +1,28 @@
+# All properties for GemFire are to be added here. 
+# No property to repeat from default file
+pulse-writeputpersec-custom=Write/Sec.
+pulse-readgetpersec-custom=Read/Sec.
+pulse-writes-custom=Writes
+pulse-reads-custom=Reads
+pulse-monitoring-custom=images/pulse-monitoring.png
+pulse-aboutimg-custom=images/about.png
+pulse-help-custom=http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html
+pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-regionstableCaps-custom=Regions
+pulse-rtSummaryBySize-custom=Regions Summary - By Entry Count
+pulse-regionstablePath-custom=Region Path:&nbsp;
+pulse-regionstableType-custom=Region Type:&nbsp;
+pulse-regionstableMembers-custom=Region Members
+pulse-memberRegionsTables-custom=Member Regions
+pulse-regionstableInvolved-custom=Regions Involved
+pulse-regiontabletooltip-custom=Regions
+pulse-writesRate-custom=Writes Rate
+pulse-readsRate-custom=Reads Rate
+pulse-regiontablePathColName-custom=Region Path
+pulse-regiontableName-custom=Region Name
+pulse-regionMemoryUsage-custom=Memory Usage
+pulse-regionDiskReadsWrites-custom=Disk Reads/Writes
+pulse-regionMemoryReadsWrites-custom=Reads/Writes
+pulse-entrysize-custom=Entry Size
+pulse-entrycount-custom=Entry Count
+pulse-functionprocedureCaps-custom=Functions

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/gemfirexd.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/gemfirexd.properties b/pulse/src/main/webapp/properties/gemfirexd.properties
new file mode 100644
index 0000000..5075f88
--- /dev/null
+++ b/pulse/src/main/webapp/properties/gemfirexd.properties
@@ -0,0 +1,28 @@
+# All properties for GemFire XD are to be added here. 
+# No property to repeat from default file
+pulse-writeputpersec-custom=Put/Sec.
+pulse-readgetpersec-custom=Get/Sec.
+pulse-writes-custom=Writes
+pulse-reads-custom=Reads
+pulse-monitoring-custom=images/pulse-monitoring-gemfirexd.png
+pulse-aboutimg-custom=images/about-gemfirexd.png
+pulse-help-custom=http://www.pivotal.io/pivotal-products/data/pivotal-gemfire-xd
+pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire XD systems in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-regionstableCaps-custom=Tables
+pulse-rtSummaryBySize-custom=Tables Summary - By Row Count
+pulse-regionstablePath-custom=Table Path:&nbsp;
+pulse-regionstableType-custom=Table Type:&nbsp;
+pulse-regionstableMembers-custom=Table Members
+pulse-memberRegionsTables-custom=Member Tables
+pulse-regionstableInvolved-custom=Tables Involved
+pulse-regiontabletooltip-custom=Tables
+pulse-writesRate-custom=Puts Rate
+pulse-readsRate-custom=Gets Rate
+pulse-regiontablePathColName-custom=Table Path
+pulse-regiontableName-custom=Table Name
+pulse-regionMemoryUsage-custom=Memory Usage
+pulse-regionDiskReadsWrites-custom=Disk Reads/Writes
+pulse-regionMemoryReadsWrites-custom=Reads/Writes
+pulse-entrysize-custom=Table Size
+pulse-entrycount-custom=Row Count
+pulse-functionprocedureCaps-custom=Procedures

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/gemfirexd_en.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/gemfirexd_en.properties b/pulse/src/main/webapp/properties/gemfirexd_en.properties
new file mode 100644
index 0000000..5075f88
--- /dev/null
+++ b/pulse/src/main/webapp/properties/gemfirexd_en.properties
@@ -0,0 +1,28 @@
+# All properties for GemFire XD are to be added here. 
+# No property to repeat from default file
+pulse-writeputpersec-custom=Put/Sec.
+pulse-readgetpersec-custom=Get/Sec.
+pulse-writes-custom=Writes
+pulse-reads-custom=Reads
+pulse-monitoring-custom=images/pulse-monitoring-gemfirexd.png
+pulse-aboutimg-custom=images/about-gemfirexd.png
+pulse-help-custom=http://www.pivotal.io/pivotal-products/data/pivotal-gemfire-xd
+pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire XD systems in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-regionstableCaps-custom=Tables
+pulse-rtSummaryBySize-custom=Tables Summary - By Row Count
+pulse-regionstablePath-custom=Table Path:&nbsp;
+pulse-regionstableType-custom=Table Type:&nbsp;
+pulse-regionstableMembers-custom=Table Members
+pulse-memberRegionsTables-custom=Member Tables
+pulse-regionstableInvolved-custom=Tables Involved
+pulse-regiontabletooltip-custom=Tables
+pulse-writesRate-custom=Puts Rate
+pulse-readsRate-custom=Gets Rate
+pulse-regiontablePathColName-custom=Table Path
+pulse-regiontableName-custom=Table Name
+pulse-regionMemoryUsage-custom=Memory Usage
+pulse-regionDiskReadsWrites-custom=Disk Reads/Writes
+pulse-regionMemoryReadsWrites-custom=Reads/Writes
+pulse-entrysize-custom=Table Size
+pulse-entrycount-custom=Row Count
+pulse-functionprocedureCaps-custom=Procedures

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/index.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/index.properties b/pulse/src/main/webapp/properties/index.properties
new file mode 100644
index 0000000..9fa6e7f
--- /dev/null
+++ b/pulse/src/main/webapp/properties/index.properties
@@ -0,0 +1 @@
+msg_welcome = Welcome to GFMon !

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/index_fr.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/index_fr.properties b/pulse/src/main/webapp/properties/index_fr.properties
new file mode 100644
index 0000000..868a854
--- /dev/null
+++ b/pulse/src/main/webapp/properties/index_fr.properties
@@ -0,0 +1,2 @@
+msg_welcome = Bienvenue à GFMon !
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/properties/sqlfire.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/properties/sqlfire.properties b/pulse/src/main/webapp/properties/sqlfire.properties
new file mode 100644
index 0000000..c8e1bd9
--- /dev/null
+++ b/pulse/src/main/webapp/properties/sqlfire.properties
@@ -0,0 +1,28 @@
+# All properties for SQLFire are to be added here. 
+# No property to repeat from default file
+pulse-writeputpersec-custom=Put/Sec.
+pulse-readgetpersec-custom=Get/Sec.
+pulse-writes-custom=Writes
+pulse-reads-custom=Reads
+pulse-monitoring-custom=images/pulse-monitoring-sqlfire.png
+pulse-aboutimg-custom=images/about-sqlfire.png
+pulse-help-custom=http://review.eng.vmware.com/infocenter-sqlfire-helios/index.jsp?topic=/com.vmware.vfabric.sqlfire.1.1/manage_guide/pulse/chapter_overview.html
+pulse-about-custom=The Pulse tool monitors vFabric&#0153; SQLFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-regionstableCaps-custom=Tables
+pulse-rtSummaryBySize-custom=Tables Summary - By Row Count
+pulse-regionstablePath-custom=Table Path:&nbsp;
+pulse-regionstableType-custom=Table Type:&nbsp;
+pulse-regionstableMembers-custom=Table Members
+pulse-memberRegionsTables-custom=Member Tables
+pulse-regionstableInvolved-custom=Tables Involved
+pulse-regiontabletooltip-custom=Tables
+pulse-writesRate-custom=Puts Rate
+pulse-readsRate-custom=Gets Rate
+pulse-regiontablePathColName-custom=Table Path
+pulse-regiontableName-custom=Table Name
+pulse-regionMemoryUsage-custom=Memory Usage
+pulse-regionDiskReadsWrites-custom=Disk Reads/Writes
+pulse-regionMemoryReadsWrites-custom=Reads/Writes
+pulse-entrysize-custom=Table Size
+pulse-entrycount-custom=Row Count
+pulse-functionprocedureCaps-custom=Procedures
\ No newline at end of file


[07/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js b/pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js
new file mode 100644
index 0000000..1816ab8
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/clusterDetail.js
@@ -0,0 +1,2349 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+var selectedPerspectiveView = "member";
+var selectedMemberViewOption = "default";
+var selectedViewTypeDefault = ""; //"rgraph";
+var selectedViewTypeSG = "treemap";
+var selectedViewTypeRZ = "treemap";
+var selectedViewTypeData = "treemap";
+
+var gblClusterMembers = null;
+
+/**
+ * This JS File is used for Cluster Details screen
+ * 
+ */
+
+// This function is the initialization function for Cluster Details screen. It
+// is
+// making call to functions defined for different widgets used on this screen
+$(document).ready(function() {
+
+  // Load Notification HTML  
+  generateNotificationsPanel();
+
+  // modify UI text as per requirement
+  customizeUI();
+
+  if (CONST_BACKEND_PRODUCT_SQLFIRE == productname.toLowerCase()) {
+    alterHtmlContainer(CONST_BACKEND_PRODUCT_SQLFIRE);
+
+    // "ClusterDetails" service callback handler
+    getClusterDetailsBack = getClusterDetailsSQLfireBack;
+
+    // "ClusterKeyStatistics" service callback handler
+    getClusterKeyStatisticsBack = getClusterKeyStatisticsSQLfireBack;
+
+  } else {
+    alterHtmlContainer(CONST_BACKEND_PRODUCT_GEMFIRE);
+    
+    // "ClusterDetails" service callback handler
+    getClusterDetailsBack = getClusterDetailsGemfireBack;
+
+    // "ClusterKeyStatistics" service callback handler
+    getClusterKeyStatisticsBack = getClusterKeyStatisticsGemfireBack;
+  }
+
+  // Add hostspot attributes
+  hotspotAttributes = new Array();
+  hotspotAttributes.push({"id":"currentHeapUsage", "name":"Heap Usage"});
+  hotspotAttributes.push({"id":"cpuUsage", "name":"CPU Usage"});
+
+  // Initialize set up for hotspot
+  initHotspotDropDown();
+
+  scanPageForWidgets();
+  // Default view - creating blank cluster members tree map 
+  createMembersTreeMapDefault();
+  $('#default_treemap_block').hide();
+  // Default view - creating blank cluster members grid
+  createMemberGridDefault();
+  // Default view - creating blank R Graph for all members associated with defined cluster
+  createClusteRGraph();
+
+  // Server Groups view - creating blank cluster members tree map 
+  createMembersTreeMapSG();
+  $('#servergroups_treemap_block').hide();
+  // Server Groups view - creating blank cluster members grid
+  createMemberGridSG();
+
+  // Redundancy Zones view - creating blank cluster members tree map  
+  createMembersTreeMapRZ();
+  $('#redundancyzones_treemap_block').hide();
+  // Redundancy Zones view - creating blank cluster members grid
+  createMemberGridRZ();
+
+  // Data view - creating blank cluster data/regions tree map 
+  createRegionsTreeMapDefault();
+  $('#data_treemap_block').hide();
+  // Data view - creating blank cluster data/regions grid
+  createRegionsGridDefault();
+
+  $.ajaxSetup({
+    cache : false
+  });
+});
+
+/*
+ * Function to show and hide html elements/components based upon whether product
+ * is sqlfire or gemfire 
+ */
+function alterHtmlContainer(prodname){
+  if(CONST_BACKEND_PRODUCT_SQLFIRE == prodname.toLowerCase()){
+    // Hide HTML for following
+    $('#clusterUniqueCQsContainer').hide();
+    $('#SubscriptionsContainer').hide();
+    $('#queriesPerSecContainer').hide();
+    
+    // Show HTML for following
+    $('#subTabQueryStatistics').show();
+    $('#TxnCommittedContainer').show();
+    $('#TxnRollbackContainer').show(); 
+  }else{
+    // Hide HTML for following
+    $('#subTabQueryStatistics').hide();
+    $('#TxnCommittedContainer').hide();
+    $('#TxnRollbackContainer').hide();
+
+    // Show HTML for following
+    $('#clusterUniqueCQsContainer').show();
+    $('#SubscriptionsContainer').show();
+    $('#queriesPerSecContainer').show();
+  }
+  
+}
+
+// Function called when Hotspot is changed 
+function applyHotspot(){
+  var data = new Object();
+  data.members = gblClusterMembers;
+  if (flagActiveTab == "MEM_TREE_MAP_DEF") {
+    updateClusterMembersTreeMapDefault(data);
+  } else if (flagActiveTab == "MEM_TREE_MAP_SG") {
+    updateClusterMembersTreeMapSG(data);
+  } else if (flagActiveTab == "MEM_TREE_MAP_RZ") {
+    updateClusterMembersTreeMapRZ(data);
+  }
+}
+
+function translateGetClusterMemberBack(data) {
+  getClusterMembersBack(data.ClusterMembers);
+}
+
+function translateGetClusterMemberRGraphBack(data) {
+  getClusterMembersRGraphBack(data.ClusterMembersRGraph);
+}
+
+function translateGetClusterRegionsBack(data) {
+  getClusterRegionsBack(data.ClusterRegions);
+}
+
+// function used for creating blank TreeMap for member's on Cluster Details
+// Screen
+function createMembersTreeMapDefault() {
+  var dataVal = {
+    "$area" : 1,
+    "initial" : true
+  };
+  var json = {
+    "children" : {},
+    "data" : dataVal,
+    "id" : "root",
+    "name" : "Members"
+  };
+
+  clusterMemberTreeMap = new $jit.TM.Squarified(
+      {
+
+        injectInto : 'GraphTreeMap',
+        levelsToShow : 1,
+        titleHeight : 0,
+        background : '#a0c44a',
+        offset : 2,
+        Label : {
+          type : 'HTML',
+          size : 1
+        },
+        Node : {
+          CanvasStyles : {
+            shadowBlur : 0
+          }
+        },
+        Events : {
+          enable : true,
+          onMouseEnter : function(node, eventInfo) {
+            if (node) {
+              node.setCanvasStyle('shadowBlur', 7);
+              node.setData('border', '#ffffff');
+
+              clusterMemberTreeMap.fx.plotNode(node,
+                  clusterMemberTreeMap.canvas);
+              clusterMemberTreeMap.labels.plotLabel(
+                  clusterMemberTreeMap.canvas, node);
+            }
+          },
+          onMouseLeave : function(node) {
+            if (node) {
+              node.removeData('border', '#ffffff');
+              node.removeCanvasStyle('shadowBlur');
+              clusterMemberTreeMap.plot();
+            }
+          },
+          onClick : function(node) {
+            if (!node.data.initial) {
+              location.href = 'MemberDetails.html?member=' + node.id
+                  + '&memberName=' + node.name;
+            }
+          }
+        },
+
+        Tips : {
+          enable : true,
+          offsetX : 5,
+          offsetY : 5,
+          onShow : function(tip, node, isLeaf, domElement) {
+            var html = "";
+            var data = node.data;
+            if (!data.initial) {
+              html = "<div class=\"tip-title\"><div><div class='popupHeading'>"
+                  + node.name
+                  + "</div>"
+                  + "<div class='popupFirstRow'><div class='popupRowBorder borderBottomZero'>"
+                  + "<div class='labeltext left display-block width-70'><span class='left'>CPU Usage</span></div><div class='right width-30'>"
+                  + "<div class='color-d2d5d7 font-size14'>"
+                  + data.cpuUsage
+                  + "<span class='fontSize15'>%</span></span></div>"
+                  + "</div></div>"
+                  + "<div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                  + "<span class='left'>Memory Usage</span></div><div class='right width-30'>"
+                  + "<div class='color-d2d5d7 font-size14'>"
+                  + data.heapUsage
+                  + "<span class='font-size15 paddingL5'>MB</span>"
+                  + "</div></div></div>"
+                  + "<div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                  + "<span class='left'>Load Avg.</span></div><div class='right width-30'>"
+                  + "<div class='color-d2d5d7 font-size14'>"
+                  + applyNotApplicableCheck(data.loadAvg)
+                  + "</div></div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                  + "<span class='left'>Threads</span></div><div class='right width-30'>"
+                  + "<div class='color-d2d5d7 font-size14'>"
+                  + data.threads
+                  + "</div></div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                  + "<span class='left'>Sockets</span></div><div class='right width-30'>"
+                  + "<div class='color-d2d5d7 font-size14'>"
+                  + applyNotApplicableCheck(data.sockets)
+                  + "</div></div></div><div class='popupRowBorder borderBottomZero'>"
+                  + "<div class='labeltext left display-block width-70'><span class='left'>GemFire Version</span>"
+                  + "</div><div class='right width-30'><div class='color-d2d5d7 font-size14'>"
+                  + data.gemfireVersion + "</div></div>" + "</div>" + ""
+                  + "</div></div>" + "</div>";
+            } else {
+              html = "<div class=\"tip-title\"><div><div class='popupHeading'>Loading</div>";
+            }
+            tip.innerHTML = html;
+          }
+        },
+        onCreateLabel : function(domElement, node) {
+          //domElement.style.opacity = 0.01;
+
+          if(node.id == "root"){
+            domElement.innerHTML = "<div class='treemapRootNodeLabeltext'>&nbsp;</div>";
+          }else{
+            domElement.innerHTML = "<div class='treemapNodeLabeltext'>"+node.name+"</div>";
+            var style = domElement.style;
+            style.display = '';
+            style.border = '1px solid transparent';
+
+            domElement.onmouseover = function() {
+              style.border = '1px solid #ffffff';
+            };
+
+            domElement.onmouseout = function() {
+              style.border = '1px solid transparent';
+            };
+          }
+
+        }
+      });
+  clusterMemberTreeMap.loadJSON(json);
+  clusterMemberTreeMap.refresh();
+}
+
+//function used for creating blank TreeMap for member's on Servre Groups View
+function createMembersTreeMapSG(){
+  var dataVal = {
+      "$area" : 1,
+      "initial" : true
+    };
+    var json = {
+      "children" : {},
+      "data" : dataVal,
+      "id" : "root",
+      "name" : "sgMembers"
+    };
+
+    clusterSGMemberTreeMap = new $jit.TM.Squarified(
+        {
+
+          injectInto : 'GraphTreeMapSG',
+          //levelsToShow : 1,
+          titleHeight : 15,
+          background : '#a0c44a',
+          offset : 1,
+          userData : {
+            isNodeEntered : false
+          },
+          Label : {
+            type : 'HTML',
+            size : 9
+          },
+          Node : {
+            CanvasStyles : {
+              shadowBlur : 0
+            }
+          },
+          Events : {
+            enable : true,
+            onMouseEnter : function(node, eventInfo) {
+              if (node && node.id != "root") {
+                node.setCanvasStyle('shadowBlur', 7);
+                node.setData('border', '#ffffff');
+
+                clusterSGMemberTreeMap.fx.plotNode(node,
+                    clusterSGMemberTreeMap.canvas);
+                clusterSGMemberTreeMap.labels.plotLabel(
+                    clusterSGMemberTreeMap.canvas, node);
+              }
+            },
+            onMouseLeave : function(node) {
+              if (node && node.id != "root") {
+                node.removeData('border', '#ffffff');
+                node.removeCanvasStyle('shadowBlur');
+                clusterSGMemberTreeMap.plot();
+              }
+            },
+            onClick : function(node) {
+              if (node) {
+                if(node._depth == 1){
+                  var isSGNodeEntered = clusterSGMemberTreeMap.config.userData.isNodeEntered;
+                  if(!isSGNodeEntered){
+                    clusterSGMemberTreeMap.config.userData.isNodeEntered = true;
+                    clusterSGMemberTreeMap.enter(node);
+                  }else{
+                    clusterSGMemberTreeMap.config.userData.isNodeEntered = false;
+                    clusterSGMemberTreeMap.out();
+                  }
+                } else if(node._depth == 2 && (!node.data.initial)){
+                  location.href = 'MemberDetails.html?member=' + node.data.id
+                  + '&memberName=' + node.data.name;
+                }
+              }
+            },
+            onRightClick: function() {
+              clusterSGMemberTreeMap.out();
+            }
+          },
+
+          Tips : {
+            enable : true,
+            offsetX : 5,
+            offsetY : 5,
+            onShow : function(tip, node, isLeaf, domElement) {
+              var html = "";
+              if(node && node.id != "root"){
+                var data = node.data;
+                if (!data.initial) {
+                  if(node._depth == 1){
+                    html = "<div class=\"tip-title\"><div><div class='popupHeading'>" + node.name + "</div>";
+                  }else if(node._depth == 2){
+                    html = "<div class=\"tip-title\"><div><div class='popupHeading'>"
+                        + node.name
+                        + "</div>"
+                        + "<div class='popupFirstRow'><div class='popupRowBorder borderBottomZero'>"
+                        + "<div class='labeltext left display-block width-70'><span class='left'>CPU Usage</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + data.cpuUsage
+                        + "<span class='fontSize15'>%</span></span></div>"
+                        + "</div></div>"
+                        + "<div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                        + "<span class='left'>Memory Usage</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + data.heapUsage
+                        + "<span class='font-size15 paddingL5'>MB</span>"
+                        + "</div></div></div>"
+                        + "<div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                        + "<span class='left'>Load Avg.</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + applyNotApplicableCheck(data.loadAvg)
+                        + "</div></div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                        + "<span class='left'>Threads</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + data.threads
+                        + "</div></div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                        + "<span class='left'>Sockets</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + applyNotApplicableCheck(data.sockets)
+                        + "</div></div></div><div class='popupRowBorder borderBottomZero'>"
+                        + "<div class='labeltext left display-block width-70'><span class='left'>GemFire Version</span>"
+                        + "</div><div class='right width-30'><div class='color-d2d5d7 font-size14'>"
+                        + data.gemfireVersion + "</div></div>" + "</div>" + ""
+                        + "</div></div>" + "</div>";
+                  }
+                }else{
+                  html = "<div class=\"tip-title\"><div><div class='popupHeading'>Loading Server Groups and Members</div>";
+                }
+              }else{
+                html = "<div class=\"tip-title\"><div><div class='popupHeading'>Cluster's Server Groups and Members</div>";
+              }
+              tip.innerHTML = html;
+            }
+          },
+          onBeforePlotNode: function(node) {
+            if(node._depth == 0) {
+              // Hide root node title bar
+              node.setData('color', '#132634');  
+            } else if(node._depth == 1) {
+              node.setData('color', '#506D94');
+            }
+          },
+          onCreateLabel : function(domElement, node) {
+            //domElement.style.opacity = 0.01;
+            if(node._depth != 0){
+              domElement.innerHTML = "<div class='treemapNodeLabeltext'>"+node.name+"</div>";
+              var style = domElement.style;
+              style.display = '';
+              style.border = '1px solid transparent';
+
+              domElement.onmouseover = function() {
+                style.border = '1px solid #ffffff';
+                // Highlight this member in all server groups
+                if(this.id.indexOf("(!)") != -1){
+                  var currSGMemberId = this.id.substring(this.id.indexOf("(!)")+3);
+                  var sgMembersDOM = $("div[id$='"+currSGMemberId+"']");
+                  for(var cntr=0; cntr<sgMembersDOM.length; cntr++){
+                    sgMembersDOM[cntr].style.border = '1px solid #ffffff';
+                  }
+                }
+              };
+
+              domElement.onmouseout = function() {
+                style.border = '1px solid transparent';
+                // Remove Highlighting of this member in all server groups
+                if(this.id.indexOf("(!)") != -1){
+                  var currSGMemberId = this.id.substring(this.id.indexOf("(!)")+3);
+                  var sgMembersDOM = $("div[id$='"+currSGMemberId+"']");
+                  for(var cntr=0; cntr<sgMembersDOM.length; cntr++){
+                    sgMembersDOM[cntr].style.border = '1px solid transparent';
+                  }
+                }
+              };
+            }
+          }
+        });
+    clusterSGMemberTreeMap.loadJSON(json);
+    clusterSGMemberTreeMap.refresh();
+}
+
+//function used for creating blank TreeMap for member's on Redundancy Zones View
+function createMembersTreeMapRZ(){
+  var dataVal = {
+      "$area" : 1,
+      "initial" : true
+    };
+    var json = {
+      "children" : {},
+      "data" : dataVal,
+      "id" : "root",
+      "name" : "rzMembers"
+    };
+
+    clusterRZMemberTreeMap = new $jit.TM.Squarified(
+        {
+
+          injectInto : 'GraphTreeMapRZ',
+          //levelsToShow : 1,
+          titleHeight : 15,
+          background : '#a0c44a',
+          offset : 1,
+          userData : {
+            isNodeEntered : false
+          },
+          Label : {
+            type : 'HTML',
+            size : 9
+          },
+          Node : {
+            CanvasStyles : {
+              shadowBlur : 0
+            }
+          },
+          Events : {
+            enable : true,
+            onMouseEnter : function(node, eventInfo) {
+              if (node && node.id != "root") {
+                node.setCanvasStyle('shadowBlur', 7);
+                node.setData('border', '#ffffff');
+
+                clusterRZMemberTreeMap.fx.plotNode(node,
+                    clusterRZMemberTreeMap.canvas);
+                clusterRZMemberTreeMap.labels.plotLabel(
+                    clusterRZMemberTreeMap.canvas, node);
+              }
+            },
+            onMouseLeave : function(node) {
+              if (node && node.id != "root") {
+                node.removeData('border', '#ffffff');
+                node.removeCanvasStyle('shadowBlur');
+                clusterRZMemberTreeMap.plot();
+              }
+            },
+            onClick : function(node) {
+              if (node) {
+                if(node._depth == 1){
+                  var isRZNodeEntered = clusterRZMemberTreeMap.config.userData.isNodeEntered;
+                  if(!isRZNodeEntered){
+                    clusterRZMemberTreeMap.config.userData.isNodeEntered = true;
+                    clusterRZMemberTreeMap.enter(node);
+                  }else{
+                    clusterRZMemberTreeMap.config.userData.isNodeEntered = false;
+                    clusterRZMemberTreeMap.out();
+                  }
+                } else if(node._depth == 2 && (!node.data.initial)){
+                  location.href = 'MemberDetails.html?member=' + node.data.id
+                  + '&memberName=' + node.data.name;
+                }
+              }
+            },
+            onRightClick: function() {
+              clusterRZMemberTreeMap.out();
+            }
+          },
+
+          Tips : {
+            enable : true,
+            offsetX : 5,
+            offsetY : 5,
+            onShow : function(tip, node, isLeaf, domElement) {
+              var html = "";
+              if(node && node.id != "root"){
+                var data = node.data;
+                if (!data.initial) {
+                  if(node._depth == 1){
+                    html = "<div class=\"tip-title\"><div><div class='popupHeading'>" + node.name + "</div>";
+                  }else if(node._depth == 2){
+                    html = "<div class=\"tip-title\"><div><div class='popupHeading'>"
+                        + node.name
+                        + "</div>"
+                        + "<div class='popupFirstRow'><div class='popupRowBorder borderBottomZero'>"
+                        + "<div class='labeltext left display-block width-70'><span class='left'>CPU Usage</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + data.cpuUsage
+                        + "<span class='fontSize15'>%</span></span></div>"
+                        + "</div></div>"
+                        + "<div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                        + "<span class='left'>Memory Usage</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + data.heapUsage
+                        + "<span class='font-size15 paddingL5'>MB</span>"
+                        + "</div></div></div>"
+                        + "<div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                        + "<span class='left'>Load Avg.</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + applyNotApplicableCheck(data.loadAvg)
+                        + "</div></div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                        + "<span class='left'>Threads</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + data.threads
+                        + "</div></div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-70'>"
+                        + "<span class='left'>Sockets</span></div><div class='right width-30'>"
+                        + "<div class='color-d2d5d7 font-size14'>"
+                        + applyNotApplicableCheck(data.sockets)
+                        + "</div></div></div><div class='popupRowBorder borderBottomZero'>"
+                        + "<div class='labeltext left display-block width-70'><span class='left'>GemFire Version</span>"
+                        + "</div><div class='right width-30'><div class='color-d2d5d7 font-size14'>"
+                        + data.gemfireVersion + "</div></div>" + "</div>" + ""
+                        + "</div></div>" + "</div>";
+                  }
+                }else{
+                  html = "<div class=\"tip-title\"><div><div class='popupHeading'>Loading Server Groups and Members</div>";
+                }
+              }else{
+                html = "<div class=\"tip-title\"><div><div class='popupHeading'>Cluster's Server Groups and Members</div>";
+              }
+              tip.innerHTML = html;
+            }
+          },
+          onBeforePlotNode: function(node) {  
+            if(node._depth == 0) {
+              // Hide root node title bar 
+              node.setData('color', '#132634');  
+            } else if(node._depth == 1) {
+              node.setData('color', '#506D94');
+            }
+          },
+          onCreateLabel : function(domElement, node) {
+            //domElement.style.opacity = 0.01;
+            if(node._depth != 0){
+              domElement.innerHTML = "<div class='treemapNodeLabeltext'>"+node.name+"</div>";
+              var style = domElement.style;
+              style.display = '';
+              style.border = '1px solid transparent';
+
+              domElement.onmouseover = function() {
+                style.border = '1px solid #ffffff';
+                // Highlight this member in all redundancy zones
+                if(this.id.indexOf("(!)") != -1){
+                  var currRZMemberId = this.id.substring(this.id.indexOf("(!)")+3);
+                  var rzMembersDOM = $("div[id$='"+currRZMemberId+"']");
+                  for(var cntr=0; cntr<rzMembersDOM.length; cntr++){
+                    rzMembersDOM[cntr].style.border = '1px solid #ffffff';
+                  }
+                }
+              };
+
+              domElement.onmouseout = function() {
+                style.border = '1px solid transparent';
+                // Remove Highlighting of this member in all redundancy zones
+                if(this.id.indexOf("(!)") != -1){
+                  var currRZMemberId = this.id.substring(this.id.indexOf("(!)")+3);
+                  var rzMembersDOM = $("div[id$='"+currRZMemberId+"']");
+                  for(var cntr=0; cntr<rzMembersDOM.length; cntr++){
+                    rzMembersDOM[cntr].style.border = '1px solid transparent';
+                  }
+                }
+              };
+            }
+          }
+        });
+    clusterRZMemberTreeMap.loadJSON(json);
+    clusterRZMemberTreeMap.refresh();
+}
+
+//function used for creating blank TreeMap for cluster's regions on Data View
+function createRegionsTreeMapDefault(){
+  var dataVal = {
+      "$area" : 1
+    };
+    var json = {
+      "children" : {},
+      "data" : dataVal,
+      "id" : "root",
+      "name" : "Regions"
+    };
+
+    clusterRegionsTreeMap = new $jit.TM.Squarified(
+        {
+
+          injectInto : 'GraphTreeMapClusterData',
+          levelsToShow : 1,
+          titleHeight : 0,
+          background : '#8c9aab',
+          offset : 2,
+          Label : {
+            type : 'Native',//HTML
+            size : 9
+          },
+          Node : {
+            CanvasStyles : {
+              shadowBlur : 0
+            }
+          },
+          Events : {
+            enable : true,
+            onMouseEnter : function(node, eventInfo) {
+              if (node && node.id != "root") {
+                node.setCanvasStyle('shadowBlur', 7);
+                node.setData('border', '#ffffff');
+                clusterRegionsTreeMap.fx.plotNode(node, clusterRegionsTreeMap.canvas);
+                clusterRegionsTreeMap.labels.plotLabel(clusterRegionsTreeMap.canvas, node);
+              }
+            },
+            onMouseLeave : function(node) {
+              if (node && node.id != "root") {
+                node.removeData('border', '#ffffff');
+                node.removeCanvasStyle('shadowBlur');
+                clusterRegionsTreeMap.plot();
+              }
+            },
+            onClick : function(node) {
+              if (node.id != "root") {
+                location.href ='regionDetail.html?regionFullPath='+node.data.regionPath;
+              }
+            }
+          },
+
+          Tips : {
+            enable : true,
+            offsetX : 5,
+            offsetY : 5,
+            onShow : function(tip, node, isLeaf, domElement) {
+
+              var data = node.data;
+              var html = "";
+              if (data.type) {
+                html = "<div class=\"tip-title\"><div><div class='popupHeading'>"
+                    + node.id
+                    + "</div>"
+                    + "<div class='popupFirstRow'><div class='popupRowBorder borderBottomZero'>"
+                    + "<div class='labeltext left display-block width-45'><span class='left'>"
+                    + "Type</span></div><div class='right width-55'>"
+                    + "<div class='color-d2d5d7 font-size14 popInnerBlockEllipsis'>"
+                    + data.type
+                    + "</div>"
+                    + "</div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-45'>"
+                    + "<span class='left'>" + jQuery.i18n.prop('pulse-entrycount-custom') + "</span></div><div class='right width-55'>"
+                    + "<div class='color-d2d5d7 font-size14'>"
+                    + data.systemRegionEntryCount
+                    + "</div>"
+                    + "</div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-45'>"
+                    + "<span class='left'>" + jQuery.i18n.prop('pulse-entrysize-custom') + "</span></div><div class='right width-55'>"
+                    + "<div class='color-d2d5d7 font-size14'>" 
+                    + data.entrySize
+                    + "</div>"
+                    /*+ "</div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-45'>"
+                    + "<span class='left'>Compression Codec</span></div><div class='right width-55'>"
+                    + "<div class='color-d2d5d7 font-size14'>"
+                    + data.compressionCodec
+                    + "</div>"*/
+                    + "</div></div></div></div>" + "</div>";
+              } else {
+                html = "<div class=\"tip-title\"><div><div class='popupHeading'>No " + jQuery.i18n.prop('pulse-regiontabletooltip-custom') + " Found</div>";
+              }
+
+              tip.innerHTML = html;
+            }
+          },
+          onCreateLabel : function(domElement, node) {
+            domElement.innerHTML = node.name;
+            var style = domElement.style;
+            style.cursor = 'default';
+            style.border = '1px solid';
+
+            style.background = 'none repeat scroll 0 0 #606060';
+            domElement.onmouseover = function() {
+              style.border = '1px solid #9FD4FF';
+              style.background = 'none repeat scroll 0 0 #9FD4FF';
+            };
+            domElement.onmouseout = function() {
+              style.border = '1px solid';
+              style.background = 'none repeat scroll 0 0 #606060';
+            };
+
+          }
+        });
+    clusterRegionsTreeMap.loadJSON(json);
+    clusterRegionsTreeMap.refresh();
+}
+
+// function used for creating blank grids for member list for Cluster Details
+// Screen
+
+function createMemberGridDefault() {
+  
+  jQuery("#memberList").jqGrid(
+      {
+        datatype : "local",
+        height : 360,
+        width : 740,
+        rowNum : 200,
+        shrinkToFit : false,
+        colNames : [ 'ID', 'Name', 'Host', 'Heap Usage (MB)', 'CPU Usage (%)',
+            'Uptime', 'Clients', 'CurrentHeapSize', 'Load Avg', 'Threads',
+            'Sockets'],
+        colModel : [
+            {
+              name : 'memberId',
+              index : 'memberId',
+              width : 170,
+              sorttype : "string",
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true
+            },
+            {
+              name : 'name',
+              index : 'name',
+              width : 150,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'host',
+              index : 'host',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'currentHeapUsage',
+              index : 'currentHeapUsage',
+              width : 110,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "float"
+            },
+            {
+              name : 'cpuUsage',
+              index : 'cpuUsage',
+              align : 'right',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "float"
+            },
+            {
+              name : 'uptime',
+              index : 'uptime',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            },
+            {
+              name : 'clients',
+              index : 'clients',
+              width : 100,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            }, {
+              name : 'currentHeapUsage',
+              index : 'currentHeapUsage',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'loadAvg',
+              index : 'loadAvg',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'threads',
+              index : 'threads',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'sockets',
+              index : 'sockets',
+              align : 'center',
+              width : 0,
+              hidden : true
+            } ],
+        userData : {
+          "sortOrder" : "asc",
+          "sortColName" : "name"
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#memberList").getGridParam('userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+        },
+        onSelectRow : function(rowid, status, event) {
+          if (!event || event.which == 1) { // mouse left button click
+            var member = rowid.split("&");
+            location.href = 'MemberDetails.html?member=' + member[0]
+                + '&memberName=' + member[1];
+          }
+        },
+        resizeStop : function(width, index) {
+
+          var memberRegionsList = $('#gview_memberList');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          var api = memberRegionsListChild.data('jsp');
+          api.reinitialise();
+
+          memberRegionsList = $('#gview_memberList');
+          memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_memberList');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+          
+          $('#default_grid_button').click();
+          refreshTheGrid($('#default_grid_button'));
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+
+          var memberRegionsList = $('#gview_memberList');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_memberList');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+        }
+      });
+}
+
+function createMemberGridSG() {
+  
+  jQuery("#memberListSG").jqGrid(
+      {
+        datatype : "local",
+        height : 360,
+        width : 740,
+        rowNum : 200,
+        shrinkToFit : false,
+        colNames : [ 'Server Group','ID', 'Name', 'Host', 'Heap Usage (MB)', 'CPU Usage (%)',
+            'Uptime', 'Clients', 'CurrentHeapSize', 'Load Avg', 'Threads',
+            'Sockets'],
+        colModel : [
+            {
+              name : 'serverGroup',
+              index : 'serverGroup',
+              width : 170,
+              sorttype : "string",
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true
+            },
+            {
+              name : 'memberId',
+              index : 'memberId',
+              width : 170,
+              sorttype : "string",
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true
+            },
+            {
+              name : 'name',
+              index : 'name',
+              width : 150,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'host',
+              index : 'host',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'currentHeapUsage',
+              index : 'currentHeapUsage',
+              width : 110,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "float"
+            },
+            {
+              name : 'cpuUsage',
+              index : 'cpuUsage',
+              align : 'right',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "float"
+            },
+            {
+              name : 'uptime',
+              index : 'uptime',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            },
+            {
+              name : 'clients',
+              index : 'clients',
+              width : 100,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            }, {
+              name : 'currentHeapUsage',
+              index : 'currentHeapUsage',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'loadAvg',
+              index : 'loadAvg',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'threads',
+              index : 'threads',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'sockets',
+              index : 'sockets',
+              align : 'center',
+              width : 0,
+              hidden : true
+            } ],
+        userData : {
+          "sortOrder" : "asc",
+          "sortColName" : "serverGroup"
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#memberListSG").getGridParam('userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+        },
+        onSelectRow : function(rowid, status, event) {
+          if (!event || event.which == 1) { // mouse left button click
+            var member = rowid.split("&");
+            location.href = 'MemberDetails.html?member=' + member[0]
+                + '&memberName=' + member[1];
+          }
+        },
+        resizeStop : function(width, index) {
+
+          var memberRegionsList = $('#gview_memberListSG');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          var api = memberRegionsListChild.data('jsp');
+          api.reinitialise();
+
+          memberRegionsList = $('#gview_memberListSG');
+          memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_memberListSG');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+          
+          $('#servergroups_grid_button').click();
+          refreshTheGrid($('#servergroups_grid_button'));
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+
+          var memberRegionsList = $('#gview_memberListSG');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_memberListSG');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+        }
+      });
+}
+
+function createMemberGridRZ() {
+  
+  jQuery("#memberListRZ").jqGrid(
+      {
+        datatype : "local",
+        height : 360,
+        width : 740,
+        rowNum : 200,
+        shrinkToFit : false,
+        colNames : [ 'Redundancy Zone','ID', 'Name', 'Host', 'Heap Usage (MB)', 'CPU Usage (%)',
+            'Uptime', 'Clients', 'CurrentHeapSize', 'Load Avg', 'Threads',
+            'Sockets'],
+        colModel : [
+            {
+              name : 'redundancyZone',
+              index : 'redundancyZone',
+              width : 170,
+              sorttype : "string",
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true
+            },
+            {
+              name : 'memberId',
+              index : 'memberId',
+              width : 170,
+              sorttype : "string",
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true
+            },
+            {
+              name : 'name',
+              index : 'name',
+              width : 150,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'host',
+              index : 'host',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'currentHeapUsage',
+              index : 'currentHeapUsage',
+              width : 110,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "float"
+            },
+            {
+              name : 'cpuUsage',
+              index : 'cpuUsage',
+              align : 'right',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "float"
+            },
+            {
+              name : 'uptime',
+              index : 'uptime',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            },
+            {
+              name : 'clients',
+              index : 'clients',
+              width : 100,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formMemberGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            }, {
+              name : 'currentHeapUsage',
+              index : 'currentHeapUsage',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'loadAvg',
+              index : 'loadAvg',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'threads',
+              index : 'threads',
+              align : 'center',
+              width : 0,
+              hidden : true
+            }, {
+              name : 'sockets',
+              index : 'sockets',
+              align : 'center',
+              width : 0,
+              hidden : true
+            } ],
+        userData : {
+          "sortOrder" : "asc",
+          "sortColName" : "redundancyZone"
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#memberListRZ").getGridParam('userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+        },
+        onSelectRow : function(rowid, status, event) {
+          if (!event || event.which == 1) { // mouse left button click
+            var member = rowid.split("&");
+            location.href = 'MemberDetails.html?member=' + member[0]
+                + '&memberName=' + member[1];
+          }
+        },
+        resizeStop : function(width, index) {
+
+          var memberRegionsList = $('#gview_memberListRZ');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          var api = memberRegionsListChild.data('jsp');
+          api.reinitialise();
+
+          memberRegionsList = $('#gview_memberListRZ');
+          memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_memberListRZ');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+          
+          $('#redundancyzones_grid_button').click();
+          refreshTheGrid($('#redundancyzones_grid_button'));
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+
+          var memberRegionsList = $('#gview_memberListRZ');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_memberListRZ');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+        }
+      });
+}
+
+function createRegionsGridDefault() {
+  
+  jQuery("#regionsList").jqGrid(
+      {
+        datatype : "local",
+        height : 360,
+        width : 740,
+        rowNum : 200,
+        shrinkToFit : false,
+        colNames : [ 'Region Name', 'Type', 'Entry Count', 'Entry Size',
+                     'Region Path', 'Member Count', 'Read Rates', 'Write Rates',
+                     'Persistence', 'Entry Count', 'Empty Nodes', 'Data Usage',
+                     'Total Data Usage', 'Memory Usage', 'Total Memory',
+                     'Member Names', 'Writes', 'Reads','Off Heap Enabled',
+                     'Compression Codec','HDFS Write Only' ],
+        colModel : [ {
+          name : 'name',
+          index : 'name',
+          width : 120,
+          sortable : true,
+          sorttype : "string"
+        }, {
+          name : 'type',
+          index : 'type',
+          width : 130,
+          sortable : true,
+          sorttype : "string"
+        }, {
+          name : 'systemRegionEntryCount',
+          index : 'systemRegionEntryCount',
+          width : 100,
+          align : 'right',
+          sortable : true,
+          sorttype : "int"
+        }, {
+          name : 'entrySize',
+          index : 'entrySize',
+          width : 100,
+          align : 'right',
+          sortable : true,
+          sorttype : "int"
+        }, {
+          name : 'regionPath',
+          index : 'regionPath',
+          //hidden : true,
+          width : 130,
+          sortable : true,
+          sorttype : "string"
+        }, {
+          name : 'memberCount',
+          index : 'memberCount',
+          hidden : true
+        }, {
+          name : 'getsRate',
+          index : 'getsRate',
+          hidden : true
+        }, {
+          name : 'putsRate',
+          index : 'putsRate',
+          hidden : true
+        }, {
+          name : 'persistence',
+          index : 'persistence',
+          //hidden : true,
+          width : 100,
+          sortable : true,
+          sorttype : "string"
+        }, {
+          name : 'systemRegionEntryCount',
+          index : 'systemRegionEntryCount',
+          hidden : true
+        }, {
+          name : 'emptyNodes',
+          index : 'emptyNodes',
+          hidden : true
+        }, {
+          name : 'dataUsage',
+          index : 'dataUsage',
+          hidden : true
+        }, {
+          name : 'totalDataUsage',
+          index : 'totalDataUsage',
+          hidden : true
+        }, {
+          name : 'memoryUsage',
+          index : 'memoryUsage',
+          hidden : true
+        }, {
+          name : 'totalMemory',
+          index : 'totalMemory',
+          hidden : true
+        }, {
+          name : 'memberNames',
+          index : 'memberNames',
+          hidden : true
+        }, {
+          name : 'writes',
+          index : 'writes',
+          hidden : true
+        }, {
+          name : 'reads',
+          index : 'reads',
+          hidden : true
+        }, {
+          name : 'isEnableOffHeapMemory',
+          index : 'isEnableOffHeapMemory',
+          hidden : true,
+          width : 120,
+          sortable : true,
+          sorttype : "string"
+        }, {
+          name : 'compressionCodec',
+          index : 'compressionCodec',
+          hidden : true
+        }, {
+          name : 'isHDFSWriteOnly',
+          index : 'isHDFSWriteOnly',
+          hidden : true
+        }],
+        userData : {
+          "sortOrder" : "asc",
+          "sortColName" : "name"
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#regionsList").getGridParam('userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+        },
+        onSelectRow : function(rowid, status, event) {
+          if (!event || event.which == 1) { // mouse left button click
+            var region = rowid.split("&");
+            location.href = 'regionDetail.html?regionFullPath=' + region[0];
+          }
+        },
+        resizeStop : function(width, index) {
+
+          var clusterRegionsList = $('#gview_regionsList');
+          var clusterRegionsListChild = clusterRegionsList
+              .children('.ui-jqgrid-bdiv');
+          var api = clusterRegionsListChild.data('jsp');
+          api.reinitialise();
+
+          /*memberRegionsList = $('#gview_regionsList');
+          memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_regionsList');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });*/
+          
+          $('#data_grid_button').click();
+          refreshTheGrid($('#data_grid_button'));
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+
+          var memberRegionsList = $('#gview_regionsList');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_regionsList');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+          
+          // change col names depend on product
+          if(CONST_BACKEND_PRODUCT_SQLFIRE == productname.toLowerCase()){
+            jQuery("#regionsList").jqGrid('setLabel', 'name', jQuery.i18n.prop('pulse-regiontableName-custom'));
+            jQuery("#regionsList").jqGrid('setLabel', 'regionPath', jQuery.i18n.prop('pulse-regiontablePathColName-custom'));
+            jQuery("#regionsList").jqGrid('setLabel', 'getsRate', jQuery.i18n.prop('pulse-readsRate-custom'));
+            jQuery("#regionsList").jqGrid('setLabel', 'putsRate', jQuery.i18n.prop('pulse-writesRate-custom'));
+            jQuery("#regionsList").jqGrid('setLabel', 'writes', jQuery.i18n.prop('pulse-writes-custom'));
+            jQuery("#regionsList").jqGrid('setLabel', 'reads', jQuery.i18n.prop('pulse-reads-custom'));
+            jQuery("#regionsList").jqGrid('setLabel', 'systemRegionEntryCount', jQuery.i18n.prop('pulse-entrycount-custom'));
+            jQuery("#regionsList").jqGrid('setLabel', 'entrySize', jQuery.i18n.prop('pulse-entrysize-custom'));
+          }
+        }
+      });
+}
+
+
+/* builds and returns json from given members details sent by server */
+function buildDefaultMembersTreeMapData(members) {
+
+  var childerensVal = [];
+  for ( var i = 0; i < members.length; i++) {
+
+    var color = "#a0c44a";
+    // setting node color according to the status of member
+    // like if member has severe notification then the node color will be
+    // '#ebbf0f'
+    for ( var j = 0; j < warningAlerts.length; j++) {
+      if (members[i].name == warningAlerts[j].memberName) {
+        color = '#ebbf0f';
+        break;
+      }
+    }
+    // if member has severe notification then the node color will be
+    // '#de5a25'
+    for ( var j = 0; j < errorAlerts.length; j++) {
+      if (members[i].name == errorAlerts[j].memberName) {
+        color = '#de5a25';
+        break;
+      }
+    }
+    // if member has severe notification then the node color will be
+    // '#b82811'
+    for ( var j = 0; j < severAlerts.length; j++) {
+      if (members[i].name == severAlerts[j].memberName) {
+        color = '#b82811';
+        break;
+      }
+    }
+    var heapSize = members[i][currentHotspotAttribiute];
+    // if (heapSize == 0)
+    // heapSize = 1;
+    var name = "";
+    name = members[i].name;
+    var id = "";
+    id = members[i].memberId;
+    // passing all the required information of member to tooltip
+    var dataVal = {
+      "name" : name,
+      "id" : id,
+      "$color" : color,
+      "$area" : heapSize,
+      "cpuUsage" : members[i].cpuUsage,
+      "heapUsage" : members[i].currentHeapUsage,
+      "loadAvg" : members[i].loadAvg,
+      "threads" : members[i].threads,
+      "sockets" : members[i].sockets,
+      "gemfireVersion" : members[i].gemfireVersion,
+      "initial" : false
+    };
+    var childrenVal = {
+      "children" : [],
+      "data" : dataVal,
+      "id" : id,
+      "name" : name
+    };
+    childerensVal[i] = childrenVal;
+  }
+  var localjson = {
+    "children" : childerensVal,
+    "data" : {},
+    "id" : "root",
+    "name" : "Members"
+  };
+  return localjson;
+}
+
+/* builds treemap json for Server Groups  */
+function buildSGMembersTreeMapData(members) {
+  
+  // Server Groups
+  var serverGroups = new Array();
+  var sgChildren = [];
+
+  for ( var i = 0; i < members.length; i++) {
+    // add Server Group if not present
+    var memServerGroups = members[i].serverGroups;
+
+    for ( var cntr = 0; cntr < memServerGroups.length; cntr++) {
+      if ($.inArray(memServerGroups[cntr], serverGroups) == -1) {
+        serverGroups.push(memServerGroups[cntr]);
+        var sgChild = {
+            "children" : new Array(),
+            "data" : {
+              "$area" : 1,
+              "initial" : false
+             },
+            "id" : memServerGroups[cntr],
+            "name" : memServerGroups[cntr]
+          };
+        sgChildren.push(sgChild);
+      }
+    }
+
+  }
+
+  var localjson = {
+    "children" : sgChildren,
+    "data" : {},
+    "id" : "root",
+    "name" : "sgMembers"
+  };
+
+
+  for ( var i = 0; i < members.length; i++) {
+
+    var color = "#a0c44a";
+    // setting node color according to the status of member
+    // like if member has severe notification then the node color will be
+    // '#ebbf0f'
+    for ( var j = 0; j < warningAlerts.length; j++) {
+      if (members[i].name == warningAlerts[j].memberName) {
+        color = '#ebbf0f';
+        break;
+      }
+    }
+    // if member has severe notification then the node color will be
+    // '#de5a25'
+    for ( var j = 0; j < errorAlerts.length; j++) {
+      if (members[i].name == errorAlerts[j].memberName) {
+        color = '#de5a25';
+        break;
+      }
+    }
+    // if member has severe notification then the node color will be
+    // '#b82811'
+    for ( var j = 0; j < severAlerts.length; j++) {
+      if (members[i].name == severAlerts[j].memberName) {
+        color = '#b82811';
+        break;
+      }
+    }
+    var heapSize = members[i][currentHotspotAttribiute];
+    // if (heapSize == 0)
+    // heapSize = 1;
+    var name = "";
+    name = members[i].name;
+    var id = "";
+    id = members[i].memberId;
+    // passing all the required information of member to tooltip
+    var dataVal = {
+      "name" : name,
+      "id" : id,
+      "$color" : color,
+      "$area" : heapSize,
+      "cpuUsage" : members[i].cpuUsage,
+      "heapUsage" : members[i].currentHeapUsage,
+      "loadAvg" : members[i].loadAvg,
+      "threads" : members[i].threads,
+      "sockets" : members[i].sockets,
+      "gemfireVersion" : members[i].gemfireVersion,
+      "initial" : false
+    };
+    var childrenVal = {
+      "children" : [],
+      "data" : dataVal,
+      "id" : id,
+      "name" : name
+    };
+
+    var memServerGroups = members[i].serverGroups;
+    
+    for(var k=0; k<memServerGroups.length; k++){
+      var localJsonChildren = localjson.children;
+      for(var l=0; l<localJsonChildren.length; l++){
+        if(localJsonChildren[l].name == memServerGroups[k]){
+          // create copy of member treemap child for the current server group
+          var copyOFChildren = jQuery.extend(true, {}, childrenVal);
+          copyOFChildren.id = memServerGroups[k]+"(!)"+childrenVal.id;
+          // Add member child in server group treemap object
+          localJsonChildren[l].children.push(copyOFChildren);
+        }
+      }
+    }
+  }
+  
+  return localjson;
+}
+
+/* builds treemap json for Redundancy Zones  */
+function buildRZMembersTreeMapData(members) {
+  
+  // Redundancy Zones
+  var redundancyZones = new Array();
+  var rzChildren = [];
+
+  for ( var i = 0; i < members.length; i++) {
+    // add redundancy zones if not present
+    var memRedundancyZones = members[i].redundancyZones;
+
+    for ( var cntr = 0; cntr < memRedundancyZones.length; cntr++) {
+      if ($.inArray(memRedundancyZones[cntr], redundancyZones) == -1) {
+        redundancyZones.push(memRedundancyZones[cntr]);
+        var rzChild = {
+            "children" : new Array(),
+            "data" : {
+              "$area" : 1,
+              "initial" : false
+             },
+            "id" : memRedundancyZones[cntr],
+            "name" : memRedundancyZones[cntr]
+          };
+        rzChildren.push(rzChild);
+      }
+    }
+
+  }
+
+  var localjson = {
+    "children" : rzChildren,
+    "data" : {},
+    "id" : "root",
+    "name" : "rzMembers"
+  };
+
+
+  for ( var i = 0; i < members.length; i++) {
+
+    var color = "#a0c44a";
+    // setting node color according to the status of member
+    // like if member has severe notification then the node color will be
+    // '#ebbf0f'
+    for ( var j = 0; j < warningAlerts.length; j++) {
+      if (members[i].name == warningAlerts[j].memberName) {
+        color = '#ebbf0f';
+        break;
+      }
+    }
+    // if member has severe notification then the node color will be
+    // '#de5a25'
+    for ( var j = 0; j < errorAlerts.length; j++) {
+      if (members[i].name == errorAlerts[j].memberName) {
+        color = '#de5a25';
+        break;
+      }
+    }
+    // if member has severe notification then the node color will be
+    // '#b82811'
+    for ( var j = 0; j < severAlerts.length; j++) {
+      if (members[i].name == severAlerts[j].memberName) {
+        color = '#b82811';
+        break;
+      }
+    }
+    var heapSize = members[i][currentHotspotAttribiute];
+    // if (heapSize == 0)
+    // heapSize = 1;
+    var name = "";
+    name = members[i].name;
+    var id = "";
+    id = members[i].memberId;
+    // passing all the required information of member to tooltip
+    var dataVal = {
+      "name" : name,
+      "id" : id,
+      "$color" : color,
+      "$area" : heapSize,
+      "cpuUsage" : members[i].cpuUsage,
+      "heapUsage" : members[i].currentHeapUsage,
+      "loadAvg" : members[i].loadAvg,
+      "threads" : members[i].threads,
+      "sockets" : members[i].sockets,
+      "gemfireVersion" : members[i].gemfireVersion,
+      "initial" : false
+    };
+    var childrenVal = {
+      "children" : [],
+      "data" : dataVal,
+      "id" : id,
+      "name" : name
+    };
+
+    var memRedundancyZones = members[i].redundancyZones;
+    for(var k=0; k<memRedundancyZones.length; k++){
+      var localJsonChildren = localjson.children;
+      for(var l=0; l<localJsonChildren.length; l++){
+        if(localJsonChildren[l].name == memRedundancyZones[k]){
+          // create copy of member treemap child for the current redundancy zone
+          var copyOFChildren = jQuery.extend(true, {}, childrenVal);
+          copyOFChildren.id = memRedundancyZones[k]+"(!)"+childrenVal.id;
+          // Add member child in reduadancy zone treemap object
+          localJsonChildren[l].children.push(copyOFChildren);
+        }
+      }
+    }
+  }
+  
+  return localjson;
+}
+
+/* builds treemap json for Cluster Regions  */
+function buildRegionsTreeMapData(clusterRegions) {
+
+  // variable to store value of total of entry counts of all regions
+  var totalOfEntryCounts = 0;
+  // flag to determine if all regions are having entry count = 0
+  var flagSetEntryCountsToZero = false;
+
+  // Calculate the total of all regions entry counts
+  for ( var i = 0; i < clusterRegions.length; i++) {
+    totalOfEntryCounts += clusterRegions[i].entryCount;
+  }
+
+  // If totalOfEntryCounts is zero and at least one region is present
+  // then set flagSetEntryCountsToZero to avoid displaying circles
+  // in treemap as all valid regions are zero area regions and also display
+  // all regions with evenly placement of blocks
+  if (totalOfEntryCounts == 0 && clusterRegions.length > 0) {
+    flagSetEntryCountsToZero = true;
+  }
+
+  var childerensVal = [];  
+
+  for ( var i = 0; i < clusterRegions.length; i++) {
+
+    var entryCount = clusterRegions[i].systemRegionEntryCount;
+    // If flagSetEntryCountsToZero is true then set entry count to
+    // display all
+    // regions with evenly placement of blocks
+    if (flagSetEntryCountsToZero && entryCount == 0) {
+      entryCount = 1;
+    }
+    var color = colorCodeForRegions;
+    if(clusterRegions[i].systemRegionEntryCount == 0){
+      color = colorCodeForZeroEntryCountRegions;
+    }
+
+    var wanEnabled = clusterRegions[i].wanEnabled;
+    var wanEnabledtxt = "";
+    if (wanEnabled == true)
+      wanEnabledtxt = "WAN Enabled";
+    // if (entryCount == 0)
+    // entryCount = 1;
+    var dataVal = {
+      "name" : clusterRegions[i].name,
+      "id" : clusterRegions[i].regionPath,
+      "$color" : color,
+      "$area" : entryCount,
+      "systemRegionEntryCount" : clusterRegions[i].systemRegionEntryCount,
+      "type" : clusterRegions[i].type,
+      "regionPath" : clusterRegions[i].regionPath,
+      "entrySize" : clusterRegions[i].entrySize,
+      "memberCount" : clusterRegions[i].memberCount,
+      "writes" : clusterRegions[i].putsRate,
+      "reads" : clusterRegions[i].getsRate,
+      "emptyNodes" : clusterRegions[i].emptyNodes,
+      "persistence" : clusterRegions[i].persistence,
+      "isEnableOffHeapMemory" : clusterRegions[i].isEnableOffHeapMemory,
+      "compressionCodec" : clusterRegions[i].compressionCodec,
+      "isHDFSWriteOnly" : clusterRegions[i].isHDFSWriteOnly,
+      "memberNames" : clusterRegions[i].memberNames,
+      "memoryWritesTrend" : clusterRegions[i].memoryWritesTrend,
+      "memoryReadsTrend" : clusterRegions[i].memoryReadsTrend,
+      "diskWritesTrend" : clusterRegions[i].diskWritesTrend,
+      "diskReadsTrend" : clusterRegions[i].diskReadsTrend,
+      "memoryUsage" : clusterRegions[i].memoryUsage,
+      "dataUsage" : clusterRegions[i].dataUsage,
+      "totalDataUsage" : clusterRegions[i].totalDataUsage,
+      "totalMemory" : clusterRegions[i].totalMemory
+    };
+    var childrenVal = {
+      "children" : [],
+      "data" : dataVal,
+      "id" : clusterRegions[i].regionPath,
+      "name" : wanEnabledtxt
+    };
+    
+    childerensVal[i] = childrenVal;
+  }
+
+   
+
+  var json = {
+    "children" : childerensVal,
+    "data" : {},
+    "id" : "root",
+    "name" : "Regions"
+  };
+
+  return json;
+
+}
+
+/* builds grid data for Server Groups  */
+function buildSGMembersGridData(members) {
+  var sgMembersGridData = new Array();
+  // Server Groups
+  var serverGroups = new Array();
+
+  for ( var i = 0; i < members.length; i++) {
+    // add Server Group if not present
+    var memServerGroups = members[i].serverGroups;
+
+    for ( var cntr = 0; cntr < memServerGroups.length; cntr++) {
+      if ($.inArray(memServerGroups[cntr], serverGroups) == -1) {
+        serverGroups.push(memServerGroups[cntr]);
+      }
+    }
+
+  }
+  
+  for(var i=0; i<serverGroups.length; i++){
+    var serverGroup = serverGroups[i];
+    for(var j=0; j<members.length; j++){
+      if ($.inArray(serverGroup, members[j].serverGroups) > -1) {
+        var memberObjectNew = jQuery.extend({}, members[j]);
+        memberObjectNew.serverGroup = serverGroup;
+        sgMembersGridData.push(memberObjectNew);
+      }
+    }
+  }
+  
+  return sgMembersGridData;
+}
+
+/* builds grid data for Redundancy Zones  */
+function buildRZMembersGridData(members) {
+  var rzMembersGridData = new Array();
+  // Server Groups
+  var redundancyZones = new Array();
+
+  for ( var i = 0; i < members.length; i++) {
+    // add Redundancy Zones if not present
+    var memRedundancyZones = members[i].redundancyZones;
+
+    for ( var cntr = 0; cntr < memRedundancyZones.length; cntr++) {
+      if ($.inArray(memRedundancyZones[cntr], redundancyZones) == -1) {
+        redundancyZones.push(memRedundancyZones[cntr]);
+      }
+    }
+
+  }
+  
+  for(var i=0; i<redundancyZones.length; i++){
+    var redundancyZone = redundancyZones[i];
+    for(var j=0; j<members.length; j++){
+      if ($.inArray(redundancyZone, members[j].redundancyZones) > -1) {
+        var memberObjectNew = jQuery.extend({}, members[j]);
+        memberObjectNew.redundancyZone = redundancyZone;
+        rzMembersGridData.push(memberObjectNew);
+      }
+    }
+  }
+  
+  return rzMembersGridData;
+}
+
+// Tool tip for members in grid
+function formMemberGridToolTip(rawObject) {
+  return 'title="Name: ' + rawObject.name + ' , CPU Usage: '
+  + rawObject.cpuUsage + '% , Heap Usage: '
+  + rawObject.currentHeapUsage + 'MB , Load Avg.: '
+  + rawObject.loadAvg + ' , Threads: ' + rawObject.threads
+  + ' , Sockets: ' + rawObject.sockets + '"';
+}
+
+function refreshTheGrid(gridDiv) {
+  setTimeout(function(){gridDiv.click();}, 300);
+}
+
+/*
+ * Show/Hide panels in Widget for Cluster Member's and Data
+ * Function to be called on click of visualization tab icons 
+ */
+// function openTabViewPanel(dataPerspective, viewOption, viewType)
+function openTabViewPanel(thisitem){
+     //alert(thisitem.id+" : "+thisitem.dataset.perspective +" | "+thisitem.dataset.view+" | "+thisitem.dataset.viewoption);
+     var viewPanelBlock = thisitem.dataset.view+"_"+thisitem.dataset.viewoption+"_block";
+     $('#'+viewPanelBlock).siblings().hide();
+     $('#'+viewPanelBlock).show();
+     $(thisitem).siblings().removeClass('active');
+     $(thisitem).addClass('active');
+}
+
+//Start: Widget for Cluster Members and Data
+
+
+
+//Show Members Default/Topology R-Graph View and hide rest
+function showMembersDefaultRgraphPanel() {
+
+  flagActiveTab = "MEM_R_GRAPH_DEF";
+  updateRGraphFlags();
+
+  // populateMemberRGraph using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterMembersRGraph = "";
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterMemberRGraphBack);
+
+}
+
+//Show Members Default/Topology Treemap View and hide rest
+function showMembersDefaultTreemapPanel() {
+
+  flagActiveTab = "MEM_TREE_MAP_DEF";
+
+  // populate Member TreeMap using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterMembers = "";
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterMemberBack);
+
+
+}
+
+//Show Members Default/Topology Grid View and hide rest
+function showMembersDefaultGridPanel() {
+
+  flagActiveTab = "MEM_GRID_DEF";
+
+  // populate Member Grid using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterMembers = ""; // getClusterMembersBack
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterMemberBack);
+
+  $('#default_grid_block').hide();
+  destroyScrollPane('gview_memberList');
+  $('#default_grid_block').show();
+  
+  /* Custom scroll */
+
+  $('.ui-jqgrid-bdiv').each(function(index) {
+    var tempName = $(this).parent().attr('id');
+    if (tempName == 'gview_memberList') {
+      $(this).jScrollPane({maintainPosition : true, stickToRight : true});  
+    }
+  });
+
+}
+
+//Show Members Server Groups Treemap View and hide rest
+function showMembersSGTreemapPanel() {
+
+  flagActiveTab = "MEM_TREE_MAP_SG";
+
+  // populate Member TreeMap using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterMembers = "";
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterMemberBack);
+
+}
+
+//Show Members Server Groups Grid View and hide rest
+function showMembersSGGridPanel() {
+
+  flagActiveTab = "MEM_GRID_SG";
+
+  // populate Member Grid using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterMembers = ""; // getClusterMembersBack
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterMemberBack);
+
+  $('#servergroups_grid_block').hide();
+  destroyScrollPane('gview_memberListSG');
+  $('#servergroups_grid_block').show();
+  
+  /* Custom scroll */
+
+  $('.ui-jqgrid-bdiv').each(function(index) {
+    var tempName = $(this).parent().attr('id');
+    if (tempName == 'gview_memberListSG') {
+      $(this).jScrollPane({maintainPosition : true, stickToRight : true});  
+    }
+  });
+
+}
+
+//Show Members Redundancy Zones Treemap View and hide rest
+function showMembersRZTreemapPanel() {
+  
+  flagActiveTab = "MEM_TREE_MAP_RZ";
+
+  // populate Member TreeMap using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterMembers = "";
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterMemberBack);
+}
+
+//Show Members Redundancy Zones Grid View and hide rest
+function showMembersRZGridPanel() {
+
+  flagActiveTab = "MEM_GRID_RZ";
+
+  // populate Member Grid using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterMembers = "";
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterMemberBack);
+
+  $('#redundancyzones_grid_block').hide();
+  destroyScrollPane('gview_memberListRZ');
+  $('#redundancyzones_grid_block').show();
+  
+  /* Custom scroll */
+
+  $('.ui-jqgrid-bdiv').each(function(index) {
+    var tempName = $(this).parent().attr('id');
+    if (tempName == 'gview_memberListRZ') {
+      $(this).jScrollPane({maintainPosition : true, stickToRight : true});  
+    }
+  });
+
+}
+
+//Show Data Treemap View and hide rest
+function showDataTreemapPanel() {
+  
+  flagActiveTab = "DATA_TREE_MAP_DEF";
+
+  // populate Region TreeMap using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterRegions = "";
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterRegionsBack);
+
+}
+
+//Show Data Grid View and hide rest
+function showDataGridPanel() {
+
+  flagActiveTab = "DATA_GRID_DEF";
+
+  // populate Regions Grid using pulseUpdate
+  var pulseData = new Object();
+  pulseData.ClusterRegions = "";
+  ajaxPost("pulse/pulseUpdate", pulseData, translateGetClusterRegionsBack);
+
+  $('#data_grid_block').hide();
+  destroyScrollPane('gview_regionsList');
+  $('#data_grid_block').show();
+  
+  /* Custom scroll */
+
+  $('.ui-jqgrid-bdiv').each(function(index) {
+    var tempName = $(this).parent().attr('id');
+    if (tempName == 'gview_regionsList') {
+      $(this).jScrollPane({maintainPosition : true, stickToRight : true});  
+    }
+  });
+
+}
+
+// Function to be called on click of visualization tab icons
+function openViewPanel(dataPerspective, dataView, dataViewOption){
+  // Display Loading/Busy symbol
+  $("#loadingSymbol").show();
+
+  selectedPerspectiveView = dataPerspective;
+
+  var viewPanelBlock = dataView+"_"+dataViewOption+"_block";
+  var viewPanelButton = dataView+"_"+dataViewOption+"_button";
+  // Display tab panel
+  $('#'+viewPanelBlock).siblings().hide();
+  $('#'+viewPanelBlock).show();
+  
+  // activate tab button
+  var thisitem = $('#'+viewPanelButton);
+  $(thisitem).siblings().removeClass('active');
+  $(thisitem).addClass('active');
+  
+  if('member' == dataPerspective){
+    selectedMemberViewOption = dataView;
+    if('servergroups' == dataView){ // Server Groups view
+      selectedViewTypeSG = dataViewOption;
+      if('treemap' == dataViewOption){ // Treemap
+        showMembersSGTreemapPanel();
+      }else { // Grid
+        showMembersSGGridPanel();
+      }
+    }else if('redundancyzones' == dataView){ // Redundancy Zones view
+      selectedViewTypeRZ = dataViewOption;
+      if('treemap' == dataViewOption){ // Treemap
+        showMembersRZTreemapPanel();
+      }else { // Grid
+        showMembersRZGridPanel();
+      }
+    }else { // default view
+      selectedViewTypeDefault = dataViewOption;
+      if('treemap' == dataViewOption){ // Treemap
+        showMembersDefaultTreemapPanel();
+      }else if('grid' == dataViewOption){ // Grid
+        showMembersDefaultGridPanel();
+      }else{ // R-Graph
+        showMembersDefaultRgraphPanel();
+      }
+    }
+
+    // Show/hide hotspot dropdown
+    if('treemap' == dataViewOption){
+      $("#hotspotParentContainer").show();
+    }else{
+      $("#hotspotParentContainer").hide();
+    }
+
+  }else{ // 'data' == dataPerspective
+    selectedViewTypeData = dataViewOption;
+    if('treemap' == dataViewOption){ // Treemap
+      showDataTreemapPanel();
+    }else if('grid' == dataViewOption){ // Grid
+      showDataGridPanel();
+    }
+  }
+  // Hide Loading/Busy symbol
+  $("#loadingSymbol").hide();
+}
+
+//Function to be called on click of cluster perspective drop down list
+function onChangeClusterPerspective(n) {
+  for(var i=1;i<=$(".members_data ul li").length;i++){
+    $("#members_data"+i).removeClass("selected");
+  }
+  $("#members_data"+n).addClass("selected");
+
+  if (n == 1) { // Members Perspective
+    $("#member_view_options").show();
+    $("#icons_data_view").hide();
+    $("#icons_member_view_option_default").hide();
+    $("#icons_member_view_option_servergroups").hide();
+    $("#icons_member_view_option_redundancyzones").hide();
+
+    // Check last selected member view option
+    for ( var i = 0; i < $("#member_view_options ul li").length; i++) {
+      var idname = $('#member_view_options ul li').get(i).id;
+      if ($("#" + idname).children("label").hasClass("r_on")) {
+        var iconsbox = "icons_"+idname;
+        $("#" + iconsbox).show();
+      }
+    }
+
+    selectedPerspectiveView = "member";
+
+  } else if (n == 2) { // Data Perspective
+	$("#hotspotParentContainer").hide();
+    $("#member_view_options").hide();
+    $("#icons_data_view").show();
+    $("#icons_member_view_option_default").hide();
+    $("#icons_member_view_option_servergroups").hide();
+    $("#icons_member_view_option_redundancyzones").hide();
+
+    selectedPerspectiveView = "data";
+  }
+
+  // display visualization
+  if("member" == selectedPerspectiveView){
+    // Member perspective
+    if("default" == selectedMemberViewOption){
+      if("rgraph" == selectedViewTypeDefault){
+        openViewPanel('member', 'default','rgraph');
+      }else if("treemap" == selectedViewTypeDefault){
+        openViewPanel('member', 'default','treemap');
+      }else{
+        openViewPanel('member', 'default','grid');
+      }
+    }else if("servergroups" == selectedMemberViewOption){
+      if("treemap" == selectedViewTypeSG){
+        openViewPanel('member', 'servergroups','treemap');
+      }else{
+        openViewPanel('member', 'servergroups','grid');
+      }
+    }else{ // redundancyzones
+      if("treemap" == selectedViewTypeRZ){
+        openViewPanel('member', 'redundancyzones','treemap');
+      }else{
+        openViewPanel('member', 'redundancyzones','grid');
+      }
+    }
+  }else{
+    // Data perspective
+    if("treemap" == selectedViewTypeData){
+      openViewPanel('data', 'data', 'treemap');
+    }else{
+      openViewPanel('data', 'data', 'grid');
+    }
+  }
+
+}
+
+function displayClusterPerspective(perspView){
+  
+}
+
+$(document).ready(function(e) {
+  // Attach click event on outside of the drop down list control.
+  addEventsForMembersOptions();
+
+});
+
+/* 
+ Function to attach click event on outside of the drop down list control.
+*/
+function addEventsForMembersOptions() {
+
+  // Attach click event for radio butons on Memebrs perspective view
+  $(".label_radio input").unbind("click").click(memberOptionSelectionHandler);
+  
+}
+
+// handler to be called on selection of radio options of Member Views
+var memberOptionSelectionHandler = function(){
+
+  $(".label_radio").removeClass("r_on");
+  if ($(this).is(":checked")) {
+    $(this).parent('label').addClass("r_on");
+  } else {
+    $(this).parent('label').removeClass("r_on");
+  }
+  
+  var viewOptionId;
+  if('radio-servergroups' == this.id){
+    viewOptionId = 'member_view_option_servergroups';
+    selectedMemberViewOption = "servergroups";
+    if("treemap" == selectedViewTypeSG){
+      openViewPanel('member', 'servergroups','treemap');
+    }else{
+      openViewPanel('member', 'servergroups','grid');
+    }
+  }else if('radio-redundancyzones' == this.id){
+    viewOptionId = 'member_view_option_redundancyzones';
+    selectedMemberViewOption = "redundancyzones";
+    if("treemap" == selectedViewTypeRZ){
+      openViewPanel('member', 'redundancyzones','treemap');
+    }else{
+      openViewPanel('member', 'redundancyzones','grid');
+    }
+  }else{//radio-default
+    viewOptionId = 'member_view_option_default';
+    selectedMemberViewOption = "default";
+    if("rgraph" == selectedViewTypeDefault){
+      openViewPanel('member', 'default','rgraph');
+    }else if("treemap" == selectedViewTypeDefault){
+      openViewPanel('member', 'default','treemap');
+    }else{
+      openViewPanel('member', 'default','grid');
+    }
+  }
+  
+  // set radio selection
+  $('#'+viewOptionId).siblings().removeClass('selected');
+  $('#'+viewOptionId).addClass("selected");
+  //selectedsubview = id;
+  // Show/Hide Tab buttons 
+  $('#'+'icons_'+viewOptionId).show();
+  $('#'+'icons_'+viewOptionId).siblings().hide();
+
+};
+
+var selectedsubview;
+var viewtypegridtreemap;
+
+/************ on Click Out Side **************************/
+(function(jQuery) {
+   jQuery.fn.clickoutside = function(callback) {
+      var outside = 1, self = $(this);
+      self.cb = callback;
+      this.click(function() {
+         outside = 0;
+      });
+      $(document).click(function() {
+         outside && self.cb();
+         outside = 1;
+      });
+      return $(this);
+   };
+})(jQuery);
+
+// End: Widget for Cluster Members and Data


[64/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/PartitionedRegionAttributeTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/PartitionedRegionAttributeTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/PartitionedRegionAttributeTask.java
deleted file mode 100644
index bdda7a6..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/PartitionedRegionAttributeTask.java
+++ /dev/null
@@ -1,205 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.admin.AdminDistributedSystem;
-import com.gemstone.gemfire.admin.AdminDistributedSystemFactory;
-import com.gemstone.gemfire.admin.AdminException;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.admin.SystemMember;
-import com.gemstone.gemfire.admin.SystemMemberCache;
-import com.gemstone.gemfire.admin.SystemMemberRegion;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-
-public class PartitionedRegionAttributeTask implements CommandTask
-{
-	private static final long serialVersionUID = 1L;
-	
-	private String regionPath;
-
-	public CommandResults runTask(Object userData) 
-	{
-		CommandResults results = new CommandResults();
-		try {
-			PartitionAttributeInfo pai = getPartitionAttributeInfo(regionPath);
-			if (pai == null) {
-				results.setCode(CommandResults.CODE_ERROR);
-				results.setCodeMessage(regionPath + " is not partitioned regon");
-			}
-		} catch (Exception ex) {
-			results.setCode(CommandResults.CODE_ERROR);
-			results.setCodeMessage(ex.getMessage());
-			results.setException(ex);
-		}
-		return results;
-	}
-	
-	private static PartitionAttributeInfo getPartitionAttributeInfo(String regionPath) throws AdminException
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		DistributedSystem ds = cache.getDistributedSystem();
-        DistributedSystemConfig config = AdminDistributedSystemFactory.defineDistributedSystem(ds, null);
-        AdminDistributedSystem adminSystem = AdminDistributedSystemFactory.getDistributedSystem(config);
-        try {
-        	adminSystem.connect();
-        } catch (Exception ex) {
-        	// already connected
-        }
-        SystemMember[] members = adminSystem.getSystemMemberApplications();
-        
-        boolean isPR = true;
-        int redundantCopies = 0;
-        int totalNumBuckets = 0;
-        
-        PartitionAttributeInfo pai = new PartitionAttributeInfo();
-        
-        for (int i = 0; i < members.length; i++) {
-            SystemMemberCache scache = members[i].getCache();
-
-            if (scache != null) {
-            	SystemMemberRegion region = scache.getRegion(regionPath);
-            	PartitionAttributes pa = region.getPartitionAttributes();
-            	if (pa == null) {
-            		isPR = false;
-            		break;
-            	}
-            	PartitionAttributeInfo.Partition part = new PartitionAttributeInfo.Partition();
-            	
-            	part.localMaxMemory = region.getPartitionAttributes().getLocalMaxMemory();
-            	part.toalMaxMemory = region.getPartitionAttributes().getTotalMaxMemory();
-            	pai.addPartition(part);
-            	
-            	redundantCopies = region.getPartitionAttributes().getRedundantCopies();
-            	totalNumBuckets = region.getPartitionAttributes().getTotalNumBuckets();
-            }
-        }
-        
-        if (isPR) {
-        	pai.redundantCopies = redundantCopies;
-        	pai.regionPath = regionPath;
-        	pai.totalNumBuckets = totalNumBuckets;
-        } else {
-        	pai = null;
-        }
-        
-       return pai;
-	}
-	
-	public static class PartitionAttributeInfo implements DataSerializable
-	{
-		private static final long serialVersionUID = 1L;
-
-		private String regionPath;
-		
-		private int redundantCopies;
-		private int totalNumBuckets;
-        
-        private List partitionList = new ArrayList();
-        
-        public PartitionAttributeInfo() {}
-        
-        public void addPartition(Partition partition)
-        {
-        	partitionList.add(partition);
-        }
-        
-        public List getPartitionList()
-        {
-        	return partitionList;
-        }
-
-		public String getRegionPath()
-		{
-			return regionPath;
-		}
-
-		public int getRedundantCopies()
-		{
-			return redundantCopies;
-		}
-
-		public int getTotalNumBuckets()
-		{
-			return totalNumBuckets;
-		}
-
-		public void fromData(DataInput in) throws IOException, ClassNotFoundException
-		{
-			regionPath = in.readUTF();
-			redundantCopies = in.readInt();
-			totalNumBuckets = in.readInt();
-			
-			partitionList = new ArrayList();
-			int size = in.readInt();
-			for (int i = 0; i < size; i++) {
-				Partition part = new Partition();
-				part.memberName = in.readUTF();
-				part.localMaxMemory = in.readInt();
-				part.toalMaxMemory = in.readLong();
-				partitionList.add(part);
-			}
-		}
-
-		public void toData(DataOutput out) throws IOException
-		{
-			out.writeUTF(regionPath);
-			out.writeInt(redundantCopies);
-			out.writeInt(totalNumBuckets);
-			
-			int size = partitionList.size();
-			out.writeInt(size);
-			for (int i = 0; i < size; i++) {
-				Partition part = (Partition)partitionList.get(i);
-				out.writeUTF(part.memberName);
-				out.writeInt(part.localMaxMemory);
-				out.writeLong(part.toalMaxMemory);
-			}
-			
-		}
-		
-		public static class Partition
-        {
-			public Partition() {}
-			
-        	private String memberName;
-        	private int localMaxMemory ;
-        	private long toalMaxMemory;
-        	
-			public String getMemberName()
-			{
-				return memberName;
-			}
-			
-			public int getLocalMaxMemory()
-			{
-				return localMaxMemory;
-			}
-			
-			public long getToalMaxMemory()
-			{
-				return toalMaxMemory;
-			}
-        }
-
-	}
-
-	public void fromData(DataInput in) throws IOException, ClassNotFoundException
-	{
-		regionPath = in.readUTF();
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		out.writeUTF(regionPath);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/QueryResults.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/QueryResults.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/QueryResults.java
deleted file mode 100644
index 131bb79..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/QueryResults.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * QueryResults contains query results executed by QueryTask.
- * 
- * @author dpark
- * 
- */
-public class QueryResults implements DataSerializable
-{
-	private static final long serialVersionUID = 1L;
-
-	public static final byte ERROR_NONE = 0;
-	public static final byte ERROR_QUERY = 1;
-
-	private Object results;
-	private int actualSize;
-	private int fetchSize;
-	private int returnedSize;
-	private boolean isPR;
-	
-	public QueryResults() {}
-
-	// Default constructor required for serialization
-	public QueryResults(Object results, int actualSize, int fetchSize, int returnedSize) 
-	{
-		this(results, actualSize, fetchSize, returnedSize, false);
-	}
-	
-	public QueryResults(Object results, int actualSize, int fetchSize, int returnedSize, boolean isPR) 
-	{
-		this.results = results;
-		this.actualSize = actualSize;
-		this.fetchSize = fetchSize;
-		this.returnedSize = returnedSize;
-		this.isPR = isPR;
-	}
-
-	/**
-	 * Returns the fetch size. The default is 1000. If -1, fetches
-	 * all.
-	 * @return fetch size
-	 */
-	public int getFetchSize()
-	{
-		return fetchSize;
-	}
-
-	/**
-	 * Sets the fetch size. The default is 1000. 
-	 * @param fetchSize The fetch size. If -1, fetches all.
-	 */
-	public void setFetchSize(int fetchSize)
-	{
-		this.fetchSize = fetchSize;
-	}
-	
-	public int getActualSize()
-	{
-		return actualSize;
-	}
-
-	public void setActualSize(int actualSize)
-	{
-		this.actualSize = actualSize;
-	}
-	
-	public Object getResults()
-	{
-		return results;
-	}
-
-	public void setResults(Object results)
-	{
-		this.results = results;
-	}
-
-	public int getReturnedSize()
-	{
-		return returnedSize;
-	}
-
-	public void setReturnedSize(int returnedSize)
-	{
-		this.returnedSize = returnedSize;
-	}
-
-	public boolean isPR()
-	{
-		return isPR;
-	}
-
-	public void setPR(boolean isPR)
-	{
-		this.isPR = isPR;
-	}
-
-	public void fromData(DataInput input) throws IOException,
-			ClassNotFoundException 
-	{
-		results = DataSerializer.readObject(input);
-		actualSize = input.readInt();
-		fetchSize = input.readInt();
-		returnedSize = input.readInt();
-		isPR = input.readBoolean();
-	}
-
-	public void toData(DataOutput output) throws IOException 
-	{
-		DataSerializer.writeObject(results, output);
-		output.writeInt(actualSize);
-		output.writeInt(fetchSize);
-		output.writeInt(returnedSize);
-		output.writeBoolean(isPR);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/QueryTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/QueryTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/QueryTask.java
deleted file mode 100644
index 330d5bd..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/QueryTask.java
+++ /dev/null
@@ -1,522 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.internal.ResultsBag;
-import com.gemstone.gemfire.cache.query.internal.StructBag;
-import com.gemstone.gemfire.cache.query.types.CollectionType;
-import com.gemstone.gemfire.cache.query.types.ObjectType;
-import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.GfshResultsBag;
-import com.gemstone.gemfire.internal.tools.gfsh.command.AbstractCommandTask;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-/**
- * QueryTask executes the specified query and returns all or a subset of the
- * result set. A subset of results is returned if the specified fetch size is
- * less than the result set size. The caller can request for the next subset of
- * the results by setting the query string to null and nextEnabled to true.
- * 
- * @author dpark
- * 
- */
-public class QueryTask extends AbstractCommandTask
-{
-	private static final long serialVersionUID = 1L;
-
-	static {
-		staticUuid = UUID.randomUUID().toString();
-	}
-
-	private static boolean priorTo6011AndNot57 = false;
-
-	static {
-		priorTo6011AndNot57 = isPriorTo6011AndNot57();
-	}
-
-	static boolean isPriorTo6011AndNot57()
-	{
-		String gemfireVersion = GemFireVersion.getGemFireVersion();
-		String split[] = gemfireVersion.split("\\.");
-		int major = 0;
-		int minor = 0;
-		int update = 0;
-		int update2 = 0;
-		for (int i = 0; i < split.length; i++) {
-			switch (i) {
-			case 0:
-				major = Integer.parseInt(split[i]);
-				break;
-			case 1:
-				try {
-					minor = Integer.parseInt(split[i]);
-				} catch (NumberFormatException ex) {
-					minor = Integer.parseInt(split[i].substring(0, 1));
-				}
-				break;
-			case 2:
-			  try {
-	        update = Integer.parseInt(split[i]);
-        } catch (NumberFormatException e) {
-          update = 0;
-        }
-				break;
-			case 3:				
-        try {
-          update2 = Integer.parseInt(split[i]);
-        } catch (NumberFormatException e) {
-          update2 = 0;
-        }
-				break;
-			}
-		}
-
-		// System.out.println("GemFireVersion: " + major + "." + minor + "." +
-		// update + "." + update2);
-
-		if (major < 6) {
-			return false; // 6
-		} else if (minor > 0) {
-			return false; // 6.1
-		} else if (update < 1) {
-			return true; // 6.0.0
-		} else if (update > 1) {
-			return false; // 6.0.2
-		} else if (update2 <= 0) {
-			return true; // 6.0.1.0
-		} else {
-			return false; // 6.0.1.1
-		}
-
-	}
-
-	public static final byte ERROR_NONE = 0;
-	public static final byte ERROR_QUERY = 1;
-
-	private static final String REGION_NAME_RESULTS = "qr";
-	private static int UUID_TIMEOUT = Integer.getInteger("QueryTask.uuidTimeout", 30); // the
-																						// UUID
-																						// timeout
-																						// 30
-																						// sec
-	private static String staticUuid;
-
-	private transient String uuid;
-
-	private String queryString;
-	private boolean nextEnabled;
-	private int fetchSize = 1000;
-	
-	// if isPRLocalData is true then the entries from the local dataset are returned
-	private boolean isPRLocalData;
-	
-	// if keysOnly is true then only the keys are are returned
-	private boolean keysOnly;
-
-	// Default constructor required for serialization
-	public QueryTask()
-	{
-	}
-
-	public QueryTask(String queryString)
-	{
-		this(queryString, 1000, true, false, false);
-	}
-
-	public QueryTask(String queryString, int fetchSize, boolean nextEnabled)
-	{
-		this(queryString, fetchSize, nextEnabled, true);
-	}
-
-	public QueryTask(String queryString, int fetchSize, boolean nextEnabled, boolean isPRLocalData)
-	{
-		this(queryString, fetchSize, nextEnabled, isPRLocalData, false);
-	}
-	
-	public QueryTask(String queryString, int fetchSize, boolean nextEnabled, boolean isPRLocalData, boolean keysOnly)
-	{
-		this.queryString = queryString;
-		this.fetchSize = fetchSize;
-		this.nextEnabled = nextEnabled;
-		this.isPRLocalData = isPRLocalData;
-		this.keysOnly = keysOnly;
-	}
-
-	public CommandResults runTask(Object userData)
-	{
-		CommandResults results = execute(queryString);
-		return results;
-	}
-
-	private Region getResultRegion()
-	{
-		Region resultRegion = super.getCommandRegion().getSubregion(REGION_NAME_RESULTS);
-		if (resultRegion == null) {
-			AttributesFactory factory = new AttributesFactory();
-			factory.setStatisticsEnabled(true);
-			factory.setScope(Scope.LOCAL);
-			factory.setDataPolicy(DataPolicy.NORMAL);
-			factory.setEntryIdleTimeout(new ExpirationAttributes(UUID_TIMEOUT, ExpirationAction.LOCAL_DESTROY));
-			try {
-				resultRegion = super.getCommandRegion().createSubregion(REGION_NAME_RESULTS, factory.create());
-			} catch (Exception ex) {
-				// in case another thread created it
-				resultRegion = super.getCommandRegion().getSubregion(REGION_NAME_RESULTS);
-			}
-		}
-		return resultRegion;
-	}
-
-	/**
-	 * Executes the query string.
-	 * 
-	 * @param queryString
-	 *            The query string to execute.
-	 * @return The command results containing the query results.
-	 */
-	protected CommandResults execute(String queryString)
-	{
-		CommandResults results = new CommandResults();
-		Cache cache = CacheFactory.getAnyInstance();
-
-		Region resultRegion = getResultRegion();
-
-		// Query
-		try {
-			Object obj = null;
-			int returnedSize = 0;
-			int actualSize = 0;
-			boolean isPR = false;
-
-			// next
-			if (queryString == null) {
-				ResultsContainer container = (ResultsContainer) resultRegion.get(uuid);
-				if (container != null) {
-					isPR = container.isPR;
-					obj = container.getSubsetResults(getFetchSize());
-					actualSize = container.getActualSize();
-					returnedSize = container.getReturnedSize();
-					if (container.hasNext() == false) {
-						resultRegion.remove(uuid);
-					}
-				}
-
-				// new query
-			} else {
-				if (nextEnabled) {
-					resultRegion.remove(uuid);
-				}
-			
-				String lowercase = queryString.trim().toLowerCase();
-				if (lowercase.startsWith("select ")) {
-
-					// Query
-					Query query = cache.getQueryService().newQuery(queryString);
-					obj = query.execute();
-					if (obj instanceof SelectResults) {
-						SelectResults sr = (SelectResults) obj;
-						actualSize = sr.size();
-
-						if (fetchSize != -1) {
-							if (sr.size() <= fetchSize) {
-
-								// 6.0 - 6.0.1 do not serialize ResultsBag
-								// properly.
-								if (isPriorTo6011AndNot57()) { // 6.0 - 6.0.1
-									if (sr instanceof ResultsBag) {
-										SelectResultsContainer srContainer = new SelectResultsContainer(sr);
-										obj = srContainer.getSubsetResults(getFetchSize());
-									} else {
-										obj = sr;
-									}
-								} else {
-									obj = sr;
-								}
-								returnedSize = sr.size();
-							} else {
-								SelectResultsContainer srContainer = new SelectResultsContainer(sr);
-								obj = srContainer.getSubsetResults(getFetchSize());
-								returnedSize = srContainer.returnedSize;
-								if (nextEnabled) {
-									resultRegion.put(uuid, srContainer);
-								}
-							}
-						} else {
-							returnedSize = sr.size();
-						}
-					}
-
-				} else {
-
-					// Region
-
-					String regionPath = queryString;
-					Region region = cache.getRegion(regionPath);
-					if (region == null) {
-						results.setCode(ERROR_QUERY);
-						results.setCodeMessage("Invalid region path. Unable to query data.");
-					} else {
-						// Return region keys or entries
-						isPR = region instanceof PartitionedRegion;
-						Region r;
-						Set resultSet = null;
-						if (isPRLocalData && isPR) {
-							PartitionedRegion pr = (PartitionedRegion) region;
-//							r = new LocalDataSet(pr, pr.getDataStore().getAllLocalPrimaryBucketIds());
-							if (pr.getDataStore() == null) {
-								// PROXY - no data store
-								results.setCodeMessage("No data store");
-								return results;
-							}
-							List<Integer> bucketIdList = pr.getDataStore().getLocalPrimaryBucketsListTestOnly();
-							resultSet = new HashSet();
-							for (Integer bucketId : bucketIdList) {
-								BucketRegion bucketRegion;
-								try {
-									bucketRegion = pr.getDataStore().getInitializedBucketForId(null, bucketId);
-									Set set;
-									if (keysOnly) {
-										set = bucketRegion.keySet();
-									} else {
-										set = bucketRegion.entrySet();
-									}
-									for (Object object : set) {
-										resultSet.add(object);
-									}
-								} catch (ForceReattemptException e) {
-									// ignore
-								}
-							}
-						} else {
-							r = region;
-							if (keysOnly) {
-								resultSet = r.keySet();
-							} else {
-								resultSet = r.entrySet();
-							}
-						}
-						actualSize = resultSet.size();
-						RegionContainer regionContainer = new RegionContainer(resultSet, keysOnly, isPR);
-						obj = regionContainer.getSubsetResults(getFetchSize());
-						returnedSize = regionContainer.getReturnedSize();
-						if (nextEnabled && regionContainer.hasNext()) {
-							resultRegion.put(uuid, regionContainer);
-						}
-					}
-				}
-			}
-
-			results.setDataObject(new QueryResults(obj, actualSize, fetchSize, returnedSize, isPR));
-
-		} catch (QueryException e) {
-			cache.getLogger().warning(e);
-			results.setCode(ERROR_QUERY);
-			results.setCodeMessage("Unable to execute command task. Invalid query.");
-			results.setException(e);
-		}
-		return results;
-	}
-
-	public String getQuery()
-	{
-		return queryString;
-	}
-
-	public void setQuery(String queryString)
-	{
-		this.queryString = queryString;
-	}
-
-	/**
-	 * Returns the fetch size. The default is 1000. If -1, fetches all.
-	 * 
-	 * @return fetch size
-	 */
-	public int getFetchSize()
-	{
-		return fetchSize;
-	}
-
-	/**
-	 * Sets the fetch size. The default is 1000.
-	 * 
-	 * @param fetchSize
-	 *            The fetch size. If -1, fetches all.
-	 */
-	public void setFetchSize(int fetchSize)
-	{
-		this.fetchSize = fetchSize;
-	}
-
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException
-	{
-		super.fromData(input);
-		uuid = DataSerializer.readString(input);
-		queryString = DataSerializer.readString(input);
-		nextEnabled = input.readBoolean();
-		isPRLocalData = input.readBoolean();
-		fetchSize = input.readInt();
-		keysOnly = input.readBoolean();
-	}
-
-	public void toData(DataOutput output) throws IOException
-	{
-		super.toData(output);
-		DataSerializer.writeString(staticUuid, output);
-		DataSerializer.writeString(queryString, output);
-		output.writeBoolean(nextEnabled);
-		output.writeBoolean(isPRLocalData);
-		output.writeInt(fetchSize);
-		output.writeBoolean(keysOnly);
-	}
-
-	abstract class ResultsContainer
-	{
-		boolean isPR = false;
-		
-		protected abstract Object getSubsetResults(int fetchSize);
-
-		protected abstract boolean hasNext();
-
-		protected abstract int getActualSize();
-
-		protected abstract int getReturnedSize();
-
-	}
-
-	class SelectResultsContainer extends ResultsContainer
-	{
-		SelectResults sr;
-		Iterator iterator;
-		int returnedSize = 0;;
-
-		SelectResultsContainer(SelectResults sr)
-		{
-			this.sr = sr;
-			iterator = sr.iterator();
-		}
-
-		protected Object getSubsetResults(int fetchSize)
-		{
-			SelectResults sr2;
-			CollectionType type = sr.getCollectionType();
-			ObjectType elementType = type.getElementType();
-			if (elementType.isStructType()) {
-				sr2 = new StructBag();
-			} else {
-				if (isPriorTo6011AndNot57()) { // 6.0 - 6.0.1
-					sr2 = new GfshResultsBag();
-				} else {
-					sr2 = new ResultsBag();
-				}
-			}
-			sr2.setElementType(elementType);
-
-			int count = 0;
-			while (count < fetchSize && iterator.hasNext()) {
-				Object object = (Object) iterator.next();
-				sr2.add(object);
-				count++;
-			}
-			returnedSize += count;
-			return sr2;
-		}
-
-		protected boolean hasNext()
-		{
-			return iterator.hasNext();
-		}
-
-		protected int getActualSize()
-		{
-			return sr.size();
-		}
-
-		protected int getReturnedSize()
-		{
-			return returnedSize;
-		}
-	}
-
-	class RegionContainer extends ResultsContainer
-	{
-		Set resultSet;
-		Iterator iterator;
-		int returnedSize = 0;
-		boolean keysOnly;
-
-		RegionContainer(Set resultSet, boolean keysOnly, boolean isPR)
-		{
-			this.resultSet = resultSet;
-			this.keysOnly = keysOnly;
-			super.isPR = isPR;
-			iterator = resultSet.iterator();
-		}
-
-		protected Object getSubsetResults(int fetchSize)
-		{
-			int count = 0;
-			Object retval;
-			
-			if (keysOnly) {
-				ArrayList list = new ArrayList();
-				while (count < fetchSize && iterator.hasNext()) {
-					Object key = iterator.next();
-					list.add(key);
-					count++;
-				}
-				retval = list;
-			} else {
-				HashMap map = new HashMap();
-				while (count < fetchSize && iterator.hasNext()) {
-					Region.Entry entry = (Region.Entry)iterator.next();
-					map.put(entry.getKey(), entry.getValue());
-					count++;
-				}
-				retval = map;
-			}
-			returnedSize += count;
-			
-			return retval;
-		}
-
-		protected boolean hasNext()
-		{
-			return iterator.hasNext();
-		}
-
-		protected int getActualSize()
-		{
-			return resultSet.size();
-		}
-
-		protected int getReturnedSize()
-		{
-			return returnedSize;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RefreshAggregatorRegionTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RefreshAggregatorRegionTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RefreshAggregatorRegionTask.java
deleted file mode 100644
index 8784078..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RefreshAggregatorRegionTask.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.tools.gfsh.command.AbstractCommandTask;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-public class RefreshAggregatorRegionTask extends AbstractCommandTask {
-	private static final long serialVersionUID = 1L;
-
-	// Default constructor required for serialization
-	public RefreshAggregatorRegionTask() 
-	{
-	}
-	
-	private void initRegion()
-	{
-		PartitionedRegion pr = (PartitionedRegion)getCommandRegion().getSubregion("pr");
-		if (pr == null) {
-			return;
-		}
-		int totalBuckets = pr.getAttributes().getPartitionAttributes().getTotalNumBuckets();
-		for (int i = 0; i < totalBuckets; i++) {
-			pr.put(i, i);
-			pr.remove(i);
-		}
-	}
-	
-	@Override
-	public CommandResults runTask(Object userData)
-	{
-		new Thread(new Runnable() {
-			public void run()
-			{
-				initRegion();
-			}
-		}).start();
-		return null;
-	}
-	
-	public void fromData(DataInput input) throws IOException,
-			ClassNotFoundException 
-	{
-		super.fromData(input);
-	}
-
-	public void toData(DataOutput output) throws IOException {
-		super.toData(output);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionClearTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionClearTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionClearTask.java
deleted file mode 100644
index 944f97c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionClearTask.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-
-/**
- * RegionClearTask destroys a region in the server. The region destroy will be
- * distributed to other caches if the scope is not Scope.LOCAL.
- * CommandResults.getDataObject() returns MemberInfo.
- * 
- * @author dpark
- * 
- */
-public class RegionClearTask implements CommandTask
-{
-	private static final long serialVersionUID = 1L;
-
-	public static final byte ERROR_REGION_CLEAR = 1;
-
-	private String regionFullPath;
-
-	public RegionClearTask()
-	{
-	}
-
-	public RegionClearTask(String regionFullPath)
-	{
-		this.regionFullPath = regionFullPath;
-	}
-
-	public CommandResults runTask(Object userData)
-	{
-		CommandResults results = new CommandResults();
-
-		MemberInfo memberInfo = new MemberInfo();
-
-		try {
-			Cache cache = CacheFactory.getAnyInstance();
-			Region region = cache.getRegion(regionFullPath);
-			DistributedMember member = cache.getDistributedSystem().getDistributedMember();
-			memberInfo.setHost(member.getHost());
-			memberInfo.setMemberId(member.getId());
-			memberInfo.setMemberName(cache.getName());
-			memberInfo.setPid(member.getProcessId());
-
-			results.setDataObject(memberInfo);
-
-			if (region == null) {
-				results.setCode(ERROR_REGION_CLEAR);
-				results.setCodeMessage("Region undefined: " + regionFullPath);
-			} else {
-				synchronized (region) {
-					region.clear();
-				}
-			}
-		} catch (Exception ex) {
-			results.setCode(ERROR_REGION_CLEAR);
-			results.setCodeMessage(ex.getMessage());
-			results.setException(ex);
-		}
-
-		return results;
-	}
-
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException
-	{
-		regionFullPath = DataSerializer.readString(input);
-	}
-
-	public void toData(DataOutput output) throws IOException
-	{
-		DataSerializer.writeString(regionFullPath, output);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionCreateTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionCreateTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionCreateTask.java
deleted file mode 100644
index 5b5b007..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionCreateTask.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.RegionAttributeInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.DataSerializerEx;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-/**
- * 
- * RegionCreateTask creates a remote region. Invoke this class using
- * CommandClient.execute() or CommandClient.broadcast(). CommandClient.execute()
- * creates the specified region in the connected server only.
- * CommandClient.Broadcast() creates the specified region in all peers in the
- * distributed system. Both methods return CommandResults with the code set.
- * Check CommandResults.getCode() to see the task execution status.
- * RegionCreateTask.SUCCESS_CREATED for region successfully created,
- * RegionCreateTask.ERROR_... for an error creating region.
- * 
- * @author dpark
- * 
- */
-public class RegionCreateTask implements CommandTask
-{
-	private static final long serialVersionUID = 1;
-
-	public static final byte SUCCESS_CREATED = CommandResults.CODE_NORMAL;
-	public static final byte ERROR_REGION_NOT_CREATED = 1;
-	public static final byte ERROR_REGION_ALREADY_EXIST = 2;
-	public static final byte ERROR_REGION_PARENT_DOES_NOT_EXIST = 3;
-	public static final byte ERROR_REGION_INVALID_PATH = 4;
-
-	private String regionFullPath;
-	private RegionAttributeInfo attrInfo;
-
-	public RegionCreateTask()
-	{
-	}
-
-	/**
-	 * Constructs a RegionCreateAllTask object using the default region attribute settings.
-	 * @param regionFullPath The region path.
-	 */
-	public RegionCreateTask(String regionFullPath)
-	{
-		this(regionFullPath, null);
-	}
-
-	/**
-	 * Constructs a RegionCreateAllTask object using the specified region attributes.
-	 * @param regionFullPath The region path.
-	 * @param attrInfo The region attributes. The attribute values are same as the cache.dtd values.
-	 */
-	public RegionCreateTask(String regionFullPath, RegionAttributeInfo attrInfo)
-	{
-		this.regionFullPath = regionFullPath;
-		this.attrInfo = attrInfo;
-	}
-
-	public CommandResults runTask(Object userData)
-	{
-		return createRegion();
-	}
-
-	private CommandResults createRegion()
-	{
-		CommandResults results = new CommandResults();
-		results.setCode(SUCCESS_CREATED);
-
-		Cache cache = CacheFactory.getAnyInstance();
-		MemberInfo memberInfo = new MemberInfo();
-		DistributedMember member = cache.getDistributedSystem().getDistributedMember();
-		memberInfo.setHost(member.getHost());
-		memberInfo.setMemberId(member.getId());
-		memberInfo.setMemberName(cache.getName());
-		memberInfo.setPid(member.getProcessId());
-		results.setDataObject(memberInfo);
-
-		if (regionFullPath == null) {
-			results.setCode(ERROR_REGION_INVALID_PATH);
-			results.setCodeMessage("Invalid region path: " + regionFullPath);
-			return results;
-		}
-		int index = regionFullPath.lastIndexOf("/");
-		if (index == regionFullPath.length() - 1) {
-			results.setCode(ERROR_REGION_INVALID_PATH);
-			results.setCodeMessage("Invalid region path: " + regionFullPath);
-			return results;
-		}
-
-		String regionName = regionFullPath.substring(index + 1);
-		try {
-
-			Region region = cache.getRegion(regionFullPath);
-			if (region != null) {
-				results.setCode(ERROR_REGION_ALREADY_EXIST);
-				results.setCodeMessage("Region already exist: " + regionFullPath);
-			} else {
-				Region parentRegion = RegionUtil.getParentRegion(regionFullPath);
-				if (parentRegion == null) {
-					if (regionFullPath.split("/").length > 2) {
-						results.setCode(ERROR_REGION_PARENT_DOES_NOT_EXIST);
-						results.setCodeMessage("Parent region does not exist: " + regionFullPath);
-					} else {
-						if (attrInfo == null) {
-							region = cache.createRegion(regionName, new AttributesFactory().create());
-						} else {
-							region = cache.createRegion(regionName, attrInfo.createRegionAttributes());
-						}
-						if (region == null) {
-							results.setCode(ERROR_REGION_NOT_CREATED);
-							results.setCodeMessage("Unable create region: " + regionFullPath);
-						} else {
-							results.setCodeMessage("Region created: " + region.getFullPath());
-						}
-					}
-				} else {
-					if (attrInfo == null) {
-						region = parentRegion.createSubregion(regionName, new AttributesFactory().create());
-					} else {
-						region = parentRegion.createSubregion(regionName, attrInfo.createRegionAttributes());
-					}
-					if (region == null) {
-						results.setCode(ERROR_REGION_NOT_CREATED);
-						results.setCodeMessage("Unable create region: " + regionFullPath);
-					} else {
-						results.setCodeMessage("Region created: " + region.getFullPath());
-					}
-				}
-			}
-		} catch (CacheException ex) {
-			results.setCode(ERROR_REGION_NOT_CREATED);
-			results.setException(ex);
-		}
-		return results;
-	}
-
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException
-	{
-		regionFullPath = DataSerializerEx.readUTF(input);
-		attrInfo = (RegionAttributeInfo) DataSerializer.readObject(input);
-	}
-
-	public void toData(DataOutput output) throws IOException
-	{
-		DataSerializerEx.writeUTF(regionFullPath, output);
-		DataSerializer.writeObject(attrInfo, output);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionDestroyTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionDestroyTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionDestroyTask.java
deleted file mode 100644
index c6d9627..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionDestroyTask.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-
-/**
- * RegionDestroyTask destroys a remote region. Invoke this class using
- * CommandClient.execute() or CommandClient.broadcast(). CommandClient.execute()
- * destroys the specified region in the connected server and distributes it to
- * other servers only if the region scope is not LOCAL.
- * CommandClient.Broadcast() destroys the specified region in all peers in the
- * distributed system. Both methods return CommandResults with the code set.
- * Check CommandResults.getCode() to see the task execution status.
- * RegionDestroyTask.SUCCESS_DESTROYED for region successfully destroyed,
- * RegionDestroyTask.ERROR_REGION_DESTROY for an error creating region.
- * CommandResults.getDataObject() returns MemberInfo.
- * 
- * @author dpark
- */
-public class RegionDestroyTask implements CommandTask
-{
-	private static final long serialVersionUID = 1L;
-
-	public static final byte ERROR_REGION_DESTROY = 1;
-
-	private String regionFullPath;
-
-	public RegionDestroyTask()
-	{
-	}
-
-	/**
-	 * Constructs a RegionDestroyTask object.
-	 * 
-	 * @param regionFullPath
-	 *            The path of the region to destroy.
-	 */
-	public RegionDestroyTask(String regionFullPath)
-	{
-		this.regionFullPath = regionFullPath;
-	}
-
-	public CommandResults runTask(Object userData)
-	{
-		CommandResults results = new CommandResults();
-
-		MemberInfo memberInfo = new MemberInfo();
-
-		try {
-			Cache cache = CacheFactory.getAnyInstance();
-			Region region = cache.getRegion(regionFullPath);
-			DistributedMember member = cache.getDistributedSystem().getDistributedMember();
-			memberInfo.setHost(member.getHost());
-			memberInfo.setMemberId(member.getId());
-			memberInfo.setMemberName(cache.getName());
-			memberInfo.setPid(member.getProcessId());
-
-			results.setDataObject(memberInfo);
-
-			if (region == null) {
-				results.setCode(ERROR_REGION_DESTROY);
-				results.setCodeMessage("Region undefined: " + regionFullPath);
-			} else {
-				synchronized (region) {
-					region.destroyRegion();
-				}
-			}
-		} catch (Exception ex) {
-			results.setCode(ERROR_REGION_DESTROY);
-			results.setCodeMessage(ex.getMessage());
-			results.setException(ex);
-		}
-
-		return results;
-	}
-
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException
-	{
-		regionFullPath = DataSerializer.readString(input);
-	}
-
-	public void toData(DataOutput output) throws IOException
-	{
-		DataSerializer.writeString(regionFullPath, output);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionPathTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionPathTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionPathTask.java
deleted file mode 100644
index 1c8c0f4..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionPathTask.java
+++ /dev/null
@@ -1,156 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-/**
- * RegionPathTask retrieves an entire list of region paths in the connected
- * server or in the entire distributed system in which the connected server
- * belongs.
- */
-public class RegionPathTask implements CommandTask
-{
-	private static final long serialVersionUID = 1L;
-
-	private boolean regionsInDistributedSystem = false;
-	private boolean recursive = true;
-	private String parentRegionPath = null;
-
-	/**
-	 * Returns all region paths in the entire distributed system. This
-	 * constructor call is equivalent to new RegonPathTask(true, true, null);
-	 */
-	public RegionPathTask()
-	{
-	}
-
-	/**
-	 * Returns all region paths starting from the top level.
-	 * 
-	 * @param regionsInDistributedSystem
-	 *            if false, returns all region paths found in the cache. If
-	 *            true, returns all region paths found in the entire distributed
-	 *            system.
-	 * @param recursive
-	 *            if true, returns all nested region paths, otherwise, returns
-	 *            the top-level region paths
-	 */
-	public RegionPathTask(boolean regionsInDistributedSystem, boolean recursive)
-	{
-		this(regionsInDistributedSystem, recursive, null);
-	}
-
-	/**
-	 * @param regionsInDistributedSystem
-	 *            if false, returns all region paths found in the cache. If
-	 *            true, returns all region paths found in the entire distributed
-	 *            system.
-	 * @param recursive
-	 *            if true, returns all nested region paths, otherwise, returns
-	 *            the top-level region paths
-	 * @param parentRegionPath
-	 *            the parent region path
-	 */
-	public RegionPathTask(boolean regionsInDistributedSystem, boolean recursive, String parentRegionPath)
-	{
-		this.regionsInDistributedSystem = regionsInDistributedSystem;
-		this.recursive = recursive;
-		this.parentRegionPath = parentRegionPath;
-	}
-
-	public CommandResults runTask(Object userData)
-	{
-		String[] regionPaths = null;
-		Cache cache = CacheFactory.getAnyInstance();
-		if (regionsInDistributedSystem) {
-
-			// get region paths defined in this cache only
-
-			if (parentRegionPath == null) {
-				regionPaths = RegionUtil.getAllRegionPaths(CacheFactory.getAnyInstance(), recursive);
-			} else {
-				Region region = cache.getRegion(parentRegionPath);
-				if (region != null) {
-					regionPaths = RegionUtil.getAllRegionPaths(region, recursive);
-				}
-			}
-
-		} else {
-
-			// get region paths defined in all of the caches in the distributed
-			// system
-
-			if (parentRegionPath == null) {
-				regionPaths = RegionUtil.getAllRegionPathsInDistributedSystem(cache.getDistributedSystem(), recursive);
-			} else {
-				Region region = cache.getRegion(parentRegionPath);
-				if (region != null) {
-					regionPaths = RegionUtil.getAllRegionPaths(region, recursive);
-				}
-			}
-
-		}
-		CommandResults results = new CommandResults(regionPaths);
-		return results;
-	}
-
-	public boolean isRegionsInDistributedSystem()
-	{
-		return regionsInDistributedSystem;
-	}
-
-	public void setRegionsInDistributedSystem(boolean regionsInDistributedSystem)
-	{
-		this.regionsInDistributedSystem = regionsInDistributedSystem;
-	}
-
-	public boolean isRecursive()
-	{
-		return recursive;
-	}
-
-	public void setRecursive(boolean recursive)
-	{
-		this.recursive = recursive;
-	}
-
-	public String getParentRegionPath()
-	{
-		return parentRegionPath;
-	}
-
-	public void setParentRegionPath(String parentRegionPath)
-	{
-		this.parentRegionPath = parentRegionPath;
-	}
-
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException
-	{
-		regionsInDistributedSystem = input.readBoolean();
-		recursive = input.readBoolean();
-		parentRegionPath = input.readUTF();
-		if (parentRegionPath.equals("\0")) {
-			parentRegionPath = null;
-		}
-	}
-
-	public void toData(DataOutput output) throws IOException
-	{
-		output.writeBoolean(regionsInDistributedSystem);
-		output.writeBoolean(recursive);
-		if (parentRegionPath == null) {
-			output.writeUTF("\0");
-		} else {
-			output.writeUTF(parentRegionPath);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionSizeTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionSizeTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionSizeTask.java
deleted file mode 100644
index de76142..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/RegionSizeTask.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-
-/**
- * RegionSizeTask returns the region size. CommandResults.getDataObject()
- * returns an integer, the region size. Use
- * @author dpark
- *
- */
-public class RegionSizeTask implements CommandTask {
-
-	private static final long serialVersionUID = 1;
-
-	private String regionFullPath;
-
-	public RegionSizeTask() {
-	}
-
-	public RegionSizeTask(String regionFullPath) {
-		this.regionFullPath = regionFullPath;
-	}
-
-	public CommandResults runTask(Object userData) {
-		CommandResults results = new CommandResults();
-		try {
-			Cache cache = CacheFactory.getAnyInstance();
-			MapMessage message = new MapMessage();
-			message.put("MemberId", cache.getDistributedSystem().getDistributedMember().getId());
-			message.put("MemberName", cache.getDistributedSystem().getName());
-			message.put("Host", cache.getDistributedSystem().getDistributedMember().getHost());
-			message.put("Pid", cache.getDistributedSystem().getDistributedMember().getProcessId());
-			Region region = cache.getRegion(regionFullPath);
-			if (region == null) {
-				results.setCode(CommandResults.CODE_ERROR);
-				results.setCodeMessage("Undefined region: " + regionFullPath);
-			} else {
-				message.put("RegionSize", region.size());
-				results.setDataObject(message);
-			}
-			return results;
-		} catch (CacheException ex) {
-			results.setCode(CommandResults.CODE_ERROR);
-			results.setCodeMessage(ex.getMessage());
-			results.setException(ex);
-		}
-		return results;
-	}
-
-	public void fromData(DataInput input) throws IOException,
-	ClassNotFoundException {
-		regionFullPath = DataSerializer.readString(input);
-	}
-
-	public void toData(DataOutput output) throws IOException {
-		DataSerializer.writeString(regionFullPath, output);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/MemberInfo.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/MemberInfo.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/MemberInfo.java
deleted file mode 100644
index 5095a38..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/MemberInfo.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.DataSerializerEx;
-
-/**
- * A data class that contains member information
- * @author dpark
- *
- */
-public class MemberInfo implements DataSerializable
-{
-	private static final long serialVersionUID = 1L;
-	
-	private String memberId;
-	private String memberName;
-	private String host;
-	private int pid;
-	
-	public String getMemberId()
-	{
-		return memberId;
-	}
-
-	public void setMemberId(String memberId)
-	{
-		this.memberId = memberId;
-	}
-
-	public String getMemberName()
-	{
-		return memberName;
-	}
-
-	public void setMemberName(String memberName)
-	{
-		this.memberName = memberName;
-	}
-
-	public String getHost()
-	{
-		return host;
-	}
-
-	public void setHost(String host)
-	{
-		this.host = host;
-	}
-
-	public int getPid()
-	{
-		return pid;
-	}
-
-	public void setPid(int pid)
-	{
-		this.pid = pid;
-	}
-
-	public void fromData(DataInput in) throws IOException, ClassNotFoundException
-	{
-		pid = in.readInt();
-		memberId = DataSerializerEx.readUTF(in);
-		memberName = DataSerializerEx.readUTF(in);
-		host = DataSerializerEx.readUTF(in);
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		out.writeInt(pid);
-		DataSerializerEx.writeUTF(memberId, out);
-		DataSerializerEx.writeUTF(memberName, out);
-		DataSerializerEx.writeUTF(host, out);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/PartitionAttributeInfo.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/PartitionAttributeInfo.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/PartitionAttributeInfo.java
deleted file mode 100644
index 07f6261..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/PartitionAttributeInfo.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-
-/**
- * A data class that contains partition region attribute information.
- * @author dpark
- *
- */
-public class PartitionAttributeInfo implements DataSerializable
-{
-	private static final long serialVersionUID = 1L;
-	
-	private long versionId = serialVersionUID;
-
-	private String regionPath;
-	
-	private int redundantCopies;
-	private int totalNumBuckets;
-    
-    private List partitionList = new ArrayList();
-    
-    public PartitionAttributeInfo() {}
-    
-    public PartitionAttributeInfo(PartitionAttributes attr)
-    {
-    	
-    }
-    
-    public void addPartition(Partition partition)
-    {
-    	partitionList.add(partition);
-    }
-    
-    public List getPartitionList()
-    {
-    	return partitionList;
-    }
-
-	public String getRegionPath()
-	{
-		return regionPath;
-	}
-
-	public int getRedundantCopies()
-	{
-		return redundantCopies;
-	}
-
-	public int getTotalNumBuckets()
-	{
-		return totalNumBuckets;
-	}
-
-	public void fromData(DataInput in) throws IOException, ClassNotFoundException
-	{
-		versionId = in.readLong();
-		
-		regionPath = in.readUTF();
-		redundantCopies = in.readInt();
-		totalNumBuckets = in.readInt();
-		
-		partitionList = new ArrayList();
-		int size = in.readInt();
-		for (int i = 0; i < size; i++) {
-			Partition part = new Partition();
-			part.memberName = in.readUTF();
-			part.localMaxMemory = in.readInt();
-			part.toalMaxMemory = in.readLong();
-			partitionList.add(part);
-		}
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		out.writeLong(versionId);
-		
-		out.writeUTF(regionPath);
-		out.writeInt(redundantCopies);
-		out.writeInt(totalNumBuckets);
-		
-		int size = partitionList.size();
-		out.writeInt(size);
-		for (int i = 0; i < size; i++) {
-			Partition part = (Partition)partitionList.get(i);
-			out.writeUTF(part.memberName);
-			out.writeInt(part.localMaxMemory);
-			out.writeLong(part.toalMaxMemory);
-		}
-		
-	}
-	
-	public static class Partition
-    {
-		public Partition() {}
-		
-    	private String memberName;
-    	private int localMaxMemory ;
-    	private long toalMaxMemory;
-    	
-		public String getMemberName()
-		{
-			return memberName;
-		}
-		
-		public int getLocalMaxMemory()
-		{
-			return localMaxMemory;
-		}
-		
-		public long getToalMaxMemory()
-		{
-			return toalMaxMemory;
-		}
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/RegionAttributeInfo.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/RegionAttributeInfo.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/RegionAttributeInfo.java
deleted file mode 100644
index 06fd010..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/data/RegionAttributeInfo.java
+++ /dev/null
@@ -1,286 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-
-/**
- * A data class that contains region attribute information.
- * @author dpark
- *
- */
-public class RegionAttributeInfo implements DataSerializable
-{
-	private static final long serialVersionUID = 1L;
-	
-	// Region attributes
-	public static final String CONCURRENCY_LEVEL = "concurrency-level";
-	public static final String DATA_POLICY = "data-policy";
-	public static final String EARLY_ACK = "early-ack";
-	public static final String ENABLE_ASYNC_CONFLATION = "enable-async-conflation";
-	public static final String ENABLE_GATEWAY = "enable-gateway";
-	public static final String ENABLE_SUBSCRIPTION_CONFLATION = "enable-subscription-conflation";
-	public static final String HUB_ID = "hub-id";
-	public static final String IGNORE_JTA = "ignore-jta";
-	public static final String INDEX_UPDATE_TYPE = "index-update-type";
-	public static final String INITIAL_CAPACITY = "initial-capacity";
-	public static final String IS_LOCK_GRANTOR = "is-lock-grantor";
-	public static final String LOAD_FACTOR = "load-factor";
-	public static final String MULTICAST_ENABLED = "multicast-enabled";
-	public static final String PUBLISHER = "publisher";
-	public static final String SCOPE = "scope";
-	public static final String STATISTICS_ENABLED = "statistics-enabled";
-	
-	// Region element attributes
-	// region-time-to-live
-	public static final String REGION_TIME_TO_LIVE_TIMEOUT = "region-time-to-live.timeout";
-	public static final String REGION_TIME_TO_LIVE_ACTION = "region-time-to-live.action";
-	
-	// region-idle-time
-	public static final String REGION_IDLE_TIME_TIMEOUT = "region-idle-time.timeout";
-	public static final String REGION_IDLE_TIME_ACTION = "region-idle-time.action";
-	
-	// entry-time-to-live
-	public static final String ENTRY_TIME_TO_LIVE_TIMEOUT = "entry-time-to-live.timeout";
-	public static final String ENTRY_TIME_TO_LIVE_ACTION = "entry-time-to-live.action";
-	
-	// entry-idle-time
-	public static final String ENTRY_IDLE_TIME_TIMEOUT = "entry-idle-time.timeout";
-	public static final String ENTRY_IDLE_TIME_ACTION = "entry-idle-time.action";
-	
-	// disk-dirs
-	public static final String DISK_DIRS_DISK_DIR = "disk-dirs.disk-dir"; // 1, many
-	
-	// disk-write-attributes
-	public static final String DISK_WRITE_ATTRIBUTES_MAX_OPLOG_SIZE = "disk-write-attributes.max-oplog-size";
-	public static final String DISK_WRITE_ATTRIBUTES_ROLL_OPLOGS = "disk-write-attributes.roll-oplogs";
-	public static final String DISK_WRITE_ATTRIBUTES_ASYNCHRONOUS_WRITES_TIME_INTERVAL = "disk-write-attributes.asynchronous-writes.time-interval";
-	public static final String DISK_WRITE_ATTRIBUTES_ASYNCHRONOUS_WRITES_BYTES_THRESHOLD = "disk-write-attributes.asynchronous-writes.bytes-threshold";
-	public static final String DISK_WRITE_ATTRIBUTES_SYNCHRONOUS_WRITES = "disk-write-attributes.synchronous-writes"; // true|false
-	
-	// membership-attributes
-	public static final String MEMBERSHIP_ATTRIBUTES_LOSS_ACTION = "membership-attributes.loss-action"; // 0,1
-	public static final String MEMBERSHIP_ATTRIBUTES_RESUMPTION_ACTION = "membership-attributes.resumption-action"; // 0,1
-	public static final String MEMBERSHIP_ATTRIBUTES_REQUIRED_ROLE = "membership-attributes.resumption-action"; // 1, many
-	
-	// subscription-attributes
-	public static final String SUBSCRIPTION_ATTRIBUTES_INTEREST_POLICY = "subscription-attributes.interest-policy"; // 0,1
-	
-	// eviction-attributes.lru-entry-count
-	public static final String EVICTION_ATTRIBUTES_LRU_ENTRY_COUNT_ACTION = "eviction-attributes.lru-entry-count.action";
-	public static final String EVICTION_ATTRIBUTES_LRU_ENTRY_COUNT_MAXIMUM = "eviction-attributes.lru-entry-count.maximum";
-	
-	// eviction-attributes.lru-memory-size 
-	public static final String EVICTION_ATTRIBUTES_LRU_MEMORY_SIZE_ACTION = "eviction-attributes.lru-memory-size.action";
-	public static final String EVICTION_ATTRIBUTES_LRU_MEMORY_SIZE_MAXIMUM = "eviction-attributes.lru-memory-size.maximum";
-	public static final String EVICTION_ATTRIBUTES_LRU_MEMORY_SIZE_CLASS_NAME = "eviction-attributes.lru-memory-size.class-name";
-	public static final String EVICTION_ATTRIBUTES_LRU_MEMORY_SIZE_PARAMETER = "eviction-attributes.lru-memory-size.parameter";
-	public static final String EVICTION_ATTRIBUTES_LRU_MEMORY_SIZE_PARAMETER_STRING = "eviction-attributes.lru-memory-size.parameter.string";
-	public static final String EVICTION_ATTRIBUTES_LRU_MEMORY_SIZE_PARAMETER_DECLARABLE = "eviction-attributes.lru-memory-size.parameter.declarable";
-	
-	// eviction-attributes.lru-heap-percentage
-	public static final String EVICTION_ATTRIBUTES_LRU_HEAP_PERCENTAGE_ACTION = "eviction-attributes.lru-heap-percentage.action";
-	public static final String EVICTION_ATTRIBUTES_LRU_HEAP_PERCENTAGE_CLASS_NAME = "eviction-attributes.lru-heap-percentage.class-name";
-	public static final String EVICTION_ATTRIBUTES_LRU_HEAP_PERCENTAGE_PARAMETER = "eviction-attributes.lru-heap-percentage.parameter";
-	public static final String EVICTION_ATTRIBUTES_LRU_HEAP_PERCENTAGE_PARAMETER_STRING = "eviction-attributes.lru-heap-percentage.parameter.string";
-	public static final String EVICTION_ATTRIBUTES_LRU_HEAP_PERCENTAGE_PARAMETER_DECLARABLE = "eviction-attributes.lru-heap-percentage.parameter.declarable";
-	
-	// key-constraint
-	public static final String KEY_CONTRATINT = "key-constraint";
-	
-	// value-constraint
-	public static final String VALUE_CONTRATINT = "value-constraint";
-	
-	// cache-listener
-	public static final String CACHE_LISTENER_CLASS_NAME = "cache-listener.class-name";
-	public static final String CACHE_LISTENER_PARAMETER_NAME = "cache-listener.parameter.name";
-	public static final String CACHE_LISTENER_PARAMETER_STRING = "cache-listener.parameter.string";
-	public static final String CACHE_LISTENER_PARAMETER_DECLARABLE_CLASS_NAME = "cache-listener.parameter.declarable.class-name";
-	public static final String CACHE_LISTENER_PARAMETER_DECLARABLE_PARAMETER_NAME = "cache-listener.parameter.declarable.parameter.name";
-	public static final String CACHE_LISTENER_PARAMETER_DECLARABLE_PARAMETER_STRING = "cache-listener.parameter.declarable.parameter.string";
-	
-	// Partition attributes
-	public static final String LOCAL_MAX_MEMORY = "local-max-memory";
-	public static final String REDUNDANT_COPIES = "redundant-copies";
-	public static final String TOTAL_MAX_MEMORY = "total-max-memory";
-	public static final String TOTAL_NUM_BUCKETS = "total-num-buckets";
-	
-	private int versionId = 1;
-	
-	private HashMap attrProperties = new HashMap();
-	
-	public RegionAttributeInfo() {}
-	
-	public RegionAttributeInfo(Properties attrProperties)
-	{
-		this.attrProperties.putAll(attrProperties);
-	}
-	
-	public void setAttribute(String attributeName, String value)
-	{
-		attrProperties.put(attributeName, value);
-	}
-	
-	public String getAttribute(String attributeName)
-	{
-		return (String)attrProperties.get(attributeName);
-	}
-	
-	public RegionAttributes createRegionAttributes() 
-	{
-		AttributesFactory factory = new AttributesFactory();
-		PartitionAttributesFactory partitionAttrFactory = null;
-		
-		Set entrySet = attrProperties.entrySet();
-		for (Iterator<Entry<String, String>> iterator = entrySet.iterator(); iterator.hasNext();) {
-			Entry<String, String> entry = iterator.next();
-			String attr = (String)entry.getKey();
-			String value = (String)entry.getValue();
-			value = value.replace('-', '_');
-			if (attr.equals(CONCURRENCY_LEVEL)) {
-				factory.setConcurrencyLevel(Integer.parseInt(value));
-			} else if (attr.equals(DATA_POLICY)) {
-				if (value.equalsIgnoreCase(DataPolicy.EMPTY.toString())) {
-					factory.setDataPolicy(DataPolicy.EMPTY);
-				} else if (value.equalsIgnoreCase(DataPolicy.NORMAL.toString())) {
-					factory.setDataPolicy(DataPolicy.NORMAL);
-				} else if (value.equalsIgnoreCase(DataPolicy.PARTITION.toString())) {
-					factory.setDataPolicy(DataPolicy.PARTITION);
-				} else if (value.equalsIgnoreCase(DataPolicy.PERSISTENT_REPLICATE.toString())) {
-					factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
-				} else if (value.equalsIgnoreCase(DataPolicy.PRELOADED.toString())) {
-					factory.setDataPolicy(DataPolicy.PRELOADED);
-				} else if (value.equalsIgnoreCase(DataPolicy.REPLICATE.toString())) {
-					factory.setDataPolicy(DataPolicy.REPLICATE);
-				}
-			} else if (attr.equals(EARLY_ACK)) {
-				factory.setEarlyAck(Boolean.parseBoolean(value));
-			} else if (attr.equals(ENABLE_ASYNC_CONFLATION)) {
-				factory.setEnableAsyncConflation(Boolean.parseBoolean(value));
-			} else if (attr.equals(ENABLE_SUBSCRIPTION_CONFLATION)) {
-				factory.setEnableSubscriptionConflation(Boolean.parseBoolean(value));
-			} else if (attr.equals(IGNORE_JTA)) {
-				factory.setIgnoreJTA(Boolean.parseBoolean(value));
-			} else if (attr.equals(INDEX_UPDATE_TYPE)) {
-				factory.setIndexMaintenanceSynchronous(value.equals("asynchronous"));
-			} else if (attr.equals(INITIAL_CAPACITY)) {
-				factory.setInitialCapacity(Integer.parseInt(value));
-			} else if (attr.equals(IS_LOCK_GRANTOR)) {
-				factory.setLockGrantor(Boolean.parseBoolean(value));
-			} else if (attr.equals(LOAD_FACTOR)) {
-				factory.setLoadFactor(Float.parseFloat(value));
-			} else if (attr.equals(MULTICAST_ENABLED)) {
-				factory.setMulticastEnabled(Boolean.parseBoolean(value));	
-			} else if (attr.equals(PUBLISHER)) {
-				factory.setPublisher(Boolean.parseBoolean(value));	
-			} else if (attr.equals(SCOPE)) {
-				if (value.equalsIgnoreCase(Scope.DISTRIBUTED_ACK.toString())) {
-					factory.setScope(Scope.DISTRIBUTED_ACK);
-				} else if (value.equalsIgnoreCase(Scope.DISTRIBUTED_NO_ACK.toString())) {
-					factory.setScope(Scope.DISTRIBUTED_NO_ACK);
-				} else if (value.equalsIgnoreCase(Scope.GLOBAL.toString())) {
-					factory.setScope(Scope.GLOBAL);
-				} else if (value.equalsIgnoreCase(Scope.LOCAL.toString())) {
-					factory.setScope(Scope.LOCAL);
-				}
-			} else if (attr.equals(STATISTICS_ENABLED)) {
-				factory.setStatisticsEnabled(Boolean.parseBoolean(value));	
-				
-			// Partition attributes
-			} else if (attr.equals(LOCAL_MAX_MEMORY)) {
-				if (partitionAttrFactory == null) {
-					partitionAttrFactory = new PartitionAttributesFactory();
-				}
-				partitionAttrFactory.setLocalMaxMemory(Integer.parseInt(value));
-			} else if (attr.equals(REDUNDANT_COPIES)) {
-				if (partitionAttrFactory == null) {
-					partitionAttrFactory = new PartitionAttributesFactory();
-				}
-				partitionAttrFactory.setRedundantCopies(Integer.parseInt(value));
-			} else if (attr.equals(TOTAL_MAX_MEMORY)) {
-				if (partitionAttrFactory == null) {
-					partitionAttrFactory = new PartitionAttributesFactory();
-				}
-				partitionAttrFactory.setTotalMaxMemory(Integer.parseInt(value));
-			} else if (attr.equals(TOTAL_NUM_BUCKETS)) {
-				if (partitionAttrFactory == null) {
-					partitionAttrFactory = new PartitionAttributesFactory();
-				}
-				partitionAttrFactory.setTotalNumBuckets(Integer.parseInt(value));
-			
-			
-			// region attributes elements - additions (9/19/09)
-			} else if (attr.equals(ENTRY_IDLE_TIME_TIMEOUT)) {
-				int timeout = Integer.parseInt(value);
-				String action = (String)attrProperties.get(ENTRY_IDLE_TIME_ACTION);
-				factory.setEntryIdleTimeout(new ExpirationAttributes(timeout, getExpirationAction(action)));
-			} else if (attr.equals(ENTRY_TIME_TO_LIVE_TIMEOUT)) {
-				int timeout = Integer.parseInt(value);
-				String action = (String)attrProperties.get(ENTRY_TIME_TO_LIVE_ACTION);
-				factory.setEntryTimeToLive(new ExpirationAttributes(timeout, getExpirationAction(action)));
-			} else if (attr.equals(REGION_IDLE_TIME_TIMEOUT)) {
-				int timeout = Integer.parseInt(value);
-				String action = (String)attrProperties.get(REGION_IDLE_TIME_ACTION);
-				factory.setRegionIdleTimeout(new ExpirationAttributes(timeout, getExpirationAction(action)));
-			} else if (attr.equals(REGION_TIME_TO_LIVE_TIMEOUT)) {
-				int timeout = Integer.parseInt(value);
-				String action = (String)attrProperties.get(REGION_TIME_TO_LIVE_ACTION);
-				factory.setRegionTimeToLive(new ExpirationAttributes(timeout, getExpirationAction(action)));
-			}
-			
-		}
-		
-		if (partitionAttrFactory != null) {
-			factory.setPartitionAttributes(partitionAttrFactory.create());
-		}
-		
-		return factory.create();
-	}
-	
-	private ExpirationAction getExpirationAction(String action)
-	{
-		if (action == null) {
-			return ExpirationAttributes.DEFAULT.getAction();
-		}
-		action = action.replace('-', '_');
-		if (action.equalsIgnoreCase(ExpirationAction.DESTROY.toString())) {
-			return ExpirationAction.DESTROY;
-		} else if (action.equalsIgnoreCase(ExpirationAction.INVALIDATE.toString())) {
-				return ExpirationAction.INVALIDATE;
-		} else if (action.equalsIgnoreCase(ExpirationAction.LOCAL_DESTROY.toString())) {
-			return ExpirationAction.LOCAL_DESTROY;
-		} else if (action.equalsIgnoreCase(ExpirationAction.LOCAL_INVALIDATE.toString())) {
-			return ExpirationAction.LOCAL_INVALIDATE;
-		} else {
-			return ExpirationAttributes.DEFAULT.getAction();
-		}
-	}
-
-	public void fromData(DataInput in) throws IOException, ClassNotFoundException
-	{
-		versionId = in.readInt();
-		attrProperties = (HashMap)DataSerializer.readObject(in);
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		out.writeInt(versionId);
-		DataSerializer.writeObject(attrProperties, out);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/bcp.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/bcp.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/bcp.java
deleted file mode 100644
index 563df6c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/bcp.java
+++ /dev/null
@@ -1,527 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.lang.reflect.Method;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ReflectionUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.ObjectUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.OutputUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-/**
- * Bulk copy.
- * @author dpark
- *
- */
-public class bcp implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public bcp(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("bcp <region path> {in | out} <data file>");
-		gfsh.println("    [-k] [-v]");
-		gfsh.println("    [-r <row terminator>]");
-		gfsh.println("    [-t <field terminator>]");
-		gfsh.println("    [-F <first row>]");
-		gfsh.println("    [-L <last row>]");
-		gfsh.println("    [-b <batch size>]");
-		gfsh.println("    [-d <date format>]");
-		gfsh.println("    [-f <value key field>]");
-		gfsh.println("    Bulk-copy region entries to a file or bulk-copy file contents to region.");
-		gfsh.println("    The region path can be absolute or relative. Note that if the region is");
-		gfsh.println("    a partitioned region then the 'out' option retrieves data only from");
-		gfsh.println("    the local dataset of the connected server due to the potentially large");
-		gfsh.println("    size of the partitioend region.");
-		gfsh.println("    -k Copy key fields. If both -k and -v are specified then the key field");
-		gfsh.println("       takes precedence.");
-		gfsh.println("    -v Copy value fields. If both -k and -v are specified then the key field");
-		gfsh.println("       takes precedence.");
-		gfsh.println("    -r Row terminator character. Default: platform specific.");
-		gfsh.println("    -t Field terminator charater. Default: ,");
-		gfsh.println("    -F The number of the first row in the file to load.");
-		gfsh.println("    -L The number of the last row in the file to load.");
-		gfsh.println("    -b The batch size. Default: 1000");
-		gfsh.println("    -d The date format (conforms to SimpleDateFormat). Teh format must be");
-		gfsh.println("       enclosed in double quotes. Default: \"EEE MMM dd HH:mm:ss zzz yyyy\"");
-		gfsh.println("    -f The name of the key field to store or load.");	
-		gfsh.println("    Default:");
-		gfsh.println("        bcp <region path> out <file> -v -r \\n -t , -F 1 -b 1000 \\");
-		gfsh.println("            -d \"EEE MMM dd HH:mm:ss zzz yyyy\"");
-		gfsh.println("    Example:");
-		gfsh.println("        bcp /prices out price_out -t ,");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("bcp -?")) {
-			help();
-		} else {
-			bcp(command);
-		}
-	}
-	
-	private void bcp(String command) throws Exception
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 4) {
-			gfsh.println("Error: incomplete bcp command. Run bcp -? for help.");
-			return;
-		} 
-		
-		// Parse command inputs
-		String regionPath = list.get(1);
-		String directionType = list.get(2);
-		String filePath = list.get(3);
-		
-		// region 
-		Cache cache = CacheFactory.getAnyInstance();
-		String fullPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-		Region region = cache.getRegion(fullPath);
-		if (region == null) {
-			gfsh.println("Error: region undefined - " + fullPath);
-			return;
-		}
-		
-		// in | out
-		boolean isIn = false;
-		if (directionType.equalsIgnoreCase("in")) {
-			isIn = true;
-		} else if (directionType.equalsIgnoreCase("out")) {
-			isIn = false;
-		} else {
-			gfsh.println("Error: invalid direction type - " + directionType);
-			return;
-		}
-		
-		// file
-		File file = new File(filePath);
-		if (isIn) {
-			if (file.exists() == false) {
-				gfsh.println("Error: input file does not exist - " + file.getAbsolutePath());
-				return;
-			}
-		} else {
-			if (file.exists()) {
-				gfsh.println("Error: output file already exists - " + file.getAbsolutePath());
-				return;
-			} 
-		}
-		
-		// options
-		String fieldTerminator = ",";
-		String rowTerminator = "\n";
-		int firstRow = 1;
-		int lastRow = -1;
-		int batchSize = 1000;
-		SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy"); 
-		String valueKeyFieldName = null;
-		boolean printKeys = false;
-		boolean printValues = false;
-		for (int i = 0; i < list.size(); i++) {
-			String val = list.get(i);
-			if (val.equals("-t")) {
-				i++;
-				if (list.size() > i) {
-					fieldTerminator = list.get(i);
-				}
-			} else if (val.equals("-r")) {
-				i++;
-				if (list.size() > i) {
-					rowTerminator = list.get(i);
-					rowTerminator = "\r\n";
-				}
-			} else if (val.equals("-F")) {
-				i++;
-				if (list.size() > i) {
-					val = list.get(i);
-					firstRow = Integer.parseInt(val);
-				}
-			} else if (val.equals("-L")) {
-				i++;
-				if (list.size() > i) {
-					val = list.get(i);
-					lastRow = Integer.parseInt(val);
-				}
-			} else if (val.equals("-b")) {
-				i++;
-				if (list.size() > i) {
-					val = list.get(i);
-					batchSize = Integer.parseInt(val);
-				}
-			} else if (val.equals("-d")) {
-				i++;
-				if (list.size() > i) {
-					String str = list.get(i);
-					dateFormat = new SimpleDateFormat(str);
-				}
-			} else if (val.equals("-f")) {
-				i++;
-				if (list.size() > i) {
-					valueKeyFieldName = list.get(i);
-				}
-			} else if (val.equals("-k")) {
-				printKeys = true;
-			} else if (val.equals("-v")) {
-				printValues = true;
-			}
-		}
-		
-		if (isIn) {
-			bcpIn(region, file, fieldTerminator, rowTerminator, firstRow, lastRow, batchSize, valueKeyFieldName);
-		} else {
-			if (printKeys == false && printValues == false) {
-				printValues = true;
-			}
-			bcpOut(fullPath, file, fieldTerminator, rowTerminator, firstRow, lastRow, batchSize, printKeys, printValues, dateFormat, valueKeyFieldName);
-		}
-	}
-	
-	private void bcpIn(Region region, File file, 
-			String fieldTerminator, String rowTerminator, 
-			int firstRow, int lastRow, int batchSize, String valueKeyFieldName) throws Exception
-	{
-		BufferedReader reader = new BufferedReader(new FileReader(file));
-		try {
-			bcpIn(region, reader, file, fieldTerminator, rowTerminator, firstRow, lastRow, batchSize, valueKeyFieldName);
-		} finally {
-			reader.close();
-		}
-	}
-	
-	private void bcpIn(Region region, BufferedReader reader, File file,
-			String fieldTerminator, String rowTerminator, 
-			int firstRow, int lastRow, int batchSize, String valueKeyFieldName) throws Exception
-	{
-		if (lastRow < 0) {
-			lastRow = Integer.MAX_VALUE;
-		}
-		
-		Class keyClass = null;
-		Class valueClass = null;
-		String keyMethodNames[] = new String[0];
-		String valueMethodNames[] = null;
-		Map keySetterMap = null;
-		Map valueSetterMap = null;
-		Object key = null;
-		Object value = null;
-		SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy");
-		Method valueKeyGetterMethod = null;
-		
-		String line = reader.readLine();
-		String split[];
-		HashMap map = new HashMap();
-		int count = 0;
-		int rowCount = 0;
-		
-		long startTime = System.currentTimeMillis();
-		while (line != null) {
-			line = line.trim();
-			if (line.length() == 0) {
-				line = reader.readLine();
-				continue;
-			}
-			
-			// comment
-			if (line.startsWith("#")) {
-				if (line.startsWith(OutputUtil.TAG_KEY)) {
-					int endIndex = line.indexOf(fieldTerminator);
-					String keyClassName;
-					if (endIndex == -1) {
-						keyClassName = line.substring(5);
-					} else {
-						keyClassName = line.substring(5, endIndex);
-					}
-					keyClassName = keyClassName.trim();
-					keyClass = Class.forName(keyClassName);
-				} else if (line.startsWith(OutputUtil.TAG_VALUE_KEY)) {
-					if (valueKeyFieldName == null) {
-						int endIndex = line.indexOf(fieldTerminator);
-						String dateFormatString;
-						if (endIndex == -1) {
-							valueKeyFieldName = line.substring(11);
-						} else {
-							valueKeyFieldName = line.substring(11, endIndex);
-						}
-					}
-					valueKeyFieldName = valueKeyFieldName.trim();
-					Map valueGetterMap = ReflectionUtil.getAllGettersMap(valueClass);
-					valueKeyGetterMethod = (Method)valueGetterMap.get("get" + valueKeyFieldName);
-				} else if (line.startsWith(OutputUtil.TAG_VALUE)) {
-					int endIndex = line.indexOf(fieldTerminator);
-					String valueClassName;
-					if (endIndex == -1) {
-						valueClassName = line.substring(7);
-					} else {
-						valueClassName = line.substring(7, endIndex);
-					}
-					valueClassName = valueClassName.trim();
-					valueClass = Class.forName(valueClassName);
-				} else if (line.startsWith(OutputUtil.TAG_DATE_FORMAT)) {
-					int endIndex = line.indexOf(fieldTerminator);
-					String dateFormatString;
-					if (endIndex == -1) {
-						dateFormatString = line.substring(13);
-					} else {
-						dateFormatString = line.substring(13, endIndex);
-					}
-					dateFormatString = dateFormatString.trim();
-					dateFormat = new SimpleDateFormat(dateFormatString);
-				} else if (line.startsWith(OutputUtil.TAG_COLUMN_SEPARATOR)) {
-					// header
-					String keyHeader = null;
-					String valueHeader = null;
-					String header = line.substring(2);
-					int index = header.indexOf(OutputUtil.TAG_COLUMN_SEPARATOR);
-					if (index != -1) {
-						// key & value
-						if (keyClass != null) {
-							keyHeader = header.substring(0, index);
-							keyMethodNames = keyHeader.split(",");
-							for (int i = 0; i < keyMethodNames.length; i++) {
-								keyMethodNames[i] = "set" + keyMethodNames[i];
-							}
-							keySetterMap = ReflectionUtil.getAllSettersMap(keyClass);
-						}
-						index = index + 2;
-					} else {
-						index = 0;
-					}
-					
-					if (valueClass != null) {
-						valueHeader = header.substring(index);
-						valueMethodNames = valueHeader.split(",");
-						for (int i = 0; i < valueMethodNames.length; i++) {
-							valueMethodNames[i] = "set" + valueMethodNames[i];
-						}
-						valueSetterMap = ReflectionUtil.getAllSettersMap(valueClass);
-					}
-				}
-			} else {
-
-				count++;
-				if (firstRow <= count && count <= lastRow) {
-					// data
-					String tokens[] = getTokens(line);
-					int j = 0;
-					if (keyClass != null) {
-						key = updateObject(keyClass, keySetterMap, keyMethodNames, tokens, 0, dateFormat);
-					}
-					if (valueClass != null) {
-						value = updateObject(valueClass, valueSetterMap, valueMethodNames, tokens, keyMethodNames.length, dateFormat);
-					}
-					if (keyClass == null && valueKeyGetterMethod != null) {
-						key = valueKeyGetterMethod.invoke(value, (Object[])null);
-					}
-					
-					if (key == null) {
-						gfsh.println("Error: key is undefined. Use the option '-f' to specify the column (field) name.");
-						return;
-					}
-					map.put(key, value);
-					if (map.size() == batchSize) {
-						region.putAll(map);
-						rowCount+= map.size();
-						map.clear();
-					}
-
-				} else if (count > lastRow) {
-					break;
-				}
-			}
-			
-			line = reader.readLine();
-		}
-		
-		if (map.size() > 0) {
-			region.putAll(map);
-			rowCount+= map.size();
-		}
-		long stopTime = System.currentTimeMillis();
-		
-		gfsh.println("bcp in complete");
-		gfsh.println("       To (region): " + region.getFullPath());
-		gfsh.println("       From (file): " + file.getAbsolutePath());
-		gfsh.println("         Row count: " + rowCount);
-		if (gfsh.isShowTime()) {
-			gfsh.println("    elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-	
-	private Object updateObject(Class clazz, 
-			Map<String, Method> setterMap,
-			String[] setterMethodNames, 
-			String[] tokens, 
-			int startTokenIndex, 
-			SimpleDateFormat dateFormat) throws Exception
-	{
-		String value = tokens[startTokenIndex];
-		if (clazz == byte.class || clazz == Byte.class) {
-			return Byte.parseByte(value);
-		} else if (clazz == char.class || clazz == Character.class) {
-			return value.charAt(0);
-		} else if (clazz == short.class || clazz == Short.class) {
-			return Short.parseShort(value);
-		} else if (clazz == int.class || clazz == Integer.class) {
-			return Integer.parseInt(value);
-		} else if (clazz == long.class || clazz == Long.class) {
-			return Long.parseLong(value);
-		} else if (clazz == float.class || clazz == Float.class) {
-			return Float.parseFloat(value);
-		} else if (clazz == double.class || clazz == Double.class) {
-			return Double.parseDouble(value);
-		} else if (clazz == Date.class) {
-			return dateFormat.parse(value);
-		} else if (clazz == String.class) {
-			return value;
-		}
-		Object obj = clazz.newInstance();
-		for (int i = 0; i < setterMethodNames.length; i++) {
-			ObjectUtil.updateObject(gfsh, setterMap, obj, setterMethodNames[i], tokens[startTokenIndex + i], dateFormat, true);
-		}
-		return obj;
-	}
-	
-	
-	private static String[] getTokens(String line)
-	{
-		// HBAN,23.82,300,23.79,800,"Thu, ""test"", 'helo' Jun 08 09:41:19 EDT 2006",99895,1094931009,82,99895,8,HBAN
-		ArrayList list = new ArrayList();
-		boolean openQuote = false;
-		String value = "";
-		for (int i = 0; i < line.length(); i++) {
-			char c = line.charAt(i);
-			
-			if (c == ',') {
-				if (openQuote == false) {
-					value = value.trim();
-					if (value.startsWith("\"") && value.indexOf(" ") != -1) {
-						value = value.substring(1);
-						if (value.endsWith("\"")) {
-							value = value.substring(0, value.length() - 1);
-						}
-					}
-					
-					list.add(value);
-					value = "";
-					continue;
-				}
-			} else if (c == '"') {
-				openQuote = !openQuote;
-			} 
-			value += c;
-		}
-		list.add(value);
-		return (String[])list.toArray(new String[0]);
-	}
-	
-	private void bcpOut(String regionPath, File file, 
-			String fieldTerminator, String rowTerminator, 
-			int firstRow, int lastRow, int batchSize,
-			boolean printKeys, boolean printValues,
-			SimpleDateFormat dateFormat,
-			String valueKeyFieldName) throws IOException
-	{
-		PrintWriter writer = new PrintWriter(file);
-		try {
-			bcpOut(regionPath, writer, file, fieldTerminator, rowTerminator, firstRow, lastRow, batchSize, printKeys, printValues, dateFormat, valueKeyFieldName);
-		} finally {
-			writer.close();
-		}
-	}
-	
-	private void bcpOut(String regionPath, PrintWriter writer, File file, 
-			String fieldTerminator, String rowTerminator, 
-			int firstRow, int lastRow, int batchSize,
-			boolean printKeys, boolean printValues,
-			SimpleDateFormat dateFormat,
-			String valueKeyFieldName) throws IOException
-	{
-		int totalPrinted = 0;
-		int actualSize = 0;
-		boolean printHeader = true;
-		int printType = OutputUtil.TYPE_VALUES;
-		if (printKeys && printValues) {
-			printType = OutputUtil.TYPE_KEYS_VALUES;
-		} else if (printKeys) {
-			printType = OutputUtil.TYPE_KEYS;
-		}
-		String taskRegionPath = regionPath;
-		
-		long startTime = System.currentTimeMillis();
-		do {
-			CommandResults cr = gfsh.getCommandClient().execute(new QueryTask(taskRegionPath, batchSize, true));
-			if (cr.getCode() == QueryTask.ERROR_QUERY) {
-				gfsh.println(cr.getCodeMessage());
-				return;
-			}
-			QueryResults results = (QueryResults) cr.getDataObject();
-			if (results == null || results.getResults() == null) {
-				gfsh.println("No results");
-				return;
-			}
-			
-			Map map = (Map)results.getResults();
-			if (map.size() == 0) {
-				gfsh.println("Region empty. File not created.");
-				writer.close();
-				file.delete();
-				return;
-			}
-			OutputUtil.printEntries(writer, map, fieldTerminator, rowTerminator, firstRow, lastRow, printType, printHeader, dateFormat, valueKeyFieldName);
-			totalPrinted += map.size();
-			actualSize = results.getActualSize();
-			taskRegionPath = null;
-			printHeader = false;
-		} while (totalPrinted < actualSize);
-		
-		long stopTime = System.currentTimeMillis();
-		writer.close();
-		
-		gfsh.println("bcp out complete");
-		gfsh.println("   From (region): " + regionPath);
-		gfsh.println("       To (file): " + file.getAbsolutePath());
-		gfsh.println("       Row count: " + totalPrinted);
-		if (gfsh.isShowTime()) {
-			gfsh.println("  elapsed (msec): " + (stopTime - startTime));
-		}
-		
-	}
-	
-	public static void main(String args[]) {
-		
-		String line = "H\"B\"AN,23.82,300,23.79,800,\"Thu, \"test\", 'helo' Jun 08 09:41:19 EDT 2006\",99895,1094931009,82,99895,8,HBAN";
-		String tokens[] = getTokens(line);
-		System.out.println(line);
-		for (int i = 0; i < tokens.length; i++) {
-			System.out.print(tokens[i] + ",");
-		}
-		System.out.println();
-		for (int i = 0; i < tokens.length; i++) {
-			System.out.println(tokens[i]);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/cd.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/cd.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/cd.java
deleted file mode 100644
index d9a33dc..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/cd.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-public class cd implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	private String previousPath;
-	
-	public cd(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("cd [-] | [-?] <region path>");
-		gfsh.println("     Change region path.");
-		gfsh.println("     - Change region path to the previous path.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("cd -?")) {
-			help();
-		} else if (command.equals("cd -")) {
-			cd_prev();
-		} else {
-			cd(command);
-		}
-	}
-	
-	private void cd_prev()
-	{
-		chdir(previousPath);
-	}
-	
-	private void cd(String command)
-	{
-		int index = command.indexOf(" ");
-		if (index == -1) {
-			chdir("/");
-		} else {
-			String newPath = command.substring(index).trim();
-			chdir(newPath);
-		}
-	}
-	
-	private void chdir(String newPath)
-	{
-		if (newPath == null) {
-			return;
-		}
-		
-		String currentPath = gfsh.getCurrentPath();
-		String fullPath = gfsh.getFullPath(newPath, currentPath);
-		if (fullPath == null) {
-			gfsh.println("Error: invalid region path");
-		} else if (fullPath.equals("/")) {	
-			gfsh.setCurrentRegion(null);
-			gfsh.setCurrentPath(fullPath);
-			previousPath = currentPath;
-		} else {
-			Region currentRegion = gfsh.getCache().getRegion(fullPath);
-			if (currentRegion == null) {
-				gfsh.println("Error: undefined region path " + fullPath);
-				return;
-			} else {
-				gfsh.setCurrentPath(fullPath);
-			}
-			gfsh.setCurrentRegion(currentRegion);
-			previousPath = currentPath;
-		}
-	}
-}



[57/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/SimplePrintUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/SimplePrintUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/SimplePrintUtil.java
deleted file mode 100644
index f126ae0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/SimplePrintUtil.java
+++ /dev/null
@@ -1,1366 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.util;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.types.CollectionType;
-import com.gemstone.gemfire.cache.query.types.ObjectType;
-import com.gemstone.gemfire.cache.query.types.StructType;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.StringUtil;
-
-public class SimplePrintUtil
-{
-	private static boolean printType = false;
-	private static int collectionEntryPrintCount = 5;
-
-	public static boolean isPrintType()
-	{
-		return printType;
-	}
-
-	public static void setPrintType(boolean printType)
-	{
-		SimplePrintUtil.printType = printType;
-	}
-
-	public static int getCollectionEntryPrintCount()
-	{
-		return collectionEntryPrintCount;
-	}
-
-	public static void setCollectionEntryPrintCount(int collectionEntryPrintCount)
-	{
-		SimplePrintUtil.collectionEntryPrintCount = collectionEntryPrintCount;
-	}
-
-	/**
-	 * Prints the region entries. It prints both keys and values formatted.
-	 * @param region
-	 * @param startIndex
-	 * @param startRowNum
-	 * @param rowCount
-	 * @param keyList
-	 * @return Returns the number of rows printed.
-	 * @throws Exception
-	 */
-	public static int printEntries(Region region, Iterator regionIterator, int startIndex, int startRowNum, int rowCount, List keyList) throws Exception
-	{
-		
-		if (region == null || regionIterator == null) {
-			System.out.println("Error: Region is null");
-			return 0;
-		}
-		
-		int endIndex = startIndex + rowCount; // exclusive
-		if (endIndex >= region.size()) {
-			endIndex = region.size();
-		}
-		
-		if (startIndex == endIndex) {
-			return 0;
-		}
-
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		Object key = null;
-		Object value = null;
-		int index = startIndex;
-
-		// Print keys and values
-		int row = startRowNum;
-		index = startIndex;
-		for (Iterator itr = regionIterator; index < endIndex && itr.hasNext(); index++) {
-			Region.Entry entry = (Region.Entry) itr.next();
-			key = entry.getKey();
-			value = entry.getValue();
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-			printObject(row, "Key", key, true);
-			printObject(row, "Value", value, false);
-			System.out.println();
-			row++;
-		}
-		
-		System.out.println();
-		System.out.println(" Fetch size: " + rowCount);
-		System.out.println("   Returned: " + (row-1) + "/" + region.size());
-		for (Object keyName : keyNameSet) {
-			System.out.println("  Key Class: " + keyName);
-		}
-		for (Object valueName : valueNameSet) {
-			System.out.println("Value Class: " + valueName);
-
-		}
-		return endIndex - startIndex;
-	}
-
-	public static int printEntries(Region region, Map keyMap, List keyList) throws Exception
-	{
-		if (region == null) {
-			System.out.println("Error: Region is null");
-			return 0;
-		}
-
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		ArrayList indexList = new ArrayList(keyMap.keySet());
-		Collections.sort(indexList);
-		Object key = null;
-		Object value = null;
-
-		// Print keys and values
-		int row = 1;
-		int rowCount = keyMap.size();
-		for (Iterator iterator = indexList.iterator(); iterator.hasNext();) {
-			Object index = iterator.next();
-			key = keyMap.get(index);
-			value = region.get(key);
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-			printObject(row, "Key", key, true);
-			printObject(row, "Value", value, false);
-			System.out.println();
-			row++;
-		}
-
-		System.out.println();
-		for (Object keyName : keyNameSet) {
-			System.out.println("  Key Class: " + keyName);
-		}
-		for (Object valueName : valueNameSet) {
-			System.out.println("Value Class: " + valueName);
-		}
-		return rowCount;
-	}
-
-	public static int printEntries(Region region, Set keySet, List keyList) throws Exception
-	{
-		if (region == null) {
-			System.out.println("Error: Region is null");
-			return 0;
-		}
-
-		if (keySet.size() == 0) {
-			return 0;
-		}
-
-		// Print keys and values
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		int row = 1;
-		Object key = null;
-		Object value = null;
-		for (Iterator iterator = keySet.iterator(); iterator.hasNext();) {
-			key = iterator.next();
-			value = region.get(key);
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-			printObject(row, "Key", key, true);
-			printObject(row, "Value", value, false);
-			row++;
-		}
-		System.out.println();
-		for (Object keyName : keyNameSet) {
-			System.out.println("  Key Class: " + keyName);
-		}
-		for (Object valueName : valueNameSet) {
-			System.out.println("Value Class: " + valueName);
-		}
-		return row - 1;
-	}
-	
-	public static int printEntries(Map map, int startIndex, int startRowNum, int rowCount, int actualSize, List keyList) throws Exception
-	{
-		if (map == null) {
-			System.out.println("Error: map is null");
-			return 0;
-		}
-
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		Object key = null;
-		Object value = null;
-		Set entrySet = map.entrySet();
-		int count = 0;
-		int row = startRowNum;
-		int lastRow = startRowNum + rowCount - 1;
-		for (Iterator itr = entrySet.iterator(); count < rowCount && itr.hasNext(); count++) {
-			Map.Entry entry = (Map.Entry) itr.next();
-			key = entry.getKey();
-			value = entry.getValue();
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-			printObject(row, "Key", key, true, 2);
-			printObject(row, "Value", value, false, 2);
-			System.out.println();
-			row++;
-		}
-		System.out.println();
-		System.out.println(" Fetch size: " + rowCount);
-		System.out.println("   Returned: " + (row-1) + "/" + actualSize);
-		for (Object keyName : keyNameSet) {
-			System.out.println("  Key Class: " + keyName);
-		}
-		for (Object valueName : valueNameSet) {
-			System.out.println("Value Class: " + valueName);
-		}
-		return count;
-	}
-	
-	public static int printEntries(Map map, int rowCount, List keyList, 
-			boolean displaySummary, boolean showValues) throws Exception
-	{
-		return printEntries(map, rowCount, keyList, "Key", "Value", displaySummary, showValues);
-	}
-	
-	public static int printEntries(Map map, int rowCount, List keyList, 
-			String keyColumnName, String valueColumnName, 
-			boolean displaySummary, boolean showValues) throws Exception
-	{
-		if (map == null) {
-			System.out.println("Error: Region is null");
-			return 0;
-		}
-		
-		if (map.size() == 0) {
-			return 0;
-		}
-
-		// Print keys and values
-		int row = 1;
-		Object key = null;
-		Object value = null;
-		int count = 0;
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		Set nameSet = map.entrySet();
-		for (Iterator itr = nameSet.iterator(); count < rowCount && itr.hasNext(); count++) {
-
-			Map.Entry entry = (Map.Entry) itr.next();
-			key = entry.getKey();
-			value = entry.getValue();
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-			printObject(row, keyColumnName, key, true, 2);
-			if (showValues) {
-				printObject(row, valueColumnName, value, false, 2);
-			}
-			System.out.println();
-			row++;
-		}
-		if (displaySummary) {
-			System.out.println();
-			System.out.println("Displayed (fetched): " + (row - 1));
-			System.out.println("        Actual Size: " + map.size());
-			for (Object keyName : keyNameSet) {
-				System.out.println("          " + keyColumnName + " Class: " + keyName);
-			}
-			for (Object valueName : valueNameSet) {
-				System.out.println("        " + valueColumnName + " Class: " + valueName);
-	
-			}
-		}
-		return row - 1;
-	}
-	
-	public static int printSet(Set set, int rowCount, List keyList, 
-			String keyColumnName, 
-			boolean displaySummary) throws Exception
-	{
-		if (set == null) {
-			return 0;
-		}
-		
-		if (set.size() == 0) {
-			return 0;
-		}
-
-		// Print keys and values
-		int row = 1;
-		Object key = null;
-		int count = 0;
-		HashSet keyNameSet = new HashSet();
-//		HashSet valueNameSet = new HashSet(); //FindBugs - unused
-		Set nameSet = set;
-		for (Iterator itr = nameSet.iterator(); count < rowCount && itr.hasNext(); count++) {
-			key = itr.next();
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			keyNameSet.add(key.getClass().getName());
-			printObject(row, keyColumnName, key, true, 2);
-			System.out.println();
-			row++;
-		}
-		if (displaySummary) {
-			System.out.println();
-			System.out.println("Displayed (fetched): " + (row - 1));
-			System.out.println("        Actual Size: " + set.size());
-			for (Object keyName : keyNameSet) {
-				System.out.println("          " + keyColumnName + " Class: " + keyName);
-			}
-		}
-		return row - 1;
-	}
-
-//FindBugs - private method never called
-//	private static void computeMaxLengths(List keyList, List valueList, Object key, Object value)
-//	{
-//		computeMaxLengths(keyList, key, true);
-//		computeMaxLengths(valueList, value, false);
-//	}
-
-	private static void printTopHeaders(List list, Object obj, 
-			boolean printLastColumnSpaces, String primitiveHeader)
-	{
-		Object object = obj;
-		if (object == null) {
-			object = "null";
-		}
-		
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date) 
-		{
-
-			int maxLen = (Integer) list.get(0);
-			if (maxLen < primitiveHeader.length()) {
-				maxLen = primitiveHeader.length();
-			}
-			if (printLastColumnSpaces) {
-				System.out.print(StringUtil.getRightPaddedString(primitiveHeader, maxLen, ' '));
-			} else {
-				System.out.print(primitiveHeader);
-			}
-
-		} else {
-
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			String name;
-			Object value;
-			int listIndex = 0;
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				try {
-					value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-					int maxLen = (Integer) list.get(listIndex);
-					String header = name.substring(3);
-					if (listIndex == list.size() - 1) {
-						if (printLastColumnSpaces) {
-							System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-						} else {
-							System.out.print(header);
-						}
-					} else {
-						System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-						System.out.print("  ");
-					}
-
-					listIndex++;
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-
-	private static void printBottomHeaders(List list, Object obj, boolean printLastColumnSpaces,
-			String primitiveHeader)
-	{
-		Object object = obj;
-		if (object == null) {
-			object = "null";
-		}
-		
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date) 
-		{
-
-			int maxLen = (Integer) list.get(0);
-			if (maxLen < primitiveHeader.length()) {
-				maxLen = primitiveHeader.length();
-			}
-			if (printLastColumnSpaces) {
-				System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", primitiveHeader
-						.length(), '-'), maxLen, ' '));
-			} else {
-				System.out.print(StringUtil.getRightPaddedString("", primitiveHeader.length(), '-'));
-			}
-
-		} else {
-
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			String name;
-			Object value;
-			int listIndex = 0;
-			listIndex = 0;
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				try {
-					value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-					int maxLen = (Integer) list.get(listIndex);
-					String header = name.substring(3);
-
-					if (listIndex == list.size() - 1) {
-						if (printLastColumnSpaces) {
-							System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header
-									.length(), '-'), maxLen, ' '));
-						} else {
-							System.out.print(StringUtil.getRightPaddedString("", header.length(), '-'));
-						}
-					} else {
-						System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header
-								.length(), '-'), maxLen, ' '));
-						System.out.print("  ");
-					}
-					listIndex++;
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-
-//	FindBugs - private method never called
-//	private static void printHeaders(List keyList, List valueList, Object key, Object value, int rowMaxLen)
-//			throws Exception
-//	{
-//		System.out.print(StringUtil.getRightPaddedString("Row", rowMaxLen, ' '));
-//		System.out.print("  ");
-//		printTopHeaders(keyList, key, true, "Key");
-//		System.out.print(" | ");
-//		printTopHeaders(valueList, value, false, "Value");
-//		System.out.println();
-//
-//		if (rowMaxLen < 3) {
-//			rowMaxLen = 3;
-//		}
-//		System.out.print(StringUtil.getRightPaddedString("", rowMaxLen, '-'));
-//		System.out.print("  ");
-//		printBottomHeaders(keyList, key, true, "Key");
-//		System.out.print(" | ");
-//		printBottomHeaders(valueList, value, false, "Value");
-//		System.out.println();
-//	}
-	
-	/**
-	 * Prints the SelectResults contents up to the specified rowCount.
-	 * @param sr
-	 * @param startRowNum
-	 * @param rowCount
-	 * @return The number of rows printed
-	 */
-	public static int printSelectResults(SelectResults sr, int startIndex, int startRowNum, int rowCount)
-	{
-		if (sr == null) {
-			System.out.println("Error: SelectResults is null");
-			return 0;
-		}
-
-		int endIndex = startIndex + rowCount; // exclusive
-		if (endIndex >= sr.size()) {
-			endIndex = sr.size();
-		}
-		
-		if (startIndex >= endIndex) {
-			return 0;
-		}
-		
-		CollectionType type = sr.getCollectionType();
-		ObjectType elementType = type.getElementType();
-		int row = 1;
-		if (rowCount == -1) {
-			rowCount = sr.size();
-		}
-
-		HashSet elementNameSet = new HashSet();
-		Object element = null;
-		boolean isStructType = false;
-		StructType structType = null;
-		Struct struct = null;
-		List srList = sr.asList();
-
-		row = startRowNum;
-		for (int i = startIndex; i < endIndex; i++) {
-			element = srList.get(i);
-
-			if (elementType.isStructType()) {
-
-				structType = (StructType) elementType;
-				struct = (Struct) element;
-				printStruct(row, structType, struct, 0);
-				System.out.println();
-
-			} else {
-				System.out.println(row + ". " + getPrintableType(element));
-				printObject(null, element, 1);
-				System.out.println();
-			}
-			row++;
-		}
-		System.out.println();
-		for (Object elementClassName : elementNameSet) {
-			System.out.println("Class: " + elementClassName);
-		}
-		return endIndex - startIndex;
-	}
-
-	private static int printSelectResults_iterator(SelectResults sr, int startRowNum, int rowCount)
-	{
-		if (sr == null) {
-			System.out.println("SelectResults is null");
-			return 0;
-		}
-
-		CollectionType type = sr.getCollectionType();
-		ObjectType elementType = type.getElementType();
-		int row = 1;
-		if (rowCount == -1) {
-			rowCount = sr.size();
-		}
-
-		HashSet elementNameSet = new HashSet();
-		ArrayList maxLenList = new ArrayList();
-		Object element = null;
-		boolean isStructType = false;
-		StructType structType = null;
-		Struct struct = null;
-		for (Iterator iter = sr.iterator(); iter.hasNext() && row <= rowCount;) {
-			element = iter.next();
-			if (elementType.isStructType()) {
-				structType = (StructType) elementType;
-				struct = (Struct) element;
-				computeMaxLengths(maxLenList, structType, struct);
-				isStructType = true;
-			} else {
-				computeMaxLengths(maxLenList, element, false);
-				elementNameSet.add(element.getClass().getName());
-			}
-			row++;
-		}
-
-		if (element == null && struct == null) {
-			return 0;
-		}
-
-		int rowMax = String.valueOf(startRowNum + rowCount - 1).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		if (isStructType) {
-			printHeaders(maxLenList, structType, struct, rowMax);
-		} else {
-			printHeaders(maxLenList, element, rowMax);
-		}
-
-		row = startRowNum;
-		int lastRow = startRowNum + rowCount - 1;
-		for (Iterator iter = sr.iterator(); iter.hasNext() && row <= lastRow;) {
-			element = iter.next();
-
-			if (elementType.isStructType()) {
-
-				structType = (StructType) elementType;
-				struct = (Struct) element;
-				System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-				System.out.print("  ");
-				System.out.println();
-
-			} else {
-
-				System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-				System.out.print("  ");
-				printObject(maxLenList, element, false);
-				System.out.println();
-			}
-			row++;
-		}
-		System.out.println();
-		for (Object elementClassName : elementNameSet) {
-			System.out.println("Class: " + elementClassName);
-		}
-		return row - 1;
-	}
-
-	private static void computeMaxLengths(List list, StructType structType, Struct struct)
-	{
-		ObjectType[] fieldTypes = structType.getFieldTypes();
-		String[] fieldNames = structType.getFieldNames();
-		Object[] fieldValues = struct.getFieldValues();
-
-		int listIndex = 0;
-		for (int i = 0; i < fieldTypes.length; i++) {
-			ObjectType fieldType = fieldTypes[i];
-			String fieldName = fieldNames[i];
-			Object fieldValue = fieldValues[i];
-
-			Integer len;
-			if (listIndex >= list.size()) {
-				len = fieldName.length();
-				list.add(len);
-			} else {
-				len = (Integer) list.get(listIndex);
-			}
-			if (fieldValue == null) {
-				if (len.intValue() < 4) {
-					len = 4;
-				}
-			} else {
-				int valueLen = fieldValue.toString().length();
-				if (len.intValue() < valueLen) {
-					len = valueLen;
-				}
-			}
-			list.set(listIndex, len);
-			listIndex++;
-		}
-	}
-
-	private static void computeMaxLengths(List list, Object obj, boolean isKey)
-	{
-		Object object = obj;
-		if (object == null) {
-			object = "null";
-		}
-		
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date) 
-		{
-			if (list.size() > 0) {
-				int len = (Integer) list.get(0);
-				if (len < object.toString().length()) {
-					list.set(0, object.toString().length());
-				}
-			} else {
-				if (isKey) {
-					if (object.toString().length() < 3) { // Key
-						list.add(3);
-					} else {
-						list.add(object.toString().length());
-					}
-				} else {
-					if (object.toString().length() < 5) { // Value
-						list.add(5);
-					} else {
-						list.add(object.toString().length());
-					}
-				}
-			}
-
-		} else {
-
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			String name;
-			Object value;
-			int listIndex = 0;
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				try {
-					value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-					Integer len;
-					if (listIndex >= list.size()) {
-						len = name.length() - 3;
-						list.add(len);
-					} else {
-						len = (Integer) list.get(listIndex);
-					}
-					if (value == null) {
-						if (len.intValue() < 4) {
-							len = 4;
-						}
-					} else {
-						int valueLen = value.toString().length();
-						if (len.intValue() < valueLen) {
-							len = valueLen;
-						}
-					}
-					list.set(listIndex, len);
-					listIndex++;
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-
-	private static void printHeaders(List list, StructType structType, Struct struct, int rowMaxLen)
-	{
-		System.out.print(StringUtil.getRightPaddedString("Row", rowMaxLen, ' '));
-		System.out.print("  ");
-
-		ObjectType[] fieldTypes = structType.getFieldTypes();
-		String[] fieldNames = structType.getFieldNames();
-		Object[] fieldValues = struct.getFieldValues();
-
-		int listIndex = 0;
-		for (int i = 0; i < fieldTypes.length; i++) {
-			ObjectType fieldType = fieldTypes[i];
-			String fieldName = fieldNames[i];
-			Object fieldValue = fieldValues[i];
-			fieldValue = getPrintableValue(fieldValue);
-			int maxLen = (Integer) list.get(listIndex);
-			String header = fieldName;
-			System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-			System.out.print("  ");
-			listIndex++;
-		}
-		System.out.println();
-		System.out.print(StringUtil.getRightPaddedString("", rowMaxLen, '-'));
-		System.out.print("  ");
-		listIndex = 0;
-		for (int i = 0; i < fieldTypes.length; i++) {
-			ObjectType fieldType = fieldTypes[i];
-			String fieldName = fieldNames[i];
-			Object fieldValue = fieldValues[i];
-			fieldValue = getPrintableValue(fieldValue);
-			int maxLen = (Integer) list.get(listIndex);
-			String header = fieldName;
-			System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header.length(), '-'),
-					maxLen, ' '));
-			System.out.print("  ");
-			listIndex++;
-		}
-		System.out.println();
-	}
-
-	private static void printHeaders(List list, Object object, int rowMaxLen)
-	{
-		System.out.print(StringUtil.getRightPaddedString("Row", rowMaxLen, ' '));
-		System.out.print("  ");
-		printTopHeaders(list, object, false, "Value");
-		System.out.println();
-		
-		System.out.print(StringUtil.getRightPaddedString("", rowMaxLen, '-'));
-		System.out.print("  ");
-		printBottomHeaders(list, object, false, "Value");
-		System.out.println();
-	}
-	
-	private static String getPrintableType(Object object)
-	{
-		if (isPrintType()) {
-			if (object == null) {
-				return " (N/A)";
-			}
-			return " (" + object.getClass().getSimpleName() + ")";
-		} else {
-			return "";
-		}
-	}
-
-	private static void printStruct(int row, StructType structType, Struct struct, int level)
-	{
-		String spaces = getSpaces(level);
-		String spaces2 = getSpaces(level+1);
-		
-		ObjectType[] fieldTypes = structType.getFieldTypes();
-		String[] fieldNames = structType.getFieldNames();
-		Object[] fieldValues = struct.getFieldValues();
-
-		int listIndex = 0;
-		System.out.println(spaces + row + ".");
-		for (int i = 0; i < fieldTypes.length; i++) {
-			ObjectType fieldType = fieldTypes[i];
-			String fieldName = fieldNames[i];
-			Object fieldValue = fieldValues[i];
-			printObject(fieldName, fieldValue, level+1);
-		}
-	}
-	
-	private static void printObject(int row, String header, Object object, boolean printRow)
-	{
-		printObject(row, header, object, printRow, 1);
-	}
-	
-	private static void printObject(int row, String header, Object object, boolean printRow, int level)
-	{
-		if (printRow) {
-			System.out.print(row + ". ");
-		} else {
-			String rowStr = Integer.toString(row);
-			String spaces = "";
-			for (int i = 0; i < rowStr.length(); i++) {
-				spaces += " ";
-			}
-			System.out.print(spaces + "  ");
-		}
-		if (header == null) {
-			System.out.print(getPrintableType(object));
-		} else {
-			System.out.print(header + getPrintableType(object));
-		}
-		System.out.println();
-		printObject(null, object, level);
-	}
-	
-	private static void printObject(String name, Object obj, int level)
-	{
-		String spaces = getSpaces(level);
-		
-		Object object = obj;
-		if (object == null) {
-			object = "null";
-		}
-		
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date)  
-		{
-			printValue(name, object, level);
-			
-		} else if (object instanceof Map) {
-			printMap(name, (Map)object, level);
-
-		} else if (object instanceof Collection) {
-			printCollection(name, (Collection)object, level);
-			
-		} else if (object instanceof Mappable) {
-			printMappable(name, (Mappable)object, level);
-			
-//			} else if (object instanceof Struct) {
-//				printStruct(name, (Struct)object, level);
-			
-		} else {
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			Object value;
-			int listIndex = 0;
-			ArrayList<String> methodList = new ArrayList();
-			HashMap<String, Method> methodMap = new HashMap();
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				String propertyName = name.substring(3);
-				methodMap.put(propertyName, method);
-				methodList.add(propertyName);
-			}
-			Collections.sort(methodList);
-			for (String propertyName : methodList) {
-				try {
-					method = methodMap.get(propertyName);
-					value = method.invoke(object, (Object[])null);
-					printObject(propertyName, value, level);
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-
-	public static void printList(List resultList)
-	{
-		ArrayList maxLenList = new ArrayList();
-		Object nonNullObject = null;
-		for (int i = 0; i < resultList.size(); i++) {
-			Object object = resultList.get(i);
-			if (object != null) {
-				nonNullObject = object;
-			}
-			computeMaxLengths(maxLenList, object, true); // TODO: true?
-		}
-		if (nonNullObject == null) {
-			return;
-		}
-
-		int rowMax = String.valueOf(resultList.size()).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(maxLenList, nonNullObject, rowMax);
-		for (int i = 0; i < resultList.size(); i++) {
-			Object object = resultList.get(i);
-			System.out.print(StringUtil.getRightPaddedString((i + 1) + "", rowMax, ' '));
-			System.out.print("  ");
-			printObject(maxLenList, object, false);
-			System.out.println();
-		}
-	}
-	
-	public static int printList(List list, int startIndex, int startRowNum, int rowCount, int actualSize, List keyList) throws Exception
-	{
-		if (list == null) {
-			System.out.println("Error: map is null");
-			return 0;
-		}
-
-		HashSet objectNameSet = new HashSet();
-//		HashSet valueNameSet = new HashSet(); //FindBugs - unused
-		Object object = null;
-		
-		int count = 0;
-		int row = startRowNum;
-		int lastRow = startRowNum + rowCount - 1;
-		for (Iterator itr = list.iterator(); count < rowCount && itr.hasNext(); count++) {
-			object = itr.next();
-			objectNameSet.add(object.getClass().getName());
-			printObject(row, "Object", object, true, 2);
-			System.out.println();
-			row++;
-		}
-		System.out.println();
-		System.out.println(" Fetch size: " + rowCount);
-		System.out.println("   Returned: " + (row-1) + "/" + actualSize);
-		for (Object keyName : objectNameSet) {
-			System.out.println("      Class: " + keyName);
-		}
-		return count;
-	}
-	
-	private static void computeMappableMaxLengths(List list, Mappable mappable)
-	{
-		String name;
-		Object value;
-		int listIndex = 0;
-		ArrayList<String> keyList = new ArrayList(mappable.getKeys());
-		Collections.sort(keyList);
-		for (int i = 0; i < keyList.size(); i++) {
-			name = keyList.get(i);
-			value = mappable.getValue(name);
-			value = getPrintableValue(value);
-			Integer len;
-			if (listIndex >= list.size()) {
-				len = name.length();
-				list.add(len);
-			} else {
-				len = (Integer) list.get(listIndex);
-			}
-			if (value == null) {
-				if (len.intValue() < 4) {
-					len = 4;
-				}
-			} else {
-				int valueLen = value.toString().length();
-				if (len.intValue() < valueLen) {
-					len = valueLen;
-				}
-			}
-			list.set(listIndex, len);
-			listIndex++;
-		}
-	}
-	
-	private static void printMappableHeaders(List list, Mappable mappable, int rowMaxLen)
-	{
-		System.out.print(StringUtil.getRightPaddedString("Row", rowMaxLen, ' '));
-		System.out.print("  ");
-		printMappableTopHeaders(list, mappable, false);
-		System.out.println();
-		if (rowMaxLen < 3) {
-			rowMaxLen = 3;
-		}
-		System.out.print(StringUtil.getRightPaddedString("", rowMaxLen, '-'));
-		System.out.print("  ");
-		printMappableBottomHeaders(list, mappable, false);
-		System.out.println();
-	}
-	
-	private static void printMappableTopHeaders(List list, Mappable mappable, 
-			boolean printLastColumnSpaces)
-	{
-		int listIndex = 0;
-		ArrayList<String> keyList = new ArrayList(mappable.getKeys());
-		Collections.sort(keyList);
-		for (int i = 0; i < keyList.size(); i++) {
-			String header = keyList.get(i);
-			int maxLen = (Integer) list.get(listIndex);
-			if (listIndex == list.size() - 1) {
-				if (printLastColumnSpaces) {
-					System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-				} else {
-					System.out.print(header);
-				}
-			} else {
-				System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-				System.out.print("  ");
-			}
-
-			listIndex++;
-		}
-	}
-	
-	private static void printMappableBottomHeaders(List list, Mappable mappable, boolean printLastColumnSpaces)
-	{
-		int listIndex = 0;
-		ArrayList<String> keyList = new ArrayList(mappable.getKeys());
-		Collections.sort(keyList);
-		for (int i = 0; i < keyList.size(); i++) {
-			String header = keyList.get(i);
-			int maxLen = (Integer) list.get(listIndex);
-			if (listIndex == list.size() - 1) {
-				if (printLastColumnSpaces) {
-					System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header
-							.length(), '-'), maxLen, ' '));
-				} else {
-					System.out.print(StringUtil.getRightPaddedString("", header.length(), '-'));
-				}
-			} else {
-				System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header
-						.length(), '-'), maxLen, ' '));
-				System.out.print("  ");
-			}
-			listIndex++;
-		}
-	}
-	
-	private static void printMappable(String name, Mappable mappable, int level)
-	{
-		String spaces = getSpaces(level);
-		int listIndex = 0;
-		ArrayList<String> keyList = new ArrayList(mappable.getKeys());
-		Collections.sort(keyList);
-		for (int i = 0; i < keyList.size(); i++) {
-			String n = keyList.get(i);
-			Object value = mappable.getValue(n);
-			printObject(n, value, level);
-		}
-	}
-	
-	public static void printMappableList(List<Mappable> resultList)
-	{
-		for (int i = 0; i < resultList.size(); i++) {
-			Mappable mappable = resultList.get(i);
-			printObject(i+1, null, mappable, true);
-			System.out.println();
-		}
-	}
-	
-	private static Object getPrintableValue(Object value)
-	{
-		if (value instanceof Byte) {
-			value = ((Byte) value).toString();
-		} else if (value instanceof byte[]) {
-			value = "[B " + ((byte[])value).length;
-		} else if (value instanceof boolean[]) {
-			value = "[Z " + ((boolean[])value).length;
-		} else if (value instanceof short[]) {
-			value = "[S " + ((short[])value).length;
-		} else if (value instanceof int[]) {
-			value = "[I " + ((int[])value).length;
-		} else if (value instanceof long[]) {
-			value = "[J " + ((long[])value).length;
-		} else if (value instanceof float[]) {
-			value = "[F " + ((float[])value).length;
-		} else if (value instanceof double[]) {
-			value = "[D " + ((double[])value).length;
-		}
-//		if (value instanceof Map) {
-//			StringBuffer buffer = printMap(null, (Map)value, new StringBuffer("\n"), 2);
-//			value = buffer.toString();
-//		}
-		return value;
-	}
-	
-	private static void printValue(Object name, Object value, int level)
-	{
-		String spaces = getSpaces(level);
-		Object printableValue = value;
-		if (value instanceof Byte) {
-			printableValue = ((Byte) value).toString();
-		} else if (value instanceof byte[]) {
-			printableValue = "[B " + ((byte[])value).length;
-		} else if (value instanceof boolean[]) {
-			printableValue = "[Z " + ((boolean[])value).length;
-		} else if (value instanceof short[]) {
-			printableValue = "[S " + ((short[])value).length;
-		} else if (value instanceof int[]) {
-			printableValue = "[I " + ((int[])value).length;
-		} else if (value instanceof long[]) {
-			printableValue = "[J " + ((long[])value).length;
-		} else if (value instanceof float[]) {
-			printableValue = "[F " + ((float[])value).length;
-		} else if (value instanceof double[]) {
-			printableValue = "[D " + ((double[])value).length;
-		}
-		if (value instanceof Map) {
-			printMap(name, (Map)value, level);
-		} else {
-			if (name == null) {
-				System.out.println(spaces + printableValue + getPrintableType(value));
-			} else {
-				if (name.toString().startsWith("[")) {
-					System.out.println(spaces + name + " " + printableValue + getPrintableType(value));
-				} else {
-					System.out.println(spaces + name + " = " + printableValue + getPrintableType(value));
-				}
-			}
-		}
-	}
-	
-	private static void printMap(Object name, Map map, int level)
-	{
-		String spaces = getSpaces(level);
-		String spaces2 = getSpaces(level+1);
-				
-		if (name == null) {
-			System.out.println(spaces + "size: " + map.size() + getPrintableType(map));
-		} else {
-			System.out.println(spaces + name + " - size: " + map.size() + getPrintableType(map));
-		}
-		
-		Set<Map.Entry> entrySet = map.entrySet();
-		int count = 0;
-		for (Map.Entry entry : entrySet) {
-			Object key = entry.getKey();
-			Object value = entry.getValue();
-			if (key instanceof Map) {
-				printMap(null, (Map)key, level+1);
-			} else {
-				if (isPrintType()) {
-					if (value == null) {
-						System.out.println(spaces2 + key + " (" + key.getClass().getSimpleName() + ", N/A");
-					} else {
-						System.out.println(spaces2 + key + " (" + key.getClass().getSimpleName() + ", " + value.getClass().getSimpleName() + ")");
-					}
-				} else {
-					System.out.println(spaces2 + key);
-				}
-				printObject(key.toString(), value, level+2);
-			}
-			count++;
-			if (count >= getCollectionEntryPrintCount()) {
-				break;
-			}
-		}
-		if (count < entrySet.size()) {
-			System.out.println(spaces2 + "<" + (entrySet.size() - count) + " more ...>");
-		}
-	}
-	
-	private static void printCollection(Object name, Collection col, int level)
-	{
-		String spaces = getSpaces(level);
-		String spaces2 = getSpaces(level+1);
-		
-//		if (name == null) {
-//			if (isPrintType()) {
-//				System.out.println(spaces + getPrintableType(map));
-//			}
-//		} else {
-//			System.out.println(spaces + name + getPrintableType(map));
-//		}
-		
-		if (name == null) {
-			System.out.println(spaces + "size: " + col.size() + getPrintableType(col));
-		} else {
-			System.out.println(spaces + name + " - size: " + col.size() + getPrintableType(col));
-		}
-		
-
-		int count = 0;
-		for (Object value : col) {
-			if (col instanceof Map) {
-				printMap(null, (Map)value, level+1);
-			} else if (value instanceof Collection) {
-				printCollection(null, (Collection)value, level+1);
-			} else {
-				printObject("[" + count + "]", value, level+1);
-			}
-			count++;
-			if (count >= getCollectionEntryPrintCount()) {
-				break;
-			}
-		}
-		if (count < col.size()) {
-			System.out.println(spaces2 + "<" + (col.size() - count) + " more ...>");
-		}
-	}
-	
-	private static String getSpaces(int level)
-	{
-		String spaces = "";
-		for (int i = 0; i < level; i++) {
-			spaces += "   ";
-		}
-		return spaces;
-	}
-	
-	private static void printObject(List list, Object obj, boolean printLastColumnSpaces)
-	{
-		Object object = obj;
-		if (object == null) {
-			object = "null";
-		}
-		
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date)  
-		{
-			object = getPrintableValue(object);
-			if (list.size() > 0) {
-				int maxLen = (Integer) list.get(0);
-				if (printLastColumnSpaces) {
-					System.out.print(StringUtil.getRightPaddedString(object.toString(), maxLen, ' '));
-				} else {
-					System.out.print(object.toString());
-				}
-			} else {
-				System.out.print(object.toString());
-			}
-
-		} else {
-
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			String name;
-			Object value;
-			int listIndex = 0;
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				try {
-					value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-
-					int maxLen = (Integer) list.get(listIndex);
-					if (listIndex == list.size() - 1) {
-						if (value == null) {
-							if (printLastColumnSpaces) {
-								System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-							} else {
-								System.out.print("null");
-							}
-						} else {
-							if (printLastColumnSpaces) {
-								System.out.print(StringUtil.getRightPaddedString(value.toString(), maxLen, ' '));
-							} else {
-								System.out.print(value.toString());
-							}
-						}
-
-					} else {
-						if (value == null) {
-							System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-						} else {
-							System.out.print(StringUtil.getRightPaddedString(value.toString(), maxLen, ' '));
-						}
-						System.out.print("  ");
-					}
-
-					listIndex++;
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/AbstractCommandTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/AbstractCommandTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/AbstractCommandTask.java
deleted file mode 100644
index 6b31b3c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/AbstractCommandTask.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.command;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-/**
- * AbstractCommandTask provides sendResults() for sending CommandResult
- * objects asynchronously.
- * @author dpark
- *
- */
-public abstract class AbstractCommandTask implements CommandTask 
-{
-	private static final long serialVersionUID = 1L;
-
-	private static final String KEY_RESULTS_DEFAULT = "results";
-	
-	private static final String REGION_NAME_ASYNC = "async";
-	
-	// The default of 2 minute idle time allowed
-	private static int ASYNC_REGION_TIMEOUT = Integer.getInteger("AbstractCommandTask.ASYNC_REGION_TIMEOUT", 120);
-	
-	Region commandRegion;
-	
-	private String resultSetRegionFullPath;
-	
-	protected Region getCommandRegion()
-	{
-		return commandRegion;
-	}
-	
-	public void setCommandRegion(Region commandRegion) {
-	  this.commandRegion = commandRegion;
-  }
-	
-	/**
-	 * Sets the region in which the results to be sent. This is
-	 * invoked by CommandServerManager. Do not invoke it directly.
-	 * @param resultSetRegionFullPath
-	 */
-	/*protected*/public void setResultSetRegionPath(String resultSetRegionFullPath)
-	{
-		this.resultSetRegionFullPath = resultSetRegionFullPath;
-	}
-	
-	/**
-	 * Returns the region used to keep track of asynchronous regions. 
-	 * The command client is allowed to supply an optional inbox region
-	 * with which it may receive results. The server removes these inbox
-	 * regions if they have idle for more that ASYNC_REGION_TIMEOUT. 
-	 * @return the region used to keep track of asynchronous regions
-	 */
-	private Region getAsyncRegion()
-	{
-		Region asyncRegion = getCommandRegion().getSubregion(REGION_NAME_ASYNC);
-		if (asyncRegion == null) {
-			AttributesFactory factory = new AttributesFactory();
-			factory.setStatisticsEnabled(true);
-			factory.setScope(Scope.LOCAL);
-			factory.setDataPolicy(DataPolicy.NORMAL);
-			factory.setEntryIdleTimeout(new ExpirationAttributes(ASYNC_REGION_TIMEOUT, ExpirationAction.LOCAL_DESTROY));
-			factory.addCacheListener(new CacheListenerAdapter() {
-				public void afterDestroy(EntryEvent event)
-				{
-					String regionPath = (String)event.getKey();
-					getCommandRegion().getSubregion(regionPath).destroyRegion();
-				}
-			});
-			try {
-				asyncRegion = getCommandRegion().createSubregion(REGION_NAME_ASYNC, factory.create());
-			} catch (Exception ex) {
-				// in case another thread created it
-				asyncRegion = getCommandRegion().getSubregion(REGION_NAME_ASYNC);
-			}
-		}
-		return asyncRegion;
-	}
-	
-	/**
-	 * Sends the specified results to the client's private inbox region.
-	 * The inbox region is a sub-region of the command region. Invoke
-	 * this method if the results are too large to send synchronously.
-	 * The client must supply a listener using 
-	 * CommandClient.addCommandResultsListener() in order to receive
-	 * the results.
-	 * @param results The results to send to the client.
-	 */
-	protected void sendResults(CommandResults results)
-	{
-		try {
-			Region resultSetRegion = RegionUtil.getRegion(resultSetRegionFullPath, Scope.LOCAL, DataPolicy.EMPTY, null);
-			resultSetRegion.put(KEY_RESULTS_DEFAULT, results);
-			Region asyncRegion = getAsyncRegion();
-			asyncRegion.put(resultSetRegion.getName(), true);
-		} catch (CacheException ex) {
-			Cache cache = CacheFactory.getAnyInstance();
-			cache.getLogger().error(ex);
-		}
-	}
-
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException
-	{
-		resultSetRegionFullPath = DataSerializer.readString(input);
-	}
-
-	public void toData(DataOutput output) throws IOException
-	{
-		DataSerializer.writeString(resultSetRegionFullPath, output);
-	}
-	
-	
-	/**
-	 * Runs this task. A client executes CommandTak by calling
-	 * CommandClient.execute(CommandTask task).
-	 * @param userData The userData optionally provided by the cache server. The
-	 *                 cache server may pass any user data to the command task.
-	 * @return Returns the task results.
-	 */
-	public abstract CommandResults runTask(Object userData);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/CommandResults.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/CommandResults.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/CommandResults.java
deleted file mode 100644
index 1406580..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/CommandResults.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.command;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * CommandResults contains the results obtained from executing a CommandTask. It
- * may also contain error code and/or exception generated by the server.
- * 
- * @author dpark
- * 
- */
-public class CommandResults implements DataSerializable {
-	private static final long serialVersionUID = 1L;
-
-	public static final byte CODE_NORMAL = 0;
-	public static final byte CODE_ERROR = -1;
-
-	private Object key;
-	private Object dataObject;
-	private byte code = CODE_NORMAL;
-	private String codeMessage;
-	// Will need to make it simpler for supporting catching native clients
-	// exception
-	private String exception;
-	
-	/**
-	 * Creates a new CommandResults. CommandResults.setDataObject() to set the
-	 * data object that contains the task results.
-	 */
-	public CommandResults() {
-	}
-
-	/**
-	 * Creates a new CommandResults object with the data object contains
-	 * results.
-	 * 
-	 * @param dataObject
-	 *            The data object that contains the task results.
-	 */
-	public CommandResults(Object dataObject) {
-		this.dataObject = dataObject;
-	}
-
-	/**
-	 * Returns the results set by CommandTask.
-	 */
-	public Object getDataObject() {
-		return dataObject;
-	}
-
-	/**
-	 * Returns the code set by the CommandTask. It is typically used for sending
-	 * error code. The default value is 0.
-	 * 
-	 * @return code 
-	 *///FIXME: java docs @return
-	public byte getCode() {
-		return code;
-	}
-
-	public void setCode(byte code) {
-		this.code = code;
-	}
-
-	/**
-	 * Returns the message associated with the code. The default value is null.
-	 */
-	public String getCodeMessage() {
-		return codeMessage;
-	}
-
-	public void setCodeMessage(String codeMessage) {
-		this.codeMessage = codeMessage;
-	}
-
-	public void setKey(Object key) {
-		this.key = key;
-	}
-
-	public Object getKey() {
-		return key;
-	}
-
-	/**
-	 * Returns the server exception if any.
-	 */
-	public Throwable getException() {
-		return new Throwable(exception);
-	}
-
-	public void setException(Throwable exception) {
-		this.exception = exception.getMessage();
-	}
-
-	public void setDataObject(Object dataObject) {
-		this.dataObject = dataObject;
-	}
-
-	public void toData(DataOutput out) throws IOException {
-		out.writeByte(code);
-		DataSerializer.writeObject(codeMessage, out);
-		DataSerializer.writeObject(dataObject, out);
-		DataSerializer.writeObject(exception, out);
-	}
-
-	public void fromData(DataInput in) throws IOException,
-			ClassNotFoundException {
-		code = in.readByte();
-		codeMessage = (String)DataSerializer.readObject(in);
-		dataObject = DataSerializer.readObject(in);
-		exception = (String)DataSerializer.readObject(in);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/CommandTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/CommandTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/CommandTask.java
deleted file mode 100644
index c942faf..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/command/CommandTask.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.command;
-
-import com.gemstone.gemfire.DataSerializable;
-
-/**
- * CommandTask is an interface that must be implemented for executing
- * command task. The server invokes CommandTask.runTask() and returns
- * its results to the client.
- * @author dpark
- *
- */
-public interface CommandTask extends DataSerializable
-{	
-	/**
-	 * Runs this task. A client executes CommandTak by calling
-	 * CommandClient.execute(CommandTask task).
-	 * @param userData The userData optionally provided by the cache server. The
-	 *                 cache server may pass any user data to the command task.
-	 * @return Returns the task results.
-	 */
-    public CommandResults runTask(Object userData);
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/util/RegionUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/util/RegionUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/util/RegionUtil.java
deleted file mode 100644
index 5dd89d9..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/util/RegionUtil.java
+++ /dev/null
@@ -1,829 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.util;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import com.gemstone.gemfire.admin.AdminDistributedSystem;
-import com.gemstone.gemfire.admin.AdminDistributedSystemFactory;
-import com.gemstone.gemfire.admin.AdminException;
-import com.gemstone.gemfire.admin.CacheVm;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.admin.SystemMember;
-import com.gemstone.gemfire.admin.SystemMemberCache;
-import com.gemstone.gemfire.admin.SystemMemberRegion;
-import com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.util.BridgeClient;
-import com.gemstone.gemfire.cache.util.BridgeLoader;
-import com.gemstone.gemfire.cache.util.BridgeWriter;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-
-
-/**
- * <p>Copyright: Copyright (c) 2005</p>
- * <p>Company: GemStone Systems, Inc.</p>
- * @author Dae Song Park
- * @version 1.0
- */
-public class RegionUtil
-{
-    /**
-     * Creates a subregion of the specified parentRegion.
-     * @param parentRegion The parent region. If null, it creates a top-level
-     *                     region.
-     * @param regionName The subregion name
-     * @param scope The scope
-     * @param dataPolicy The data policy
-     * @param listener The cache listener
-     * @throws OrderManagerException Thrown if it is unable to create the region.
-     */
-    public static Region createRegion(Region parentRegion, String regionName, Scope scope,
-    		DataPolicy dataPolicy, CacheListener listener)
-                               throws CacheException
-    {
-        return createRegion(parentRegion, regionName, scope, dataPolicy, listener, null, null);
-    }
-
-    public static Region createRegion(Region parentRegion, String regionName, Scope scope,
-                                      DataPolicy dataPolicy, CacheListener listener,
-                                      File[] persistenceDirs, EvictionAttributes evictionAttributes)
-                               throws CacheException
-    {
-    	return createRegion(parentRegion, regionName, scope, dataPolicy, listener, persistenceDirs, evictionAttributes, null);
-    }
-    
-    public static Region createRegion(Region parentRegion, String regionName, Scope scope,
-            DataPolicy dataPolicy, CacheListener listener,
-            File[] persistenceDirs, EvictionAttributes evictionAttributes, String endpoints)
-     throws CacheException
-	{
-    	Region region = parentRegion.getSubregion(regionName);
-    	if (region != null) {
-    		return region;
-    	}
-        AttributesFactory factory = new AttributesFactory();
-
-        factory.setScope(scope);
-        factory.setDataPolicy(dataPolicy);
-        if (listener != null) {
-        	factory.addCacheListener(listener);
-        }
-
-        if (persistenceDirs != null) {
-            factory.setDiskDirs(persistenceDirs);
-        }
-
-        factory.setEvictionAttributes(evictionAttributes);
-        
-        if (endpoints != null) {
-            BridgeWriter bridgeWriter = new BridgeWriter();
-            Properties prop = new Properties();
-            prop.setProperty("endpoints", endpoints);
-            prop.setProperty("establishCallbackConnection", "true");
-            bridgeWriter.init(prop);
-            factory.setCacheWriter(bridgeWriter);
-            
-            BridgeLoader bridgeLoader = new BridgeLoader();
-            prop = new Properties();
-            prop.setProperty("endpoints", endpoints);
-            bridgeLoader.init(prop);
-            factory.setCacheLoader(bridgeLoader);
-        }
-
-        RegionAttributes attr = factory.create();
-
-        return parentRegion.createSubregion(regionName, attr);
-	}
-
-    public static Region createVMRegion(Cache cache, String regionName, Scope scope,
-                                        DataPolicy dataPolicy, CacheListener listener)
-                                 throws CacheException
-    {
-        AttributesFactory factory = new AttributesFactory();
-
-        factory.setScope(scope);
-        factory.setDataPolicy(dataPolicy);
-        if (listener != null) {
-        	factory.addCacheListener(listener);
-        }
-
-        RegionAttributes attr = factory.create();
-
-        return cache.createRegion(regionName, attr);
-    }
-    
-    /**
-     * Returns the parent region of the specified path.
-     * @param regionPath The region path.
-     * @return the parent region of the specified path.
-     */
-    public static Region getParentRegion(String regionPath)
-    {
-    	if (regionPath == null) {
-    		return null;
-    	}
-    	
-    	Cache cache = CacheFactory.getAnyInstance();
-    	String split[];
-    	if (regionPath.startsWith("/")) {
-    		split = regionPath.substring(1).split("/");
-    	} else {
-    		split = regionPath.split("/");
-    	}
-    	if (split.length == 0) {
-    		return null;
-    	}
-    	Region region = cache.getRegion(split[0]);
-    	if (region != null) {
-    		int i;
-	    	for (i = 1; i < split.length; i++) {
-	    		Region subregion = region.getSubregion(split[i]);
-	    		if (subregion == null) {
-	    			break;
-	    		}
-	    		region = subregion;
-	    	}
-	    	if (i != split.length - 1) {
-	    		region = null;
-	    	}
-    	}
-    	return region;
-    }
-    
-    /**
-     * Returns the last region
-     * @param regionPath
-     * @return the last region
-     */
-    public static Region getLastRegionInPath(String regionPath)
-    {
-    	if (regionPath == null) {
-    		return null;
-    	}
-    	
-    	Cache cache = CacheFactory.getAnyInstance();
-    	String split[] = regionPath.split("/");
-    	if (split.length == 0) {
-    		return null;
-    	}
-    	
-    	Region region = cache.getRegion(split[0]);
-    	if (region != null) {
-	    	for (int i = 1; i < split.length; i++) {
-	    		Region subregion = region.getSubregion(split[i]);
-	    		if (subregion == null) {
-	    			break;
-	    		}
-	    		region = subregion;
-	    	}
-    	}
-    	return region;
-    }
-    
-    /**
-     * Returns the specified region. It creates one if it does not exist.
-     * @param regionPath
-     * @param scope
-     * @param mirrorType
-     * @param endpoints
-     * @return Returns the specified region. It creates one if it does not exist.
-     * @deprecated Use #getRegion(String regionPath, Scope scope, DataPolicy dataPolicy, String endpoints) instead
-     */
-    public static Region getRegion(String regionPath, Scope scope, MirrorType mirrorType, String endpoints)
-    {
-    	DataPolicy dataPolicy;
-    	if (mirrorType == MirrorType.KEYS || mirrorType == MirrorType.KEYS_VALUES) {
-    		dataPolicy = DataPolicy.REPLICATE;
-    	} else if (mirrorType == MirrorType.NONE) {
-    		dataPolicy = DataPolicy.NORMAL;
-    	} else {
-    		dataPolicy = DataPolicy.DEFAULT;
-    	}
-    	return getRegion(regionPath, scope, dataPolicy, endpoints);
-    }
-    
-    // nk94960
-    public static Region getRegion(String regionPath, Scope scope, DataPolicy dataPolicy, String endpoints)
-      throws CacheException
-      {
-        return getRegion(regionPath, scope, dataPolicy, endpoints, false, null);
-      }
-
-    //nk94960
-    public static Region getRegion(String regionPath, Scope scope, DataPolicy dataPolicy, String endpoints, boolean enableBridgeConflation)
-      throws CacheException
-      {
-        return getRegion(regionPath, scope, dataPolicy, endpoints, enableBridgeConflation, null);
-
-      }
-    
-    /**
-     * Returns the region specified. It creates a new region if it does not
-     * exist.
-     * 
-     * The following system properties are used to create BridgeLoader and
-     * BridgeWriter for the region if endpoints is specified (i.e., if enpoints
-     * is not null.) 
-     * <p>
-     * <li>readTimeout (optional: default 10000)</li>
-	 * <li>allowableServerTimeouts (optional: default 7 timeouts)</li> 
-	 * <li>allowableServerTimeoutPeriod (optional: default: 10000 milliseconds)</li> 
-	 * <li>retryAttempts (optional: default 5)</li> 
-	 * <li>retryInterval (optional: default 10000)</li>
-	 * <li>LBPolicy (optional: default "Sticky")</li>
-	 * <li>connectionsPerServer (optional: default 2)</li>
-	 * <li>socketBufferSize (optional: default 32768)</li>
-	 * <p>
-     * 
-     * @param regionPath
-     * @param scope
-     * @param dataPolicy
-     * @param endpoints
-     * @param enableBridgeConflation
-     * @return the region specified
-     * @throws CacheException
-     */
-    public static Region getRegion(String regionPath, Scope scope, DataPolicy dataPolicy, String endpoints, boolean enableBridgeConflation, String diskDir) //nk94960
-    throws CacheException
-    {
-      Cache cache = null;
-      Region region = null;
-
-      try {
-	cache = CacheFactory.getAnyInstance();
-	region = cache.getRegion(regionPath);
-
-	if (region != null) {
-	  return region;
-	}
-      } catch (CacheClosedException ex) {
-	Properties props = new Properties();
-	DistributedSystem system = DistributedSystem.connect(props);
-	cache = CacheFactory.create(system);
-      }
-
-      // Parse region path
-      StringTokenizer st = new StringTokenizer(regionPath, "/");
-      String regionName;
-      int index = 0;
-      int count = st.countTokens();
-      AttributesFactory factory = new AttributesFactory();
-      factory.setDataPolicy(DataPolicy.NORMAL);
-
-      while (st.hasMoreTokens()) {
-	regionName = st.nextToken();
-	index++;
-            
-	if (index == count) {
-	  factory.setDataPolicy(dataPolicy);
-
-	  if (endpoints != null) {
-	    String establishCallbackConnection = System.getProperty("establishCallbackConnection", "true");
-	    Long readTimeout = Long.getLong("readTimeout", 10000);
-	    Integer allowableServerTimeouts = Integer.getInteger("allowableServerTimeouts", 7);
-	    Long allowableServerTimeoutPeriod  = Long.getLong("allowableServerTimeoutPeriod ", 10000);
-	    Integer retryAttempts = Integer.getInteger("retryAttempts", 5);
-	    Long retryInterval = Long.getLong("retryInterval", 10000);
-	    String lbPolicy = System.getProperty("LBPolicy", "Sticky");
-	    Integer connectionsPerServer = Integer.getInteger("connectionsPerServer", 2);
-	    Integer socketBufferSize  = Integer.getInteger("socketBufferSize ", 32768);
-	    BridgeClient bridgeClient = new BridgeClient();
-	    Properties prop = new Properties();
-	    prop.setProperty("endpoints", endpoints);
-	    prop.setProperty("establishCallbackConnection", establishCallbackConnection);
-	    prop.setProperty("readTimeout", readTimeout.toString());
-	    prop.setProperty("allowableServerTimeouts", allowableServerTimeouts.toString());
-	    prop.setProperty("allowableServerTimeoutPeriod ", allowableServerTimeoutPeriod.toString());
-	    prop.setProperty("retryAttempts", retryAttempts.toString());
-	    prop.setProperty("retryInterval", retryInterval.toString());
-	    prop.setProperty("LBPolicy", lbPolicy);
-	    prop.setProperty("connectionsPerServer", connectionsPerServer.toString());
-	    prop.setProperty("socketBufferSize", socketBufferSize.toString());
-	    bridgeClient.init(prop);
-	    factory.setCacheLoader(bridgeClient);
-	  } else {
-	    factory.setEnableBridgeConflation(enableBridgeConflation);
-	    factory.setEnableAsyncConflation(enableBridgeConflation);
-	  }
-	}
-
-	if (index == 1) {
-	  region = cache.getRegion(regionName);
-
-	  if (region == null) {
-	    factory.setScope(scope);
-	    //nk94960
-	    if(diskDir != null){
-	      File[] dirs = new File[1];
-	      dirs[0] = new File(diskDir);
-					   
-	      factory.setDiskDirs(dirs);
-	    }
-	    region = cache.createRegion(regionName, factory.create());
-	  }
-	} else {
-	  Region subregion = region.getSubregion(regionName);
-	  if (subregion == null) {
-	    factory.setScope(scope);
-	    //nk94960
-	    if(diskDir != null){
-	      File[] dirs = new File[1];
-	      dirs[0] = new File(diskDir);
-					   
-	      factory.setDiskDirs(dirs);
-	    }
-	    subregion = region.createSubregion(regionName, factory.create());
-	  }
-
-	  region = subregion;
-	}
-      }
-
-      return region;
-    }
-
-    public static Region getRegion(String regionPath, DataPolicy dataPolicy)
-                            throws CacheException
-    {
-        return getRegion(regionPath, Scope.DISTRIBUTED_NO_ACK, dataPolicy, null);
-    }
-
-    public static Region getRegion(String regionPath) throws CacheException
-    {
-        return getRegion(regionPath, Scope.DISTRIBUTED_NO_ACK, DataPolicy.NORMAL, null);
-    }
-    
-    public static Region getRegion(String regionPath, Scope scope, DataPolicy dataPolicy, Pool pool,
-			boolean enableBridgeConflation) throws CacheException
-	{
-		Cache cache = null;
-		Region region = null;
-
-		try {
-			cache = CacheFactory.getAnyInstance();
-			region = cache.getRegion(regionPath);
-
-			if (region != null) {
-				return region;
-			}
-		} catch (CacheClosedException ex) {
-			Properties props = new Properties();
-			DistributedSystem system = DistributedSystem.connect(props);
-			cache = CacheFactory.create(system);
-		}
-
-		// Parse region path
-		StringTokenizer st = new StringTokenizer(regionPath, "/");
-		String regionName;
-		int index = 0;
-		int count = st.countTokens();
-		AttributesFactory factory = new AttributesFactory();
-		factory.setDataPolicy(DataPolicy.NORMAL);
-
-		while (st.hasMoreTokens()) {
-			regionName = st.nextToken();
-			index++;
-
-			if (index == count) {
-				factory.setDataPolicy(dataPolicy);
-				factory.setPoolName(pool.getName());
-			}
-
-			if (index == 1) {
-				region = cache.getRegion(regionName);
-
-				if (region == null) {
-					factory.setScope(scope);
-					region = cache.createRegion(regionName, factory.create());
-				}
-			} else {
-				Region subregion = region.getSubregion(regionName);
-				if (subregion == null) {
-					factory.setScope(scope);
-					subregion = region.createSubregion(regionName, factory.create());
-				}
-
-				region = subregion;
-			}
-		}
-
-		return region;
-	}
-
-    /**
-     * Returns a sorted list of all region full paths found in the specified
-     * distributed system.
-     * @param ds The distributed system to search.
-     * @return Returns a sorted list of all region paths defined in the 
-     *         distributed system.  
-     */
-    public static List getAllRegionPathListInDistributedSystem(DistributedSystem ds, boolean recursive)
-    {
-    	List list = new ArrayList();
-    	try {
-    		// members 
-    		AdminDistributedSystem adminSystem = getAdminDistributedSystemConnected(ds);
-            SystemMember[] members = adminSystem.getSystemMemberApplications();
-            for (int i = 0; i < members.length; i++) {
-                SystemMemberCache cache = members[i].getCache();
-                
-                if (cache != null) {
-                	list = getRegionPaths(cache, list, recursive);
-                }
-            }
-            
-            // cache servers
-            CacheVm[] vms = adminSystem.getCacheVms();
-            for (int i = 0; i < vms.length; i++) {
-            	SystemMemberCache cache = vms[i].getCache();
-            	if (cache != null) {
-                	list = getRegionPaths(cache, list, recursive);
-                }
-			}
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        
-        Collections.sort(list);
-        return list;
-    }
-    
-    /**
-     * Returns a sorted String array of all region full paths found in the specified
-     * distributed system.
-     * @param ds The distributed system to search.
-     * @return Returns a String array of all region paths defined in the 
-     *         distributed system.  
-     */
-    public static String[] getAllRegionPathsInDistributedSystem(DistributedSystem ds, boolean recursive)
-    {
-    	List list = getAllRegionPathListInDistributedSystem(ds, recursive);
-        return (String[])list.toArray(new String[0]);
-    }
-    
-    public static List getRegionPathList(SystemMemberCache cache, boolean recursive)
-			throws Exception
-	{
-    	return getRegionPaths(cache, new ArrayList(), recursive);
-	}
-    
-    public static String[] getRegionPaths(SystemMemberCache cache, boolean recursive)
-			throws Exception
-	{
-    	List list = getRegionPathList(cache, recursive);
-    	return (String[])list.toArray(new String[0]);
-	}
-    
-    private static List getRegionPaths(SystemMemberCache cache, List list, boolean recursive)
-    					throws Exception
-	{
-		// get a list of all root regions
-		Set regions = cache.getRootRegionNames();
-		Iterator itor = regions.iterator();
-		
-		while (itor.hasNext()) {
-			String regionPath = "/" + itor.next().toString();
-			
-			SystemMemberRegion systemMemberRegion = cache.getRegion(regionPath);
-			if (list.contains(regionPath) == false) {
-				list.add(regionPath);
-			}
-			if (recursive && systemMemberRegion.getSubregionCount() > 0) {
-				getRegionPaths(systemMemberRegion, cache, list);
-			}
-		}
-		return list;
-	}
-    
-    private static List getRegionPaths(SystemMemberRegion systemMemberRegion, SystemMemberCache cache, List list, boolean recursive) throws Exception
-	{
-		// get a list of all root regions
-		Set regionNames = systemMemberRegion.getSubregionNames();
-		list.addAll(regionNames);
-
-		Iterator itor = regionNames.iterator();
-		while (itor.hasNext()) {
-			String regionPath = (String)itor.next();
-			if (list.contains(regionPath) == false) {
-				list.add(regionPath);
-			}
-			SystemMemberRegion subregion = cache.getRegion(regionPath);
-			if (recursive && subregion != null && subregion.getSubregionCount() > 0) {
-				list = getRegionPaths(subregion, cache, list, recursive);
-			}
-		}
-		return list;
-	}
-    
-    private static List getRegionPaths(SystemMemberRegion systemMemberRegion, SystemMemberCache cache, List list)
-	     				throws Exception
-	{
-		// get a list of all subregions
-		Set subregions = systemMemberRegion.getSubregionFullPaths();
-		Iterator itor = subregions.iterator();
-		
-		while (itor.hasNext()) {
-			String regionPath = itor.next().toString();
-			if (list.contains(regionPath) == false) {
-				list.add(regionPath);
-			}
-			
-			SystemMemberRegion subregion = cache.getRegion(regionPath);
-			
-			if (subregion != null && subregion.getSubregionCount() > 0) {
-				getRegionPaths(subregion, cache, list);
-			}
-		}
-		return list;
-	}
-    
-    public static List getAllRegionPathList(Cache cache)
-    {
-    	return getAllRegionPathList(cache, true);
-    }
-    
-    /**
-     * Returns a sorted list of all region full paths found in the specified
-     * cache.
-     * @param cache The cache to search.
-     * @return Returns a sorted list of all region paths defined in the 
-     *         distributed system.  
-     */
-    public static List getAllRegionPathList(Cache cache, boolean recursive)
-    {
-    	ArrayList list = new ArrayList();
-    	if (cache == null) {
-    		return list;
-    	}
-    	
-    	// get a list of all root regions
-		Set regions = cache.rootRegions();
-		Iterator itor = regions.iterator();
-
-		while (itor.hasNext()) {
-			String regionPath = ((Region)itor.next()).getFullPath();
-
-			Region region = cache.getRegion(regionPath);
-			list.add(regionPath);
-			Set subregionSet = region.subregions(true);
-			if (recursive) {
-				for (Iterator subIter = subregionSet.iterator(); subIter.hasNext(); ){
-					list.add(((Region)subIter.next()).getFullPath());
-				}
-			}
-		}
-		Collections.sort(list);
-		return list;
-    }
-    
-    public static String[] getAllRegionPaths(Cache cache)
-    {
-    	return getAllRegionPaths(cache, true);
-    }
-    
-    /**
-     * Returns a sorted String array of all region full paths found in the specified
-     * cache.
-     * @param cache The cache to search.
-     * @return Returns a sorted String array of all region paths defined in the 
-     *         distributed system.  
-     */
-    public static String[] getAllRegionPaths(Cache cache, boolean recursive)
-    {
-    	List list = getAllRegionPathList(cache, recursive);
-        return (String[])list.toArray(new String[0]);
-    }
-    
-    public static List getAllRegionPathList(Region region, boolean recursive)
-    {
-    	List list = new ArrayList();
-    	if (region == null) {
-    		return list;
-    	}
-    	
-    	Set subregionSet = region.subregions(true);
-		if (recursive) {
-			for (Iterator subIter = subregionSet.iterator(); subIter.hasNext(); ){
-				list.add(((Region)subIter.next()).getFullPath());
-			}
-		}
-		
-        Collections.sort(list);
-        return list;
-    }
-    
-    public static String[] getAllRegionPaths(Region region, boolean recursive)
-    {
-    	List list = getAllRegionPathList(region, recursive);
-        return (String[])list.toArray(new String[0]);
-    }
- 
-    public static List getAllRegionPathListInDistributedSystem(Region region, boolean recursive)
-    {
-    	DistributedSystem ds = region.getCache().getDistributedSystem();
-    	String regionPath = region.getFullPath();
-    	List list = new ArrayList();
-    	try {
-    		AdminDistributedSystem adminSystem = getAdminDistributedSystemConnected(ds);
-            SystemMember[] members = adminSystem.getSystemMemberApplications();
-            
-            for (int i = 0; i < members.length; i++) {
-                SystemMemberCache cache = members[i].getCache();
-
-                if (cache != null) {
-                	SystemMemberRegion sregion = cache.getRegion(regionPath);
-                	list = getRegionPaths(sregion, cache, list, recursive);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        
-        Collections.sort(list);
-        return list;
-    }
-    
-    /*
-     * Returns a sorted String array of all region full paths found in the specified
-     * distributed system.
-     * @param ds The distributed system to search.
-     * @return Returns a String array of all region paths defined in the 
-     *         distributed system.  
-     *///FIXME: Java Docs needs serious fixing.
-    public static String[] getAllRegionPathsInDistributedSystem(Region region, boolean recursive)
-    {
-    	List list = getAllRegionPathListInDistributedSystem(region, recursive);
-        return (String[])list.toArray(new String[0]);
-    }
-    
-    public static AdminDistributedSystem getAdminDistributedSystemConnected(DistributedSystem ds) throws AdminException
-    {
-    	AdminDistributedSystem adminSystem = AdminDistributedSystemImpl.getConnectedInstance();
-		if (adminSystem == null) {
-            DistributedSystemConfig config = AdminDistributedSystemFactory.defineDistributedSystem(ds, null);
-            adminSystem = AdminDistributedSystemFactory.getDistributedSystem(config);
-		}
-        
-        try {
-        	if (adminSystem.isConnected() == false) {
-        		adminSystem.connect();
-        	}
-        } catch (Exception ex) {
-        	// ignore
-        }
-        return adminSystem;
-    }
-    
-
-    /**
-     * Creates the entire regions found in the distributed system.
-     * @param ds
-     * @param scope
-     */
-    public static void createAllRegionsInDistributedSystem(DistributedSystem ds, Scope scope)
-    {
-        try {
-            AdminDistributedSystem adminSystem = getAdminDistributedSystemConnected(ds);
-            SystemMember[] members = adminSystem.getSystemMemberApplications();
-
-            for (int i = 0; i < members.length; i++) {
-                SystemMemberCache cache = members[i].getCache();
-
-                if (cache != null) {
-                    createCache(cache, scope);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public static void createAllRegionsInCacheServers(DistributedSystem ds, Scope scope)
-    {
-        try {
-        	AdminDistributedSystem adminSystem = getAdminDistributedSystemConnected(ds);
-            CacheVm[] cacheVms = adminSystem.getCacheVms();
-
-            for (int i = 0; i < cacheVms.length; i++) {
-                SystemMemberCache cache = cacheVms[i].getCache();
-
-                if (cache != null) {
-                    createCache(cache, scope);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    private static void createCache(SystemMemberCache cache, Scope scope)
-                      throws Exception
-    {
-        // get a list of all root regions
-        Set regions = cache.getRootRegionNames();
-        Iterator itor = regions.iterator();
-        Scope regionScope;
-
-        while (itor.hasNext()) {
-            String regionName = itor.next().toString();
-
-            SystemMemberRegion systemMemberRegion = cache.getRegion(regionName);
-
-            if (scope == null) {
-                regionScope = systemMemberRegion.getScope();
-            } else {
-                regionScope = scope;
-            }
-
-            Region region = getRegion(systemMemberRegion.getFullPath(), regionScope, DataPolicy.NORMAL, null);
-
-            if (systemMemberRegion.getSubregionCount() > 0) {
-                createRegion(region, systemMemberRegion, cache, scope);
-            }
-        }
-    }
-
-    private static void createRegion(Region region, SystemMemberRegion systemMemberRegion,
-                              SystemMemberCache cache, Scope scope)
-                       throws Exception
-    {
-        // get a list of all subregions
-        Set subregions = systemMemberRegion.getSubregionFullPaths();
-        Iterator itor = subregions.iterator();
-
-        while (itor.hasNext()) {
-            String regionName = itor.next().toString();
-
-            SystemMemberRegion subregion = cache.getRegion(regionName);
-            region = getRegion(systemMemberRegion.getFullPath(), scope, DataPolicy.NORMAL, null);
-
-            if (subregion.getSubregionCount() > 0) {
-                createRegion(region, subregion, cache, scope);
-            }
-        }
-    }
-    
-    /**
-     * Locally clears the specified region. 
-     * @param region The region to be cleared.
-     * @throws CacheException Thrown if it encounters a cache error.
-     */
-    public final static void clearLocalRegion(Region region) throws CacheException
-    {
-    	if (region == null) {
-    		return;
-    	}
-        for (Iterator iterator = region.keySet().iterator(); iterator.hasNext();) {
-            try {
-            	region.localDestroy(iterator.next());
-            } catch (EntryNotFoundException ex) {
-            	// ignore all exceptions, especially, EntryNotFoundException
-            }
-        }
-    }
-    
-    /**
-     * Clears the distributed region.
-     * @param region The region to be cleared.
-     * @throws CacheException
-     */    
-    public final static void clearRegion(Region region) throws CacheException
-	{	
-    	if (region == null) {
-    		return;
-    	}
-    	
-    	region.clear();
-	}
-
-    public static Region<?,?> getLocalRegion(String regionPath){
-      Region<?,?> region = null;
-      try{
-        Cache cache = CacheFactory.getAnyInstance();
-        region = cache.getRegion(regionPath);
-      }catch(CacheClosedException cce){
-        region = null;
-      }
-      return region;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
index 5215c90..5a9cd77 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
@@ -13,7 +13,6 @@ import com.gemstone.gemfire.internal.AvailablePort;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.tools.gfsh.app.commands.key;
 import com.gemstone.gemfire.cache30.BridgeTestCase;
 import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
 import com.gemstone.gemfire.cache.client.*;


[37/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/README
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/README b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/README
new file mode 100644
index 0000000..2d7cdcf
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/README
@@ -0,0 +1,68 @@
+JSON in Java [package com.vmware.gemfire.tools.pulse.internal.json]
+
+Douglas Crockford
+douglas@crockford.com
+
+2011-02-02
+
+
+JSON is a light-weight, language independent, data interchange format.
+See http://www.JSON.org/
+
+The files in this package implement JSON encoders/decoders in Java. 
+It also includes the capability to convert between JSON and XML, HTTP 
+headers, Cookies, and CDL. 
+
+This is a reference implementation. There is a large number of JSON packages
+in Java. Perhaps someday the Java community will standardize on one. Until 
+then, choose carefully.
+
+The license includes this restriction: "The software shall be used for good, 
+not evil." If your conscience cannot live with that, then choose a different
+package.
+
+The package compiles on Java 1.2 thru Java 1.4.
+
+
+JSONObject.java: The JSONObject can parse text from a String or a JSONTokener
+to produce a map-like object. The object provides methods for manipulating its
+contents, and for producing a JSON compliant object serialization.
+
+JSONArray.java: The JSONObject can parse text from a String or a JSONTokener
+to produce a vector-like object. The object provides methods for manipulating 
+its contents, and for producing a JSON compliant array serialization.
+
+JSONTokener.java: The JSONTokener breaks a text into a sequence of individual
+tokens. It can be constructed from a String, Reader, or InputStream.
+
+JSONException.java: The JSONException is the standard exception type thrown
+by this package.
+
+
+JSONString.java: The JSONString interface requires a toJSONString method, 
+allowing an object to provide its own serialization.
+
+JSONStringer.java: The JSONStringer provides a convenient facility for 
+building JSON strings.
+
+JSONWriter.java: The JSONWriter provides a convenient facility for building 
+JSON text through a writer.
+ 
+
+CDL.java: CDL provides support for converting between JSON and comma
+delimited lists.
+
+Cookie.java: Cookie provides support for converting between JSON and cookies.
+
+CookieList.java: CookieList provides support for converting between JSON and
+cookie lists.
+
+HTTP.java: HTTP provides support for converting between JSON and HTTP headers.
+
+HTTPTokener.java: HTTPTokener extends JSONTokener for parsing HTTP headers.
+
+XML.java: XML provides support for converting between JSON and XML.
+
+JSONML.java: JSONML provides support for converting between JSONML and XML.
+
+XMLTokener.java: XMLTokener extends JSONTokener for parsing XML text.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/XML.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/XML.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/XML.java
new file mode 100644
index 0000000..a22a6a0
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/XML.java
@@ -0,0 +1,508 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.util.Iterator;
+
+
+/**
+ * This provides static methods to convert an XML text into a JSONObject,
+ * and to covert a JSONObject into an XML text.
+ * @author JSON.org
+ * @version 2011-02-11
+ */
+public class XML {
+
+    /** The Character '&'. */
+    public static final Character AMP   = new Character('&');
+
+    /** The Character '''. */
+    public static final Character APOS  = new Character('\'');
+
+    /** The Character '!'. */
+    public static final Character BANG  = new Character('!');
+
+    /** The Character '='. */
+    public static final Character EQ    = new Character('=');
+
+    /** The Character '>'. */
+    public static final Character GT    = new Character('>');
+
+    /** The Character '<'. */
+    public static final Character LT    = new Character('<');
+
+    /** The Character '?'. */
+    public static final Character QUEST = new Character('?');
+
+    /** The Character '"'. */
+    public static final Character QUOT  = new Character('"');
+
+    /** The Character '/'. */
+    public static final Character SLASH = new Character('/');
+
+    /**
+     * Replace special characters with XML escapes:
+     * <pre>
+     * &amp; <small>(ampersand)</small> is replaced by &amp;amp;
+     * &lt; <small>(less than)</small> is replaced by &amp;lt;
+     * &gt; <small>(greater than)</small> is replaced by &amp;gt;
+     * &quot; <small>(double quote)</small> is replaced by &amp;quot;
+     * </pre>
+     * @param string The string to be escaped.
+     * @return The escaped string.
+     */
+    public static String escape(String string) {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0, length = string.length(); i < length; i++) {
+            char c = string.charAt(i);
+            switch (c) {
+            case '&':
+                sb.append("&amp;");
+                break;
+            case '<':
+                sb.append("&lt;");
+                break;
+            case '>':
+                sb.append("&gt;");
+                break;
+            case '"':
+                sb.append("&quot;");
+                break;
+            case '\'':
+                sb.append("&apos;");
+                break;
+            default:
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+    
+    /**
+     * Throw an exception if the string contains whitespace. 
+     * Whitespace is not allowed in tagNames and attributes.
+     * @param string
+     * @throws JSONException
+     */
+    public static void noSpace(String string) throws JSONException {
+        int i, length = string.length();
+        if (length == 0) {
+            throw new JSONException("Empty string.");
+        }
+        for (i = 0; i < length; i += 1) {
+            if (Character.isWhitespace(string.charAt(i))) {
+                throw new JSONException("'" + string + 
+                        "' contains a space character.");
+            }
+        }
+    }
+
+    /**
+     * Scan the content following the named tag, attaching it to the context.
+     * @param x       The XMLTokener containing the source string.
+     * @param context The JSONObject that will include the new material.
+     * @param name    The tag name.
+     * @return true if the close tag is processed.
+     * @throws JSONException
+     */
+    private static boolean parse(XMLTokener x, JSONObject context,
+                                 String name) throws JSONException {
+        char       c;
+        int        i;
+        JSONObject jsonobject = null;
+        String     string;
+        String     tagName;
+        Object     token;
+
+// Test for and skip past these forms:
+//      <!-- ... -->
+//      <!   ...   >
+//      <![  ... ]]>
+//      <?   ...  ?>
+// Report errors for these forms:
+//      <>
+//      <=
+//      <<
+
+        token = x.nextToken();
+
+// <!
+
+        if (token == BANG) {
+            c = x.next();
+            if (c == '-') {
+                if (x.next() == '-') {
+                    x.skipPast("-->");
+                    return false;
+                }
+                x.back();
+            } else if (c == '[') {
+                token = x.nextToken();
+                if ("CDATA".equals(token)) {
+                    if (x.next() == '[') {
+                        string = x.nextCDATA();
+                        if (string.length() > 0) {
+                            context.accumulate("content", string);
+                        }
+                        return false;
+                    }
+                }
+                throw x.syntaxError("Expected 'CDATA['");
+            }
+            i = 1;
+            do {
+                token = x.nextMeta();
+                if (token == null) {
+                    throw x.syntaxError("Missing '>' after '<!'.");
+                } else if (token == LT) {
+                    i += 1;
+                } else if (token == GT) {
+                    i -= 1;
+                }
+            } while (i > 0);
+            return false;
+        } else if (token == QUEST) {
+
+// <?
+
+            x.skipPast("?>");
+            return false;
+        } else if (token == SLASH) {
+
+// Close tag </
+
+            token = x.nextToken();
+            if (name == null) {
+                throw x.syntaxError("Mismatched close tag " + token);
+            }            
+            if (!token.equals(name)) {
+                throw x.syntaxError("Mismatched " + name + " and " + token);
+            }
+            if (x.nextToken() != GT) {
+                throw x.syntaxError("Misshaped close tag");
+            }
+            return true;
+
+        } else if (token instanceof Character) {
+            throw x.syntaxError("Misshaped tag");
+
+// Open tag <
+
+        } else {
+            tagName = (String)token;
+            token = null;
+            jsonobject = new JSONObject();
+            for (;;) {
+                if (token == null) {
+                    token = x.nextToken();
+                }
+
+// attribute = value
+
+                if (token instanceof String) {
+                    string = (String)token;
+                    token = x.nextToken();
+                    if (token == EQ) {
+                        token = x.nextToken();
+                        if (!(token instanceof String)) {
+                            throw x.syntaxError("Missing value");
+                        }
+                        jsonobject.accumulate(string, 
+                                XML.stringToValue((String)token));
+                        token = null;
+                    } else {
+                        jsonobject.accumulate(string, "");
+                    }
+
+// Empty tag <.../>
+
+                } else if (token == SLASH) {
+                    if (x.nextToken() != GT) {
+                        throw x.syntaxError("Misshaped tag");
+                    }
+                    if (jsonobject.length() > 0) {
+                        context.accumulate(tagName, jsonobject);
+                    } else {
+                        context.accumulate(tagName, "");
+                    }
+                    return false;
+
+// Content, between <...> and </...>
+
+                } else if (token == GT) {
+                    for (;;) {
+                        token = x.nextContent();
+                        if (token == null) {
+                            if (tagName != null) {
+                                throw x.syntaxError("Unclosed tag " + tagName);
+                            }
+                            return false;
+                        } else if (token instanceof String) {
+                            string = (String)token;
+                            if (string.length() > 0) {
+                                jsonobject.accumulate("content", 
+                                        XML.stringToValue(string));
+                            }
+
+// Nested element
+
+                        } else if (token == LT) {
+                            if (parse(x, jsonobject, tagName)) {
+                                if (jsonobject.length() == 0) {
+                                    context.accumulate(tagName, "");
+                                } else if (jsonobject.length() == 1 &&
+                                       jsonobject.opt("content") != null) {
+                                    context.accumulate(tagName, 
+                                            jsonobject.opt("content"));
+                                } else {
+                                    context.accumulate(tagName, jsonobject);
+                                }
+                                return false;
+                            }
+                        }
+                    }
+                } else {
+                    throw x.syntaxError("Misshaped tag");
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Try to convert a string into a number, boolean, or null. If the string
+     * can't be converted, return the string. This is much less ambitious than
+     * JSONObject.stringToValue, especially because it does not attempt to
+     * convert plus forms, octal forms, hex forms, or E forms lacking decimal 
+     * points.
+     * @param string A String.
+     * @return A simple JSON value.
+     */
+    public static Object stringToValue(String string) {
+        if ("".equals(string)) {
+            return string;
+        }
+        if ("true".equalsIgnoreCase(string)) {
+            return Boolean.TRUE;
+        }
+        if ("false".equalsIgnoreCase(string)) {
+            return Boolean.FALSE;
+        }
+        if ("null".equalsIgnoreCase(string)) {
+            return JSONObject.NULL;
+        }
+        if ("0".equals(string)) {
+            return new Integer(0);
+        }
+
+// If it might be a number, try converting it. If that doesn't work, 
+// return the string.
+
+        try {
+            char initial = string.charAt(0);
+            boolean negative = false;
+            if (initial == '-') {
+                initial = string.charAt(1);
+                negative = true;
+            }
+            if (initial == '0' && string.charAt(negative ? 2 : 1) == '0') {
+                return string;
+            }
+            if ((initial >= '0' && initial <= '9')) {
+                if (string.indexOf('.') >= 0) {
+                    return Double.valueOf(string);
+                } else if (string.indexOf('e') < 0 && string.indexOf('E') < 0) {
+                    Long myLong = new Long(string);
+                    if (myLong.longValue() == myLong.intValue()) {
+                        return new Integer(myLong.intValue());
+                    } else {
+                        return myLong;
+                    }
+                }
+            }
+        }  catch (Exception ignore) {
+        }
+        return string;
+    }
+
+    
+    /**
+     * Convert a well-formed (but not necessarily valid) XML string into a
+     * JSONObject. Some information may be lost in this transformation
+     * because JSON is a data format and XML is a document format. XML uses
+     * elements, attributes, and content text, while JSON uses unordered
+     * collections of name/value pairs and arrays of values. JSON does not
+     * does not like to distinguish between elements and attributes.
+     * Sequences of similar elements are represented as JSONArrays. Content
+     * text may be placed in a "content" member. Comments, prologs, DTDs, and
+     * <code>&lt;[ [ ]]></code> are ignored.
+     * @param string The source string.
+     * @return A JSONObject containing the structured data from the XML string.
+     * @throws JSONException
+     */
+    public static JSONObject toJSONObject(String string) throws JSONException {
+        JSONObject jo = new JSONObject();
+        XMLTokener x = new XMLTokener(string);
+        while (x.more() && x.skipPast("<")) {
+            parse(x, jo, null);
+        }
+        return jo;
+    }
+
+
+    /**
+     * Convert a JSONObject into a well-formed, element-normal XML string.
+     * @param object A JSONObject.
+     * @return  A string.
+     * @throws  JSONException
+     */
+    public static String toString(Object object) throws JSONException {
+        return toString(object, null);
+    }
+
+
+    /**
+     * Convert a JSONObject into a well-formed, element-normal XML string.
+     * @param object A JSONObject.
+     * @param tagName The optional name of the enclosing tag.
+     * @return A string.
+     * @throws JSONException
+     */
+    public static String toString(Object object, String tagName)
+            throws JSONException {
+        StringBuffer sb = new StringBuffer();
+        int          i;
+        JSONArray    ja;
+        JSONObject   jo;
+        String       key;
+        Iterator     keys;
+        int          length;
+        String       string;
+        Object       value;
+        if (object instanceof JSONObject) {
+
+// Emit <tagName>
+
+            if (tagName != null) {
+                sb.append('<');
+                sb.append(tagName);
+                sb.append('>');
+            }
+
+// Loop thru the keys.
+
+            jo = (JSONObject)object;
+            keys = jo.keys();
+            while (keys.hasNext()) {
+                key = keys.next().toString();
+                value = jo.opt(key);
+                if (value == null) {
+                    value = "";
+                }
+                if (value instanceof String) {
+                    string = (String)value;
+                } else {
+                    string = null;
+                }
+
+// Emit content in body
+
+                if ("content".equals(key)) {
+                    if (value instanceof JSONArray) {
+                        ja = (JSONArray)value;
+                        length = ja.length();
+                        for (i = 0; i < length; i += 1) {
+                            if (i > 0) {
+                                sb.append('\n');
+                            }
+                            sb.append(escape(ja.get(i).toString()));
+                        }
+                    } else {
+                        sb.append(escape(value.toString()));
+                    }
+
+// Emit an array of similar keys
+
+                } else if (value instanceof JSONArray) {
+                    ja = (JSONArray)value;
+                    length = ja.length();
+                    for (i = 0; i < length; i += 1) {
+                        value = ja.get(i);
+                        if (value instanceof JSONArray) {
+                            sb.append('<');
+                            sb.append(key);
+                            sb.append('>');
+                            sb.append(toString(value));
+                            sb.append("</");
+                            sb.append(key);
+                            sb.append('>');
+                        } else {
+                            sb.append(toString(value, key));
+                        }
+                    }
+                } else if ("".equals(value)) {
+                    sb.append('<');
+                    sb.append(key);
+                    sb.append("/>");
+
+// Emit a new tag <k>
+
+                } else {
+                    sb.append(toString(value, key));
+                }
+            }
+            if (tagName != null) {
+
+// Emit the </tagname> close tag
+
+                sb.append("</");
+                sb.append(tagName);
+                sb.append('>');
+            }
+            return sb.toString();
+
+// XML does not have good support for arrays. If an array appears in a place
+// where XML is lacking, synthesize an <array> element.
+
+        } else {
+            if (object.getClass().isArray()) {
+                object = new JSONArray(object);
+            }
+            if (object instanceof JSONArray) {
+                ja = (JSONArray)object;
+                length = ja.length();
+                for (i = 0; i < length; i += 1) {
+                    sb.append(toString(ja.opt(i), tagName == null ? "array" : tagName));
+                }
+                return sb.toString();
+            } else {
+                string = (object == null) ? "null" : escape(object.toString());
+                return (tagName == null) ? "\"" + string + "\"" :
+                    (string.length() == 0) ? "<" + tagName + "/>" :
+                    "<" + tagName + ">" + string + "</" + tagName + ">";
+            }
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/XMLTokener.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/XMLTokener.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/XMLTokener.java
new file mode 100644
index 0000000..6f4bec0
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/XMLTokener.java
@@ -0,0 +1,365 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * The XMLTokener extends the JSONTokener to provide additional methods
+ * for the parsing of XML texts.
+ * @author JSON.org
+ * @version 2010-12-24
+ */
+public class XMLTokener extends JSONTokener {
+
+
+   /** The table of entity values. It initially contains Character values for
+    * amp, apos, gt, lt, quot.
+    */
+   public static final java.util.HashMap entity;
+
+   static {
+       entity = new java.util.HashMap(8);
+       entity.put("amp",  XML.AMP);
+       entity.put("apos", XML.APOS);
+       entity.put("gt",   XML.GT);
+       entity.put("lt",   XML.LT);
+       entity.put("quot", XML.QUOT);
+   }
+
+    /**
+     * Construct an XMLTokener from a string.
+     * @param s A source string.
+     */
+    public XMLTokener(String s) {
+        super(s);
+    }
+
+    /**
+     * Get the text in the CDATA block.
+     * @return The string up to the <code>]]&gt;</code>.
+     * @throws JSONException If the <code>]]&gt;</code> is not found.
+     */
+    public String nextCDATA() throws JSONException {
+        char         c;
+        int          i;
+        StringBuffer sb = new StringBuffer();
+        for (;;) {
+            c = next();
+            if (end()) {
+                throw syntaxError("Unclosed CDATA");
+            }
+            sb.append(c);
+            i = sb.length() - 3;
+            if (i >= 0 && sb.charAt(i) == ']' &&
+                          sb.charAt(i + 1) == ']' && sb.charAt(i + 2) == '>') {
+                sb.setLength(i);
+                return sb.toString();
+            }
+        }
+    }
+
+
+    /**
+     * Get the next XML outer token, trimming whitespace. There are two kinds
+     * of tokens: the '<' character which begins a markup tag, and the content
+     * text between markup tags.
+     *
+     * @return  A string, or a '<' Character, or null if there is no more
+     * source text.
+     * @throws JSONException
+     */
+    public Object nextContent() throws JSONException {
+        char         c;
+        StringBuffer sb;
+        do {
+            c = next();
+        } while (Character.isWhitespace(c));
+        if (c == 0) {
+            return null;
+        }
+        if (c == '<') {
+            return XML.LT;
+        }
+        sb = new StringBuffer();
+        for (;;) {
+            if (c == '<' || c == 0) {
+                back();
+                return sb.toString().trim();
+            }
+            if (c == '&') {
+                sb.append(nextEntity(c));
+            } else {
+                sb.append(c);
+            }
+            c = next();
+        }
+    }
+
+
+    /**
+     * Return the next entity. These entities are translated to Characters:
+     *     <code>&amp;  &apos;  &gt;  &lt;  &quot;</code>.
+     * @param ampersand An ampersand character.
+     * @return  A Character or an entity String if the entity is not recognized.
+     * @throws JSONException If missing ';' in XML entity.
+     */
+    public Object nextEntity(char ampersand) throws JSONException {
+        StringBuffer sb = new StringBuffer();
+        for (;;) {
+            char c = next();
+            if (Character.isLetterOrDigit(c) || c == '#') {
+                sb.append(Character.toLowerCase(c));
+            } else if (c == ';') {
+                break;
+            } else {
+                throw syntaxError("Missing ';' in XML entity: &" + sb);
+            }
+        }
+        String string = sb.toString();
+        Object object = entity.get(string);
+        return object != null ? object : ampersand + string + ";";
+    }
+
+
+    /**
+     * Returns the next XML meta token. This is used for skipping over <!...>
+     * and <?...?> structures.
+     * @return Syntax characters (<code>< > / = ! ?</code>) are returned as
+     *  Character, and strings and names are returned as Boolean. We don't care
+     *  what the values actually are.
+     * @throws JSONException If a string is not properly closed or if the XML
+     *  is badly structured.
+     */
+    public Object nextMeta() throws JSONException {
+        char c;
+        char q;
+        do {
+            c = next();
+        } while (Character.isWhitespace(c));
+        switch (c) {
+        case 0:
+            throw syntaxError("Misshaped meta tag");
+        case '<':
+            return XML.LT;
+        case '>':
+            return XML.GT;
+        case '/':
+            return XML.SLASH;
+        case '=':
+            return XML.EQ;
+        case '!':
+            return XML.BANG;
+        case '?':
+            return XML.QUEST;
+        case '"':
+        case '\'':
+            q = c;
+            for (;;) {
+                c = next();
+                if (c == 0) {
+                    throw syntaxError("Unterminated string");
+                }
+                if (c == q) {
+                    return Boolean.TRUE;
+                }
+            }
+        default:
+            for (;;) {
+                c = next();
+                if (Character.isWhitespace(c)) {
+                    return Boolean.TRUE;
+                }
+                switch (c) {
+                case 0:
+                case '<':
+                case '>':
+                case '/':
+                case '=':
+                case '!':
+                case '?':
+                case '"':
+                case '\'':
+                    back();
+                    return Boolean.TRUE;
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Get the next XML Token. These tokens are found inside of angle
+     * brackets. It may be one of these characters: <code>/ > = ! ?</code> or it
+     * may be a string wrapped in single quotes or double quotes, or it may be a
+     * name.
+     * @return a String or a Character.
+     * @throws JSONException If the XML is not well formed.
+     */
+    public Object nextToken() throws JSONException {
+        char c;
+        char q;
+        StringBuffer sb;
+        do {
+            c = next();
+        } while (Character.isWhitespace(c));
+        switch (c) {
+        case 0:
+            throw syntaxError("Misshaped element");
+        case '<':
+            throw syntaxError("Misplaced '<'");
+        case '>':
+            return XML.GT;
+        case '/':
+            return XML.SLASH;
+        case '=':
+            return XML.EQ;
+        case '!':
+            return XML.BANG;
+        case '?':
+            return XML.QUEST;
+
+// Quoted string
+
+        case '"':
+        case '\'':
+            q = c;
+            sb = new StringBuffer();
+            for (;;) {
+                c = next();
+                if (c == 0) {
+                    throw syntaxError("Unterminated string");
+                }
+                if (c == q) {
+                    return sb.toString();
+                }
+                if (c == '&') {
+                    sb.append(nextEntity(c));
+                } else {
+                    sb.append(c);
+                }
+            }
+        default:
+
+// Name
+
+            sb = new StringBuffer();
+            for (;;) {
+                sb.append(c);
+                c = next();
+                if (Character.isWhitespace(c)) {
+                    return sb.toString();
+                }
+                switch (c) {
+                case 0:
+                    return sb.toString();
+                case '>':
+                case '/':
+                case '=':
+                case '!':
+                case '?':
+                case '[':
+                case ']':
+                    back();
+                    return sb.toString();
+                case '<':
+                case '"':
+                case '\'':
+                    throw syntaxError("Bad character in a name");
+                }
+            }
+        }
+    }
+    
+    
+    /**
+     * Skip characters until past the requested string.
+     * If it is not found, we are left at the end of the source with a result of false.
+     * @param to A string to skip past.
+     * @throws JSONException
+     */
+    public boolean skipPast(String to) throws JSONException {
+        boolean b;
+        char c;
+        int i;
+        int j;
+        int offset = 0;
+        int length = to.length();
+        char[] circle = new char[length];
+        
+        /*
+         * First fill the circle buffer with as many characters as are in the
+         * to string. If we reach an early end, bail.
+         */
+        
+        for (i = 0; i < length; i += 1) {
+            c = next();
+            if (c == 0) {
+                return false;
+            }
+            circle[i] = c;
+        }
+        /*
+         * We will loop, possibly for all of the remaining characters.
+         */
+        for (;;) {
+            j = offset;
+            b = true;
+            /*
+             * Compare the circle buffer with the to string. 
+             */
+            for (i = 0; i < length; i += 1) {
+                if (circle[j] != to.charAt(i)) {
+                    b = false;
+                    break;
+                }
+                j += 1;
+                if (j >= length) {
+                    j -= length;
+                }
+            }
+            /*
+             * If we exit the loop with b intact, then victory is ours.
+             */
+            if (b) {
+                return true;
+            }
+            /*
+             * Get the next character. If there isn't one, then defeat is ours.
+             */
+            c = next();
+            if (c == 0) {
+                return false;
+            }
+            /*
+             * Shove the character in the circle buffer and advance the 
+             * circle offset. The offset is mod n.
+             */
+            circle[offset] = c;
+            offset += 1;
+            if (offset >= length) {
+                offset -= length;
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/LogWriter.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/LogWriter.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/LogWriter.java
new file mode 100644
index 0000000..ea35b64
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/LogWriter.java
@@ -0,0 +1,256 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.log;
+
+/**
+ * interface LogWriter
+ * 
+ * LogWriter interface for Pulse Logging.
+ * 
+ * @author Sachin K
+ * @since 7.0.1
+ * 
+ */
+public interface LogWriter {
+  /**
+   * Returns true if "severe" log messages are enabled. Returns false if
+   * "severe" log messages are disabled.
+   */
+  public boolean severeEnabled();
+
+  /**
+   * Writes both a message and exception to this writer. The message level is
+   * "severe".
+   */
+  public void severe(String msg, Throwable ex);
+
+  /**
+   * Writes a message to this writer. The message level is "severe".
+   */
+  public void severe(String msg);
+
+  /**
+   * Writes an exception to this writer. The exception level is "severe".
+   */
+  public void severe(Throwable ex);
+
+  /**
+   * Returns true if "error" log messages are enabled. Returns false if "error"
+   * log messages are disabled.
+   */
+  // public boolean errorEnabled();
+  /**
+   * Writes both a message and exception to this writer. The message level is
+   * "error".
+   */
+  // public void error(String msg, Throwable ex);
+  /**
+   * Writes a message to this writer. The message level is "error".
+   */
+  // public void error(String msg);
+  /**
+   * Writes an exception to this writer. The exception level is "error".
+   */
+  // public void error(Throwable ex);
+  /**
+   * Returns true if "warning" log messages are enabled. Returns false if
+   * "warning" log messages are disabled.
+   */
+  public boolean warningEnabled();
+
+  /**
+   * Writes both a message and exception to this writer. The message level is
+   * "warning".
+   */
+  public void warning(String msg, Throwable ex);
+
+  /**
+   * Writes a message to this writer. The message level is "warning".
+   */
+  public void warning(String msg);
+
+  /**
+   * Writes an exception to this writer. The exception level is "warning".
+   */
+  public void warning(Throwable ex);
+
+  /**
+   * Returns true if "info" log messages are enabled. Returns false if "info"
+   * log messages are disabled.
+   */
+  public boolean infoEnabled();
+
+  /**
+   * Writes both a message and exception to this writer. The message level is
+   * "information".
+   */
+  public void info(String msg, Throwable ex);
+
+  /**
+   * Writes a message to this writer. The message level is "information".
+   */
+  public void info(String msg);
+
+  /**
+   * Writes an exception to this writer. The exception level is "information".
+   */
+  public void info(Throwable ex);
+
+  /**
+   * Returns true if "config" log messages are enabled. Returns false if
+   * "config" log messages are disabled.
+   */
+  public boolean configEnabled();
+
+  /**
+   * Writes both a message and exception to this writer. The message level is
+   * "config".
+   */
+  public void config(String msg, Throwable ex);
+
+  /**
+   * Writes a message to this writer. The message level is "config".
+   */
+  public void config(String msg);
+
+  /**
+   * Writes an exception to this writer. The exception level is "config".
+   */
+  public void config(Throwable ex);
+
+  /**
+   * Returns true if "fine" log messages are enabled. Returns false if "fine"
+   * log messages are disabled.
+   */
+  public boolean fineEnabled();
+
+  /**
+   * Writes both a message and exception to this writer. The message level is
+   * "fine".
+   */
+  public void fine(String msg, Throwable ex);
+
+  /**
+   * Writes a message to this writer. The message level is "fine".
+   */
+  public void fine(String msg);
+
+  /**
+   * Writes an exception to this writer. The exception level is "fine".
+   */
+  public void fine(Throwable ex);
+
+  /**
+   * Returns true if "finer" log messages are enabled. Returns false if "finer"
+   * log messages are disabled.
+   */
+  public boolean finerEnabled();
+
+  /**
+   * Writes both a message and exception to this writer. The message level is
+   * "finer".
+   */
+  public void finer(String msg, Throwable ex);
+
+  /**
+   * Writes a message to this writer. The message level is "finer".
+   */
+  public void finer(String msg);
+
+  /**
+   * Writes an exception to this writer. The exception level is "finer".
+   */
+  public void finer(Throwable ex);
+
+  /**
+   * Log a method entry.
+   * <p>
+   * The logging is done using the <code>finer</code> level. The string message
+   * will start with <code>"ENTRY"</code> and include the class and method
+   * names.
+   * 
+   * @param sourceClass
+   *          Name of class that issued the logging request.
+   * @param sourceMethod
+   *          Name of the method that issued the logging request.
+   */
+  public void entering(String sourceClass, String sourceMethod);
+
+  /**
+   * Log a method return.
+   * <p>
+   * The logging is done using the <code>finer</code> level. The string message
+   * will start with <code>"RETURN"</code> and include the class and method
+   * names.
+   * 
+   * @param sourceClass
+   *          Name of class that issued the logging request.
+   * @param sourceMethod
+   *          Name of the method that issued the logging request.
+   */
+  public void exiting(String sourceClass, String sourceMethod);
+
+  /**
+   * Log throwing an exception.
+   * <p>
+   * Use to log that a method is terminating by throwing an exception. The
+   * logging is done using the <code>finer</code> level.
+   * <p>
+   * This is a convenience method that could be done instead by calling
+   * {@link #finer(String, Throwable)}. The string message will start with
+   * <code>"THROW"</code> and include the class and method names.
+   * 
+   * @param sourceClass
+   *          Name of class that issued the logging request.
+   * @param sourceMethod
+   *          Name of the method that issued the logging request.
+   * @param thrown
+   *          The Throwable that is being thrown.
+   */
+  public void throwing(String sourceClass, String sourceMethod, Throwable thrown);
+
+  /**
+   * Returns true if "finest" log messages are enabled. Returns false if
+   * "finest" log messages are disabled.
+   */
+  public boolean finestEnabled();
+
+  /**
+   * Writes both a message and exception to this writer. The message level is
+   * "finest".
+   */
+  public void finest(String msg, Throwable ex);
+
+  /**
+   * Writes a message to this writer. The message level is "finest".
+   */
+  public void finest(String msg);
+
+  /**
+   * Writes an exception to this writer. The exception level is "finest".
+   */
+  public void finest(Throwable ex);
+
+  /**
+   * Returns a 1.4 logging handler that can be used to direct application output
+   * to this GemFire logger using the standard JDK logger APIs. Each time this
+   * method is called it creates a new instance of a Handler so care should be
+   * taken to not call this method too often.
+   */
+  // public Handler getHandler();
+
+  /**
+   * A mechanism for accessing the abstraction layer used for
+   * internationalization.
+   * 
+   * @return LogWriterI18n
+   */
+  // public LogWriterI18n convertToLogWriterI18n();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/MessageFormatter.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/MessageFormatter.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/MessageFormatter.java
new file mode 100644
index 0000000..d20689f
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/MessageFormatter.java
@@ -0,0 +1,93 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.log;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.logging.Formatter;
+import java.util.logging.Handler;
+import java.util.logging.LogRecord;
+
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+
+/**
+ * Class MessageFormatter
+ * 
+ * MessageFormatter is the custom formatter class for formatting the log
+ * messages.
+ * 
+ * @author Sachin K
+ * @since version 7.0.1
+ */
+public class MessageFormatter extends Formatter {
+
+  public MessageFormatter() {
+    super();
+  }
+
+  @Override
+  public String format(LogRecord record) {
+    DateFormat df = new SimpleDateFormat(Repository.get().getPulseConfig()
+        .getLogDatePattern());
+    StringWriter sw = new StringWriter();
+    PrintWriter pw = new PrintWriter(sw);
+
+    pw.println();
+    pw.print("[");
+    pw.print(record.getLevel().getName());
+    pw.print(" ");
+    pw.print(df.format(new Date(record.getMillis())));
+    String threadName = Thread.currentThread().getName();
+    if (threadName != null) {
+      pw.print(" ");
+      pw.print(threadName);
+    }
+    pw.print(" tid=0x");
+    pw.print(Long.toHexString(Thread.currentThread().getId()));
+    pw.print("] ");
+    pw.print("(msgTID=");
+    pw.print(record.getThreadID());
+
+    pw.print(" msgSN=");
+    pw.print(record.getSequenceNumber());
+
+    pw.print(") ");
+
+    pw.println("[" + PulseConstants.APP_NAME + "]");
+
+    pw.println("[" + record.getLoggerName() + "]");
+
+    pw.println(record.getMessage());
+
+    if (record.getThrown() != null) {
+      record.getThrown().printStackTrace(pw);
+    }
+    pw.close();
+    try {
+      sw.close();
+    } catch (IOException ignore) {
+    }
+    String result = sw.toString();
+    return result;
+  }
+
+  public String getHead(Handler h) {
+    return super.getHead(h);
+  }
+
+  public String getTail(Handler h) {
+    return super.getTail(h);
+  }
+} // End of Class MessageFormatter

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java
new file mode 100644
index 0000000..ced8e5f
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogWriter.java
@@ -0,0 +1,296 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.log;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.logging.FileHandler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConfig;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.log.MessageFormatter;
+
+/**
+ * Class PulseLogWriter
+ * 
+ * PulseLogWriter is the implementation of LogWriter.
+ * 
+ * @author Sachin K
+ * @since 7.0.1
+ * 
+ */
+public class PulseLogWriter implements LogWriter {
+
+  // Log File handle Object
+  private FileHandler fileHandler;
+
+  // Message Formatter Object
+  private static MessageFormatter messageformatter;
+
+  // pulse log writer
+  private static PulseLogWriter pulseLogger = null;
+
+  // Logger Object
+  private Logger logger;
+
+  private PulseLogWriter() {
+    PulseConfig pulseConfig = Repository.get().getPulseConfig();
+    // Create Logger
+    logger = Logger.getLogger(this.getClass().getName());
+
+    // Set minimum log level to level passed
+    logger.setLevel(pulseConfig.getLogLevel());
+
+    try {
+      // Get file handler to log messages into log file.
+      if (fileHandler == null) {
+        fileHandler = new FileHandler(
+            pulseConfig.getLogFileFullName(),
+            pulseConfig.getLogFileSize(),
+            pulseConfig.getLogFileCount(),
+            pulseConfig.getLogAppend());
+
+        // Log Message Formatter
+        messageformatter = new MessageFormatter();
+        fileHandler.setFormatter(messageformatter);
+      }
+
+      // Remove any existing handlers
+      // e.g. consoleHandler
+      logger.setUseParentHandlers(false);
+
+      // Add File Handler to logger object
+      logger.addHandler(fileHandler);
+    } catch (SecurityException e) {
+      logger.setUseParentHandlers(true);
+      e.printStackTrace();
+    } catch (IOException e) {
+      logger.setUseParentHandlers(true);
+      e.printStackTrace();
+    } catch (Exception e) {
+      e.printStackTrace();
+    }
+  }
+
+  /**
+   * @param jsonErr
+   * @param errorData
+   */
+  public void logJSONError(JSONException jsonErr, Object errorData) {
+
+    // print details of thrown exception and data that couldn't be converted to
+    // json
+    if (this.fineEnabled()) {
+
+      // write errors
+      StringWriter swBuffer = new StringWriter();
+      PrintWriter prtWriter = new PrintWriter(swBuffer);
+      jsonErr.printStackTrace(prtWriter);
+      this.fine("JSON Error Details : " + swBuffer.toString() + "\n");
+
+      this.fine("Erroneous Data : "
+          + ((errorData != null) ? errorData.toString()
+              : "Not Available for output") + "\n");
+    }
+  }
+
+  public static synchronized PulseLogWriter getLogger() {
+    if (null == pulseLogger) {
+      pulseLogger = new PulseLogWriter();
+    }
+    return pulseLogger;
+  }
+
+  @Override
+  public boolean severeEnabled() {
+    return logger.isLoggable(Level.SEVERE);
+  }
+
+  @Override
+  public void severe(String msg, Throwable ex) {
+    logger.logp(Level.SEVERE, "", "", msg, ex);
+  }
+
+  @Override
+  public void severe(String msg) {
+    logger.severe(msg);
+  }
+
+  @Override
+  public void severe(Throwable ex) {
+    logger.logp(Level.SEVERE, "", "", "", ex);
+  }
+
+  /*
+  @Override
+  public boolean errorEnabled() {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+  @Override
+  public void error(String msg, Throwable ex) {
+    // TODO Auto-generated method stub
+
+  }
+
+  @Override
+  public void error(String msg) {
+    // TODO Auto-generated method stub
+
+  }
+
+  @Override
+  public void error(Throwable ex) {
+    // TODO Auto-generated method stub
+
+  }
+  */
+
+  @Override
+  public boolean warningEnabled() {
+    return logger.isLoggable(Level.WARNING);
+  }
+
+  @Override
+  public void warning(String msg, Throwable ex) {
+    logger.logp(Level.WARNING, "", "", msg, ex);
+  }
+
+  @Override
+  public void warning(String msg) {
+    logger.warning(msg);
+  }
+
+  @Override
+  public void warning(Throwable ex) {
+    logger.logp(Level.WARNING, "", "", "", ex);
+  }
+
+  @Override
+  public boolean infoEnabled() {
+    return logger.isLoggable(Level.INFO);
+  }
+
+  @Override
+  public void info(String msg, Throwable ex) {
+    logger.logp(Level.INFO, "", "", msg, ex);
+  }
+
+  @Override
+  public void info(String msg) {
+    logger.info(msg);
+  }
+
+  @Override
+  public void info(Throwable ex) {
+    logger.logp(Level.WARNING, "", "", "", ex);
+  }
+
+  @Override
+  public boolean configEnabled() {
+    return logger.isLoggable(Level.CONFIG);
+  }
+
+  @Override
+  public void config(String msg, Throwable ex) {
+    logger.logp(Level.CONFIG, "", "", msg, ex);
+  }
+
+  @Override
+  public void config(String msg) {
+    logger.config(msg);
+  }
+
+  @Override
+  public void config(Throwable ex) {
+    logger.logp(Level.CONFIG, "", "", "", ex);
+  }
+
+  @Override
+  public boolean fineEnabled() {
+    return logger.isLoggable(Level.FINE);
+  }
+
+  @Override
+  public void fine(String msg, Throwable ex) {
+    logger.logp(Level.FINE, "", "", msg, ex);
+  }
+
+  @Override
+  public void fine(String msg) {
+    logger.fine(msg);
+  }
+
+  @Override
+  public void fine(Throwable ex) {
+    logger.logp(Level.FINE, "", "", "", ex);
+  }
+
+  @Override
+  public boolean finerEnabled() {
+    return logger.isLoggable(Level.FINER);
+  }
+
+  @Override
+  public void finer(String msg, Throwable ex) {
+    logger.logp(Level.FINER, "", "", msg, ex);
+  }
+
+  @Override
+  public void finer(String msg) {
+    logger.finer(msg);
+  }
+
+  @Override
+  public void finer(Throwable ex) {
+    logger.logp(Level.FINER, "", "", "", ex);
+  }
+
+  @Override
+  public void entering(String sourceClass, String sourceMethod) {
+    logger.entering(sourceClass, sourceMethod);
+  }
+
+  @Override
+  public void exiting(String sourceClass, String sourceMethod) {
+    logger.exiting(sourceClass, sourceMethod);
+  }
+
+  @Override
+  public void throwing(String sourceClass, String sourceMethod, Throwable thrown) {
+    logger.throwing(sourceClass, sourceMethod, thrown);
+  }
+
+  @Override
+  public boolean finestEnabled() {
+    return logger.isLoggable(Level.FINEST);
+  }
+
+  @Override
+  public void finest(String msg, Throwable ex) {
+    logger.logp(Level.FINEST, "", "", msg, ex);
+  }
+
+  @Override
+  public void finest(String msg) {
+    logger.finest(msg);
+  }
+
+  @Override
+  public void finest(Throwable ex) {
+    logger.logp(Level.FINEST, "", "", "", ex);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogger.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogger.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogger.java
new file mode 100644
index 0000000..3ab89a4
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/log/PulseLogger.java
@@ -0,0 +1,134 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.log;
+
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.logging.FileHandler;
+import java.util.logging.Formatter;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
+
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+
+/**
+ * Class PulseLogger
+ * 
+ * PulseLogger is the custom logger class for Pulse Web Application. It logs
+ * messages to the file in custom format.
+ * 
+ * @author Sachin K
+ * @since version 7.0.Beta
+ */
+public class PulseLogger {
+
+  // Pulse Application Log File
+  private static final String LOG_FILE_NAME = PulseConstants.PULSE_LOG_FILE_LOCATION
+      + "/" + PulseConstants.PULSE_LOG_FILE;
+
+  // Date pattern to be used in log messages
+  public static final String LOG_MESSAGE_DATE_PATTERN = "dd/MM/yyyy hh:mm:ss.SSS";
+
+  // The log file size is set to 1MB.
+  public static final int FILE_SIZE = 1024 * 1024;
+
+  // The log file count set to 1 files.
+  public static final int FILE_COUNT = 5;
+
+  // Append logs is set to true.
+  public static final boolean FLAG_APPEND = true;
+
+  // Log File handle Object
+  private static FileHandler fileHandler;
+
+  // Message Formatter Object
+  private static MessageFormatter messageformatter;
+
+  // Logger Object
+  private static Logger logger;
+
+  public static Logger getLogger(String name) {
+    // Create Logger
+    logger = Logger.getLogger(name);
+
+    // Set minimum log level to inform
+    logger.setLevel(Level.INFO);
+
+    // Get file handler to log messages into log file.
+    try {
+      // fileHandler = new FileHandler(LOG_FILE_NAME, FILE_SIZE, FILE_COUNT,
+      // FLAG_APPEND);
+      fileHandler = new FileHandler(LOG_FILE_NAME, FLAG_APPEND);
+
+      // Log Message Formatter
+      messageformatter = new MessageFormatter();
+
+      fileHandler.setFormatter(messageformatter);
+
+      // Add File Handler to logger object
+      logger.addHandler(fileHandler);
+
+    } catch (SecurityException e) {
+      e.printStackTrace();
+    } catch (IOException e) {
+      e.printStackTrace();
+    } catch (Exception e) {
+      e.printStackTrace();
+    }
+
+    return logger;
+  }
+
+  /**
+   * Class MessageFormatter
+   * 
+   * MessageFormatter is the custom formatter class for formatting the log
+   * messages.
+   * 
+   * @author Sachin K
+   * @since version 7.0.Beta 2012-09-23
+   */
+  private static class MessageFormatter extends Formatter {
+
+    public MessageFormatter() {
+      super();
+    }
+
+    @Override
+    public String format(LogRecord record) {
+      // Set DateFormat
+      DateFormat df = new SimpleDateFormat(PulseLogger.LOG_MESSAGE_DATE_PATTERN);
+      StringBuilder builder = new StringBuilder(1000);
+
+      // Format Log Message
+      builder.append(df.format(new Date(record.getMillis()))).append(" - ");
+      builder.append("[ " + PulseConstants.APP_NAME + " ] - ");
+      builder.append("[").append(record.getSourceClassName()).append(".");
+      builder.append(record.getSourceMethodName()).append("] - ");
+      builder.append("[").append(record.getLevel()).append("] - ");
+      builder.append(formatMessage(record));
+      builder.append(System.getProperty("line.separator"));
+
+      return builder.toString();
+    }
+
+    public String getHead(Handler h) {
+      return super.getHead(h);
+    }
+
+    public String getTail(Handler h) {
+      return super.getTail(h);
+    }
+  } // End of Class MessageFormatter
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterDetailsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterDetailsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterDetailsService.java
new file mode 100644
index 0000000..7fcce46
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterDetailsService.java
@@ -0,0 +1,99 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterDetailsService
+ * 
+ * This service class has implementation for providing cluster's basic
+ * statistical data.
+ * 
+ * @author azambare
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterDetails")
+@Scope("singleton")
+public class ClusterDetailsService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    Cluster.Alert[] alertsList = cluster.getAlertsList();
+    int severeAlertCount = 0;
+    int errorAlertCount = 0;
+    int warningAlertCount = 0;
+    int infoAlertCount = 0;
+
+    for (Cluster.Alert alertObj : alertsList) {
+      if (alertObj.getSeverity() == Cluster.Alert.SEVERE) {
+        severeAlertCount++;
+      } else if (alertObj.getSeverity() == Cluster.Alert.ERROR) {
+        errorAlertCount++;
+      } else if (alertObj.getSeverity() == Cluster.Alert.WARNING) {
+        warningAlertCount++;
+      } else {
+        infoAlertCount++;
+      }
+    }
+    try {
+      // getting basic details of Cluster
+      responseJSON.put("clusterName", cluster.getServerName());
+      responseJSON.put("severeAlertCount", severeAlertCount);
+      responseJSON.put("errorAlertCount", errorAlertCount);
+      responseJSON.put("warningAlertCount", warningAlertCount);
+      responseJSON.put("infoAlertCount", infoAlertCount);
+
+      responseJSON.put("totalMembers", cluster.getMemberCount());
+      responseJSON.put("servers", cluster.getServerCount());
+      responseJSON.put("clients", cluster.getClientConnectionCount());
+      responseJSON.put("locators", cluster.getLocatorCount());
+      responseJSON.put("totalRegions", cluster.getTotalRegionCount());
+      Long heapSize = cluster.getTotalHeapSize();
+
+      DecimalFormat df2 = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN);
+      Double heapS = heapSize.doubleValue() / 1024;
+      responseJSON.put("totalHeap", Double.valueOf(df2.format(heapS)));
+      responseJSON.put("functions", cluster.getRunningFunctionCount());
+      responseJSON.put("uniqueCQs", cluster.getRegisteredCQCount());
+      responseJSON.put("subscriptions", cluster.getSubscriptionCount());
+      responseJSON.put("txnCommitted", cluster.getTxnCommittedCount());
+      responseJSON.put("txnRollback", cluster.getTxnRollbackCount());
+      responseJSON.put("userName", userName);
+
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterDiskThroughputService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterDiskThroughputService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterDiskThroughputService.java
new file mode 100644
index 0000000..64a4139
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterDiskThroughputService.java
@@ -0,0 +1,69 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterDiskThroughput This class contains implementations for getting
+ * cluster's current disk throughput details and its trend over time
+ * 
+ * @author Sachin K.
+ * @since version 7.0.Beta
+ */
+
+@Component
+@Service("ClusterDiskThroughput")
+@Scope("singleton")
+public class ClusterDiskThroughputService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+    // clucter's Throughout Writes trend added to json response object
+    // CircularFifoBuffer throughoutWritesTrend =
+    // cluster.getThroughoutWritesTrend();
+    Float currentThroughputWrites = cluster.getDiskWritesRate();
+    Float currentThroughputReads = cluster.getDiskReadsRate();
+
+    try {
+      responseJSON.put("currentThroughputReads", currentThroughputReads);
+      responseJSON.put(
+          "throughputReads",
+          new JSONArray(cluster
+              .getStatisticTrend(Cluster.CLUSTER_STAT_THROUGHPUT_READS)));
+
+      responseJSON.put("currentThroughputWrites", currentThroughputWrites);
+      responseJSON.put(
+          "throughputWrites",
+          new JSONArray(cluster
+              .getStatisticTrend(Cluster.CLUSTER_STAT_THROUGHPUT_WRITES)));
+
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterGCPausesService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterGCPausesService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterGCPausesService.java
new file mode 100644
index 0000000..be6543f
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterGCPausesService.java
@@ -0,0 +1,61 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterGCPausesService
+ * 
+ * This class contains implementations of getting Cluster's GC Pauses (JVM
+ * Pauses) Details and its trend over the time.
+ * 
+ * @author Anchal G
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterJVMPauses")
+@Scope("singleton")
+public class ClusterGCPausesService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+    // clucter's GC Pauses trend added to json response object
+
+    try {
+      responseJSON.put("currentGCPauses", cluster.getGarbageCollectionCount());
+      responseJSON.put(
+          "gCPausesTrend",
+          new JSONArray(cluster
+              .getStatisticTrend(Cluster.CLUSTER_STAT_GARBAGE_COLLECTION))); // new
+                                                                             // JSONArray(array)
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterKeyStatisticsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterKeyStatisticsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterKeyStatisticsService.java
new file mode 100644
index 0000000..bc8a87d
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterKeyStatisticsService.java
@@ -0,0 +1,69 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterKeyStatisticsService
+ * 
+ * This class contains implementations of getting Cluster's current Reads,
+ * Writes and queries details and their trends over the time.
+ * 
+ * @author Anchal G
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterKeyStatistics")
+@Scope("singleton")
+public class ClusterKeyStatisticsService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // clucter's Read write information
+      responseJSON.put(
+          "writePerSecTrend",
+          new JSONArray(cluster
+              .getStatisticTrend(Cluster.CLUSTER_STAT_WRITES_PER_SECOND)));
+      responseJSON.put(
+          "readPerSecTrend",
+          new JSONArray(cluster
+              .getStatisticTrend(Cluster.CLUSTER_STAT_READ_PER_SECOND)));
+      responseJSON.put(
+          "queriesPerSecTrend",
+          new JSONArray(cluster
+              .getStatisticTrend(Cluster.CLUSTER_STAT_QUERIES_PER_SECOND)));
+
+      // Send json response
+      return responseJSON;
+
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java
new file mode 100644
index 0000000..1856c47
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemberService.java
@@ -0,0 +1,123 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.TimeUtils;
+
+/**
+ * Class ClusterMemberService
+ * 
+ * This class contains implementations of getting Cluster Member's details
+ * 
+ * @author Anchal G
+ * @since version 7.5
+ */
+@Component
+// @Service("ClusterMember")
+@Service("ClusterMembers")
+@Scope("singleton")
+public class ClusterMemberService implements PulseService {
+
+  private final String HEAP_USAGE = "heapUsage";
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    Cluster.Member[] clusterMembersList = cluster.getMembers();
+
+    // create members json
+    List<JSONObject> memberListJson = new ArrayList<JSONObject>();
+    try {
+      for (Cluster.Member clusterMember : clusterMembersList) {
+        JSONObject memberJSON = new JSONObject();
+        // getting members detail
+        memberJSON.put("gemfireVersion", clusterMember.getGemfireVersion());
+        memberJSON.put("memberId", clusterMember.getId());
+        memberJSON.put("name", clusterMember.getName());
+        memberJSON.put("host", clusterMember.getHost());
+
+        List<String> serverGroups = clusterMember.getServerGroups();
+        if(serverGroups.size() == 0){
+          serverGroups = new ArrayList<String>();
+          serverGroups.add(PulseConstants.DEFAULT_SERVER_GROUP);
+        }
+        memberJSON.put("serverGroups", serverGroups);
+        
+        List<String> redundancyZones = clusterMember.getRedundancyZones();
+        if(redundancyZones.size() == 0){
+          redundancyZones = new ArrayList<String>();
+          redundancyZones.add(PulseConstants.DEFAULT_REDUNDANCY_ZONE);
+        }
+        memberJSON.put("redundancyZones", redundancyZones);
+
+        DecimalFormat df2 = new DecimalFormat(
+            PulseConstants.DECIMAL_FORMAT_PATTERN);
+
+        long usedHeapSize = cluster.getUsedHeapSize();
+        long currentHeap = clusterMember.getCurrentHeapSize();
+        if (usedHeapSize > 0) {
+          float heapUsage = ((float) currentHeap / (float) usedHeapSize) * 100;
+          memberJSON
+              .put(this.HEAP_USAGE, Double.valueOf(df2.format(heapUsage)));
+        } else {
+          memberJSON.put(this.HEAP_USAGE, 0);
+        }
+        Float currentCPUUsage = clusterMember.getCpuUsage();
+
+        memberJSON.put("cpuUsage", Float.valueOf(df2.format(currentCPUUsage)));
+        memberJSON.put("currentHeapUsage", clusterMember.getCurrentHeapSize());
+        memberJSON.put("isManager", clusterMember.isManager());
+        memberJSON.put("uptime",
+            TimeUtils.convertTimeSecondsToHMS(clusterMember.getUptime()));
+        memberJSON.put("loadAvg", clusterMember.getLoadAverage());
+        memberJSON.put("sockets", clusterMember.getTotalFileDescriptorOpen());
+        memberJSON.put("threads", clusterMember.getNumThreads());
+
+        // Number of member clients
+        if (PulseController.getPulseProductSupport().equalsIgnoreCase(
+            PulseConstants.PRODUCT_NAME_SQLFIRE)){
+          memberJSON.put("clients", clusterMember.getNumSqlfireClients());
+        }else{
+          memberJSON.put("clients", clusterMember.getMemberClientsHMap().size());
+        }
+        memberJSON.put("queues", clusterMember.getQueueBacklog());
+
+        memberListJson.add(memberJSON);
+      }
+      // clucter's Members
+      responseJSON.put("members", memberListJson);
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}


[24/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/multiselect/jquery.multiselect.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/multiselect/jquery.multiselect.css b/pulse/src/main/webapp/css/multiselect/jquery.multiselect.css
new file mode 100644
index 0000000..75a4b38
--- /dev/null
+++ b/pulse/src/main/webapp/css/multiselect/jquery.multiselect.css
@@ -0,0 +1,295 @@
+/* theme specific */
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabledSelect {
+	cursor: default !important;
+}
+
+.ui-icon {
+	display: block;
+	text-indent: -99999px;
+	overflow: hidden;
+	background-repeat: no-repeat;
+	margin-top: 2px;
+	margin-bottom: 2px;
+}
+
+/* Interaction states
+----------------------------------*/
+.ui-state-defaultSelect,.ui-widget-contentSelect .ui-state-defaultSelect,.ui-widget-headerSelect .ui-state-defaultSelect
+	{
+	border: 0px solid #4D5B66;
+	background: #0F1C25 50% 50%	repeat-x;
+	color: #83939A !important;
+}
+
+.ui-state-defaultSelect a,.ui-state-defaultSelect a:link,.ui-state-defaultSelect a:visited
+	{
+	color: #3775c5;
+	text-decoration: none;
+}
+
+.ui-state-hoverSelect,.ui-widget-contentSelect .ui-state-hoverSelect,.ui-widget-headerSelect .ui-state-hoverSelect,.ui-state-focusSelect,.ui-widget-contentSelect .ui-state-focusSelect,.ui-widget-headerSelect .ui-state-focusSelect
+	{
+	border: 0px solid #3775c5;
+	background: #1f313f 50% 50% repeat-x;
+	font-weight: bold;
+	color: #b7b9bb; /*#3775c5;*/
+}
+
+.ui-state-hoverSelect a,.ui-state-hoverSelect a:hover,.ui-state-hoverSelect a:link,.ui-state-hoverSelect a:visited
+	{
+	color: #b7b9bb !important; /*#3775c5;*/
+	text-decoration: none;
+}
+
+.ui-state-activeSelect,.ui-widget-contentSelect .ui-state-activeSelect,.ui-widget-headerSelect .ui-state-activeSelect
+	{
+	border: 1px solid #4D5B66;
+	background: #132634 50% 50% repeat-x;
+	font-weight: bold;
+	color: #b7b9bb; /*#3775c5;*/
+}
+
+.ui-state-activeSelect a,.ui-state-activeSelect a:link,.ui-state-activeSelect a:visited
+	{
+	color: #3775c5;
+	text-decoration: none;
+}
+
+.ui-helper-resetSelect {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	line-height: 1.3;
+	text-decoration: none;
+	font-size: 100%;
+	list-style: none;
+}
+
+.ui-helper-clearfixSelect:before,.ui-helper-clearfixSelect:after {
+	content: "";
+	display: table;
+	border-collapse: collapse;
+}
+
+.ui-helper-clearfixSelect:after {
+	clear: both;
+}
+
+.ui-helper-clearfixSelect {
+	min-height: 0; /* support: IE7 */
+}
+
+/* Component containers
+----------------------------------*/
+.ui-widgetSelect {
+	font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif;
+	font-size: 1.1em;
+}
+
+.ui-widgetSelect .ui-widgetSelect {
+	font-size: 1em;
+}
+
+.ui-widgetSelect input,.ui-widgetSelect select,.ui-widgetSelect textarea,.ui-widgetSelect button
+	{
+	font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif;
+	font-size: 1em;
+}
+
+.ui-widget-contentSelect {
+	border: 1px solid #4D5B66;
+	background: #eeeeee 50% top repeat-x;
+	color: #333333;
+}
+
+.ui-widget-contentSelect a {
+	color: #333333;
+}
+
+.ui-widget-headerSelect a {
+	color: #ffffff;
+}
+
+.ui-widget-headerSelect {
+	border: 0px solid #FFF;
+	background: #132634 50% 50% repeat-x;
+	color: #cfdced;
+	font-weight: bold;
+}
+
+/* Corner radius */
+.ui-corner-allSelect,.ui-corner-topSelect,.ui-corner-leftSelect,.ui-corner-tlSelect
+	{
+	border-top-left-radius: 4px;
+}
+
+.ui-corner-allSelect,.ui-corner-topSelect,.ui-corner-rightSelect,.ui-corner-trSelect
+	{
+	border-top-right-radius: 4px;
+}
+
+.ui-corner-allSelect,.ui-corner-bottomSelect,.ui-corner-leftSelect,.ui-corner-blSelect
+	{
+	border-bottom-left-radius: 4px;
+}
+
+.ui-corner-allSelect,.ui-corner-bottomSelect,.ui-corner-rightSelect,.ui-corner-brSelect
+	{
+	border-bottom-right-radius: 4px;
+}
+
+/* theme specific */
+.ui-multiselect {
+	padding: 1px 1px 1px 1px;
+	text-align: left;
+	float: right;
+}
+
+.ui-multiselect-spanlink {
+	color: #83939A;
+	font-weight: normal;
+	text-decoration: underline;
+}
+
+.ui-multiselect span.ui-icon {
+	float: right
+}
+
+.ui-multiselect-single .ui-multiselect-checkboxes input {
+	position: absolute !important;
+	top: auto !important;
+	left: -9999px;
+}
+
+.ui-multiselect-single .ui-multiselect-checkboxes label {
+	padding: 5px !important
+}
+
+.ui-multiselect-header {
+	margin-bottom: 3px;
+	padding: 3px 5px 3px 0px
+}
+
+.ui-multiselect-header ul {
+	font-size: 0.9em
+}
+
+.ui-multiselect-header ul li {
+	float: left;
+	padding: 0 10px 0 0
+}
+
+.ui-multiselect-header a {
+	text-decoration: none
+}
+
+.ui-multiselect-header a:hover {
+	text-decoration: underline
+}
+
+.ui-multiselect-header span.ui-icon {
+	float: left
+}
+
+.ui-multiselect-header li.ui-multiselect-close {
+	float: right;
+	text-align: right;
+	padding-right: 0
+}
+
+.ui-multiselect-menu {
+	display: none;
+	padding: 3px;
+	position: absolute;
+	z-index: 10000;
+	text-align: left;
+	background: none repeat scroll 0 0 #283649;
+	height: 450px;
+}
+
+.ui-multiselect-checkboxes {
+	position: relative /* fixes bug in IE6/7 */; /*overflow-y:auto*/
+}
+
+.ui-multiselect-checkboxes label {
+	cursor: default;
+	display: block;
+	border: 1px solid transparent;
+	padding: 1px 1px
+}
+
+.ui-multiselect-checkboxes label input {
+	position: relative;
+	top: 1px
+}
+
+.ui-multiselect-checkboxes li {
+	clear: both;
+	font-size: 0.9em;
+	padding-right: 3px
+}
+
+.ui-multiselect-checkboxes li.ui-multiselect-optgroup-label {
+	text-align: center;
+	font-weight: bold;
+	border-bottom: 1px solid
+}
+
+.ui-multiselect-checkboxes li.ui-multiselect-optgroup-label a {
+	display: block;
+	padding: 3px;
+	margin: 1px 0;
+	text-decoration: none
+}
+
+/* remove label borders in IE6 because IE6 does not support transparency */
+.ui-multiselect-checkboxes label {
+	border: none
+}
+
+.ui-helper-resetSelect li a img {
+	float: left;
+}
+
+button img {
+	float: left;
+}
+
+.ui-state-defaultSelect {
+	font-weight: normal;
+	line-height: 25px;
+}
+
+.ui-state-hoverSelect {
+	
+}
+
+.ui-icon-triangle-1-s {
+	background-position: right center
+}
+
+;
+.ui-multiselect-close>img {
+	float: right !important;
+}
+
+.ui-multiselect-close .ui-icon.ui-icon-circle-close {
+	display: none;
+}
+
+.ui-helper-resetSelect a {
+	text-decoration: none !important;
+}
+
+.ui-helper-resetSelect a:hover .ui-multiselect-spanlink {
+	color: #B7B9BB;
+}
+
+.ui-multiselect-checkboxes li label {
+	line-height: 20px;
+	font-weight: bold;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/multiselect/prettify.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/multiselect/prettify.css b/pulse/src/main/webapp/css/multiselect/prettify.css
new file mode 100644
index 0000000..cecf6d0
--- /dev/null
+++ b/pulse/src/main/webapp/css/multiselect/prettify.css
@@ -0,0 +1,27 @@
+/* Pretty printing styles. Used with prettify.js. */
+
+.str { color: #080; }
+.kwd { color: #008; }
+.com { color: #800; }
+.typ { color: #606; }
+.lit { color: #066; }
+.pun { color: #660; }
+.pln { color: #000; }
+.tag { color: #008; }
+.atn { color: #606; }
+.atv { color: #080; }
+.dec { color: #606; }
+pre.prettyprint { padding: 5px; border:1px solid #d2d2d2; background:#f5f5f5 }
+
+@media print {
+  .str { color: #060; }
+  .kwd { color: #006; font-weight: bold; }
+  .com { color: #600; font-style: italic; }
+  .typ { color: #404; font-weight: bold; }
+  .lit { color: #044; }
+  .pun { color: #440; }
+  .pln { color: #000; }
+  .tag { color: #006; font-weight: bold; }
+  .atn { color: #404; }
+  .atv { color: #060; }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/multiselect/style.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/multiselect/style.css b/pulse/src/main/webapp/css/multiselect/style.css
new file mode 100644
index 0000000..c103f8a
--- /dev/null
+++ b/pulse/src/main/webapp/css/multiselect/style.css
@@ -0,0 +1,16 @@
+body { font:12px Helvetica, arial, sans-serif }
+h1, h2, p { margin:10px 0 }
+.hidden { visibility:hidden }
+
+
+.message { padding:10px; margin:15px 0; display:block; text-align:left }
+.message-title { font-weight:bold; font-size:1.25em }
+.message-body { margin-top:4px }
+.error, .notice, .success { padding:.8em; margin-bottom:1em; border:2px solid #ddd }
+.error { background:#FBE3E4; color:#8a1f11; border-color:#FBC2C4 }
+.notice { background:#FFF6BF; color:#514721; border-color:#FFD324 }
+.success { background:#E6EFC2; color:#264409; border-color:#C6D880 }
+.error a { color:#8a1f11 }
+.notice a { color:#514721 }
+.success a { color:#264409 }
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/popup.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/popup.css b/pulse/src/main/webapp/css/popup.css
new file mode 100644
index 0000000..79cc535
--- /dev/null
+++ b/pulse/src/main/webapp/css/popup.css
@@ -0,0 +1,36 @@
+#mask {
+  position:absolute;
+  left:0;
+  top:0;
+  z-index:9000;
+  background:url(../images/mask-bg.png) repeat;
+  display:none;
+}
+  
+#boxes .window {
+  position:fixed;
+  left:0;
+  top:0;
+  display:none;
+  z-index:9999;
+  border:1px solid #49596a;
+  
+}
+.popup_heading{background:#142e41 ; display:block; width:100%; float:left;border-bottom:1px solid #49596a; }
+.popup_heading span{ color:#8a97a0; font-size:14px; float:left; width:82%; padding:10px 5px 10px 10px;}
+.closePopup{color:#fff; float:right; background:url(../images/popup-close-button.png) no-repeat; display:inline-block; width:14px; height:14px; margin:12px 10px 12px 5px;}
+/*popup Content Block*/
+.popup_contentBlock{float:left; width:100%}
+.popup-innerblock{background:#283649;  padding:10px; color:#949ba4; font-size:13px;}
+.popup-innerblock ul li{margin-bottom:5px;}
+.dataSeperator{margin:0px 5px;}
+.width-58{width:58%}
+/*Popup Width*/
+.width345 {
+  width:345px; 
+}
+.width700 {
+  width:700px; 
+}
+
+#gridPopup .popup-innerblock { background:#132634; }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/style.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/style.css b/pulse/src/main/webapp/css/style.css
new file mode 100644
index 0000000..056018e
--- /dev/null
+++ b/pulse/src/main/webapp/css/style.css
@@ -0,0 +1,3048 @@
+/*fonts*/
+@font-face {
+	font-family: 'DroidSansRegular';
+	src: url('fonts/DroidSans-webfont.eot?') format('eot'),
+		url('fonts/DroidSans-webfont.woff') format('woff'),
+		url('fonts/DroidSans-webfont.ttf') format('truetype'),
+		url('fonts/DroidSans-webfont.svg#webfont6rGBoMAO') format('svg');
+	font-weight: normal;
+	font-style: normal;
+}
+
+@font-face {
+	font-family: 'DroidSansBold';
+	src: url('fonts/DroidSans-Bold-webfont.eot?') format('eot'),
+		url('fonts/DroidSans-Bold-webfont.woff') format('woff'),
+		url('fonts/DroidSans-Bold-webfont.ttf') format('truetype'),
+		url('fonts/DroidSans-Bold-webfont.svg#webfontSruMVOI5') format('svg');
+	font-weight: normal;
+	font-style: normal;
+}
+
+/*----------------------------Main Structure starts---------------------------------------*/
+body {
+	background: #0f1c25 url(../images/bg-image.png) repeat-x left top;
+	font-family: 'DroidSansRegular', Arial, sans-serif;
+	font-size: 13px;
+	color: #cfd2d3;
+}
+
+.bodyLoginBg {
+	background: #0f1c25 url(../images/bg-imageLogin.png) repeat-x left top
+		!important;
+	font-family: 'DroidSansRegular', Arial, sans-serif;
+	font-size: 13px;
+	color: #cfd2d3;
+}
+
+.header {
+	height: 49px;
+	float: left;
+	width: 100%
+}
+
+.headerTopLinksMaster {
+	height: 25px;
+}
+
+.headerTopLinks {
+	color: #808080;
+	padding: 6px 7px 5px 7px;
+}
+
+.welcomeLabelPRZero {
+	padding-right: 0px !important
+}
+
+.font-size12 {
+	font-size: 12px;
+}
+
+.headerTopSeperator {
+	color: #4d4d4d;
+	height: 25px;
+	width: 1px;
+	background: url(../images/seperator.png) no-repeat center center
+}
+
+/*about */
+.aboutClicked-Off {
+	cursor: pointer;
+	display: block;
+}
+
+.aboutClicked-On {
+	background: #506d94;
+	color: #dce2ea !important
+}
+
+.aboutBlock {
+	background: #202e3d;
+	position: absolute;
+	right: 0px;
+	top: 25px;
+	border: 1px solid #546579;
+	z-index: 999;
+	width: 610px;
+	padding: 20px;
+	box-shadow: #1a222e 0px 3px 2px;
+}
+
+.aboutDetailsBlock {
+	width: 610px;
+	float: left
+}
+
+.marginBottom30 {
+	margin-bottom: 30px;
+}
+
+.aboutVersionBlock {
+	color: #899095;
+	padding-left: 23px;
+	font-size: 11px;
+}
+
+.aboutVersionBlock a {
+	color: #899095;
+	text-decoration: underline
+}
+
+.aboutText {
+	width: 405px;
+	color: #899095;
+	line-height: 20px;
+}
+
+.copyright {
+	color: #636c78;
+	font-size: 12px;
+	padding-bottom: 8px;
+}
+
+.termsBlock {
+	color: #818891;
+	font-size: 12px;
+}
+
+.termsBlock a {
+	color: #818891;
+	text-decoration: underline
+}
+
+.termsBlockLink {
+	color: #818891;
+	text-decoration: underline;
+	font-size: 12px;
+}
+
+.termsBlockLink:hover {
+	color: #818891;
+}
+
+#canvasWidth {
+	margin: 0px auto;
+	width: 1258px
+}
+
+#loginWidth {
+	margin: 0px auto;
+	width: 1000px
+}
+
+#dataView {
+	margin: 0px auto;
+	width: 1000px
+}
+
+.textbold {
+	font-family: /*'DroidSansBold',*/ Arial, sans-serif;
+	font-weight: bold
+}
+
+/* version details*/
+.versionDetailsOuterBlock {
+	background: #202e3d;
+	position: absolute;
+	right: 90px;
+	top: 150px;
+	border: 1px solid #546579;
+	z-index: 9999;
+	width: 400px;
+	padding: 20px;
+	box-shadow: #1a222e 0px 3px 2px;
+}
+
+.versionDetailsBlock {
+	width: 400px;
+	float: left;
+	color: #899095;
+	line-height: 20px;
+}
+
+/*---------------------------- Main Structure ends---------------------------------------*/
+
+/*----------------------------Header ends---------------------------------------*/
+.logoBlock {
+	background: url(../images/pivotal-logo.png) no-repeat center center;
+	width: 198px;
+	height: 36px;
+	cursor: pointer;
+	margin: 6px 0px
+}
+
+.logoBlock a {
+	visibility: hidden;
+	display: block;
+	height: inherit
+}
+
+.HeaderLink {
+	background: #d8d9da;
+	color: #545454;
+	padding: 16px 19px 16px 19px;
+	margin: 0px 0px 0px 0px;
+	font-size: 14px;
+	border-left: 1px solid #fff
+}
+
+.HeaderLink:first-child {
+	border-left: none
+}
+
+.HeaderLink:hover {
+	color: #0363a0
+}
+
+.HeaderLinkActive {
+	background: #0f1c25;
+	color: #cfd2d3;
+}
+
+.HeaderLinkActive:hover {
+	color: #cfd2d3;
+	cursor: default
+}
+
+/*----------------------------Top Navigation starts---------------------------------------*/
+.linkButton {
+	background: #202b39;
+	border-top: 1px solid #37414d;
+	color: #81878f;
+	padding: 8px 21px;
+	font-size: 13px
+}
+
+.linkButton:hover {
+	background: #132634;
+	color: #81878f;
+}
+
+/*Tabs*/
+.TabTopPanel {
+	background: #202b39;
+	border-top: 1px solid #37414d;
+	color: #81878f;
+	font-size: 13px;
+	width: 245px;
+}
+
+.TabTopPanelInnerBlock {
+	line-height: 31px;
+	background: url(../images/tab-bottom-bg.png) repeat-x left bottom;
+}
+
+.TopTabLink {
+	padding: 9px 22px;
+	color: #d0d4d6;
+	border-top: 1px solid transparent
+}
+
+.TopTabLink:hover {
+	color: #d0d4d6;
+}
+
+.TopTabLinkActive {
+	background: #132634;
+	border: 1px solid #2b3c49;
+	padding: 9px 22px;
+	border-bottom: 0px;
+}
+
+.notification {
+	background: #b63800;
+	font-size: 11px;
+	color: #fff;
+	line-height: 11px;
+	right: 0px;
+	top: -1px;
+	border-radius: 8px;
+	padding: 2px 4px;
+	box-shadow: 0px 1px 0px 0px #091319;
+	min-width: 15px;
+	text-align: center
+}
+
+.tabAll {
+	padding: 0px 5px
+}
+
+.tabError {
+	background: url(../images/error-msg-icon.png) no-repeat center center;
+	padding: 1px 5px
+}
+
+.tabWarning {
+	background: url(../images/warning-msg-icon.png) no-repeat center center;
+	padding: 1px 5px
+}
+
+.tabSevere {
+	background: url(../images/severe-msg-icon.png) no-repeat center center;
+	padding: 1px 6px
+}
+
+.tabInfo {
+	background: url(../images/info-msg-icon.png) no-repeat center center;
+	padding: 1px 6px
+}
+
+.topTabBlock {
+	background: #132634;
+	border: 1px solid #2b3c49;
+	left: 0px;
+	top: 31px;
+	border-top: 0px;
+	width: 243px;
+	z-index: 99
+}
+
+.scroll-pane {
+	width: 230px;
+	height: 728px;
+	overflow: auto;
+	margin: 5px 3px 5px 10px;
+}
+
+.scroll-pane_1 {
+	width: 228px;
+	height: 150px;
+	overflow: auto;
+	margin: 5px 3px 5px 10px;
+}
+
+.tabMessageMasterBlock {
+	margin: 15px 0px;
+	padding: 0px 10px 0px 20px;
+	font-size: 12px;
+}
+
+.tabMessageHeadingBlock {
+	color: #d0d4d6;
+	margin-bottom: 5px;
+}
+
+.tabMessageHeadingAckBlock {
+	color: #89939a;
+	margin-bottom: 5px;
+}
+
+.tabMessageDetailsBlock {
+	color: #89939a;
+	line-height: 16px;
+}
+
+.tabMessageDateBlock {
+	color: #515f69;
+	margin-top: 10px;
+}
+
+.errorMessageBlock {
+	background: url(../images/error-msg-icon.png) no-repeat left top;
+}
+
+.warningMessageBlock {
+	background: url(../images/warning-msg-icon.png) no-repeat left top;
+}
+
+.severeMessageBlock {
+	background: url(../images/severe-msg-icon.png) no-repeat left top;
+}
+
+.infoMessageBlock {
+	background:url(../images/info-msg-icon.png) no-repeat left top;
+}
+
+.clearButton {
+	margin: 10px 5px 5px;
+	float: right;
+}
+
+.clearButton .linkButton {
+	background: transparent;
+	border-top: 0px;
+	padding: 0px 10px;
+	text-decoration: underline
+}
+
+.clearButton .linkButton:hover {
+	color: #fff
+}
+
+.loadMoreButton {
+	margin: 10px 5px 5px;
+	float: right;
+	display: none;
+}
+
+.loadMoreButton .linkButton {
+	background: transparent;
+	border-top: 0px;
+	padding: 0px 10px;
+	text-decoration: underline;
+}
+
+.loadMoreButton .linkButton:hover {
+	color: #fff;
+}
+
+/*----------------------------Top Navigation ends---------------------------------------*/
+
+/*----------------------------Middle starts---------------------------------------*/
+.middleTopologyBlock {
+	width: 760px;
+	float: left;
+}
+
+.leftBlockCanvas {
+	width: 1002px;
+}
+
+.statusmasterBlock {
+	background: #202b39;
+	border-top: 1px solid #37414d;
+	margin-bottom: 10px;
+	float: left;
+	width: 1002px;
+}
+
+.statusFirstBlock {
+	border-right: 1px solid #3c4a5b;
+	padding: 20px;
+}
+
+.rightBlockCanvas {
+	width: 242px;
+	float: right
+}
+
+.canvasBlockLarge {
+	background: #132634;
+	width: 748px;
+}
+
+.canvasBlockLargeContent {
+	padding: 10px 0px;
+	width: 748px;
+	min-height: 420px;
+}
+
+.canvasBlockLargeGridContent {
+	padding: 10px 0px;
+	width: 748px;
+	min-height: 250px;
+}
+
+.canvasBlock {
+	background: #132634;
+	width: 242px;
+}
+
+.canvasBlockInnerBlock {
+	background: #202b39;
+	border-top: 1px solid #37414d;
+	border-bottom: 1px solid #0f1c25;
+}
+
+.canvasHeading {
+	text-transform: uppercase;
+	text-shadow: -1px -1px #161e28;
+	font-size: 14px;
+	color: #ababab;
+	padding: 11px 0px
+}
+
+.canvasInnerBlock {
+	border-top: 1px solid #2b3c49
+}
+
+.canvasContentBlock {
+	padding: 10px 0px;
+	width: 242px;
+	min-height: 150px;
+}
+
+/* start - Change suggested by VMWARE for key stats widget, dt: 17Oct2012 */
+.canvasBlockKeyStats {
+	background: #132634;
+	width: 495px;
+}
+
+.width495 {
+	width: 495px
+}
+
+.canvasContentBlockKeyStats {
+	padding: 10px 0px;
+	width: 495px;
+	min-height: 150px;
+}
+
+.lineGraphKeyStats {
+	width: 300px;
+	margin-right: 10px
+}
+/* end - Change suggested by VMWARE for key stats widget, dt: 17Oct2012 */
+.statusUpDowmBlock {
+	padding: 8px 0px 8px 25px;
+	color: #89939a;
+	margin: 0px 10px;
+}
+
+.statusUp {
+	background: url(../images/status-up.png) no-repeat left 6px;
+}
+
+.statusDown {
+	background: url(../images/status-down.png) no-repeat left 6px;
+}
+
+.width242 {
+	width: 242px
+}
+
+.width225 {
+	width: 225px
+}
+
+.graphBlocksContent {
+	padding: 5px 10px 5px 10px;
+	color: #89939a;
+}
+
+.graphChart {
+	width: 232px;
+	margin-left: 5px;
+	margin-right: 5px;
+}
+
+.graphChart img {
+	width: 100%
+}
+
+.lineGraph {
+	width: 100px;
+	margin-right: 10px
+}
+
+.lineGraph img {
+	width: 100%
+}
+
+.minusIcon {
+	background: url(../images/minus.png) no-repeat center center;
+	width: 16px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px
+}
+
+.plusIcon {
+	background: url(../images/plus.png) no-repeat center center;
+	width: 16px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px
+}
+
+.borderLeftToggleBlock {
+	border-left: 1px solid #172735
+}
+
+.graphIcon {
+	background: url(../images/graph.png) no-repeat center center;
+	width: 17px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px 10px 10px 5px;
+}
+
+.graphIconActive {
+	background: url(../images/graph-active.png) no-repeat center center;
+	width: 17px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px 10px 10px 5px;
+}
+
+.chartIcon {
+	background: url(../images/chart.png) no-repeat center center;
+	width: 17px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px 10px 10px 5px;
+}
+
+.chartIconActive {
+	background: url(../images/chart-active.png) no-repeat center center;
+	width: 17px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px 10px 10px 5px;
+}
+
+.gridIcon {
+	background: url(../images/grid.png) no-repeat center center;
+	width: 17px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px 10px 10px 5px;
+	border-right: 1px solid #3c4a5b
+}
+
+.gridIconActive {
+	background: url(../images/grid-active.png) no-repeat center center;
+	width: 17px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px 10px 10px 5px;
+	border-right: 1px solid #3c4a5b
+}
+
+.chartBlocksPanel,.graphBlocksPanel {
+	padding: 0px 10px 0px 10px;
+	color: #89939a;
+	width: 728px;
+}
+
+.gridBlocksPanel {
+	padding: 0px 0px 0px 0px;
+	color: #89939a;
+	width: 747px;
+	margin-top: 0px
+}
+/*graph color Code*/
+.colorCodeBlock {
+	width: 12px;
+	height: 12px;
+	display: block
+}
+
+.colorCodeBlockOnPopup {
+	width: 9px;
+	height: 9px;
+	display: block
+}
+
+.managerCode {
+	background: #0077F0;
+}
+
+.locatorsCode {
+	background: #8071B4;
+}
+
+.severeCode {
+	background: #B07C2A;
+}
+
+.colorCode-ffae00 {
+	background: #ffae00;
+}
+
+.diskReadsCode {
+	background: #FAB948; /*background:#87b025;*/
+}
+
+.diskWritesCode {
+	background: #2e84bb;
+}
+
+.topologyGraph {
+	width: 410px;
+	margin: -2px auto;
+	text-align: center
+}
+
+.topologyGraph img {
+	width: 100%
+}
+
+.treeViewGraphClusterView {
+	width: 730px;
+	margin: 0px auto;
+	text-align: center;
+	cursor: pointer;
+}
+
+.treeViewGraph {
+	width: 730px;
+	margin: 0px auto;
+	text-align: center
+}
+
+.treeViewGraph img {
+	width: 100%
+}
+/*Normal*/
+.statusMasterBlock {
+	padding-left: 40px;
+	font-size: 23px;
+}
+
+.normalStatus {
+	background: url(../images/normal-status-icon.png) no-repeat left top;
+	color: #87b025;
+}
+
+.errorStatus {
+	background: url(../images/error-status-icon.png) no-repeat left top;
+	color: #c86a17;
+}
+
+.warningStatus {
+	background: url(../images/warning-status-icon.png) no-repeat left top;
+	color: #e9c63c;
+}
+
+.severeStatus {
+	background: url(../images/severe-status-icon.png) no-repeat left top;
+	color: #b82811;
+}
+
+.labeltext {
+	color: #949ba4;
+	font-size: 13px
+}
+
+.borderRightDarkBlue {
+	border-left: 1px solid #172735;
+}
+
+.detailsBlock {
+	padding: 20px 10px;
+	float: left;
+	text-align: center
+}
+
+/*search Block*/
+.searchBlockMaster {
+	background: #0f1c25;
+	width: 171px;
+	float: right;
+	border-radius: 3px;
+	box-shadow: 0 1px 0 0 #27333b;
+	height: 25px;
+}
+
+.searchButton {
+	width: 18px;
+	height: 18px;
+	background: url(../images/searchIcon.png) center center no-repeat;
+	border: 0px;
+	cursor: pointer;
+	float: left;
+	margin: 4px;
+}
+
+.searchBox {
+	float: left;
+	width: 135px;
+	padding: 3px !important;
+	height: 19px;
+	border: 0px !important;
+	background: #0f1c25;
+	color: #b7b9bb !important
+}
+
+/*login Block*/
+.loginMasterBlock {
+	width: 275px;
+	margin: 130px auto 0px
+}
+
+.pulseBottomSpace {
+	margin-bottom: 20px;
+	text-align: center;
+}
+
+.loginInnerBlock {
+	background: #202b39;
+	border-radius: 3px;
+	box-shadow: 0 -1px 0 0 #37414d;
+	padding: 28px;
+}
+
+.inputUserName {
+	background: #0f1c25;
+	border-radius: 3px;
+	box-shadow: 0 1px 0 0 #27333b;
+	padding: 10px !important;
+	border: 0px !important;
+	width: 200px;
+	margin-bottom: 5px;
+	color: #b7b9bb !important
+}
+
+.inputPassword {
+	background: #0f1c25;
+	border-radius: 3px;
+	box-shadow: 0 1px 0 0 #27333b;
+	padding: 10px !important;
+	border: 0px !important;
+	width: 200px;
+	margin-bottom: 5px;
+	color: #b7b9bb !important;
+	outline: none
+}
+
+.signInButton {
+	background: #153c71;
+	border-radius: 3px;
+	border: 0px !important;
+	box-shadow: 0 -1px 0 0 #2d507f;
+	color: #8a9eb8;
+	font-size: 15px;
+	text-align: center;
+	padding: 8px 0px;
+	width: 100%;
+	margin-top: 5px;
+	text-transform: uppercase;
+	cursor: pointer
+}
+
+.signInButton:hover {
+	background: #164381
+}
+
+/*Placeholder*/
+::-webkit-input-placeholder {
+	color: #515F69 !important
+}
+
+:-moz-placeholder {
+	color: #515F69 !important
+}
+
+:-ms-input-placeholder {
+	color: #515F69 !important
+}
+
+.placeholder {
+	color: #515F69 !important
+}
+
+/*error Message master block*/
+.errorMasterBlock {
+	border-bottom: 1px solid #37414d;
+	background: #293b4e;
+	border-radius: 3px 3px 0px 0px;
+	box-shadow: 0 -1px 0 0 #37414D;
+	padding: 10px 12px;
+}
+
+.errorInnerIcon {
+	background: url(../images/error-message-icon.png) no-repeat left top;
+	padding: 0px 0px 0px 29px;
+	line-height: 18px;
+	color: #949da7;
+}
+
+.errorInnerIcon span {
+	display: block
+}
+/*Connection Lost*/
+.connectionLostMasterBlock {
+	position: relative;
+	margin: 0px auto;
+	width: 234px;
+}
+
+.connectionLostInnerBlock {
+	background: #d9d082;
+	padding: 8px;
+	position: absolute;
+	top: 75px;
+	color: #424028;
+	width: 250px;
+}
+
+.connectionLostInnerBlock a {
+	text-decoration: underline;
+	color: #424028;
+}
+
+.connectionLostInnerBlock a:hover {
+	color: #424028;
+}
+
+.linkSeperator {
+	padding: 0px 5px;
+}
+
+/*popup*/
+.detailsBlock-popup {
+	padding: 10px 10px;
+	float: left;
+	text-align: center;
+	min-width: 70px
+}
+
+.firstPaddingLeftZero {
+	padding-left: 0px !important
+}
+
+.lastPaddingLeftZero {
+	padding-right: 0px !important
+}
+
+.popupHeading {
+	background: #142e41;
+	padding: 8px 10px;
+	color: #8a97a0;
+	border-bottom: 1px solid #586a81;
+	width: 89%;
+	overflow: hidden;
+	text-overflow: ellipsis;
+}
+
+.popupFirstRow {
+	padding: 10px;
+	width: 180px;
+	float: left
+}
+
+.popupFirstRowBorder {
+	float: left;
+	border-bottom: 1px solid #4e6277;
+	width: 100%;
+	padding: 5px 0px 10px 0px
+}
+
+.perDivWidth {
+	width: 150px;
+}
+
+.perInnerBlock {
+	width: 85px;
+	float: left;
+	height: 14px;
+	margin: 5px 5px 5px 0;
+}
+
+.perInnerPanel {
+	width: 100%;
+	background: #fff;
+	float: left
+}
+
+.perShowBlock {
+	background: #7a9e25;
+	diaplay: inline-block;
+	float: left
+}
+
+.perValueDisplay {
+	color: #7a9e25;
+	font-size: 25px;
+	display: inline-block;
+	float: left
+}
+
+.fontSize15 {
+	font-size: 15px
+}
+
+.popupSecondRow {
+	float: left;
+	width: 100%;
+	padding: 5px 0px;
+}
+
+.swappingEnabledBlock {
+	background: #1c2633;
+	border-radius: 3px;
+	text-align: center;
+	color: #8e9399;
+	float: left;
+	width: 100%;
+	padding: 5px 0;
+}
+
+.popupStatusmasterBlock {
+	background: #202b39;
+	border-top: 1px solid #37414d;
+	margin-bottom: 2px;
+	float: left;
+	width: 277px;
+}
+
+.popupdetailsBlock {
+	padding: 2px 2px;
+	float: left;
+	text-align: center;
+	width: 87px;
+}
+
+.tooltip .popupcontent {
+	background: #132634;
+	border: 1px solid #889eb9;
+	width: 277px;
+	min-height: 60px;
+}
+
+.popupCanvasContentBlock {
+	padding: 10px 0px;
+	width: 277px;
+	min-height: 150px;
+}
+
+
+/*member Details*/
+.detailsBlock-member {
+	padding: 5px 3px;
+	float: left;
+	width: 70px;
+	text-align: left !important;
+	word-wrap: break-word;
+}
+
+.endPointMasterBlock {
+	margin-top: 15px;
+	width: 242px
+}
+
+.pointHeading {
+	border-bottom: 1px solid #11202b;
+	float: left;
+	width: 100%
+}
+
+.pointTextHeading {
+	color: #d0d4d6;
+	text-transform: uppercase;
+	padding: 8px 10px;
+	float: left
+}
+
+.pointGridHeading {
+	border-top: 1px solid #213341;
+	border-bottom: 1px solid #11202b;
+	width: 100%;
+	float: left;
+	color: #d0d4d6
+}
+
+.pointHeadingPadding {
+	padding: 6px 10px;
+	text-align: left;
+	float: left
+}
+
+.pointC1 {
+	width: 50px;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: pre;
+}
+
+.pointC2 {
+	width: 80px;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: pre;
+}
+
+.pointC3 {
+	width: 30px;
+	text-align: center;
+	overflow: hidden;
+	white-space: pre;
+}
+
+#asynchList .pointC2{
+ width: 75px;
+}
+
+#asynchList .pointC3{
+  margin-left: -5px;
+  padding-left: 0;
+  padding-right: 0;
+  width: 60px;
+}
+.pointC1-2 {
+	width: 150px;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: pre;
+}
+
+.membersTreeViewHeight {
+	height: 504px !important;
+}
+
+.pointGridData {
+	border-top: 1px solid #213341;
+	width: 100% !important;
+	float: left;
+	height: 160px;
+	overflow-y: auto;
+}
+
+.pointDetailsPaddingMember {
+	padding: 6px 10px;
+	float: left;
+	color: #89939a
+}
+
+.pointDetailsPadding {
+	padding: 1% 1%;
+	width: 98%;
+	float: left;
+	color: #89939a
+}
+
+.pointGridData .jspVerticalBar {
+	right: 4px !important
+}
+
+.textUpper {
+	text-transform: uppercase
+}
+
+/*members Name Top DropDown*/
+.rightDropDownBlock {
+	margin-left: 13px;
+}
+
+.rightDropDownBlock a {
+	float: left;
+	padding: 4px 5px;
+	position: relative;
+}
+
+.rightDropDownBlock a:hover {
+	color: #0363a0
+}
+
+.rightDropDownBlock a span {
+	background: url(../images/top-user-dropdown-arrow.png) no-repeat right
+		5px;
+	vertical-align: top;
+	padding: 0px 16px 0px 7px;
+	margin-top: 5px;
+	position: relative;
+	float: left
+}
+
+.rightDropDownBlock a:hover span {
+	background-position: right -20px;
+}
+
+.hotspot_txt {
+  font-size: 13px;
+  color: #cdd0d1;
+  overflow: hidden;
+  white-space: pre;
+  float: right;
+}
+
+.hotspotNameTopMargin {
+  width: 193px;
+}
+
+.hotspotClicked-Off {
+  cursor: pointer;
+  display: block
+}
+
+.hotspotClicked-On {
+  z-index: 999 !important;
+  cursor: pointer
+}
+
+.hotspotClicked-Off span {
+  background: url(../images/membersName_arror-off.png) no-repeat right
+    center;
+  padding-right: 26px;
+  display: inline-block
+}
+
+.hotspotClicked-On span {
+  background: url(../images/membersName_arror-on.png) no-repeat right
+    center;
+  padding-right: 26px;
+  display: inline-block
+}
+
+.memberClicked-Off {
+	cursor: pointer;
+	display: block
+}
+
+.memberClicked-On {
+	z-index: 999 !important;
+	cursor: pointer
+}
+
+.settingBlock {
+	background: #283649;
+	position: absolute;
+	left: 0px;
+	top: 25px;
+	border: 1px solid #546579;
+	z-index: 9999;
+	width: 193px;
+}
+
+.settingBlock ul {
+	display: block;
+	float: left;
+	width: 100%
+}
+
+.settingBlock ul li {
+	width: 100%;
+}
+
+.settingBlock ul li a {
+	display: block;
+	font-size: 13px;
+	padding: 5px;
+}
+
+.rightDropDownBlock img {
+	float: left
+}
+
+.memberClicked-Off span {
+	background: url(../images/membersName_arror-off.png) no-repeat right
+		center;
+	padding-right: 26px;
+	display: inline-block
+}
+
+.memberClicked-On span {
+	background: url(../images/membersName_arror-on.png) no-repeat right
+		center;
+	padding-right: 26px;
+	display: inline-block
+}
+
+.member_txt {
+	font-size: 20px;
+	color: #cdd0d1; /*width:168px;*/
+	overflow: hidden; /*text-overflow: ellipsis;*/
+	white-space: pre;
+}
+
+.membersNameTopMargin {
+	margin-top: 5px;
+	width: 193px;
+}
+
+.memeberNameSearch {
+	padding: 10px 11px;
+	float: left
+}
+
+/**autocomplete**/
+.jsonSuggestScroll {
+	width: 193px;
+	float: left;
+	height: 125px;
+	overflow-y: auto;
+	overflow-x: hidden;
+}
+
+.jsonSuggestScroll .jspPane {
+	width: 193px !important
+}
+
+.jsonSuggestScroll .jspDrag {
+	left: -3px;
+	background: #7a8eaa
+}
+
+.hideHorizontalScroll {
+	overflow-x: hidden !important;
+}
+
+/*dataView */
+.dataViewTreeViewBlock {
+	width: 427px;
+	float: left;
+	overflow: hidden
+}
+
+.rightBlockDataView {
+	width: 563px;
+	float: right
+}
+
+.canvasBlockDataView {
+	width: 563px;
+}
+
+.canvasBlockLargeDataView {
+	background: #132634;
+	width: 428px;
+}
+
+.width563 {
+	width: 563px;
+}
+
+.canvasContentBlockDataView {
+	min-height: 685px;
+	padding: 10px 0;
+	width: 563px;
+	background: #132634;
+}
+
+.selectedRegionLabel {
+	color: #87b025;
+	font-size: 20px;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: pre;
+	width: 543px;
+	padding: 8px 10px;
+	background: #202b39;
+	border-bottom: 1px solid #04121b;
+	border-top: 1px solid #37414d;
+}
+
+.canvasBlockLargeContentDataView {
+	min-height: 690px;
+	padding: 10px 0;
+	width: 428px;
+}
+
+.chartBlocksPanelDataView,.graphBlocksPanelDataView {
+	color: #89939A;
+	padding: 0 10px;
+	width: 407px;
+}
+
+.treeViewGraphDataView {
+	width: 405px;
+	margin: 0px auto;
+	text-align: center;
+	cursor: pointer;
+}
+
+.marginL5 {
+	margin-left: 5px;
+}
+
+.marginL10 {
+	margin-left: 10px;
+}
+
+.marginR10 {
+  margin-right: 10px;
+}
+
+.regionsCount {
+	color: #d2d5d7
+}
+
+.wanEnabledIcon {
+	display: block;
+	height: 8px;
+	width: 27px;
+	background: url(../images/dataViewWanEnabled.png) no-repeat left top;
+	margin-top: 3px;
+}
+
+.detailsBlock-memberDataView {
+	padding: 5px 4px;
+	float: left;
+	text-align: center; /*word-wrap:break-word;*/
+}
+
+.regionType {
+	width: 105px;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: pre;
+}
+
+.graphBlocksContentDataView {
+	padding: 5px 10px 15px 10px;
+	color: #89939a;
+}
+
+.border-topZero {
+	border-top: 0px !important
+}
+
+.pointGridDataView {
+	border-top: 1px solid #213341;
+	width: 100%;
+	float: left;
+}
+
+.dataViewLeftBlock {
+	width: 273px;
+}
+
+.dataViewRightBlock {
+	width: 273px;
+}
+
+.usageDataView {
+	padding: 5px 6px;
+	text-align: left;
+	word-wrap: break-word;
+}
+
+.dataViewUsedMasterBlock {
+	margin: 10px;
+	width: 95%;
+}
+
+.dataUsedProgressbar {
+	border: 1px solid #364652;
+	background: #012e4c;
+	float: left;
+	width: 250px;
+	margin: 40px 0 14px 0;
+	padding: 2px;
+	position: relative;
+}
+
+.memoryUsageChart {
+	background: #afddf8;
+	padding: 2px 0px;
+	text-align: right;
+	color: #24516e;
+	font-size: 20px;
+	max-width: 100%;
+	position:relative;
+	height: 20px;
+}
+
+.memoryUsageValue{
+ position: absolute;
+ top:0;
+ left:5px;
+ line-height: 30px; 
+ text-align: right;
+ color: #24516e;
+}
+
+#memoryUsageDiv, #regionMembersWidgetContainer{
+ height:200px;
+}
+
+.PerRightMargin {
+	font-size: 13px;
+	margin-right: 5px;
+}
+
+.dataUsageChart {
+	background: #c7f8af;
+	padding: 2px 0px;
+	text-align: right;
+	color: #24516e;
+	font-size: 20px;
+	max-width: 100%
+}
+
+.readsTextHeading {
+	color: #d0d4d6;
+	text-transform: uppercase;
+}
+
+.dataViewGraphMaster {
+	border: 1px solid #364652;
+	float: left;
+	width: 214px;
+	margin: 5px 0 0px 0;
+	padding: 2px;
+}
+
+.dataViewGraph {
+	padding: 2px 0px;
+	text-align: center;
+}
+
+.dataViewGraph img {
+	width: 100%;
+}
+
+.regionMembersMasterBlock {
+	margin: 10px 10px 10px 0px;
+	width: 100%;
+}
+
+.regionMembersSearchBlock {
+	min-height: 120px;
+	overflow-y: auto;
+	overflow-x: hidden !important;
+	width: 100%
+}
+
+.regionMembersSearchBlock .pointDetailsPadding {
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: pre;
+	padding: 5px 0px 5px 0px;
+	cursor: pointer
+}
+
+.regionMembersSearchBlock .pointDetailsPadding:hover {
+	background: #283649;
+	color: #ffffff;
+}
+
+.dataViewRightBlock .searchBlockMaster {
+	float: left;
+	width: 167px
+}
+
+.regionHeading {
+	background: #132634 !important
+}
+
+.regionHeading .canvasHeading {
+	color: #d0d4d6 !important
+}
+
+.regionHeading .canvasHeading label {
+	width: 450px;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: pre;
+	float: left;
+	text-transform: none;
+}
+
+.horizontalSeparator {
+	border-bottom: 1px solid #37414D;
+	border-top: 1px solid #0F1C25;
+	margin-bottom: 10px;
+	width: 100%;
+}
+
+/*memberDetails filter*/
+.resultItemFilter {
+	background: #283649 !important;
+	border-top: 1px solid #4E6277;
+	color: #868D98;
+	cursor: pointer;
+	margin: 0;
+	padding: 5px;
+	position: relative;
+}
+
+.resultItemFilter a {
+	color: #868d98;
+	word-wrap: break-word;
+}
+
+.resultItemFilter a:hover {
+	color: #fff;
+}
+
+.jsonSuggestScrollFilter {
+	width: 193px;
+	float: left;
+	height: 300px;
+	overflow-y: auto;
+	overflow-x: hidden;
+}
+
+.jsonSuggestScrollFilter .jspPane {
+	width: 193px !important
+}
+
+.jsonSuggestScrollFilter .jspDrag {
+	left: -3px;
+	background: #7a8eaa
+}
+
+/* Added for sparkline tooltip*/
+.jqstooltip {
+	z-index: 100;
+}
+
+.popupRowBorder {
+	float: left; /*border-bottom:1px solid #4e6277;*/
+	width: 100%;
+	padding: 1px 0px 1px 0px
+}
+
+.marginTop3 {
+	margin-top: 3px;
+}
+
+.marginTop4 {
+	margin-top: 4px;
+}
+
+.marginTop6 {
+	margin-top: 6px;
+}
+
+.marginBottom4 {
+	margin-bottom: 4px;
+}
+
+.marginBottom6 {
+	margin-bottom: 6px;
+}
+
+.marginBottom10 {
+  margin-bottom: 10px;
+}
+
+.marginTop10 {
+	margin-top: 10px;
+}
+
+.marginzero {
+	margin: 0;
+}
+
+.borderBottomZero {
+	border-bottom: 0px !important
+}
+
+.width85Per {
+	width: 85%
+}
+
+.width91Per {
+	width: 91%
+}
+
+.width96Per {
+	width: 96%
+}
+
+.width100Per {
+	width: 100%
+}
+
+.displayNone{
+	display: none;
+}
+
+.popInnerBlockEllipsis {
+	width: 100%;
+	text-overflow: ellipsis;
+	white-space: pre;
+	overflow: hidden;
+}
+
+.regionType {
+	width: 105px;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: pre;
+}
+/*----------------------------Middle ends---------------------------------------*/
+
+/* switch css */
+.switchMaster {
+	background: #10222f;
+	border: 1px solid #09131a;
+	display: inline-block;
+	border-radius: 3px;
+	margin: 4px 3px
+}
+
+.membersButton,.dataButton {
+	height: 26px;
+	display: inline-block;
+	cursor: pointer;
+	line-height: 26px;
+	padding: 0px 10px;
+	text-transform: uppercase;
+	color: #58656e;
+}
+
+.switchActive {
+	background: #283c58;
+	border-top: 1px solid #536379;
+	border-radius: 3px;
+	color: #ababab
+}
+
+.switchRightBlockLinks {
+	background: url(../images/rightBorder.png) repeat-y right top;
+	padding: 11px 10px 12px 10px
+}
+
+.switchRightBlockLinks a {
+	color: #506d94;
+	font-size: 12px;
+	padding: 0 7px
+}
+
+.switchRightBlockLinks a:hover {
+	color: #cfdced;
+}
+
+.switchRightBlockLinks .switchActiveLink,.switchRightBlockLinks .switchActiveLink:hover
+	{
+	color: #cfdced;
+	cursor: default;
+	visibility:
+}
+
+/*breadCrumb*/
+.breadCrumbs {
+	color: #cdd0d1;
+	margin-top: 5px;
+	font-size: 18px;
+}
+
+.breadCrumbs a {
+	color: #9ba0a4;
+	font-size: 12px;
+	vertical-align: middle
+}
+
+.breadCrumbs a:hover {
+	color: #0363A0
+}
+
+.breadCrumbs .breadCrumbArrow {
+	background: url(../images/bread-crumb.png) no-repeat center center;
+	width: 33px;
+	display: inline-block
+}
+
+.breadCrumbs label {
+	vertical-align: middle
+}
+
+/*data Browser*/
+.dataBrowserLeftBlock {
+	width: 263px;
+	float: left;
+	background: red
+}
+
+.dataBrowserRightBlock {
+	width: 727px;
+	float: right;
+	background: green
+}
+/*Popup Css style*/
+#mask {
+	position: absolute;
+	left: 0;
+	top: 0;
+	z-index: 9000;
+	background: url(../images/mask-bg.png) repeat;
+	display: none;
+}
+
+#boxes .window {
+	position: fixed;
+	left: 0;
+	top: 0;
+	display: none;
+	z-index: 9999;
+	border: 1px solid #49596a;
+}
+
+.popup_heading {
+	background: #142e41;
+	display: block;
+	width: 100%;
+	float: left;
+	border-bottom: 1px solid #49596a;
+}
+
+.popup_heading span {
+	color: #8a97a0;
+	font-size: 14px;
+	float: left;
+	width: 82%;
+	padding: 10px 5px 10px 10px;
+}
+
+.closePopup {
+	color: #fff;
+	float: right;
+	background: url(../images/popup-close-button.png) no-repeat;
+	display: inline-block;
+	width: 14px;
+	height: 14px;
+	margin: 12px 10px 12px 5px;
+}
+/*popup Content Block*/
+.popup_contentBlock {
+	float: left;
+	width: 100%
+}
+
+.popup-innerblock {
+	background: #283649;
+	padding: 10px;
+	color: #949ba4;
+	font-size: 13px;
+}
+
+.popup-innerblock ul li {
+	margin-bottom: 5px;
+}
+
+.dataSeperator {
+	margin: 0px 5px;
+}
+
+.width-58 {
+	width: 58%
+}
+/*Popup Width*/
+.width345 {
+	width: 345px;
+}
+
+.dataRegionsandMembers {
+	background: none repeat scroll 0 0 #666666;
+	height: 530px;
+	padding: 15px;
+	width: 243px;
+	float: left
+}
+
+.dataRegionsandMembers h3 {
+	color: snow
+}
+
+.regionNamesWrapper {
+	height: 170px;
+	overflow-y: auto
+}
+
+.memberNamesWrapper {
+	height: 270px;
+	overflow-y: auto
+}
+
+.memberNamescls {
+	padding: 0 5px;
+}
+/* connection lost */
+.connectionLostMasterBlock {
+	position: relative;
+	margin: 0px auto;
+	width: 234px;
+}
+
+.connectionLostInnerBlock {
+	background: #d9d082;
+	padding: 8px;
+	position: absolute;
+	top: 75px;
+	color: #424028;
+	width: 250px;
+}
+
+.connectionLostInnerBlock a {
+	text-decoration: underline;
+	color: #424028;
+}
+
+.connectionLostInnerBlock a:hover {
+	color: #424028;
+}
+
+.linkSeperator {
+	padding: 0px 5px;
+}
+
+/* Data Browser*/
+#accordion {
+	list-style: none;
+	padding: 0 0 0 0;
+	width: 243px;
+}
+
+#accordion li {
+	display: block;
+	background-color: #aaaaaa;
+	font-weight: bold;
+	margin: 1px;
+	cursor: pointer;
+	padding: 5 5 5 7px;
+	list-style: circle;
+	height: 15px;
+	padding: 10px;
+}
+
+#accordion ul {
+	list-style: none;
+	padding: 0 0 0 0;
+	display: none;
+}
+
+#accordion ul li {
+	font-weight: normal;
+	cursor: auto;
+	background-color: #888888;
+	padding: 0 0 0 7px;
+	height: 125px
+}
+
+.queriesWrapper {
+	height: 300px;
+	overflow-y: auto
+}
+
+.queriesEditor {
+	height: 120px;
+	overflow-y: auto
+}
+
+.dataRegionsandMembersDataBrowser {
+	background: none repeat scroll 0 0 #666666;
+	height: 530px;
+	padding: 15px;
+	width: 700px;
+	float: left
+}
+
+.regionNamesDataBrowser {
+	height: 170px;
+	overflow-y: auto;
+	width: 252px;
+}
+
+.memberNamesDataBrowser {
+	height: 270px;
+	overflow-y: auto;
+	width: 252px;
+}
+
+.searchBlockDataBrowser {
+	background: #0f1c25;
+	width: 243px;
+	border-radius: 3px;
+	box-shadow: 0 1px 0 0 #27333b;
+	height: 25px;
+}
+
+.searchBoxDataBrowser {
+	float: left;
+	width: 207px;
+	padding: 3px !important;
+	height: 19px;
+	border: 0px !important;
+	background: #0f1c25;
+	color: #b7b9bb !important
+}
+/*----------------------------Middle ends---------------------------------------*/
+
+/*block splitter */
+.splitterMaster {
+	width: 100%;
+	margin: 0 auto 20px;
+	position: relative;
+	float: left;
+}
+
+.splitterInnerBlock {
+	float: left;
+	height: 750px;
+	width: 100%;
+}
+
+#widget { /*height:1000px;*/
+	margin: 0 auto;
+	overflow: hidden;
+}
+
+#leftBlock {
+	background: #132634
+}
+
+.leftTopSplitterSpacing {
+	margin-bottom: 10px;
+	width: 100%
+}
+
+#rightBlock {
+	background: #132634
+}
+
+.leftSliderScrollRegion {
+	height: 75%;
+	border-top: 1px solid #213341;
+}
+
+.leftSliderScrollMembers {
+	height: 100%;
+}
+
+.ScrollPaneBlock {
+	width: 100% !important;
+	color: #DDF
+}
+
+.ScrollPaneBlock .jspContainer {
+	width: 100% !important;
+	height: 100% !important
+}
+
+.ScrollPaneBlock .jspPane {
+	width: 100% !important;
+}
+
+.ScrollPaneBlock .jspDrag {
+	left: 0px;
+}
+
+.splitterScrollRegionInnerBlock {
+	text-align: justify;
+	width: 100%
+}
+
+.splitterScrollMembersInnerBlock {
+	text-align: justify;
+	width: 100%;
+	border-top: 1px solid #2b3c49;
+}
+
+.splitterScrollMembersInnerBlock ul li {
+	padding: 5px 0;
+	float: left;
+	width: 100%;
+	margin-bottom: 1px
+}
+
+.splitterScrollMembersInnerBlock ul li:hover { /*background:#1f313f*/
+	
+}
+
+.splitterScrollMembersInnerBlock ul li label {
+	float: left;
+	width: 79%;
+	vertical-align: middle;
+	padding-left: 15px;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: pre;
+	line-height: 18px;
+}
+
+.splitterScrollMembersInnerBlock ul li input[type="checkbox"] {
+	float: right;
+	margin: 0 15px 0 0;
+}
+
+.splitterScrollMembersInnerBlock ul li .checkbox {
+	float: right;
+	padding: 0 15px 0 0;
+	clear: none
+}
+
+.check {
+	background: #1f313f
+}
+
+.regionNameSearch {
+	padding: 10px 11px;
+}
+
+.searchBlockRegion {
+	width: 100%;
+	border-radius: 3px;
+	box-shadow: 0 1px 0 0 #27333b;
+	height: 25px;
+	background: #0f1c25
+}
+
+input[type="button"].searchButtonRegion {
+	width: 18px;
+	height: 18px;
+	background: #0f1c25 url(../images/searchIcon.png) center center
+		no-repeat;
+	border: 0px;
+	cursor: pointer;
+	float: left;
+	margin: 4px;
+	display: inline-block
+}
+
+input[type="text"].searchBoxRegion {
+	float: left;
+	width: 84%;
+	padding: 3px !important;
+	height: 19px;
+	border: 0px !important;
+	background: #0f1c25;
+	color: #b7b9bb !important
+}
+
+.colocatedRegionsLink {
+	padding: 6px 11px;
+	float: right;
+	color: #d0d4d6
+}
+
+.disabledLink,.disabledLink:hover {
+	color: #42515d;
+	cursor: default
+}
+
+/*right Block splitter inner blocks*/
+.rightInnerBlocks {
+	background: #18242f;
+	border-top: 1px solid #232f39;
+	border-bottom: 1px solid #0f1c25;
+	line-height: 34px
+}
+
+.rightInnerBlocks a {
+	padding: 10px;
+	text-transform: uppercase;
+	color: #506d94;
+	text-shadow: -1px -1px #111921;
+}
+
+.rightInnerBlocks a.active {
+	background: #202b39;
+	border-right: 1px solid #0f1c25;
+	border-top: 1px solid #37414d;
+	color: #fff;
+	text-shadow: -1px -1px #161e28;
+	cursor: default
+}
+
+/*query Block*/
+.queryMasterBlock {
+	border-top: 1px solid #2b3c49;
+	border-bottom: 1px solid #0f1c25;
+	width: 100%;
+	float: left;
+	position:relative;
+	padding-bottom:10px;
+}
+
+.queryInnerBlock {
+	float: left;
+	width: 97%;
+}
+
+.marginTB15-10 {
+	margin: 15px 10px;
+}
+
+.marginResult {
+	margin: 15px 10px 10px 10px;
+}
+
+.marginBottomResult {
+	border-bottom: 1px solid #1f313f;
+	width: 100%
+}
+
+.queryHistoryBlock {
+	position: relative
+}
+
+.queryBlocklabel {
+	text-transform: uppercase;
+	padding-left: 5px
+}
+
+#detailsHistory {
+	display: none
+}
+
+
+.textareadiv{
+	background: #0f1c25;
+	border-bottom: 1px solid #27333b;
+	border-radius: 2px 2px 2px 2px;
+	padding:5px;
+	margin-bottom: 10px;
+
+}
+
+.textareadiv textarea{
+	border: 0px;
+	color: #878e92;
+	font-family: Arial;
+	font-size: 12px;
+	outline: none;
+	background: #0f1c25;
+	padding:0;
+	width:100%;
+	margin-bottom:0;
+}
+
+.queriesblock{
+	float: none;
+	width: auto;
+}
+
+.historyClicked-Off {
+	background: url(../images/history-icon.png) no-repeat 10px 9px;
+	color: #5a6871;
+	padding: 0px 10px 0px 31px;
+	position: absolute;
+	right: 0px;
+	top: 0px;
+	line-height: 40px;
+	z-index: 9
+}
+
+.historyClicked-On,.historyClicked-On:hover {
+	background: #132634 url(../images/history-icon.png) no-repeat 10px -29px;
+	color: #d0d4d6;
+	padding: 0px 10px 0px 31px;
+	position: absolute;
+	right: 0px;
+	top: 0px;
+	line-height: 40px;
+	border: 1px solid #2b3c49;
+	border-bottom: 0px;
+	z-index: 9
+}
+
+.queryHistoryScroll-pane {
+	background: #132634;
+	width: 235px;
+	border: 1px solid #2b3c49;
+	position: absolute;
+	right: 0px;
+	top: 40px;
+	height: 670px;
+	z-index: 8;
+	overflow: auto;
+}
+
+.queryHistoryScroll-pane .jspVerticalBar {
+	right: 2px
+}
+
+.queryTextarea {
+	width: 98%;
+	margin-bottom: 10px;
+	height: 55px;
+	overflow-y: auto
+}
+
+.quertTextaremargin {
+	margin-top: 10px;
+}
+
+/*expand collapse*/
+.expCollMaster {
+	text-align: justify;
+	width: 100%;
+}
+/*-------------Accordion------------------------------------------------------------------------------------*/
+.accordion {
+	overflow: hidden;
+}
+
+.accordion .listing {
+	margin-bottom: 1px;
+}
+
+.accordion .heading {
+	padding: 5px 10px 5px 40px;
+	cursor: pointer;
+	position: relative;
+	min-height: 20px;
+	background: #14232f url(../images/header-bg-bottom-border.png) repeat-x
+		left bottom;
+}
+
+.accordion .heading.active {
+	background: none;
+	background: #1f313f;
+}
+
+.accordion .heading .title {
+	color: #d2d6d9;
+	display: block;
+	padding: 3px 0;
+}
+
+.accordion .accordion-content {
+	display: none;
+	padding: 5px 40px;
+}
+
+.accordion .accordion-content2 {
+	display: block;
+	padding: 5px 40px;
+}
+
+.accordion .spriteArrow {
+	display: block;
+	position: absolute;
+	top: 7px;
+	left: 20px;
+	width: 14px;
+	height: 15px;
+}
+
+.accordion .active .spriteArrow {
+	background: url(../images/acc-minus.png) no-repeat
+}
+
+.accordion .inactive .spriteArrow {
+	background: url(../images/acc-plus.png) no-repeat
+}
+
+/*nesting*/
+.accordionNested {
+	overflow: hidden;
+}
+
+.accordionNested .n-listing {
+	margin-bottom: 1px;
+}
+
+.accordionNested .n-heading {
+	padding: 5px 10px 5px 40px;
+	cursor: pointer;
+	position: relative;
+	min-height: 20px;
+	background: #14232f url(../images/header-bg-bottom-border.png) repeat-x
+		left bottom;
+}
+
+.accordionNested .n-heading.n-active {
+	background: none;
+	background: #1f313f;
+}
+
+.accordionNested .n-heading .n-title {
+	color: #d2d6d9;
+	display: block;
+	padding: 3px 0;
+}
+
+.accordionNested .n-accordion-content {
+	padding: 0px;
+	display: none;
+}
+
+.accordionNested .n-spriteArrow {
+	display: block;
+	position: absolute;
+	top: 7px;
+	left: 20px;
+	width: 14px;
+	height: 15px;
+}
+
+.accordionNested .n-active .n-spriteArrow {
+	background: url(../images/acc-n-minus.png) no-repeat
+}
+
+.accordionNested .n-inactive .n-spriteArrow {
+	background: url(../images/acc-n-plus.png) no-repeat
+}
+/* button 
+	---------------------------------------------- */
+.buttonCss {
+	display: inline-block;
+	vertical-align: baseline;
+	margin: 0px 5px 0px 5px;
+	outline: none;
+	cursor: pointer;
+	text-align: center;
+	text-decoration: none;
+	font-size: 13px;
+	border: 0px;
+	padding: 5px 20px;
+}
+
+.buttonCss:hover {
+	text-decoration: none;
+}
+
+.buttonCss:active {
+	position: relative;
+	top: 1px;
+}
+/* blue */
+.blue {
+	background: #153c71;
+	color: #8a9eb8;
+	border-top: 1px solid #2d507f;
+}
+/* grey */
+.grey {
+	background: #202b39;
+	color: #636b75;
+	border-top: 1px solid #37414d;
+}
+
+/*Custom Checkbox & RadioButton*/
+.checkbox,.radio {
+	width: 19px;
+	height: 19px;
+	padding: 0 5px 0 0;
+	background: url(../images/checkbox.png) no-repeat;
+	display: block;
+	clear: left;
+	float: left;
+}
+
+.radioButton label {
+	line-height: 22px;
+	vertical-align: middle;
+	margin-right: 10px
+}
+
+.radio {
+	background: url(../images/radio.png) no-repeat;
+}
+/*history panel*/
+.container {
+	margin: 5px auto;
+	font-size: 12px;
+	background: #132634;
+	color: #89939a;
+}
+
+.container:hover,.selectedHistory {
+	background: #1f313f
+}
+
+.wrap {
+	position: relative;
+	overflow: hidden;
+}
+
+.wrapHistoryContent {
+	padding: 10px 30px 30px 30px;
+	line-height: 16px
+}
+
+.read-more {
+	position: absolute;
+	left: 10px;
+	top: 10px
+}
+
+.read-more a {
+	width: 14px;
+	height: 15px;
+	text-decoration: none;
+	display: block
+}
+
+.read-more a.remore_plus {
+	background: url(../images/acc-n-plus.png) no-repeat;
+}
+
+.read-more a.remore_minus {
+	background: url(../images/acc-n-minus.png) no-repeat;
+}
+
+.remove {
+	position: absolute;
+	right: 10px;
+	top: 10px;
+}
+
+.remove a {
+	width: 15px;
+	height: 15px;
+	background: url(../images/history-remove.png) no-repeat;
+	text-decoration: none;
+	display: none
+}
+
+.container:hover .remove a,.selectedHistory .remove a {
+	display: block
+}
+
+.dateTimeHistory {
+	position: absolute;
+	left: 0px;
+	bottom: 0px;
+	padding: 3px 5px 3px 30px;
+	color: #5a6871;
+	background: #132634;
+	height: 17px;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: pre;
+	width: 188px
+}
+
+.container:hover .dateTimeHistory,.selectedHistory .dateTimeHistory {
+	display: block;
+	background: #1f313f
+}
+
+/*JQGrid scroll y position for extended column*/
+.customeCloumnExtended .ui-jqgrid-view .jspVerticalBar {
+	right: 20px !important;
+}
+
+/* Notification Widhow pop up */
+
+/*--Tooltip Styles--*/
+.tip_trigger {
+	position: relative;
+}
+
+.tip_trigger:hover {
+	background: #1f313f;
+}
+
+.tip_trigger.active {
+	background: #1f313f;
+}
+
+.tabMessageMasterBlock {
+	padding: 0;
+}
+
+.severeMessageBlock {
+	display: inline;
+}
+
+.tooltip:hover {
+	display: block;
+}
+
+.tooltip {
+	color: #fff;
+	display: none; /*--Hides by default--*/
+	position: absolute;
+	z-index: 1000;
+	-webkit-border-radius: 3px;
+	-moz-border-radius: 3px;
+	border-radius: 3px;
+	right: 271px;
+	color: #FFF;
+	width: 280px;
+}
+
+.tooltip .content {
+	background: #283649;
+	border: 1px solid #889eb9;
+	width: 277px;
+	min-height: 60px;
+}
+
+.bubble-arrow {
+	position: absolute;
+	bottom: 20px;
+	right: -11px;
+	background: url(../images/bubble_arrow.png) no-repeat;
+	width: 10px;
+	height: 15px;
+	display: block;
+}
+
+.tooltip .content h3 {
+	color: #d0d5d9;
+	background: #142e41;
+	padding: 10px;
+	border-bottom: 1px solid #4e6277;
+}
+
+.tooltip .content p {
+	color: #949ba4;
+	background: #283649;
+	padding: 0;
+	margin: 0 10px;
+	font-size: 12px;
+}
+
+.tooltip .tooltipcontent {
+	margin: 10px 0;
+	height: 100px;
+}
+
+.notifications {
+	border-top: 1px solid #4E6277;
+	margin: 10px 10px;
+	padding: 5px 0 0 0;
+}
+
+.notifications ul {
+	list-style: none;
+	margin-bottom: 10px;
+}
+
+.notifications ul li {
+	display: inline-block;
+	margin-right: 5px;
+}
+
+.copyNotification {
+	background: url(../images/copy_icon.png) center center no-repeat;
+	width: 20px;
+	height: 20px;
+	display: block;
+}
+
+.copyNotification:hover {
+	background: url(../images/copy_icon.png) center center #8A9096 no-repeat;
+}
+
+.copyNotification:active {
+	background: url(../images/copy_icon.png) center center #A7BCD1 no-repeat;
+}
+
+.acknowledgedTick {
+	background: url(../images/correct_icon.png) center center no-repeat;
+	width: 20px;
+	height: 20px;
+	display: block;
+}
+
+.acknowledgedTick:hover {
+	background: url(../images/correct_icon.png) center center #8A9096
+		no-repeat;
+}
+
+.acknowledgedTick:active {
+	background: url(../images/correct_icon.png) center center #A7BCD1
+		no-repeat;
+}
+
+#allAlertScrollPane { /*overflow:visible !important;*/
+	
+}
+
+#allAlertScrollPane .jspContainer { /*overflow:visible;*/
+	
+}
+
+/* .tip_trigger .severeMessageBlock{
+  background:url(../images/correct_small_icon.png) left center no-repeat;
+  display:block;
+  padding:0 0 0 20px;
+}
+.tip_trigger .errorMessageBlock{
+  display:block;
+  padding:0 0 0 20px;
+} */
+.tip_trigger .tabMessageDateBlock {
+	padding-left: 20px;
+}
+
+.tip_trigger .tabInfo {
+	background: url(../images/info-msg-icon.png) no-repeat left center;
+	padding-left: 20px !important;
+}
+
+.tip_trigger .tabWarning {
+	background: url(../images/warning-msg-icon.png) no-repeat left center;
+	padding-left: 20px !important;
+}
+
+.tip_trigger .tabError {
+	background: url(../images/error-msg-icon.png) no-repeat left center;
+	padding-left: 20px !important;
+}
+
+.tip_trigger .tabSevere {
+	background: url(../images/severe-msg-icon.png) no-repeat left center;
+	padding-left: 20px !important;
+}
+
+.tip_trigger .graytickmark {
+	background: url(../images/correct_icon.png) left center no-repeat;
+	padding-left: 20px;
+}
+
+.tip_trigger .whitetickmark {
+	background: url(../images/correct_small_icon.png) left center no-repeat;
+	padding-left: 20px;
+}
+
+.tip_trigger .notickmark {
+	padding-left: 20px;
+}
+
+.tabMessageDetailsBlock {
+	display: block;
+	white-space: nowrap;
+	width: 130p;
+	text-overflow: ellipsis;
+	overflow: hidden;
+}
+
+.tooltip .content h3.tabError {
+	background: url(../images/error-msg-icon.png) #142e41 no-repeat 3px
+		center;
+	padding: 10px 10px 10px 20px !important;
+}
+
+.tooltip .content h3.tabSevere {
+	background: url(../images/severe-msg-icon.png) #142e41 no-repeat 3px
+		center;
+	padding: 10px 10px 10px 20px !important;
+}
+
+.tooltip .content h3.tabWarning {
+	background: url(../images/warning-msg-icon.png) #142e41 no-repeat 3px
+		center;
+	padding: 10px 10px 10px 20px !important;
+}
+
+.tooltip .content h3.tabInfo {
+  background: url(../images/info-msg-icon.png) #142e41 no-repeat 3px
+    center;
+  padding: 10px 10px 10px 20px !important;
+}
+
+.tooltip .closePopup {
+	position: absolute;
+	top: 0;
+	right: 0px;
+}
+
+.tip_trigger .tooltip .tabMessageDateBlock {
+	padding-left: 0;
+	font-size: 0.9em;
+	margin-top: 5px;
+}
+
+/*----------------------------Footer starts---------------------------------------*/
+
+/*----------------------------Footer ends---------------------------------------*/
+
+/*----------------------------Query Statistics starts---------------------------------------*/
+.subHeader {
+	margin: 0;
+	padding: 0;
+	background: #202b39;
+	border-top: 1px solid #37414d;
+	border-bottom: 1px solid #0f1c25;
+}
+
+.subHeader ul {
+	margin: 0 0 0 0;
+	padding: 0;
+}
+
+.subHeader ul li {
+	float: left;
+}
+
+.subHeader ul li a {
+	color: #89939a;
+	padding: 8px 15px;
+	display: block;
+	border-left: 1px solid transparent;
+	border-right: 1px solid transparent;
+}
+
+.subHeader ul li a:hover {
+	color: #fff;
+}
+
+.subHeader ul li a.active {
+	background: #0f1c25;
+	color: #fff;
+	border-left: 1px solid #37414d;
+	border-right: 1px solid #37414d;
+}
+
+.searchBlockMasterQS {
+	background: #0f1c25;
+	width: 206px;
+	float: left;
+	border-radius: 3px;
+	box-shadow: 0 1px 0 0 #27333b;
+	height: 25px;
+}
+
+.searchButtonQS {
+	width: 18px;
+	height: 18px;
+	background: url(../images/searchIcon.png) center center no-repeat;
+	border: 0px;
+	cursor: pointer;
+	float: left;
+	margin: 4px;
+}
+
+.searchBoxQueryStatistics {
+	float: left;
+	width: 170px;
+	padding: 3px !important;
+	height: 19px;
+	border: 0px !important;
+	background: #0f1c25;
+	color: #b7b9bb !important
+}
+
+.backgroundQueryStats {
+	background: none repeat scroll 0 0 #132634;
+}
+
+/*----------------------------Query Statistics ends---------------------------------------*/
+.clearfix:after {
+	content: ".";
+	display: block;
+	clear: both;
+	visibility: hidden;
+	line-height: 0;
+	height: 0;
+}
+
+.leftTopSplitterSpacing.top_panel .active{
+	display: block;
+	padding: 2px 10px;
+}
+
+.leftTopSplitterSpacing.top_panel .rightInnerBlocks {
+	line-height: 30px;
+}
+
+.leftTopSplitterSpacing.top_panel .canvasBlockInnerBlock{
+	background: none;
+}
+
+.bottom_panel .btm_pnl{
+	line-height: 30px;
+}
+
+.bottom_panel .btm_pnl.rightInnerBlocks a.active{
+	display: block;
+	padding:2px 10px;
+}
+
+.jspCorner{
+	display:none;
+}
+
+/* Cluster Page Widget for Cluster Members and Data */
+.members_data {
+	position: relative;
+	width: 100px;
+	display: block;
+	height: 40px;
+}
+
+.members_data ul {
+	list-style: none;
+	overflow-y: hidden;
+	position: absolute;
+	display: block;
+	z-index: 2;
+	width:200px;
+	height:40px !important;
+}
+
+.members_data ul li {
+	display: block;
+	width: 90px;
+	text-align: center;
+	background: #202B39;
+	height: 38px;
+	float: left;
+}
+
+.members_data ul li.selected {
+	background: #132634;
+	border: 1px solid #202b39;
+	border-top: 3px solid #D2D5D7;
+}
+
+.members_data ul.active li.selected {
+	background: #202b39;
+	border: 1px solid #202b39;
+}
+
+.members_data ul li a {
+	padding: 5px;
+	line-height: 30px;
+	height: 28px;
+	vertical-align: middle;
+	display: block;
+	color: #89939A;
+	font-weight: bold;
+}
+
+.members_view {
+	position: relative;
+	margin-left: 15px;
+	margin-bottom: 10px;
+}
+
+.members_view ul {
+	list-style: none;
+}
+
+.members_view ul li {
+	float: left;
+}
+
+.label_radio {
+	padding-left: 25px;
+	width: auto;
+	height: 17px;
+	display: block;
+	background: url(../images/radio-off.png) no-repeat;
+	margin-right: 10px;
+	color: #D2D5D7;
+	font-weight: normal;
+}
+
+.label_radio input[type="radio"] {
+	position: absolute;
+	left: -9999px;
+}
+
+.label_radio.r_on {
+	background: url(../images/radio-on.png) no-repeat;
+}
+
+.chartIcon.active {
+	background: url(../images/chart-active.png) no-repeat center center;
+	width: 17px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px 10px 10px 5px;
+}
+
+.gridIcon.active {
+	background: url(../images/grid-active.png) no-repeat center center;
+	width: 17px;
+	height: 17px;
+	float: right;
+	cursor: pointer;
+	padding: 10px 10px 10px 5px;
+	border-right: 1px solid #3C4A5B;
+}
+
+.graphIcon.active {
+  background: url(../images/graph-active.png) no-repeat center center;
+  width: 17px;
+  height: 17px;
+  float: right;
+  cursor: pointer;
+  padding: 10px 10px 10px 5px;
+}
+
+.treemapNodeLabeltext {
+  color: #FFFFFF;
+  font-size: 11px
+}
+.treemapRootNodeLabeltext {
+    background-color: #132634;
+    height: 15px;
+}
+
+/* End of Cluster Page Widget for Cluster Members and Data */
+
+.memoryUsageBlock .pointGridDataView .dataViewUsedMasterBlock {
+  width:222px;
+}
+
+.memoryUsageBlock .pointGridDataView .dataViewUsedMasterBlock .dataUsedProgressbar {
+  margin-top: 10px;
+  width: 218px;
+}
+
+.graphborder{
+  border:1px solid #364652;
+  width:100%;
+}
+
+.graphborder .lineGraph{
+  margin:5px 3px;
+}
+
+.popup {
+  background: #202B39;
+}
+
+.popup .header{
+  width:350px;
+  background: #132634;
+  height: 40px;
+  line-height: 40px;
+}
+
+.popup .statusmasterBlock {
+  background: #202B39;
+  border-top: 1px solid #37414D;
+  margin-bottom: 0px;
+  float: none;
+  width: 100%;
+}
+
+.popup .content .canvasContentBlock{
+  padding:10px 0px 0px 0px;
+  width: 330px;
+  min-height: 150px;
+  margin:0 10px 10px 10px;
+}
+
+.graphbox{
+  width:100%;
+}
+
+.graphbox img{
+  width:100%;
+  margin:5px;
+}
+
+.breadCrumbs .breadCrumbArrow{
+  min-height:12px;
+}
+
+.regionIconDisplay {
+    background: url("../images/regionIcons.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
+    height: 15px;
+    margin-right: 10px;
+    padding-left: 25px;
+}
+
+/* loading symbol */
+.loaderParent{
+  position: relative;
+}
+
+.loader {
+  left: 400px;
+  position: absolute;
+  top: 75px;
+  z-index: 999999;
+  height: 25px;
+  width: 25px;
+  background: url(../images/ui-anim_basic_16x16.gif) no-repeat center center;
+  display: none;
+}
+/* For Data Browser */
+#loaderSymbolWrapper .loader{
+  top: 6px;
+}
+/* loading symbol */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/treeView/Treemap.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/treeView/Treemap.css b/pulse/src/main/webapp/css/treeView/Treemap.css
new file mode 100644
index 0000000..2e2e63e
--- /dev/null
+++ b/pulse/src/main/webapp/css/treeView/Treemap.css
@@ -0,0 +1,115 @@
+
+#center-containerTree {
+  width:730px;
+  position:absolute;
+  left:0px;
+  top:34px;
+  height:350px;
+  background:#132634;
+}
+
+#TreeMap {
+    position:relative;
+    height:350px;
+    margin:auto;
+    overflow:hidden;
+	width:730px;
+}
+
+.node {
+  color:#fff;
+  font-size:9px;
+  overflow:hidden;
+  cursor:pointer;
+/*  
+  text-shadow:2px 2px 5px #000;
+  -o-text-shadow:2px 2px 5px #000;
+  -webkit-text-shadow:2px 2px 5px #000;
+  -moz-text-shadow:2px 2px 5px #000;
+*/
+}
+
+/*TOOLTIPS*/
+.tip {
+    color: #fff;
+    width: 190px;
+    background-color:#283649 !important;
+    border:1px solid #889eb9;
+    -moz-box-shadow:#555 2px 2px 8px;
+    -webkit-box-shadow:#555 2px 2px 8px;
+    -o-box-shadow:#555 2px 2px 8px;
+    box-shadow:#555 2px 2px 8px;
+    font-size:13px;
+	}
+
+.album {
+    width:100px;
+    margin:3px;
+}
+
+#id-list {
+	background-color:#EEEEEE;
+	border:1px solid #CCCCCC;
+	margin:10px 20px 0 20px;
+	padding:5px;
+	text-align:left;
+	text-indent:2px;
+}
+
+#id-list table {
+  margin-top:2px;
+}
+
+#back {
+  margin:10px 40px;
+}
+
+.button {
+  display: inline-block;
+  outline: none;
+  cursor: pointer;
+  text-align: center;
+  text-decoration: none;
+  padding: 0.5em 1em 0.55em;
+  text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
+  -webkit-border-radius: 0.5em;
+  -moz-border-radius: 0.5em;
+  border-radius: 0.5em;
+  -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
+  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
+}
+
+.button:hover {
+  text-decoration: none;
+}
+
+.button:active {
+  position: relative;
+  top: 1px;
+}
+
+/* white */
+.white {
+  color: #606060;
+  border: solid 1px #b7b7b7;
+  background: #fff;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed));
+  background: -moz-linear-gradient(top,  #fff,  #ededed);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed');
+}
+
+.white:hover {
+  background: #ededed;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#dcdcdc));
+  background: -moz-linear-gradient(top,  #fff,  #dcdcdc);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dcdcdc');
+}
+
+.white:active {
+  color: #999;
+  background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#fff));
+  background: -moz-linear-gradient(top,  #ededed,  #fff);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#ffffff');
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/ui.jqgrid.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/ui.jqgrid.css b/pulse/src/main/webapp/css/ui.jqgrid.css
new file mode 100644
index 0000000..616f267
--- /dev/null
+++ b/pulse/src/main/webapp/css/ui.jqgrid.css
@@ -0,0 +1,766 @@
+/*Grid*/
+.ui-jqgrid {
+	position: relative;
+}
+
+.ui-jqgrid .ui-jqgrid-view {
+	position: relative;
+	left: 0px;
+	top: 0px;
+	padding: .0em;
+	font-size: 11px;
+}
+/* caption*/
+.ui-jqgrid .ui-jqgrid-titlebar {
+	padding: .3em .2em .2em .3em;
+	position: relative;
+	border-left: 0px none;
+	border-right: 0px none;
+	border-top: 0px none;
+}
+
+.ui-jqgrid .ui-jqgrid-title {
+	float: left;
+	margin: .1em 0 .2em;
+}
+
+.ui-jqgrid .ui-jqgrid-titlebar-close {
+	position: absolute;
+	top: 50%;
+	width: 19px;
+	margin: -10px 0 0 0;
+	padding: 1px;
+	height: 18px;
+}
+
+.ui-jqgrid .ui-jqgrid-titlebar-close span {
+	display: block;
+	margin: 1px;
+}
+
+.ui-jqgrid .ui-jqgrid-titlebar-close:hover {
+	padding: 0;
+}
+/* header*/
+.ui-jqgrid .ui-jqgrid-hdiv {
+	position: relative;
+	margin: 0em;
+	padding: 0em;
+	overflow-x: hidden;
+	border-left: 0px none !important;
+	border-top: 0px none !important;
+	border-right: 0px none !important;
+}
+
+.ui-jqgrid .ui-jqgrid-hbox {
+	float: left;
+	padding-right: 20px;
+}
+
+.ui-jqgrid .ui-jqgrid-htable {
+	table-layout: fixed;
+	margin: 0em;
+}
+
+.ui-jqgrid .ui-jqgrid-htable th {
+	height: 22px;
+	padding: 0 2px 0 2px;
+}
+
+.ui-jqgrid .ui-jqgrid-htable th div {
+	overflow: hidden;
+	position: relative;
+	height: 17px;
+}
+
+.ui-th-column,.ui-jqgrid .ui-jqgrid-htable th.ui-th-column {
+	overflow: hidden;
+	white-space: nowrap;
+	text-align: center;
+	border-top: 0px none;
+	border-bottom: 0px none;
+}
+
+.ui-th-ltr,.ui-jqgrid .ui-jqgrid-htable th.ui-th-ltr {
+	border-left: 0px none;
+}
+
+.ui-th-rtl,.ui-jqgrid .ui-jqgrid-htable th.ui-th-rtl {
+	border-right: 0px none;
+}
+
+.ui-first-th-ltr {
+	border-right: 1px solid;
+}
+
+.ui-first-th-rtl {
+	border-left: 1px solid;
+}
+
+.ui-jqgrid .ui-th-div-ie {
+	white-space: nowrap;
+	zoom: 1;
+	height: 17px;
+}
+
+.ui-jqgrid .ui-jqgrid-resize {
+	height: 20px !important;
+	position: relative;
+	cursor: e-resize;
+	display: inline;
+	overflow: hidden;
+}
+
+.ui-jqgrid .ui-grid-ico-sort {
+	overflow: hidden;
+	position: absolute;
+	display: inline;
+	cursor: pointer !important;
+}
+
+.ui-jqgrid .ui-icon-asc {
+	margin-top: -3px;
+	height: 12px;
+}
+
+.ui-jqgrid .ui-icon-desc {
+	margin-top: 3px;
+	height: 12px;
+}
+
+.ui-jqgrid .ui-i-asc {
+	margin-top: 0px;
+	height: 16px;
+}
+
+.ui-jqgrid .ui-i-desc {
+	margin-top: 0px;
+	margin-left: 13px;
+	height: 16px;
+}
+
+.ui-jqgrid .ui-jqgrid-sortable {
+	cursor: pointer;
+}
+
+.ui-jqgrid tr.ui-search-toolbar th {
+	border-top-width: 1px !important;
+	border-top-color: inherit !important;
+	border-top-style: ridge !important
+}
+
+tr.ui-search-toolbar input {
+	margin: 1px 0px 0px 0px
+}
+
+tr.ui-search-toolbar select {
+	margin: 1px 0px 0px 0px
+}
+/* body */
+.ui-jqgrid .ui-jqgrid-bdiv {
+	position: relative;
+	margin: 0em;
+	padding: 0;
+	overflow-y: auto;
+	overflow-x: scroll;
+	text-align: left;
+}
+
+.ui-jqgrid .ui-jqgrid-btable {
+	table-layout: fixed;
+	margin: 0em;
+	outline-style: none;
+}
+
+.ui-jqgrid tr.jqgrow {
+	outline-style: none;
+}
+
+.ui-jqgrid tr.jqgroup {
+	outline-style: none;
+}
+
+.ui-jqgrid tr.jqgrow td {
+	font-weight: normal;
+	overflow: hidden;
+	white-space: pre;
+	height: 22px;
+	padding: 0 2px 0 2px;
+	border-bottom-width: 1px;
+	border-bottom-color: inherit;
+	border-bottom-style: solid;
+}
+
+.ui-jqgrid tr.jqgfirstrow td {
+	padding: 0 2px 0 2px;
+	border-right-width: 1px;
+	border-right-style: solid;
+}
+
+.ui-jqgrid tr.jqgroup td {
+	font-weight: normal;
+	overflow: hidden;
+	white-space: pre;
+	height: 22px;
+	padding: 0 2px 0 2px;
+	border-bottom-width: 1px;
+	border-bottom-color: inherit;
+	border-bottom-style: solid;
+}
+
+.ui-jqgrid tr.jqfoot td {
+	font-weight: bold;
+	overflow: hidden;
+	white-space: pre;
+	height: 22px;
+	padding: 0 2px 0 2px;
+	border-bottom-width: 1px;
+	border-bottom-color: inherit;
+	border-bottom-style: solid;
+}
+
+.ui-jqgrid tr.ui-row-ltr td {
+	text-align: left;
+	border-right-width: 1px;
+	border-right-color: inherit;
+	border-right-style: solid;
+}
+
+.ui-jqgrid tr.ui-row-rtl td {
+	text-align: right;
+	border-left-width: 1px;
+	border-left-color: inherit;
+	border-left-style: solid;
+}
+
+.ui-jqgrid td.jqgrid-rownum {
+	padding: 0 2px 0 2px;
+	margin: 0px;
+	border: 0px none;
+}
+
+.ui-jqgrid .ui-jqgrid-resize-mark {
+	width: 2px;
+	left: 0;
+	background-color: #777;
+	cursor: e-resize;
+	cursor: col-resize;
+	position: absolute;
+	top: 0;
+	height: 100px;
+	overflow: hidden;
+	display: none;
+	border: 0 none;
+	z-index: 99999;
+}
+/* footer */
+.ui-jqgrid .ui-jqgrid-sdiv {
+	position: relative;
+	margin: 0em;
+	padding: 0em;
+	overflow: hidden;
+	border-left: 0px none !important;
+	border-top: 0px none !important;
+	border-right: 0px none !important;
+}
+
+.ui-jqgrid .ui-jqgrid-ftable {
+	table-layout: fixed;
+	margin-bottom: 0em;
+}
+
+.ui-jqgrid tr.footrow td {
+	font-weight: bold;
+	overflow: hidden;
+	white-space: nowrap;
+	height: 21px;
+	padding: 0 2px 0 2px;
+	border-top-width: 1px;
+	border-top-color: inherit;
+	border-top-style: solid;
+}
+
+.ui-jqgrid tr.footrow-ltr td {
+	text-align: left;
+	border-right-width: 1px;
+	border-right-color: inherit;
+	border-right-style: solid;
+}
+
+.ui-jqgrid tr.footrow-rtl td {
+	text-align: right;
+	border-left-width: 1px;
+	border-left-color: inherit;
+	border-left-style: solid;
+}
+/* Pager*/
+.ui-jqgrid .ui-jqgrid-pager {
+	border-left: 0px none !important;
+	border-right: 0px none !important;
+	border-bottom: 0px none !important;
+	margin: 0px !important;
+	padding: 0px !important;
+	position: relative;
+	height: 25px;
+	white-space: nowrap;
+	overflow: hidden;
+	font-size: 11px;
+}
+
+.ui-jqgrid .ui-pager-control {
+	position: relative;
+}
+
+.ui-jqgrid .ui-pg-table {
+	position: relative;
+	padding-bottom: 2px;
+	width: auto;
+	margin: 0em;
+}
+
+.ui-jqgrid .ui-pg-table td {
+	font-weight: normal;
+	vertical-align: middle;
+	padding: 1px;
+}
+
+.ui-jqgrid .ui-pg-button {
+	height: 19px !important;
+}
+
+.ui-jqgrid .ui-pg-button span {
+	display: block;
+	margin: 1px;
+	float: left;
+}
+
+.ui-jqgrid .ui-pg-button:hover {
+	padding: 0px;
+}
+
+.ui-jqgrid .ui-state-disabled:hover {
+	padding: 1px;
+}
+
+.ui-jqgrid .ui-pg-input {
+	height: 13px;
+	font-size: .8em;
+	margin: 0em;
+}
+
+.ui-jqgrid .ui-pg-selbox {
+	font-size: .8em;
+	line-height: 18px;
+	display: block;
+	height: 18px;
+	margin: 0em;
+}
+
+.ui-jqgrid .ui-separator {
+	height: 18px;
+	border-left: 1px solid #ccc;
+	border-right: 1px solid #ccc;
+	margin: 1px;
+	float: right;
+}
+
+.ui-jqgrid .ui-paging-info {
+	font-weight: normal;
+	height: 19px;
+	margin-top: 3px;
+	margin-right: 4px;
+}
+
+.ui-jqgrid .ui-jqgrid-pager .ui-pg-div {
+	padding: 1px 0;
+	float: left;
+	position: relative;
+}
+
+.ui-jqgrid .ui-jqgrid-pager .ui-pg-button {
+	cursor: pointer;
+}
+
+.ui-jqgrid .ui-jqgrid-pager .ui-pg-div  span.ui-icon {
+	float: left;
+	margin: 0 2px;
+}
+
+.ui-jqgrid td input,.ui-jqgrid td select .ui-jqgrid td textarea {
+	margin: 0em;
+}
+
+.ui-jqgrid td textarea {
+	width: auto;
+	height: auto;
+}
+
+.ui-jqgrid .ui-jqgrid-toppager {
+	border-left: 0px none !important;
+	border-right: 0px none !important;
+	border-top: 0px none !important;
+	margin: 0px !important;
+	padding: 0px !important;
+	position: relative;
+	height: 25px !important;
+	white-space: nowrap;
+	overflow: hidden;
+}
+
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div {
+	padding: 1px 0;
+	float: left;
+	position: relative;
+}
+
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-button {
+	cursor: pointer;
+}
+
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div  span.ui-icon {
+	float: left;
+	margin: 0 2px;
+}
+/*subgrid*/
+.ui-jqgrid .ui-jqgrid-btable .ui-sgcollapsed span {
+	display: block;
+}
+
+.ui-jqgrid .ui-subgrid {
+	margin: 0em;
+	padding: 0em;
+	width: 100%;
+}
+
+.ui-jqgrid .ui-subgrid table {
+	table-layout: fixed;
+}
+
+.ui-jqgrid .ui-subgrid tr.ui-subtblcell td {
+	height: 18px;
+	border-right-width: 1px;
+	border-right-color: inherit;
+	border-right-style: solid;
+	border-bottom-width: 1px;
+	border-bottom-color: inherit;
+	border-bottom-style: solid;
+}
+
+.ui-jqgrid .ui-subgrid td.subgrid-data {
+	border-top: 0px none !important;
+}
+
+.ui-jqgrid .ui-subgrid td.subgrid-cell {
+	border-width: 0px 0px 1px 0px;
+}
+
+.ui-jqgrid .ui-th-subgrid {
+	height: 20px;
+}
+/* loading */
+.ui-jqgrid .loading {
+	position: absolute;
+	top: 45%;
+	left: 45%;
+	width: auto;
+	z-index: 101;
+	padding: 6px;
+	margin: 5px;
+	text-align: center;
+	font-weight: bold;
+	display: none;
+	border-width: 2px !important;
+	font-size: 11px;
+}
+
+.ui-jqgrid .jqgrid-overlay {
+	display: none;
+	z-index: 100;
+}
+
+* html .jqgrid-overlay {
+	width: expression(this.parentNode.offsetWidth +       'px');
+	height: expression(this.parentNode.offsetHeight +       'px');
+}
+
+* .jqgrid-overlay iframe {
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: -1;
+	width: expression(this.parentNode.offsetWidth +       'px');
+	height: expression(this.parentNode.offsetHeight +       'px');
+}
+/* end loading div */
+/* toolbar */
+.ui-jqgrid .ui-userdata {
+	border-left: 0px none;
+	border-right: 0px none;
+	height: 21px;
+	overflow: hidden;
+}
+/*Modal Window */
+.ui-jqdialog {
+	display: none;
+	width: 300px;
+	position: absolute;
+	padding: .2em;
+	font-size: 11px;
+	overflow: visible;
+}
+
+.ui-jqdialog .ui-jqdialog-titlebar {
+	padding: .3em .2em;
+	position: relative;
+}
+
+.ui-jqdialog .ui-jqdialog-title {
+	margin: .1em 0 .2em;
+}
+
+.ui-jqdialog .ui-jqdialog-titlebar-close {
+	position: absolute;
+	top: 50%;
+	width: 19px;
+	margin: -10px 0 0 0;
+	padding: 1px;
+	height: 18px;
+}
+
+.ui-jqdialog .ui-jqdialog-titlebar-close span {
+	display: block;
+	margin: 1px;
+}
+
+.ui-jqdialog .ui-jqdialog-titlebar-close:hover,.ui-jqdialog .ui-jqdialog-titlebar-close:focus
+	{
+	padding: 0;
+}
+
+.ui-jqdialog-content,.ui-jqdialog .ui-jqdialog-content {
+	border: 0;
+	padding: .3em .2em;
+	background: none;
+	height: auto;
+}
+
+.ui-jqdialog .ui-jqconfirm {
+	padding: .4em 1em;
+	border-width: 3px;
+	position: absolute;
+	bottom: 10px;
+	right: 10px;
+	overflow: visible;
+	display: none;
+	height: 80px;
+	width: 220px;
+	text-align: center;
+}
+/* end Modal window*/
+/* Form edit */
+.ui-jqdialog-content .FormGrid {
+	margin: 0px;
+}
+
+.ui-jqdialog-content .EditTable {
+	width: 100%;
+	margin-bottom: 0em;
+}
+
+.ui-jqdialog-content .DelTable {
+	width: 100%;
+	margin-bottom: 0em;
+}
+
+.EditTable td input,.EditTable td select,.EditTable td textarea {
+	margin: 0em;
+}
+
+.EditTable td textarea {
+	width: auto;
+	height: auto;
+}
+
+.ui-jqdialog-content td.EditButton {
+	text-align: right;
+	border-top: 0px none;
+	border-left: 0px none;
+	border-right: 0px none;
+	padding-bottom: 5px;
+	padding-top: 5px;
+}
+
+.ui-jqdialog-content td.navButton {
+	text-align: center;
+	border-left: 0px none;
+	border-top: 0px none;
+	border-right: 0px none;
+	padding-bottom: 5px;
+	padding-top: 5px;
+}
+
+.ui-jqdialog-content input.FormElement {
+	padding: .3em
+}
+
+.ui-jqdialog-content .data-line {
+	padding-top: .1em;
+	border: 0px none;
+}
+
+.ui-jqdialog-content .CaptionTD {
+	vertical-align: middle;
+	border: 0px none;
+	padding: 2px;
+	white-space: nowrap;
+}
+
+.ui-jqdialog-content .DataTD {
+	padding: 2px;
+	border: 0px none;
+	vertical-align: top;
+}
+
+.ui-jqdialog-content .form-view-data {
+	white-space: pre
+}
+
+.fm-button {
+	display: inline-block;
+	margin: 0 4px 0 0;
+	padding: .4em .5em;
+	text-decoration: none !important;
+	cursor: pointer;
+	position: relative;
+	text-align: center;
+	zoom: 1;
+}
+
+.fm-button-icon-left {
+	padding-left: 1.9em;
+}
+
+.fm-button-icon-right {
+	padding-right: 1.9em;
+}
+
+.fm-button-icon-left .ui-icon {
+	right: auto;
+	left: .2em;
+	margin-left: 0;
+	position: absolute;
+	top: 50%;
+	margin-top: -8px;
+}
+
+.fm-button-icon-right .ui-icon {
+	left: auto;
+	right: .2em;
+	margin-left: 0;
+	position: absolute;
+	top: 50%;
+	margin-top: -8px;
+}
+
+#nData,#pData {
+	float: left;
+	margin: 3px;
+	padding: 0;
+	width: 15px;
+}
+/* End Eorm edit */
+/*.ui-jqgrid .edit-cell {}*/
+.ui-jqgrid .selected-row,div.ui-jqgrid .selected-row td {
+	font-style: normal;
+	border-left: 0px none;
+}
+/* inline edit actions button*/
+.ui-inline-del.ui-state-hover span,.ui-inline-edit.ui-state-hover span,.ui-inline-save.ui-state-hover span,.ui-inline-cancel.ui-state-hover span
+	{
+	margin: -1px;
+}
+/* Tree Grid */
+.ui-jqgrid .tree-wrap {
+	float: left;
+	position: relative;
+	height: 18px;
+	white-space: nowrap;
+	overflow: hidden;
+}
+
+.ui-jqgrid .tree-minus {
+	position: absolute;
+	height: 18px;
+	width: 18px;
+	overflow: hidden;
+}
+
+.ui-jqgrid .tree-plus {
+	position: absolute;
+	height: 18px;
+	width: 18px;
+	overflow: hidden;
+}
+
+.ui-jqgrid .tree-leaf {
+	position: absolute;
+	height: 18px;
+	width: 18px;
+	overflow: hidden;
+}
+
+.ui-jqgrid .treeclick {
+	cursor: pointer;
+}
+/* moda dialog */
+* iframe.jqm {
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: -1;
+	width: expression(this.parentNode.offsetWidth +       'px');
+	height: expression(this.parentNode.offsetHeight +       'px');
+}
+
+.ui-jqgrid-dnd tr td {
+	border-right-width: 1px;
+	border-right-color: inherit;
+	border-right-style: solid;
+	height: 20px
+}
+/* RTL Support */
+.ui-jqgrid .ui-jqgrid-title-rtl {
+	float: right;
+	margin: .1em 0 .2em;
+}
+
+.ui-jqgrid .ui-jqgrid-hbox-rtl {
+	float: right;
+	padding-left: 20px;
+}
+
+.ui-jqgrid .ui-jqgrid-resize-ltr {
+	float: right;
+	margin: -2px -2px -2px 0px;
+}
+
+.ui-jqgrid .ui-jqgrid-resize-rtl {
+	float: left;
+	margin: -2px 0px -1px -3px;
+}
+
+.ui-jqgrid .ui-sort-rtl {
+	left: 0px;
+}
+
+.ui-jqgrid .tree-wrap-ltr {
+	float: left;
+}
+
+.ui-jqgrid .tree-wrap-rtl {
+	float: right;
+}
+
+.ui-jqgrid .ui-ellipsis {
+	text-overflow: ellipsis;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/about-gemfirexd.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/about-gemfirexd.png b/pulse/src/main/webapp/images/about-gemfirexd.png
new file mode 100644
index 0000000..caf9cba
Binary files /dev/null and b/pulse/src/main/webapp/images/about-gemfirexd.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/about-sqlfire.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/about-sqlfire.png b/pulse/src/main/webapp/images/about-sqlfire.png
new file mode 100644
index 0000000..82eec44
Binary files /dev/null and b/pulse/src/main/webapp/images/about-sqlfire.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/about.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/about.png b/pulse/src/main/webapp/images/about.png
new file mode 100644
index 0000000..348cfa0
Binary files /dev/null and b/pulse/src/main/webapp/images/about.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/acc-minus.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/acc-minus.png b/pulse/src/main/webapp/images/acc-minus.png
new file mode 100644
index 0000000..12ae640
Binary files /dev/null and b/pulse/src/main/webapp/images/acc-minus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/acc-n-minus.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/acc-n-minus.png b/pulse/src/main/webapp/images/acc-n-minus.png
new file mode 100644
index 0000000..3765c3a
Binary files /dev/null and b/pulse/src/main/webapp/images/acc-n-minus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/acc-n-plus.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/acc-n-plus.png b/pulse/src/main/webapp/images/acc-n-plus.png
new file mode 100644
index 0000000..d0cc730
Binary files /dev/null and b/pulse/src/main/webapp/images/acc-n-plus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/acc-plus.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/acc-plus.png b/pulse/src/main/webapp/images/acc-plus.png
new file mode 100644
index 0000000..c969fd9
Binary files /dev/null and b/pulse/src/main/webapp/images/acc-plus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/activeServer.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/activeServer.png b/pulse/src/main/webapp/images/activeServer.png
new file mode 100644
index 0000000..29fc29f
Binary files /dev/null and b/pulse/src/main/webapp/images/activeServer.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/arrow-down.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/arrow-down.png b/pulse/src/main/webapp/images/arrow-down.png
new file mode 100644
index 0000000..0fca9e7
Binary files /dev/null and b/pulse/src/main/webapp/images/arrow-down.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/arrow-up.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/arrow-up.png b/pulse/src/main/webapp/images/arrow-up.png
new file mode 100644
index 0000000..23d8769
Binary files /dev/null and b/pulse/src/main/webapp/images/arrow-up.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/bg-image.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/bg-image.png b/pulse/src/main/webapp/images/bg-image.png
new file mode 100644
index 0000000..82924d4
Binary files /dev/null and b/pulse/src/main/webapp/images/bg-image.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/bg-imageLogin.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/bg-imageLogin.png b/pulse/src/main/webapp/images/bg-imageLogin.png
new file mode 100644
index 0000000..97951d5
Binary files /dev/null and b/pulse/src/main/webapp/images/bg-imageLogin.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/blue-msg-icon.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/blue-msg-icon.png b/pulse/src/main/webapp/images/blue-msg-icon.png
new file mode 100644
index 0000000..c2da59a
Binary files /dev/null and b/pulse/src/main/webapp/images/blue-msg-icon.png differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/images/border-left-grid.png
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/images/border-left-grid.png b/pulse/src/main/webapp/images/border-left-grid.png
new file mode 100644
index 0000000..7162755
Binary files /dev/null and b/pulse/src/main/webapp/images/border-left-grid.png differ


[46/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.txt
----------------------------------------------------------------------
diff --git a/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.txt b/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.txt
new file mode 100644
index 0000000..e503b4a
--- /dev/null
+++ b/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.txt
@@ -0,0 +1,1277 @@
+open_source_license.txt
+
+VMware vFabric GemFire Pulse 7.0 GA
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software components (or portions thereof) that are distributed with
+this VMware software products.
+
+The VMware Product may also include other VMware components, which may contain additional open 
+source software packages. One or more such open_source_licenses.txt files may therefore 
+accompany this VMware Product. 
+
+The VMware product that includes this file does not necessarily use all the
+open source software components referred to below and may also only use
+portions of a given component.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in this
+document.  This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> flot-0.7
+   >>> infovistoolkit-2.0.1
+   >>> jqgrid-4.4.0
+   >>> jquery-1.7.2
+   >>> jquery-sparklines-2.0
+   >>> jquery-ui-1.8.23
+   >>> json-none
+
+
+
+SECTION 2: Apache License, V2.0
+
+   >>> commons-beanutils-1.8.3
+   >>> commons-digester-1.8.1
+   >>> commons-logging-1.1.1
+   >>> commons.collections-3.2.0
+   >>> spring-aop-3.1.1.release
+   >>> spring-asm-3.1.1.release
+   >>> spring-beans-3.1.1.release
+   >>> spring-context-3.1.1.release
+   >>> spring-core-3.1.1.release
+   >>> spring-expression-3.1.1.release
+   >>> spring-security-config-3.1.1.release
+   >>> spring-security-core-3.1.1.release
+   >>> spring-security-web-3.1.1.release
+   >>> spring-web-3.1.1.release
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+   
+   >>> GNU Lesser General Public License, V2.1
+   
+  
+   
+  
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> flot-0.7
+
+Copyright (c) 2007-2012 IOLA and Ole Laursen
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+
+> Apache 2.0
+
+Downloads\flot-flot-v0.7-114-g7a22921.zip\flot-flot-7a22921\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> infovistoolkit-2.0.1
+
+Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> Apache 2.0
+
+Jit-2.0.1.zip\Jit\Extras\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> jqgrid-4.4.0
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+Changes from Tony Tomov tony@trirand.com
+Dual licensed under the MIT and GPL licenses:
+http://www.opensource.org/licenses/mit-license.php
+http://www.gnu.org/licenses/gpl-2.0.html
+
+The MIT License (MIT)
+Copyright (c) <year> <copyright holders>
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> LGPL 2.1
+
+jquery.jqGrid-4.4.1.zip\src\JsonXml.js
+
+The below work is licensed under Creative Commons GNU LGPL License.
+
+Original work:
+
+License:     http://creativecommons.org/licenses/LGPL/2.1/
+Author:      Stefan Goessner/2006
+Web:         http://goessner.net/
+
+Modifications made:
+
+Version:     0.9-p5
+Description: Restructured code, JSLint validated (no strict whitespaces),
+added handling of empty arrays, empty strings, and int/floats values.
+Author:      Michael Schler/2008-01-29
+Web:         http://michael.hinnerup.net/blog/2008/01/26/converting-json-to-xml-and-xml-to-json/
+
+Description: json2xml added support to convert functions as CDATA
+so it will be easy to write characters that cause some problems when convert
+Author:      Tony Tomov
+
+
+
+
+
+>>> jquery-1.7.2
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
+
+Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+
+Dual licensed under the MIT and GPL licenses:
+
+http://www.opensource.org/licenses/mit-license.php
+
+http://www.gnu.org/licenses/gpl.html
+
+The MIT License (MIT)
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> jquery-sparklines-2.0
+
+Copyright (c) 2012, Splunk Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of Splunk Inc nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+>>> jquery-ui-1.8.23
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE.PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE.THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+
+Copyright 2011, John Resig
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+Includes Sizzle.js
+http://sizzlejs.com/
+Copyright 2011, The Dojo Foundation
+Released under the MIT, BSD, and GPL Licenses.
+
+Date: Wed Mar 21 12:46:34 2012 -0700
+
+
+Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/
+
+This software consists of voluntary contributions made by many
+individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
+contribution history, see the revision history and logs, available
+at http://jquery-ui.googlecode.com/svn/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> json-none
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 is applicable to the following component(s).
+
+
+>>> commons-beanutils-1.8.3
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons-digester-1.8.1
+
+Apache Commons Digester
+Copyright 2001-2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+>>> commons-logging-1.1.1
+
+Apache Commons Logging
+Copyright 2003-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons.collections-3.2.0
+
+Copyright 2003-2005 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+commons-collections-3.2.jar
+commons-collections-testframework-3.2.jar
+
+
+>>> spring-aop-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-asm-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-beans-3.1.1.release
+
+Copyright 2002-2009 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-context-3.1.1.release
+
+Copyright 2002-2011 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-core-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-expression-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-security-config-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-security-core-3.1.1.release
+
+Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+
+> MIT
+
+org.springframework.security.core-sources-3.1.1.RELEASE.jar\org\springframework\security\crypto\bcrypt\BCrypt.java
+
+Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+>>> spring-security-web-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-web-3.1.1.release
+
+Copyright 2002-2011 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+
+--------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
+
+			GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America. All such
+requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively,
+the Source Files may accompany the VMware product.
+
+
+[GFPULSE70GANV101512]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/release/3rdparty_licenses/open_source_licenses-vFabric_GemFire_Pulse_7.0.0.txt
----------------------------------------------------------------------
diff --git a/pulse/release/3rdparty_licenses/open_source_licenses-vFabric_GemFire_Pulse_7.0.0.txt b/pulse/release/3rdparty_licenses/open_source_licenses-vFabric_GemFire_Pulse_7.0.0.txt
new file mode 100644
index 0000000..ca447c2
--- /dev/null
+++ b/pulse/release/3rdparty_licenses/open_source_licenses-vFabric_GemFire_Pulse_7.0.0.txt
@@ -0,0 +1 @@
+GemFire Pulse 7.0 Open Source License File


[18/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.generateFile.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.generateFile.js b/pulse/src/main/webapp/scripts/lib/jquery.generateFile.js
new file mode 100644
index 0000000..391542e
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.generateFile.js
@@ -0,0 +1,58 @@
+(function($){
+	
+	// Creating a jQuery plugin:
+	
+	$.generateFile = function(options){
+		
+		options = options || {};
+		
+		if(!options.script || !options.filename || !options.content){
+			throw new Error("Please enter all the required config options!");
+		}
+		
+		// Creating a 1 by 1 px invisible iframe:
+		
+		var iframe = $('<iframe>',{
+			width:1,
+			height:1,
+			frameborder:0,
+			css:{
+				display:'none'
+			}
+		}).appendTo('body');
+
+		var formHTML = '<form action="" method="post">'+
+			'<input type="hidden" name="filename" />'+
+			'<input type="hidden" name="content" />'+
+			'</form>';
+		
+		// Giving IE a chance to build the DOM in
+		// the iframe with a short timeout:
+		
+		setTimeout(function(){
+		
+			// The body element of the iframe document:
+		
+			var body = (iframe.prop('contentDocument') !== undefined) ?
+							iframe.prop('contentDocument').body :
+							iframe.prop('document').body;	// IE
+			
+			body = $(body);
+			
+			// Adding the form to the body:
+			body.html(formHTML);
+			
+			var form = body.find('form');
+			
+			form.attr('action',options.script);
+			form.find('input[name=filename]').val(options.filename);
+			form.find('input[name=content]').val(options.content);
+			
+			// Submitting the form to download.php. This will
+			// cause the file download dialog box to appear.
+			
+			form.submit();
+		},50);
+	};
+	
+})(jQuery);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.i18n.properties.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.i18n.properties.js b/pulse/src/main/webapp/scripts/lib/jquery.i18n.properties.js
new file mode 100644
index 0000000..fe6a737
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.i18n.properties.js
@@ -0,0 +1,336 @@
+/******************************************************************************
+ * jquery.i18n.properties
+ * 
+ * Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and 
+ * MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
+ * 
+ * @version     1.0.x
+ * @author      Nuno Fernandes
+ * @url         www.codingwithcoffee.com
+ * @inspiration Localisation assistance for jQuery (http://keith-wood.name/localisation.html)
+ *              by Keith Wood (kbwood{at}iinet.com.au) June 2007
+ * 
+ *****************************************************************************/
+
+(function($) {
+$.i18n = {};
+
+/** Map holding bundle keys (if mode: 'map') */
+$.i18n.map = {};
+    
+/**
+ * Load and parse message bundle files (.properties),
+ * making bundles keys available as javascript variables.
+ * 
+ * i18n files are named <name>.js, or <name>_<language>.js or <name>_<language>_<country>.js
+ * Where:
+ *      The <language> argument is a valid ISO Language Code. These codes are the lower-case, 
+ *      two-letter codes as defined by ISO-639. You can find a full list of these codes at a 
+ *      number of sites, such as: http://www.loc.gov/standards/iso639-2/englangn.html
+ *      The <country> argument is a valid ISO Country Code. These codes are the upper-case,
+ *      two-letter codes as defined by ISO-3166. You can find a full list of these codes at a
+ *      number of sites, such as: http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
+ * 
+ * Sample usage for a bundles/Messages.properties bundle:
+ * $.i18n.properties({
+ *      name:      'Messages', 
+ *      language:  'en_US',
+ *      path:      'bundles'
+ * });
+ * @param  name			(string/string[], required) names of file to load (eg, 'Messages' or ['Msg1','Msg2'])
+ * @param  language		(string, optional) language/country code (eg, 'en', 'en_US', 'pt_PT'). if not specified, language reported by the browser will be used instead.
+ * @param  path			(string, optional) path of directory that contains file to load
+ * @param  mode			(string, optional) whether bundles keys are available as JavaScript variables/functions or as a map (eg, 'vars' or 'map')
+ * @param  callback     (function, optional) callback function to be called after script is terminated
+ */
+$.i18n.properties = function(settings) {
+	// set up settings
+    var defaults = {
+        name:           'Messages',
+        language:       '',
+        path:           '',  
+        mode:           'vars',
+        callback:       function(){}
+    };
+    settings = $.extend(defaults, settings);    
+    if(settings.language === null || settings.language == '') {
+	   settings.language = $.i18n.browserLang();
+	}
+	if(settings.language === null) {settings.language='';}
+	
+	// load and parse bundle files
+	var files = getFiles(settings.name);
+	for(i=0; i<files.length; i++) {
+		// 1. load base (eg, Messages.properties)
+		loadAndParseFile(settings.path + files[i] + '.properties', settings.language, settings.mode);
+        // 2. with language code (eg, Messages_pt.properties)
+		if(settings.language.length >= 2) {
+            loadAndParseFile(settings.path + files[i] + '_' + settings.language.substring(0, 2) +'.properties', settings.language, settings.mode);
+		}
+		// 3. with language code and country code (eg, Messages_pt_PT.properties)
+        if(settings.language.length >= 5) {
+            loadAndParseFile(settings.path + files[i] + '_' + settings.language.substring(0, 5) +'.properties', settings.language, settings.mode);
+        }
+	}
+	
+	// call callback
+	if(settings.callback){ settings.callback(); }
+};
+
+
+/**
+ * When configured with mode: 'map', allows access to bundle values by specifying its key.
+ * Eg, jQuery.i18n.prop('com.company.bundles.menu_add')
+ */
+$.i18n.prop = function(key, placeHolderValues) {
+	var value = $.i18n.map[key];
+	if(value == null) { return '[' + key + ']'; }
+	if(!placeHolderValues) {
+    //if(key == 'spv.lbl.modified') {alert(value);}
+		return value;
+	}else{
+		for(var i=0; i<placeHolderValues.length; i++) {
+			var regexp = new RegExp('\\{('+i+')\\}', "g");
+			value = value.replace(regexp, placeHolderValues[i]);
+		}
+		return value;
+	}
+};
+
+/** Language reported by browser, normalized code */
+$.i18n.browserLang = function() {
+	return normaliseLanguageCode(navigator.language /* Mozilla */ || navigator.userLanguage /* IE */);
+}
+
+
+/** Load and parse .properties files */
+function loadAndParseFile(filename, language, mode) {
+	$.ajax({
+        url:        filename,
+        async:      false,
+        cache:		false,
+        contentType:'text/plain;charset=UTF-8',
+        dataType:   'text',
+        success:    function(data, status) {
+        				parseData(data, mode); 
+					}
+    });
+}
+
+/** Parse .properties files */
+function parseData(data, mode) {
+   var parsed = '';
+   var parameters = data.split( /\n/ );
+   var regPlaceHolder = /(\{\d+\})/g;
+   var regRepPlaceHolder = /\{(\d+)\}/g;
+   var unicodeRE = /(\\u.{4})/ig;
+   for(var i=0; i<parameters.length; i++ ) {
+       parameters[i] = parameters[i].replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
+       if(parameters[i].length > 0 && parameters[i].match("^#")!="#") { // skip comments
+           var pair = parameters[i].split('=');
+           if(pair.length > 0) {
+               /** Process key & value */
+               var name = unescape(pair[0]).replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim
+               var value = pair.length == 1 ? "" : pair[1];
+               // process multi-line values
+               while(value.match(/\\$/)=="\\") {
+               		value = value.substring(0, value.length - 1);
+               		value += parameters[++i].replace( /\s\s*$/, '' ); // right trim
+               }               
+               for(var s=2;s<pair.length;s++){ value +='=' + pair[s]; }
+               value = value.replace( /"/g, '\\"' ); // escape quotation mark (")
+               value = value.replace( /^\s\s*/, '' ).replace( /\s\s*$/, '' ); // trim  
+               
+               /** Mode: bundle keys in a map */
+               if(mode == 'map' || mode == 'both') {
+                   // handle unicode chars possibly left out
+                   var unicodeMatches = value.match(unicodeRE);
+                   if(unicodeMatches) {
+                     for(var u=0; u<unicodeMatches.length; u++) {
+                        value = value.replace( unicodeMatches[u], unescapeUnicode(unicodeMatches[u]));
+                     }
+                   }
+                   // add to map
+                   $.i18n.map[name] = value;
+               }
+               
+               /** Mode: bundle keys as vars/functions */
+               if(mode == 'vars' || mode == 'both') {
+                   // make sure namespaced key exists (eg, 'some.key') 
+                   checkKeyNamespace(name);
+                   
+                   // value with variable substitutions
+                   if(regPlaceHolder.test(value)) {
+                       var parts = value.split(regPlaceHolder);
+                       // process function args
+                       var first = true;
+                       var fnArgs = '';
+                       var usedArgs = [];
+                       for(var p=0; p<parts.length; p++) {
+                           if(regPlaceHolder.test(parts[p]) && (usedArgs.length == 0 || usedArgs.indexOf(parts[p]) == -1)) {
+                               if(!first) {fnArgs += ',';}
+                               fnArgs += parts[p].replace(regRepPlaceHolder, 'v$1');
+                               usedArgs.push(parts[p]);
+                               first = false;
+                           }
+                       }
+                       parsed += name + '=function(' + fnArgs + '){';
+                       // process function body
+                       var fnExpr = '"' + value.replace(regRepPlaceHolder, '"+v$1+"') + '"';
+                       parsed += 'return ' + fnExpr + ';' + '};';
+                       
+                   // simple value
+                   }else{
+                       parsed += name+'="'+value+'";';
+                   }
+               } // END: Mode: bundle keys as vars/functions
+           } // END: if(pair.length > 0)
+       } // END: skip comments
+   }
+   eval(parsed);
+}
+
+/** Make sure namespace exists (for keys with dots in name) */
+function checkKeyNamespace(key) {
+	var regDot = /\./;
+	if(regDot.test(key)) {
+		var fullname = '';
+		var names = key.split( /\./ );
+		for(var i=0; i<names.length; i++) {
+			if(i>0) {fullname += '.';}
+			fullname += names[i];
+			if(eval('typeof '+fullname+' == "undefined"')) {
+				eval(fullname + '={};');
+			}
+		}
+	}
+}
+
+/** Make sure filename is an array */
+function getFiles(names) {
+	return (names && names.constructor == Array) ? names : [names];
+}
+
+/** Ensure language code is in the format aa_AA. */
+function normaliseLanguageCode(lang) {
+    lang = lang.toLowerCase();
+    if(lang.length > 3) {
+        lang = lang.substring(0, 3) + lang.substring(3).toUpperCase();
+    }
+    return lang;
+}
+
+/** Unescape unicode chars ('\u00e3') */
+function unescapeUnicode(str) {
+  // unescape unicode codes
+  var codes = [];
+  var code = parseInt(str.substr(2), 16);
+  if (code >= 0 && code < Math.pow(2, 16)) {
+     codes.push(code);
+  }
+  // convert codes to text
+  var unescaped = '';
+  for (var i = 0; i < codes.length; ++i) {
+    unescaped += String.fromCharCode(codes[i]);
+  }
+  return unescaped;
+}
+
+/* Cross-Browser Split 1.0.1
+(c) Steven Levithan <stevenlevithan.com>; MIT License
+An ECMA-compliant, uniform cross-browser split method */
+var cbSplit;
+// avoid running twice, which would break `cbSplit._nativeSplit`'s reference to the native `split`
+if (!cbSplit) {    
+  cbSplit = function(str, separator, limit) {
+      // if `separator` is not a regex, use the native `split`
+      if (Object.prototype.toString.call(separator) !== "[object RegExp]") {
+        if(typeof cbSplit._nativeSplit == "undefined")
+          return str.split(separator, limit);
+        else
+          return cbSplit._nativeSplit.call(str, separator, limit);
+      }
+  
+      var output = [],
+          lastLastIndex = 0,
+          flags = (separator.ignoreCase ? "i" : "") +
+                  (separator.multiline  ? "m" : "") +
+                  (separator.sticky     ? "y" : ""),
+          separator = RegExp(separator.source, flags + "g"), // make `global` and avoid `lastIndex` issues by working with a copy
+          separator2, match, lastIndex, lastLength;
+  
+      str = str + ""; // type conversion
+      if (!cbSplit._compliantExecNpcg) {
+          separator2 = RegExp("^" + separator.source + "$(?!\\s)", flags); // doesn't need /g or /y, but they don't hurt
+      }
+  
+      /* behavior for `limit`: if it's...
+      - `undefined`: no limit.
+      - `NaN` or zero: return an empty array.
+      - a positive number: use `Math.floor(limit)`.
+      - a negative number: no limit.
+      - other: type-convert, then use the above rules. */
+      if (limit === undefined || +limit < 0) {
+          limit = Infinity;
+      } else {
+          limit = Math.floor(+limit);
+          if (!limit) {
+              return [];
+          }
+      }
+  
+      while (match = separator.exec(str)) {
+          lastIndex = match.index + match[0].length; // `separator.lastIndex` is not reliable cross-browser
+  
+          if (lastIndex > lastLastIndex) {
+              output.push(str.slice(lastLastIndex, match.index));
+  
+              // fix browsers whose `exec` methods don't consistently return `undefined` for nonparticipating capturing groups
+              if (!cbSplit._compliantExecNpcg && match.length > 1) {
+                  match[0].replace(separator2, function () {
+                      for (var i = 1; i < arguments.length - 2; i++) {
+                          if (arguments[i] === undefined) {
+                              match[i] = undefined;
+                          }
+                      }
+                  });
+              }
+  
+              if (match.length > 1 && match.index < str.length) {
+                  Array.prototype.push.apply(output, match.slice(1));
+              }
+  
+              lastLength = match[0].length;
+              lastLastIndex = lastIndex;
+  
+              if (output.length >= limit) {
+                  break;
+              }
+          }
+  
+          if (separator.lastIndex === match.index) {
+              separator.lastIndex++; // avoid an infinite loop
+          }
+      }
+  
+      if (lastLastIndex === str.length) {
+          if (lastLength || !separator.test("")) {
+              output.push("");
+          }
+      } else {
+          output.push(str.slice(lastLastIndex));
+      }
+  
+      return output.length > limit ? output.slice(0, limit) : output;
+  };
+  
+  cbSplit._compliantExecNpcg = /()??/.exec("")[1] === undefined; // NPCG: nonparticipating capturing group
+  cbSplit._nativeSplit = String.prototype.split;
+
+} // end `if (!cbSplit)`
+String.prototype.split = function (separator, limit) {
+    return cbSplit(this, separator, limit);
+};
+
+})(jQuery);
+                
\ No newline at end of file


[59/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/MapLiteSerializer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/MapLiteSerializer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/MapLiteSerializer.java
deleted file mode 100644
index fe9b09a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/MapLiteSerializer.java
+++ /dev/null
@@ -1,338 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.pogo;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Date;
-import java.util.zip.DataFormatException;
-import java.util.zip.Deflater;
-import java.util.zip.Inflater;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-
-/**
- * MapLiteSerializer serializes MapLite specifics. It is for internal use only.
- * @author dpark
- *
- */
-abstract class MapLiteSerializer extends DataSerializer
-{
-	public static void write(Class cls, Object object, DataOutput out) throws IOException
-	{
-		if (cls == String.class) {
-			writeUTF((String) object, out);
-		} else if (cls == boolean.class || cls == Boolean.class) {
-			writeBoolean((Boolean) object, out);
-		} else if (cls == byte.class || cls == Byte.class) {
-			writeByte((Byte) object, out);
-		} else if (cls == char.class || cls == Character.class) {
-			writeCharacter((Character) object, out);
-		} else if (cls == double.class || cls == Double.class) {
-			writeDouble((Double) object, out);
-		} else if (cls == float.class || cls == Float.class) {
-			writeFloat((Float) object, out);
-		} else if (cls == int.class || cls == Integer.class) {
-			writeInteger((Integer) object, out);
-		} else if (cls == long.class || cls == Long.class) {
-			writeLong((Long) object, out);
-		} else if (cls == short.class || cls == Short.class) {
-			writeShort((Short) object, out);
-		} else if (cls == MapLite.class) {
-			writeMapLite((MapLite) object, out);
-		} else if (cls == Date.class) {
-			writeObject((Date) object, out);
-		} else if (cls == boolean[].class) {
-			writeBooleanArray((boolean[]) object, out);
-		} else if (cls == byte[].class) {
-			writeByteArray((byte[]) object, out);
-		} else if (cls == char[].class) {
-			writeCharArray((char[]) object, out);
-		} else if (cls == double[].class) {
-			writeDoubleArray((double[]) object, out);
-		} else if (cls == float[].class) {
-			writeFloatArray((float[]) object, out);
-		} else if (cls == int[].class) {
-			writeIntArray((int[]) object, out);
-		} else if (cls == long[].class) {
-			writeLongArray((long[]) object, out);
-		} else if (cls == short[].class) {
-			writeShortArray((short[]) object, out);
-		} else {
-			writeObject(object, out);
-		}
-	}
-	
-	public static Object read(Class cls, DataInput in) throws IOException, ClassNotFoundException
-	{
-		Object value;
-		if (cls == String.class) {
-			value = readUTF(in);
-		} else if (cls == boolean.class || cls == Boolean.class) {
-			value = readBoolean(in);
-		} else if (cls == byte.class || cls == Byte.class) {
-			value = readByte(in);
-		} else if (cls == char.class || cls == Character.class) {
-			value = readCharacter(in);
-		} else if (cls == double.class || cls == Double.class) {
-			value = readDouble(in);
-		} else if (cls == float.class || cls == Float.class) {
-			value = readFloat(in);
-		} else if (cls == int.class || cls == Integer.class) {
-			value = readInteger(in);
-		} else if (cls == long.class || cls == Long.class) {
-			value = readLong(in);
-		} else if (cls == short.class || cls == Short.class) {
-			value = readShort(in);
-		} else if (cls == MapLite.class) {
-			value = readMapLite(in);
-		} else if (cls == Date.class) {
-			value = readObject(in);
-		} else if (cls == boolean[].class) {
-			value = DataSerializer.readBooleanArray(in);
-		} else if (cls == byte[].class) {
-			value = DataSerializer.readByteArray(in);
-		} else if (cls == char[].class) {
-			value = DataSerializer.readCharacter(in);
-		} else if (cls == double[].class) {
-			value = DataSerializer.readByteArray(in);
-		} else if (cls == float[].class) {
-			value = DataSerializer.readByteArray(in);
-		} else if (cls == int[].class) {
-			value = DataSerializer.readByteArray(in);
-		} else if (cls == long[].class) {
-			value = DataSerializer.readByteArray(in);
-		} else if (cls == short[].class) {
-			value = DataSerializer.readByteArray(in);
-		} else {
-			value = DataSerializer.readObject(in);
-		}
-		return value;
-	}
-	
-	/**
-	 * Writes the specified byte array to the output stream. This method is 
-	 * not thread safe.
-	 * 
-	 * @param array The byte array to compress
-	 * @param buffer The byte array buffer used as input to the deflater. This
-	 *               buffer must have enough space to hold the compressed data.
-	 * @param compressor java.util.Deflater. 
-	 * @param output The data output stream.
-	 * @throws IOException Thrown if unable to write to the output stream.
-	 */
-	public static void writeByteArray(byte array[], byte buffer[], Deflater compressor, DataOutput output) throws IOException
-	{
-		// Compress the bytes
-		 compressor.setInput(array);
-		 compressor.finish();
-		 int compressedDataLength = compressor.deflate(buffer);
-		 DataSerializer.writeByteArray(buffer, compressedDataLength, output);
-	}
-	
-	/**
-	 * Reads byte array from the input stream. This method is not thread safe.
-	 * 
-	 * @param buffer The buffer to hold the decompressed data. This buffer
-	 *               must be large enough to hold the decompressed data.
-	 * @param decompressor java.util.Inflater
-	 * @param input The data input stream.
-	 * @return Returns the actual byte array (not compressed) read from the 
-	 *         input stream.
-	 * @throws IOException Thrown if unable to read from the input stream or
-	 *                     unable to decompress the data.
-	 */
-	public static byte[] readByteArray(byte buffer[], Inflater decompressor, DataInput input) throws IOException
-	{
-		byte compressedBuffer[] = DataSerializer.readByteArray(input);	
-		// Decompress the bytes
-		decompressor.setInput(compressedBuffer, 0, compressedBuffer.length);
-		byte retval[] = null;
-		try {
-			int resultLength = decompressor.inflate(buffer);
-			retval = new byte[resultLength];
-			System.arraycopy(compressedBuffer, 0, retval, 0, resultLength);
-		} catch (DataFormatException e) {
-			throw new IOException("Unable to decompress the byte array due to a data format error. " + e.getMessage());
-		}
-		return retval;
-	}
-	
-	/**
-	 * Reads UTF string from the input. This method is analogous to 
-	 * DataInput.readUTF() except that it supports null string.
-	 * @param input The data input stream.
-	 * @return Returns null or non-null string value.
-	 * @throws IOException Thrown if unable to read from the input stream.
-	 */
-	public static String readUTF(DataInput input) throws IOException
-	{
-		byte header = input.readByte();
-		if (header == DSCODE.NULL_STRING) {
-			return null;
-		} 
-		return input.readUTF();
-	}
-	
-	/**
-	 * Writes the specified sting value to the output stream. This method
-	 * is analogous to DataOutput.writeUTF() except that it supports null
-	 * string.
-	 * @param value The string value to write to the output stream.
-	 * @param output The data output stream.
-	 * @throws IOException Thrown if unable to write to the output stream. 
-	 */
-	public static void writeUTF(String value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeByte(DSCODE.NULL_STRING);
-		} else {
-			output.writeByte(DSCODE.STRING);
-			output.writeUTF(value);
-		}		
-	}
-	
-	/**
-	 * Reads boolean value;
-	 */
-	public static Boolean readBoolean(DataInput input) throws IOException
-	{
-		return input.readBoolean();
-	}
-	
-	/**
-	 * Writes the specified boolean value to the stream. If the value is null
-	 * then it write false.
-	 * @param value The value to write
-	 * @param output
-	 * @throws IOException
-	 */
-	public static void writeBoolean(Boolean value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeBoolean(false);
-		} else {
-			output.writeBoolean(value);
-		}
-	}
-	
-	public static Byte readByte(DataInput input) throws IOException
-	{
-		return input.readByte();
-	}
-	
-	public static void writeByte(Byte value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeByte(0);
-		} else {
-			output.writeByte(value);
-		}
-	}
-	
-	public static Character readCharacter(DataInput input) throws IOException
-	{
-		return input.readChar();
-	}
-	
-	public static void writeCharacter(Character value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeChar(0);
-		} else {
-			output.writeChar(value);
-		}
-	}
-	
-	public static Double readDouble(DataInput input) throws IOException
-	{
-		return input.readDouble();
-	}
-	
-	public static void writeDouble(Double value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeDouble(0);
-		} else {
-			output.writeDouble(value);
-		}
-	}
-	
-	public static Float readFloat(DataInput input) throws IOException
-	{
-		return input.readFloat();
-	}
-	
-	public static void writeFloat(Float value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeFloat(0);
-		} else {
-			output.writeFloat(value);
-		}
-	}
-	
-	public static Integer readInteger(DataInput input) throws IOException
-	{
-		return input.readInt();
-	}
-	
-	public static void writeInteger(Integer value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeInt(0);
-		} else {
-			output.writeInt(value);
-		}
-	}
-	
-	public static Long readLong(DataInput input) throws IOException
-	{
-		return input.readLong();
-	}
-	
-	public static void writeLong(Long value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeLong(0);
-		} else {
-			output.writeLong(value);
-		}
-	}
-	
-	public static Short readShort(DataInput input) throws IOException
-	{
-		return input.readShort();
-	}
-	
-	public static void writeShort(Short value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeShort(0);
-		} else {
-			output.writeShort(value);
-		}
-	}
-	
-	public static MapLite readMapLite(DataInput input) throws ClassNotFoundException, IOException
-	{
-		byte header = input.readByte();
-		if (header == DSCODE.NULL){
-			return null;
-		}
-		MapLite fo = new MapLite();
-		InternalDataSerializer.invokeFromData(fo, input);
-		return fo;
-	}
-	
-	public static void writeMapLite(MapLite value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeByte(DSCODE.NULL);
-		} else {
-			output.writeByte(DSCODE.DS_NO_FIXED_ID);
-			InternalDataSerializer.invokeToData(value, output);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/DBUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/DBUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/DBUtil.java
deleted file mode 100644
index 42ee2c7..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/DBUtil.java
+++ /dev/null
@@ -1,1094 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2008, Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *========================================================================
- */
-package com.gemstone.gemfire.internal.tools.gfsh.app.util;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.Driver;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.types.CollectionType;
-import com.gemstone.gemfire.cache.query.types.ObjectType;
-import com.gemstone.gemfire.cache.query.types.StructType;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ReflectionUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-/**
- * DBUtil is a simple database utility class that updates the database
- * with the RBC TradeCapture specific objects.
- * 
- * @author dpark
- */
-public class DBUtil
-{
-	public static final int TYPE_KEYS = 0;
-	public static final int TYPE_VALUES = 1;
-	public static final int TYPE_KEYS_VALUES = 2;
-	
-	
-	private static DBUtil dbutil;
-	
-    static SimpleDateFormat dateFormat = new SimpleDateFormat(
-            "MM/dd/yyyy HH:mm:ss.SSS");
-    static SimpleDateFormat smallDateFormat = new SimpleDateFormat(
-    "MM/dd/yy");
-
-    protected Connection conn;
-    private String driverName;
-    private String url;
-    private String userName;
-    
-
-    /**
-     * Creates a DBUtil object that provides access to the database.
-     *
-     * @param driverName The JDBC dirver name. For example,
-     *                   com.nywe.db.sybaseImpl.SybaseDBConn.
-     * @throws DBUtilException Thrown if the driver does not exist.
-     */
-    private DBUtil(String driverName) throws DBUtilException
-    {
-        init(driverName);
-    }
-    
-    @SuppressFBWarnings(value="LI_LAZY_INIT_UPDATE_STATIC",justification="This looks like singleton and at present looks like desired functionality")
-    public static DBUtil initialize(String driverName, String url, String userName,
-            String password) throws DBUtilException
-    {
-    	if (dbutil != null) {
-    		dbutil.close();
-    	}
-    	dbutil = new DBUtil(driverName);
-    	dbutil.connect(url, userName, password);
-    	return dbutil;
-    }
-    
-    public static DBUtil getDBUtil()
-    {
-    	return dbutil;
-    }
-
-    /**
-     * Initializes DB.
-     * @param driverName The name of the JDBC Driver. For example,
-     *                   com.nywe.db.sybaseImpl.SybaseDBConn.
-     */
-    private void init(String driverName) throws DBUtilException
-    {
-        try {
-            // finds and loads the driver dynamically
-            Driver driver = (Driver) Class.forName(driverName).newInstance();
-            DriverManager.registerDriver(driver);
-            this.driverName = driverName;
-        } catch (Exception ex) {
-            throw new DBUtilException(ex);
-        }
-    }
-
-    /**
-     * Establishes connection to the database server.
-     * @param url The database URL.
-     * @param userName The user name used to login to the database.
-     * @param password The password used to login to the database.
-     * @throws DBUtilException Thrown if it encounters a database connection error.
-     */
-    private synchronized void connect(String url, String userName,
-        String password) throws DBUtilException
-    {
-        if (conn != null) {
-            throw new DBUtilException(DBUtilException.ERROR_CONNECTION_ALREADY_ESTABLISHED,
-                                      "The database connection has already been established. To establish a new connection, close it first.");
-        }
-
-        Properties props = new Properties();
-        props.put("user", userName);
-        props.put("password", password);
-
-        try {
-            conn = DriverManager.getConnection(url, props);
-            this.url = url;
-            this.userName = userName;
-        } catch (SQLException ex) {
-            ex.printStackTrace();
-            System.out.println("Error Code: " + ex.getErrorCode());
-        } catch (Exception ex) {
-            ex.printStackTrace();
-            throw new DBUtilException(ex);
-        }
-    }
-
-    public String getDriverName()
-	{
-		return driverName;
-	}
-
-	public String getUrl()
-	{
-		return url;
-	}
-
-	public String getUserName()
-	{
-		return userName;
-	}
-
-	/**
-     * Cloases the database connection and frees all system resources used
-     * by DBUtil.
-     *
-     * @throws DBUtilException Thrown if it encounters a database communcations
-     *                         error.
-     */
-    public synchronized void close() throws DBUtilException
-    {
-        try {
-            if (conn != null) {
-                conn.close();
-                conn = null;
-            }
-        } catch (Exception ex) {
-            throw new DBUtilException(ex);
-        }
-    }
-    
-    
-    /**
-     * Returns true if DBUtil has been closed, otherwise, false. If DBUtil is
-     * closed then DBUtil is no longer usable. To reconnect, call connect() again.
-     */
-    public boolean isClosed()
-    {
-        return (conn == null);
-    }
-	
-	public int loadDB(Gfsh gfsh, Region region, 
-			Class keyClass, 
-			Class valueClass, 
-			String sql, 
-			String primaryColumn) throws DBUtilException 
-	{
-		int count = 0;
-    PreparedStatement statement = null;
-		
-		try {
-			Map<String, Method> keySettersMap = ReflectionUtil.getAllSettersMap(keyClass);
-			Map<String, Method> valueSettersMap = ReflectionUtil.getAllSettersMap(valueClass);
-			
-			// realMap is for mapping methods to case-insensitive table columns
-			Map<String, Method> realMap = new HashMap();
-			
-			if (sql.startsWith("select ") == false) {
-				// it's table name. create sql
-				sql = "select * from " + sql;
-			}
-
-	    	statement = conn.prepareStatement(sql);
-	    	ResultSet resultSet = statement.executeQuery();
-	    	
-    		while (resultSet.next()) {
-	            
-	            // key
-            	Object key = updateObject(gfsh, keyClass, keySettersMap, realMap, resultSet, primaryColumn);
-            	
-            	// value
-            	Object value = updateObject(gfsh, valueClass, valueSettersMap, realMap, resultSet, null);
-        	
-            	region.put(key, value);
-            	
-	            count++;
-            }
-        
-    	} catch (Exception ex) {
-    		throw new DBUtilException(ex);
-    	} finally {
-    	  if (statement != null) {
-    	    try {
-            statement.close();
-          } catch (SQLException e) {
-            throw new DBUtilException(e);
-          }
-        }
-    	}
-    	
-    	return count;
-	}
-    
-	public int storeDB(Gfsh gfsh, Region region, String tableName, 
-			int storeType, String primaryColumn, 
-			boolean isKeyPrimary) throws DBUtilException
-	{
-		int count = 0;
-		try {
-			DatabaseMetaData meta = conn.getMetaData();
-			ResultSet resultSet = meta.getColumns(null, null, tableName, null);
-			ArrayList<ColumnInfo> columnList = new ArrayList();
-			while (resultSet.next()) {
-				ColumnInfo info = new ColumnInfo();
-				info.name = (String)resultSet.getObject("COLUMN_NAME");
-				info.type = (Integer)resultSet.getObject("DATA_TYPE"); // java.sql.Types
-				columnList.add(info);
-			}
-			
-			// Collect all matching field names from the region object
-			Set<Region.Entry> entrySet = region.entrySet();
-			
-			Map<String, Method> keyGettersMap = new HashMap(0);
-			Map<String, Method> valueGettersMap = new HashMap(0);
-			int columnCount = 0; 
-			String keyKeys[] = new String[0];
-			String valueKeys[] = new String[0];
-			for (Region.Entry entry : entrySet) {
-				Object key = entry.getKey();
-				Object value = entry.getValue();
-				switch (storeType) {
-				case TYPE_KEYS:
-					keyGettersMap = ReflectionUtil.getAllGettersMap(key.getClass());
-					keyGettersMap = getGettersMap(keyGettersMap, columnList);
-					columnCount = keyGettersMap.size(); 
-					keyKeys = keyGettersMap.keySet().toArray(new String[0]);
-					break;
-				case TYPE_VALUES:
-					valueGettersMap = ReflectionUtil.getAllGettersMap(value.getClass());
-					valueGettersMap = getGettersMap(valueGettersMap, columnList);
-					columnCount = valueGettersMap.size();
-					valueKeys = valueGettersMap.keySet().toArray(new String[0]);
-					break;
-				case TYPE_KEYS_VALUES:
-					keyGettersMap = ReflectionUtil.getAllGettersMap(key.getClass());
-					keyGettersMap = getGettersMap(keyGettersMap, columnList);
-					valueGettersMap = ReflectionUtil.getAllGettersMap(value.getClass());
-					valueGettersMap = getGettersMap(valueGettersMap, columnList);
-					columnCount = keyGettersMap.size() + valueGettersMap.size(); 
-					keyKeys = keyGettersMap.keySet().toArray(new String[0]);
-					valueKeys = valueGettersMap.keySet().toArray(new String[0]);
-				default:
-					break;
-				}
-				
-				Set<String> keySet = valueGettersMap.keySet();
-				// take care of case senstiveness
-				if (primaryColumn != null) {
-					for (String keyStr : keySet) {
-						if (primaryColumn.equalsIgnoreCase(keyStr)) {
-							primaryColumn = keyStr;
-							break;
-						}
-					}
-				}
-				
-				// Remove all duplicate entries from keyGettersMap
-				// keep only primary key (column)
-				for (String keyStr : keySet) {
-					if (isKeyPrimary == false || primaryColumn == null || primaryColumn.equalsIgnoreCase(keyStr) == false) {
-						keyGettersMap.remove(keyStr);
-					}
-				}
-				break;
-			}
-			
-			try {
-				
-				String insertQuery = createInsertQuery(keyKeys, valueKeys, tableName);
-				String updateQuery = createUpdateQuery(keyKeys, valueKeys, tableName, primaryColumn, isKeyPrimary);
-//				
-//				System.out.println(insertQuery);
-//				System.out.println(updateQuery);
-				
-				// tries insert followed by update (upsert)
-				for (Region.Entry entry : entrySet) {
-					Object key = entry.getKey();
-					Object value = entry.getValue();
-					
-					// try insert first. if it fails then do update
-			    	PreparedStatement statement = createInsertPreparedStatement(keyGettersMap, valueGettersMap, keyKeys, valueKeys, key, value, insertQuery);
-//			    	System.out.println(statement.toString());
-			    	try {
-			    		statement.executeUpdate();
-			    	} catch (SQLException ex) {
-			    		
-			    		// try update
-			    		statement = createUpdatePreparedStatement(keyGettersMap, valueGettersMap, keyKeys, valueKeys, key, value, updateQuery, primaryColumn, isKeyPrimary);
-			    		statement.executeUpdate();
-//			    		System.out.println(statement.toString());
-			    	}
-			    	count++;
-				}
-	    	} catch (SQLException ex) {
-	    		throw new DBUtilException(ex);
-	    	}
-		
-		} catch (Exception ex) {
-			throw new DBUtilException(ex);
-		}
-		return count;
-	}
-	
-	private List<ColumnInfo> getColumnInfoList(String tableName) throws SQLException
-	{
-		String lowercase = tableName.toLowerCase();
-		ArrayList<ColumnInfo> columnList = new ArrayList();
-		if (lowercase.startsWith("insert ")) {
-			// insert
-			
-			
-		} else if (lowercase.startsWith("update ")) {
-			
-			// update
-			
-			// TODO: hack
-			// Replace the following with real parser
-			// This breaks if string literals that has '?', ',', or '=' character
-			String split[] = tableName.split("= *\\?");
-			for (int i = 0; i < split.length; i++) {
-				String token = split[i].trim();
-				int index = token.indexOf('=');
-				if (index >= 0) {
-					String x = token.substring(index);
-					x = x.trim();
-					index = x.lastIndexOf(',');
-					if (index > 0) {
-						token = x.substring(index+1);
-					} else {
-						index = x.lastIndexOf(' ');
-						if (index > 0) {
-							token = x.substring(index+1);
-						} else {
-							continue;
-						}
-					}
-				}
-				index = token.lastIndexOf(' ');
-				if (index != -1) {
-					token = token.substring(index);
-				}
-				token = token.replace(',', ' ');
-				token = token.trim();
-				ColumnInfo info = new ColumnInfo();
-				info.name = token;
-				columnList.add(info);
-			}
-			
-		} else {
-			// table name
-			DatabaseMetaData meta = conn.getMetaData();
-			ResultSet resultSet = meta.getColumns(null, null, tableName, null);
-			
-			while (resultSet.next()) {
-				ColumnInfo info = new ColumnInfo();
-				info.name = (String)resultSet.getObject("COLUMN_NAME");
-				info.type = (Integer)resultSet.getObject("DATA_TYPE"); // java.sql.Types
-				columnList.add(info);
-			}
-		}
-		
-		return columnList;
-	}
-	
-	private String[] getColumnNames(List<ColumnInfo> columnList)
-	{
-		String columnNames[] = new String[columnList.size()];
-		for (int i = 0; i < columnList.size(); i++) {
-			columnNames[i] = ((ColumnInfo)columnList.get(i)).name;
-		} 
-		return columnNames;
-	}
-	
-	private int storeMapDB(Gfsh gfsh, Map map, String tableName, 
-			int storeType, String primaryColumn, 
-			boolean isKeyPrimary, List<ColumnInfo> columnList, boolean isQuery) throws DBUtilException
-	{
-		int count = 0;
-		try {
-			
-			// Collect all matching field names from the region object
-			Set<Map.Entry> entrySet = map.entrySet();
-			
-			Map<String, Method> keyGettersMap = new HashMap(0);
-			Map<String, Method> valueGettersMap = new HashMap(0);
-			int columnCount = 0; 
-			String keyKeys[] = new String[0];
-			String valueKeys[] = new String[0];
-			for (Map.Entry entry : entrySet) {
-				Object key = entry.getKey();
-				Object value = entry.getValue();
-				switch (storeType) {
-				case TYPE_KEYS:
-					keyGettersMap = ReflectionUtil.getAllGettersMap(key.getClass());
-					keyGettersMap = getGettersMap(keyGettersMap, columnList);
-					columnCount = keyGettersMap.size(); 
-					if (isQuery) {
-						keyKeys = getColumnNames(columnList);
-					} else { 
-						keyKeys = keyGettersMap.keySet().toArray(new String[0]);
-					}
-					
-					break;
-				case TYPE_VALUES:
-					valueGettersMap = ReflectionUtil.getAllGettersMap(value.getClass());
-					valueGettersMap = getGettersMap(valueGettersMap, columnList);
-					columnCount = valueGettersMap.size();
-					if (isQuery) {
-						valueKeys = getColumnNames(columnList);
-					} else { 
-						valueKeys = valueGettersMap.keySet().toArray(new String[0]);
-					}
-					break;
-				case TYPE_KEYS_VALUES:
-					keyGettersMap = ReflectionUtil.getAllGettersMap(key.getClass());
-					keyGettersMap = getGettersMap(keyGettersMap, columnList);
-					valueGettersMap = ReflectionUtil.getAllGettersMap(value.getClass());
-					valueGettersMap = getGettersMap(valueGettersMap, columnList);
-					columnCount = keyGettersMap.size() + valueGettersMap.size(); 
-					
-					if (isQuery) {
-						keyKeys = getColumnNames(columnList);
-						valueKeys = getColumnNames(columnList);
-					} else {
-						keyKeys = keyGettersMap.keySet().toArray(new String[0]);
-						valueKeys = valueGettersMap.keySet().toArray(new String[0]);
-					}
-				default:
-					break;
-				}
-				
-				Set<String> keySet = valueGettersMap.keySet();
-				// take care of case senstiveness
-				if (primaryColumn != null) {
-					for (String keyStr : keySet) {
-						if (primaryColumn.equalsIgnoreCase(keyStr)) {
-							primaryColumn = keyStr;
-							break;
-						}
-					}
-				}
-				
-				// Remove all duplicate entries from keyGettersMap
-				// keep only primary key (column)
-				for (String keyStr : keySet) {
-					if (isKeyPrimary == false || primaryColumn == null || primaryColumn.equalsIgnoreCase(keyStr) == false) {
-						keyGettersMap.remove(keyStr);
-					}
-				}
-				break;
-			}
-			
-			try {
-				
-				String insertQuery = createInsertQuery(keyKeys, valueKeys, tableName);
-				String updateQuery = createUpdateQuery(keyKeys, valueKeys, tableName, primaryColumn, isKeyPrimary);
-				if (gfsh.isDebug()) {
-					System.out.println("insert: " + insertQuery);
-					System.out.println("update: " + updateQuery);
-				}
-
-				// tries insert followed by update (upsert)
-				for (Map.Entry entry : entrySet) {
-					Object key = entry.getKey();
-					Object value = entry.getValue();
-					
-					// try insert first. if it fails then do update
-			    	PreparedStatement statement;
-			    	if (insertQuery != null) {
-			    		try {
-			    			statement = createInsertPreparedStatement(keyGettersMap, valueGettersMap, keyKeys, valueKeys, key, value, insertQuery);
-				    		statement.executeUpdate();
-				    	} catch (SQLException ex) {
-				    		
-				    		// try update
-				    		if (updateQuery != null) {
-					    		statement = createUpdatePreparedStatement(keyGettersMap, valueGettersMap, keyKeys, valueKeys, key, value, updateQuery, primaryColumn, isKeyPrimary);
-					    		statement.executeUpdate();
-				    		}
-
-				    	}
-			    	} else {
-			    		statement = createUpdatePreparedStatement(keyGettersMap, valueGettersMap, keyKeys, valueKeys, key, value, updateQuery, primaryColumn, isKeyPrimary);
-			    		statement.executeUpdate();
-			    	}
-			    	
-			    	count++;
-				}
-	    	} catch (SQLException ex) {
-	    		throw new DBUtilException(ex);
-	    	}
-		
-		} catch (Exception ex) {
-			throw new DBUtilException(ex);
-		}
-		return count;
-	}
-	
-	public int storeDB(Gfsh gfsh, String oql, String tableName, 
-			int storeType, String primaryColumn, 
-			boolean isKeyPrimary, int batchSize) throws DBUtilException
-	{
-		String lowercase = tableName.toLowerCase();
-		boolean isQuery = lowercase.startsWith("insert ") || lowercase.startsWith("update ");
-		int count = 0;
-		int actualSize;
-		String insertQuery = null;
-		String updateQuery = null;
-		int columnCount = 0; 
-		Map<String, Method> valueGettersMap = null;
-		String valueKeys[] = null;
-		try {
-			
-			List<ColumnInfo>columnList = getColumnInfoList(tableName);
-			
-			// Use command client to fetch data from the server
-			do {
-				CommandResults cr = gfsh.getCommandClient().execute(new QueryTask(oql, batchSize, true));
-				if (cr.getCode() == QueryTask.ERROR_QUERY) {
-					gfsh.println(cr.getCodeMessage());
-					return -1;
-				}
-				QueryResults results = (QueryResults) cr.getDataObject();
-				if (results == null || results.getResults() == null) {
-					return count;
-				}
-				
-				if (results.getResults() instanceof Map) {
-					
-					// Map
-					
-					Map map = (Map)results.getResults();
-					count += storeMapDB(gfsh, map, tableName, storeType, primaryColumn, isKeyPrimary, columnList, isQuery);
-					
-				} else {
-
-					// SelectResults
-					
-					SelectResults sr = (SelectResults)results.getResults();
-					CollectionType type = sr.getCollectionType();
-					ObjectType elementType = type.getElementType();
-					List srList = sr.asList();
-					Object element = null;
-					StructType structType = null;
-					Struct struct = null;
-					
-					// Create insert prepared query strings
-					if (insertQuery == null && srList.size() > 0) {
-						element = srList.get(0);
-						
-						if (elementType.isStructType()) {
-							// struct
-							structType = (StructType) elementType;
-							insertQuery = createInsertQuery(structType.getFieldNames(), tableName);
-							updateQuery = createUpdateQuery(structType.getFieldNames(), tableName, primaryColumn);
-						} else {
-							// object
-							valueGettersMap = new HashMap(0);
-							valueGettersMap = ReflectionUtil.getAllGettersMap(element.getClass());
-							valueGettersMap = getGettersMap(valueGettersMap, columnList);
-							columnCount = valueGettersMap.size();
-							
-							if (isQuery) {
-								valueKeys = getColumnNames(columnList);
-							} else {
-								valueKeys = valueGettersMap.keySet().toArray(new String[0]);
-							}
-							
-							insertQuery = createInsertQuery(valueKeys, tableName);
-							updateQuery = createUpdateQuery(valueKeys, tableName, primaryColumn);
-						}
-						
-						if (gfsh.isDebug()) {
-							System.out.println("insert: " + insertQuery);
-							System.out.println("update: " + updateQuery);
-						}
-					}
-						
-					// Upsert
-					for (int i = 0; i < srList.size(); i++) {
-						element = srList.get(i);
-	
-						if (elementType.isStructType()) {
-							
-							structType = (StructType) elementType;
-							struct = (Struct) element;
-							PreparedStatement statement = createInsertPreparedStatement(struct, insertQuery);
-//							System.out.println(statement.toString());
-							
-							try {
-					    		statement.executeUpdate();
-					    	} catch (SQLException ex) {
-					    		
-					    		// try update
-					    		statement = createUpdatePreparedStatement(struct, updateQuery, primaryColumn);
-					    		statement.executeUpdate();
-//					    		System.out.println(statement.toString());
-					    	}
-	
-						} else {
-	
-							PreparedStatement statement;
-							if (insertQuery != null) {
-								try {
-									statement = createInsertPreparedStatement(valueGettersMap, valueKeys, element, insertQuery);
-						    		statement.executeUpdate();
-						    	} catch (SQLException ex) {
-						    		
-						    		// try update
-						    		if (updateQuery != null) {
-							    		statement = createUpdatePreparedStatement(valueGettersMap, valueKeys, element, updateQuery, primaryColumn);
-							    		statement.executeUpdate();
-						    		}
-						    	}
-							} else {
-								statement = createUpdatePreparedStatement(valueGettersMap, valueKeys, element, updateQuery, primaryColumn);
-								System.out.println(statement.toString());
-					    		statement.executeUpdate();
-							}
-						}
-					}
-					
-					count += sr.size();
-				}
-				actualSize = results.getActualSize();
-				oql = null;
-			} while (count < actualSize);
-			
-		} catch (Exception ex) {
-			throw new DBUtilException(ex);
-		}
-		return count;
-	}
-	
-	private PreparedStatement createUpdatePreparedStatement(
-			Struct struct,
-			String query,
-			String primaryColumn) throws SQLException, InvocationTargetException, IllegalAccessException
-	{
-		Object primaryObj = null;
-		PreparedStatement statement = conn.prepareStatement(query);
-		String fieldNames[] = struct.getStructType().getFieldNames();
-		Object fieldValues[] = struct.getFieldValues();
-		int i;
-    	for (i = 0; i < fieldValues.length; i++) {
-    		statement.setObject(i+1, fieldValues[i]);
-    		Object obj = fieldValues[i];
-    		if (primaryColumn != null && primaryColumn.equals(fieldNames[i])) {
-    			primaryObj = obj;
-    		} else {
-    			statement.setObject(i+1, obj);
-    		}
-    	}
-    	
-    	if (primaryObj != null) {
-    		statement.setObject(i+1, primaryObj);
-    	}
-    	
-    	return statement;
-	}
-	
-	private PreparedStatement createInsertPreparedStatement(Struct struct, String query) 
-				throws SQLException, InvocationTargetException, IllegalAccessException
-	{
-		PreparedStatement statement = conn.prepareStatement(query);
-		Object fieldValues[] = struct.getFieldValues();
-    	for (int i = 0; i < fieldValues.length; i++) {
-    		statement.setObject(i+1, fieldValues[i]);
-		}
-    	return statement;
-	}
-	
-	
-	private PreparedStatement createUpdatePreparedStatement( 
-			Map<String, Method> valueGettersMap, 
-			String valueKeys[],
-			Object value,
-			String query,
-			String primaryColumn) throws SQLException, InvocationTargetException, IllegalAccessException
-	{
-		return createUpdatePreparedStatement(null, valueGettersMap, null, valueKeys, null, value, query, primaryColumn, false);
-	}
-	
-	private PreparedStatement createInsertPreparedStatement(
-			Map<String, Method> valueGettersMap, 
-			String valueKeys[],
-			Object value,
-			String query) throws SQLException, InvocationTargetException, IllegalAccessException
-	{
-		return createInsertPreparedStatement(null, valueGettersMap, null, valueKeys, null, value, query);
-	}
-	
-	private PreparedStatement createUpdatePreparedStatement(Map<String, Method> keyGettersMap, 
-			Map<String, Method> valueGettersMap, 
-			String keyKeys[], 
-			String valueKeys[],
-			Object key,
-			Object value,
-			String query,
-			String primaryColumn,
-			boolean isKeyPrimary) throws SQLException, InvocationTargetException, IllegalAccessException
-	{
-		Object primaryObj = null;
-		PreparedStatement statement = conn.prepareStatement(query);
-		int index = 1;
-		if (keyKeys != null) {
-	    	for (int i = 0; i < keyKeys.length; i++) {
-	    		Method method = keyGettersMap.get(keyKeys[i]);
-	    		Object obj = method.invoke(key, (Object[])null);
-	    		if (primaryColumn != null && isKeyPrimary==false && primaryColumn.equals(keyKeys[i])) {
-	    			primaryObj = obj;
-	    		} else {
-	    			statement.setObject(index++, obj);
-	    		}
-			}
-		}
-		
-		if (valueKeys != null) {
-	    	for (int i = 0; i < valueKeys.length; i++) {
-	    		Method method = valueGettersMap.get(valueKeys[i]);
-	    		Object obj = method.invoke(value, (Object[])null);
-	    		if (primaryColumn != null && isKeyPrimary == false && primaryColumn.equals(valueKeys[i])) {
-	    			primaryObj = obj;
-	    		} else {
-	    			statement.setObject(index++, obj);
-	    		}
-			}
-		}
-    	
-    	if (primaryObj != null) {
-    		statement.setObject(index, primaryObj);
-    	}
-    	
-    	return statement;
-	}
-	
-	private PreparedStatement createInsertPreparedStatement(Map<String, Method> keyGettersMap, 
-			Map<String, Method> valueGettersMap, 
-			String keyKeys[], 
-			String valueKeys[],
-			Object key,
-			Object value,
-			String query) throws SQLException, InvocationTargetException, IllegalAccessException
-	{
-		PreparedStatement statement = conn.prepareStatement(query);
-		if (keyKeys!= null) {
-	    	for (int i = 0; i < keyKeys.length; i++) {
-	    		Method method = keyGettersMap.get(keyKeys[i]);
-	    		Object obj = method.invoke(key, (Object[])null);
-	    		statement.setObject(i+1, obj);
-			}
-		}
-		if (valueKeys != null) {
-	    	for (int i = 0; i < valueKeys.length; i++) {
-	    		Method method = valueGettersMap.get(valueKeys[i]);
-	    		Object obj = method.invoke(value, (Object[])null);
-	    		statement.setObject(i+1, obj);
-			}
-		}
-    	
-    	return statement;
-	}
-	
-	private String createUpdateQuery(String fieldNames[],
-			String tableName, 
-			String primaryColumn)
-	{
-		String query = null;
-		String lowercase = tableName.trim().toLowerCase();
-		if (lowercase.startsWith("insert ")) {
-			// insert not honored for update operation
-			query = null;
-		} else if (lowercase.startsWith("update ")) {
-			// use the passed in update statement
-			query = tableName;
-		} else {
-			
-			// build update
-			query = "UPDATE " + tableName + " SET ";
-			for (int i = 0; i < fieldNames.length; i++) {
-				if (primaryColumn != null && primaryColumn.equals(fieldNames[i])) {
-					// skip
-				} else {
-					query += fieldNames[i] + "=?,";
-				}
-			}
-		
-			int index = query.lastIndexOf(",");
-			if (index != -1) {
-				query = query.substring(0, index);
-			}
-			if (primaryColumn != null) {
-				query += " WHERE " + primaryColumn + "=?";
-			}
-		}
-		
-		return query;
-	}
-	
-	private String createInsertQuery(String fieldNames[], String tableName)
-	{
-		
-		String lowercase = tableName.trim().toLowerCase();
-		String query = null;
-		
-		if (lowercase.startsWith("insert ")) {
-			// use the passed in insert statement
-			query = tableName;
-		} else if (lowercase.startsWith("update ")) {
-			// update not honored for insert operation
-			query = null;
-		} else {
-
-			// build insert
-			query = "INSERT INTO " + tableName + " (";
-			for (int i = 0; i < fieldNames.length; i++) {
-				query += fieldNames[i] + ",";
-			}
-			int index = query.lastIndexOf(',');
-			if (index != -1) {
-				query = query.substring(0, index);
-			}
-			int columnCount = fieldNames.length;  
-			query += ") VALUES (";
-			for (int i = 0; i < columnCount; i++) {
-				query += "?,";
-			}
-			index = query.lastIndexOf(',');
-			if (index != -1) {
-				query = query.substring(0, index);
-			}
-			query += ")";
-		}
-		
-		return query;
-	}
-	
-	private String createUpdateQuery(String keyKeys[], String valueKeys[], 
-			String tableName, 
-			String primaryColumn,
-			boolean isKeyPrimary)
-	{
-		String query = null;
-		String lowercase = tableName.trim().toLowerCase();
-		if (lowercase.startsWith("insert ")) {
-			// insert not honored for update operation
-			query = null;
-		} else if (lowercase.startsWith("update ")) {
-			// use the passed in update statement
-			query = tableName;
-		} else {
-			
-			// build update
-			query = "UPDATE " + tableName + " SET ";
-			for (int i = 0; i < keyKeys.length; i++) {
-				if (primaryColumn != null && isKeyPrimary && primaryColumn.equals(keyKeys[i])) {
-					// skip
-				} else {
-					query += keyKeys[i] + "=?,";
-				}
-			}
-			for (int i = 0; i < valueKeys.length; i++) {
-				if (primaryColumn != null && isKeyPrimary == false && primaryColumn.equals(valueKeys[i])) {
-					// skip
-				} else {
-					query += valueKeys[i] + "=?,";
-				}
-			}
-			int index = query.lastIndexOf(",");
-			if (index != -1) {
-				query = query.substring(0, index);
-			}
-			if (primaryColumn != null) {
-				query += " WHERE " + primaryColumn + "=?";
-			}
-		}
-		
-		return query;
-	}
-	
-	private String createInsertQuery(String keyKeys[], String valueKeys[], String tableName)
-	{
-		String lowercase = tableName.trim().toLowerCase();
-		String query = null;
-		
-		if (lowercase.startsWith("insert ")) {
-			// use the passed in insert statement
-			query = tableName;
-		} else if (lowercase.startsWith("update ")) {
-			// update not honored for insert operation
-			query = null;
-		} else {
-		
-			// build insert
-			int columnCount = 0;
-			query = "INSERT INTO " + tableName + " (";
-			if (keyKeys != null) {
-				for (int i = 0; i < keyKeys.length; i++) {
-					query += keyKeys[i] + ",";
-				}
-				columnCount += keyKeys.length;
-			}
-			if (valueKeys != null) {
-				for (int i = 0; i < valueKeys.length; i++) {
-					query += valueKeys[i] + ",";
-				}
-				columnCount += valueKeys.length;
-			}
-			int index = query.lastIndexOf(',');
-			if (index != -1) {
-				query = query.substring(0, index);
-			}
-			
-			query += ") VALUES (";
-			for (int i = 0; i < columnCount; i++) {
-				query += "?,";
-			}
-			index = query.lastIndexOf(',');
-			if (index != -1) {
-				query = query.substring(0, index);
-			}
-			query += ")";
-		}
-		
-		return query;
-	}
-	
-	private Map getGettersMap(Map<String, Method> gettersMap, List<ColumnInfo> columnList)
-	{
-		HashMap map = new HashMap();
-		Set<String> keySet = gettersMap.keySet();
-		for (int i = 0; i < columnList.size(); i++) {
-			ColumnInfo info = columnList.get(i);
-			Method getterMethod  = gettersMap.get("get" + info.name);
-			if (getterMethod == null) {
-				for (String key : keySet) {
-					if (key.substring(3).equalsIgnoreCase(info.name)) {
-						getterMethod = gettersMap.get(key);
-						break;
-					}
-				}
-			}
-			if (getterMethod != null) {
-				map.put(info.name, getterMethod);
-			}
-		}
-		return map;
-	}
-	
-	private Object updateObject(Gfsh gfsh, Class clazz, 
-			Map<String, Method> settersMap, Map<String, Method> realMap,
-			ResultSet resultSet,
-			String primaryColumn) throws Exception
-	{
-		
-		// If primaryColumn is set then set the mapping method only
-		
-		if (primaryColumn != null) {
-			
-			// Set the primary column value only
-			Object obj = resultSet.getObject(primaryColumn);
-			if (clazz == null ||
-				clazz == byte.class || clazz == Byte.class ||
-				clazz == char.class || clazz == Character.class ||
-				clazz == short.class || clazz == Short.class ||
-				clazz == int.class || clazz == Integer.class ||
-				clazz == long.class || clazz == Long.class ||
-				clazz == float.class || clazz == Float.class ||
-				clazz == double.class || clazz == Double.class ||
-				clazz == Date.class || clazz == String.class)
-			{
-				return obj;
-			}
-			
-			Object value = clazz.newInstance();    		
-    		Method setterMethod  = realMap.get(primaryColumn);
-			if (setterMethod == null) {
-				setterMethod = settersMap.get("set" + primaryColumn);
-				if (setterMethod == null) {
-					Set<Entry<String, Method>> entrySet = settersMap.entrySet(); //FindBugs - entrySet efficient over keyset
-					for (Entry<String, Method> entry : entrySet) {
-					  String key  = entry.getKey();
-            if (key.substring(3).equalsIgnoreCase(primaryColumn)) {
-            setterMethod = entry.getValue();
-            realMap.put(primaryColumn, settersMap.get(key));
-            }
-          }
-				}
-			}
-			setterMethod.invoke(value, obj);
-    		return value;
-		}
-		
-		// Set the entire object
-		
-		if (clazz == null ||
-			clazz == byte.class || clazz == Byte.class ||
-			clazz == char.class || clazz == Character.class ||
-			clazz == short.class || clazz == Short.class ||
-			clazz == int.class || clazz == Integer.class ||
-			clazz == long.class || clazz == Long.class ||
-			clazz == float.class || clazz == Float.class ||
-			clazz == double.class || clazz == Double.class ||
-			clazz == Date.class || clazz == String.class)
-		{
-			
-			return resultSet.getObject(1);
-			
-		} else {
-			
-			Object value = clazz.newInstance();
-    		ResultSetMetaData meta = resultSet.getMetaData();
-    		for (int i = 1; i <= meta.getColumnCount(); i++) {
-    			String columnName = meta.getColumnName(i);
-    			Method setterMethod  = realMap.get(columnName);
-    			if (setterMethod == null) {
-    				setterMethod = settersMap.get("set" + columnName);
-    				if (setterMethod == null) {
-    					Set<String> keySet = settersMap.keySet();
-    					for (String key : keySet) {
-							if (key.substring(3).equalsIgnoreCase(columnName)) {
-								setterMethod = settersMap.get(key);
-								realMap.put(columnName, settersMap.get(key));
-							}
-						}
-    				}
-    			}
-    			if (setterMethod == null) {
-//	        				throw new DBUtilException(DBUtilException.ERROR_NO_MATCHING_METHOD_FOR_COLUMN, "Undefined method for the column " + columnName);
-    				continue;
-    			}
-    			
-    			Object obj = resultSet.getObject(i);
-    			setterMethod.invoke(value, obj);
-    		}
-    		return value;
-		}
-
-	}
-	//FindBugs - make static inner class
-	static class ColumnInfo
-	{
-		String name;
-		int type;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/DBUtilException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/DBUtilException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/DBUtilException.java
deleted file mode 100644
index 45c1c6a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/DBUtilException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2008, Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *========================================================================
- */
-package com.gemstone.gemfire.internal.tools.gfsh.app.util;
-
-/**
- * DBUtilException is thrown by DBUtil when it encounters DB errors.
- * 
- * @author dpark
- *
- */
-public class DBUtilException extends Exception
-{
-	private static final long serialVersionUID = 1L;
-	
-	public static final int ERROR_CONNECTION_CLOSED = 1;
-    public static final int ERROR_CONNECTION_ALREADY_ESTABLISHED = 2;
-    public static final int ERROR_NO_MATCHING_METHOD_FOR_COLUMN = 3;
-    public static final int ERROR_UNDEFINED = -1;
-
-    private int errorCode = ERROR_UNDEFINED;
-
-    public DBUtilException()
-    {
-    }
-
-    public DBUtilException(int errorCode, String message)
-    {
-        super(message);
-        this.errorCode = errorCode;
-    }
-
-    public DBUtilException(String message, Throwable cause)
-    {
-        super(cause.getClass() + ": " + cause.getMessage() + ". " + message);
-        initCause(cause);
-    }
-
-    public DBUtilException(Throwable cause)
-    {
-        super(cause.getClass() + ": " + cause.getMessage() + ".");
-        initCause(cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/GfshResultsBag.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/GfshResultsBag.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/GfshResultsBag.java
deleted file mode 100644
index 7f88de7..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/GfshResultsBag.java
+++ /dev/null
@@ -1,600 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.util;
-
-import it.unimi.dsi.fastutil.objects.Object2IntMap;
-import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
-import it.unimi.dsi.fastutil.objects.ObjectIterator;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.AbstractCollection;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.internal.ResultsCollectionWrapper;
-import com.gemstone.gemfire.cache.query.internal.types.CollectionTypeImpl;
-import com.gemstone.gemfire.cache.query.types.CollectionType;
-import com.gemstone.gemfire.cache.query.types.ObjectType;
-
-// @todo probably should assert element type when elements added
-// @todo support generics when no longer support Java 1.4
-/**
- * Implementation of SelectResults that allows duplicates and
- * extends HashMap. The keys store the elements of the collection and the
- * the values store the number of occurrances as an int.
- * If the elements are Structs, then use a StructBag instead.
- *
- * @author Eric Zoerner
- * @since 5.1
- */
-public class GfshResultsBag extends AbstractCollection implements SelectResults, DataSerializable {
-  protected ObjectType elementType;
-  protected Object2IntOpenHashMap map;
-  protected int size = 0;
-  /** adds support for null elements, since a TObjectIntHashMap does not
-      support null elements
-   */
-  protected int numNulls = 0;
-  //Asif: These fields are used for limiting the results based on the limit 
-  //clause in the query 
-  private int limit = -1;
-  boolean hasLimitIterator = false;
-  final Object limitLock = new Object();
-
-  public GfshResultsBag() {
-    this.map = new Object2IntOpenHashMap();
-  }
-
-  public void setElementType(ObjectType elementType) {
-    this.elementType = elementType;
-  }
-    
-  // @todo Currently does an iteration, could make this more efficient
-  // by providing a ListView
-  /**
-   * Returns this bag as a list.
-   */
-  public List asList() {
-    return new ArrayList(this);
-  }
-  
-  /**
-   * Return an unmodifiable Set view of this bag.
-   * Does not require an iteration by using a lightweight wrapper.
-   */
-  public Set asSet() {
-    return new SetView();
-  }
-  
-  public CollectionType getCollectionType() {
-    return new CollectionTypeImpl(Collection.class, this.elementType);
-  }
-  
-  public boolean isModifiable() {
-    return true;
-  }
-    
-  public int occurrences(Object element) {
-    if (this.hasLimitIterator) {
-      // Asif: If limit iterator then occurence should be calculated
-      // via the limit iterator
-      int count = 0;
-      boolean encounteredObject = false;
-      for (Iterator itr = this.iterator()/* this.base.iterator() */; itr
-          .hasNext();) {
-        Object v = itr.next();
-        if (element == null ? v == null : element.equals(v)) {
-          count++;
-          encounteredObject = true;
-        }
-        else if (encounteredObject) {
-          // Asif: No possibility of its occurence again
-          break;
-        }
-      }
-      return count;
-    }
-    else {
-      if (element == null) {
-        return this.numNulls;
-      }
-      return this.map.getInt(element); // returns 0 if not found
-    }
-  }
-  
-  /**
-   * Return an iterator over the elements in this collection. Duplicates will
-   * show up the number of times it has occurrances.
-   */
-  @Override
-  public Iterator iterator() {
-    if (this.hasLimitIterator) {
-      // Asif: Return a new LimitIterator in the block so that
-      // the current Limit does not get changed by a remove
-      // operation of another thread. The current limit is
-      // set in the limit iterator. So the setting of the current limit
-      // & creation of iterator should be atomic .If any subsequent
-      // modifcation in limit occurs, the iterator will itself fail.
-      // Similarly a remove called by a iterator should decrease the
-      // current limit and underlying itr.remove atomically
-      synchronized (this.limitLock) {
-        return new LimitResultsBagIterator();
-      }
-    }
-    else {
-      return new ResultsBagIterator();
-    }
-  }
-
-  @Override
-  public boolean contains(Object element) {
-    if (this.hasLimitIterator) {
-      return super.contains(element);
-    }
-    else {
-      if (element == null) {
-        return this.numNulls > 0;
-      }
-      return this.map.containsKey(element);
-    }
-  }
-  
-  // not thread safe!
-  @Override
-  public boolean add(Object element) {
-    if( this.limit > -1) {
-      throw new UnsupportedOperationException("Addition to the SelectResults not allowed as the query result is constrained by LIMIT");
-    }
-    if (element == null) {
-      numNulls++;
-    }
-    else {
-    int count = this.map.getInt(element); // 0 if not found
-      this.map.put(element, count + 1);
-    }
-    this.size++;
-    assert this.size >= 0 : this.size;
-    return true;
-  }
-  
-  // Internal usage method
-  // Asif :In case of StructBag , we will ensure that it
-  // gets an Object [] indicating field values as parameter
-  // from the CompiledSelect
-  public int addAndGetOccurence(Object element) {
-    int occurence;
-    if (element == null) {
-      numNulls++;
-      occurence = numNulls;
-    }
-    else {
-      occurence = this.map.getInt(element); // 0 if not found
-      this.map.put(element, ++occurence);
-    }
-    this.size++;
-    assert this.size >= 0: this.size;
-    return occurence;
-  }
-  
-  @Override
-  public int size() {
-    if (this.hasLimitIterator) {
-      synchronized (this.limitLock) {
-        return this.limit;
-      }
-    } else {
-      return this.size; 
-    }
-  }    
-  
-  // not thread safe!
-  @Override
-  public boolean remove(Object element) {
-    if(this.hasLimitIterator) {
-      return super.remove(element);
-    }else {
-    if (element == null) {
-      if (this.numNulls > 0) {
-        this.numNulls--;
-        this.size--;
-        assert this.size >= 0 : this.size;
-        return true;
-      }
-      else {
-        return false;
-      }
-    }      
-    int count = this.map.getInt(element); // 0 if not found
-    if (count == 0) {
-      return false;
-    }
-    if (count == 1) {
-      this.map.remove(element);
-    }
-    else {
-      this.map.put(element, --count);
-    }
-    this.size--;
-    assert this.size >= 0 : this.size;
-    return true;
-    }
-  }
-    
-  // not thread safe!
-  @Override
-  public void clear() {
-    this.map.clear();
-    this.numNulls = 0;
-    this.size = 0;
-    if (this.hasLimitIterator) {
-      synchronized (this.limitLock) {
-        this.limit = 0;
-      }
-    }
-  }
-  
-  // not thread safe!
-  @Override
-  public boolean equals(Object o) {
-    if (!(o instanceof GfshResultsBag)) {
-      return false;
-    }
-    GfshResultsBag otherBag = (GfshResultsBag)o;
-    return this.size == otherBag.size
-      && this.elementType.equals(otherBag.elementType)
-      && this.map.equals(otherBag.map)
-      && this.numNulls == otherBag.numNulls;
-  }
-  
-  @Override // GemStoneAddition
-  public int hashCode() {
-    return this.map.hashCode();
-  }
-  public boolean addAll(Collection coll) {
-    if(this.limit > -1) {
-      throw new UnsupportedOperationException("Addition to the SelectResults not allowed as the query result is constrained by LIMIT");
-    }else {
-      return super.addAll(coll);
-    }
-  }
-  protected Object2IntOpenHashMap createMapForFromData() {
-    return new Object2IntOpenHashMap(this.size);
-  }
-
-  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
-    this.elementType = (ObjectType)DataSerializer.readObject(in);
-    this.size = in.readInt();
-    assert this.size >= 0: this.size;
-    this.readNumNulls(in);
-    // Asif: The size will be including null so the Map should at max contain
-    // size - number of nulls
-    int numLeft = this.size - this.numNulls;
-
-    while (numLeft > 0) {
-      Object key = DataSerializer.readObject(in);
-      int occurence = in.readInt();
-      this.map.put(key, occurence);
-      numLeft -= occurence;
-    }
-  }
-//
-//  public int getDSFID() {
-//    return RESULTS_BAG;
-//  }
-
-  public void toData(DataOutput out) throws IOException {
-	DataSerializer.writeObject(this.elementType, out);
-    out.writeInt(this.size());
-    this.writeNumNulls(out);
-    // TODO:Asif: Should we actually pass the limit in serialization?
-    // For the time being not passing , assuming PR Has parsed
-    // it
-    // out.writeInt(this.limit);
-    int numLeft = this.size() - this.numNulls;
-    for (ObjectIterator<Object2IntMap.Entry<?>>  itr = this.map.object2IntEntrySet().fastIterator(); itr.hasNext()
-        && numLeft > 0;) {
-      Object2IntMap.Entry<?> entry = itr.next();
-      Object key = entry.getKey();
-      DataSerializer.writeObject(key, out);
-      int occurence = entry.getValue();
-      if (numLeft < occurence) {
-        occurence = numLeft;
-      }
-      out.writeInt(occurence);
-      numLeft -= occurence;
-    }
-  }
-  
-  /**
-   * 
-   * @param out
-   * @throws IOException
-   */
-  void writeNumNulls(DataOutput out) throws IOException {
-    out.writeInt(this.numNulls);
-  }
-  
-  /**
-   * 
-   * @param in
-   * @throws IOException
-   */
-  void readNumNulls(DataInput in) throws IOException {
-    this.numNulls = in.readInt();
-  }
-
-  /**
-   */
-  void createObject2IntHashMap() {
-    this.map = new Object2IntOpenHashMap(this.size - this.numNulls);
-  }
-
-  void applyLimit(int limit) {
-    this.limit = limit;
-    // Asif : From the code of TObjectIntHashMap, it appears that if no data is
-    // going to be added , then the rehash does not occur & default code
-    // of rehash does not appear to change the order of data . So we can assume
-    // that this iterator will be returning data in order.
-    // Limit Iterator is needed if the limit happens to be less than the size
-    if (this.limit > -1 && this.size > this.limit) {
-      this.hasLimitIterator = true;
-    }
-  }
- 
-  protected class ResultsBagIterator implements Iterator {
-    final ObjectIterator<Object2IntMap.Entry<?>> mapIterator = GfshResultsBag.this.map.object2IntEntrySet().fastIterator();
-    Object2IntMap.Entry<?> mapIteratorEntry;
-    Object current = null;
-    
-    /**
-     * duplicates are numbered from 1 to n;
-     * 0 = no current, otherwise goes from 1 to dupLimit,
-     * indicating the last dup that was emitted by next()
-     */
-    int currentDup = 0;
-    /**
-     * dupLimit is the total number of occurrences;
-     * start by emitting the nulls
-     */
-    int dupLimit = GfshResultsBag.this.numNulls;
-    
-    public boolean hasNext() {
-      return this.mapIterator.hasNext() || this.currentDup < this.dupLimit;
-    }
-    
-    public Object next() {
-      // see if there is another duplicate to emit
-      if (this.currentDup < this.dupLimit) {
-        this.currentDup++;
-        return this.current;
-      }
-      //otherwise, go to next object
-      this.mapIteratorEntry = this.mapIterator.next();
-      this.dupLimit = this.mapIteratorEntry.getValue();
-      this.currentDup = 1;
-      this.current = this.mapIteratorEntry.getKey();
-      return this.current;
-    }
-    
-    public void remove() {
-//      if (this.currentDup == 0) {
-//        // next has not yet been called
-//        throw new IllegalStateException(LocalizedStrings.ResultsBag_NEXT_MUST_BE_CALLED_BEFORE_REMOVE.toLocalizedString());
-//      }
-      
-      this.dupLimit--;
-      assert this.dupLimit >= 0 : this.dupLimit;
-      if (this.current == null) {
-    	  GfshResultsBag.this.numNulls = this.dupLimit;
-        assert GfshResultsBag.this.numNulls >= 0 : GfshResultsBag.this.numNulls;
-      }
-      else {
-        if (this.dupLimit > 0) {
-          this.mapIteratorEntry.setValue(this.dupLimit);
-        }
-        else {
-          this.mapIterator.remove();
-        }
-      }
-      GfshResultsBag.this.size--;
-      this.currentDup--;
-      assert GfshResultsBag.this.size >= 0 : GfshResultsBag.this.size;
-      assert this.currentDup >= 0 : this.currentDup;
-    }    
-  }
-  
-  /** package visibility so ResultsCollectionWrapper can reference
-   * it.
-   * This SetView is serialized as a special case by a
-   * ResultsCollectionWrapper.
-   * Keith: Refactored to add consideration for LIMIT, April 1, 2009
-   * @see ResultsCollectionWrapper#toData
-   */
-  class SetView extends AbstractSet {
-
-    private int localLimit;
-
-    SetView() {
-      localLimit = GfshResultsBag.this.limit;
-    }
-
-    public Iterator iterator() {
-      if (localLimit > -1) {
-        return new LimitSetViewIterator();
-      } else {
-        return new SetViewIterator();
-      }
-    }
-
-    @Override
-    public boolean add(Object o) {
-      if(contains(o)) {
-        return false;
-      }
-      return GfshResultsBag.this.add(o);
-    }
-
-    @Override
-    public void clear() {
-    	GfshResultsBag.this.clear();
-    }
-    
-    @Override
-    public int size() {      
-      int calculatedSize = GfshResultsBag.this.map.size() +
-                           (GfshResultsBag.this.numNulls > 0 ? 1 : 0);
-      if (localLimit > -1) {
-        return Math.min(localLimit, calculatedSize);
-      }
-      return calculatedSize;
-    }
-    
-    @Override
-    public boolean contains(Object o) {
-      if (o == null) {
-        return GfshResultsBag.this.numNulls > 0;
-      }
-      return GfshResultsBag.this.map.containsKey(o);
-    }
-    
-    @Override
-    public boolean isEmpty() {
-      if(localLimit == 0) {
-        return true;
-      }
-      if (GfshResultsBag.this.numNulls > 0) {
-        return false;
-      }
-      return GfshResultsBag.this.map.isEmpty();
-    }
-
-    public class SetViewIterator implements Iterator {
-      /** need to emit a null value if true */
-      boolean emitNull = GfshResultsBag.this.numNulls > 0;
-      final ObjectIterator<Object2IntMap.Entry<?>> it = GfshResultsBag.this.map.object2IntEntrySet().fastIterator();
-      Object2IntMap.Entry<?> currEntry;
-      boolean currentIsNull = false;  
-
-      public Object next() {
-        if (this.emitNull) {
-          this.emitNull = false;
-          currentIsNull = true;
-          return null;
-        }
-        currEntry = it.next();
-        currentIsNull = false;
-        return currEntry.getKey();
-      }
-        
-      public boolean hasNext() {
-        if (this.emitNull) {
-          return true;
-        }
-        return it.hasNext();
-      }
-        
-      public void remove() {
-        if(currentIsNull) {
-          GfshResultsBag.this.numNulls = 0;
-        } else {
-          it.remove();
-        }
-      }
-    };
-
-    class LimitSetViewIterator extends SetViewIterator {
-      private int currPos = 0;
-      @Override
-      public Object next() {
-        if (this.currPos == GfshResultsBag.SetView.this.localLimit) {
-          throw new NoSuchElementException();
-        }
-        else {
-          Object next = super.next();
-          ++currPos;
-          return next;
-        }
-      }
-
-      @Override
-      public boolean hasNext() {
-        return (this.currPos < GfshResultsBag.SetView.this.localLimit)
-                && super.hasNext();
-      }
-
-      @Override
-      public void remove() {
-        if (this.currPos == 0) {
-          // next has not yet been called
-          throw new IllegalStateException("next() must be called before remove()");
-        }
-        synchronized (GfshResultsBag.this.limitLock) {
-          if(currentIsNull) {
-            GfshResultsBag.this.limit -= GfshResultsBag.this.numNulls;
-            GfshResultsBag.this.numNulls = 0;
-            GfshResultsBag.SetView.this.localLimit--;
-          } else {
-            Object key = currEntry.getKey();
-            int count = GfshResultsBag.this.map.removeInt(key);
-            assert count != 0 : "Attempted to remove an element that was not in the map.";
-            GfshResultsBag.this.limit -= count; 
-            GfshResultsBag.SetView.this.localLimit--;
-          }
-        }
-      }
-    }
-  }
-  
-  /**
-   * @author Asif
-   *
-   */
-  protected class LimitResultsBagIterator extends GfshResultsBag.ResultsBagIterator {
-    final private int localLimit;
-
-    private int currPos = 0;
-
-    /**
-     *guarded by GfshResultsBag2.this.limitLock object 
-     */
-    public LimitResultsBagIterator() {
-      localLimit = GfshResultsBag.this.limit;
-    }
-
-    public boolean hasNext() {
-      return this.currPos < this.localLimit;
-    }
-
-    public Object next() {
-      if (this.currPos == this.localLimit) {
-        throw new NoSuchElementException();
-      }
-      else {
-        Object next = super.next();
-        ++currPos;
-        return next;
-      }
-
-    }
-
-    public void remove() {
-      if (this.currPos == 0) {
-        // next has not yet been called
-        throw new IllegalStateException("next() must be called before remove()");
-      }
-      synchronized (GfshResultsBag.this.limitLock) {
-        super.remove();
-        --GfshResultsBag.this.limit;
-      }
-    }
-  }  
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/ObjectUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/ObjectUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/ObjectUtil.java
deleted file mode 100644
index 1dd66de..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/ObjectUtil.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.util;
-
-import java.lang.reflect.Method;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Map;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ReflectionUtil;
-
-public class ObjectUtil
-{
-	public static Object updateObject(Gfsh gfsh, 
-			Map<String, Method> setterMap, 
-			Object obj, 
-			String setterMethodName, 
-			String value, 
-			SimpleDateFormat dateFormat, boolean isCsvFormat) throws Exception
-	{
-		Method setterMethod = setterMap.get(setterMethodName);
-		if (setterMethod == null) {
-			return obj;
-		}
-		
-		Class types[] = setterMethod.getParameterTypes();
-		Class arg = types[0];
-		if (arg == byte.class || arg == Byte.class) {
-			setterMethod.invoke(obj, Byte.parseByte(value));
-		} else if (arg == char.class || arg == Character.class) {
-			setterMethod.invoke(obj, value.charAt(0));
-		} else if (arg == short.class || arg == Short.class) {
-			setterMethod.invoke(obj, Short.parseShort(value));
-		} else if (arg == int.class || arg == Integer.class) {
-			setterMethod.invoke(obj, Integer.parseInt(value));
-		} else if (arg == long.class || arg == Long.class) {
-			setterMethod.invoke(obj, Long.parseLong(value));
-		} else if (arg == float.class || arg == Float.class) {
-			setterMethod.invoke(obj, Float.parseFloat(value));
-		} else if (arg == double.class || arg == Double.class) {
-			setterMethod.invoke(obj, Double.parseDouble(value));
-		} else if (arg == Date.class) {
-			Date date = dateFormat.parse(value);
-			setterMethod.invoke(obj, date);
-		} else if (arg == String.class) {
-			
-			if (isCsvFormat) {
-				// Replace double quotes with single quotes
-				value = value.replaceAll("\"\"", "\"");
-				
-				// if begins with a quote then remove it
-				if (value.startsWith("\"")) {
-					value = value.substring(1);
-				}
-				// if ends with a quote  then remove it
-				if (value.endsWith("\"")) {
-					value = value.substring(0, value.length() - 1);
-				}
-			}
-			setterMethod.invoke(obj, value);
-		} else {
-			gfsh.println("Error: unsupported type: " + setterMethod.getName() + "(" + arg.getName() + ")");
-		}
-		return obj;
-	}
-	
-	public static Object getPrimitive(Gfsh gfsh, String value, boolean quoted) throws ParseException
-	{
-		if (quoted) {
-			// string
-			return value;
-		}
-		
-		
-		value = value.trim().toLowerCase();
-		if (value.length() == 0) {
-			return null;
-		}
-		char firstChar = value.charAt(0);
-		if (!(firstChar == '.' || firstChar >= '0' && firstChar <= '9')) {
-			// it's not number
-			return null;
-		}
-		
-		Object obj = null;
-		if (value.endsWith("b")) {
-			// byte
-			obj = new Byte(value.substring(0, value.length() - 1));
-		} else if (value.endsWith("c")) {
-			// char
-			obj = value.charAt(0);
-		} else if (value.endsWith("s")) {
-			// short
-			obj = new Short(value.substring(0, value.length() - 1));
-		} else if (value.endsWith("i")) {
-			// int
-			obj = new Integer(value.substring(0, value.length() - 1));
-		} else if (value.endsWith("l")) {
-			// long
-			obj = new Long(value.substring(0, value.length() - 1));
-		} else if (value.endsWith("f")) {
-			// float
-			obj = new Float(value.substring(0, value.length() - 1));
-		} else if (value.endsWith("d")) {
-			// double
-			obj = new Double(value.substring(0, value.length() - 1));
-		} else if (value.startsWith("to_date")) {
-			obj = gfsh.getDate(value);
-		} else {
-			if (value.indexOf(".") != -1 || value.indexOf("e") != -1) {
-				// use double by default
-				obj = new Double(value);
-			} else {
-				// us int by default
-				obj = new Integer(value);
-			}
-		}
-		
-		return obj;
-	}
-	
-	public static Object updateObject(Gfsh gfsh, 
-			Map<String, Method> setterMap, 
-			Object obj, 
-			String tableColumnName, 
-			Object value) throws Exception
-	{
-		Method setterMethod = setterMap.get("set" + tableColumnName);
-		if (setterMethod == null) {
-			// TODO: need to search the map. column names can be case insensitive 
-			return obj;
-		}
-		setterMethod.invoke(obj, value);
-		
-		return obj;
-	}
-	
-	public static Object getPrintableObject(Object object)
-	{
-		if (object == null) {
-			return "null";
-		}
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class)
-		{
-			return object.toString();
-			
-		} else if (object instanceof Date) {
-			
-			return object.toString();
-			
-		} else {
-			return ReflectionUtil.toStringGettersAnd(object);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/OutputUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/OutputUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/OutputUtil.java
deleted file mode 100644
index 0f24d14..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/OutputUtil.java
+++ /dev/null
@@ -1,255 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.util;
-
-import java.io.PrintWriter;
-import java.lang.reflect.Method;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ReflectionUtil;
-
-public class OutputUtil
-{
-	public static final int TYPE_KEYS = 0;
-	public static final int TYPE_VALUES = 1;
-	public static final int TYPE_KEYS_VALUES = 2;
-	
-	public static final String TAG_COLUMN_SEPARATOR = "#|";
-	
-	public static final String TAG_KEY = "#%key";
-	public static final String TAG_DATE_FORMAT = "#%date_format";
-	public static final String TAG_VALUE = "#%value";
-	public static final String TAG_VALUE_KEY = "#%value_key";
-	
-	
-	public static void printEntries(PrintWriter writer, Map map, 
-			String fieldTerminator, String rowTerminator, 
-			int firstRow, int lastRow,
-			int printType, boolean printHeader, 
-			SimpleDateFormat dateFormat, String valueKeyFieldName)
-	{
-		if (map == null) {
-			System.out.println("Error: map is null");
-			return;
-		}
-		
-		// Get all getters
-		Set<Map.Entry> entrySet = map.entrySet();
-		Object key = null;
-		Object value = null;
-		Method keyGetters[] = null;
-		Method valueGetters[] = null;
-		for (Entry entry : entrySet) {
-			key = entry.getKey();
-			value = entry.getValue();
-			keyGetters = ReflectionUtil.getAllGetters(key.getClass());
-			if (value == null) {
-				valueGetters = new Method[0];
-			} else {
-				valueGetters = ReflectionUtil.getAllGetters(value.getClass());
-			}
-			break;
-		}
-		
-		if (value == null) {
-			System.out.println("Error: value is null");
-			return;
-		}
-		
-		switch (printType) {
-		case TYPE_KEYS:
-			// Print keys
-			if (printHeader) {
-				writer.print(TAG_KEY + " " + key.getClass().getName());
-				writer.print(rowTerminator);
-				writer.print(TAG_DATE_FORMAT + " " + dateFormat.toPattern());
-				writer.print(rowTerminator);
-				printHeader(writer, key, keyGetters, fieldTerminator, rowTerminator);
-			}
-			for (Entry entry : entrySet) {
-				key = entry.getKey();
-				printObject(writer, keyGetters, key, fieldTerminator, rowTerminator, dateFormat);
-			}
-			break;
-		case TYPE_VALUES:
-			// Print values
-			if (printHeader) {
-				if (value != null) {
-					writer.print(TAG_VALUE + " " + value.getClass().getName());
-				}
-				writer.print(rowTerminator);
-				writer.print(TAG_VALUE_KEY + " " + valueKeyFieldName);
-				writer.print(rowTerminator);
-				writer.print(TAG_DATE_FORMAT + " " + dateFormat.toPattern());
-				writer.print(rowTerminator);
-				printHeader(writer, value, valueGetters, fieldTerminator, rowTerminator);
-			}
-			for (Entry entry : entrySet) {
-				value = entry.getValue();
-				printObject(writer, valueGetters, value, fieldTerminator, rowTerminator, dateFormat);
-			}
-			break;
-		case TYPE_KEYS_VALUES:
-		default:
-			// Print keys and values
-			if (printHeader) {
-				writer.print(TAG_KEY + " " + key.getClass().getName());
-				writer.print(rowTerminator);
-				if (value != null) {
-					writer.print(TAG_VALUE + " " + value.getClass().getName());
-				}
-				writer.print(rowTerminator);
-				writer.print(TAG_DATE_FORMAT + " " + dateFormat.toPattern());
-				writer.print(rowTerminator);
-				printHeader(writer, key, keyGetters, fieldTerminator);
-				writer.print(",");
-				printHeader(writer, value, valueGetters, fieldTerminator, rowTerminator);
-			}
-			for (Entry entry : entrySet) {
-				key = entry.getKey();
-				value = entry.getValue();
-				printObject(writer, keyGetters, key, fieldTerminator, dateFormat);
-				writer.print(",");
-				printObject(writer, valueGetters, value, fieldTerminator, dateFormat);
-				writer.print(rowTerminator);
-			}
-			break;
-		
-		}
-	}
-	
-	private static void printHeader(PrintWriter writer, Object object, Method methods[], 
-			String fieldTerminator, String rowTerminator)
-	{
-		printHeader(writer, object, methods, fieldTerminator);
-		writer.print(rowTerminator);
-	}
-	
-	private static void printHeader(PrintWriter writer, Object object, Method methods[], 
-			String fieldTerminator)
-	{
-		writer.print(TAG_COLUMN_SEPARATOR);
-
-		if (object == null || object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object instanceof Date)  
-		{
-			writer.print("Value");
-		} else {
-			for (int i = 0; i < methods.length; i++) {
-				String name = methods[i].getName().substring(3);
-				writer.print(name);
-				if (i < methods.length - 1) {
-					writer.print(fieldTerminator);
-				}
-			}
-		}
-	}
-	
-	public static void printObject(PrintWriter writer, 
-			Method methods[], 
-			Object object, 
-			String fieldTerminator, String rowTerminator, 
-			SimpleDateFormat dateFormat)
-	{
-		printObject(writer, methods, object, fieldTerminator, dateFormat);
-		writer.print(rowTerminator);
-	}
-	
-	private static void printObject(PrintWriter writer, 
-			Method methods[], 
-			Object object, 
-			String fieldTerminator, 
-			SimpleDateFormat dateFormat)
-	{
-		if (object == null) {
-			writer.print("null");
-		} else if (object instanceof String ) { //FindBugs (Below) - Possible null pointer dereference of object
-			String value = object.toString();
-			
-			// For each quote add matching quote
-			value = value.replaceAll("\"", "\"\"");
-			
-			// If contains a quote then enclose it with quotes
-			if (value.indexOf("\"") != -1) {
-				value = "\"" + value;
-				value = value + "\"";
-			} else {
-			
-				// If begins with a " then prepend a ".
-				if (value.startsWith("\"")) {
-					value = "\"" + value;
-				}
-				
-				// If ends with a " then end it with a ".
-				if (value.endsWith("\"")) {
-					value = value + "\"";
-				}
-			}
-			writer.print(value);
-			
-		} else if(object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class)
-		{
-			writer.print(object.toString());
-			
-		} else if (object instanceof Date) {
-			
-			writer.print(dateFormat.format((Date)object));
-			
-		} else if (methods != null) {
-			for (int i = 0; i < methods.length; i++) {
-				Method method = methods[i];
-				String name = method.getName();
-				try {
-					Object value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-					printObject(writer, null, value, fieldTerminator, dateFormat);
-					if (i < methods.length - 1) {
-						writer.print(fieldTerminator);
-					}
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-	
-	private static Object getPrintableValue(Object value)
-	{
-		if (value instanceof Byte) {
-			value = ((Byte) value).toString();
-		} else if (value instanceof byte[]) {
-			value = "[B " + ((byte[])value).length;
-		} else if (value instanceof boolean[]) {
-			value = "[Z " + ((boolean[])value).length;
-		} else if (value instanceof short[]) {
-			value = "[S " + ((short[])value).length;
-		} else if (value instanceof int[]) {
-			value = "[I " + ((int[])value).length;
-		} else if (value instanceof long[]) {
-			value = "[J " + ((long[])value).length;
-		} else if (value instanceof float[]) {
-			value = "[F " + ((float[])value).length;
-		} else if (value instanceof double[]) {
-			value = "[D " + ((double[])value).length;
-		}
-		return value;
-	}
-
-}


[51/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1922937f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1922937f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1922937f

Branch: refs/heads/feature/GEODE-17
Commit: 1922937f87b1f1b9eb85d616629e55d6373b76c5
Parents: d511979
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Mon Jul 6 10:41:48 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:43:33 2015 +0530

----------------------------------------------------------------------
 pulse/.classpath                                |   120 +
 pulse/.project                                  |    36 +
 pulse/.settings/.jsdtscope                      |    12 +
 pulse/.settings/org.eclipse.jdt.core.prefs      |     7 +
 .../.settings/org.eclipse.wst.common.component  |     9 +
 ...rg.eclipse.wst.common.project.facet.core.xml |    10 +
 .../org.eclipse.wst.jsdt.ui.superType.container |     1 +
 .../org.eclipse.wst.jsdt.ui.superType.name      |     1 +
 pulse/REMOVED_JARS.txt                          |    31 +
 pulse/RNDeltaChanges.txt                        |     3 +
 pulse/build.bat                                 |    50 +
 pulse/build.sh                                  |   157 +
 pulse/build.xml                                 |   604 +
 pulse/buildfiles/dependencies.xml               |     6 +
 pulse/buildfiles/osplatform.xml                 |    69 +
 pulse/buildfiles/utilities.xml                  |    33 +
 ...ource_licenses-Pivotal_GemFire_Pulse_8.0.txt |  1947 ++
 ...rce_licenses-Pivotal_GemFire_Pulse_8.1.0.txt |  2116 ++
 ...enses-VMware_vFabric_GemFire_Pulse_7.0.1.txt |  1647 ++
 ...enses-VMware_vFabric_GemFire_Pulse_7.0.2.txt |  1639 ++
 ...icenses-VMware_vFabric_GemFire_Pulse_7.0.txt |  1277 ++
 ...rce_licenses-vFabric_GemFire_Pulse_7.0.0.txt |     1 +
 ..._licenses-vFabric_GemFire_Pulse_7.0.Beta.txt |  1019 +
 pulse/release/docfiles/ReleaseNotes.txt         |     2 +
 .../tools/pulse/internal/PulseAppListener.java  |   693 +
 .../controllers/ExceptionHandlingAdvice.java    |    42 +
 .../internal/controllers/PulseController.java   |   581 +
 .../tools/pulse/internal/data/Cluster.java      |  3802 ++++
 .../tools/pulse/internal/data/DataBrowser.java  |   274 +
 .../pulse/internal/data/IClusterUpdater.java    |    27 +
 .../pulse/internal/data/JMXDataUpdater.java     |  2529 +++
 .../pulse/internal/data/JmxManagerFinder.java   |   165 +
 .../tools/pulse/internal/data/PulseConfig.java  |   116 +
 .../pulse/internal/data/PulseConstants.java     |   406 +
 .../tools/pulse/internal/data/PulseVersion.java |    94 +
 .../tools/pulse/internal/data/Repository.java   |   205 +
 .../gemfire/tools/pulse/internal/json/CDL.java  |   279 +
 .../tools/pulse/internal/json/Cookie.java       |   169 +
 .../tools/pulse/internal/json/CookieList.java   |    90 +
 .../gemfire/tools/pulse/internal/json/HTTP.java |   163 +
 .../tools/pulse/internal/json/HTTPTokener.java  |    77 +
 .../tools/pulse/internal/json/JSONArray.java    |   906 +
 .../pulse/internal/json/JSONException.java      |    28 +
 .../tools/pulse/internal/json/JSONML.java       |   467 +
 .../tools/pulse/internal/json/JSONObject.java   |  1593 ++
 .../tools/pulse/internal/json/JSONString.java   |    18 +
 .../tools/pulse/internal/json/JSONStringer.java |    78 +
 .../tools/pulse/internal/json/JSONTokener.java  |   446 +
 .../tools/pulse/internal/json/JSONWriter.java   |   327 +
 .../gemfire/tools/pulse/internal/json/README    |    68 +
 .../gemfire/tools/pulse/internal/json/XML.java  |   508 +
 .../tools/pulse/internal/json/XMLTokener.java   |   365 +
 .../tools/pulse/internal/log/LogWriter.java     |   256 +
 .../pulse/internal/log/MessageFormatter.java    |    93 +
 .../pulse/internal/log/PulseLogWriter.java      |   296 +
 .../tools/pulse/internal/log/PulseLogger.java   |   134 +
 .../internal/service/ClusterDetailsService.java |    99 +
 .../service/ClusterDiskThroughputService.java   |    69 +
 .../service/ClusterGCPausesService.java         |    61 +
 .../service/ClusterKeyStatisticsService.java    |    69 +
 .../internal/service/ClusterMemberService.java  |   123 +
 .../service/ClusterMembersRGraphService.java    |   362 +
 .../service/ClusterMemoryUsageService.java      |    60 +
 .../internal/service/ClusterRegionService.java  |   231 +
 .../internal/service/ClusterRegionsService.java |   233 +
 .../service/ClusterSelectedRegionService.java   |   268 +
 .../ClusterSelectedRegionsMemberService.java    |   139 +
 .../internal/service/ClusterWANInfoService.java |    72 +
 .../service/MemberAsynchEventQueuesService.java |    97 +
 .../internal/service/MemberClientsService.java  |   113 +
 .../internal/service/MemberDetailsService.java  |   119 +
 .../service/MemberDiskThroughputService.java    |    83 +
 .../internal/service/MemberGCPausesService.java |    75 +
 .../service/MemberGatewayHubService.java        |   153 +
 .../service/MemberHeapUsageService.java         |    75 +
 .../service/MemberKeyStatisticsService.java     |    88 +
 .../internal/service/MemberRegionsService.java  |   130 +
 .../internal/service/MembersListService.java    |    68 +
 .../pulse/internal/service/PulseService.java    |    32 +
 .../internal/service/PulseServiceFactory.java   |    46 +
 .../internal/service/PulseVersionService.java   |    64 +
 .../service/QueryStatisticsService.java         |   142 +
 .../internal/service/SystemAlertsService.java   |   124 +
 .../pulse/internal/util/ConnectionUtil.java     |    36 +
 .../pulse/internal/util/IPAddressUtil.java      |    56 +
 .../tools/pulse/internal/util/StringUtils.java  |    76 +
 .../tools/pulse/internal/util/TimeUtils.java    |   111 +
 .../main/resources/LogMessages_en_US.properties |    78 +
 .../main/resources/LogMessages_fr_FR.properties |    72 +
 pulse/src/main/resources/NoDataFound1.txt       |     1 +
 pulse/src/main/resources/NoDataFound2.txt       |    35 +
 pulse/src/main/resources/NoDataFound3.txt       |     6 +
 pulse/src/main/resources/default.properties     |     4 +
 pulse/src/main/resources/gemfire.properties     |    28 +
 pulse/src/main/resources/message.txt            |     1 +
 pulse/src/main/resources/pulse-users.properties |    11 +
 pulse/src/main/resources/pulse.properties       |    35 +
 .../src/main/resources/pulsesecurity.properties |     7 +
 .../src/main/resources/pulseversion.properties  |    14 +
 pulse/src/main/resources/sqlfire.properties     |    28 +
 pulse/src/main/resources/test1.txt              |     5 +
 pulse/src/main/resources/test2.txt              |     7 +
 pulse/src/main/resources/test3.txt              |     5 +
 pulse/src/main/resources/test4.txt              |     4 +
 pulse/src/main/resources/test5.txt              |     7 +
 pulse/src/main/resources/test6.txt              |    11 +
 pulse/src/main/resources/test7.txt              |    13 +
 .../resources/testNullObjectsAtRootLevel1.txt   |    25 +
 .../resources/testNullObjectsAtRootLevel2.txt   |    30 +
 pulse/src/main/resources/testQueryResult.txt    |   198 +
 .../src/main/resources/testQueryResult1000.txt  |  1023 +
 .../testQueryResultArrayAndArrayList.txt        |     8 +
 .../main/resources/testQueryResultArrayList.txt |     6 +
 .../resources/testQueryResultArrayOfList.txt    |    15 +
 .../resources/testQueryResultClusterSmall.txt   |    23 +
 .../testQueryResultClusterWithStruct.txt        |    10 +
 .../main/resources/testQueryResultHashMap.txt   |     8 +
 .../resources/testQueryResultHashMapSmall.txt   |    12 +
 .../src/main/resources/testQueryResultSmall.txt |    12 +
 .../resources/testQueryResultWithStruct.txt     |  1744 ++
 .../testQueryResultWithStructSmall.txt          |    15 +
 pulse/src/main/resources/test_pp.txt            |     7 +
 pulse/src/main/webapp/DataBrowser.html          |   350 +
 pulse/src/main/webapp/Login.html                |   125 +
 pulse/src/main/webapp/META-INF/MANIFEST.MF      |     3 +
 pulse/src/main/webapp/MemberDetails.html        |   601 +
 pulse/src/main/webapp/QueryStatistics.html      |   306 +
 .../webapp/WEB-INF/mvc-dispatcher-servlet.xml   |    18 +
 .../src/main/webapp/WEB-INF/spring-security.xml |    66 +
 pulse/src/main/webapp/WEB-INF/web.xml           |    45 +
 pulse/src/main/webapp/clusterDetail.html        |   659 +
 pulse/src/main/webapp/css/ForceDirected.css     |    27 +
 pulse/src/main/webapp/css/RGraph.css            |     0
 pulse/src/main/webapp/css/Treemap.css           |   115 +
 .../webapp/css/autocomplete/jsonSuggest.css     |    72 +
 pulse/src/main/webapp/css/base.css              |    55 +
 pulse/src/main/webapp/css/common.css            |   221 +
 .../webapp/css/fonts/DroidSans-Bold-webfont.eot |   Bin 0 -> 43462 bytes
 .../webapp/css/fonts/DroidSans-Bold-webfont.svg |   251 +
 .../webapp/css/fonts/DroidSans-Bold-webfont.ttf |   Bin 0 -> 43260 bytes
 .../css/fonts/DroidSans-Bold-webfont.woff       |   Bin 0 -> 27120 bytes
 .../main/webapp/css/fonts/DroidSans-webfont.eot |   Bin 0 -> 44926 bytes
 .../main/webapp/css/fonts/DroidSans-webfont.svg |   251 +
 .../main/webapp/css/fonts/DroidSans-webfont.ttf |   Bin 0 -> 44712 bytes
 .../webapp/css/fonts/DroidSans-webfont.woff     |   Bin 0 -> 27672 bytes
 pulse/src/main/webapp/css/grid/ui.jqgrid.css    |   841 +
 pulse/src/main/webapp/css/ie/ie.css             |     0
 pulse/src/main/webapp/css/ie/ie7.css            |     2 +
 pulse/src/main/webapp/css/ie/ie8.css            |     1 +
 pulse/src/main/webapp/css/ie/ie9.css            |     1 +
 pulse/src/main/webapp/css/jquery-ui.css         |   566 +
 .../src/main/webapp/css/jquery.jscrollpane.css  |   121 +
 pulse/src/main/webapp/css/jquery.splitter.css   |    48 +
 pulse/src/main/webapp/css/jquery.ui.all.css     |    11 +
 pulse/src/main/webapp/css/jquery.ui.core.css    |    41 +
 pulse/src/main/webapp/css/jquery.ui.theme.css   |   247 +
 pulse/src/main/webapp/css/jquery.ztreestyle.css |    90 +
 .../css/multiselect/jquery.multiselect.css      |   295 +
 .../main/webapp/css/multiselect/prettify.css    |    27 +
 pulse/src/main/webapp/css/multiselect/style.css |    16 +
 pulse/src/main/webapp/css/popup.css             |    36 +
 pulse/src/main/webapp/css/style.css             |  3048 +++
 pulse/src/main/webapp/css/treeView/Treemap.css  |   115 +
 pulse/src/main/webapp/css/ui.jqgrid.css         |   766 +
 .../src/main/webapp/images/about-gemfirexd.png  |   Bin 0 -> 4440 bytes
 pulse/src/main/webapp/images/about-sqlfire.png  |   Bin 0 -> 6277 bytes
 pulse/src/main/webapp/images/about.png          |   Bin 0 -> 4421 bytes
 pulse/src/main/webapp/images/acc-minus.png      |   Bin 0 -> 1049 bytes
 pulse/src/main/webapp/images/acc-n-minus.png    |   Bin 0 -> 961 bytes
 pulse/src/main/webapp/images/acc-n-plus.png     |   Bin 0 -> 988 bytes
 pulse/src/main/webapp/images/acc-plus.png       |   Bin 0 -> 1047 bytes
 pulse/src/main/webapp/images/activeServer.png   |   Bin 0 -> 2846 bytes
 pulse/src/main/webapp/images/arrow-down.png     |   Bin 0 -> 986 bytes
 pulse/src/main/webapp/images/arrow-up.png       |   Bin 0 -> 988 bytes
 pulse/src/main/webapp/images/bg-image.png       |   Bin 0 -> 948 bytes
 pulse/src/main/webapp/images/bg-imageLogin.png  |   Bin 0 -> 946 bytes
 pulse/src/main/webapp/images/blue-msg-icon.png  |   Bin 0 -> 1194 bytes
 .../src/main/webapp/images/border-left-grid.png |   Bin 0 -> 927 bytes
 pulse/src/main/webapp/images/bread-crumb.png    |   Bin 0 -> 1182 bytes
 pulse/src/main/webapp/images/bubble_arrow.png   |   Bin 0 -> 1168 bytes
 pulse/src/main/webapp/images/chart-active.png   |   Bin 0 -> 1096 bytes
 pulse/src/main/webapp/images/chart.png          |   Bin 0 -> 1095 bytes
 pulse/src/main/webapp/images/checkbox.png       |   Bin 0 -> 1630 bytes
 pulse/src/main/webapp/images/chkbox.png         |   Bin 0 -> 1313 bytes
 pulse/src/main/webapp/images/copy_icon.png      |   Bin 0 -> 1172 bytes
 pulse/src/main/webapp/images/correct_icon.png   |   Bin 0 -> 1143 bytes
 .../main/webapp/images/correct_small_icon.png   |   Bin 0 -> 1065 bytes
 .../main/webapp/images/correct_white_icon.png   |   Bin 0 -> 1122 bytes
 pulse/src/main/webapp/images/cross.png          |   Bin 0 -> 2954 bytes
 .../main/webapp/images/dataViewWanEnabled.png   |   Bin 0 -> 1204 bytes
 pulse/src/main/webapp/images/dd_active.png      |   Bin 0 -> 1065 bytes
 pulse/src/main/webapp/images/dd_arrow.png       |   Bin 0 -> 1058 bytes
 .../webapp/images/error-locators-others.png     |   Bin 0 -> 2052 bytes
 pulse/src/main/webapp/images/error-locators.png |   Bin 0 -> 2023 bytes
 .../images/error-manager-locator-others.png     |   Bin 0 -> 2067 bytes
 .../webapp/images/error-manager-locator.png     |   Bin 0 -> 2047 bytes
 .../webapp/images/error-managers-others.png     |   Bin 0 -> 2051 bytes
 pulse/src/main/webapp/images/error-managers.png |   Bin 0 -> 2025 bytes
 .../main/webapp/images/error-message-icon.png   |   Bin 0 -> 1193 bytes
 pulse/src/main/webapp/images/error-msg-icon.png |   Bin 0 -> 1194 bytes
 pulse/src/main/webapp/images/error-others.png   |   Bin 0 -> 2066 bytes
 .../src/main/webapp/images/error-otheruser.png  |   Bin 0 -> 2002 bytes
 .../main/webapp/images/error-status-icon.png    |   Bin 0 -> 2024 bytes
 pulse/src/main/webapp/images/error.png          |   Bin 0 -> 1110 bytes
 pulse/src/main/webapp/images/graph-active.png   |   Bin 0 -> 1360 bytes
 pulse/src/main/webapp/images/graph.png          |   Bin 0 -> 1374 bytes
 .../images/graph/key-statistics-graph.png       |   Bin 0 -> 1617 bytes
 .../webapp/images/graph/memory-usage-graph.png  |   Bin 0 -> 4366 bytes
 pulse/src/main/webapp/images/graph/reads.png    |   Bin 0 -> 3423 bytes
 .../images/graph/throughput-writes-graph.png    |   Bin 0 -> 4340 bytes
 pulse/src/main/webapp/images/graph/topology.png |   Bin 0 -> 14997 bytes
 pulse/src/main/webapp/images/graph/treeview.png |   Bin 0 -> 3386 bytes
 pulse/src/main/webapp/images/graph/writes.png   |   Bin 0 -> 3527 bytes
 pulse/src/main/webapp/images/grid-active.png    |   Bin 0 -> 1095 bytes
 pulse/src/main/webapp/images/grid.png           |   Bin 0 -> 1094 bytes
 .../webapp/images/header-bg-bottom-border.png   |   Bin 0 -> 924 bytes
 pulse/src/main/webapp/images/hide_ico.png       |   Bin 0 -> 3281 bytes
 pulse/src/main/webapp/images/history-icon.png   |   Bin 0 -> 3533 bytes
 pulse/src/main/webapp/images/history-remove.png |   Bin 0 -> 1185 bytes
 .../src/main/webapp/images/hor-spiltter-dot.png |   Bin 0 -> 990 bytes
 .../webapp/images/icons members/locators.png    |   Bin 0 -> 3106 bytes
 .../images/icons members/locators_others.png    |   Bin 0 -> 3118 bytes
 .../webapp/images/icons members/managers.png    |   Bin 0 -> 3103 bytes
 .../images/icons members/managers_locators.png  |   Bin 0 -> 3120 bytes
 .../images/icons members/managers_others.png    |   Bin 0 -> 3117 bytes
 .../main/webapp/images/icons members/others.png |   Bin 0 -> 3102 bytes
 pulse/src/main/webapp/images/info-msg-icon.png  |   Bin 0 -> 1194 bytes
 pulse/src/main/webapp/images/lastLine.png       |   Bin 0 -> 948 bytes
 pulse/src/main/webapp/images/line.png           |   Bin 0 -> 929 bytes
 pulse/src/main/webapp/images/mask-bg.png        |   Bin 0 -> 940 bytes
 .../webapp/images/membersName_arror-off.png     |   Bin 0 -> 1148 bytes
 .../main/webapp/images/membersName_arror-on.png |   Bin 0 -> 1170 bytes
 pulse/src/main/webapp/images/minus.png          |   Bin 0 -> 2959 bytes
 .../webapp/images/normal-locators-others.png    |   Bin 0 -> 2025 bytes
 .../src/main/webapp/images/normal-locators.png  |   Bin 0 -> 1995 bytes
 .../images/normal-manager-locator-others.png    |   Bin 0 -> 2037 bytes
 .../webapp/images/normal-manager-locator.png    |   Bin 0 -> 2029 bytes
 .../webapp/images/normal-managers-others.png    |   Bin 0 -> 2027 bytes
 .../src/main/webapp/images/normal-managers.png  |   Bin 0 -> 1997 bytes
 pulse/src/main/webapp/images/normal-others.png  |   Bin 0 -> 1988 bytes
 .../src/main/webapp/images/normal-otheruser.png |   Bin 0 -> 1968 bytes
 .../main/webapp/images/normal-status-icon.png   |   Bin 0 -> 1955 bytes
 pulse/src/main/webapp/images/normal.png         |   Bin 0 -> 1110 bytes
 .../src/main/webapp/images/orange-msg-icon.png  |   Bin 0 -> 1194 bytes
 pulse/src/main/webapp/images/pivotal-logo.png   |   Bin 0 -> 4302 bytes
 pulse/src/main/webapp/images/plus.png           |   Bin 0 -> 1178 bytes
 pulse/src/main/webapp/images/plusMinusIcon.png  |   Bin 0 -> 1192 bytes
 pulse/src/main/webapp/images/popup-arrow.png    |   Bin 0 -> 1075 bytes
 .../main/webapp/images/popup-close-button.png   |   Bin 0 -> 1026 bytes
 .../images/pulse-monitoring-gemfirexd-old.png   |   Bin 0 -> 6606 bytes
 .../images/pulse-monitoring-gemfirexd.png       |   Bin 0 -> 4440 bytes
 .../webapp/images/pulse-monitoring-sqlfire.png  |   Bin 0 -> 6467 bytes
 .../src/main/webapp/images/pulse-monitoring.png |   Bin 0 -> 4741 bytes
 pulse/src/main/webapp/images/radio-off.png      |   Bin 0 -> 1252 bytes
 pulse/src/main/webapp/images/radio-on.png       |   Bin 0 -> 1306 bytes
 pulse/src/main/webapp/images/radio.png          |   Bin 0 -> 2476 bytes
 pulse/src/main/webapp/images/regionIcons.png    |   Bin 0 -> 1495 bytes
 pulse/src/main/webapp/images/rightBorder.png    |   Bin 0 -> 927 bytes
 pulse/src/main/webapp/images/searchIcon.png     |   Bin 0 -> 1592 bytes
 pulse/src/main/webapp/images/seperator.png      |   Bin 0 -> 929 bytes
 pulse/src/main/webapp/images/server.png         |   Bin 0 -> 1233 bytes
 .../webapp/images/severe-locators-others.png    |   Bin 0 -> 2026 bytes
 .../src/main/webapp/images/severe-locators.png  |   Bin 0 -> 1980 bytes
 .../images/severe-manager-locator-others.png    |   Bin 0 -> 2032 bytes
 .../webapp/images/severe-manager-locator.png    |   Bin 0 -> 2026 bytes
 .../webapp/images/severe-managers-others.png    |   Bin 0 -> 2026 bytes
 .../src/main/webapp/images/severe-managers.png  |   Bin 0 -> 1985 bytes
 .../src/main/webapp/images/severe-msg-icon.png  |   Bin 0 -> 1194 bytes
 pulse/src/main/webapp/images/severe-others.png  |   Bin 0 -> 2007 bytes
 .../src/main/webapp/images/severe-otheruser.png |   Bin 0 -> 1959 bytes
 .../main/webapp/images/severe-status-icon.png   |   Bin 0 -> 2218 bytes
 pulse/src/main/webapp/images/severe.png         |   Bin 0 -> 1110 bytes
 pulse/src/main/webapp/images/show_ico.png       |   Bin 0 -> 3296 bytes
 pulse/src/main/webapp/images/spacer.png         |   Bin 0 -> 922 bytes
 pulse/src/main/webapp/images/sqlfire.png        |   Bin 0 -> 6467 bytes
 pulse/src/main/webapp/images/status-down.png    |   Bin 0 -> 1125 bytes
 pulse/src/main/webapp/images/status-up.png      |   Bin 0 -> 1104 bytes
 pulse/src/main/webapp/images/subServer.png      |   Bin 0 -> 2201 bytes
 pulse/src/main/webapp/images/tab-bottom-bg.png  |   Bin 0 -> 929 bytes
 pulse/src/main/webapp/images/treeView-img.png   |   Bin 0 -> 962 bytes
 .../main/webapp/images/ui-anim_basic_16x16.gif  |   Bin 0 -> 1459 bytes
 .../src/main/webapp/images/ver-spiltter-dot.png |   Bin 0 -> 979 bytes
 .../webapp/images/warning-locators-others.png   |   Bin 0 -> 2048 bytes
 .../src/main/webapp/images/warning-locators.png |   Bin 0 -> 2032 bytes
 .../images/warning-manager-locator-others.png   |   Bin 0 -> 2071 bytes
 .../webapp/images/warning-manager-locator.png   |   Bin 0 -> 2052 bytes
 .../webapp/images/warning-managers-others.png   |   Bin 0 -> 2023 bytes
 .../src/main/webapp/images/warning-managers.png |   Bin 0 -> 2030 bytes
 .../src/main/webapp/images/warning-msg-icon.png |   Bin 0 -> 1194 bytes
 pulse/src/main/webapp/images/warning-others.png |   Bin 0 -> 2027 bytes
 .../main/webapp/images/warning-otheruser.png    |   Bin 0 -> 2010 bytes
 .../main/webapp/images/warning-status-icon.png  |   Bin 0 -> 1714 bytes
 pulse/src/main/webapp/images/warning.png        |   Bin 0 -> 1107 bytes
 .../src/main/webapp/images/yellow-msg-icon.png  |   Bin 0 -> 1194 bytes
 pulse/src/main/webapp/index.html                |    49 +
 .../main/webapp/properties/default.properties   |     4 +
 .../webapp/properties/default_en.properties     |     4 +
 .../main/webapp/properties/gemfire.properties   |    28 +
 .../webapp/properties/gemfire_en.properties     |    28 +
 .../main/webapp/properties/gemfirexd.properties |    28 +
 .../webapp/properties/gemfirexd_en.properties   |    28 +
 .../src/main/webapp/properties/index.properties |     1 +
 .../main/webapp/properties/index_fr.properties  |     2 +
 .../main/webapp/properties/sqlfire.properties   |    28 +
 pulse/src/main/webapp/regionDetail.html         |   550 +
 pulse/src/main/webapp/scripts/lib/common.js     |   517 +
 pulse/src/main/webapp/scripts/lib/excanvas.js   |  1416 ++
 .../main/webapp/scripts/lib/grid.locale-en.js   |   169 +
 pulse/src/main/webapp/scripts/lib/html5.js      |     3 +
 pulse/src/main/webapp/scripts/lib/jit.js        | 17208 +++++++++++++++++
 .../src/main/webapp/scripts/lib/jquery-1.7.2.js |  9404 +++++++++
 .../webapp/scripts/lib/jquery.generateFile.js   |    58 +
 .../scripts/lib/jquery.i18n.properties.js       |   336 +
 .../webapp/scripts/lib/jquery.jqGrid.src.js     | 12182 ++++++++++++
 .../webapp/scripts/lib/jquery.jscrollpane.js    |  1340 ++
 .../webapp/scripts/lib/jquery.mousewheel.js     |    84 +
 .../webapp/scripts/lib/jquery.placeholder.js    |   106 +
 .../main/webapp/scripts/lib/jquery.sparkline.js |  3001 +++
 .../main/webapp/scripts/lib/jquery.tablednd.js  |   383 +
 .../main/webapp/scripts/lib/jquery.timeago.js   |   193 +
 .../webapp/scripts/lib/jquery.ztree.core-3.5.js |  1650 ++
 .../scripts/lib/jquery.ztree.excheck-3.5.js     |   624 +
 pulse/src/main/webapp/scripts/lib/tooltip.js    |   357 +
 .../webapp/scripts/multiselect/jquery-ui.js     | 14987 ++++++++++++++
 .../scripts/multiselect/jquery.multiselect.js   |   816 +
 .../main/webapp/scripts/multiselect/prettify.js |  1536 ++
 .../webapp/scripts/pulsescript/MemberDetails.js |  1034 +
 .../scripts/pulsescript/PulseCallbacks.js       |  1724 ++
 .../scripts/pulsescript/PulseFunctions.js       |   216 +
 .../webapp/scripts/pulsescript/clusterDetail.js |  2349 +++
 .../scripts/pulsescript/clusterRGraphMembers.js |  1504 ++
 .../main/webapp/scripts/pulsescript/common.js   |  1615 ++
 .../scripts/pulsescript/pages/DataBrowser.js    |   651 +
 .../pulsescript/pages/DataBrowserQuery.js       |   953 +
 .../pages/DataBrowserQueryHistory.js            |    84 +
 .../webapp/scripts/pulsescript/pages/Login.js   |   159 +
 .../webapp/scripts/pulsescript/pages/index.js   |    15 +
 .../scripts/pulsescript/queryStatistics.js      |   304 +
 .../webapp/scripts/pulsescript/regionView.js    |   746 +
 .../scripts/selectbox-customize/jquery.sb.js    |   864 +
 .../pulse/testbed/GemFireDistributedSystem.java |   312 +
 .../tools/pulse/testbed/GemfireTopology.java    |     5 +
 .../tools/pulse/testbed/PropFileHelper.java     |   104 +
 .../pulse/testbed/PropMockDataUpdater.java      |   504 +
 .../gemfire/tools/pulse/testbed/TestBed.java    |    57 +
 .../tools/pulse/testbed/driver/PulseUITest.java |   311 +
 .../pulse/testbed/driver/TomcatHelper.java      |    80 +
 .../tools/pulse/tests/AggregateStatement.java   |   206 +
 .../pulse/tests/AggregateStatementMBean.java    |   157 +
 .../pulse/tests/DataBrowserResultLoader.java    |    73 +
 .../pulse/tests/GemFireXDAggregateTable.java    |    35 +
 .../tests/GemFireXDAggregateTableMBean.java     |    17 +
 .../tools/pulse/tests/GemFireXDCluster.java     |    84 +
 .../pulse/tests/GemFireXDClusterMBean.java      |    21 +
 .../tools/pulse/tests/GemFireXDMember.java      |    69 +
 .../tools/pulse/tests/GemFireXDMemberMBean.java |    20 +
 .../gemfire/tools/pulse/tests/JMXBaseBean.java  |    56 +
 .../tools/pulse/tests/JMXProperties.java        |    36 +
 .../gemfire/tools/pulse/tests/Member.java       |   178 +
 .../gemfire/tools/pulse/tests/MemberMBean.java  |    75 +
 .../tools/pulse/tests/PulseAutomatedTests.java  |  1439 ++
 .../tools/pulse/tests/PulseTestData.java        |    95 +
 .../tools/pulse/tests/PulseTestLocators.java    |   210 +
 .../gemfire/tools/pulse/tests/PulseTests.java   |  2245 +++
 .../gemfire/tools/pulse/tests/Region.java       |   181 +
 .../gemfire/tools/pulse/tests/RegionMBean.java  |    48 +
 .../tools/pulse/tests/RegionOnMember.java       |    73 +
 .../tools/pulse/tests/RegionOnMemberMBean.java  |    35 +
 .../gemfire/tools/pulse/tests/Server.java       |   348 +
 .../gemfire/tools/pulse/tests/ServerObject.java |   247 +
 .../tools/pulse/tests/ServerObjectMBean.java    |    66 +
 .../gemfire/tools/pulse/tests/TomcatHelper.java |    86 +
 .../pulse/tests/junit/BaseServiceTest.java      |   231 +
 .../junit/ClusterSelectedRegionServiceTest.java |   344 +
 ...ClusterSelectedRegionsMemberServiceTest.java |   356 +
 .../junit/MemberGatewayHubServiceTest.java      |   417 +
 pulse/src/test/resources/test.properties        |   842 +
 pulse/src/test/resources/testbed.properties     |   138 +
 378 files changed, 131650 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/.classpath
----------------------------------------------------------------------
diff --git a/pulse/.classpath b/pulse/.classpath
new file mode 100644
index 0000000..0052fa2
--- /dev/null
+++ b/pulse/.classpath
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/test/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="owner.project.facets" value="java"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.springsource.sts.ide.tomcat.runtimeTarget/VMware vFabric tc Server Developer Edition (Runtime) v2.7">
+		<attributes>
+			<attribute name="owner.project.facets" value="jst.web"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+	<classpathentry kind="lib" path="ext-libs/spring-security-config-3.1.4.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-security-core-3.1.4.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-security-web-3.1.4.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/com.springsource.org.apache.commons.beanutils-1.8.0.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/com.springsource.org.apache.commons.collections-3.2.0.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/com.springsource.org.apache.commons.digester-1.8.1.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/com.springsource.org.apache.commons.logging-1.1.1.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/commons-lang-2.6.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="src/main/resources">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/classes"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/servlet-api-2.5-20081211.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+	<classpathentry kind="lib" path="ext-libs/selenium-server-standalone-2.41.0.jar"/>
+	<classpathentry kind="var" path="GCM_DIR/where/java/apache-tomcat/7.0.30/ecj-3.7.2.jar"/>
+	<classpathentry kind="var" path="GCM_DIR/where/java/apache-tomcat/7.0.30/tomcat-embed-core.jar"/>
+	<classpathentry kind="var" path="GCM_DIR/where/java/apache-tomcat/7.0.30/tomcat-embed-jasper.jar"/>
+	<classpathentry kind="var" path="GCM_DIR/where/java/apache-tomcat/7.0.30/tomcat-embed-logging-juli.jar"/>
+	<classpathentry kind="lib" path="ext-libs/spring-aop-3.2.9.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-beans-3.2.9.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-context-3.2.9.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-core-3.2.9.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-expression-3.2.9.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-web-3.2.9.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-webmvc-3.2.9.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-ldap-core-1.3.1.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-security-ldap-3.1.4.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="ext-libs/spring-tx-3.0.5.RELEASE.jar">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="PULSE_OUTPUT/classes"/>
+</classpath>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/.project
----------------------------------------------------------------------
diff --git a/pulse/.project b/pulse/.project
new file mode 100644
index 0000000..7c21b55
--- /dev/null
+++ b/pulse/.project
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Pulse</name>
+	<comment>Pivotal GemFire Monitoring Application</comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+	</natures>
+</projectDescription>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/.settings/.jsdtscope
----------------------------------------------------------------------
diff --git a/pulse/.settings/.jsdtscope b/pulse/.settings/.jsdtscope
new file mode 100644
index 0000000..b46b920
--- /dev/null
+++ b/pulse/.settings/.jsdtscope
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/webapp"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+		<attributes>
+			<attribute name="hide" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+	<classpathentry kind="output" path=""/>
+</classpath>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/.settings/org.eclipse.jdt.core.prefs
----------------------------------------------------------------------
diff --git a/pulse/.settings/org.eclipse.jdt.core.prefs b/pulse/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..f287d53
--- /dev/null
+++ b/pulse/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/.settings/org.eclipse.wst.common.component
----------------------------------------------------------------------
diff --git a/pulse/.settings/org.eclipse.wst.common.component b/pulse/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..2008997
--- /dev/null
+++ b/pulse/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="Pulse">
+        <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
+        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
+        <property name="context-root" value="Pulse"/>
+        <property name="java-output-path" value="/Pulse/PULSE_OUTPUT/classes"/>
+    </wb-module>
+</project-modules>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/.settings/org.eclipse.wst.common.project.facet.core.xml
----------------------------------------------------------------------
diff --git a/pulse/.settings/org.eclipse.wst.common.project.facet.core.xml b/pulse/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..20c93fa
--- /dev/null
+++ b/pulse/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <runtime name="VMware vFabric tc Server Developer Edition (Runtime) v2.7"/>
+  <fixed facet="wst.jsdt.web"/>
+  <fixed facet="java"/>
+  <fixed facet="jst.web"/>
+  <installed facet="java" version="1.6"/>
+  <installed facet="jst.web" version="3.0"/>
+  <installed facet="wst.jsdt.web" version="1.0"/>
+</faceted-project>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/.settings/org.eclipse.wst.jsdt.ui.superType.container
----------------------------------------------------------------------
diff --git a/pulse/.settings/org.eclipse.wst.jsdt.ui.superType.container b/pulse/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000..3bd5d0a
--- /dev/null
+++ b/pulse/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/.settings/org.eclipse.wst.jsdt.ui.superType.name
----------------------------------------------------------------------
diff --git a/pulse/.settings/org.eclipse.wst.jsdt.ui.superType.name b/pulse/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000..05bd71b
--- /dev/null
+++ b/pulse/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/REMOVED_JARS.txt
----------------------------------------------------------------------
diff --git a/pulse/REMOVED_JARS.txt b/pulse/REMOVED_JARS.txt
new file mode 100644
index 0000000..57c0b09
--- /dev/null
+++ b/pulse/REMOVED_JARS.txt
@@ -0,0 +1,31 @@
+The following jars were removed from this source code. These should be
+downloaded from maven central as part of the build.
+
+ext-libs/com.springsource.org.apache.commons.beanutils-1.8.0.jar
+ext-libs/com.springsource.org.apache.commons.collections-3.2.0.jar
+ext-libs/com.springsource.org.apache.commons.digester-1.8.1.jar
+ext-libs/com.springsource.org.apache.commons.logging-1.1.1.jar
+ext-libs/commons-codec-1.6.jar
+ext-libs/commons-lang-2.6.jar
+ext-libs/commons-logging-1.1.3.jar
+ext-libs/fluent-hc-4.3.3.jar
+ext-libs/httpclient-4.3.3.jar
+ext-libs/httpclient-cache-4.3.3.jar
+ext-libs/httpcore-4.3.2.jar
+ext-libs/httpmime-4.3.3.jar
+ext-libs/junit-4.10.jar
+ext-libs/selenium-server-standalone-2.41.0.jar
+ext-libs/servlet-api-2.5-20081211.jar
+ext-libs/spring-aop-3.2.9.RELEASE.jar
+ext-libs/spring-beans-3.2.9.RELEASE.jar
+ext-libs/spring-context-3.2.9.RELEASE.jar
+ext-libs/spring-core-3.2.9.RELEASE.jar
+ext-libs/spring-expression-3.2.9.RELEASE.jar
+ext-libs/spring-ldap-core-1.3.1.RELEASE.jar
+ext-libs/spring-security-config-3.1.4.RELEASE.jar
+ext-libs/spring-security-core-3.1.4.RELEASE.jar
+ext-libs/spring-security-ldap-3.1.4.RELEASE.jar
+ext-libs/spring-security-web-3.1.4.RELEASE.jar
+ext-libs/spring-tx-3.0.5.RELEASE.jar
+ext-libs/spring-web-3.2.9.RELEASE.jar
+ext-libs/spring-webmvc-3.2.9.RELEASE.jar

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/RNDeltaChanges.txt
----------------------------------------------------------------------
diff --git a/pulse/RNDeltaChanges.txt b/pulse/RNDeltaChanges.txt
new file mode 100644
index 0000000..0d11028
--- /dev/null
+++ b/pulse/RNDeltaChanges.txt
@@ -0,0 +1,3 @@
+##############################################################################
+######### Please keep text to 78 char width - no wider than this #############
+##############################################################################

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/build.bat
----------------------------------------------------------------------
diff --git a/pulse/build.bat b/pulse/build.bat
new file mode 100755
index 0000000..366166e
--- /dev/null
+++ b/pulse/build.bat
@@ -0,0 +1,50 @@
+@echo off
+set scriptdir=%~dp0
+set BASEDIR=%scriptdir:\buildfiles\=%
+if exist "%BASEDIR%\build.xml" @goto baseok
+echo Could not determine BASEDIR location
+verify other 2>nul
+goto done
+:baseok
+
+set GEMFIRE=
+
+if not defined GCMDIR (
+  set GCMDIR=J:\
+)
+if not exist %GCMDIR% (
+  echo "ERROR: unable to locate GCMDIR %GCMDIR% maybe you forgot to map the J: network drive to //samba/gcm"
+  verify other 2>nul
+  goto done
+)
+
+set LDAP_SERVER_FQDN=ldap.gemstone.com
+if exist \\inf1\shared\users (
+  set LDAP_SERVER_FQDN=ldap.pune.gemstone.com
+)
+
+set JAVA_HOME=%GCMDIR%\where\jdk\1.6.0_26\x86.Windows_NT
+if defined ALT_JAVA_HOME (
+  set JAVA_HOME=%ALT_JAVA_HOME%
+)
+set ANT_HOME=%GCMDIR%\where\java\ant\apache-ant-1.8.2
+if defined ALT_ANT_HOME (
+  set ANT_HOME=%ALT_ANT_HOME%
+)
+set ANT_ARGS=%ANT_ARGS% -lib %GCMDIR%\where\java\jcraft\jsch\jsch-0.1.44\jsch-0.1.44.jar
+set PATHOLD=%PATH%
+set PATH=%JAVA_HOME%\bin;%PATH%
+
+echo JAVA_HOME = %JAVA_HOME%
+echo ANT_HOME = %ANT_HOME%
+echo CLASSPATH = %CLASSPATH%
+echo %DATE% %TIME%
+
+echo running %ANT_HOME%\bin\ant.bat
+call %ANT_HOME%\bin\ant.bat %*
+if not defined ERRORLEVEL set ERRORLEVEL=0
+
+:done
+echo %ERRORLEVEL% > .xbuildfailure
+set ERRORLEVEL=
+if defined PATHOLD set PATH=%PATHOLD%

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/build.sh
----------------------------------------------------------------------
diff --git a/pulse/build.sh b/pulse/build.sh
new file mode 100755
index 0000000..0a9f8d2
--- /dev/null
+++ b/pulse/build.sh
@@ -0,0 +1,157 @@
+#!/bin/bash
+# Set BASEDIR to be the toplevel checkout directory.
+# We do this so that BASEDIR can be used elsewhere if needed
+#set -xv
+exec 0<&-
+BASEDIR=`/usr/bin/dirname $0`
+OLDPWD=$PWD
+cd $BASEDIR
+export BASEDIR=`/usr/bin/dirname $PWD`
+cd $OLDPWD
+
+unset CLASSPATH
+export CLASSPATH
+
+unset GEMFIRE
+export GEMFIRE
+
+PING="ping -c 1"
+if [ `uname` = "SunOS" ]; then
+  export GCMDIR=${GCMDIR:-"/gcm"}
+  export JAVA_HOME=${ALT_JAVA_HOME:-$GCMDIR/where/jdk/1.6.0_26/sparc.Solaris}
+  # for JVM debugging
+  # export JAVA_HOME=/export/avocet2/users/otisa/j2se142debug
+  logfile=buildSol.log
+  if [ -d "/export/std11_gfe/bin" ]; then
+    # Studio 11 version CC: Sun C++ 5.8 Patch 121017-05 2006/08/30
+    export SunCompilerDir=/export/std11_gfe/bin
+  else
+    echo "Sun Studio 11 compiler not found";
+  fi
+
+  # Studio 11 version CC: Sun C++ 5.8 Patch 121017-05 2006/08/30
+  SunCompilerVer=`$SunCompilerDir/CC -V 2>&1 `
+  echo "Using Studio 11 at $SunCompilerDir "
+  echo "    version: $SunCompilerVer "
+
+elif [ `uname` = "Darwin" ]; then
+  export GCMDIR=${GCMDIR:-"/export/gcm"}
+    export JAVA_HOME=${ALT_JAVA_HOME:-/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home}
+  if [ ! -d $JAVA_HOME ]; then
+    echo "Upgrade to Leopard Please, or set ALT_JAVA_HOME to the soylatte VM"
+cat << __HERE__
+    Upgrade to Leopard Please, or set ALT_JAVA_HOME to the soylatte VM
+    #example setup
+    export ALT_JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
+    #Also add these to buildmac.properties
+    javac.secondary=${gcm.dir}/where/jdk/1.6.0_3/i386.darwin
+    default.testVM=${gcm.dir}/where/jdk/1.6.0_3/i386.darwin
+    default.testVM64=${gcm.dir}/where/jdk/1.6.0_3/i386.darwin
+__HERE__
+    exit 1
+  fi
+  export GccCCompiler=/usr/bin/gcc
+  export GccCplusplusCompiler=/usr/bin/g++
+  GccCompilerVer=`$GccCCompiler --version | head -1  2>&1 `
+  export GccMajorVer="3"
+  echo "Using gcc version: $GccCompilerVer"
+  logfile=buildMac.log
+  export PATH=`dirname $GccCplusplusCompiler`:$PATH
+
+elif [ `uname` = "Linux" ]; then
+  export GCMDIR=${GCMDIR:-"/gcm"}
+  export JAVA_HOME=${ALT_JAVA_HOME:-$GCMDIR/where/jdk/1.6.0_26/x86.linux}
+  #export JAVA_HOME=/export/avocet2/users/otisa/j2se142debugLinux
+
+  export GccCCompiler=/usr/bin/gcc
+  export GccCplusplusCompiler=/usr/bin/g++
+  GccCompilerVer=`$GccCCompiler --version | head -1  2>&1 `
+  export GccMajorVer="3"
+
+  echo "Using gcc version: $GccCompilerVer"
+  logfile=buildLinux.log
+  export PATH=`dirname $GccCplusplusCompiler`:$PATH
+  # set vars for mono if available
+  if which xbuild >/dev/null 2>/dev/null; then
+    export XBUILD="`which xbuild`"
+    export MONO="`which mono`"
+  fi
+elif [ `uname` = "AIX" ]; then
+  export GCMDIR=${GCMDIR:-"/gcm"}
+  export JAVA_HOME=${ALT_JAVA_HOME:-$GCMDIR/where/jdk/1.6.0-ibm/RISC6000.AIX}
+  #export GccCCompiler=/bin/gcc
+  #export GccCplusplusCompiler=/bin/g++
+  #GccCompilerVer=`$GccCCompiler --version | head -1  2>&1 `
+  #export GccMajorVer="4"
+  #echo "Using gcc version: $GccCompilerVer"
+  logfile=buildAIX.log
+  #export PATH=`dirname $GccCplusplusCompiler`:$PATH
+  NO_BUILD_LOG=1
+else
+  echo "Defaulting to Windows build"
+  # unset TERMCAP since it causes issues when used
+  # with windows environment variables
+  unset TERMCAP
+  # suppress DOS path warnings
+  if [ -z "${CYGWIN}" ]; then
+    export CYGWIN="nodosfilewarning"
+  else
+    export CYGWIN="${CYGWIN} nodosfilewarning"
+  fi
+
+  PING="ping -n 1"
+  rm -f .xbuildfailure
+  cmd.exe /c .\\build.bat "$@"
+  if [ -r .xbuildfailure ]; then
+    read stat <.xbuildfailure
+    rm -f .xbuildfailure
+    exit $stat
+  fi
+
+fi
+
+# setup the LDAP server for Pune/Beaverton networks;
+
+if [ -z "${LDAP_SERVER_FQDN}" ]; then
+  if expr `$PING ldap.pune.gemstone.com | sed -n 's/^.* time[^ ]\([0-9\.]*\).*$/\1/p'` '<' 50 >/dev/null 2>/dev/null; then
+    LDAP_SERVER_FQDN="ldap.pune.gemstone.com"
+  else
+    LDAP_SERVER_FQDN="ldap.gemstone.com"
+  fi
+fi
+export LDAP_SERVER_FQDN
+echo "Using LDAP server: $LDAP_SERVER_FQDN"
+
+export ANT_HOME=${ALT_ANT_HOME:-$GCMDIR/where/java/ant/apache-ant-1.8.2}
+export ANT_ARGS="$ANT_ARGS -lib $GCMDIR/where/java/jcraft/jsch/jsch-0.1.44/jsch-0.1.44.jar"
+export ANT_OPTS="-Xmx384m -Dhttp.proxyHost=proxy.eng.vmware.com -Dhttp.proxyPort=3128"
+export PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATH
+
+function logant {
+#  if [[ `uname` == "SunOS" || `uname` == "Linux" || `uname` == "AIX" ]]; then
+    rm -f .xbuildfailure
+    ( $ANT_HOME/bin/ant --noconfig "$@" || echo "$?" > .xbuildfailure ) 2>&1 | tee $logfile
+    if [ -r .xbuildfailure ]; then
+      read stat <.xbuildfailure
+      rm -f .xbuildfailure
+      exit $stat
+    fi
+#  else
+    # cygwin tee causes hang on windows
+#    $ANT_HOME/bin/ant --noconfig -DuseSSH=false "$@"
+#  fi
+}
+
+echo "JAVA_HOME = $JAVA_HOME"
+echo "ANT_HOME = $ANT_HOME"
+echo "CLASSPATH = $CLASSPATH"
+date
+
+# ant likes to be in the directory that build.xml is in
+if [[ "x$NO_BUILD_LOG" = "x" ]]; then
+  logant "$@"
+else
+  echo "running $ANT_HOME/bin/ant "
+  $ANT_HOME/bin/ant --noconfig "$@"
+fi
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/build.xml
----------------------------------------------------------------------
diff --git a/pulse/build.xml b/pulse/build.xml
new file mode 100644
index 0000000..f7307a1
--- /dev/null
+++ b/pulse/build.xml
@@ -0,0 +1,604 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="pulse" default="usage" basedir=".">
+
+  <target depends="usage" name="help"/>
+
+  <target name="usage">
+    <description>Prints information about what can be built</description>
+
+    <echo>
+Commonly used targets:
+  build-product        Builds product into product dist 
+  pack-RNotes          Creates ReleaseNotes from RNDeltaNotes.txt 
+  compile-tests        Builds tests
+  run-tests            Run tests
+  precheckin           Does an update-svn, clean, build-all, run-tests
+  usage (or help)      Prints this help information
+
+Available targets:
+  build-all            Cleans, Compiles source and tests, and creates pulse warfile
+  clean                Cleans all byproducts of building
+
+Command Line Defines:
+  -DSOMESWITCH=dir     NOT IMPLEMENTED
+    </echo>
+  </target>
+
+  <!-- Property reference to environment variables -->
+  <property environment="myenv"/>
+
+  <taskdef resource="com/gemstone/tools/ant/taskdefs/buildtasks.properties"
+           classpath="${basedir}/buildfiles/taskdefsV10.jar"/>
+  <!-- determine machine and os, and if this is a 32 bit only or 64 bit only pla
+tform -->
+  <import file="buildfiles/osplatform.xml"/>
+
+  <property name="gcm.dir" value="${myenv.GCMDIR}"/>
+
+  <!-- import any properties defined in a properties file -->
+  <available file="${basedir}/build${gf.os}.properties" property="build.os.exists"/>
+  <conditional if="build.os.exists">
+    <echo message="Loading properties from ${basedir}/build${gf.os}.properties:" level="info"/>
+    <property file="${basedir}/build${gf.os}.properties"/>
+    <concat>
+      <filelist dir="${basedir}" files="build${gf.os}.properties"/>
+    </concat>
+  </conditional>
+
+  <available file="${basedir}/build.properties" property="build.props.exists"/>
+  <conditional if="build.props.exists">
+    <echo message="Loading properties from ${basedir}/build.properties:" level="info"/>
+    <property file="${basedir}/build.properties"/>
+    <concat>
+      <filelist dir="${basedir}" files="build.properties"/>
+    </concat>
+  </conditional>
+  
+  <!-- include external xml files here -->
+  <import file="buildfiles/dependencies.xml"/>
+  <import file="buildfiles/utilities.xml"/>
+
+  <property name="build.dir" value="${basedir}/build-artifacts"/>
+  <property name="osbuild.dir" value="${build.dir}/${gf.os}"/>
+  <property name="app.name"      value="pulse"/>
+  <property name="app.path"      value="/${app.name}"/>
+  <property name="pulse.version"   value="8.1.0"/>
+  <property name="target.dir"    value="${osbuild.dir}/target"/>
+  <property name="dist.dir"     value="${osbuild.dir}/dist"/>
+  <property name="src.dir"      value="${basedir}/src/main/java"/>
+  <property name="classes.dir"    value="${target.dir}/WEB-INF/classes"/>
+  <property name="tests.dir"    value="${basedir}/src/test/java"/>
+  <property name="tests.resources.dir"    value="${basedir}/src/test/resources"/>
+  <property name="tests.classes.dir"    value="${target.dir}/tests/classes"/>
+  <property name="tests.results.dir"    value="${target.dir}/tests/results"/>
+  <property name="web.dir"      value="${basedir}/src/main/webapp"/>
+  <property name="application.lib.home"      value="${web.dir}/WEB-INF/lib"/>
+  <property name="application.extlib.home"      value="${basedir}/ext-libs"/>
+  <property name="properties.dir"    value="${target.dir}/properties"/>
+  
+  <property name="compile.debug"       value="true"/>
+  <property name="compile.deprecation" value="false"/>
+  <property name="compile.optimize"    value="true"/> 
+  <property name="compile-gemfire.deprecation" value="off"/>
+ 
+  <path id="src.compile.classpath">
+    <!-- Application Libraries -->
+    <fileset dir="${application.extlib.home}">
+      <include name="*.jar"/>
+      <exclude name="selenium*.jar"/>
+      <exclude name="junit*.jar"/>
+    </fileset>
+  </path>
+
+  <path id="test.compile.classpath">
+    <pathelement location="${gcm.dir}/where/java/apache-tomcat/7.0.30/tomcat-embed-core.jar"/>
+    <pathelement location="${gcm.dir}/where/java/apache-tomcat/7.0.30/tomcat-embed-jasper.jar"/>
+    <pathelement location="${gcm.dir}/where/java/apache-tomcat/7.0.30/tomcat-embed-logging-juli.jar"/>        
+  	<pathelement location="${application.extlib.home}/commons-codec-1.6.jar"/>
+  	<pathelement location="${application.extlib.home}/commons-logging-1.1.3.jar"/>
+  	<pathelement location="${application.extlib.home}/fluent-hc-4.3.3.jar"/>
+  	<pathelement location="${application.extlib.home}/httpclient-4.3.3.jar"/>
+  	<pathelement location="${application.extlib.home}/httpclient-cache-4.3.3.jar"/>
+  	<pathelement location="${application.extlib.home}/httpcore-4.3.2.jar"/>
+  	<pathelement location="${application.extlib.home}/httpmime-4.3.3.jar"/>
+    <pathelement location="${application.extlib.home}/junit-4.10.jar"/>
+  	<pathelement location="${application.extlib.home}/selenium-server-standalone-2.41.0.jar"/>
+  </path>
+
+  <!-- TARGETS -->
+
+  <target name="build-run-tests" depends="build-all, run-tests"/>
+
+  <target name="precheckin" depends="update-svn, clean, build-all, run-tests"/>
+
+  <target name="build-all" depends="clean, build-product, compile-tests" description="Clean build and dist directories, then compile"/>
+
+  <target name="build-product-RNotes" depends="build-product, pack-RNotes" description="Compile and create dist with Release Notes"/>
+
+  <target name="build-product" depends="dist" description="Compile and create dist"/>
+
+  <target name="all" depends="build-all" description="Compile and create dist"/>
+
+  <target name="props">
+
+  <!-- these two lines get hostname without requiring cygwin on windows -->
+    <exec executable="hostname"
+          failifexecutionfails="false"
+          outputproperty="myenv.COMPUTERNAME"/>
+    <property name="host.name" value="${myenv.COMPUTERNAME}"/>
+
+    <echo message="osbuild.dir is ${osbuild.dir}" level="info"/>
+    <echo message="Running on ${host.name}" level="info"/>
+
+    <property name="compile-gemfire.deprecation" value="off"/>
+
+    <!-- Do not allow build artifacts to be place on the filer -->
+    <fail message="Build artifacts cannot reside on the filer (${osbuild.dir}).  Please use a build properties file">
+      <condition>
+        <contains string="${osbuild.dir}" substring="shared_build"
+                  casesensitive="false"/>
+      </condition>
+    </fail>
+
+    <mkdir dir="${osbuild.dir}"/>
+    <property name="src.dir" value="${basedir}/src"/>
+
+    <property name="last.update.file" value="lastUpdate.txt"/>
+    <property name="date.pattern" value="MM/dd/yyyy HH:mm:ss z"/>
+    
+    <tstamp>
+       <format pattern="yyyy-MM-dd-hh-mm-ss-SSS" property="sys.build.time"/>
+       <format pattern="${date.pattern}" property="build.time"/>
+    </tstamp>
+
+    <antcall target="make-last-update"/>
+    <!-- If svn was manually run then update lastUpdate.txt and build.number -->
+  	<uptodate property="makelastupdate.Required"
+      srcfile="${build.dir}/${last.update.file}"
+      targetfile="${basedir}/.svn/entries"/>
+
+    <conditional if="makelastupdate.Required">
+      <antcall target="make-last-update"/>
+      <property name="skipLastUpdate"  value="true"/>
+    </conditional>
+ 
+  </target>
+
+  <target name="clean" depends="props" description="Delete old build and dist directories">
+    <delete dir="${osbuild.dir}"/>
+  </target>
+  
+  <target name="prepare" depends="props">
+    <!-- Create staging directories as needed -->
+    <mkdir  dir="${target.dir}"/>
+    <mkdir  dir="${target.dir}/WEB-INF"/>
+    <mkdir  dir="${classes.dir}"/>
+ 
+    <!-- Copy static content, jsps and web.xml  of this web application -->
+    <copy todir="${target.dir}">
+      <fileset dir="${web.dir}"/>
+    </copy>
+ 
+    <!-- Copy external dependencies as required -->
+    <mkdir  dir="${target.dir}/WEB-INF/lib"/>
+ 
+  </target>
+
+  <target name="compile" depends="prepare" description="Compile Java sources"> 
+    <!-- Compile Java classes as necessary -->
+    <echo level="info" message="Compiling Pulse source..."/>
+    <javac srcdir="${src.dir}"
+          destdir="${classes.dir}"
+            debug="${compile.debug}"
+      deprecation="${compile.deprecation}"
+         optimize="${compile.optimize}" includeantruntime="false">
+        <classpath refid="src.compile.classpath"/>
+    </javac>
+    
+    <!-- Copy application resources -->
+    <copy  todir="${classes.dir}">
+      <fileset dir="${src.dir}" excludes="**/*.java"/>
+    </copy>
+  </target>
+  
+  <target name="dist" depends="compile" description="Create binary distribution">  
+    <!-- Copy Open Source File -->
+    <copy file="release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt" tofile="${target.dir}/oslicenses.txt"/>
+
+    <!-- Copy dependent libs -->
+    <copy file="ext-libs/spring-security-core-3.1.4.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-security-web-3.1.4.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-security-config-3.1.4.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+
+    <copy file="ext-libs/spring-core-3.2.9.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-web-3.2.9.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-beans-3.2.9.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-context-3.2.9.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-expression-3.2.9.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-aop-3.2.9.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-webmvc-3.2.9.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+
+    <copy file="ext-libs/com.springsource.org.apache.commons.beanutils-1.8.0.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/com.springsource.org.apache.commons.collections-3.2.0.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/com.springsource.org.apache.commons.digester-1.8.1.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/com.springsource.org.apache.commons.logging-1.1.1.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/commons-lang-2.6.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-ldap-core-1.3.1.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-security-ldap-3.1.4.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/>
+    <copy file="ext-libs/spring-tx-3.0.5.RELEASE.jar" todir="${target.dir}/WEB-INF/lib"/> 
+
+
+    <copy file="src/main/resources/pulse-users.properties" todir="${target.dir}/WEB-INF/classes"/>
+
+   <!-- Copy All Locale files -->
+   <copy todir="${classes.dir}">
+    <fileset dir="src/main/resources">
+      <include name="**/LogMessages*.properties"/>
+      <!--<include name="**/pulse.properties"/>-->
+    </fileset>
+   </copy>
+
+    <!-- Product and internationalization files -->
+    <copy todir="${properties.dir}">
+      <fileset dir="src/main/resources">
+        <include name="**/default.properties"/>
+        <include name="**/gemfire.properties"/>
+        <include name="**/sqlfire.properties"/>
+      </fileset>
+    </copy>
+    
+    <!-- Create pulse.properties file for including in WAR -->
+    <property file="${build.dir}/${last.update.file}"/>
+    <property file="${build.dir}/build.number"/>
+    <propertyfile comment="Pulse Properties File" file="${classes.dir}/pulseversion.properties">
+      <entry key="pulse.version" value="${pulse.version}"/>
+      <entry key="Build-Id" value="${user.name} ${build.number}"/>
+      <entry key="Build-Date" value="${build.time}"/>
+      <entry key="Source-Date" value="${source.date}"/>
+      <entry key="Source-Revision" value="${source.revision}"/>
+      <entry key="Source-Repository" value="${source.branch}"/>
+    </propertyfile>
+
+    <!-- Create application JAR/WAR file -->
+    <jar jarfile="${dist.dir}/${app.name}-${pulse.version}.war"
+         basedir="${target.dir}"/>
+    
+  </target>
+
+  <target name="update-git" depends="props">
+    <description>Updates the sources to latest revision.</description>
+
+    <property name="git.logfile" value="update-git.log"/>
+    <property name="git.hist.logfile" value=".git-history.log"/>
+    <property name="git.branch" value=".git/.git-branch.log"/>
+    <delete file="${git.logfile}" quiet="true"/>
+
+    <!-- Need finally block for git pull because it may actually
+         perform a lot of updates before failing, and we want to capture
+         those in .git-history.log -->
+    <trycatch>
+      <try>
+        <exec executable="git" resultproperty="gitpullExitStatus" output="${git.logfile}">
+          <arg value="pull"/>
+        </exec>
+      </try>
+      <finally>
+        <exec executable="git" append="true" output="${git.logfile}">
+          <arg value="status"/>
+        </exec>
+      </finally>
+    </trycatch>
+
+    <condition property="gitpullFailed">
+      <equals arg1="${gitpullExitStatus}" arg2="1"/>
+    </condition>
+    <if>
+      <isset property="gitpullFailed"/>
+      <then>
+        <exec executable="cat" >
+          <arg value="${git.logfile}"/>
+        </exec>
+        <fail if="gitpullFailed" message="git pull failed. See ${git.logfile} for details."/>
+      </then>
+    </if>
+
+    <antcall inheritAll="true" target="make-last-update"/>
+
+    <concat append="true" fixlastline="true" destfile="${git.hist.logfile}" >
+==============================
+</concat>  <!-- Leave the two lines above as is so they concat properly -->
+
+    <concat append="true" fixlastline="true" destfile="${git.hist.logfile}">
+      <filelist dir="${basedir}" files="build-artifacts/build.number"/>
+      <filelist dir="${basedir}" files="${git.logfile}"/>
+    </concat>
+  </target>
+
+  <target name="rcs-init">
+    <available file=".git" type="dir" property="git.present"/>
+    <available file=".svn" type="dir" property="svn.present"/>
+  </target>
+
+  <target name="make-last-update" depends="rcs-init" unless="skipLastUpdate">
+    <description>Creates a file that contains the time at which the
+         GemFire checkout was last updated</description>
+
+    <mkdir dir="${build.dir}"/>
+
+    <!-- Make Last Update File with SVN workspace -->
+    <if>
+      <isset property="svn.present"/>
+      <then>
+        <delete file="${build.dir}/${last.update.file}" quiet="true"/>
+        <echo level="info" message="Querying SVN Workspace Information" />
+        <svnSetting client="cli" dateformatter="MM/dd/yyyy HH:mm:ss z" id="svn.settings"/>
+          <!-- Get svn info of the SVN workspace -->
+          <svn refid="svn.settings">
+            <info target="."/>
+          </svn>
+          <propertyregex property="source.branch"
+            input="${svn.info.url}"
+            regexp="^https\:\/\/svn\.gemstone\.com\/repos\/"
+            replace=""
+            casesensitive="false" />
+        </then>
+        <elseif>
+          <isset property="git.present"/>
+          <then>
+            <property name="git.status" value="${basedir}/.git/.git-status.log"/>
+            <echo level="info" message="Querying GIT Workspace Information..." />
+
+            <exec executable="git" failonerror="false" output="${git.status}">
+              <arg value="log"/>
+              <arg value="--grep=git-svn-id"/>
+              <arg value="-1"/>
+            </exec>
+
+            <exec executable="git" failonerror="false" outputproperty="GIT.source.branch">
+              <arg value="rev-parse"/>
+              <arg value="--abbrev-ref"/>
+              <arg value="HEAD"/>
+            </exec>
+            <exec executable="git" failonerror="false" outputproperty="GIT.source.revision">
+              <arg value="rev-parse"/>
+              <arg value="HEAD"/>
+            </exec>
+            <exec executable="git" failonerror="false" outputproperty="GIT.source.date">
+              <arg value="show"/>
+              <arg value="-s"/>
+              <arg value="--format=%cD"/>
+              <arg value="${GIT.source.revision}"/>
+            </exec>
+          </then>
+        </elseif>
+        <else>
+          <echo level="info" message="No revision control information found"/>
+        </else>
+    </if>
+
+    <!-- Load lastUpdate.txt properties with prefix to avoid setting -->
+    <property file="${build.dir}/${last.update.file}" prefix="PROP" prefixValues="true"/> 
+
+    <if>
+      <equals arg1="${GIT.source.revision}" arg2="${PROP.source.revision}" />
+      <then>
+        <echo message="Source revision hasn't changed. Skipping property file update..." />
+      </then>
+    <else>
+      <!-- Create LastUpdate Property File -->
+      <echo message="Updating build-artifacts property files..." level="info"/>
+
+      <property name="git.status" value="${basedir}/.git/.git-status.log"/>
+      <delete file="${git.status}" quiet="true"/>
+      <delete file="${build.dir}/${last.update.file}" quiet="true"/>
+
+      <propertyfile comment="Information about a checkout" file="${build.dir}/${last.update.file}">
+        <entry key="source.branch" value="${GIT.source.branch}"/>
+        <entry key="source.date" value="${GIT.source.date}"/>
+        <entry key="source.revision" value="${GIT.source.revision}"/>
+      </propertyfile>
+
+      <!-- This use to be the revision but is now a date string -->
+      <tstamp>
+        <format property="build.number" pattern="MMddyy"/>
+      </tstamp>
+
+      <delete file="${build.dir}/build.number" quiet="true"/>
+      <propertyfile comment="Build Number File" file="${build.dir}/build.number">
+        <entry key="build.number" value="${build.number}"/>
+      </propertyfile>
+    </else>
+   </if>
+
+   <!-- Load lastUpdate.txt to set properties and print banner -->
+   <property file="${build.dir}/${last.update.file}"/> 
+   <property file="${build.dir}/build.number"/>
+   <echo message="" level="info"/>
+   <echo message="=========================================" level="info"/>
+   <echo message="Version: ${pulse.version} ${user.name} ${build.number}" level="info"/>
+   <echo message="Source-branch: ${source.branch}" level="info"/>
+   <echo message="Source-Date: ${source.date}" level="info"/>
+   <echo message="Source-Revision: ${source.revision}" level="info"/>
+   <echo message="=========================================" level="info"/>
+
+  </target>
+
+  <target name="update-svn" depends="props">
+    <description>Updates the current checkout revision.</description>
+
+    <property name="svn.logfile" value="update-svn.log"/>
+    <property name="svn.hist.logfile" value=".svn-history.log"/>
+    <delete file="${svn.logfile}" quiet="true"/>
+
+    <!-- Need finally block for svn update because it may actually
+         perform a lot of updates before failing, and we want to capture
+         those in .svn-history.log -->
+    <trycatch>
+      <try>
+        <exec executable="svn" failonerror="true" output="${svn.logfile}">
+          <arg value="update"/>
+          <arg value="--accept"/>
+          <arg value="postpone"/>
+        </exec>
+      </try>
+      <finally>
+        <exec executable="svn" append="true" output="${svn.logfile}">
+          <arg value="status"/>
+        </exec>
+      </finally>
+    </trycatch>
+    <antcall target="make-last-update"/>
+
+    <concat append="true" fixlastline="true" destfile="${svn.hist.logfile}" >
+==============================
+</concat>  <!-- Leave the two lines above as is so they concat properly -->
+
+    <concat append="true" fixlastline="true" destfile="${svn.hist.logfile}">
+      <filelist dir="${basedir}" files="build-artifacts/build.number"/>
+      <filelist dir="${basedir}" files="${svn.logfile}"/>
+    </concat>
+
+    <echo message="Checking for update conflicts in ${svn.logfile}" level="info"/>
+
+    <exec executable="grep" resultproperty="grepExitStatus">
+      <arg value="^C "/>
+      <arg value="${svn.logfile}"/>
+    </exec>
+    <condition property="grepFailed">
+      <equals arg1="${grepExitStatus}" arg2="0"/>
+    </condition>
+
+    <fail if="grepFailed" message="SVN update conflicts detected."/>
+  </target>
+
+  <target name="pack-RNotes" depends="props">
+    <delete file="${dist.dir}/Pulse_${pulse.version}_ReleaseNotes.txt" quiet="true"/>
+    <property file="${build.dir}/build.number"/>
+    <property file="${build.dir}/lastUpdate.txt"/>
+
+    <copy file="${basedir}/release/docfiles/ReleaseNotes.txt"
+            tofile="${dist.dir}/Pulse_${pulse.version}_ReleaseNotes.txt"/>
+
+    <concat append="true" fixlastline="true" destfile="${dist.dir}/Pulse_${pulse.version}_ReleaseNotes.txt" >
+--------------------------------
+ Changes in ${pulse.version} ${user.name} ${build.number}
+ Source-Revision=${source.revision}
+ Build-Date=${build.time}
+--------------------------------
+</concat>
+
+    <concat append="true" fixlastline="true" destfile="${dist.dir}/Pulse_${pulse.version}_ReleaseNotes.txt">
+      <filelist dir="${basedir}" files="RNDeltaChanges.txt"/>
+    </concat>
+
+    <!-- Place updates of files with intention they can be checked in -->
+    <replace file="${dist.dir}/Pulse_${pulse.version}_ReleaseNotes.txt">
+      <replacetoken><![CDATA[#]]></replacetoken>
+      <replacevalue><![CDATA[]]></replacevalue>
+    </replace>
+
+    <replace file="${dist.dir}/Pulse_${pulse.version}_ReleaseNotes.txt">
+      <replacetoken><![CDATA[
+ Please keep text to 78 char width - no wider than this 
+]]></replacetoken>
+      <replacevalue><![CDATA[]]></replacevalue>
+    </replace>
+
+    <copy file="${dist.dir}/Pulse_${pulse.version}_ReleaseNotes.txt"
+       tofile="${basedir}/release/docfiles/ReleaseNotes.txt.UPDATE"/>
+
+    <copy file="${basedir}/RNDeltaChanges.txt"
+       tofile="${basedir}/RNDeltaChanges.txt.UPDATE"/>
+  </target>
+
+  <target name="compile-tests" depends="compile">
+    
+    <mkdir dir="${tests.classes.dir}"/>
+    <echo level="info" message="Compiling Pulse tests..."/>
+    <javac srcdir="${tests.dir}"
+           destdir="${tests.classes.dir}"
+           debug="${compile.debug}"
+           deprecation="${compile.deprecation}"
+           optimize="${compile.optimize}" 
+           includeantruntime="false"
+           fork="yes"
+           verbose="no">
+        <classpath>
+          <path refid="test.compile.classpath"/>
+          <pathelement location="${target.dir}/WEB-INF/classes"/>
+        </classpath>  
+    </javac>
+  
+  </target>
+  
+  <!-- Automate deployment of Pulse to standalone tomcat server -->
+  <target name="run-tests" depends="compile-tests">
+    <!-- Set default properties for pulse.url-->
+    <property name="pulsewarfile" value="${dist.dir}/${app.name}-${pulse.version}.war"/>
+
+    <mkdir dir="${tests.results.dir}"/>
+    <echo level="info" message="Running Tests..."/>
+
+    <!-- Currently there are only GUI (web browser) tests which require access to Pulse running -->
+    <junit printsummary="yes" 
+           failureProperty="tests.failed"
+           haltOnFailure="false">
+      <assertions>
+        <enable/>
+      </assertions>
+      <sysproperty key="pulse.propfile" value="${tests.resources.dir}/test.properties"/>
+      <sysproperty key="pulse.war" value="${pulsewarfile}"/>
+      <sysproperty key="pulse-host" value="${pulse-host}"/>
+      <sysproperty key="pulse-port" value="${pulse-port}"/>
+      <sysproperty key="pulse-context" value="${pulse-context}"/>
+      <sysproperty key="pulse-product" value="${pulse-product}"/>
+      
+      <!-- TODO : Add here a sysproperty to send in a parameter whether we are running run-tests for 'GemFire' OR 'GemFireXD'  -->
+      <classpath>
+        <pathelement location="${tests.classes.dir}"/>
+        <pathelement location="${tests.resources.dir}"/>
+      	<pathelement location="${classes.dir}"/>
+      	<pathelement location="${gcm.dir}/where/java/apache-tomcat/7.0.30/tomcat-embed-core.jar" />
+	  	<pathelement location="${gcm.dir}/where/java/apache-tomcat/7.0.30/tomcat-embed-jasper.jar" />
+	  	<pathelement location="${gcm.dir}/where/java/apache-tomcat/7.0.30/tomcat-embed-logging-juli.jar" />
+      	<fileset dir="${application.extlib.home}">
+      	     <include name="com.springsource.org.apache.commons.beanutils-1.8.0.jar"/>
+      		<include name="com.springsource.org.apache.commons.collections-3.2.0.jar"/>
+      		<include name="com.springsource.org.apache.commons.digester-1.8.1.jar"/>
+      		<include name="com.springsource.org.apache.commons.logging-1.1.1.jar"/>
+      		<include name="junit-4.10.jar"/>
+      		<include name="servlet-api-2.5-20081211.jar"/>
+      		<include name="spring-aop-3.2.9.RELEASE.jar"/>      		
+       		<include name="spring-beans-3.2.9.RELEASE.jar"/>
+      		<include name="spring-core-3.2.9.RELEASE.jar"/>
+      		<include name="spring-security-config-3.1.4.RELEASE.jar"/>
+      		<include name="spring-expression-3.2.9.RELEASE.jar"/>
+      		<include name="spring-context-3.2.9.RELEASE.jar"/>
+      		<include name="spring-security-core-3.1.4.RELEASE.jar"/>
+      		<include name="spring-security-web-3.1.4.RELEASE.jar"/>
+      		<include name="spring-web-3.2.9.RELEASE.jar"/>
+      		<include name="spring-webmvc-3.2.9.RELEASE.jar"/>
+      		<include name="selenium-server-standalone-2.41.0.jar"/>
+      	</fileset>
+      </classpath>
+
+      <formatter type="plain"/>
+
+      <batchtest fork="yes" todir="${tests.results.dir}">
+        <fileset dir="${tests.dir}">
+          <include name="**/*Tests.java"/>
+        	<include name="**/*Test.java"/>
+          <exclude name="**/AllTests.java"/>
+        	<exclude name="**/Base*.java"/>
+        </fileset>
+      </batchtest>
+    </junit>
+
+    <conditional if="tests.failed">
+      <echo message="FAILED: Test failures in ${tests.results.dir}" level="error"/>
+      <echo append="true" file="${tests.results.dir}/TestFailures" message="FAILED: Test failures in ${tests.results.dir}" level="error"/>
+      <fail message="FAILED: One or more tests failed"/>
+    </conditional>
+  
+  </target>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/buildfiles/dependencies.xml
----------------------------------------------------------------------
diff --git a/pulse/buildfiles/dependencies.xml b/pulse/buildfiles/dependencies.xml
new file mode 100644
index 0000000..19c9224
--- /dev/null
+++ b/pulse/buildfiles/dependencies.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="dependencies">
+  <dependency property="svnant.dir" artifact="where/java/svnant/svnant-1.4.dev"/>
+  <dependency property="ant-contrib.jar" artifact="where/java/ant/ant-contrib/ant-contrib-1.0b3/ant-contrib-1.0b3.jar"/>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/buildfiles/osplatform.xml
----------------------------------------------------------------------
diff --git a/pulse/buildfiles/osplatform.xml b/pulse/buildfiles/osplatform.xml
new file mode 100644
index 0000000..cc63ddf
--- /dev/null
+++ b/pulse/buildfiles/osplatform.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="osplatform">
+  <!-- determine machine and os, and if this is a 32 bit only or 64 bit only platform -->
+  <condition property="gf.os" value="sol">
+    <os name="SunOs"/>
+  </condition>
+  <condition property="gf.os" value="linux">
+    <os name="Linux"/>
+  </condition>
+  <conditional unless="only64">
+    <condition property="only32" value="true">
+      <os name="Linux"/>
+    </condition>
+  </conditional>
+  <condition property="gf.os" value="mac">
+    <os family="mac"/>
+  </condition>
+  <condition property="only32" value="true">
+    <os family="mac"/>
+  </condition>
+  <condition property="gf.os" value="win">
+    <os family="windows"/>
+  </condition>
+  <conditional unless="only64">
+    <condition property="only32" value="true">
+      <os family="windows"/>
+    </condition>
+  </conditional>
+  <condition property="gf.os" value="aix">
+    <os name="AIX"/>
+  </condition>
+  <conditional unless="only64">
+    <condition property="only32" value="true">
+      <os name="AIX"/>
+    </condition>
+  </conditional>
+
+  <condition property="isSolaris">
+    <os name="SunOs"/>
+  </condition>
+  <condition property="isMac">
+    <os family="mac"/>
+  </condition>
+  <condition property="isAIX">
+    <os name="AIX"/>
+  </condition>
+  <condition property="isLinux">
+    <os name="Linux"/>
+  </condition>
+  <condition property="isWindows">
+    <os family="windows"/>
+  </condition>
+
+  <conditional if="only32">
+    <property name="singleModel" value="true"/>
+    <property name="do32bit" value="true"/>
+  </conditional>
+
+  <conditional if="only64">
+    <property name="singleModel" value="true"/>
+    <property name="do64bit" value="true"/>
+  </conditional>
+
+  <conditional unless="singleModel">
+    <property name="do32bit" value="true"/>
+    <property name="do64bit" value="true"/>
+  </conditional>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/buildfiles/utilities.xml
----------------------------------------------------------------------
diff --git a/pulse/buildfiles/utilities.xml b/pulse/buildfiles/utilities.xml
new file mode 100644
index 0000000..d01ab42
--- /dev/null
+++ b/pulse/buildfiles/utilities.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="utilities">
+  <description>
+    The Utilities Ant XML build script file defines reusable and useful utility functions/tasks for use inside other
+    GemFire build targets.
+  </description>
+
+  <path id="path.svnant">
+    <pathelement location="${svnant.dir}/lib/svnant.jar"/>
+	<pathelement location="${svnant.dir}/lib/svnClientAdapter.jar"/>
+	<pathelement location="${svnant.dir}/lib/svnkit-javahl16-1.7.5-v1.jar"/>
+	<pathelement location="${svnant.dir}/lib/svnkit-1.7.5-v1.jar"/>
+	<pathelement location="${svnant.dir}/lib/sqljet-1.1.4.jar"/>
+	<pathelement location="${svnant.dir}/lib/svnkit-cli-1.7.5-v1.jar"/>
+	<pathelement location="${svnant.dir}/lib/jna-3.4.0.jar"/>
+	<pathelement location="${svnant.dir}/lib/antlr-runtime-3.4.jar"/>
+	<pathelement location="${svnant.dir}/lib/sequence-library-1.0.2.jar"/>
+   </path>
+   
+  <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" 
+           classpathref="path.svnant" />
+
+  <condition property="antcontrib.taskfile" value="net/sf/antcontrib/antlib.xml">
+    <antversion atleast="1.8"/>
+  </condition>
+  
+  <!-- If antcontrib.taskfile is not set -->
+  <property name="antcontrib.taskfile" value="net/sf/antcontrib/antcontrib.properties"/>
+  
+  <taskdef resource="${antcontrib.taskfile}" classpath="${ant-contrib.jar}"/>
+  
+</project>


[20/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jit.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jit.js b/pulse/src/main/webapp/scripts/lib/jit.js
new file mode 100644
index 0000000..5911d61
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jit.js
@@ -0,0 +1,17208 @@
+/*
+Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+ */
+/*
+  [
+    NOTE: CODE IS CUSTOMIZED TO WORK AS PER REQUIREMENTS IN PULSE WEB APPLICATION
+    MODIFICATIONS ARE MADE FOR TREEMAP
+    MODIFIED BY: SACHIN K 
+  ]
+*/
+ (function () { 
+
+/*
+  File: Core.js
+
+ */
+
+/*
+ Object: $jit
+ 
+ Defines the namespace for all library Classes and Objects. 
+ This variable is the *only* global variable defined in the Toolkit. 
+ There are also other interesting properties attached to this variable described below.
+ */
+window.$jit = function(w) {
+  w = w || window;
+  for(var k in $jit) {
+    if($jit[k].$extend) {
+      w[k] = $jit[k];
+    }
+  }
+};
+
+$jit.version = '2.0.1';
+/*
+  Object: $jit.id
+  
+  Works just like *document.getElementById*
+  
+  Example:
+  (start code js)
+  var element = $jit.id('elementId');
+  (end code)
+
+*/
+
+/*
+ Object: $jit.util
+ 
+ Contains utility functions.
+ 
+ Some of the utility functions and the Class system were based in the MooTools Framework 
+ <http://mootools.net>. Copyright (c) 2006-2010 Valerio Proietti, <http://mad4milk.net/>. 
+ MIT license <http://mootools.net/license.txt>.
+ 
+ These methods are generally also implemented in DOM manipulation frameworks like JQuery, MooTools and Prototype.
+ I'd suggest you to use the functions from those libraries instead of using these, since their functions 
+ are widely used and tested in many different platforms/browsers. Use these functions only if you have to.
+ 
+ */
+var $ = function(d) {
+  return document.getElementById(d);
+};
+
+$.empty = function() {
+};
+
+/*
+  Method: extend
+  
+  Augment an object by appending another object's properties.
+  
+  Parameters:
+  
+  original - (object) The object to be extended.
+  extended - (object) An object which properties are going to be appended to the original object.
+  
+  Example:
+  (start code js)
+  $jit.util.extend({ 'a': 1, 'b': 2 }, { 'b': 3, 'c': 4 }); //{ 'a':1, 'b': 3, 'c': 4 }
+  (end code)
+*/
+$.extend = function(original, extended) {
+  for ( var key in (extended || {}))
+    original[key] = extended[key];
+  return original;
+};
+
+$.lambda = function(value) {
+  return (typeof value == 'function') ? value : function() {
+    return value;
+  };
+};
+
+$.time = Date.now || function() {
+  return +new Date;
+};
+
+/*
+  Method: splat
+  
+  Returns an array wrapping *obj* if *obj* is not an array. Returns *obj* otherwise.
+  
+  Parameters:
+  
+  obj - (mixed) The object to be wrapped in an array.
+  
+  Example:
+  (start code js)
+  $jit.util.splat(3);   //[3]
+  $jit.util.splat([3]); //[3]
+  (end code)
+*/
+$.splat = function(obj) {
+  var type = $.type(obj);
+  return type ? ((type != 'array') ? [ obj ] : obj) : [];
+};
+
+$.type = function(elem) {
+  var type = $.type.s.call(elem).match(/^\[object\s(.*)\]$/)[1].toLowerCase();
+  if(type != 'object') return type;
+  if(elem && elem.$$family) return elem.$$family;
+  return (elem && elem.nodeName && elem.nodeType == 1)? 'element' : type;
+};
+$.type.s = Object.prototype.toString;
+
+/*
+  Method: each
+  
+  Iterates through an iterable applying *f*.
+  
+  Parameters:
+  
+  iterable - (array) The original array.
+  fn - (function) The function to apply to the array elements.
+  
+  Example:
+  (start code js)
+  $jit.util.each([3, 4, 5], function(n) { alert('number ' + n); });
+  (end code)
+*/
+$.each = function(iterable, fn) {
+  var type = $.type(iterable);
+  if (type == 'object') {
+    for ( var key in iterable)
+      fn(iterable[key], key);
+  } else {
+    for ( var i = 0, l = iterable.length; i < l; i++)
+      fn(iterable[i], i);
+  }
+};
+
+$.indexOf = function(array, item) {
+  if(Array.indexOf) return array.indexOf(item);
+  for(var i=0,l=array.length; i<l; i++) {
+    if(array[i] === item) return i;
+  }
+  return -1;
+};
+
+/*
+  Method: map
+  
+  Maps or collects an array by applying *f*.
+  
+  Parameters:
+  
+  array - (array) The original array.
+  f - (function) The function to apply to the array elements.
+  
+  Example:
+  (start code js)
+  $jit.util.map([3, 4, 5], function(n) { return n*n; }); //[9, 16, 25]
+  (end code)
+*/
+$.map = function(array, f) {
+  var ans = [];
+  $.each(array, function(elem, i) {
+    ans.push(f(elem, i));
+  });
+  return ans;
+};
+
+/*
+  Method: reduce
+  
+  Iteratively applies the binary function *f* storing the result in an accumulator.
+  
+  Parameters:
+  
+  array - (array) The original array.
+  f - (function) The function to apply to the array elements.
+  opt - (optional|mixed) The starting value for the acumulator.
+  
+  Example:
+  (start code js)
+  $jit.util.reduce([3, 4, 5], function(x, y) { return x + y; }, 0); //12
+  (end code)
+*/
+$.reduce = function(array, f, opt) {
+  var l = array.length;
+  if(l==0) return opt;
+  var acum = arguments.length == 3? opt : array[--l];
+  while(l--) {
+    acum = f(acum, array[l]);
+  }
+  return acum;
+};
+
+/*
+  Method: merge
+  
+  Merges n-objects and their sub-objects creating a new, fresh object.
+  
+  Parameters:
+  
+  An arbitrary number of objects.
+  
+  Example:
+  (start code js)
+  $jit.util.merge({ 'a': 1, 'b': 2 }, { 'b': 3, 'c': 4 }); //{ 'a':1, 'b': 3, 'c': 4 }
+  (end code)
+*/
+$.merge = function() {
+  var mix = {};
+  for ( var i = 0, l = arguments.length; i < l; i++) {
+    var object = arguments[i];
+    if ($.type(object) != 'object')
+      continue;
+    for ( var key in object) {
+      var op = object[key], mp = mix[key];
+      mix[key] = (mp && $.type(op) == 'object' && $.type(mp) == 'object') ? $
+          .merge(mp, op) : $.unlink(op);
+    }
+  }
+  return mix;
+};
+
+$.unlink = function(object) {
+  var unlinked;
+  switch ($.type(object)) {
+  case 'object':
+    unlinked = {};
+    for ( var p in object)
+      unlinked[p] = $.unlink(object[p]);
+    break;
+  case 'array':
+    unlinked = [];
+    for ( var i = 0, l = object.length; i < l; i++)
+      unlinked[i] = $.unlink(object[i]);
+    break;
+  default:
+    return object;
+  }
+  return unlinked;
+};
+
+$.zip = function() {
+  if(arguments.length === 0) return [];
+  for(var j=0, ans=[], l=arguments.length, ml=arguments[0].length; j<ml; j++) {
+    for(var i=0, row=[]; i<l; i++) {
+      row.push(arguments[i][j]);
+    }
+    ans.push(row);
+  }
+  return ans;
+};
+
+/*
+  Method: rgbToHex
+  
+  Converts an RGB array into a Hex string.
+  
+  Parameters:
+  
+  srcArray - (array) An array with R, G and B values
+  
+  Example:
+  (start code js)
+  $jit.util.rgbToHex([255, 255, 255]); //'#ffffff'
+  (end code)
+*/
+$.rgbToHex = function(srcArray, array) {
+  if (srcArray.length < 3)
+    return null;
+  if (srcArray.length == 4 && srcArray[3] == 0 && !array)
+    return 'transparent';
+  var hex = [];
+  for ( var i = 0; i < 3; i++) {
+    var bit = (srcArray[i] - 0).toString(16);
+    hex.push(bit.length == 1 ? '0' + bit : bit);
+  }
+  return array ? hex : '#' + hex.join('');
+};
+
+/*
+  Method: hexToRgb
+  
+  Converts an Hex color string into an RGB array.
+  
+  Parameters:
+  
+  hex - (string) A color hex string.
+  
+  Example:
+  (start code js)
+  $jit.util.hexToRgb('#fff'); //[255, 255, 255]
+  (end code)
+*/
+$.hexToRgb = function(hex) {
+  if (hex.length != 7) {
+    hex = hex.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
+    hex.shift();
+    if (hex.length != 3)
+      return null;
+    var rgb = [];
+    for ( var i = 0; i < 3; i++) {
+      var value = hex[i];
+      if (value.length == 1)
+        value += value;
+      rgb.push(parseInt(value, 16));
+    }
+    return rgb;
+  } else {
+    hex = parseInt(hex.slice(1), 16);
+    return [ hex >> 16, hex >> 8 & 0xff, hex & 0xff ];
+  }
+};
+
+$.destroy = function(elem) {
+  $.clean(elem);
+  if (elem.parentNode)
+    elem.parentNode.removeChild(elem);
+  if (elem.clearAttributes)
+    elem.clearAttributes();
+};
+
+$.clean = function(elem) {
+  for (var ch = elem.childNodes, i = 0, l = ch.length; i < l; i++) {
+    $.destroy(ch[i]);
+  }
+};
+
+/*
+  Method: addEvent
+  
+  Cross-browser add event listener.
+  
+  Parameters:
+  
+  obj - (obj) The Element to attach the listener to.
+  type - (string) The listener type. For example 'click', or 'mousemove'.
+  fn - (function) The callback function to be used when the event is fired.
+  
+  Example:
+  (start code js)
+  $jit.util.addEvent(elem, 'click', function(){ alert('hello'); });
+  (end code)
+*/
+$.addEvent = function(obj, type, fn) {
+  if (obj.addEventListener)
+    obj.addEventListener(type, fn, false);
+  else
+    obj.attachEvent('on' + type, fn);
+};
+
+$.addEvents = function(obj, typeObj) {
+  for(var type in typeObj) {
+    $.addEvent(obj, type, typeObj[type]);
+  }
+};
+
+$.hasClass = function(obj, klass) {
+  return (' ' + obj.className + ' ').indexOf(' ' + klass + ' ') > -1;
+};
+
+$.addClass = function(obj, klass) {
+  if (!$.hasClass(obj, klass))
+    obj.className = (obj.className + " " + klass);
+};
+
+$.removeClass = function(obj, klass) {
+  obj.className = obj.className.replace(new RegExp(
+      '(^|\\s)' + klass + '(?:\\s|$)'), '$1');
+};
+
+$.getPos = function(elem) {
+  var offset = getOffsets(elem);
+  var scroll = getScrolls(elem);
+
+  return {
+    x: offset.x - scroll.x,
+    y: offset.y - scroll.y
+  };
+
+  function getOffsets(elem) {
+    var position = {
+      x: 0,
+      y: 0
+    };
+    while (elem && !isBody(elem)) {
+      position.x += elem.offsetLeft;
+      position.y += elem.offsetTop;
+      elem = elem.offsetParent;
+    }
+    return position;
+  }
+
+  function getScrolls(elem) {
+    var position = {
+      x: 0,
+      y: 0
+    };
+    while (elem && !isBody(elem)) {
+      position.x += elem.scrollLeft;
+      position.y += elem.scrollTop;
+      elem = elem.parentNode;
+    }
+    return position;
+  }
+
+  function isBody(element) {
+    return (/^(?:body|html)$/i).test(element.tagName);
+  }
+};
+
+$.event = {
+  get: function(e, win) {
+    win = win || window;
+    return e || win.event;
+  },
+  getWheel: function(e) {
+    return e.wheelDelta? e.wheelDelta / 120 : -(e.detail || 0) / 3;
+  },
+  isRightClick: function(e) {
+    return (e.which == 3 || e.button == 2);
+  },
+  getPos: function(e, win) {
+    // get mouse position
+    win = win || window;
+    e = e || win.event;
+    var doc = win.document;
+    doc = doc.documentElement || doc.body;
+    //TODO(nico): make touch event handling better
+    if(e.touches && e.touches.length) {
+      e = e.touches[0];
+    }
+    var page = {
+      x: e.pageX || (e.clientX + doc.scrollLeft),
+      y: e.pageY || (e.clientY + doc.scrollTop)
+    };
+    return page;
+  },
+  stop: function(e) {
+    if (e.stopPropagation) e.stopPropagation();
+    e.cancelBubble = true;
+    if (e.preventDefault) e.preventDefault();
+    else e.returnValue = false;
+  }
+};
+
+$jit.util = $jit.id = $;
+
+var Class = function(properties) {
+  properties = properties || {};
+  var klass = function() {
+    for ( var key in this) {
+      if (typeof this[key] != 'function')
+        this[key] = $.unlink(this[key]);
+    }
+    this.constructor = klass;
+    if (Class.prototyping)
+      return this;
+    var instance = this.initialize ? this.initialize.apply(this, arguments)
+        : this;
+    //typize
+    this.$$family = 'class';
+    return instance;
+  };
+
+  for ( var mutator in Class.Mutators) {
+    if (!properties[mutator])
+      continue;
+    properties = Class.Mutators[mutator](properties, properties[mutator]);
+    delete properties[mutator];
+  }
+
+  $.extend(klass, this);
+  klass.constructor = Class;
+  klass.prototype = properties;
+  return klass;
+};
+
+Class.Mutators = {
+
+  Implements: function(self, klasses) {
+    $.each($.splat(klasses), function(klass) {
+      Class.prototyping = klass;
+      var instance = (typeof klass == 'function') ? new klass : klass;
+      for ( var prop in instance) {
+        if (!(prop in self)) {
+          self[prop] = instance[prop];
+        }
+      }
+      delete Class.prototyping;
+    });
+    return self;
+  }
+
+};
+
+$.extend(Class, {
+
+  inherit: function(object, properties) {
+    for ( var key in properties) {
+      var override = properties[key];
+      var previous = object[key];
+      var type = $.type(override);
+      if (previous && type == 'function') {
+        if (override != previous) {
+          Class.override(object, key, override);
+        }
+      } else if (type == 'object') {
+        object[key] = $.merge(previous, override);
+      } else {
+        object[key] = override;
+      }
+    }
+    return object;
+  },
+
+  override: function(object, name, method) {
+    var parent = Class.prototyping;
+    if (parent && object[name] != parent[name])
+      parent = null;
+    var override = function() {
+      var previous = this.parent;
+      this.parent = parent ? parent[name] : object[name];
+      var value = method.apply(this, arguments);
+      this.parent = previous;
+      return value;
+    };
+    object[name] = override;
+  }
+
+});
+
+Class.prototype.implement = function() {
+  var proto = this.prototype;
+  $.each(Array.prototype.slice.call(arguments || []), function(properties) {
+    Class.inherit(proto, properties);
+  });
+  return this;
+};
+
+$jit.Class = Class;
+
+/*
+  Object: $jit.json
+  
+  Provides JSON utility functions.
+  
+  Most of these functions are JSON-tree traversal and manipulation functions.
+*/
+$jit.json = {
+  /*
+     Method: prune
+  
+     Clears all tree nodes having depth greater than maxLevel.
+  
+     Parameters:
+  
+        tree - (object) A JSON tree object. For more information please see <Loader.loadJSON>.
+        maxLevel - (number) An integer specifying the maximum level allowed for this tree. All nodes having depth greater than max level will be deleted.
+
+  */
+  prune: function(tree, maxLevel) {
+    this.each(tree, function(elem, i) {
+      if (i == maxLevel && elem.children) {
+        delete elem.children;
+        elem.children = [];
+      }
+    });
+  },
+  /*
+     Method: getParent
+  
+     Returns the parent node of the node having _id_ as id.
+  
+     Parameters:
+  
+        tree - (object) A JSON tree object. See also <Loader.loadJSON>.
+        id - (string) The _id_ of the child node whose parent will be returned.
+
+    Returns:
+
+        A tree JSON node if any, or false otherwise.
+  
+  */
+  getParent: function(tree, id) {
+    if (tree.id == id)
+      return false;
+    var ch = tree.children;
+    if (ch && ch.length > 0) {
+      for ( var i = 0; i < ch.length; i++) {
+        if (ch[i].id == id)
+          return tree;
+        else {
+          var ans = this.getParent(ch[i], id);
+          if (ans)
+            return ans;
+        }
+      }
+    }
+    return false;
+  },
+  /*
+     Method: getSubtree
+  
+     Returns the subtree that matches the given id.
+  
+     Parameters:
+  
+        tree - (object) A JSON tree object. See also <Loader.loadJSON>.
+        id - (string) A node *unique* identifier.
+  
+     Returns:
+  
+        A subtree having a root node matching the given id. Returns null if no subtree matching the id is found.
+
+  */
+  getSubtree: function(tree, id) {
+    if (tree.id == id)
+      return tree;
+    for ( var i = 0, ch = tree.children; ch && i < ch.length; i++) {
+      var t = this.getSubtree(ch[i], id);
+      if (t != null)
+        return t;
+    }
+    return null;
+  },
+  /*
+     Method: eachLevel
+  
+      Iterates on tree nodes with relative depth less or equal than a specified level.
+  
+     Parameters:
+  
+        tree - (object) A JSON tree or subtree. See also <Loader.loadJSON>.
+        initLevel - (number) An integer specifying the initial relative level. Usually zero.
+        toLevel - (number) An integer specifying a top level. This method will iterate only through nodes with depth less than or equal this number.
+        action - (function) A function that receives a node and an integer specifying the actual level of the node.
+          
+    Example:
+   (start code js)
+     $jit.json.eachLevel(tree, 0, 3, function(node, depth) {
+        alert(node.name + ' ' + depth);
+     });
+   (end code)
+  */
+  eachLevel: function(tree, initLevel, toLevel, action) {
+    if (initLevel <= toLevel) {
+      action(tree, initLevel);
+      if(!tree.children) return;
+      for ( var i = 0, ch = tree.children; i < ch.length; i++) {
+        this.eachLevel(ch[i], initLevel + 1, toLevel, action);
+      }
+    }
+  },
+  /*
+     Method: each
+  
+      A JSON tree iterator.
+  
+     Parameters:
+  
+        tree - (object) A JSON tree or subtree. See also <Loader.loadJSON>.
+        action - (function) A function that receives a node.
+
+    Example:
+    (start code js)
+      $jit.json.each(tree, function(node) {
+        alert(node.name);
+      });
+    (end code)
+          
+  */
+  each: function(tree, action) {
+    this.eachLevel(tree, 0, Number.MAX_VALUE, action);
+  }
+};
+
+
+/*
+     An object containing multiple type of transformations. 
+*/
+
+$jit.Trans = {
+  $extend: true,
+  
+  linear: function(p){
+    return p;
+  }
+};
+
+var Trans = $jit.Trans;
+
+(function(){
+
+  var makeTrans = function(transition, params){
+    params = $.splat(params);
+    return $.extend(transition, {
+      easeIn: function(pos){
+        return transition(pos, params);
+      },
+      easeOut: function(pos){
+        return 1 - transition(1 - pos, params);
+      },
+      easeInOut: function(pos){
+        return (pos <= 0.5)? transition(2 * pos, params) / 2 : (2 - transition(
+            2 * (1 - pos), params)) / 2;
+      }
+    });
+  };
+
+  var transitions = {
+
+    Pow: function(p, x){
+      return Math.pow(p, x[0] || 6);
+    },
+
+    Expo: function(p){
+      return Math.pow(2, 8 * (p - 1));
+    },
+
+    Circ: function(p){
+      return 1 - Math.sin(Math.acos(p));
+    },
+
+    Sine: function(p){
+      return 1 - Math.sin((1 - p) * Math.PI / 2);
+    },
+
+    Back: function(p, x){
+      x = x[0] || 1.618;
+      return Math.pow(p, 2) * ((x + 1) * p - x);
+    },
+
+    Bounce: function(p){
+      var value;
+      for ( var a = 0, b = 1; 1; a += b, b /= 2) {
+        if (p >= (7 - 4 * a) / 11) {
+          value = b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2);
+          break;
+        }
+      }
+      return value;
+    },
+
+    Elastic: function(p, x){
+      return Math.pow(2, 10 * --p)
+          * Math.cos(20 * p * Math.PI * (x[0] || 1) / 3);
+    }
+
+  };
+
+  $.each(transitions, function(val, key){
+    Trans[key] = makeTrans(val);
+  });
+
+  $.each( [
+      'Quad', 'Cubic', 'Quart', 'Quint'
+  ], function(elem, i){
+    Trans[elem] = makeTrans(function(p){
+      return Math.pow(p, [
+        i + 2
+      ]);
+    });
+  });
+
+})();
+
+/*
+   A Class that can perform animations for generic objects.
+
+   If you are looking for animation transitions please take a look at the <Trans> object.
+
+   Used by:
+
+   <Graph.Plot>
+   
+   Based on:
+   
+   The Animation class is based in the MooTools Framework <http://mootools.net>. Copyright (c) 2006-2009 Valerio Proietti, <http://mad4milk.net/>. MIT license <http://mootools.net/license.txt>.
+
+*/
+
+var Animation = new Class( {
+
+  initialize: function(options){
+    this.setOptions(options);
+  },
+
+  setOptions: function(options){
+    var opt = {
+      duration: 2500,
+      fps: 40,
+      transition: Trans.Quart.easeInOut,
+      compute: $.empty,
+      complete: $.empty,
+      link: 'ignore'
+    };
+    this.opt = $.merge(opt, options || {});
+    return this;
+  },
+
+  step: function(){
+    var time = $.time(), opt = this.opt;
+    if (time < this.time + opt.duration) {
+      var delta = opt.transition((time - this.time) / opt.duration);
+      opt.compute(delta);
+    } else {
+      this.timer = clearInterval(this.timer);
+      opt.compute(1);
+      opt.complete();
+    }
+  },
+
+  start: function(){
+    if (!this.check())
+      return this;
+    this.time = 0;
+    this.startTimer();
+    return this;
+  },
+
+  startTimer: function(){
+    var that = this, fps = this.opt.fps;
+    if (this.timer)
+      return false;
+    this.time = $.time() - this.time;
+    this.timer = setInterval((function(){
+      that.step();
+    }), Math.round(1000 / fps));
+    return true;
+  },
+
+  pause: function(){
+    this.stopTimer();
+    return this;
+  },
+
+  resume: function(){
+    this.startTimer();
+    return this;
+  },
+
+  stopTimer: function(){
+    if (!this.timer)
+      return false;
+    this.time = $.time() - this.time;
+    this.timer = clearInterval(this.timer);
+    return true;
+  },
+
+  check: function(){
+    if (!this.timer)
+      return true;
+    if (this.opt.link == 'cancel') {
+      this.stopTimer();
+      return true;
+    }
+    return false;
+  }
+});
+
+
+var Options = function() {
+  var args = arguments;
+  for(var i=0, l=args.length, ans={}; i<l; i++) {
+    var opt = Options[args[i]];
+    if(opt.$extend) {
+      $.extend(ans, opt);
+    } else {
+      ans[args[i]] = opt;  
+    }
+  }
+  return ans;
+};
+
+/*
+ * File: Options.AreaChart.js
+ *
+*/
+
+/*
+  Object: Options.AreaChart
+  
+  <AreaChart> options. 
+  Other options included in the AreaChart are <Options.Canvas>, <Options.Label>, <Options.Margin>, <Options.Tips> and <Options.Events>.
+  
+  Syntax:
+  
+  (start code js)
+
+  Options.AreaChart = {
+    animate: true,
+    labelOffset: 3,
+    type: 'stacked',
+    selectOnHover: true,
+    showAggregates: true,
+    showLabels: true,
+    filterOnClick: false,
+    restoreOnRightClick: false
+  };
+  
+  (end code)
+  
+  Example:
+  
+  (start code js)
+
+  var areaChart = new $jit.AreaChart({
+    animate: true,
+    type: 'stacked:gradient',
+    selectOnHover: true,
+    filterOnClick: true,
+    restoreOnRightClick: true
+  });
+  
+  (end code)
+
+  Parameters:
+  
+  animate - (boolean) Default's *true*. Whether to add animated transitions when filtering/restoring stacks.
+  labelOffset - (number) Default's *3*. Adds margin between the label and the default place where it should be drawn.
+  type - (string) Default's *'stacked'*. Stack style. Posible values are 'stacked', 'stacked:gradient' to add gradients.
+  selectOnHover - (boolean) Default's *true*. If true, it will add a mark to the hovered stack.
+  showAggregates - (boolean, function) Default's *true*. Display the values of the stacks. Can also be a function that returns *true* or *false* to display or filter some values. That same function can also return a string with the formatted value.
+  showLabels - (boolean, function) Default's *true*. Display the name of the slots. Can also be a function that returns *true* or *false* to display or not each label.
+  filterOnClick - (boolean) Default's *true*. Select the clicked stack by hiding all other stacks.
+  restoreOnRightClick - (boolean) Default's *true*. Show all stacks by right clicking.
+  
+*/
+  
+Options.AreaChart = {
+  $extend: true,
+
+  animate: true,
+  labelOffset: 3, // label offset
+  type: 'stacked', // gradient
+  Tips: {
+    enable: false,
+    onShow: $.empty,
+    onHide: $.empty
+  },
+  Events: {
+    enable: false,
+    onClick: $.empty
+  },
+  selectOnHover: true,
+  showAggregates: true,
+  showLabels: true,
+  filterOnClick: false,
+  restoreOnRightClick: false
+};
+
+/*
+ * File: Options.Margin.js
+ *
+*/
+
+/*
+  Object: Options.Margin
+  
+  Canvas drawing margins. 
+  
+  Syntax:
+  
+  (start code js)
+
+  Options.Margin = {
+    top: 0,
+    left: 0,
+    right: 0,
+    bottom: 0
+  };
+  
+  (end code)
+  
+  Example:
+  
+  (start code js)
+
+  var viz = new $jit.Viz({
+    Margin: {
+      right: 10,
+      bottom: 20
+    }
+  });
+  
+  (end code)
+
+  Parameters:
+  
+  top - (number) Default's *0*. Top margin.
+  left - (number) Default's *0*. Left margin.
+  right - (number) Default's *0*. Right margin.
+  bottom - (number) Default's *0*. Bottom margin.
+  
+*/
+
+Options.Margin = {
+  $extend: false,
+  
+  top: 0,
+  left: 0,
+  right: 0,
+  bottom: 0
+};
+
+/*
+ * File: Options.Canvas.js
+ *
+*/
+
+/*
+  Object: Options.Canvas
+  
+  These are Canvas general options, like where to append it in the DOM, its dimensions, background, 
+  and other more advanced options.
+  
+  Syntax:
+  
+  (start code js)
+
+  Options.Canvas = {
+    injectInto: 'id',
+    type: '2D', //'3D'
+    width: false,
+    height: false,
+    useCanvas: false,
+    withLabels: true,
+    background: false
+  };  
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var viz = new $jit.Viz({
+    injectInto: 'someContainerId',
+    width: 500,
+    height: 700
+  });
+  (end code)
+  
+  Parameters:
+  
+  injectInto - *required* (string|element) The id of the DOM container for the visualization. It can also be an Element provided that it has an id.
+  type - (string) Context type. Default's 2D but can be 3D for webGL enabled browsers.
+  width - (number) Default's to the *container's offsetWidth*. The width of the canvas.
+  height - (number) Default's to the *container's offsetHeight*. The height of the canvas.
+  useCanvas - (boolean|object) Default's *false*. You can pass another <Canvas> instance to be used by the visualization.
+  withLabels - (boolean) Default's *true*. Whether to use a label container for the visualization.
+  background - (boolean|object) Default's *false*. An object containing information about the rendering of a background canvas.
+*/
+
+Options.Canvas = {
+    $extend: true,
+    
+    injectInto: 'id',
+    type: '2D',
+    width: false,
+    height: false,
+    useCanvas: false,
+    withLabels: true,
+    background: false,
+    
+    Scene: {
+      Lighting: {
+        enable: false,
+        ambient: [1, 1, 1],
+        directional: {
+          direction: { x: -100, y: -100, z: -100 },
+          color: [0.5, 0.3, 0.1]
+        }
+      }
+    }
+};
+
+/*
+ * File: Options.Tree.js
+ *
+*/
+
+/*
+  Object: Options.Tree
+  
+  Options related to (strict) Tree layout algorithms. These options are used by the <ST> visualization.
+  
+  Syntax:
+  
+  (start code js)
+  Options.Tree = {
+    orientation: "left",
+    subtreeOffset: 8,
+    siblingOffset: 5,
+    indent:10,
+    multitree: false,
+    align:"center"
+  };
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var st = new $jit.ST({
+    orientation: 'left',
+    subtreeOffset: 1,
+    siblingOFfset: 5,
+    multitree: true
+  });
+  (end code)
+
+  Parameters:
+    
+  subtreeOffset - (number) Default's 8. Separation offset between subtrees.
+  siblingOffset - (number) Default's 5. Separation offset between siblings.
+  orientation - (string) Default's 'left'. Tree orientation layout. Possible values are 'left', 'top', 'right', 'bottom'.
+  align - (string) Default's *center*. Whether the tree alignment is 'left', 'center' or 'right'.
+  indent - (number) Default's 10. Used when *align* is left or right and shows an indentation between parent and children.
+  multitree - (boolean) Default's *false*. Used with the node $orn data property for creating multitrees.
+     
+*/
+Options.Tree = {
+    $extend: true,
+    
+    orientation: "left",
+    subtreeOffset: 8,
+    siblingOffset: 5,
+    indent:10,
+    multitree: false,
+    align:"center"
+};
+
+
+/*
+ * File: Options.Node.js
+ *
+*/
+
+/*
+  Object: Options.Node
+
+  Provides Node rendering options for Tree and Graph based visualizations.
+
+  Syntax:
+    
+  (start code js)
+  Options.Node = {
+    overridable: false,
+    type: 'circle',
+    color: '#ccb',
+    alpha: 1,
+    dim: 3,
+    height: 20,
+    width: 90,
+    autoHeight: false,
+    autoWidth: false,
+    lineWidth: 1,
+    transform: true,
+    align: "center",
+    angularWidth:1,
+    span:1,
+    CanvasStyles: {}
+  };
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var viz = new $jit.Viz({
+    Node: {
+      overridable: true,
+      width: 30,
+      autoHeight: true,
+      type: 'rectangle'
+    }
+  });
+  (end code)
+  
+  Parameters:
+
+  overridable - (boolean) Default's *false*. Determine whether or not general node properties can be overridden by a particular <Graph.Node>.
+  type - (string) Default's *circle*. Node's shape. Node built-in types include 'circle', 'rectangle', 'square', 'ellipse', 'triangle', 'star'. The default Node type might vary in each visualization. You can also implement (non built-in) custom Node types into your visualizations.
+  color - (string) Default's *#ccb*. Node color.
+  alpha - (number) Default's *1*. The Node's alpha value. *1* is for full opacity.
+  dim - (number) Default's *3*. An extra parameter used by 'circle', 'square', 'triangle' and 'star' node types. Depending on each shape, this parameter can set the radius of a circle, half the length of the side of a square, half the base and half the height of a triangle or the length of a side of a star (concave decagon).
+  height - (number) Default's *20*. Used by 'rectangle' and 'ellipse' node types. The height of the node shape.
+  width - (number) Default's *90*. Used by 'rectangle' and 'ellipse' node types. The width of the node shape.
+  autoHeight - (boolean) Default's *false*. Whether to set an auto height for the node depending on the content of the Node's label.
+  autoWidth - (boolean) Default's *false*. Whether to set an auto width for the node depending on the content of the Node's label.
+  lineWidth - (number) Default's *1*. Used only by some Node shapes. The line width of the strokes of a node.
+  transform - (boolean) Default's *true*. Only used by the <Hypertree> visualization. Whether to scale the nodes according to the moebius transformation.
+  align - (string) Default's *center*. Possible values are 'center', 'left' or 'right'. Used only by the <ST> visualization, these parameters are used for aligning nodes when some of they dimensions vary.
+  angularWidth - (number) Default's *1*. Used in radial layouts (like <RGraph> or <Sunburst> visualizations). The amount of relative 'space' set for a node.
+  span - (number) Default's *1*. Used in radial layouts (like <RGraph> or <Sunburst> visualizations). The angle span amount set for a node.
+  CanvasStyles - (object) Default's an empty object (i.e. {}). Attach any other canvas specific property that you'd set to the canvas context before plotting a Node.
+
+*/
+Options.Node = {
+  $extend: false,
+  
+  overridable: false,
+  type: 'circle',
+  color: '#ccb',
+  alpha: 1,
+  dim: 3,
+  height: 20,
+  width: 90,
+  autoHeight: false,
+  autoWidth: false,
+  lineWidth: 1,
+  transform: true,
+  align: "center",
+  angularWidth:1,
+  span:1,
+  //Raw canvas styles to be
+  //applied to the context instance
+  //before plotting a node
+  CanvasStyles: {}
+};
+
+
+/*
+ * File: Options.Edge.js
+ *
+*/
+
+/*
+  Object: Options.Edge
+
+  Provides Edge rendering options for Tree and Graph based visualizations.
+
+  Syntax:
+    
+  (start code js)
+  Options.Edge = {
+    overridable: false,
+    type: 'line',
+    color: '#ccb',
+    lineWidth: 1,
+    dim:15,
+    alpha: 1,
+    CanvasStyles: {}
+  };
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var viz = new $jit.Viz({
+    Edge: {
+      overridable: true,
+      type: 'line',
+      color: '#fff',
+      CanvasStyles: {
+        shadowColor: '#ccc',
+        shadowBlur: 10
+      }
+    }
+  });
+  (end code)
+  
+  Parameters:
+    
+   overridable - (boolean) Default's *false*. Determine whether or not general edges properties can be overridden by a particular <Graph.Adjacence>.
+   type - (string) Default's 'line'. Edge styles include 'line', 'hyperline', 'arrow'. The default Edge type might vary in each visualization. You can also implement custom Edge types.
+   color - (string) Default's '#ccb'. Edge color.
+   lineWidth - (number) Default's *1*. Line/Edge width.
+   alpha - (number) Default's *1*. The Edge's alpha value. *1* is for full opacity.
+   dim - (number) Default's *15*. An extra parameter used by other complex shapes such as quadratic, bezier or arrow, to determine the shape's diameter.
+   epsilon - (number) Default's *7*. Only used when using *enableForEdges* in <Options.Events>. This dimension is used to create an area for the line where the contains method for the edge returns *true*.
+   CanvasStyles - (object) Default's an empty object (i.e. {}). Attach any other canvas specific property that you'd set to the canvas context before plotting an Edge.
+
+  See also:
+   
+   If you want to know more about how to customize Node/Edge data per element, in the JSON or programmatically, take a look at this article.
+*/
+Options.Edge = {
+  $extend: false,
+  
+  overridable: false,
+  type: 'line',
+  color: '#ccb',
+  lineWidth: 1,
+  dim:15,
+  alpha: 1,
+  epsilon: 7,
+
+  //Raw canvas styles to be
+  //applied to the context instance
+  //before plotting an edge
+  CanvasStyles: {}
+};
+
+
+/*
+ * File: Options.Fx.js
+ *
+*/
+
+/*
+  Object: Options.Fx
+
+  Provides animation options like duration of the animations, frames per second and animation transitions.  
+
+  Syntax:
+  
+  (start code js)
+    Options.Fx = {
+      fps:40,
+      duration: 2500,
+      transition: $jit.Trans.Quart.easeInOut,
+      clearCanvas: true
+    };
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var viz = new $jit.Viz({
+    duration: 1000,
+    fps: 35,
+    transition: $jit.Trans.linear
+  });
+  (end code)
+  
+  Parameters:
+  
+  clearCanvas - (boolean) Default's *true*. Whether to clear the frame/canvas when the viz is plotted or animated.
+  duration - (number) Default's *2500*. Duration of the animation in milliseconds.
+  fps - (number) Default's *40*. Frames per second.
+  transition - (object) Default's *$jit.Trans.Quart.easeInOut*. The transition used for the animations. See below for a more detailed explanation.
+  
+  Object: $jit.Trans
+  
+  This object is used for specifying different animation transitions in all visualizations.
+
+  There are many different type of animation transitions.
+
+  linear:
+
+  Displays a linear transition
+
+  >Trans.linear
+  
+  (see Linear.png)
+
+  Quad:
+
+  Displays a Quadratic transition.
+
+  >Trans.Quad.easeIn
+  >Trans.Quad.easeOut
+  >Trans.Quad.easeInOut
+  
+ (see Quad.png)
+
+ Cubic:
+
+ Displays a Cubic transition.
+
+ >Trans.Cubic.easeIn
+ >Trans.Cubic.easeOut
+ >Trans.Cubic.easeInOut
+
+ (see Cubic.png)
+
+ Quart:
+
+ Displays a Quartetic transition.
+
+ >Trans.Quart.easeIn
+ >Trans.Quart.easeOut
+ >Trans.Quart.easeInOut
+
+ (see Quart.png)
+
+ Quint:
+
+ Displays a Quintic transition.
+
+ >Trans.Quint.easeIn
+ >Trans.Quint.easeOut
+ >Trans.Quint.easeInOut
+
+ (see Quint.png)
+
+ Expo:
+
+ Displays an Exponential transition.
+
+ >Trans.Expo.easeIn
+ >Trans.Expo.easeOut
+ >Trans.Expo.easeInOut
+
+ (see Expo.png)
+
+ Circ:
+
+ Displays a Circular transition.
+
+ >Trans.Circ.easeIn
+ >Trans.Circ.easeOut
+ >Trans.Circ.easeInOut
+
+ (see Circ.png)
+
+ Sine:
+
+ Displays a Sineousidal transition.
+
+ >Trans.Sine.easeIn
+ >Trans.Sine.easeOut
+ >Trans.Sine.easeInOut
+
+ (see Sine.png)
+
+ Back:
+
+ >Trans.Back.easeIn
+ >Trans.Back.easeOut
+ >Trans.Back.easeInOut
+
+ (see Back.png)
+
+ Bounce:
+
+ Bouncy transition.
+
+ >Trans.Bounce.easeIn
+ >Trans.Bounce.easeOut
+ >Trans.Bounce.easeInOut
+
+ (see Bounce.png)
+
+ Elastic:
+
+ Elastic curve.
+
+ >Trans.Elastic.easeIn
+ >Trans.Elastic.easeOut
+ >Trans.Elastic.easeInOut
+
+ (see Elastic.png)
+ 
+ Based on:
+     
+ Easing and Transition animation methods are based in the MooTools Framework <http://mootools.net>. Copyright (c) 2006-2010 Valerio Proietti, <http://mad4milk.net/>. MIT license <http://mootools.net/license.txt>.
+
+
+*/
+Options.Fx = {
+  $extend: true,
+  
+  fps:40,
+  duration: 2500,
+  transition: $jit.Trans.Quart.easeInOut,
+  clearCanvas: true
+};
+
+/*
+ * File: Options.Label.js
+ *
+*/
+/*
+  Object: Options.Label
+
+  Provides styling for Labels such as font size, family, etc. Also sets Node labels as HTML, SVG or Native canvas elements.  
+
+  Syntax:
+  
+  (start code js)
+    Options.Label = {
+      overridable: false,
+      type: 'HTML', //'SVG', 'Native'
+      style: ' ',
+      size: 10,
+      family: 'sans-serif',
+      textAlign: 'center',
+      textBaseline: 'alphabetic',
+      color: '#fff'
+    };
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var viz = new $jit.Viz({
+    Label: {
+      type: 'Native',
+      size: 11,
+      color: '#ccc'
+    }
+  });
+  (end code)
+  
+  Parameters:
+    
+  overridable - (boolean) Default's *false*. Determine whether or not general label properties can be overridden by a particular <Graph.Node>.
+  type - (string) Default's *HTML*. The type for the labels. Can be 'HTML', 'SVG' or 'Native' canvas labels.
+  style - (string) Default's *empty string*. Can be 'italic' or 'bold'. This parameter is only taken into account when using 'Native' canvas labels. For DOM based labels the className *node* is added to the DOM element for styling via CSS. You can also use <Options.Controller> methods to style individual labels.
+  size - (number) Default's *10*. The font's size. This parameter is only taken into account when using 'Native' canvas labels. For DOM based labels the className *node* is added to the DOM element for styling via CSS. You can also use <Options.Controller> methods to style individual labels.
+  family - (string) Default's *sans-serif*. The font's family. This parameter is only taken into account when using 'Native' canvas labels. For DOM based labels the className *node* is added to the DOM element for styling via CSS. You can also use <Options.Controller> methods to style individual labels.
+  color - (string) Default's *#fff*. The font's color. This parameter is only taken into account when using 'Native' canvas labels. For DOM based labels the className *node* is added to the DOM element for styling via CSS. You can also use <Options.Controller> methods to style individual labels.
+*/
+Options.Label = {
+  $extend: false,
+  
+  overridable: false,
+  type: 'HTML', //'SVG', 'Native'
+  style: ' ',
+  size: 10,
+  family: 'sans-serif',
+  textAlign: 'center',
+  textBaseline: 'alphabetic',
+  color: '#fff'
+};
+
+
+/*
+ * File: Options.Tips.js
+ *
+ */
+
+/*
+  Object: Options.Tips
+  
+  Tips options
+  
+  Syntax:
+    
+  (start code js)
+  Options.Tips = {
+    enable: false,
+    type: 'auto',
+    offsetX: 20,
+    offsetY: 20,
+    onShow: $.empty,
+    onHide: $.empty
+  };
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var viz = new $jit.Viz({
+    Tips: {
+      enable: true,
+      type: 'Native',
+      offsetX: 10,
+      offsetY: 10,
+      onShow: function(tip, node) {
+        tip.innerHTML = node.name;
+      }
+    }
+  });
+  (end code)
+
+  Parameters:
+
+  enable - (boolean) Default's *false*. If *true*, a tooltip will be shown when a node is hovered. The tooltip is a div DOM element having "tip" as CSS class. 
+  type - (string) Default's *auto*. Defines where to attach the MouseEnter/Leave tooltip events. Possible values are 'Native' to attach them to the canvas or 'HTML' to attach them to DOM label elements (if defined). 'auto' sets this property to the value of <Options.Label>'s *type* property.
+  offsetX - (number) Default's *20*. An offset added to the current tooltip x-position (which is the same as the current mouse position). Default's 20.
+  offsetY - (number) Default's *20*. An offset added to the current tooltip y-position (which is the same as the current mouse position). Default's 20.
+  onShow(tip, node) - This callack is used right before displaying a tooltip. The first formal parameter is the tip itself (which is a DivElement). The second parameter may be a <Graph.Node> for graph based visualizations or an object with label, value properties for charts.
+  onHide() - This callack is used when hiding a tooltip.
+
+*/
+Options.Tips = {
+  $extend: false,
+  
+  enable: false,
+  type: 'auto',
+  offsetX: 20,
+  offsetY: 20,
+  force: false,
+  onShow: $.empty,
+  onHide: $.empty
+};
+
+
+/*
+ * File: Options.NodeStyles.js
+ *
+ */
+
+/*
+  Object: Options.NodeStyles
+  
+  Apply different styles when a node is hovered or selected.
+  
+  Syntax:
+    
+  (start code js)
+  Options.NodeStyles = {
+    enable: false,
+    type: 'auto',
+    stylesHover: false,
+    stylesClick: false
+  };
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var viz = new $jit.Viz({
+    NodeStyles: {
+      enable: true,
+      type: 'Native',
+      stylesHover: {
+        dim: 30,
+        color: '#fcc'
+      },
+      duration: 600
+    }
+  });
+  (end code)
+
+  Parameters:
+  
+  enable - (boolean) Default's *false*. Whether to enable this option.
+  type - (string) Default's *auto*. Use this to attach the hover/click events in the nodes or the nodes labels (if they have been defined as DOM elements: 'HTML' or 'SVG', see <Options.Label> for more details). The default 'auto' value will set NodeStyles to the same type defined for <Options.Label>.
+  stylesHover - (boolean|object) Default's *false*. An object with node styles just like the ones defined for <Options.Node> or *false* otherwise.
+  stylesClick - (boolean|object) Default's *false*. An object with node styles just like the ones defined for <Options.Node> or *false* otherwise.
+*/
+
+Options.NodeStyles = {
+  $extend: false,
+  
+  enable: false,
+  type: 'auto',
+  stylesHover: false,
+  stylesClick: false
+};
+
+
+/*
+ * File: Options.Events.js
+ *
+*/
+
+/*
+  Object: Options.Events
+  
+  Configuration for adding mouse/touch event handlers to Nodes.
+  
+  Syntax:
+  
+  (start code js)
+  Options.Events = {
+    enable: false,
+    enableForEdges: false,
+    type: 'auto',
+    onClick: $.empty,
+    onRightClick: $.empty,
+    onMouseMove: $.empty,
+    onMouseEnter: $.empty,
+    onMouseLeave: $.empty,
+    onDragStart: $.empty,
+    onDragMove: $.empty,
+    onDragCancel: $.empty,
+    onDragEnd: $.empty,
+    onTouchStart: $.empty,
+    onTouchMove: $.empty,
+    onTouchEnd: $.empty,
+    onTouchCancel: $.empty,
+    onMouseWheel: $.empty
+  };
+  (end code)
+  
+  Example:
+  
+  (start code js)
+  var viz = new $jit.Viz({
+    Events: {
+      enable: true,
+      onClick: function(node, eventInfo, e) {
+        viz.doSomething();
+      },
+      onMouseEnter: function(node, eventInfo, e) {
+        viz.canvas.getElement().style.cursor = 'pointer';
+      },
+      onMouseLeave: function(node, eventInfo, e) {
+        viz.canvas.getElement().style.cursor = '';
+      }
+    }
+  });
+  (end code)
+  
+  Parameters:
+  
+  enable - (boolean) Default's *false*. Whether to enable the Event system.
+  enableForEdges - (boolean) Default's *false*. Whether to track events also in arcs. If *true* the same callbacks -described below- are used for nodes *and* edges. A simple duck type check for edges is to check for *node.nodeFrom*.
+  type - (string) Default's 'auto'. Whether to attach the events onto the HTML labels (via event delegation) or to use the custom 'Native' canvas Event System of the library. 'auto' is set when you let the <Options.Label> *type* parameter decide this.
+  onClick(node, eventInfo, e) - Triggered when a user performs a click in the canvas. *node* is the <Graph.Node> clicked or false if no node has been clicked. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. 
+  onRightClick(node, eventInfo, e) - Triggered when a user performs a right click in the canvas. *node* is the <Graph.Node> right clicked or false if no node has been clicked. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. 
+  onMouseMove(node, eventInfo, e) - Triggered when the user moves the mouse. *node* is the <Graph.Node> under the cursor as it's moving over the canvas or false if no node has been clicked. *e* is the grabbed event (should return the native event in a cross-browser manner).  *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas.
+  onMouseEnter(node, eventInfo, e) - Triggered when a user moves the mouse over a node. *node* is the <Graph.Node> that the mouse just entered. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. 
+  onMouseLeave(node, eventInfo, e) - Triggered when the user mouse-outs a node. *node* is the <Graph.Node> 'mouse-outed'. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. 
+  onDragStart(node, eventInfo, e) - Triggered when the user mouse-downs over a node. *node* is the <Graph.Node> being pressed. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. 
+  onDragMove(node, eventInfo, e) - Triggered when a user, after pressing the mouse button over a node, moves the mouse around. *node* is the <Graph.Node> being dragged. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. 
+  onDragEnd(node, eventInfo, e) - Triggered when a user finished dragging a node. *node* is the <Graph.Node> being dragged. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. 
+  onDragCancel(node, eventInfo, e) - Triggered when the user releases the mouse button over a <Graph.Node> that wasn't dragged (i.e. the user didn't perform any mouse movement after pressing the mouse button). *node* is the <Graph.Node> being dragged. *e* is the grabbed event (should return the native event in a cross-browser manner). *eventInfo* is an object containing useful methods like *getPos* to get the mouse position relative to the canvas. 
+  onTouchStart(node, eventInfo, e) - Behaves just like onDragStart. 
+  onTouchMove(node, eventInfo, e) - Behaves just like onDragMove. 
+  onTouchEnd(node, eventInfo, e) - Behaves just like onDragEnd. 
+  onTouchCancel(node, eventInfo, e) - Behaves just like onDragCancel.
+  onMouseWheel(delta, e) - Triggered when the user uses the mouse scroll over the canvas. *delta* is 1 or -1 depending on the sense of the mouse scroll.
+*/
+
+Options.Events = {
+  $extend: false,
+  
+  enable: false,
+  enableForEdges: false,
+  type: 'auto',
+  onClick: $.empty,
+  onRightClick: $.empty,
+  onMouseMove: $.empty,
+  onMouseEnter: $.empty,
+  onMouseLeave: $.empty,
+  onDragStart: $.empty,
+  onDragMove: $.empty,
+  onDragCancel: $.empty,
+  onDragEnd: $.empty,
+  onTouchStart: $.empty,
+  onTouchMove: $.empty,
+  onTouchEnd: $.empty,
+  onMouseWheel: $.empty
+};
+
+/*
+ * File: Options.Navigation.js
+ *
+*/
+
+/*
+  Object: Options.Navigation
+  
+  Panning and zooming options for Graph/Tree based visualizations. These options are implemented 
+  by all visualizations except charts (<AreaChart>, <BarChart> and <PieChart>).
+  
+  Syntax:
+  
+  (start code js)
+
+  Options.Navigation = {
+    enable: false,
+    type: 'auto',
+    panning: false, //true, 'avoid nodes'
+    zooming: false
+  };
+  
+  (end code)
+  
+  Example:
+    
+  (start code js)
+  var viz = new $jit.Viz({
+    Navigation: {
+      enable: true,
+      panning: 'avoid nodes',
+      zooming: 20
+    }
+  });
+  (end code)
+  
+  Parameters:
+  
+  enable - (boolean) Default's *false*. Whether to enable Navigation capabilities.
+  type - (string) Default's 'auto'. Whether to attach the navigation events onto the HTML labels (via event delegation) or to use the custom 'Native' canvas Event System of the library. When 'auto' set when you let the <Options.Label> *type* parameter decide this.
+  panning - (boolean|string) Default's *false*. Set this property to *true* if you want to add Drag and Drop panning support to the visualization. You can also set this parameter to 'avoid nodes' to enable DnD panning but disable it if the DnD is taking place over a node. This is useful when some other events like Drag & Drop for nodes are added to <Graph.Nodes>.
+  zooming - (boolean|number) Default's *false*. Set this property to a numeric value to turn mouse-scroll zooming on. The number will be proportional to the mouse-scroll sensitivity.
+  
+*/
+
+Options.Navigation = {
+  $extend: false,
+  
+  enable: false,
+  type: 'auto',
+  panning: false, //true | 'avoid nodes'
+  zooming: false
+};
+
+/*
+ * File: Options.Controller.js
+ *
+*/
+
+/*
+  Object: Options.Controller
+  
+  Provides controller methods. Controller methods are callback functions that get called at different stages 
+  of the animation, computing or plotting of the visualization.
+  
+  Implemented by:
+    
+  All visualizations except charts (<AreaChart>, <BarChart> and <PieChart>).
+  
+  Syntax:
+  
+  (start code js)
+
+  Options.Controller = {
+    onBeforeCompute: $.empty,
+    onAfterCompute:  $.empty,
+    onCreateLabel:   $.empty,
+    onPlaceLabel:    $.empty,
+    onComplete:      $.empty,
+    onBeforePlotLine:$.empty,
+    onAfterPlotLine: $.empty,
+    onBeforePlotNode:$.empty,
+    onAfterPlotNode: $.empty,
+    request:         false
+  };
+  
+  (end code)
+  
+  Example:
+    
+  (start code js)
+  var viz = new $jit.Viz({
+    onBeforePlotNode: function(node) {
+      if(node.selected) {
+        node.setData('color', '#ffc');
+      } else {
+        node.removeData('color');
+      }
+    },
+    onBeforePlotLine: function(adj) {
+      if(adj.nodeFrom.selected && adj.nodeTo.selected) {
+        adj.setData('color', '#ffc');
+      } else {
+        adj.removeData('color');
+      }
+    },
+    onAfterCompute: function() {
+      alert("computed!");
+    }
+  });
+  (end code)
+  
+  Parameters:
+
+   onBeforeCompute(node) - This method is called right before performing all computations and animations. The selected <Graph.Node> is passed as parameter.
+   onAfterCompute() - This method is triggered after all animations or computations ended.
+   onCreateLabel(domElement, node) - This method receives a new label DIV element as first parameter, and the corresponding <Graph.Node> as second parameter. This method will only be called once for each label. This method is useful when adding events or styles to the labels used by the JIT.
+   onPlaceLabel(domElement, node) - This method receives a label DIV element as first parameter and the corresponding <Graph.Node> as second parameter. This method is called each time a label has been placed in the visualization, for example at each step of an animation, and thus it allows you to update the labels properties, such as size or position. Note that onPlaceLabel will be triggered after updating the labels positions. That means that, for example, the left and top css properties are already updated to match the nodes positions. Width and height properties are not set however.
+   onBeforePlotNode(node) - This method is triggered right before plotting each <Graph.Node>. This method is useful for changing a node style right before plotting it.
+   onAfterPlotNode(node) - This method is triggered right after plotting each <Graph.Node>.
+   onBeforePlotLine(adj) - This method is triggered right before plotting a <Graph.Adjacence>. This method is useful for adding some styles to a particular edge before being plotted.
+   onAfterPlotLine(adj) - This method is triggered right after plotting a <Graph.Adjacence>.
+
+    *Used in <ST>, <TM.Base> and <Icicle> visualizations*
+    
+    request(nodeId, level, onComplete) - This method is used for buffering information into the visualization. When clicking on an empty node, the visualization will make a request for this node's subtrees, specifying a given level for this subtree (defined by _levelsToShow_). Once the request is completed, the onComplete callback should be called with the given result. This is useful to provide on-demand information into the visualizations withought having to load the entire information from start. The parameters used by this method are _nodeId_, which is the id of the root of the subtree to request, _level_ which is the depth of the subtree to be requested (0 would mean just the root node). _onComplete_ is an object having the callback method _onComplete.onComplete(json)_ that should be called once the json has been retrieved.  
+ 
+ */
+Options.Controller = {
+  $extend: true,
+  
+  onBeforeCompute: $.empty,
+  onAfterCompute:  $.empty,
+  onCreateLabel:   $.empty,
+  onPlaceLabel:    $.empty,
+  onComplete:      $.empty,
+  onBeforePlotLine:$.empty,
+  onAfterPlotLine: $.empty,
+  onBeforePlotNode:$.empty,
+  onAfterPlotNode: $.empty,
+  request:         false
+};
+
+
+/*
+ * File: Extras.js
+ * 
+ * Provides Extras such as Tips and Style Effects.
+ * 
+ * Description:
+ * 
+ * Provides the <Tips> and <NodeStyles> classes and functions.
+ *
+ */
+
+/*
+ * Manager for mouse events (clicking and mouse moving).
+ * 
+ * This class is used for registering objects implementing onClick
+ * and onMousemove methods. These methods are called when clicking or
+ * moving the mouse around  the Canvas.
+ * For now, <Tips> and <NodeStyles> are classes implementing these methods.
+ * 
+ */
+var ExtrasInitializer = {
+  initialize: function(className, viz) {
+    this.viz = viz;
+    this.canvas = viz.canvas;
+    this.config = viz.config[className];
+    this.nodeTypes = viz.fx.nodeTypes;
+    var type = this.config.type;
+    this.dom = type == 'auto'? (viz.config.Label.type != 'Native') : (type != 'Native');
+    this.labelContainer = this.dom && viz.labels.getLabelContainer();
+    this.isEnabled() && this.initializePost();
+  },
+  initializePost: $.empty,
+  setAsProperty: $.lambda(false),
+  isEnabled: function() {
+    return this.config.enable;
+  },
+  isLabel: function(e, win, group) {
+    e = $.event.get(e, win);
+    var labelContainer = this.labelContainer,
+        target = e.target || e.srcElement,
+        related = e.relatedTarget;
+    if(group) {
+      return related && related == this.viz.canvas.getCtx().canvas 
+          && !!target && this.isDescendantOf(target, labelContainer);
+    } else {
+      return this.isDescendantOf(target, labelContainer);
+    }
+  },
+  isDescendantOf: function(elem, par) {
+    while(elem && elem.parentNode) {
+      if(elem.parentNode == par)
+        return elem;
+      elem = elem.parentNode;
+    }
+    return false;
+  }
+};
+
+var EventsInterface = {
+  onMouseUp: $.empty,
+  onMouseDown: $.empty,
+  onMouseMove: $.empty,
+  onMouseOver: $.empty,
+  onMouseOut: $.empty,
+  onMouseWheel: $.empty,
+  onTouchStart: $.empty,
+  onTouchMove: $.empty,
+  onTouchEnd: $.empty,
+  onTouchCancel: $.empty
+};
+
+var MouseEventsManager = new Class({
+  initialize: function(viz) {
+    this.viz = viz;
+    this.canvas = viz.canvas;
+    this.node = false;
+    this.edge = false;
+    this.registeredObjects = [];
+    this.attachEvents();
+  },
+  
+  attachEvents: function() {
+    var htmlCanvas = this.canvas.getElement(), 
+        that = this;
+    htmlCanvas.oncontextmenu = $.lambda(false);
+    $.addEvents(htmlCanvas, {
+      'mouseup': function(e, win) {
+        var event = $.event.get(e, win);
+        that.handleEvent('MouseUp', e, win, 
+            that.makeEventObject(e, win), 
+            $.event.isRightClick(event));
+      },
+      'mousedown': function(e, win) {
+        var event = $.event.get(e, win);
+        that.handleEvent('MouseDown', e, win, that.makeEventObject(e, win), 
+            $.event.isRightClick(event));
+      },
+      'mousemove': function(e, win) {
+        that.handleEvent('MouseMove', e, win, that.makeEventObject(e, win));
+      },
+      'mouseover': function(e, win) {
+        that.handleEvent('MouseOver', e, win, that.makeEventObject(e, win));
+      },
+      'mouseout': function(e, win) {
+        that.handleEvent('MouseOut', e, win, that.makeEventObject(e, win));
+      },
+      'touchstart': function(e, win) {
+        that.handleEvent('TouchStart', e, win, that.makeEventObject(e, win));
+      },
+      'touchmove': function(e, win) {
+        that.handleEvent('TouchMove', e, win, that.makeEventObject(e, win));
+      },
+      'touchend': function(e, win) {
+        that.handleEvent('TouchEnd', e, win, that.makeEventObject(e, win));
+      }
+    });
+    //attach mousewheel event
+    var handleMouseWheel = function(e, win) {
+      var event = $.event.get(e, win);
+      var wheel = $.event.getWheel(event);
+      that.handleEvent('MouseWheel', e, win, wheel);
+    };
+    //TODO(nico): this is a horrible check for non-gecko browsers!
+    if(!document.getBoxObjectFor && window.mozInnerScreenX == null) {
+      $.addEvent(htmlCanvas, 'mousewheel', handleMouseWheel);
+    } else {
+      htmlCanvas.addEventListener('DOMMouseScroll', handleMouseWheel, false);
+    }
+  },
+  
+  register: function(obj) {
+    this.registeredObjects.push(obj);
+  },
+  
+  handleEvent: function() {
+    var args = Array.prototype.slice.call(arguments),
+        type = args.shift();
+    for(var i=0, regs=this.registeredObjects, l=regs.length; i<l; i++) {
+      regs[i]['on' + type].apply(regs[i], args);
+    }
+  },
+  
+  makeEventObject: function(e, win) {
+    var that = this,
+        graph = this.viz.graph,
+        fx = this.viz.fx,
+        ntypes = fx.nodeTypes,
+        etypes = fx.edgeTypes;
+    return {
+      pos: false,
+      node: false,
+      edge: false,
+      contains: false,
+      getNodeCalled: false,
+      getEdgeCalled: false,
+      getPos: function() {
+        //TODO(nico): check why this can't be cache anymore when using edge detection
+        //if(this.pos) return this.pos;
+        var canvas = that.viz.canvas,
+            s = canvas.getSize(),
+            p = canvas.getPos(),
+            ox = canvas.translateOffsetX,
+            oy = canvas.translateOffsetY,
+            sx = canvas.scaleOffsetX,
+            sy = canvas.scaleOffsetY,
+            pos = $.event.getPos(e, win);
+        this.pos = {
+          x: (pos.x - p.x - s.width/2 - ox) * 1/sx,
+          y: (pos.y - p.y - s.height/2 - oy) * 1/sy
+        };
+        return this.pos;
+      },
+      getNode: function() {
+        if(this.getNodeCalled) return this.node;
+        this.getNodeCalled = true;
+        for(var id in graph.nodes) {
+          var n = graph.nodes[id],
+              geom = n && ntypes[n.getData('type')],
+              contains = geom && geom.contains && geom.contains.call(fx, n, this.getPos());
+          if(contains) {
+            this.contains = contains;
+            return that.node = this.node = n;
+          }
+        }
+        return that.node = this.node = false;
+      },
+      getEdge: function() {
+        if(this.getEdgeCalled) return this.edge;
+        this.getEdgeCalled = true;
+        var hashset = {};
+        for(var id in graph.edges) {
+          var edgeFrom = graph.edges[id];
+          hashset[id] = true;
+          for(var edgeId in edgeFrom) {
+            if(edgeId in hashset) continue;
+            var e = edgeFrom[edgeId],
+                geom = e && etypes[e.getData('type')],
+                contains = geom && geom.contains && geom.contains.call(fx, e, this.getPos());
+            if(contains) {
+              this.contains = contains;
+              return that.edge = this.edge = e;
+            }
+          }
+        }
+        return that.edge = this.edge = false;
+      },
+      getContains: function() {
+        if(this.getNodeCalled) return this.contains;
+        this.getNode();
+        return this.contains;
+      }
+    };
+  }
+});
+
+/* 
+ * Provides the initialization function for <NodeStyles> and <Tips> implemented 
+ * by all main visualizations.
+ *
+ */
+var Extras = {
+  initializeExtras: function() {
+    var mem = new MouseEventsManager(this), that = this;
+    $.each(['NodeStyles', 'Tips', 'Navigation', 'Events'], function(k) {
+      var obj = new Extras.Classes[k](k, that);
+      if(obj.isEnabled()) {
+        mem.register(obj);
+      }
+      if(obj.setAsProperty()) {
+        that[k.toLowerCase()] = obj;
+      }
+    });
+  }   
+};
+
+Extras.Classes = {};
+/*
+  Class: Events
+   
+  This class defines an Event API to be accessed by the user.
+  The methods implemented are the ones defined in the <Options.Events> object.
+*/
+
+Extras.Classes.Events = new Class({
+  Implements: [ExtrasInitializer, EventsInterface],
+  
+  initializePost: function() {
+    this.fx = this.viz.fx;
+    this.ntypes = this.viz.fx.nodeTypes;
+    this.etypes = this.viz.fx.edgeTypes;
+    
+    this.hovered = false;
+    this.pressed = false;
+    this.touched = false;
+
+    this.touchMoved = false;
+    this.moved = false;
+    
+  },
+  
+  setAsProperty: $.lambda(true),
+  
+  onMouseUp: function(e, win, event, isRightClick) {
+    var evt = $.event.get(e, win);
+    if(!this.moved) {
+      if(isRightClick) {
+        this.config.onRightClick(this.hovered, event, evt);
+      } else {
+        this.config.onClick(this.pressed, event, evt);
+      }
+    }
+    if(this.pressed) {
+      if(this.moved) {
+        this.config.onDragEnd(this.pressed, event, evt);
+      } else {
+        this.config.onDragCancel(this.pressed, event, evt);
+      }
+      this.pressed = this.moved = false;
+    }
+  },
+
+  onMouseOut: function(e, win, event) {
+   //mouseout a label
+   var evt = $.event.get(e, win), label;
+   if(this.dom && (label = this.isLabel(e, win, true))) {
+     this.config.onMouseLeave(this.viz.graph.getNode(label.id),
+                              event, evt);
+     this.hovered = false;
+     return;
+   }
+   //mouseout canvas
+   var rt = evt.relatedTarget,
+       canvasWidget = this.canvas.getElement();
+   while(rt && rt.parentNode) {
+     if(canvasWidget == rt.parentNode) return;
+     rt = rt.parentNode;
+   }
+   if(this.hovered) {
+     this.config.onMouseLeave(this.hovered,
+         event, evt);
+     this.hovered = false;
+   }
+  },
+  
+  onMouseOver: function(e, win, event) {
+    //mouseover a label
+    var evt = $.event.get(e, win), label;
+    if(this.dom && (label = this.isLabel(e, win, true))) {
+      this.hovered = this.viz.graph.getNode(label.id);
+      this.config.onMouseEnter(this.hovered,
+                               event, evt);
+    }
+  },
+  
+  onMouseMove: function(e, win, event) {
+   var label, evt = $.event.get(e, win);
+   if(this.pressed) {
+     this.moved = true;
+     this.config.onDragMove(this.pressed, event, evt);
+     return;
+   }
+   if(this.dom) {
+     this.config.onMouseMove(this.hovered,
+         event, evt);
+   } else {
+     if(this.hovered) {
+       var hn = this.hovered;
+       var geom = hn.nodeFrom? this.etypes[hn.getData('type')] : this.ntypes[hn.getData('type')];
+       var contains = geom && geom.contains 
+         && geom.contains.call(this.fx, hn, event.getPos());
+       if(contains) {
+         this.config.onMouseMove(hn, event, evt);
+         return;
+       } else {
+         this.config.onMouseLeave(hn, event, evt);
+         this.hovered = false;
+       }
+     }
+     if(this.hovered = (event.getNode() || (this.config.enableForEdges && event.getEdge()))) {
+       this.config.onMouseEnter(this.hovered, event, evt);
+     } else {
+       this.config.onMouseMove(false, event, evt);
+     }
+   }
+  },
+  
+  onMouseWheel: function(e, win, delta) {
+    this.config.onMouseWheel(delta, $.event.get(e, win));
+  },
+  
+  onMouseDown: function(e, win, event) {
+    var evt = $.event.get(e, win), label;
+    if(this.dom) {
+      if(label = this.isLabel(e, win)) {
+        this.pressed = this.viz.graph.getNode(label.id);
+      }
+    } else {
+      this.pressed = event.getNode() || (this.config.enableForEdges && event.getEdge());
+    }
+    this.pressed && this.config.onDragStart(this.pressed, event, evt);
+  },
+  
+  onTouchStart: function(e, win, event) {
+    var evt = $.event.get(e, win), label;
+    if(this.dom && (label = this.isLabel(e, win))) {
+      this.touched = this.viz.graph.getNode(label.id);
+    } else {
+      this.touched = event.getNode() || (this.config.enableForEdges && event.getEdge());
+    }
+    this.touched && this.config.onTouchStart(this.touched, event, evt);
+  },
+  
+  onTouchMove: function(e, win, event) {
+    var evt = $.event.get(e, win);
+    if(this.touched) {
+      this.touchMoved = true;
+      this.config.onTouchMove(this.touched, event, evt);
+    }
+  },
+  
+  onTouchEnd: function(e, win, event) {
+    var evt = $.event.get(e, win);
+    if(this.touched) {
+      if(this.touchMoved) {
+        this.config.onTouchEnd(this.touched, event, evt);
+      } else {
+        this.config.onTouchCancel(this.touched, event, evt);
+      }
+      this.touched = this.touchMoved = false;
+    }
+  }
+});
+
+/*
+   [CODE CUSTOMIZED BY : SACHIN K.]
+    
+   [
+     CUSTOMIZATIONS:
+     Method: onMouseOver, onMouseMove 
+     In Treemap, display tooltip only if node is not top most parent node 
+     i.e. root node of treemap.
+   ]
+   
+   Class: Tips
+    
+   A class containing tip related functions. This class is used internally.
+   
+   Used by:
+   
+   <ST>, <Sunburst>, <Hypertree>, <RGraph>, <TM>, <ForceDirected>, <Icicle>
+   
+   See also:
+   
+   <Options.Tips>
+*/
+
+Extras.Classes.Tips = new Class({
+  Implements: [ExtrasInitializer, EventsInterface],
+  
+  initializePost: function() {
+    //add DOM tooltip
+    if(document.body) {
+      var tip = $('_tooltip') || document.createElement('div');
+      tip.id = '_tooltip';
+      tip.className = 'tip';
+      $.extend(tip.style, {
+        position: 'absolute',
+        display: 'none',
+        zIndex: 13000
+      });
+      document.body.appendChild(tip);
+      this.tip = tip;
+      this.node = false;
+    }
+  },
+  
+  setAsProperty: $.lambda(true),
+  
+  onMouseOut: function(e, win) {
+    //mouseout a label
+    var evt = $.event.get(e, win);
+    if(this.dom && this.isLabel(e, win, true)) {
+      this.hide(true);
+      return;
+    }
+    //mouseout canvas
+    var rt = e.relatedTarget,
+        canvasWidget = this.canvas.getElement();
+    while(rt && rt.parentNode) {
+      if(canvasWidget == rt.parentNode) return;
+      rt = rt.parentNode;
+    }
+    this.hide(false);
+  },
+  
+  onMouseOver: function(e, win) {
+    //mouseover a label
+    var label;
+    if(this.dom && (label = this.isLabel(e, win, false))) {
+      this.node = this.viz.graph.getNode(label.id);
+      if(this.node._depth != 0){
+        this.config.onShow(this.tip, this.node, label);
+      }else{
+        this.hide(true);
+      }
+    }
+  },
+  
+  onMouseMove: function(e, win, opt) {
+    if(this.dom && this.isLabel(e, win)) {
+      if(opt.getNode()._depth != 0){
+        this.setTooltipPosition($.event.getPos(e, win));
+      }else{
+        this.hide(true);
+      }
+    }
+    if(!this.dom) {
+      var node = opt.getNode();
+      if(!node) {
+        this.hide(true);
+        return;
+      }
+      if(this.config.force || !this.node || this.node.id != node.id) {
+        this.node = node;
+        if(opt.getNode()._depth != 0){
+          this.config.onShow(this.tip, node, opt.getContains());
+        }
+      }
+      if(opt.getNode()._depth != 0){
+        this.setTooltipPosition($.event.getPos(e, win));
+      }else{
+        this.hide(true);
+      }
+    }
+  },
+  
+  setTooltipPosition: function(pos) {
+    var tip = this.tip, 
+        style = tip.style, 
+        cont = this.config;
+	
+    style.display = '';
+    //get window dimensions
+    var win = {
+      'height': document.body.clientHeight,
+      'width': document.body.clientWidth
+    };
+    //get tooltip dimensions
+    var obj = {
+      'width': tip.offsetWidth,
+      'height': tip.offsetHeight  
+    };
+    //set tooltip position
+    var x = cont.offsetX, y = cont.offsetY;
+    style.top = ((pos.y + y + obj.height > win.height)?  
+        (pos.y - obj.height - y) : pos.y + y) + 'px';
+		if(pos.x + obj.width + x > win.width)
+			style.left = pos.x - obj.width - x + 'px';
+		else if(pos.x < obj.width)
+			style.left = pos.x - x + 'px';
+		else
+			style.left = pos.x - obj.width + 'px';
+
+  },
+  
+  hide: function(triggerCallback) {
+    this.tip.style.display = 'none';
+    triggerCallback && this.config.onHide();
+  }
+});
+
+/*
+  Class: NodeStyles
+   
+  Change node styles when clicking or hovering a node. This class is used internally.
+  
+  Used by:
+  
+  <ST>, <Sunburst>, <Hypertree>, <RGraph>, <TM>, <ForceDirected>, <Icicle>
+  
+  See also:
+  
+  <Options.NodeStyles>
+*/
+Extras.Classes.NodeStyles = new Class({
+  Implements: [ExtrasInitializer, EventsInterface],
+  
+  initializePost: function() {
+    this.fx = this.viz.fx;
+    this.types = this.viz.fx.nodeTypes;
+    this.nStyles = this.config;
+    this.nodeStylesOnHover = this.nStyles.stylesHover;
+    this.nodeStylesOnClick = this.nStyles.stylesClick;
+    this.hoveredNode = false;
+    this.fx.nodeFxAnimation = new Animation();
+    
+    this.down = false;
+    this.move = false;
+  },
+  
+  onMouseOut: function(e, win) {
+    this.down = this.move = false;
+    if(!this.hoveredNode) return;
+    //mouseout a label
+    if(this.dom && this.isLabel(e, win, true)) {
+      this.toggleStylesOnHover(this.hoveredNode, false);
+    }
+    //mouseout canvas
+    var rt = e.relatedTarget,
+        canvasWidget = this.canvas.getElement();
+    while(rt && rt.parentNode) {
+      if(canvasWidget == rt.parentNode) return;
+      rt = rt.parentNode;
+    }
+    this.toggleStylesOnHover(this.hoveredNode, false);
+    this.hoveredNode = false;
+  },
+  
+  onMouseOver: function(e, win) {
+    //mouseover a label
+    var label;
+    if(this.dom && (label = this.isLabel(e, win, true))) {
+      var node = this.viz.graph.getNode(label.id);
+      if(node.selected) return;
+      this.hoveredNode = node;
+      this.toggleStylesOnHover(this.hoveredNode, true);
+    }
+  },
+  
+  onMouseDown: function(e, win, event, isRightClick) {
+    if(isRightClick) return;
+    var label;
+    if(this.dom && (label = this.isLabel(e, win))) {
+      this.down = this.viz.graph.getNode(label.id);
+    } else if(!this.dom) {
+      this.down = event.getNode();
+    }
+    this.move = false;
+  },
+  
+  onMouseUp: function(e, win, event, isRightClick) {
+    if(isRightClick) return;
+    if(!this.move) {
+      this.onClick(event.getNode());
+    }
+    this.down = this.move = false;
+  },
+  
+  getRestoredStyles: function(node, type) {
+    var restoredStyles = {}, 
+        nStyles = this['nodeStylesOn' + type];
+    for(var prop in nStyles) {
+      restoredStyles[prop] = node.styles['$' + prop];
+    }
+    return restoredStyles;
+  },
+  
+  toggleStylesOnHover: function(node, set) {
+    if(this.nodeStylesOnHover) {
+      this.toggleStylesOn('Hover', node, set);
+    }
+  },
+
+  toggleStylesOnClick: function(node, set) {
+    if(this.nodeStylesOnClick) {
+      this.toggleStylesOn('Click', node, set);
+    }
+  },
+  
+  toggleStylesOn: function(type, node, set) {
+    var viz = this.viz;
+    var nStyles = this.nStyles;
+    if(set) {
+      var that = this;
+      if(!node.styles) {
+        node.styles = $.merge(node.data, {});
+      }
+      for(var s in this['nodeStylesOn' + type]) {
+        var $s = '$' + s;
+        if(!($s in node.styles)) {
+            node.styles[$s] = node.getData(s); 
+        }
+      }
+      viz.fx.nodeFx($.extend({
+        'elements': {
+          'id': node.id,
+          'properties': that['nodeStylesOn' + type]
+         },
+         transition: Trans.Quart.easeOut,
+         duration:300,
+         fps:40
+      }, this.config));
+    } else {
+      var restoredStyles = this.getRestoredStyles(node, type);
+      viz.fx.nodeFx($.extend({
+        'elements': {
+          'id': node.id,
+          'properties': restoredStyles
+         },
+         transition: Trans.Quart.easeOut,
+         duration:300,
+         fps:40
+      }, this.config));
+    }
+  },
+
+  onClick: function(node) {
+    if(!node) return;
+    var nStyles = this.nodeStylesOnClick;
+    if(!nStyles) return;
+    //if the node is selected then unselect it
+    if(node.selected) {
+      this.toggleStylesOnClick(node, false);
+      delete node.selected;
+    } else {
+      //unselect all selected nodes...
+      this.viz.graph.eachNode(function(n) {
+        if(n.selected) {
+          for(var s in nStyles) {
+            n.setData(s, n.styles['$' + s], 'end');
+          }
+          delete n.selected;
+        }
+      });
+      //select clicked node
+      this.toggleStylesOnClick(node, true);
+      node.selected = true;
+      delete node.hovered;
+      this.hoveredNode = false;
+    }
+  },
+  
+  onMouseMove: function(e, win, event) {
+    //if mouse button is down and moving set move=true
+    if(this.down) this.move = true;
+    //already handled by mouseover/out
+    if(this.dom && this.isLabel(e, win)) return;
+    var nStyles = this.nodeStylesOnHover;
+    if(!nStyles) return;
+    
+    if(!this.dom) {
+      if(this.hoveredNode) {
+        var geom = this.types[this.hoveredNode.getData('type')];
+        var contains = geom && geom.contains && geom.contains.call(this.fx, 
+            this.hoveredNode, event.getPos());
+        if(contains) return;
+      }
+      var node = event.getNode();
+      //if no node is being hovered then just exit
+      if(!this.hoveredNode && !node) return;
+      //if the node is hovered then exit
+      if(node.hovered) return;
+      //select hovered node
+      if(node && !node.selected) {
+        //check if an animation is running and exit it
+        this.fx.nodeFxAnimation.stopTimer();
+        //unselect all hovered nodes...
+        this.viz.graph.eachNode(function(n) {
+          if(n.hovered && !n.selected) {
+            for(var s in nStyles) {
+              n.setData(s, n.styles['$' + s], 'end');
+            }
+            delete n.hovered;
+          }
+        });
+        //select hovered node
+        node.hovered = true;
+        this.hoveredNode = node;
+        this.toggleStylesOnHover(node, true);
+      } else if(this.hoveredNode && !this.hoveredNode.selected) {
+        //check if an animation is running and exit it
+        this.fx.nodeFxAnimation.stopTimer();
+        //unselect hovered node
+        this.toggleStylesOnHover(this.hoveredNode, false);
+        delete this.hoveredNode.hovered;
+        this.hoveredNode = false;
+      }
+    }
+  }
+});
+
+Extras.Classes.Navigation = new Class({
+  Implements: [ExtrasInitializer, EventsInterface],
+  
+  initializePost: function() {
+    this.pos = false;
+    this.pressed = false;
+  },
+  
+  onMouseWheel: function(e, win, scroll) {
+    if(!this.config.zooming) return;
+    $.event.stop($.event.get(e, win));
+    var val = this.config.zooming / 1000,
+        ans = 1 + scroll * val;
+    this.canvas.scale(ans, ans);
+  },
+  
+  onMouseDown: function(e, win, eventInfo) {
+    if(!this.config.panning) return;
+    if(this.config.panning == 'avoid nodes' && (this.dom? this.isLabel(e, win) : eventInfo.getNode())) return;
+    this.pressed = true;
+    this.pos = eventInfo.getPos();
+    var canvas = this.canvas,
+        ox = canvas.translateOffsetX,
+        oy = canvas.translateOffsetY,
+        sx = canvas.scaleOffsetX,
+        sy = canvas.scaleOffsetY;
+    this.pos.x *= sx;
+    this.pos.x += ox;
+    this.pos.y *= sy;
+    this.pos.y += oy;
+  },
+  
+  onMouseMove: function(e, win, eventInfo) {
+    if(!this.config.panning) return;
+    if(!this.pressed) return;
+    if(this.config.panning == 'avoid nodes' && (this.dom? this.isLabel(e, win) : eventInfo.getNode())) return;
+    var thispos = this.pos, 
+        currentPos = eventInfo.getPos(),
+        canvas = this.canvas,
+        ox = canvas.translateOffsetX,
+        oy = canvas.translateOffsetY,
+        sx = canvas.scaleOffsetX,
+        sy = canvas.scaleOffsetY;
+    currentPos.x *= sx;
+    currentPos.y *= sy;
+    currentPos.x += ox;
+    currentPos.y += oy;
+    var x = currentPos.x - thispos.x,
+        y = currentPos.y - thispos.y;
+    this.pos = currentPos;
+    this.canvas.translate(x * 1/sx, y * 1/sy);
+  },
+  
+  onMouseUp: function(e, win, eventInfo, isRightClick) {
+    if(!this.config.panning) return;
+    this.pressed = false;
+  }
+});
+
+
+/*
+ * File: Canvas.js
+ *
+ */
+
+/*
+ Class: Canvas
+ 
+ 	A canvas widget used by all visualizations. The canvas object can be accessed by doing *viz.canvas*. If you want to 
+ 	know more about <Canvas> options take a look at <Options.Canvas>.
+ 
+ A canvas widget is a set of DOM elements that wrap the native canvas DOM Element providing a consistent API and behavior 
+ across all browsers. It can also include Elements to add DOM (SVG or HTML) label support to all visualizations.
+ 
+ Example:
+ 
+ Suppose we have this HTML
+ 
+ (start code xml)
+ 	<div id="infovis"></div>
+ (end code)
+ 
+ Now we create a new Visualization
+ 
+ (start code js)
+ 	var viz = new $jit.Viz({
+ 		//Where to inject the canvas. Any div container will do.
+ 		'injectInto':'infovis',
+		 //width and height for canvas. 
+		 //Default's to the container offsetWidth and Height.
+		 'width': 900,
+		 'height':500
+	 });
+ (end code)
+
+ The generated HTML will look like this
+ 
+ (start code xml)
+ <div id="infovis">
+ 	<div id="infovis-canvaswidget" style="position:relative;">
+ 	<canvas id="infovis-canvas" width=900 height=500
+ 	style="position:absolute; top:0; left:0; width:900px; height:500px;" />
+ 	<div id="infovis-label"
+ 	style="overflow:visible; position:absolute; top:0; left:0; width:900px; height:0px">
+ 	</div>
+ 	</div>
+ </div>
+ (end code)
+ 
+ As you can see, the generated HTML consists of a canvas DOM Element of id *infovis-canvas* and a div label container
+ of id *infovis-label*, wrapped in a main div container of id *infovis-canvaswidget*.
+ */
+
+var Canvas;
+(function() {
+  //check for native canvas support
+  var canvasType = typeof HTMLCanvasElement,
+      supportsCanvas = (canvasType == 'object' || canvasType == 'function');
+  //create element function
+  function $E(tag, props) {
+    var elem = document.createElement(tag);
+    for(var p in props) {
+      if(typeof props[p] == "object") {
+        $.extend(elem[p], props[p]);
+      } else {
+        elem[p] = props[p];
+      }
+    }
+    if (tag == "canvas" && !supportsCanvas && G_vmlCanvasManager) {
+      elem = G_vmlCanvasManager.initElement(document.body.appendChild(elem));
+    }
+    return elem;
+  }
+  //canvas widget which we will call just Canvas
+  $jit.Canvas = Canvas = new Class({
+    canvases: [],
+    pos: false,
+    element: false,
+    labelContainer: false,
+    translateOffsetX: 0,
+    translateOffsetY: 0,
+    scaleOffsetX: 1,
+    scaleOffsetY: 1,
+    
+    initialize: function(viz, opt) {
+      this.viz = viz;
+      this.opt = this.config = opt;
+      var id = $.type(opt.injectInto) == 'string'? 
+          opt.injectInto:opt.injectInto.id,
+          type = opt.type,
+          idLabel = id + "-label", 
+          wrapper = $(id),
+          width = opt.width || wrapper.offsetWidth,
+          height = opt.height || wrapper.offsetHeight;
+      this.id = id;
+      //canvas options
+      var canvasOptions = {
+        injectInto: id,
+        width: width,
+        height: height
+      };
+      //create main wrapper
+      this.element = $E('div', {
+        'id': id + '-canvaswidget',
+        'style': {
+          'position': 'relative',
+          'width': width + 'px',
+          'height': height + 'px'
+        }
+      });
+      //create label container
+      this.labelContainer = this.createLabelContainer(opt.Label.type, 
+          idLabel, canvasOptions);
+      //create primary canvas
+      this.canvases.push(new Canvas.Base[type]({
+        config: $.extend({idSuffix: '-canvas'}, canvasOptions),
+        plot: function(base) {
+          viz.fx.plot();
+        },
+        resize: function() {
+          viz.refresh();
+        }
+      }));
+      //create secondary canvas
+      var back = opt.background;
+      if(back) {
+        var backCanvas = new Canvas.Background[back.type](viz, $.extend(back, canvasOptions));
+        this.canvases.push(new Canvas.Base[type](backCanvas));
+      }
+      //insert canvases
+      var len = this.canvases.length;
+      while(len--) {
+        this.element.appendChild(this.canvases[len].canvas);
+        if(len > 0) {
+          this.canvases[len].plot();
+        }
+      }
+      this.element.appendChild(this.labelContainer);
+      wrapper.appendChild(this.element);
+      //Update canvas position when the page is scrolled.
+      var timer = null, that = this;
+      $.addEvent(window, 'scroll', function() {
+        clearTimeout(timer);
+        timer = setTimeout(function() {
+          that.getPos(true); //update canvas position
+        }, 500);
+      });
+    },
+    /*
+      Method: getCtx
+      
+      Returns the main canvas context object
+      
+      Example:
+      
+      (start code js)
+       var ctx = canvas.getCtx();
+       //Now I can use the native canvas context
+       //and for example change some canvas styles
+       ctx.globalAlpha = 1;
+      (end code)
+    */
+    getCtx: function(i) {
+      return this.canvases[i || 0].getCtx();
+    },
+    /*
+      Method: getConfig
+      
+      Returns the current Configuration for this Canvas Widget.
+      
+      Example:
+      
+      (start code js)
+       var config = canvas.getConfig();
+      (end code)
+    */
+    getConfig: function() {
+      return this.opt;
+    },
+    /*
+      Method: getElement
+
+      Returns the main Canvas DOM wrapper
+      
+      Example:
+      
+      (start code js)
+       var wrapper = canvas.getElement();
+       //Returns <div id="infovis-canvaswidget" ... >...</div> as element
+      (end code)
+    */
+    getElement: function() {
+      return this.element;
+    },
+    /*
+      Method: getSize
+      
+      Returns canvas dimensions.
+      
+      Returns:
+      
+      An object with *width* and *height* properties.
+      
+      Example:
+      (start code js)
+      canvas.getSize(); //returns { width: 900, height: 500 }
+      (end code)
+    */
+    getSize: function(i) {
+      return this.canvases[i || 0].getSize();
+    },
+    /*
+      Method: resize
+      
+      Resizes the canvas.
+      
+      Parameters:
+      
+      width - New canvas width.
+      height - New canvas height.
+      
+      Example:
+      
+      (start code js)
+       canvas.resize(width, height);
+      (end code)
+    
+    */
+    resize: function(width, height) {
+      this.getPos(true);
+      this.translateOffsetX = this.translateOffsetY = 0;
+      this.scaleOffsetX = this.scaleOffsetY = 1;
+      for(var i=0, l=this.canvases.length; i<l; i++) {
+        this.canvases[i].resize(width, height);
+      }
+      var style = this.element.style;
+      style.width = width + 'px';
+      style.height = height + 'px';
+      if(this.labelContainer)
+        this.labelContainer.style.width = width + 'px';
+    },
+    /*
+      Method: translate
+      
+      Applies a translation to the canvas.
+      
+      Parameters:
+      
+      x - (number) x offset.
+      y - (number) y offset.
+      disablePlot - (boolean) Default's *false*. Set this to *true* if you don't want to refresh the visualization.
+      
+      Example:
+      
+      (start code js)
+       canvas.translate(30, 30);
+      (end code)
+    
+    */
+    translate: function(x, y, disablePlot) {
+      this.translateOffsetX += x*this.scaleOffsetX;
+      this.translateOffsetY += y*this.scaleOffsetY;
+      for(var i=0, l=this.canvases.length; i<l; i++) {
+        this.canvases[i].translate(x, y, disablePlot);
+      }
+    },
+    /*
+      Method: scale
+      
+      Scales the canvas.
+      
+      Parameters:
+      
+      x - (number) scale value.
+      y - (number) scale value.
+      disablePlot - (boolean) Default's *false*. Set this to *true* if you don't want to refresh the visualization.
+      
+      Example:
+      
+      (start code js)
+       canvas.scale(0.5, 0.5);
+      (end code)
+    
+    */
+    scale: function(x, y, disablePlot) {
+      var px = this.scaleOffsetX * x,
+          py = this.scaleOffsetY * y;
+      var dx = this.translateOffsetX * (x -1) / px,
+          dy = this.translateOffsetY * (y -1) / py;
+      this.scaleOffsetX = px;
+      this.scaleOffsetY = py;
+      for(var i=0, l=this.canvases.length; i<l; i++) {
+        this.canvases[i].scale(x, y, true);
+      }
+      this.translate(dx, dy, false);
+    },
+    /*
+      Method: getPos
+      
+      Returns the canvas position as an *x, y* object.
+      
+      Parameters:
+      
+      force - (boolean) Default's *false*. Set this to *true* if you want to recalculate the position without using any cache information.
+      
+      Returns:
+      
+      An object with *x* and *y* properties.
+      
+      Example:
+      (start code js)
+      canvas.getPos(true); //returns { x: 900, y: 500 }
+      (end code)
+    */
+    getPos: function(force){
+      if(force || !this.pos) {
+        return this.pos = $.getPos(this.getElement());
+      }
+      return this.pos;
+    },
+    /*
+       Method: clear
+       
+       Clears the canvas.
+    */
+    clear: function(i){
+      this.canvases[i||0].clear();
+    },
+    
+    path: function(type, action){
+      var ctx = this.canvases[0].getCtx();
+      ctx.beginPath();
+      action(ctx);
+      ctx[type]();
+      ctx.closePath();
+    },
+    
+    createLabelContainer: function(type, idLabel, dim) {
+      var NS = 'http://www.w3.org/2000/svg';
+      if(type == 'HTML' || type == 'Native') {
+        return $E('div', {
+          'id': idLabel,
+          'style': {
+            'overflow': 'visible',
+            'position': 'absolute',
+            'top': 0,
+            'left': 0,
+            'width': dim.width + 'px',
+            'height': 0
+          }
+        });
+      } else if(type == 'SVG') {
+        var svgContainer = document.createElementNS(NS, 'svg:svg');
+        svgContainer.setAttribute("width", dim.width);
+        svgContainer.setAttribute('height', dim.height);
+        var style = svgContainer.style;
+        style.position = 'absolute';
+        style.left = style.top = '0px';
+        var labelContainer = document.createElementNS(NS, 'svg:g');
+        labelContainer.setAttribute('width', dim.width);
+        labelContainer.setAttribute('height', dim.height);
+        labelContainer.setAttribute('x', 0);
+        labelContainer.setAttribute('y', 0);
+        labelContainer.setAttribute('id', idLabel);
+        svgContainer.appendChild(labelContainer);
+        return svgContainer;
+      }
+    }
+  });
+  //base canvas wrapper
+  Canvas.Base = {};
+  Canvas.Base['2D'] = new Class({
+    translateOffsetX: 0,
+    translateOffsetY: 0,
+    scaleOffsetX: 1,
+    scaleOffsetY: 1,
+
+    initialize: function(viz) {
+      this.viz = viz;
+      this.opt = viz.config;
+      this.size = false;
+      this.createCanvas();
+      this.translateToCenter();
+    },
+    createCanvas: function() {
+      var opt =

<TRUNCATED>


[30/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultWithStruct.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultWithStruct.txt b/pulse/src/main/resources/testQueryResultWithStruct.txt
new file mode 100644
index 0000000..950e439
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultWithStruct.txt
@@ -0,0 +1,1744 @@
+[ {
+  "member" : [["java.lang.String","pc68(19971)<v1>:19276"]],
+  "result" : [
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type0" ],
+                  "ID" : [ "int", 24 ],
+                  "active" : [ "boolean", true ],
+                  "pk" : [ "java.lang.String", "24" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "ORCL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 85 ],
+                              "secId" : [ "java.lang.String", "ORCL" ],
+                              "mktValue" : [ "double", 86 ],
+                              "sharesOutstanding" : [ "double", 85000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "SAP" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 86 ],
+                              "secId" : [ "java.lang.String", "SAP" ],
+                              "mktValue" : [ "double", 87 ],
+                              "sharesOutstanding" : [ "double", 86000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 84 ],
+                        "secId" : [ "java.lang.String", "APPL" ],
+                        "mktValue" : [ "double", 85 ],
+                        "sharesOutstanding" : [ "double", 84000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type0" ],
+                  "ID" : [ "int", 24 ],
+                  "active" : [ "boolean", true ],
+                  "pk" : [ "java.lang.String", "24" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "ORCL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 85 ],
+                              "secId" : [ "java.lang.String", "ORCL" ],
+                              "mktValue" : [ "double", 86 ],
+                              "sharesOutstanding" : [ "double", 85000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "SAP" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 86 ],
+                              "secId" : [ "java.lang.String", "SAP" ],
+                              "mktValue" : [ "double", 87 ],
+                              "sharesOutstanding" : [ "double", 86000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 84 ],
+                        "secId" : [ "java.lang.String", "APPL" ],
+                        "mktValue" : [ "double", 85 ],
+                        "sharesOutstanding" : [ "double", 84000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ]
+          } ],
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type0" ],
+                  "ID" : [ "int", 15 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "15" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "YHOO" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 54 ],
+                              "secId" : [ "java.lang.String", "YHOO" ],
+                              "mktValue" : [ "double", 55 ],
+                              "sharesOutstanding" : [ "double", 54000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "GOOG" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 55 ],
+                              "secId" : [ "java.lang.String", "GOOG" ],
+                              "mktValue" : [ "double", 56 ],
+                              "sharesOutstanding" : [ "double", 55000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 52 ],
+                        "secId" : [ "java.lang.String", "SUN" ],
+                        "mktValue" : [ "double", 53 ],
+                        "sharesOutstanding" : [ "double", 52000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 53 ],
+                        "secId" : [ "java.lang.String", "IBM" ],
+                        "mktValue" : [ "double", 54 ],
+                        "sharesOutstanding" : [ "double", 53000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type0" ],
+                  "ID" : [ "int", 15 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "15" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "YHOO" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 54 ],
+                              "secId" : [ "java.lang.String", "YHOO" ],
+                              "mktValue" : [ "double", 55 ],
+                              "sharesOutstanding" : [ "double", 54000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "GOOG" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 55 ],
+                              "secId" : [ "java.lang.String", "GOOG" ],
+                              "mktValue" : [ "double", 56 ],
+                              "sharesOutstanding" : [ "double", 55000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 52 ],
+                        "secId" : [ "java.lang.String", "SUN" ],
+                        "mktValue" : [ "double", 53 ],
+                        "sharesOutstanding" : [ "double", 52000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 53 ],
+                        "secId" : [ "java.lang.String", "IBM" ],
+                        "mktValue" : [ "double", 54 ],
+                        "sharesOutstanding" : [ "double", 53000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ]
+          } ],
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type1" ],
+                  "ID" : [ "int", 7 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "7" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "IBM" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 27 ],
+                              "secId" : [ "java.lang.String", "IBM" ],
+                              "mktValue" : [ "double", 28 ],
+                              "sharesOutstanding" : [ "double", 27000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "SUN" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 26 ],
+                              "secId" : [ "java.lang.String", "SUN" ],
+                              "mktValue" : [ "double", 27 ],
+                              "sharesOutstanding" : [ "double", 26000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 24 ],
+                        "secId" : [ "java.lang.String", "NOVL" ],
+                        "mktValue" : [ "double", 25 ],
+                        "sharesOutstanding" : [ "double", 24000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 25 ],
+                        "secId" : [ "java.lang.String", "HP" ],
+                        "mktValue" : [ "double", 26 ],
+                        "sharesOutstanding" : [ "double", 25000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type1" ],
+                  "ID" : [ "int", 7 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "7" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "IBM" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 27 ],
+                              "secId" : [ "java.lang.String", "IBM" ],
+                              "mktValue" : [ "double", 28 ],
+                              "sharesOutstanding" : [ "double", 27000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "SUN" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 26 ],
+                              "secId" : [ "java.lang.String", "SUN" ],
+                              "mktValue" : [ "double", 27 ],
+                              "sharesOutstanding" : [ "double", 26000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 24 ],
+                        "secId" : [ "java.lang.String", "NOVL" ],
+                        "mktValue" : [ "double", 25 ],
+                        "sharesOutstanding" : [ "double", 24000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 25 ],
+                        "secId" : [ "java.lang.String", "HP" ],
+                        "mktValue" : [ "double", 26 ],
+                        "sharesOutstanding" : [ "double", 25000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ]
+          } ],
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type2" ],
+                  "ID" : [ "int", 14 ],
+                  "active" : [ "boolean", true ],
+                  "pk" : [ "java.lang.String", "14" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "NOVL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 50 ],
+                              "secId" : [ "java.lang.String", "NOVL" ],
+                              "mktValue" : [ "double", 51 ],
+                              "sharesOutstanding" : [ "double", 50000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "HP" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 51 ],
+                              "secId" : [ "java.lang.String", "HP" ],
+                              "mktValue" : [ "double", 52 ],
+                              "sharesOutstanding" : [ "double", 51000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 49 ],
+                        "secId" : [ "java.lang.String", "RHAT" ],
+                        "mktValue" : [ "double", 50 ],
+                        "sharesOutstanding" : [ "double", 49000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type2" ],
+                  "ID" : [ "int", 14 ],
+                  "active" : [ "boolean", true ],
+                  "pk" : [ "java.lang.String", "14" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "NOVL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 50 ],
+                              "secId" : [ "java.lang.String", "NOVL" ],
+                              "mktValue" : [ "double", 51 ],
+                              "sharesOutstanding" : [ "double", 50000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "HP" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 51 ],
+                              "secId" : [ "java.lang.String", "HP" ],
+                              "mktValue" : [ "double", 52 ],
+                              "sharesOutstanding" : [ "double", 51000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 49 ],
+                        "secId" : [ "java.lang.String", "RHAT" ],
+                        "mktValue" : [ "double", 50 ],
+                        "sharesOutstanding" : [ "double", 49000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ]
+          } ],
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type1" ],
+                  "ID" : [ "int", 1 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "1" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "APPL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 6 ],
+                              "secId" : [ "java.lang.String", "APPL" ],
+                              "mktValue" : [ "double", 7 ],
+                              "sharesOutstanding" : [ "double", 6000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "AOL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 5 ],
+                              "secId" : [ "java.lang.String", "AOL" ],
+                              "mktValue" : [ "double", 6 ],
+                              "sharesOutstanding" : [ "double", 5000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 3 ],
+                        "secId" : [ "java.lang.String", "GOOG" ],
+                        "mktValue" : [ "double", 4 ],
+                        "sharesOutstanding" : [ "double", 3000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 4 ],
+                        "secId" : [ "java.lang.String", "MSFT" ],
+                        "mktValue" : [ "double", 5 ],
+                        "sharesOutstanding" : [ "double", 4000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type1" ],
+                  "ID" : [ "int", 1 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "1" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "APPL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 6 ],
+                              "secId" : [ "java.lang.String", "APPL" ],
+                              "mktValue" : [ "double", 7 ],
+                              "sharesOutstanding" : [ "double", 6000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "AOL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 5 ],
+                              "secId" : [ "java.lang.String", "AOL" ],
+                              "mktValue" : [ "double", 6 ],
+                              "sharesOutstanding" : [ "double", 5000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 3 ],
+                        "secId" : [ "java.lang.String", "GOOG" ],
+                        "mktValue" : [ "double", 4 ],
+                        "sharesOutstanding" : [ "double", 3000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 4 ],
+                        "secId" : [ "java.lang.String", "MSFT" ],
+                        "mktValue" : [ "double", 5 ],
+                        "sharesOutstanding" : [ "double", 4000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ]
+          } ],
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type0" ],
+                  "ID" : [ "int", 21 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "21" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "NOVL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 76 ],
+                              "secId" : [ "java.lang.String", "NOVL" ],
+                              "mktValue" : [ "double", 77 ],
+                              "sharesOutstanding" : [ "double", 76000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "RHAT" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 75 ],
+                              "secId" : [ "java.lang.String", "RHAT" ],
+                              "mktValue" : [ "double", 76 ],
+                              "sharesOutstanding" : [ "double", 75000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 73 ],
+                        "secId" : [ "java.lang.String", "SAP" ],
+                        "mktValue" : [ "double", 74 ],
+                        "sharesOutstanding" : [ "double", 73000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 74 ],
+                        "secId" : [ "java.lang.String", "DELL" ],
+                        "mktValue" : [ "double", 75 ],
+                        "sharesOutstanding" : [ "double", 74000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type0" ],
+                  "ID" : [ "int", 21 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "21" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "NOVL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 76 ],
+                              "secId" : [ "java.lang.String", "NOVL" ],
+                              "mktValue" : [ "double", 77 ],
+                              "sharesOutstanding" : [ "double", 76000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "RHAT" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 75 ],
+                              "secId" : [ "java.lang.String", "RHAT" ],
+                              "mktValue" : [ "double", 76 ],
+                              "sharesOutstanding" : [ "double", 75000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 73 ],
+                        "secId" : [ "java.lang.String", "SAP" ],
+                        "mktValue" : [ "double", 74 ],
+                        "sharesOutstanding" : [ "double", 73000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 74 ],
+                        "secId" : [ "java.lang.String", "DELL" ],
+                        "mktValue" : [ "double", 75 ],
+                        "sharesOutstanding" : [ "double", 74000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ]
+          } ],
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type1" ],
+                  "ID" : [ "int", 10 ],
+                  "active" : [ "boolean", true ],
+                  "pk" : [ "java.lang.String", "10" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "NOVL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 37 ],
+                              "secId" : [ "java.lang.String", "NOVL" ],
+                              "mktValue" : [ "double", 38 ],
+                              "sharesOutstanding" : [ "double", 37000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "RHAT" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 36 ],
+                              "secId" : [ "java.lang.String", "RHAT" ],
+                              "mktValue" : [ "double", 37 ],
+                              "sharesOutstanding" : [ "double", 36000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 35 ],
+                        "secId" : [ "java.lang.String", "DELL" ],
+                        "mktValue" : [ "double", 36 ],
+                        "sharesOutstanding" : [ "double", 35000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type1" ],
+                  "ID" : [ "int", 10 ],
+                  "active" : [ "boolean", true ],
+                  "pk" : [ "java.lang.String", "10" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "NOVL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 37 ],
+                              "secId" : [ "java.lang.String", "NOVL" ],
+                              "mktValue" : [ "double", 38 ],
+                              "sharesOutstanding" : [ "double", 37000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "RHAT" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 36 ],
+                              "secId" : [ "java.lang.String", "RHAT" ],
+                              "mktValue" : [ "double", 37 ],
+                              "sharesOutstanding" : [ "double", 36000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 35 ],
+                        "secId" : [ "java.lang.String", "DELL" ],
+                        "mktValue" : [ "double", 36 ],
+                        "sharesOutstanding" : [ "double", 35000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ]
+          } ],
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type1" ],
+                  "ID" : [ "int", 4 ],
+                  "active" : [ "boolean", true ],
+                  "pk" : [ "java.lang.String", "4" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "YHOO" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 15 ],
+                              "secId" : [ "java.lang.String", "YHOO" ],
+                              "mktValue" : [ "double", 16 ],
+                              "sharesOutstanding" : [ "double", 15000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "GOOG" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 16 ],
+                              "secId" : [ "java.lang.String", "GOOG" ],
+                              "mktValue" : [ "double", 17 ],
+                              "sharesOutstanding" : [ "double", 16000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 14 ],
+                        "secId" : [ "java.lang.String", "IBM" ],
+                        "mktValue" : [ "double", 15 ],
+                        "sharesOutstanding" : [ "double", 14000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type1" ],
+                  "ID" : [ "int", 4 ],
+                  "active" : [ "boolean", true ],
+                  "pk" : [ "java.lang.String", "4" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "YHOO" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 15 ],
+                              "secId" : [ "java.lang.String", "YHOO" ],
+                              "mktValue" : [ "double", 16 ],
+                              "sharesOutstanding" : [ "double", 15000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "GOOG" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 16 ],
+                              "secId" : [ "java.lang.String", "GOOG" ],
+                              "mktValue" : [ "double", 17 ],
+                              "sharesOutstanding" : [ "double", 16000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 14 ],
+                        "secId" : [ "java.lang.String", "IBM" ],
+                        "mktValue" : [ "double", 15 ],
+                        "sharesOutstanding" : [ "double", 14000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ]
+          } ],
+      [
+          "com.gemstone.gemfire.cache.query.types.StructType",
+          {
+            "r1" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type0" ],
+                  "ID" : [ "int", 27 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "27" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "APPL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 97 ],
+                              "secId" : [ "java.lang.String", "APPL" ],
+                              "mktValue" : [ "double", 98 ],
+                              "sharesOutstanding" : [ "double", 97000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "AOL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 96 ],
+                              "secId" : [ "java.lang.String", "AOL" ],
+                              "mktValue" : [ "double", 97 ],
+                              "sharesOutstanding" : [ "double", 96000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 94 ],
+                        "secId" : [ "java.lang.String", "GOOG" ],
+                        "mktValue" : [ "double", 95 ],
+                        "sharesOutstanding" : [ "double", 94000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 95 ],
+                        "secId" : [ "java.lang.String", "MSFT" ],
+                        "mktValue" : [ "double", 96 ],
+                        "sharesOutstanding" : [ "double", 95000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "floatMinValue" : [ "float", 1.4E-45 ],
+                  "longMinValue" : [ "float", -9.223372E18 ],
+                  "doubleMinValue" : [ "double", 4.9E-324 ]
+                } ],
+            "r2" : [
+                "com.gemstone.gemfire.cache.query.data.Portfolio",
+                {
+                  "type" : [ "java.lang.String", "type0" ],
+                  "ID" : [ "int", 27 ],
+                  "active" : [ "boolean", false ],
+                  "pk" : [ "java.lang.String", "27" ],
+                  "collectionHolderMap" : [
+                      "java.util.HashMap",
+                      {
+                        "3" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "2" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "1" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ],
+                        "0" : [
+                            "com.gemstone.gemfire.cache.query.data.CollectionHolder",
+                            {
+                              "arr" : [
+                                  "java.lang.String[]",
+                                  [ "0", "1", "2", "3", "4", "SUN", "IBM",
+                                      "YHOO", "GOOG", "MSFT" ] ]
+                            } ]
+                      } ],
+                  "createTime" : [ "long", 0 ],
+                  "positions" : [
+                      "java.util.HashMap",
+                      {
+                        "APPL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 97 ],
+                              "secId" : [ "java.lang.String", "APPL" ],
+                              "mktValue" : [ "double", 98 ],
+                              "sharesOutstanding" : [ "double", 97000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ],
+                        "AOL" : [
+                            "com.gemstone.gemfire.cache.query.data.Position",
+                            {
+                              "id" : [ "int", 96 ],
+                              "secId" : [ "java.lang.String", "AOL" ],
+                              "mktValue" : [ "double", 97 ],
+                              "sharesOutstanding" : [ "double", 96000 ],
+                              "col" : [
+                                  "java.util.HashSet",
+                                  [ [ "java.lang.String", "1" ],
+                                      [ "java.lang.String", "0" ] ] ]
+                            } ]
+                      } ],
+                  "p1" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 94 ],
+                        "secId" : [ "java.lang.String", "GOOG" ],
+                        "mktValue" : [ "double", 95 ],
+                        "sharesOutstanding" : [ "double", 94000 ],
+                        "col" : [
+                            "java.util.HashSet",
+                            [ [ "java.lang.String", "1" ],
+                                [ "java.lang.String", "0" ] ] ]
+                      } ],
+                  "p2" : [
+                      "com.gemstone.gemfire.cache.query.data.Position",
+                      {
+                        "id" : [ "int", 95 ],
+                        "secId" : [ "j

<TRUNCATED>

[06/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/clusterRGraphMembers.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/clusterRGraphMembers.js b/pulse/src/main/webapp/scripts/pulsescript/clusterRGraphMembers.js
new file mode 100644
index 0000000..0289fd6
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/clusterRGraphMembers.js
@@ -0,0 +1,1504 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+var vMode = document.documentMode; // variable used for storing IE document
+// mode
+
+// start: flags used for checking whether the r-graph icon images already loaded
+// or not
+var hostNormalFlag = false;
+var hostSevereFlag = false;
+var hostErrorFlag = false;
+var hostWarningFlag = false;
+var memberLocatorManagerServerErrorFlag = false;
+var memberLocatorServerErrorFlag = false;
+var memberLocatorManagerErrorFlag = false;
+var memberLocatorNormalFlag = false;
+var memberLocatorSevereFlag = false;
+var memberLocatorErrorFlag = false;
+var memberServerSevereFlag = false;
+var memberManagerSevereFlag = false;
+var memberLocatorManagerSevereFlag = false;
+var memberLocatorManagerServerSevereFlag = false;
+var memberManagerServerSevereFlag = false;
+var memberLocatorServerSevereFlag = false;
+var memberServerErrorFlag = false;
+var memberManagerServerErrorFlag = false;
+var memberManagerErrorFlag = false;
+var memberLocatorManagerServerWarningFlag = false;
+var memberLocatorServerWarningFlag = false;
+var memberLocatorManagerWarningFlag = false;
+var memberLocatorWarningFlag = false;
+var memberManagerServerWarningFlag = false;
+var memberServerWarningFlag = false;
+var memberManagerWarningFlag = false;
+var memberLocatorManagerServerNormalFlag = false;
+var memberLocatorServerNormalFlag = false;
+var memberLocatorManagerNormalFlag = false;
+var memberManagerServerNormalFlag = false;
+var memberServerNormalFlag = false;
+var memberManagerNormalFlag = false;
+var memberNormalFlag = false;
+var memberSevereFlag = false;
+var memberErrorFlag = false;
+var memberWarningFlag = false;
+// end: flags used for checking whether the r-graph icon images already loaded
+// or not
+
+// function used for refreshing R Graph nodes color based on Alerts
+function refreshNodeAccAlerts() {
+  clusteRGraph.graph.eachNode(function(node) {
+
+    if (node._depth == 2) {
+      node.setData('cursor', 'pointer');
+    }
+    if (node._depth == 1) {
+      var expandedNode = false;
+      for ( var i = 0; i < expanededNodIds.length; i++) {
+        if (expanededNodIds[i] == node.id) {
+          expandedNode = true;
+          break;
+        }
+      }
+
+      if (!expandedNode) {
+
+        clusteRGraph.op.contract(node, {
+          type : 'animate',
+          duration : 1,
+          transition : $jit.Trans.linear
+        });
+
+        node.eachSubnode(function(childNode) {
+          childNode.setData('type', 'circle');
+          childNode.setData('dim', 1);
+        });
+      } else {
+        clusteRGraph.op.expand(node, {
+          type : 'animate',
+          duration : 1,
+          transition : $jit.Trans.linear
+        });
+
+        node.eachSubnode(function(childNode) {
+          var edge = clusteRGraph.graph.getAdjacence(childNode.id, node.id);
+          edge.setData('color', '#081628');
+          var data = childNode.data;
+          childNode.setData('type', data.nodeType);
+          childNode.setData('dim', 14);
+          var style = childNode.getData('style');
+          style.cursor = 'pointer';
+          style.fontSize = "2em";
+          style.width = 25 + 'px';
+          style.height = 27 + 'px';
+          childNode.setData('cursor', 'pointer');
+        });
+      }
+    }
+  });
+}
+
+// function used for defining custom nodes for R-Graph
+function customNodesDefination() {
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'hostNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 1) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!hostNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+              hostNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 1) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'hostSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 1) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!hostSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+              hostSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 1) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'hostErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 1) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!hostErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+              hostErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 1) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'hostWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 1) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!hostWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+              hostWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 1) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal-locators.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error-locators.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe-locators.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorManagerServerSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorManagerServerSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorManagerServerSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe-manager-locator-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorServerSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorServerSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorServerSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe-locators-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorManagerSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorManagerSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorManagerSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe-manager-locator.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberManagerSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberManagerSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberManagerSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe-managers.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberManagerServerSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberManagerServerSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberManagerServerSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe-managers-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberServerSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberServerSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberServerSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorManagerServerErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorManagerServerErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorManagerServerErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error-manager-locator-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorServerErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorServerErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorServerErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error-locators-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorManagerErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorManagerErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorManagerErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error-manager-locator.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberManagerServerErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberManagerServerErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberManagerServerErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error-managers-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberServerErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberServerErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberServerErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberManagerErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberManagerErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberManagerErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error-managers.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorManagerServerWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorManagerServerWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorManagerServerWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning-manager-locator-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorServerWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorServerWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorServerWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning-locators-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorManagerWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorManagerWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorManagerWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning-manager-locator.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning-locators.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberManagerServerWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberManagerServerWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberManagerServerWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning-managers-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberServerWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberServerWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberServerWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberManagerWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberManagerWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberManagerWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning-managers.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorManagerServerNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorManagerServerNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorManagerServerNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal-manager-locator-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorServerNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorServerNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorServerNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal-locators-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberLocatorManagerNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberLocatorManagerNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberLocatorManagerNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal-manager-locator.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberManagerServerNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberManagerServerNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberManagerServerNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal-managers-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberServerNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberServerNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberServerNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal-others.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberManagerNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberManagerNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberManagerNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal-managers.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberNormalNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberNormalFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberNormalFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/normal-otheruser.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberSevereNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberSevereFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberSevereFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/severe-otheruser.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberErrorNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberErrorFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberErrorFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/error-otheruser.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+  $jit.RGraph.Plot.NodeTypes.implement({
+    'memberWarningNode' : {
+      'render' : function(node, canvas) {
+        if (node._depth == 2) {
+          var ctx = canvas.getCtx();
+          var img = new Image();
+          var pos = node.pos.getc(true);
+
+          if (!memberWarningFlag) {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 13, pos.y - 13);
+              memberWarningFlag = true;
+            };
+          } else {
+            img.onload = function() {
+              ctx.drawImage(img, pos.x - 10, pos.y - 10);
+            };
+          }
+          img.src = 'images/warning-otheruser.png';
+        }
+      },
+      'contains' : function(node, pos) {
+        if (node._depth == 2) {
+          var npos = node.pos.getc(true), dim = node.getData('dim');
+          return this.nodeHelper.square.contains(npos, pos, dim);
+        }
+      }
+    }
+  });
+}
+// function used for creating empty Cluster Member R Graph
+function createClusteRGraph() {
+  customNodesDefination();
+  var nodeParameters = {};
+  var edgeParameters = {};
+
+  if (vMode == 8) // check for IE 8 document mode
+  {
+    nodeParameters = {
+      color : '#ddeeff',
+      cursor : 'default'
+    };
+
+    edgeParameters = {
+      color : '#081628',
+      lineWidth : 1.5
+    };
+  } else {
+    nodeParameters = {
+      overridable : true,
+      collapsed : true,
+      type : 'hostNormalNode',
+      dim : 12,
+      cursor : 'pointer'
+    };
+    edgeParameters = {
+      overridable : 'true',
+      color : '#132634',
+      lineWidth : 1.5
+    };
+  }
+
+  clusteRGraph = new $jit.RGraph({
+    injectInto : 'infovis',
+
+    background : {
+      CanvasStyles : {
+        strokeStyle : '#081628'
+      }
+    },
+    Navigation : {
+      enable : false,
+      panning : false
+    },
+    label : {
+      type : 'Native',
+      size : 10
+    },
+    Node : nodeParameters,
+
+    Tips : {
+      enable : true,
+      offsetX : 5,
+      offsetY : 5,
+      type : 'Native',
+
+      onShow : function(tip, node, isLeaf, domElement) {
+        var html = "";
+        var data = node.data;
+
+        if (node._depth == 1) {
+
+          html = "<div class=\"tip-title\"><div><div class='popupHeading'>"
+              + node.name + "</div>" + "<div class='popupFirstRow'>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>CPU Usage</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.cpuUsage
+              + "<span class='fontSize15'>%</span></span>"
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>Memory Usage</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.memoryUsage
+              + "<span class='font-size15 paddingL5'>MB</span>"
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>Load Avg.</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + applyNotApplicableCheck(data.loadAvg)
+              + "</div></div></div>"
+              /*+ "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>Threads</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>"
+              + data.threads
+              + "</div></div></div>"*/
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>Sockets</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + applyNotApplicableCheck(data.sockets)
+              + "</div></div></div>" + "</div></div></div>";
+
+        } else if (node._depth == 2) {
+          var clients = 0;
+          if (data.clients)
+            clients = data.clients;
+
+          html = "<div class=\"tip-title\"><div><div class='popupHeading'>"
+              + node.name + "</div>" + "<div class='popupFirstRow'>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>CPU Usage</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.cpuUsage
+              + "<span class='fontSize14'>%</span></span>"
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>Threads</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.numThreads
+              + "<span class='fontSize14'></span></span>"
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>JVM Pauses</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.gcPauses
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>"
+              + jQuery.i18n.prop('pulse-regiontabletooltip-custom') + "</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.regions
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>Clients</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + clients
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>Gateway Sender</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.gatewaySender
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>Port</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.port
+              + "</div></div></div>"
+              + "<div class='popupRowBorder borderBottomZero'>"
+              + "<div class='labeltext left display-block width-70'>"
+              + "<span class='left'>GemFire Version</span>"
+              + "</div><div class='right width-30'>"
+              + "<div class='color-d2d5d7 font-size14'>" + data.gemfireVersion
+              + "</div></div></div>" + "</div></div></div>";
+        }
+        tip.innerHTML = html;
+      }
+    },
+    Edge : edgeParameters,
+    Events : {
+      enable : true,
+      type : 'Native',
+
+      onClick : function(node, eventInfo, e) {
+        if (!node)
+          return;
+
+        if (node.nodeFrom) {
+          // it's an edge
+        } else {
+          if (node._depth == 2)
+            location.href = 'MemberDetails.html?member=' + node.id
+                + '&memberName=' + node.name;
+        }
+      }
+    },
+    onCreateLabel : function(domElement, node) {
+      domElement.innerHTML = node.name;
+      domElement.onclick = function() {
+        clusteRGraph.onClick(node.id, {
+          onComplete : function() {
+            if (vMode != 8) {
+              if (node._depth == 1) {
+                var nodeExist = false;
+                for ( var i = 0; i < expanededNodIds.length; i++) {
+                  if (expanededNodIds[i] == node.id) {
+                    expanededNodIds.splice(i, 1);
+                    clusteRGraph.op.contract(node, {
+                      type : 'animate',
+                      duration : 1,
+                      transition : $jit.Trans.linear
+                    });
+                    node.eachSubnode(function(childNode) {
+                      childNode.setData('type', 'circle');
+                      childNode.setData('dim', 1);
+                    });
+                    nodeExist = true;
+                    break;
+                  }
+                }
+                if (!nodeExist) {
+
+                  expanededNodIds[expanededNodIds.length] = node.id;
+                  clusteRGraph.op.expand(node, {
+                    type : 'animate',
+                    duration : 1,
+                    transition : $jit.Trans.linear
+                  });
+                  node.eachSubnode(function(childNode) {
+                    var edge = clusteRGraph.graph.getAdjacence(childNode.id,
+                        node.id);
+                    edge.setData('color', '#081628');
+                    var data = childNode.data;
+                    childNode.setData('type', data.nodeType);
+                    childNode.setData('dim', 14);
+                  });
+                }
+              } else {
+                location.href = 'MemberDetails.html?member=' + node.id
+                    + '&memberName=' + node.name;
+              }
+            } else {
+              if (node._depth == 2) {
+                location.href = 'MemberDetails.html?member=' + node.id
+                    + '&memberName=' + node.name;
+              }
+            }
+          }
+        });
+      };
+    },
+
+    onPlaceLabel : function(domElement, node) {
+      if (vMode != 8) {
+        var style = domElement.style;
+        style.cursor = 'pointer';
+        if (node._depth == 2) {
+          style.fontSize = "2em";
+          style.width = 25 + 'px';
+          style.height = 27 + 'px';
+          style.opacity = "0";
+          style.filter = "alpha(opacity=0)"; // for IE need to check
+          var left = parseInt(style.left);
+          var w = domElement.offsetWidth;
+          style.left = (left - w / 2) + 5 + 'px';
+          var top = parseInt(style.top);
+          var t = top - 12;
+          style.top = t + 'px';
+        }
+
+        if (node._depth == 1) {
+          style.fontSize = "2em";
+          style.width = 25 + 'px';
+          style.height = 27 + 'px';
+          style.opacity = "0";
+          style.filter = "alpha(opacity=0)"; // for IE need to check
+          var pars = node.getParents();
+          if (clusteRGraph.graph.getAdjacence(node.id, pars[0].id) != null) {
+            var edge = clusteRGraph.graph.getAdjacence(node.id, pars[0].id);
+            edge.setData('color', '#132634');
+          }
+          var left = parseInt(style.left);
+          var w = domElement.offsetWidth;
+          style.left = (left - w / 2) + 'px';
+          var top = parseInt(style.top);
+          var t = top - 10;
+          style.top = t + 'px';
+        }
+
+        if (node._depth == 0) {
+          style.display = 'none';
+          node.setData('dim', 0);
+        }
+      } else {
+        var style = domElement.style;
+        style.display = '';
+        style.cursor = 'default';
+
+        if (node._depth == 1) {
+          style.fontSize = "0.8em";
+          style.color = "#ccc";
+
+        } else if (node._depth == 2) {
+          style.fontSize = "0.7em";
+          style.color = "#494949";
+
+        } else {
+          style.display = 'none';
+        }
+
+        var left = parseInt(style.left);
+        var w = domElement.offsetWidth;
+        style.left = (left - w / 2) + 'px';
+      }
+
+    }
+  });
+}
+// updating rGraph custom node flag to default false value
+function updateRGraphFlags() {
+
+  hostNormalFlag = false;
+  hostSevereFlag = false;
+  hostErrorFlag = false;
+  hostWarningFlag = false;
+  memberLocatorManagerServerErrorFlag = false;
+  memberLocatorServerErrorFlag = false;
+  memberLocatorManagerErrorFlag = false;
+  memberLocatorNormalFlag = false;
+  memberLocatorSevereFlag = false;
+  memberLocatorErrorFlag = false;
+  memberServerSevereFlag = false;
+  memberManagerSevereFlag = false;
+  memberLocatorManagerSevereFlag = false;
+  memberLocatorManagerServerSevereFlag = false;
+  memberManagerServerSevereFlag = false;
+  memberLocatorServerSevereFlag = false;
+  memberServerErrorFlag = false;
+  memberManagerServerErrorFlag = false;
+  memberManagerErrorFlag = false;
+  memberLocatorManagerServerWarningFlag = false;
+  memberLocatorServerWarningFlag = false;
+  memberLocatorManagerWarningFlag = false;
+  memberLocatorWarningFlag = false;
+  memberManagerServerWarningFlag = false;
+  memberServerWarningFlag = false;
+  memberManagerWarningFlag = false;
+  memberLocatorManagerServerNormalFlag = false;
+  memberLocatorServerNormalFlag = false;
+  memberLocatorManagerNormalFlag = false;
+  memberManagerServerNormalFlag = false;
+  memberServerNormalFlag = false;
+  memberManagerNormalFlag = false;
+  memberNormalFlag = false;
+  memberSevereFlag = false;
+  memberErrorFlag = false;
+  memberWarningFlag = false;
+  eval(functionStartArray[4]);
+}


[75/79] incubator-geode git commit: Integrated Security Related Changes for Pulse ReviewBoard Request : https://reviews.apache.org/r/39646/

Posted by tu...@apache.org.
Integrated Security Related Changes for Pulse
ReviewBoard Request : https://reviews.apache.org/r/39646/


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/813d24c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/813d24c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/813d24c2

Branch: refs/heads/feature/GEODE-17
Commit: 813d24c2b317f56c58c43f7c13e07b638e4e7f25
Parents: 3f931ba
Author: tushark <tu...@apache.org>
Authored: Tue Oct 27 12:44:02 2015 +0530
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:54:35 2015 +0530

----------------------------------------------------------------------
 .../tools/pulse/internal/PulseAppListener.java  |  54 +++++-
 .../internal/controllers/PulseController.java   |  14 +-
 .../tools/pulse/internal/data/Cluster.java      |  15 ++
 .../pulse/internal/data/JMXDataUpdater.java     | 186 +++++++++++--------
 .../pulse/internal/data/PulseConstants.java     |  17 ++
 .../tools/pulse/internal/data/Repository.java   |  11 ++
 .../security/GemFireAuthentication.java         | 142 ++++++++++++++
 .../security/GemFireAuthenticationProvider.java |  68 +++++++
 .../pulse/internal/security/LogoutHandler.java  |  39 ++++
 pulse/src/main/resources/pulse.properties       |  16 +-
 .../src/main/webapp/WEB-INF/spring-security.xml |  59 ++++--
 11 files changed, 509 insertions(+), 112 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java
index a063a32..16db34d 100644
--- a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java
@@ -20,15 +20,20 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.ResourceBundle;
 import java.util.Set;
-import java.util.Map.Entry;
 import java.util.logging.Level;
 
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
 import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
 import com.vmware.gemfire.tools.pulse.internal.data.PulseConfig;
 import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
@@ -64,6 +69,11 @@ public class PulseAppListener implements ServletContextListener {
   
   private boolean sysPulseUseSSLLocator;
   private boolean sysPulseUseSSLManager;
+  
+  //This property determines if pulse webApp login is authenticated against
+  //GemFire integrated security or custom spring-security config provided 
+  //in pulse-authentication-custom.xml 
+  private boolean useGemFireCredentials;
 
   @Override
   public void contextDestroyed(ServletContextEvent event) {
@@ -80,7 +90,7 @@ public class PulseAppListener implements ServletContextListener {
 
   @Override
   public void contextInitialized(ServletContextEvent event) {
-
+    
     messagesToBeLogged = messagesToBeLogged
         .concat(formatLogString(resourceBundle
             .getString("LOG_MSG_CONTEXT_INITIALIZED")));
@@ -179,10 +189,11 @@ public class PulseAppListener implements ServletContextListener {
       loadJMXUserDetails();
       // Load locator and/or manager details
       loadLocatorManagerDetails();
-
+       
+      useGemFireCredentials = areWeUsingGemFireSecurityProfile(event); 
     }
-
-    // Set user details in repository
+    
+    // Set user details in repository    
     repository.setJmxUserName(jmxUserName);
     repository.setJmxUserPassword(jmxUserPassword);
 
@@ -195,7 +206,40 @@ public class PulseAppListener implements ServletContextListener {
     initializeSSL();
     repository.setUseSSLLocator(sysPulseUseSSLLocator);
     repository.setUseSSLManager(sysPulseUseSSLManager);
+    
+    repository.setUseGemFireCredentials(useGemFireCredentials);
+
+  }
 
+  /**
+   * Return true if pulse is configure to authenticate using gemfire
+   * integrated security
+   * 
+   * @param event
+   * @return
+   */
+  private boolean areWeUsingGemFireSecurityProfile(ServletContextEvent event) {
+    String profile = null;
+    WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(event.getServletContext());
+    if (ctx.getEnvironment() != null) {
+      String[] profiles = ctx.getEnvironment().getActiveProfiles();
+      if (profiles != null && profiles.length > 0) {
+        StringBuilder sb = new StringBuilder();
+        for (String p : profiles)
+          sb.append(p).append(",");
+        LOGGER.info("#SpringProfilesConfigured : " + sb.toString());
+        profile = ctx.getEnvironment().getActiveProfiles()[0];
+        LOGGER.info("#First Profile : " + profile);
+      } else {
+        LOGGER.info("No SpringProfileConfigured using default spring profile");
+        return false;
+      }
+    }
+    if (PulseConstants.APPLICATION_PROPERTY_PULSE_SEC_PROFILE_GEMFIRE.equals(profile)) {
+      LOGGER.info("Using gemfire integrated security profile");
+      return true;
+    }      
+    return false;
   }
 
   // Function to load pulse version details from properties file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java
index 22a9805..8f51099 100644
--- a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/PulseController.java
@@ -22,6 +22,7 @@ import javax.servlet.http.HttpSession;
 
 import org.apache.commons.lang.StringEscapeUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -34,6 +35,7 @@ import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
 import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.security.GemFireAuthentication;
 import com.vmware.gemfire.tools.pulse.internal.service.PulseService;
 import com.vmware.gemfire.tools.pulse.internal.service.PulseServiceFactory;
 import com.vmware.gemfire.tools.pulse.internal.service.SystemAlertsService;
@@ -150,17 +152,25 @@ public class PulseController {
     }
   }
 
+  /* Not used replaced by SpringSecurity Logout tag with LogoutHandler
   @RequestMapping(value = "/clusterLogout", method = RequestMethod.GET)
   public void clusterLogout(HttpServletRequest request,
       HttpServletResponse response) throws IOException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();   
+    LOGGER.info("Inside #clusterLogout...");    
+    if(Repository.get().isUseGemFireCredentials()) {      
+      GemFireAuthentication authentication = (GemFireAuthentication) SecurityContextHolder.getContext()
+          .getAuthentication();
+      authentication.getJmxc().close();
+      LOGGER.info("Closing GemFireAuthentication JMX Connection...");
+    }
     HttpSession session = request.getSession(false);
     if (session != null) {
-
       // End session and redirect
       session.invalidate();
     }
     response.sendRedirect("../Login.html");
-  }
+  }*/
 
   @RequestMapping(value = "/pulseVersion", method = RequestMethod.GET)
   public void pulseVersion(HttpServletRequest request,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
index d79438b..edf34d4 100644
--- a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
@@ -37,6 +37,8 @@ import java.util.TimeZone;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import javax.management.remote.JMXConnector;
+
 import org.apache.commons.collections.buffer.CircularFifoBuffer;
 
 import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
@@ -2351,6 +2353,11 @@ public class Cluster extends Thread {
         if (LOGGER.infoEnabled()) {
           LOGGER.info("Exception Occured while updating cluster data : " + e.getMessage());
         }
+        
+        if (LOGGER.fineEnabled()) {
+          LOGGER.fine("Exception Occured while updating cluster data : ",e);          
+        }
+        
       }
 
       try {
@@ -2864,6 +2871,14 @@ public class Cluster extends Thread {
   public boolean deleteQueryById(String userId, String queryId) {
     return this.getDataBrowser().deleteQueryById(userId, queryId);
   }
+  
+  public JMXConnector connectToGemFire(String user, String password) {
+    if(this.updater instanceof JMXDataUpdater) {
+      return ((JMXDataUpdater) this.updater).getJMXConnection(user, password, false);
+    } else {
+      return null;
+    }
+  }
 
   /**
    * inner class for creating Mock Data

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
index 27aed67..6d7c8d5 100644
--- a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JMXDataUpdater.java
@@ -49,11 +49,14 @@ import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
 
+import org.springframework.security.core.context.SecurityContextHolder;
+
 import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
 import com.vmware.gemfire.tools.pulse.internal.data.JmxManagerFinder.JmxManagerInfo;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
 import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
 import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.security.GemFireAuthentication;
 import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
 
 /**
@@ -133,57 +136,92 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
     }
 
   }
+  
+  private JmxManagerInfo getManagerInfoFromLocator(Repository repository) {
 
-  private JMXConnector getJMXConnection() {
-    JMXConnector connection = null;
-    // Reference to repository
-    Repository repository = Repository.get();
     try {
-
-      String jmxSerURL = "";
+      String locatorHost = repository.getJmxHost();
+      int locatorPort = Integer.parseInt(repository.getJmxPort());
 
       if (LOGGER.infoEnabled()) {
-        LOGGER.info(resourceBundle.getString("LOG_MSG_USE_LOCATOR_VALUE") + ":"
-            + repository.getJmxUseLocator());
+        LOGGER.info(resourceBundle.getString("LOG_MSG_HOST") + " : " + locatorHost + " & "
+            + resourceBundle.getString("LOG_MSG_PORT") + " : " + locatorPort);
       }
 
-      if (repository.getJmxUseLocator()) {
+      InetAddress inetAddr = InetAddress.getByName(locatorHost);
+
+      if ((inetAddr instanceof Inet4Address) || (inetAddr instanceof Inet6Address)) {
 
-        String locatorHost = repository.getJmxHost();
-        int locatorPort = Integer.parseInt(repository.getJmxPort());
+        if (inetAddr instanceof Inet4Address) {
+          if (LOGGER.infoEnabled()) {
+            LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_IPV4_ADDRESS") + " - " + inetAddr.toString());
+          }
+        } else {
+          if (LOGGER.infoEnabled()) {
+            LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_IPV6_ADDRESS") + " - " + inetAddr.toString());
+          }
+        }
+
+        JmxManagerInfo jmxManagerInfo = JmxManagerFinder.askLocatorForJmxManager(inetAddr, locatorPort, 15000,
+            repository.isUseSSLLocator());
 
+        if (jmxManagerInfo.port == 0) {
+          if (LOGGER.infoEnabled()) {
+            LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_COULD_NOT_FIND_MANAGER"));
+          }
+        }
+        return jmxManagerInfo;
+      } else {
+        // Locator has Invalid locator Address
         if (LOGGER.infoEnabled()) {
-          LOGGER.info(resourceBundle.getString("LOG_MSG_HOST") + " : "
-              + locatorHost + " & " + resourceBundle.getString("LOG_MSG_PORT")
-              + " : " + locatorPort);
+          LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_BAD_ADDRESS"));
         }
+        cluster.setConnectionErrorMsg(resourceBundle.getString("LOG_MSG_JMX_CONNECTION_BAD_ADDRESS"));
+        // update message to display on UI
+        cluster.setConnectionErrorMsg(resourceBundle
+            .getString("LOG_MSG_JMX_CONNECTION_BAD_ADDRESS"));
+        return null;
+      }
+    } catch (IOException e) {
+      StringWriter swBuffer = new StringWriter();
+      PrintWriter prtWriter = new PrintWriter(swBuffer);
+      e.printStackTrace(prtWriter);
+      LOGGER.severe("Exception Details : " + swBuffer.toString() + "\n");
+    }
+    return null;
+  }
+  
+  /**
+   * Default connection is Pulse which uses configured userName and password 
+   * @return
+   */
+  public JMXConnector getJMXConnection() {
+    return getJMXConnection(this.userName, this.userPassword, true);
+  }
 
-        InetAddress inetAddr = InetAddress.getByName(locatorHost);
+  /**
+   * Get connection for given userName and password. This is used for DataBrowser
+   * queries which has to be fired using credentials provided at pulse login page
+   * 
+   * @param user jmxUser name
+   * @param password password
+   * @return
+   */
+  public JMXConnector getJMXConnection(String user, String password, final boolean registerURL) {
+    JMXConnector connection = null;
+    // Reference to repository
+    Repository repository = Repository.get();
+    try {
 
-        if ((inetAddr instanceof Inet4Address)
-            || (inetAddr instanceof Inet6Address)) {
+      String jmxSerURL = "";
 
-          if (inetAddr instanceof Inet4Address) {
-            // Locator has IPv4 Address
-            if (LOGGER.infoEnabled()) {
-              LOGGER.info(resourceBundle
-                  .getString("LOG_MSG_LOCATOR_IPV4_ADDRESS")
-                  + " - "
-                  + inetAddr.toString());
-            }
-          } else {
-            // Locator has IPv6 Address
-            if (LOGGER.infoEnabled()) {
-              LOGGER.info(resourceBundle
-                  .getString("LOG_MSG_LOCATOR_IPV6_ADDRESS")
-                  + " - "
-                  + inetAddr.toString());
-            }
-          }
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(resourceBundle.getString("LOG_MSG_USE_LOCATOR_VALUE") + ":"
+            + repository.getJmxUseLocator());
+      }
 
-          JmxManagerInfo jmxManagerInfo = JmxManagerFinder
-              .askLocatorForJmxManager(inetAddr, locatorPort, 15000,
-                  repository.isUseSSLLocator());
+      if (repository.getJmxUseLocator()) {
+        JmxManagerInfo jmxManagerInfo = getManagerInfoFromLocator(repository);
 
           if (jmxManagerInfo.port == 0) {
             if (LOGGER.infoEnabled()) {
@@ -210,28 +248,6 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
             jmxSerURL = formJMXServiceURLString(jmxManagerInfo.host,
                 String.valueOf(jmxManagerInfo.port));
           }
-
-        } /*
-           * else if (inetAddr instanceof Inet6Address) { // Locator has IPv6
-           * Address if(LOGGER.infoEnabled()){
-           * LOGGER.info(resourceBundle.getString
-           * ("LOG_MSG_LOCATOR_IPV6_ADDRESS")); } // update message to display
-           * on UI cluster.setConnectionErrorMsg(resourceBundle.getString(
-           * "LOG_MSG_JMX_CONNECTION_IPv6_ADDRESS"));
-           *
-           * }
-           */else {
-          // Locator has Invalid locator Address
-          if (LOGGER.infoEnabled()) {
-            LOGGER
-                .info(resourceBundle.getString("LOG_MSG_LOCATOR_BAD_ADDRESS"));
-          }
-          // update message to display on UI
-          cluster.setConnectionErrorMsg(resourceBundle
-              .getString("LOG_MSG_JMX_CONNECTION_BAD_ADDRESS"));
-
-        }
-
       } else {
         if (LOGGER.infoEnabled()) {
           LOGGER.info(resourceBundle.getString("LOG_MSG_HOST") + " : "
@@ -243,11 +259,8 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
 
       if (StringUtils.isNotNullNotEmptyNotWhiteSpace(jmxSerURL)) {
         JMXServiceURL url = new JMXServiceURL(jmxSerURL);
-
-        // String[] creds = {"controlRole", "R&D"};
-        String[] creds = { this.userName, this.userPassword };
+        String[] creds = { user, password };
         Map<String, Object> env = new HashMap<String, Object>();
-
         env.put(JMXConnector.CREDENTIALS, creds);
 
         if (repository.isUseSSLManager()) {
@@ -255,20 +268,19 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
           env.put("com.sun.jndi.rmi.factory.socket",
               new SslRMIClientSocketFactory());
         }
-
+        LOGGER.info("Connecting to jmxURL : " + jmxSerURL);
         connection = JMXConnectorFactory.connect(url, env);
 
         // Register Pulse URL if not already present in the JMX Manager
-        registerPulseUrlToManager(connection);
+        if(registerURL)
+          registerPulseUrlToManager(connection);
       }
     } catch (Exception e) {
       if (e instanceof UnknownHostException) {
-        // update message to display on UI
         cluster.setConnectionErrorMsg(resourceBundle
             .getString("LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST"));
       }
 
-      // write errors
       StringWriter swBuffer = new StringWriter();
       PrintWriter prtWriter = new PrintWriter(swBuffer);
       e.printStackTrace(prtWriter);
@@ -283,7 +295,6 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         this.conn = null;
       }
     }
-
     return connection;
   }
 
@@ -2257,7 +2268,12 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
           .getKeyProperty(PulseConstants.MBEAN_KEY_PROPERTY_MEMBER);
 
       Cluster.Member member = cluster.getMembersHMap().get(memberName);
-
+      
+      //Following attributes are not present in 9.0
+      //"Members"
+      //"EmptyNodes"
+      //"SystemRegionEntryCount"
+      //"MemberCount"
       AttributeList attributeList = this.mbs.getAttributes(mbeanName,
           PulseConstants.REGION_MBEAN_ATTRIBUTES);
 
@@ -2453,16 +2469,33 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
   @Override
   public JSONObject executeQuery(String queryText, String members, int limit)
       throws JSONException {
+    JSONObject queryResult = new JSONObject();     
+    MBeanServerConnection mbs = this.mbs;
+    Set<ObjectName> systemMBeans = this.systemMBeans;
+    
+    boolean useUserConnection = Repository.get().isUseGemFireCredentials();
+    if(useUserConnection) {      
+      GemFireAuthentication authentication = (GemFireAuthentication) SecurityContextHolder.getContext()
+          .getAuthentication();
+      JMXConnector conn = authentication.getJmxc();
+      try {
+        mbs = conn.getMBeanServerConnection();
+        systemMBeans = mbs.queryNames(this.MBEAN_OBJECT_NAME_SYSTEM_DISTRIBUTED, null);
+      } catch (IOException e) {        
+        throw new RuntimeException(e);
+      }
+      LOGGER.fine("#executeQuery : Using GemFireAuthentication connection for query");
+    } else {
+      LOGGER.fine("#executeQuery : Using Global connection for query");
+    }
 
-    JSONObject queryResult = new JSONObject();
-
-    if (this.mbs != null && this.systemMBeans != null) {
+    if (mbs != null && systemMBeans != null) {
 
       Object opParams[] = { queryText, members, limit };
 
-      for (ObjectName sysMBean : this.systemMBeans) {
+      for (ObjectName sysMBean : systemMBeans) {
         try {
-          String resultString = (String) (this.mbs.invoke(sysMBean,
+          String resultString = (String) (mbs.invoke(sysMBean,
               PulseConstants.MBEAN_OPERATION_QUERYDATABROWSER, opParams,
               this.opSignature));
 
@@ -2478,7 +2511,10 @@ public class JMXDataUpdater implements IClusterUpdater, NotificationListener {
         }
       }
     }
-
+    
+    if(useUserConnection) {
+      //TODO : close connection??
+    }
     return queryResult;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
index cac9b04..6da5883 100644
--- a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
@@ -91,6 +91,9 @@ public class PulseConstants {
   public static final String APPLICATION_PROPERTY_PULSE_LOGLEVEL = "pulse.Log-Level";
   public static final String APPLICATION_PROPERTY_PULSE_LOGAPPEND = "pulse.Log-Append";
   public static final String APPLICATION_PROPERTY_PULSE_PRODUCTSUPPORT = "pulse.product";
+  public static final String APPLICATION_PROPERTY_PULSE_SEC_PROFILE_GEMFIRE = "pulse.authentication.gemfire";
+  public static final String APPLICATION_PROPERTY_PULSE_SEC_PROFILE_DEFAULT = "pulse.authentication.default";
+  public static final String APPLICATION_PROPERTY_PULSE_SPRING_PROFILE_KEY = "spring.profiles.default";
 
   // STRING FLAGS
   public static final String STRING_FLAG_TRUE = "true";
@@ -114,6 +117,7 @@ public class PulseConstants {
   public static final String OBJECT_NAME_TABLE_AGGREGATE_PATTERN = OBJECT_DOMAIN_NAME_SQLFIRE + ":service=Table,type=Aggregate,table=";
   public static final String OBJECT_NAME_REGION_ON_MEMBER_REGION = OBJECT_DOMAIN_NAME_GEMFIRE + ":service=Region,name=";
   public static final String OBJECT_NAME_REGION_ON_MEMBER_MEMBER = ",type=Member,member=";
+  public static final String OBJECT_NAME_ACCESSCONTROL_MBEAN = "GemFire:service=AccessControl,type=Distributed";
 
   public static final String MBEAN_KEY_PROPERTY_SERVICE = "service";
   public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_REGION = "Region";
@@ -300,6 +304,11 @@ public class PulseConstants {
   public static final String PRODUCT_NAME_GEMFIRE = "gemfire"; // For GemFire
   public static final String PRODUCT_NAME_SQLFIRE = "gemfirexd"; // For SQLFire
 
+  //Following attributes are not present in 9.0
+  //"Members"
+  //"EmptyNodes"
+  //"SystemRegionEntryCount"
+  //"MemberCount"
   public static final String[] REGION_MBEAN_ATTRIBUTES = {
       MBEAN_ATTRIBUTE_MEMBERS, MBEAN_ATTRIBUTE_FULLPATH,
       MBEAN_ATTRIBUTE_DISKREADSRATE, MBEAN_ATTRIBUTE_DISKWRITESRATE,
@@ -388,6 +397,14 @@ public class PulseConstants {
 
   public static final String[] SF_TABLE_MBEAN_ATTRIBUTES = {
       MBEAN_ATTRIBUTE_ENTRYSIZE, MBEAN_ATTRIBUTE_NUMBEROFROWS };
+  
+  public static final String PULSE_ROLES[] = {
+    "PULSE_DASHBOARD", 
+    "PULSE_DATABROWSER", 
+    "PULSE_WEBGFSH", 
+    "PULSE_ADMIN_V1",
+    "PULSE_ADMIN_V2"
+  };
 
   // SSL Related attributes
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java
index 5d9f650..87bf778 100644
--- a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java
@@ -37,6 +37,7 @@ public class Repository {
   private Boolean isEmbeddedMode;
   private boolean useSSLLocator = false;
   private boolean useSSLManager = false;
+  private boolean useGemFireCredentials = false;
   
 
   private String pulseWebAppUrl;
@@ -202,4 +203,14 @@ public class Repository {
     return this.resourceBundle;
   }
 
+  public boolean isUseGemFireCredentials() {
+    return useGemFireCredentials;
+  }
+
+  public void setUseGemFireCredentials(boolean useGemFireCredentials) {
+    this.useGemFireCredentials = useGemFireCredentials;
+  }
+  
+  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
new file mode 100644
index 0000000..23f43e0
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthentication.java
@@ -0,0 +1,142 @@
+package com.vmware.gemfire.tools.pulse.internal.security;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.management.remote.JMXConnector;
+
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.SpringSecurityCoreVersion;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.context.SecurityContextHolder;
+
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+
+/**
+ * Spring security authentication object for GemFire
+ * 
+ * To use GemFire Integrated Security Model set Spring Application Profile to pulse.authentication.gemfire
+ * 
+ * 1. Authentication : 
+ *    1.a GemFire profile creates JMX connection with given credentials at the login time. 
+ *    1.b Successful connect is considered as Successful Authentication for Pulse WebApp
+ *    
+ *    
+ * 2. Authorization :
+ *    2.a Using newly created authenticated connection AccessControlMXBean is called to get authentication
+ *      levels. See @See {@link #populateAuthorities(JMXConnector)}. This sets Spring Security Authorities
+ *    2.b DataBrowser end-points are required to be authorized against Spring Granted Authority
+ *      @See spring-security.xml
+ *    2.c When executing Data-Browser query, user-level jmx connection is used so at to put access-control
+ *      over the resources query is accessing. 
+ *      @See #com.vmware.gemfire.tools.pulse.internal.data.JMXDataUpdater#executeQuery
+ *         
+ * 3. Connection Management - Spring Security LogoutHandler closes session level connection
+ *
+ * TODO : Better model would be to maintain background connection map for Databrowser instead
+ * of each web session creating rmi connection and map user to correct entry in the connection map
+ * 
+ * @author Tushar Khairnar
+ * @since version 9.0
+ */
+public class GemFireAuthentication extends UsernamePasswordAuthenticationToken {	
+
+  private final static PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  
+	private JMXConnector jmxc=null;	
+	
+	public GemFireAuthentication(Object principal, Object credentials, Collection<GrantedAuthority> list, JMXConnector jmxc) {
+		super(principal, credentials, list);
+		this.jmxc = jmxc;
+	}
+
+	private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
+		
+	
+	public void closeJMXConnection(){
+		try {
+			jmxc.close();
+		} catch (IOException e) {
+			throw new RuntimeException(e);
+		}
+	}
+	
+	public MBeanServerConnection getRemoteMBeanServer() {
+		try {
+			return jmxc.getMBeanServerConnection();
+		} catch (IOException e) {
+			throw new RuntimeException(e);
+		}
+	}
+	
+	public static boolean authorize(String role){
+		try {
+			GemFireAuthentication authentication = (GemFireAuthentication) SecurityContextHolder
+					.getContext().getAuthentication();
+			MBeanServerConnection mbeanServer = authentication
+					.getRemoteMBeanServer();
+			LOGGER.fine("#GemFireAuthentication : Checking for role="+role);
+			ObjectName name = new ObjectName(PulseConstants.OBJECT_NAME_ACCESSCONTROL_MBEAN);
+			Object[] params = new Object[] {role};
+			String[] signature = new String[] {String.class.getCanonicalName()};
+			Boolean result = (Boolean)mbeanServer.invoke(name, "authorize", params, signature);
+			return result;
+		} catch (MalformedObjectNameException e) {
+			throw new RuntimeException(e);
+		} catch (InstanceNotFoundException e) {
+			throw new RuntimeException(e);
+		} catch (MBeanException e) {
+			throw new RuntimeException(e);
+		} catch (ReflectionException e) {
+			throw new RuntimeException(e);
+		} catch (IOException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
+	public static ArrayList<GrantedAuthority> populateAuthorities(JMXConnector jmxc) {
+		ObjectName name;
+		try {
+			name = new ObjectName(PulseConstants.OBJECT_NAME_ACCESSCONTROL_MBEAN);
+			MBeanServerConnection mbeanServer = jmxc.getMBeanServerConnection();			
+			ArrayList<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();
+			authorities.add(new SimpleGrantedAuthority("ROLE_USER"));
+			for(String role : PulseConstants.PULSE_ROLES){
+				Object[] params = new Object[] {role};
+				String[] signature = new String[] {String.class.getCanonicalName()};
+				boolean result = (Boolean)mbeanServer.invoke(name, "authorize", params, signature);
+				if(result){
+				  //spring sec require ROLE_ prefix
+					authorities.add(new SimpleGrantedAuthority("ROLE_"+role)); 
+				}
+			}
+			return authorities;
+		} catch (MalformedObjectNameException e) {
+			throw new RuntimeException(e);
+		} catch (InstanceNotFoundException e) {
+			throw new RuntimeException(e);
+		} catch (MBeanException e) {
+			throw new RuntimeException(e);
+		} catch (ReflectionException e) {
+			throw new RuntimeException(e);
+		} catch (IOException e) {
+			throw new RuntimeException(e);
+		}		
+	}
+
+	public JMXConnector getJmxc() {
+		return jmxc;
+	}
+	
+	
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java
new file mode 100644
index 0000000..704c177
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/GemFireAuthenticationProvider.java
@@ -0,0 +1,68 @@
+package com.vmware.gemfire.tools.pulse.internal.security;
+
+import java.util.Collection;
+
+import javax.management.remote.JMXConnector;
+
+import org.springframework.security.authentication.AuthenticationProvider;
+import org.springframework.security.authentication.AuthenticationServiceException;
+import org.springframework.security.authentication.BadCredentialsException;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.core.GrantedAuthority;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+
+/**
+ * Spring security AuthenticationProvider for GemFire. It connects to 
+ * gemfire manager using given credentials. Successful connect is treated
+ * as successful authentication and web user is authenticated
+ *
+ * @author Tushar Khairnar
+ * @since version 9.0
+ */
+public class GemFireAuthenticationProvider implements AuthenticationProvider {
+	
+  private final static PulseLogWriter LOGGER = PulseLogWriter.getLogger();	
+
+	
+	@Override
+	public Authentication authenticate(Authentication authentication)
+			throws AuthenticationException {
+			  
+		if (authentication instanceof GemFireAuthentication) {
+			GemFireAuthentication gemAuth = (GemFireAuthentication) authentication;
+			LOGGER.fine("GemAuthentication is connected? = "
+					+ gemAuth.getJmxc());
+			if(gemAuth.getJmxc()!=null && gemAuth.isAuthenticated())
+				return gemAuth;
+		}
+		
+		String name = authentication.getName();
+		String password = authentication.getCredentials().toString();
+
+		try {
+		  LOGGER.fine("Connecting to GemFire with user=" + name);
+		  JMXConnector jmxc = Repository.get().getCluster().connectToGemFire(name, password);
+		  if(jmxc!=null) {
+  			Collection<GrantedAuthority> list = GemFireAuthentication.populateAuthorities(jmxc);
+  			GemFireAuthentication auth = new GemFireAuthentication(
+  					authentication.getPrincipal(),
+  					authentication.getCredentials(), list, jmxc);
+  			LOGGER.fine("For user " + name + " authList="+ list);
+  			return auth;
+		  } else 
+		    throw new AuthenticationServiceException("JMX Connection unavailable");
+		} catch (Exception e) {
+		  throw new BadCredentialsException("Error connecting to GemFire JMX Server", e);			
+		}
+	}
+
+	@Override
+	public boolean supports(Class<?> authentication) {
+		return authentication.equals(UsernamePasswordAuthenticationToken.class);
+	}	
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java
new file mode 100644
index 0000000..78d4703
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java
@@ -0,0 +1,39 @@
+package com.vmware.gemfire.tools.pulse.internal.security;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
+import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+
+/**
+ * Handler is used to close jmx connection maintained at user-level
+ * @author tushark
+ *
+ */
+public class LogoutHandler extends SimpleUrlLogoutSuccessHandler implements LogoutSuccessHandler {
+
+  public LogoutHandler(String defaultTargetURL) {
+    this.setDefaultTargetUrl(defaultTargetURL);
+  }
+
+  public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
+      throws IOException, ServletException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    LOGGER.fine("Invoked #LogoutHandler ...");
+    if (Repository.get().isUseGemFireCredentials()) {
+      GemFireAuthentication gemauthentication = (GemFireAuthentication) authentication;
+      gemauthentication.getJmxc().close();
+      LOGGER.info("#LogoutHandler : Closing GemFireAuthentication JMX Connection...");
+    }
+    super.onLogoutSuccess(request, response, authentication);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/resources/pulse.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/pulse.properties b/pulse/src/main/resources/pulse.properties
index 17299c2..4286615 100644
--- a/pulse/src/main/resources/pulse.properties
+++ b/pulse/src/main/resources/pulse.properties
@@ -2,22 +2,16 @@
 #Tue, 09 Oct 2012 16:39:00
 
 # JMX Locator/Manager Properties
-#pulse.useLocator=true
-#pulse.host=SachinK.clarice.com
-#pulse.useLocator=true
-#pulse.host=pnq-pratik.vmware.com
-#pulse.port=10334
-
-pulse.useLocator=true
-pulse.host=pnq-pratik.vmware.com
-pulse.port=10334
+pulse.useLocator=false
+pulse.host=localhost
+pulse.port=1099
 
 #pulse.useSSL.locator=true
 #pulse.useSSL.manager=true
 
 # JMX User Properties
-pulse.jmxUserName=controlRole
-pulse.jmxUserPassword=R&D
+pulse.jmxUserName=admin
+pulse.jmxUserPassword=admin
 
 # Logging Configurations Properties
 pulse.Log-File-Name=PULSELOG

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/813d24c2/pulse/src/main/webapp/WEB-INF/spring-security.xml
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/WEB-INF/spring-security.xml b/pulse/src/main/webapp/WEB-INF/spring-security.xml
index 4264566..cb24e1f 100644
--- a/pulse/src/main/webapp/WEB-INF/spring-security.xml
+++ b/pulse/src/main/webapp/WEB-INF/spring-security.xml
@@ -9,32 +9,41 @@
 	http://www.springframework.org/schema/context
 	http://www.springframework.org/schema/context/spring-context-3.2.xsd">
 
-	<http auto-config="true">
+	<http auto-config="true" use-expressions="true">
 
 		<!-- Can be invoked w/o auth -->
-		<intercept-url pattern="/Login.html" access="IS_AUTHENTICATED_ANONYMOUSLY" />
-		<intercept-url pattern="/pulse/pulseVersion" access="IS_AUTHENTICATED_ANONYMOUSLY" />
-		<intercept-url pattern="/pulse/authenticateUser" access="IS_AUTHENTICATED_ANONYMOUSLY" />
-		<intercept-url pattern="/pulse/pulseProductSupport" access="IS_AUTHENTICATED_ANONYMOUSLY" />
+		<intercept-url pattern="/Login.html" access="permitAll"  />
+		<intercept-url pattern="/pulse/pulseVersion" access="permitAll" />
+		<intercept-url pattern="/pulse/authenticateUser" access="permitAll" />
+		<intercept-url pattern="/pulse/pulseProductSupport" access="permitAll" />
 		<!-- Can be invoked w/o auth -->
 
+		<!-- Restricted urls -->		
+		<intercept-url pattern="/DataBrowser.html" access="hasRole('ROLE_PULSE_DASHBOARD') and hasRole('ROLE_PULSE_DATABROWSER')" />
+		<intercept-url pattern="/clusterDetail.html" access="hasRole('ROLE_PULSE_DASHBOARD')" />
+		<intercept-url pattern="/MemberDetails.html" access="hasRole('ROLE_PULSE_DASHBOARD')" />
+		<intercept-url pattern="/regionDetail.html" access="hasRole('ROLE_PULSE_DASHBOARD')" />		
+		<intercept-url pattern="/pulse/*" access="hasRole('ROLE_PULSE_DASHBOARD')" />
+		<intercept-url pattern="/clearAlerts" access="hasRole('ROLE_PULSE_DASHBOARD')" />
+		<intercept-url pattern="/acknowledgeAlert" access="hasRole('ROLE_PULSE_DASHBOARD')" />
+		<!-- /dataBrowserRegions, /dataBrowserQuery, /dataBrowserQueryHistory, /dataBrowserExport -->
+		<intercept-url pattern="/dataBrowser*" access="hasRole('ROLE_PULSE_DASHBOARD') and hasRole('ROLE_PULSE_DATABROWSER')" />
+		<intercept-url pattern="/getQueryStatisticsGridModel/*" access="hasRole('ROLE_PULSE_DASHBOARD') and hasRole('ROLE_PULSE_DATABROWSER')" />		
+		
 		<!-- Restricted urls -->
-		<!-- Hide Data Browser tab for Pulse-Cheetah Release -->
-		<!-- <intercept-url pattern="/DataBrowser.html" access="ROLE_RESTRICTED" /> -->
-		<!-- Restricted urls -->
-
-		<!-- Can be invoked only with auth -->
-		<intercept-url pattern="/*.html" access="ROLE_USER,ROLE_GEMFIRETESTING,ROLE_PULSEUSER" />
-		<intercept-url pattern="/pulse/*" access="ROLE_USER,ROLE_GEMFIRETESTING,ROLE_PULSEUSER" />
-		<!-- Can be invoked only with auth -->
-
 		<form-login login-page="/Login.html"
 			authentication-failure-handler-ref="authenticationFailureHandler"
 			default-target-url="/clusterDetail.html" />
-
-		<logout logout-url="/pulse/clusterLogout" logout-success-url="/Login.html" />
+		
+		<logout logout-url="/pulse/clusterLogout" success-handler-ref="customLogoutSuccessHandler"/>
+		
 	</http>
 
+	<beans:bean name="customLogoutSuccessHandler" 
+	class="com.vmware.gemfire.tools.pulse.internal.security.LogoutHandler">
+		<beans:constructor-arg value="/Login.html"/>		
+	</beans:bean>
+	
 	<beans:bean id="authenticationFailureHandler"
 		class="org.springframework.security.web.authentication.ExceptionMappingAuthenticationFailureHandler">
 		<beans:property name="exceptionMappings">
@@ -46,21 +55,33 @@
 			</beans:props>
 		</beans:property>
 	</beans:bean>
+	
+	<beans:bean id="gemAuthenticationProvider" 
+		class="com.vmware.gemfire.tools.pulse.internal.security.GemFireAuthenticationProvider">
+  	</beans:bean>
 
-	<!-- Default user authentication based on in-memory user service -->
+	
+	<!-- Default user authentication -->
 	<beans:beans profile="pulse.authentication.default">
 		<authentication-manager>
 			<authentication-provider>
 				<user-service>
-					<user name="admin" password="admin" authorities="ROLE_USER" />
+					<user name="admin" password="admin" authorities="ROLE_USER,ROLE_PULSE_DASHBOARD,ROLE_PULSE_DATABROWSER" />
 				</user-service>
 			</authentication-provider>
 		</authentication-manager>
 	</beans:beans>
+	
+	<!-- Default user authentication based on gemfire integrated security -->
+	<beans:beans profile="pulse.authentication.gemfire">
+		<authentication-manager alias="authenticationManager"> 
+			<authentication-provider ref="gemAuthenticationProvider"/>
+		</authentication-manager>
+	</beans:beans>
 
 	<!-- Custom user authentication specified externally -->
 	<beans:beans profile="pulse.authentication.custom">
 		<beans:import resource="classpath:pulse-authentication-custom.xml" />
 	</beans:beans>
-
+   
 </beans:beans>
\ No newline at end of file



[70/79] incubator-geode git commit: GEODE-295 - Expecting a suspect string in BridgeMembershipDUnitTet

Posted by tu...@apache.org.
GEODE-295 - Expecting a suspect string in BridgeMembershipDUnitTet

testBridgeMembershipEventsInClient already had some code to expect the
suspect string, but it was writing to a weirdly constructed logger, so I
think it was not actually taking effect.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/208e9a1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/208e9a1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/208e9a1d

Branch: refs/heads/feature/GEODE-17
Commit: 208e9a1d1b63c62128b6d0580fccb1bb445311ee
Parents: a49ef25
Author: Dan Smith <up...@apache.org>
Authored: Tue Sep 1 09:07:16 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:52:44 2015 +0530

----------------------------------------------------------------------
 .../cache30/BridgeMembershipDUnitTest.java      | 38 ++++++--------------
 1 file changed, 10 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/208e9a1d/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
index 7f6af30..ca7a439 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/BridgeMembershipDUnitTest.java
@@ -719,6 +719,7 @@ public class BridgeMembershipDUnitTest extends BridgeTestCase {
    * crashes or departs gracefully, the client will detect this as a crash.
    */
   public void testBridgeMembershipEventsInClient() throws Exception {
+    addExpectedException("IOException");
     final boolean[] fired = new boolean[3];
     final DistributedMember[] member = new DistributedMember[3];
     final String[] memberId = new String[3];
@@ -876,35 +877,16 @@ public class BridgeMembershipDUnitTest extends BridgeTestCase {
     assertFalse(isClient[CRASHED]);
     resetArraysForTesting(fired, member, memberId, isClient);
 
-//    String expected = "dead server list" +
-//                      "||live server list" +
-//                      "||java.io.IOException";
-    String expected = "java.io.IOException";
-    String addExpected = 
-      "<ExpectedException action=add>" + expected + "</ExpectedException>";
-    String removeExpected = 
-      "<ExpectedException action=remove>" + expected + "</ExpectedException>";
-      
-    LogWriter bgexecLogger =
-          new LocalLogWriter(InternalLogWriter.ALL_LEVEL, System.out);
-    bgexecLogger.info(addExpected);
-    getLogWriter().info(addExpected);
-    try {
-      vm0.invoke(new SerializableRunnable("Stop BridgeServer") {
-        public void run() {
-          getLogWriter().info("[testBridgeMembershipEventsInClient] Stop BridgeServer");
-          stopBridgeServers(getCache());
-        }
-      });
-      synchronized(listener) {
-        if (!fired[JOINED] && !fired[CRASHED]) {
-          listener.wait(60 * 1000);
-        }
+    vm0.invoke(new SerializableRunnable("Stop BridgeServer") {
+      public void run() {
+        getLogWriter().info("[testBridgeMembershipEventsInClient] Stop BridgeServer");
+        stopBridgeServers(getCache());
+      }
+    });
+    synchronized(listener) {
+      if (!fired[JOINED] && !fired[CRASHED]) {
+        listener.wait(60 * 1000);
       }
-    }
-    finally {
-      bgexecLogger.info(removeExpected);
-      getLogWriter().info(removeExpected);
     }
     
     getLogWriter().info("[testBridgeMembershipEventsInClient] assert client detected server departure");


[10/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/multiselect/prettify.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/multiselect/prettify.js b/pulse/src/main/webapp/scripts/multiselect/prettify.js
new file mode 100644
index 0000000..fa800db
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/multiselect/prettify.js
@@ -0,0 +1,1536 @@
+// Copyright (C) 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/**
+ * @fileoverview
+ * some functions for browser-side pretty printing of code contained in html.
+ * <p>
+ *
+ * For a fairly comprehensive set of languages see the
+ * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
+ * file that came with this source. At a minimum, the lexer should work on a
+ * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
+ * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk
+ * and a subset of Perl, but, because of commenting conventions, doesn't work on
+ * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
+ * <p>
+ * Usage: <ol>
+ * <li> include this source file in an html page via
+ * {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
+ * <li> define style rules. See the example page for examples.
+ * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
+ * {@code class=prettyprint.}
+ * You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
+ * printer needs to do more substantial DOM manipulations to support that, so
+ * some css styles may not be preserved.
+ * </ol>
+ * That's it. I wanted to keep the API as simple as possible, so there's no
+ * need to specify which language the code is in, but if you wish, you can add
+ * another class to the {@code <pre>} or {@code <code>} element to specify the
+ * language, as in {@code <pre class="prettyprint lang-java">}. Any class that
+ * starts with "lang-" followed by a file extension, specifies the file type.
+ * See the "lang-*.js" files in this directory for code that implements
+ * per-language file handlers.
+ * <p>
+ * Change log:<br>
+ * cbeust, 2006/08/22
+ * <blockquote>
+ * Java annotations (start with "@") are now captured as literals ("lit")
+ * </blockquote>
+ * @requires console
+ * @overrides window
+ */
+
+// JSLint declarations
+/*global console, document, navigator, setTimeout, window */
+
+/**
+ * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
+ * UI events. If set to {@code false}, {@code prettyPrint()} is synchronous.
+ */
+window['PR_SHOULD_USE_CONTINUATION'] = true;
+
+/** the number of characters between tab columns */
+window['PR_TAB_WIDTH'] = 8;
+
+/**
+ * Walks the DOM returning a properly escaped version of innerHTML.
+ * 
+ * @param {Node}
+ *          node
+ * @param {Array.
+ *          <string>} out output buffer that receives chunks of HTML.
+ */
+window['PR_normalizedHtml']
+
+/**
+ * Contains functions for creating and registering new language handlers.
+ * 
+ * @type {Object}
+ */
+= window['PR']
+
+/**
+ * Pretty print a chunk of code.
+ * 
+ * @param {string}
+ *          sourceCodeHtml code as html
+ * @return {string} code as html, but prettier
+ */
+= window['prettyPrintOne']
+/**
+ * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
+ * {@code class=prettyprint} and prettify them.
+ * 
+ * @param {Function?}
+ *          opt_whenDone if specified, called when the last entry has been
+ *          finished.
+ */
+= window['prettyPrint'] = void 0;
+
+/**
+ * browser detection.
+ * 
+ * @extern
+ * @returns false if not IE, otherwise the major version.
+ */
+window['_pr_isIE6'] = function() {
+  var ieVersion = navigator && navigator.userAgent
+      && navigator.userAgent.match(/\bMSIE ([678])\./);
+  ieVersion = ieVersion ? +ieVersion[1] : false;
+  window['_pr_isIE6'] = function() {
+    return ieVersion;
+  };
+  return ieVersion;
+};
+
+(function() {
+  // Keyword lists for various languages.
+  var FLOW_CONTROL_KEYWORDS = "break continue do else for if return while ";
+  var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default "
+      + "double enum extern float goto int long register short signed sizeof "
+      + "static struct switch typedef union unsigned void volatile ";
+  var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import "
+      + "new operator private protected public this throw true try typeof ";
+  var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool "
+      + "concept concept_map const_cast constexpr decltype "
+      + "dynamic_cast explicit export friend inline late_check "
+      + "mutable namespace nullptr reinterpret_cast static_assert static_cast "
+      + "template typeid typename using virtual wchar_t where ";
+  var JAVA_KEYWORDS = COMMON_KEYWORDS
+      + "abstract boolean byte extends final finally implements import "
+      + "instanceof null native package strictfp super synchronized throws "
+      + "transient ";
+  var CSHARP_KEYWORDS = JAVA_KEYWORDS
+      + "as base by checked decimal delegate descending event "
+      + "fixed foreach from group implicit in interface internal into is lock "
+      + "object out override orderby params partial readonly ref sbyte sealed "
+      + "stackalloc string select uint ulong unchecked unsafe ushort var ";
+  var JSCRIPT_KEYWORDS = COMMON_KEYWORDS
+      + "debugger eval export function get null set undefined var with "
+      + "Infinity NaN ";
+  var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for "
+      + "goto if import last local my next no our print package redo require "
+      + "sub undef unless until use wantarray while BEGIN END ";
+  var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del "
+      + "elif except exec finally from global import in is lambda "
+      + "nonlocal not or pass print raise try with yield " + "False True None ";
+  var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS
+      + "alias and begin case class def"
+      + " defined elsif end ensure false in module next nil not or redo rescue "
+      + "retry self super then true undef unless until when yield BEGIN END ";
+  var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi "
+      + "function in local set then until ";
+  var ALL_KEYWORDS = (CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS
+      + PERL_KEYWORDS + PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS);
+
+  // token style names. correspond to css classes
+  /** token style for a string literal */
+  var PR_STRING = 'str';
+  /** token style for a keyword */
+  var PR_KEYWORD = 'kwd';
+  /** token style for a comment */
+  var PR_COMMENT = 'com';
+  /** token style for a type */
+  var PR_TYPE = 'typ';
+  /** token style for a literal value. e.g. 1, null, true. */
+  var PR_LITERAL = 'lit';
+  /** token style for a punctuation string. */
+  var PR_PUNCTUATION = 'pun';
+  /** token style for a punctuation string. */
+  var PR_PLAIN = 'pln';
+
+  /** token style for an sgml tag. */
+  var PR_TAG = 'tag';
+  /** token style for a markup declaration such as a DOCTYPE. */
+  var PR_DECLARATION = 'dec';
+  /** token style for embedded source. */
+  var PR_SOURCE = 'src';
+  /** token style for an sgml attribute name. */
+  var PR_ATTRIB_NAME = 'atn';
+  /** token style for an sgml attribute value. */
+  var PR_ATTRIB_VALUE = 'atv';
+
+  /**
+   * A class that indicates a section of markup that is not code, e.g. to allow
+   * embedding of line numbers within code listings.
+   */
+  var PR_NOCODE = 'nocode';
+
+  /**
+   * A set of tokens that can precede a regular expression literal in
+   * javascript. http://www.mozilla.org/js/language/js20/rationale/syntax.html
+   * has the full list, but I've removed ones that might be problematic when
+   * seen in languages that don't support regular expression literals.
+   * 
+   * <p>
+   * Specifically, I've removed any keywords that can't precede a regexp literal
+   * in a syntactically legal javascript program, and I've removed the "in"
+   * keyword since it's not a keyword in many languages, and might be used as a
+   * count of inches.
+   * 
+   * <p>
+   * The link a above does not accurately describe EcmaScript rules since it
+   * fails to distinguish between (a=++/b/i) and (a++/b/i) but it works very
+   * well in practice.
+   * 
+   * @private
+   */
+  var REGEXP_PRECEDER_PATTERN = function() {
+    var preceders = [ "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=", "&=",
+        "(", "*", "*=", /* "+", */"+=", ",", /* "-", */"-=", "->", /*
+                                                                     * ".",
+                                                                     * "..",
+                                                                     * "...",
+                                                                     * handled
+                                                                     * below
+                                                                     */
+        "/", "/=", ":", "::", ";", "<", "<<", "<<=", "<=", "=", "==", "===",
+        ">", ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[", "^", "^=", "^^",
+        "^^=", "{", "|", "|=", "||", "||=", "~" /* handles =~ and !~ */,
+        "break", "case", "continue", "delete", "do", "else", "finally",
+        "instanceof", "return", "throw", "try", "typeof" ];
+    var pattern = '(?:^^|[+-]';
+    for ( var i = 0; i < preceders.length; ++i) {
+      pattern += '|' + preceders[i].replace(/([^=<>:&a-z])/g, '\\$1');
+    }
+    pattern += ')\\s*'; // matches at end, and matches empty string
+    return pattern;
+    // CAVEAT: this does not properly handle the case where a regular
+    // expression immediately follows another since a regular expression may
+    // have flags for case-sensitivity and the like. Having regexp tokens
+    // adjacent is not valid in any language I'm aware of, so I'm punting.
+    // TODO: maybe style special characters inside a regexp as punctuation.
+  }();
+
+  // Define regexps here so that the interpreter doesn't have to create an
+  // object each time the function containing them is called.
+  // The language spec requires a new object created even if you don't access
+  // the $1 members.
+  var pr_amp = /&/g;
+  var pr_lt = /</g;
+  var pr_gt = />/g;
+  var pr_quot = /\"/g;
+  /** like textToHtml but escapes double quotes to be attribute safe. */
+  function attribToHtml(str) {
+    return str.replace(pr_amp, '&amp;').replace(pr_lt, '&lt;').replace(pr_gt,
+        '&gt;').replace(pr_quot, '&quot;');
+  }
+
+  /** escapest html special characters to html. */
+  function textToHtml(str) {
+    return str.replace(pr_amp, '&amp;').replace(pr_lt, '&lt;').replace(pr_gt,
+        '&gt;');
+  }
+
+  var pr_ltEnt = /&lt;/g;
+  var pr_gtEnt = /&gt;/g;
+  var pr_aposEnt = /&apos;/g;
+  var pr_quotEnt = /&quot;/g;
+  var pr_ampEnt = /&amp;/g;
+  var pr_nbspEnt = /&nbsp;/g;
+  /** unescapes html to plain text. */
+  function htmlToText(html) {
+    var pos = html.indexOf('&');
+    if (pos < 0) {
+      return html;
+    }
+    // Handle numeric entities specially. We can't use functional substitution
+    // since that doesn't work in older versions of Safari.
+    // These should be rare since most browsers convert them to normal chars.
+    for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) {
+      var end = html.indexOf(';', pos);
+      if (end >= 0) {
+        var num = html.substring(pos + 3, end);
+        var radix = 10;
+        if (num && num.charAt(0) === 'x') {
+          num = num.substring(1);
+          radix = 16;
+        }
+        var codePoint = parseInt(num, radix);
+        if (!isNaN(codePoint)) {
+          html = (html.substring(0, pos) + String.fromCharCode(codePoint) + html
+              .substring(end + 1));
+        }
+      }
+    }
+
+    return html.replace(pr_ltEnt, '<').replace(pr_gtEnt, '>').replace(
+        pr_aposEnt, "'").replace(pr_quotEnt, '"').replace(pr_nbspEnt, ' ')
+        .replace(pr_ampEnt, '&');
+  }
+
+  /** is the given node's innerHTML normally unescaped? */
+  function isRawContent(node) {
+    return 'XMP' === node.tagName;
+  }
+
+  var newlineRe = /[\r\n]/g;
+  /**
+   * Are newlines and adjacent spaces significant in the given node's innerHTML?
+   */
+  function isPreformatted(node, content) {
+    // PRE means preformatted, and is a very common case, so don't create
+    // unnecessary computed style objects.
+    if ('PRE' === node.tagName) {
+      return true;
+    }
+    if (!newlineRe.test(content)) {
+      return true;
+    } // Don't care
+    var whitespace = '';
+    // For disconnected nodes, IE has no currentStyle.
+    if (node.currentStyle) {
+      whitespace = node.currentStyle.whiteSpace;
+    } else if (window.getComputedStyle) {
+      // Firefox makes a best guess if node is disconnected whereas Safari
+      // returns the empty string.
+      whitespace = window.getComputedStyle(node, null).whiteSpace;
+    }
+    return !whitespace || whitespace === 'pre';
+  }
+
+  function normalizedHtml(node, out) {
+    switch (node.nodeType) {
+    case 1: // an element
+      var name = node.tagName.toLowerCase();
+      out.push('<', name);
+      for ( var i = 0; i < node.attributes.length; ++i) {
+        var attr = node.attributes[i];
+        if (!attr.specified) {
+          continue;
+        }
+        out.push(' ');
+        normalizedHtml(attr, out);
+      }
+      out.push('>');
+      for ( var child = node.firstChild; child; child = child.nextSibling) {
+        normalizedHtml(child, out);
+      }
+      if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
+        out.push('<\/', name, '>');
+      }
+      break;
+    case 2: // an attribute
+      out.push(node.name.toLowerCase(), '="', attribToHtml(node.value), '"');
+      break;
+    case 3:
+    case 4: // text
+      out.push(textToHtml(node.nodeValue));
+      break;
+    }
+  }
+
+  /**
+   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
+   * matches the union o the sets o strings matched d by the input RegExp. Since
+   * it matches globally, if the input strings have a start-of-input anchor
+   * (/^.../), it is ignored for the purposes of unioning.
+   * 
+   * @param {Array.
+   *          <RegExp>} regexs non multiline, non-global regexs.
+   * @return {RegExp} a global regex.
+   */
+  function combinePrefixPatterns(regexs) {
+    var capturedGroupIndex = 0;
+
+    var needToFoldCase = false;
+    var ignoreCase = false;
+    for ( var i = 0, n = regexs.length; i < n; ++i) {
+      var regex = regexs[i];
+      if (regex.ignoreCase) {
+        ignoreCase = true;
+      } else if (/[a-z]/i.test(regex.source.replace(
+          /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
+        needToFoldCase = true;
+        ignoreCase = false;
+        break;
+      }
+    }
+
+    function decodeEscape(charsetPart) {
+      if (charsetPart.charAt(0) !== '\\') {
+        return charsetPart.charCodeAt(0);
+      }
+      switch (charsetPart.charAt(1)) {
+      case 'b':
+        return 8;
+      case 't':
+        return 9;
+      case 'n':
+        return 0xa;
+      case 'v':
+        return 0xb;
+      case 'f':
+        return 0xc;
+      case 'r':
+        return 0xd;
+      case 'u':
+      case 'x':
+        return parseInt(charsetPart.substring(2), 16)
+            || charsetPart.charCodeAt(1);
+      case '0':
+      case '1':
+      case '2':
+      case '3':
+      case '4':
+      case '5':
+      case '6':
+      case '7':
+        return parseInt(charsetPart.substring(1), 8);
+      default:
+        return charsetPart.charCodeAt(1);
+      }
+    }
+
+    function encodeEscape(charCode) {
+      if (charCode < 0x20) {
+        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
+      }
+      var ch = String.fromCharCode(charCode);
+      if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
+        ch = '\\' + ch;
+      }
+      return ch;
+    }
+
+    function caseFoldCharset(charSet) {
+      var charsetParts = charSet.substring(1, charSet.length - 1).match(
+          new RegExp('\\\\u[0-9A-Fa-f]{4}' + '|\\\\x[0-9A-Fa-f]{2}'
+              + '|\\\\[0-3][0-7]{0,2}' + '|\\\\[0-7]{1,2}' + '|\\\\[\\s\\S]'
+              + '|-' + '|[^-\\\\]', 'g'));
+      var groups = [];
+      var ranges = [];
+      var inverse = charsetParts[0] === '^';
+      for ( var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
+        var p = charsetParts[i];
+        switch (p) {
+        case '\\B':
+        case '\\b':
+        case '\\D':
+        case '\\d':
+        case '\\S':
+        case '\\s':
+        case '\\W':
+        case '\\w':
+          groups.push(p);
+          continue;
+        }
+        var start = decodeEscape(p);
+        var end;
+        if (i + 2 < n && '-' === charsetParts[i + 1]) {
+          end = decodeEscape(charsetParts[i + 2]);
+          i += 2;
+        } else {
+          end = start;
+        }
+        ranges.push([ start, end ]);
+        // If the range might intersect letters, then expand it.
+        if (!(end < 65 || start > 122)) {
+          if (!(end < 65 || start > 90)) {
+            ranges.push([ Math.max(65, start) | 32, Math.min(end, 90) | 32 ]);
+          }
+          if (!(end < 97 || start > 122)) {
+            ranges
+                .push([ Math.max(97, start) & ~32, Math.min(end, 122) & ~32 ]);
+          }
+        }
+      }
+
+      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
+      // -> [[1, 12], [14, 14], [16, 17]]
+      ranges.sort(function(a, b) {
+        return (a[0] - b[0]) || (b[1] - a[1]);
+      });
+      var consolidatedRanges = [];
+      var lastRange = [ NaN, NaN ];
+      for ( var i = 0; i < ranges.length; ++i) {
+        var range = ranges[i];
+        if (range[0] <= lastRange[1] + 1) {
+          lastRange[1] = Math.max(lastRange[1], range[1]);
+        } else {
+          consolidatedRanges.push(lastRange = range);
+        }
+      }
+
+      var out = [ '[' ];
+      if (inverse) {
+        out.push('^');
+      }
+      out.push.apply(out, groups);
+      for ( var i = 0; i < consolidatedRanges.length; ++i) {
+        var range = consolidatedRanges[i];
+        out.push(encodeEscape(range[0]));
+        if (range[1] > range[0]) {
+          if (range[1] + 1 > range[0]) {
+            out.push('-');
+          }
+          out.push(encodeEscape(range[1]));
+        }
+      }
+      out.push(']');
+      return out.join('');
+    }
+
+    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
+      // Split into character sets, escape sequences, punctuation strings
+      // like ('(', '(?:', ')', '^'), and runs of characters that do not
+      // include any of the above.
+      var parts = regex.source.match(new RegExp('(?:'
+          + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set
+          + '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape
+          + '|\\\\x[A-Fa-f0-9]{2}' // a hex escape
+          + '|\\\\[0-9]+' // a back-reference or octal escape
+          + '|\\\\[^ux0-9]' // other escape sequence
+          + '|\\(\\?[:!=]' // start of a non-capturing group
+          + '|[\\(\\)\\^]' // start/emd of a group, or line start
+          + '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters
+          + ')', 'g'));
+      var n = parts.length;
+
+      // Maps captured group numbers to the number they will occupy in
+      // the output or to -1 if that has not been determined, or to
+      // undefined if they need not be capturing in the output.
+      var capturedGroups = [];
+
+      // Walk over and identify back references to build the capturedGroups
+      // mapping.
+      for ( var i = 0, groupIndex = 0; i < n; ++i) {
+        var p = parts[i];
+        if (p === '(') {
+          // groups are 1-indexed, so max group index is count of '('
+          ++groupIndex;
+        } else if ('\\' === p.charAt(0)) {
+          var decimalValue = +p.substring(1);
+          if (decimalValue && decimalValue <= groupIndex) {
+            capturedGroups[decimalValue] = -1;
+          }
+        }
+      }
+
+      // Renumber groups and reduce capturing groups to non-capturing groups
+      // where possible.
+      for ( var i = 1; i < capturedGroups.length; ++i) {
+        if (-1 === capturedGroups[i]) {
+          capturedGroups[i] = ++capturedGroupIndex;
+        }
+      }
+      for ( var i = 0, groupIndex = 0; i < n; ++i) {
+        var p = parts[i];
+        if (p === '(') {
+          ++groupIndex;
+          if (capturedGroups[groupIndex] === undefined) {
+            parts[i] = '(?:';
+          }
+        } else if ('\\' === p.charAt(0)) {
+          var decimalValue = +p.substring(1);
+          if (decimalValue && decimalValue <= groupIndex) {
+            parts[i] = '\\' + capturedGroups[groupIndex];
+          }
+        }
+      }
+
+      // Remove any prefix anchors so that the output will match anywhere.
+      // ^^ really does mean an anchored match though.
+      for ( var i = 0, groupIndex = 0; i < n; ++i) {
+        if ('^' === parts[i] && '^' !== parts[i + 1]) {
+          parts[i] = '';
+        }
+      }
+
+      // Expand letters to groupts to handle mixing of case-sensitive and
+      // case-insensitive patterns if necessary.
+      if (regex.ignoreCase && needToFoldCase) {
+        for ( var i = 0; i < n; ++i) {
+          var p = parts[i];
+          var ch0 = p.charAt(0);
+          if (p.length >= 2 && ch0 === '[') {
+            parts[i] = caseFoldCharset(p);
+          } else if (ch0 !== '\\') {
+            // TODO: handle letters in numeric escapes.
+            parts[i] = p.replace(/[a-zA-Z]/g, function(ch) {
+              var cc = ch.charCodeAt(0);
+              return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
+            });
+          }
+        }
+      }
+
+      return parts.join('');
+    }
+
+    var rewritten = [];
+    for ( var i = 0, n = regexs.length; i < n; ++i) {
+      var regex = regexs[i];
+      if (regex.global || regex.multiline) {
+        throw new Error('' + regex);
+      }
+      rewritten.push('(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex)
+          + ')');
+    }
+
+    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
+  }
+
+  var PR_innerHtmlWorks = null;
+  function getInnerHtml(node) {
+    // inner html is hopelessly broken in Safari 2.0.4 when the content is
+    // an html description of well formed XML and the containing tag is a PRE
+    // tag, so we detect that case and emulate innerHTML.
+    if (null === PR_innerHtmlWorks) {
+      var testNode = document.createElement('PRE');
+      testNode.appendChild(document
+          .createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
+      PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
+    }
+
+    if (PR_innerHtmlWorks) {
+      var content = node.innerHTML;
+      // XMP tags contain unescaped entities so require special handling.
+      if (isRawContent(node)) {
+        content = textToHtml(content);
+      } else if (!isPreformatted(node, content)) {
+        content = content.replace(/(<br\s*\/?>)[\r\n]+/g, '$1').replace(
+            /(?:[\r\n]+[ \t]*)+/g, ' ');
+      }
+      return content;
+    }
+
+    var out = [];
+    for ( var child = node.firstChild; child; child = child.nextSibling) {
+      normalizedHtml(child, out);
+    }
+    return out.join('');
+  }
+
+  /**
+   * returns a function that expand tabs to spaces. This function can be fed
+   * successive chunks of text, and will maintain its own internal state to keep
+   * track of how tabs are expanded.
+   * 
+   * @return {function (string) : string} a function that takes plain text and
+   *         return the text with tabs expanded.
+   * @private
+   */
+  function makeTabExpander(tabWidth) {
+    var SPACES = ' ';
+    var charInLine = 0;
+
+    return function(plainText) {
+      // walk over each character looking for tabs and newlines.
+      // On tabs, expand them. On newlines, reset charInLine.
+      // Otherwise increment charInLine
+      var out = null;
+      var pos = 0;
+      for ( var i = 0, n = plainText.length; i < n; ++i) {
+        var ch = plainText.charAt(i);
+
+        switch (ch) {
+        case '\t':
+          if (!out) {
+            out = [];
+          }
+          out.push(plainText.substring(pos, i));
+          // calculate how much space we need in front of this part
+          // nSpaces is the amount of padding -- the number of spaces needed
+          // to move us to the next column, where columns occur at factors of
+          // tabWidth.
+          var nSpaces = tabWidth - (charInLine % tabWidth);
+          charInLine += nSpaces;
+          for (; nSpaces >= 0; nSpaces -= SPACES.length) {
+            out.push(SPACES.substring(0, nSpaces));
+          }
+          pos = i + 1;
+          break;
+        case '\n':
+          charInLine = 0;
+          break;
+        default:
+          ++charInLine;
+        }
+      }
+      if (!out) {
+        return plainText;
+      }
+      out.push(plainText.substring(pos));
+      return out.join('');
+    };
+  }
+
+  var pr_chunkPattern = new RegExp('[^<]+' // A run of characters other than
+                                            // '<'
+      + '|<\!--[\\s\\S]*?--\>' // an HTML comment
+      + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>' // a CDATA section
+      // a probable tag that should not be highlighted
+      + '|<\/?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>' + '|<', // A '<'
+                                                                    // that does
+                                                                    // not begin
+                                                                    // a larger
+                                                                    // chunk
+  'g');
+  var pr_commentPrefix = /^<\!--/;
+  var pr_cdataPrefix = /^<!\[CDATA\[/;
+  var pr_brPrefix = /^<br\b/i;
+  var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;
+
+  /**
+   * split markup into chunks of html tags (style null) and plain text (style
+   * {@link #PR_PLAIN}), converting tags which are significant for tokenization (<br>)
+   * into their textual equivalent.
+   * 
+   * @param {string}
+   *          s html where whitespace is considered significant.
+   * @return {Object} source code and extracted tags.
+   * @private
+   */
+  function extractTags(s) {
+    // since the pattern has the 'g' modifier and defines no capturing groups,
+    // this will return a list of all chunks which we then classify and wrap as
+    // PR_Tokens
+    var matches = s.match(pr_chunkPattern);
+    var sourceBuf = [];
+    var sourceBufLen = 0;
+    var extractedTags = [];
+    if (matches) {
+      for ( var i = 0, n = matches.length; i < n; ++i) {
+        var match = matches[i];
+        if (match.length > 1 && match.charAt(0) === '<') {
+          if (pr_commentPrefix.test(match)) {
+            continue;
+          }
+          if (pr_cdataPrefix.test(match)) {
+            // strip CDATA prefix and suffix. Don't unescape since it's CDATA
+            sourceBuf.push(match.substring(9, match.length - 3));
+            sourceBufLen += match.length - 12;
+          } else if (pr_brPrefix.test(match)) {
+            // <br> tags are lexically significant so convert them to text.
+            // This is undone later.
+            sourceBuf.push('\n');
+            ++sourceBufLen;
+          } else {
+            if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) {
+              // A <span class="nocode"> will start a section that should be
+              // ignored. Continue walking the list until we see a matching end
+              // tag.
+              var name = match.match(pr_tagNameRe)[2];
+              var depth = 1;
+              var j;
+              end_tag_loop: for (j = i + 1; j < n; ++j) {
+                var name2 = matches[j].match(pr_tagNameRe);
+                if (name2 && name2[2] === name) {
+                  if (name2[1] === '/') {
+                    if (--depth === 0) {
+                      break end_tag_loop;
+                    }
+                  } else {
+                    ++depth;
+                  }
+                }
+              }
+              if (j < n) {
+                extractedTags.push(sourceBufLen, matches.slice(i, j + 1).join(
+                    ''));
+                i = j;
+              } else { // Ignore unclosed sections.
+                extractedTags.push(sourceBufLen, match);
+              }
+            } else {
+              extractedTags.push(sourceBufLen, match);
+            }
+          }
+        } else {
+          var literalText = htmlToText(match);
+          sourceBuf.push(literalText);
+          sourceBufLen += literalText.length;
+        }
+      }
+    }
+    return {
+      source : sourceBuf.join(''),
+      tags : extractedTags
+    };
+  }
+
+  /** True if the given tag contains a class attribute with the nocode class. */
+  function isNoCodeTag(tag) {
+    return !!tag
+        // First canonicalize the representation of attributes
+        .replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,
+            ' $1="$2$3$4"')
+        // Then look for the attribute we want.
+        .match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/);
+  }
+
+  /**
+   * Apply the given language handler to sourceCode and add the resulting
+   * decorations to out.
+   * 
+   * @param {number}
+   *          basePos the index of sourceCode within the chunk of source whose
+   *          decorations are already present on out.
+   */
+  function appendDecorations(basePos, sourceCode, langHandler, out) {
+    if (!sourceCode) {
+      return;
+    }
+    var job = {
+      source : sourceCode,
+      basePos : basePos
+    };
+    langHandler(job);
+    out.push.apply(out, job.decorations);
+  }
+
+  /**
+   * Given triples of [style, pattern, context] returns a lexing function, The
+   * lexing function interprets the patterns to find token boundaries and
+   * returns a decoration list of the form [index_0, style_0, index_1, style_1,
+   * ..., index_n, style_n] where index_n is an index into the sourceCode, and
+   * style_n is a style constant like PR_PLAIN. index_n-1 <= index_n, and
+   * style_n-1 applies to all characters in sourceCode[index_n-1:index_n].
+   * 
+   * The stylePatterns is a list whose elements have the form [style : string,
+   * pattern : RegExp, DEPRECATED, shortcut : string].
+   * 
+   * Style is a style constant like PR_PLAIN, or can be a string of the form
+   * 'lang-FOO', where FOO is a language extension describing the language of
+   * the portion of the token in $1 after pattern executes. E.g., if style is
+   * 'lang-lisp', and group 1 contains the text '(hello (world))', then that
+   * portion of the token will be passed to the registered lisp handler for
+   * formatting. The text before and after group 1 will be restyled using this
+   * decorator so decorators should take care that this doesn't result in
+   * infinite recursion. For example, the HTML lexer rule for SCRIPT elements
+   * looks something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may
+   * match '<script>foo()<\/script>', which would cause the current decorator
+   * to be called with '<script>' which would not match the same rule since
+   * group 1 must not be empty, so it would be instead styled as PR_TAG by the
+   * generic tag rule. The handler registered for the 'js' extension would then
+   * be called with 'foo()', and finally, the current decorator would be called
+   * with '<\/script>' which would not match the original rule and so the
+   * generic tag rule would identify it as a tag.
+   * 
+   * Pattern must only match prefixes, and if it matches a prefix, then that
+   * match is considered a token with the same style.
+   * 
+   * Context is applied to the last non-whitespace, non-comment token
+   * recognized.
+   * 
+   * Shortcut is an optional string of characters, any of which, if the first
+   * character, gurantee that this pattern and only this pattern matches.
+   * 
+   * @param {Array}
+   *          shortcutStylePatterns patterns that always start with a known
+   *          character. Must have a shortcut string.
+   * @param {Array}
+   *          fallthroughStylePatterns patterns that will be tried in order if
+   *          the shortcut ones fail. May have shortcuts.
+   * 
+   * @return {function (Object)} a function that takes source code and returns a
+   *         list of decorations.
+   */
+  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
+    var shortcuts = {};
+    var tokenizer;
+    (function() {
+      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
+      var allRegexs = [];
+      var regexKeys = {};
+      for ( var i = 0, n = allPatterns.length; i < n; ++i) {
+        var patternParts = allPatterns[i];
+        var shortcutChars = patternParts[3];
+        if (shortcutChars) {
+          for ( var c = shortcutChars.length; --c >= 0;) {
+            shortcuts[shortcutChars.charAt(c)] = patternParts;
+          }
+        }
+        var regex = patternParts[1];
+        var k = '' + regex;
+        if (!regexKeys.hasOwnProperty(k)) {
+          allRegexs.push(regex);
+          regexKeys[k] = null;
+        }
+      }
+      allRegexs.push(/[\0-\uffff]/);
+      tokenizer = combinePrefixPatterns(allRegexs);
+    })();
+
+    var nPatterns = fallthroughStylePatterns.length;
+    var notWs = /\S/;
+
+    /**
+     * Lexes job.source and produces an output array job.decorations of style
+     * classes preceded by the position at which they start in job.source in
+     * order.
+     * 
+     * @param {Object}
+     *          job an object like {@code source: {string} sourceText plain
+     *          text, basePos: {int} position of job.source in the larger chunk
+     *          of sourceCode. }
+     */
+    var decorate = function(job) {
+      var sourceCode = job.source, basePos = job.basePos;
+      /**
+       * Even entries are positions in source in ascending order. Odd enties are
+       * style markers (e.g., PR_COMMENT) that run from that position until the
+       * end.
+       * 
+       * @type {Array.<number|string>}
+       */
+      var decorations = [ basePos, PR_PLAIN ];
+      var pos = 0; // index into sourceCode
+      var tokens = sourceCode.match(tokenizer) || [];
+      var styleCache = {};
+
+      for ( var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
+        var token = tokens[ti];
+        var style = styleCache[token];
+        var match = void 0;
+
+        var isEmbedded;
+        if (typeof style === 'string') {
+          isEmbedded = false;
+        } else {
+          var patternParts = shortcuts[token.charAt(0)];
+          if (patternParts) {
+            match = token.match(patternParts[1]);
+            style = patternParts[0];
+          } else {
+            for ( var i = 0; i < nPatterns; ++i) {
+              patternParts = fallthroughStylePatterns[i];
+              match = token.match(patternParts[1]);
+              if (match) {
+                style = patternParts[0];
+                break;
+              }
+            }
+
+            if (!match) { // make sure that we make progress
+              style = PR_PLAIN;
+            }
+          }
+
+          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
+          if (isEmbedded && !(match && typeof match[1] === 'string')) {
+            isEmbedded = false;
+            style = PR_SOURCE;
+          }
+
+          if (!isEmbedded) {
+            styleCache[token] = style;
+          }
+        }
+
+        var tokenStart = pos;
+        pos += token.length;
+
+        if (!isEmbedded) {
+          decorations.push(basePos + tokenStart, style);
+        } else { // Treat group 1 as an embedded block of source code.
+          var embeddedSource = match[1];
+          var embeddedSourceStart = token.indexOf(embeddedSource);
+          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
+          if (match[2]) {
+            // If embeddedSource can be blank, then it would match at the
+            // beginning which would cause us to infinitely recurse on the
+            // entire token, so we catch the right context in match[2].
+            embeddedSourceEnd = token.length - match[2].length;
+            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
+          }
+          var lang = style.substring(5);
+          // Decorate the left of the embedded source
+          appendDecorations(basePos + tokenStart, token.substring(0,
+              embeddedSourceStart), decorate, decorations);
+          // Decorate the embedded source
+          appendDecorations(basePos + tokenStart + embeddedSourceStart,
+              embeddedSource, langHandlerForExtension(lang, embeddedSource),
+              decorations);
+          // Decorate the right of the embedded section
+          appendDecorations(basePos + tokenStart + embeddedSourceEnd, token
+              .substring(embeddedSourceEnd), decorate, decorations);
+        }
+      }
+      job.decorations = decorations;
+    };
+    return decorate;
+  }
+
+  /**
+   * returns a function that produces a list of decorations from source text.
+   * 
+   * This code treats ", ', and ` as string delimiters, and \ as a string
+   * escape. It does not recognize perl's qq() style strings. It has no special
+   * handling for double delimiter escapes as in basic, or the tripled
+   * delimiters used in python, but should work on those regardless although in
+   * those cases a single string literal may be broken up into multiple adjacent
+   * string literals.
+   * 
+   * It recognizes C, C++, and shell style comments.
+   * 
+   * @param {Object}
+   *          options a set of optional parameters.
+   * @return {function (Object)} a function that examines the source code in the
+   *         input job and builds the decoration list.
+   */
+  function sourceDecorator(options) {
+    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
+    if (options['tripleQuotedStrings']) {
+      // '''multi-line-string''', 'single-line-string', and double-quoted
+      shortcutStylePatterns
+          .push([
+              PR_STRING,
+              /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
+              null, '\'"' ]);
+    } else if (options['multiLineStrings']) {
+      // 'multi-line-string', "multi-line-string"
+      shortcutStylePatterns
+          .push([
+              PR_STRING,
+              /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
+              null, '\'"`' ]);
+    } else {
+      // 'single-line-string', "single-line-string"
+      shortcutStylePatterns.push([ PR_STRING,
+          /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
+          null, '"\'' ]);
+    }
+    if (options['verbatimStrings']) {
+      // verbatim-string-literal production from the C# grammar. See issue 93.
+      fallthroughStylePatterns.push([ PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/,
+          null ]);
+    }
+    if (options['hashComments']) {
+      if (options['cStyleComments']) {
+        // Stop C preprocessor declarations at an unclosed open comment
+        shortcutStylePatterns
+            .push([
+                PR_COMMENT,
+                /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
+                null, '#' ]);
+        fallthroughStylePatterns
+            .push([
+                PR_STRING,
+                /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
+                null ]);
+      } else {
+        shortcutStylePatterns.push([ PR_COMMENT, /^#[^\r\n]*/, null, '#' ]);
+      }
+    }
+    if (options['cStyleComments']) {
+      fallthroughStylePatterns.push([ PR_COMMENT, /^\/\/[^\r\n]*/, null ]);
+      fallthroughStylePatterns.push([ PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/,
+          null ]);
+    }
+    if (options['regexLiterals']) {
+      var REGEX_LITERAL = (
+      // A regular expression literal starts with a slash that is
+      // not followed by * or / so that it is not confused with
+      // comments.
+      '/(?=[^/*])'
+      // and then contains any number of raw characters,
+      + '(?:[^/\\x5B\\x5C]'
+      // escape sequences (\x5C),
+      + '|\\x5C[\\s\\S]'
+      // or non-nesting character sets (\x5B\x5D);
+      + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
+      // finally closed by a /.
+      + '/');
+      fallthroughStylePatterns
+          .push([
+              'lang-regex',
+              new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL
+                  + ')') ]);
+    }
+
+    var keywords = options['keywords'].replace(/^\s+|\s+$/g, '');
+    if (keywords.length) {
+      fallthroughStylePatterns.push([ PR_KEYWORD,
+          new RegExp('^(?:' + keywords.replace(/\s+/g, '|') + ')\\b'), null ]);
+    }
+
+    shortcutStylePatterns.push([ PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0' ]);
+    fallthroughStylePatterns.push(
+    // TODO(mikesamuel): recognize non-latin letters and numerals in idents
+    [ PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null ], [ PR_TYPE,
+        /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null ], [ PR_PLAIN,
+        /^[a-z_$][a-z_$@0-9]*/i, null ], [ PR_LITERAL, new RegExp('^(?:'
+    // A hex number
+    + '0x[a-f0-9]+'
+    // or an octal or decimal number,
+    + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
+    // possibly in scientific notation
+    + '(?:e[+\\-]?\\d+)?' + ')'
+    // with an optional modifier like UL for unsigned long
+    + '[a-z]*', 'i'), null, '0123456789' ], [ PR_PUNCTUATION,
+        /^.[^\s\w\.$@\'\"\`\/\#]*/, null ]);
+
+    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
+  }
+
+  var decorateSource = sourceDecorator({
+    'keywords' : ALL_KEYWORDS,
+    'hashComments' : true,
+    'cStyleComments' : true,
+    'multiLineStrings' : true,
+    'regexLiterals' : true
+  });
+
+  /**
+   * Breaks {@code job.source} around style boundaries in
+   * {@code job.decorations} while re-interleaving {@code job.extractedTags},
+   * and leaves the result in {@code job.prettyPrintedHtml}.
+   * 
+   * @param {Object}
+   *          job like { source: {string} source as plain text, extractedTags:
+   *          {Array.<number|string>} extractedTags chunks of raw html preceded
+   *          by their position in {@code job.source} in order decorations:
+   *          {Array.<number|string} an array of style classes preceded by the
+   *          position at which they start in job.source in order }
+   * @private
+   */
+  function recombineTagsAndDecorations(job) {
+    var sourceText = job.source;
+    var extractedTags = job.extractedTags;
+    var decorations = job.decorations;
+
+    var html = [];
+    // index past the last char in sourceText written to html
+    var outputIdx = 0;
+
+    var openDecoration = null;
+    var currentDecoration = null;
+    var tagPos = 0; // index into extractedTags
+    var decPos = 0; // index into decorations
+    var tabExpander = makeTabExpander(window['PR_TAB_WIDTH']);
+
+    var adjacentSpaceRe = /([\r\n ]) /g;
+    var startOrSpaceRe = /(^| ) /gm;
+    var newlineRe = /\r\n?|\n/g;
+    var trailingSpaceRe = /[ \r\n]$/;
+    var lastWasSpace = true; // the last text chunk emitted ended with a space.
+
+    // A helper function that is responsible for opening sections of decoration
+    // and outputing properly escaped chunks of source
+    function emitTextUpTo(sourceIdx) {
+      if (sourceIdx > outputIdx) {
+        if (openDecoration && openDecoration !== currentDecoration) {
+          // Close the current decoration
+          html.push('</span>');
+          openDecoration = null;
+        }
+        if (!openDecoration && currentDecoration) {
+          openDecoration = currentDecoration;
+          html.push('<span class="', openDecoration, '">');
+        }
+        // This interacts badly with some wikis which introduces paragraph tags
+        // into pre blocks for some strange reason.
+        // It's necessary for IE though which seems to lose the preformattedness
+        // of <pre> tags when their innerHTML is assigned.
+        // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
+        // and it serves to undo the conversion of <br>s to newlines done in
+        // chunkify.
+        var htmlChunk = textToHtml(
+            tabExpander(sourceText.substring(outputIdx, sourceIdx))).replace(
+            lastWasSpace ? startOrSpaceRe : adjacentSpaceRe, '$1&nbsp;');
+        // Keep track of whether we need to escape space at the beginning of the
+        // next chunk.
+        lastWasSpace = trailingSpaceRe.test(htmlChunk);
+        // IE collapses multiple adjacient <br>s into 1 line break.
+        // Prefix every <br> with '&nbsp;' can prevent such IE's behavior.
+        var lineBreakHtml = window['_pr_isIE6']() ? '&nbsp;<br />' : '<br />';
+        html.push(htmlChunk.replace(newlineRe, lineBreakHtml));
+        outputIdx = sourceIdx;
+      }
+    }
+
+    while (true) {
+      // Determine if we're going to consume a tag this time around. Otherwise
+      // we consume a decoration or exit.
+      var outputTag;
+      if (tagPos < extractedTags.length) {
+        if (decPos < decorations.length) {
+          // Pick one giving preference to extractedTags since we shouldn't open
+          // a new style that we're going to have to immediately close in order
+          // to output a tag.
+          outputTag = extractedTags[tagPos] <= decorations[decPos];
+        } else {
+          outputTag = true;
+        }
+      } else {
+        outputTag = false;
+      }
+      // Consume either a decoration or a tag or exit.
+      if (outputTag) {
+        emitTextUpTo(extractedTags[tagPos]);
+        if (openDecoration) {
+          // Close the current decoration
+          html.push('</span>');
+          openDecoration = null;
+        }
+        html.push(extractedTags[tagPos + 1]);
+        tagPos += 2;
+      } else if (decPos < decorations.length) {
+        emitTextUpTo(decorations[decPos]);
+        currentDecoration = decorations[decPos + 1];
+        decPos += 2;
+      } else {
+        break;
+      }
+    }
+    emitTextUpTo(sourceText.length);
+    if (openDecoration) {
+      html.push('</span>');
+    }
+    job.prettyPrintedHtml = html.join('');
+  }
+
+  /** Maps language-specific file extensions to handlers. */
+  var langHandlerRegistry = {};
+  /**
+   * Register a language handler for the given file extensions.
+   * 
+   * @param {function
+   *          (Object)} handler a function from source code to a list of
+   *          decorations. Takes a single argument job which describes the state
+   *          of the computation. The single parameter has the form {@code {
+   *          source: {string} as plain text. decorations: {Array.<number|string>}
+   *          an array of style classes preceded by the position at which they
+   *          start in job.source in order. The language handler should assigned
+   *          this field. basePos: {int} the position of source in the larger
+   *          source chunk. All positions in the output decorations array are
+   *          relative to the larger source chunk. } }
+   * @param {Array.
+   *          <string>} fileExtensions
+   */
+  function registerLangHandler(handler, fileExtensions) {
+    for ( var i = fileExtensions.length; --i >= 0;) {
+      var ext = fileExtensions[i];
+      if (!langHandlerRegistry.hasOwnProperty(ext)) {
+        langHandlerRegistry[ext] = handler;
+      } else if ('console' in window) {
+        console.warn('cannot override language handler %s', ext);
+      }
+    }
+  }
+  function langHandlerForExtension(extension, source) {
+    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
+      // Treat it as markup if the first non whitespace character is a < and
+      // the last non-whitespace character is a >.
+      extension = /^\s*</.test(source) ? 'default-markup' : 'default-code';
+    }
+    return langHandlerRegistry[extension];
+  }
+  registerLangHandler(decorateSource, [ 'default-code' ]);
+  registerLangHandler(createSimpleLexer([], [ [ PR_PLAIN, /^[^<?]+/ ],
+      [ PR_DECLARATION, /^<!\w[^>]*(?:>|$)/ ],
+      [ PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/ ],
+      // Unescaped content in an unknown language
+      [ 'lang-', /^<\?([\s\S]+?)(?:\?>|$)/ ],
+      [ 'lang-', /^<%([\s\S]+?)(?:%>|$)/ ],
+      [ PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/ ],
+      [ 'lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i ],
+      // Unescaped content in javascript. (Or possibly vbscript).
+      [ 'lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i ],
+      // Contains unescaped stylesheet content
+      [ 'lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i ],
+      [ 'lang-in.tag', /^(<\/?[a-z][^<>]*>)/i ] ]), [ 'default-markup', 'htm',
+      'html', 'mxml', 'xhtml', 'xml', 'xsl' ]);
+  registerLangHandler(createSimpleLexer([
+      [ PR_PLAIN, /^[\s]+/, null, ' \t\r\n' ],
+      [ PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'' ] ], [
+      [ PR_TAG, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i ],
+      [ PR_ATTRIB_NAME, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i ],
+      [ 'lang-uq.val', /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/ ],
+      [ PR_PUNCTUATION, /^[=<>\/]+/ ],
+      [ 'lang-js', /^on\w+\s*=\s*\"([^\"]+)\"/i ],
+      [ 'lang-js', /^on\w+\s*=\s*\'([^\']+)\'/i ],
+      [ 'lang-js', /^on\w+\s*=\s*([^\"\'>\s]+)/i ],
+      [ 'lang-css', /^style\s*=\s*\"([^\"]+)\"/i ],
+      [ 'lang-css', /^style\s*=\s*\'([^\']+)\'/i ],
+      [ 'lang-css', /^style\s*=\s*([^\"\'>\s]+)/i ] ]), [ 'in.tag' ]);
+  registerLangHandler(
+      createSimpleLexer([], [ [ PR_ATTRIB_VALUE, /^[\s\S]+/ ] ]), [ 'uq.val' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : CPP_KEYWORDS,
+    'hashComments' : true,
+    'cStyleComments' : true
+  }), [ 'c', 'cc', 'cpp', 'cxx', 'cyc', 'm' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : 'null true false'
+  }), [ 'json' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : CSHARP_KEYWORDS,
+    'hashComments' : true,
+    'cStyleComments' : true,
+    'verbatimStrings' : true
+  }), [ 'cs' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : JAVA_KEYWORDS,
+    'cStyleComments' : true
+  }), [ 'java' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : SH_KEYWORDS,
+    'hashComments' : true,
+    'multiLineStrings' : true
+  }), [ 'bsh', 'csh', 'sh' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : PYTHON_KEYWORDS,
+    'hashComments' : true,
+    'multiLineStrings' : true,
+    'tripleQuotedStrings' : true
+  }), [ 'cv', 'py' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : PERL_KEYWORDS,
+    'hashComments' : true,
+    'multiLineStrings' : true,
+    'regexLiterals' : true
+  }), [ 'perl', 'pl', 'pm' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : RUBY_KEYWORDS,
+    'hashComments' : true,
+    'multiLineStrings' : true,
+    'regexLiterals' : true
+  }), [ 'rb' ]);
+  registerLangHandler(sourceDecorator({
+    'keywords' : JSCRIPT_KEYWORDS,
+    'cStyleComments' : true,
+    'regexLiterals' : true
+  }), [ 'js' ]);
+  registerLangHandler(createSimpleLexer([], [ [ PR_STRING, /^[\s\S]+/ ] ]),
+      [ 'regex' ]);
+
+  function applyDecorator(job) {
+    var sourceCodeHtml = job.sourceCodeHtml;
+    var opt_langExtension = job.langExtension;
+
+    // Prepopulate output in case processing fails with an exception.
+    job.prettyPrintedHtml = sourceCodeHtml;
+
+    try {
+      // Extract tags, and convert the source code to plain text.
+      var sourceAndExtractedTags = extractTags(sourceCodeHtml);
+      /**
+       * Plain text.
+       * 
+       * @type {string}
+       */
+      var source = sourceAndExtractedTags.source;
+      job.source = source;
+      job.basePos = 0;
+
+      /**
+       * Even entries are positions in source in ascending order. Odd entries
+       * are tags that were extracted at that position.
+       * 
+       * @type {Array.<number|string>}
+       */
+      job.extractedTags = sourceAndExtractedTags.tags;
+
+      // Apply the appropriate language handler
+      langHandlerForExtension(opt_langExtension, source)(job);
+      // Integrate the decorations and tags back into the source code to produce
+      // a decorated html string which is left in job.prettyPrintedHtml.
+      recombineTagsAndDecorations(job);
+    } catch (e) {
+      if ('console' in window) {
+        console.log(e);
+        console.trace();
+      }
+    }
+  }
+
+  function prettyPrintOne(sourceCodeHtml, opt_langExtension) {
+    var job = {
+      sourceCodeHtml : sourceCodeHtml,
+      langExtension : opt_langExtension
+    };
+    applyDecorator(job);
+    return job.prettyPrintedHtml;
+  }
+
+  function prettyPrint(opt_whenDone) {
+    var isIE678 = window['_pr_isIE6']();
+    var ieNewline = isIE678 === 6 ? '\r\n' : '\r';
+    // See bug 71 and http://stackoverflow.com/questions/136443/why-doesnt-ie7-
+
+    // fetch a list of nodes to rewrite
+    var codeSegments = [ document.getElementsByTagName('pre'),
+        document.getElementsByTagName('code'),
+        document.getElementsByTagName('xmp') ];
+    var elements = [];
+    for ( var i = 0; i < codeSegments.length; ++i) {
+      for ( var j = 0, n = codeSegments[i].length; j < n; ++j) {
+        elements.push(codeSegments[i][j]);
+      }
+    }
+    codeSegments = null;
+
+    var clock = Date;
+    if (!clock['now']) {
+      clock = {
+        'now' : function() {
+          return (new Date).getTime();
+        }
+      };
+    }
+
+    // The loop is broken into a series of continuations to make sure that we
+    // don't make the browser unresponsive when rewriting a large page.
+    var k = 0;
+    var prettyPrintingJob;
+
+    function doWork() {
+      var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ? clock.now() + 250 /* ms */
+          : Infinity);
+      for (; k < elements.length && clock.now() < endTime; k++) {
+        var cs = elements[k];
+        if (cs.className && cs.className.indexOf('prettyprint') >= 0) {
+          // If the classes includes a language extensions, use it.
+          // Language extensions can be specified like
+          // <pre class="prettyprint lang-cpp">
+          // the language extension "cpp" is used to find a language handler as
+          // passed to PR_registerLangHandler.
+          var langExtension = cs.className.match(/\blang-(\w+)\b/);
+          if (langExtension) {
+            langExtension = langExtension[1];
+          }
+
+          // make sure this is not nested in an already prettified element
+          var nested = false;
+          for ( var p = cs.parentNode; p; p = p.parentNode) {
+            if ((p.tagName === 'pre' || p.tagName === 'code' || p.tagName === 'xmp')
+                && p.className && p.className.indexOf('prettyprint') >= 0) {
+              nested = true;
+              break;
+            }
+          }
+          if (!nested) {
+            // fetch the content as a snippet of properly escaped HTML.
+            // Firefox adds newlines at the end.
+            var content = getInnerHtml(cs);
+            content = content.replace(/(?:\r\n?|\n)$/, '');
+
+            // do the pretty printing
+            prettyPrintingJob = {
+              sourceCodeHtml : content,
+              langExtension : langExtension,
+              sourceNode : cs
+            };
+            applyDecorator(prettyPrintingJob);
+            replaceWithPrettyPrintedHtml();
+          }
+        }
+      }
+      if (k < elements.length) {
+        // finish up in a continuation
+        setTimeout(doWork, 250);
+      } else if (opt_whenDone) {
+        opt_whenDone();
+      }
+    }
+
+    function replaceWithPrettyPrintedHtml() {
+      var newContent = prettyPrintingJob.prettyPrintedHtml;
+      if (!newContent) {
+        return;
+      }
+      var cs = prettyPrintingJob.sourceNode;
+
+      // push the prettified html back into the tag.
+      if (!isRawContent(cs)) {
+        // just replace the old html with the new
+        cs.innerHTML = newContent;
+      } else {
+        // we need to change the tag to a <pre> since <xmp>s do not allow
+        // embedded tags such as the span tags used to attach styles to
+        // sections of source code.
+        var pre = document.createElement('PRE');
+        for ( var i = 0; i < cs.attributes.length; ++i) {
+          var a = cs.attributes[i];
+          if (a.specified) {
+            var aname = a.name.toLowerCase();
+            if (aname === 'class') {
+              pre.className = a.value; // For IE 6
+            } else {
+              pre.setAttribute(a.name, a.value);
+            }
+          }
+        }
+        pre.innerHTML = newContent;
+
+        // remove the old
+        cs.parentNode.replaceChild(pre, cs);
+        cs = pre;
+      }
+
+      // Replace <br>s with line-feeds so that copying and pasting works
+      // on IE 6.
+      // Doing this on other browsers breaks lots of stuff since \r\n is
+      // treated as two newlines on Firefox, and doing this also slows
+      // down rendering.
+      if (isIE678 && cs.tagName === 'PRE') {
+        var lineBreaks = cs.getElementsByTagName('br');
+        for ( var j = lineBreaks.length; --j >= 0;) {
+          var lineBreak = lineBreaks[j];
+          lineBreak.parentNode.replaceChild(document.createTextNode(ieNewline),
+              lineBreak);
+        }
+      }
+    }
+
+    doWork();
+  }
+
+  window['PR_normalizedHtml'] = normalizedHtml;
+  window['prettyPrintOne'] = prettyPrintOne;
+  window['prettyPrint'] = prettyPrint;
+  window['PR'] = {
+    'combinePrefixPatterns' : combinePrefixPatterns,
+    'createSimpleLexer' : createSimpleLexer,
+    'registerLangHandler' : registerLangHandler,
+    'sourceDecorator' : sourceDecorator,
+    'PR_ATTRIB_NAME' : PR_ATTRIB_NAME,
+    'PR_ATTRIB_VALUE' : PR_ATTRIB_VALUE,
+    'PR_COMMENT' : PR_COMMENT,
+    'PR_DECLARATION' : PR_DECLARATION,
+    'PR_KEYWORD' : PR_KEYWORD,
+    'PR_LITERAL' : PR_LITERAL,
+    'PR_NOCODE' : PR_NOCODE,
+    'PR_PLAIN' : PR_PLAIN,
+    'PR_PUNCTUATION' : PR_PUNCTUATION,
+    'PR_SOURCE' : PR_SOURCE,
+    'PR_STRING' : PR_STRING,
+    'PR_TAG' : PR_TAG,
+    'PR_TYPE' : PR_TYPE
+  };
+})();


[49/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt
----------------------------------------------------------------------
diff --git a/pulse/release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt b/pulse/release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt
new file mode 100644
index 0000000..ec9710c
--- /dev/null
+++ b/pulse/release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt
@@ -0,0 +1,2116 @@
+open_source_license.txt
+
+GemFireXD Pulse 8.1.0 GA
+
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software packages (or portions thereof) that are distributed with
+this Pivotal Software, Inc. Product.
+
+The Pivotal Product may also include other Pivotal components, which may
+contain additional open source software packages. One or more such
+open_source_licenses.txt files may therefore accompany this Pivotal
+Product.
+
+The Pivotal Product that includes this file does not necessarily use all
+the open source software packages referred to below and may also only
+use portions of a given package.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in
+this document. This list is provided for your convenience; please read
+further if you wish to review the copyright notice(s) and the full text
+of the license associated with each component.
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> checkbox-radiobutton.js-none
+   >>> grid.locale-en.js-4.6.0
+   >>> html5.js-pre3.5
+   >>> infovistoolkit-2.0.1
+   >>> jqgrid-4.4.0
+   >>> jquery-1.7.2
+   >>> jquery-popup.js-2.1.0
+   >>> jquery-sparklines-2.0
+   >>> jquery-ui-1.10.2
+   >>> jquery-ui.js-1.10.2
+   >>> jquery.i18n.properties.js-1.0.9
+   >>> jquery.jscrollpane.js-none
+   >>> jquery.mousewheel.js-3.0.6
+   >>> jquery.multiselect.js-1.14pre
+   >>> jquery.placeholder.js-none
+   >>> jquery.tablednd.js-0.5
+   >>> jquery.timeago.js-1.3.0
+   >>> jquery.ztree.core-3.5.js-3.5
+   >>> jquery.ztree.excheck-3.5.js-3.5
+   >>> json-none
+
+
+
+SECTION 2: Apache License, V2.0
+
+   >>> commons-beanutils-1.8
+   >>> commons-digester-1.8.1
+   >>> commons-lang-2.6.0
+   >>> commons-logging-1.1.1
+   >>> commons.collections-3.2.0
+   >>> excanvas.js-2.0
+   >>> prettify.js-2.0
+   >>> spring-aop-3.2.9
+   >>> spring-beans-3.2.9.release
+   >>> spring-context-3.2.9.release
+   >>> spring-core-3.2.9.release
+   >>> spring-expression-3.2.9.release
+   >>> spring-ldap-core-1.3.1.release
+   >>> spring-security-config-3.2.9.release
+   >>> spring-security-core-3.2.9.release
+   >>> spring-security-ldap-3.1.4.release
+   >>> spring-security-web-3.2.9.release
+   >>> spring-tx-3.0.5.release
+   >>> spring-web-3.2.9.release
+   >>> spring-webmvc-3.2.9.release
+
+
+
+SECTION 3: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5.0
+
+
+
+SECTION 4: GNU Lesser General Public License, V3.0
+
+   >>> jquery.splitter-0.5.js-0.5
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> Common Development and Distribution License, V1.0
+
+   >>> GNU Lesser General Public License, V3.0
+   
+   >>> GNU Lesser General Public License, V2.1
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> checkbox-radiobutton.js-none
+
+* checkbox plugin
+*
+* Copyright (c) 2013 Filament Group, Inc.
+* Licensed under MIT
+
+
+>>> grid.locale-en.js-4.6.0
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE]
+
+ 
+ * jqGrid English Translation
+ * Tony Tomov tony@trirand.com
+ * http://trirand.com/blog/ 
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+
+
+>>> html5.js-pre3.5
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE]
+
+ 
+Copyright (c) 2014 Alexander Farkas (aFarkas).
+
+Licensed under MIT
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> infovistoolkit-2.0.1
+
+Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> Apache 2.0
+
+Jit-2.0.1.zip\Jit\Extras\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> jqgrid-4.4.0
+
+[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+Changes from Tony Tomov tony@trirand.com
+Dual licensed under the MIT and GPL licenses:
+http://www.opensource.org/licenses/mit-license.php
+http://www.gnu.org/licenses/gpl-2.0.html
+
+The MIT License (MIT)
+Copyright (c) <year> <copyright holders>
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> LGPL 2.1
+
+jquery.jqGrid-4.4.1.zip\src\JsonXml.js
+
+The below work is licensed under Creative Commons GNU LGPL License.
+
+Original work:
+
+License:     http://creativecommons.org/licenses/LGPL/2.1/
+Author:      Stefan Goessner/2006
+Web:         http://goessner.net/
+
+Modifications made:
+
+Version:     0.9-p5
+Description: Restructured code, JSLint validated (no strict whitespaces),
+added handling of empty arrays, empty strings, and int/floats values.
+Author:      Michael Schler/2008-01-29
+Web:         http://michael.hinnerup.net/blog/2008/01/26/converting-json-to-xml-and-xml-to-json/
+
+Description: json2xml added support to convert functions as CDATA
+so it will be easy to write characters that cause some problems when convert
+Author:      Tony Tomov
+
+
+>>> jquery-1.7.2
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
+
+Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+
+Dual licensed under the MIT and GPL licenses:
+
+http://www.opensource.org/licenses/mit-license.php
+
+http://www.gnu.org/licenses/gpl.html
+
+The MIT License (MIT)
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> jquery-popup.js-2.1.0
+
+License: MIT
+
+
+>>> jquery-sparklines-2.0
+
+Copyright (c) 2012, Splunk Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of Splunk Inc nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+>>> jquery-ui-1.10.2
+
+jQuery UI - v1.10.2 - 2013-03-14
+* http://jqueryui.com
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT
+
+
+>>> jquery-ui.js-1.10.2
+
+Copyright 2013 jQuery Foundation and other contributors,
+http://jqueryui.com/
+
+This software consists of voluntary contributions made by many
+individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
+contribution history, see the revision history and logs, available
+at http://jquery-ui.googlecode.com/svn/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> jquery.i18n.properties.js-1.0.9
+
+The MIT License (MIT)
+
+Copyright (c) 2011 Nuno Miguel Correia Serra Fernandes <nf...@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+>>> jquery.jscrollpane.js-none
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE]
+
+Scripts for the demo pages on the jScrollPane website. * 
+
+* You do not need to include this script or use it on your site. * 
+
+* Copyright (c) 2010 Kelvin Luck 
+* Dual licensed under the MIT or GPL licenses.
+
+
+>>> jquery.mousewheel.js-3.0.6
+
+* jScrollPane build script * http://jscrollpane.kelvinluck.com/ * * Copyright (c) 2013 Kelvin Luck * Licensed under the MIT license.
+
+
+>>> jquery.multiselect.js-1.14pre
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
+
+Dual licensed under the MIT and GPL licenses:  *   http://www.opensource.org/licenses/mit-license.php  *   http://www.gnu.org/licenses/gpl.html  *
+
+
+>>> jquery.placeholder.js-none
+
+License: BSD
+
+
+>>> jquery.tablednd.js-0.5
+
+License: MIT
+
+
+>>> jquery.timeago.js-1.3.0
+
+Copyright (c) 2008-2013 Ryan McGeary
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+fssm-0.2.0.gem
+
+
+>>> jquery.ztree.core-3.5.js-3.5
+
+* Copyright (c) 2010 Hunter.z  *  * Licensed same as jquery - MIT License  * http://www.opensource.org/licenses/mit-license.php
+
+
+>>> jquery.ztree.excheck-3.5.js-3.5
+
+Copyright (c) 2010 Hunter.z  *  * Licensed same as jquery - MIT License  * http://www.opensource.org/licenses/mit-license.php
+
+
+>>> json-none
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 is applicable to the following component(s).
+
+
+>>> commons-beanutils-1.8
+
+Apache Commons BeanUtils
+Copyright 2000-2009 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+>>> commons-digester-1.8.1
+
+Apache Commons Digester
+Copyright 2001-2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+>>> commons-lang-2.6.0
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons-logging-1.1.1
+
+Apache Commons Logging
+Copyright 2003-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons.collections-3.2.0
+
+Copyright 2003-2005 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+commons-collections-3.2.jar
+commons-collections-testframework-3.2.jar
+
+
+>>> excanvas.js-2.0
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> prettify.js-2.0
+
+Copyright (C) 2006 Google Inc. 
+
+Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.You may obtain a copy of the License at   
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.
+
+
+>>> spring-aop-3.2.9
+
+Copyright 2002-2012 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-beans-3.2.9.release
+
+* Copyright 2002-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+>>> spring-context-3.2.9.release
+
+Copyright 2002-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-core-3.2.9.release
+
+Copyright 2002-2012 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-expression-3.2.9.release
+
+Copyright 2002-2012 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-ldap-core-1.3.1.release
+
+Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-security-config-3.2.9.release
+
+* Copyright 2002-2012 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+
+
+>>> spring-security-core-3.2.9.release
+
+/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-security-ldap-3.1.4.release
+
+/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+
+
+>>> spring-security-web-3.2.9.release
+
+Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-tx-3.0.5.release
+
+Copyright 2002-2006 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 
+
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work
+To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+>>> spring-web-3.2.9.release
+
+Copyright 2002-2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+>>> spring-webmvc-3.2.9.release
+
+Copyright 2002-2012 the original author or authors.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5.0
+
+The contents of this file are subject to the terms
+of the Common Development and Distribution License
+(the "License").  You may not use this file except
+in compliance with the License.
+
+You can obtain a copy of the license at
+glassfish/bootstrap/legal/CDDLv1.0.txt or
+https://glassfish.dev.java.net/public/CDDLv1.0.html.
+See the License for the specific language governing
+permissions and limitations under the License.
+
+When distributing Covered Code, include this CDDL
+HEADER in each file and include the License file at
+glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable,
+add the following below this CDDL HEADER, with the
+fields enclosed by brackets "[]" replaced with your
+own identifying information: Portions Copyright [yyyy]
+[name of copyright owner]
+
+Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+
+Portions Copyright Apache Software Foundation.
+
+
+--------------- SECTION 4: GNU Lesser General Public License, V3.0 ----------
+
+GNU Lesser General Public License, V3.0 is applicable to the following component(s).
+
+
+>>> jquery.splitter-0.5.js-0.5
+
+* JQuery Spliter Plugin
+ * Copyright (C) 2010-2013 Jakub Jankiewicz <http://jcubic.pl>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+--------------- SECTION 3: GNU Lesser General Public License, V3.0 -----------
+
+		   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
+
+--------------- SECTION 4: GNU Lesser General Public License, V2.1 -----------
+
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the 

<TRUNCATED>

[26/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.woff
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.woff b/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.woff
new file mode 100644
index 0000000..007005f
Binary files /dev/null and b/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.woff differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/fonts/DroidSans-webfont.eot
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/fonts/DroidSans-webfont.eot b/pulse/src/main/webapp/css/fonts/DroidSans-webfont.eot
new file mode 100644
index 0000000..ae4ecd8
Binary files /dev/null and b/pulse/src/main/webapp/css/fonts/DroidSans-webfont.eot differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/fonts/DroidSans-webfont.svg
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/fonts/DroidSans-webfont.svg b/pulse/src/main/webapp/css/fonts/DroidSans-webfont.svg
new file mode 100644
index 0000000..62fb37e
--- /dev/null
+++ b/pulse/src/main/webapp/css/fonts/DroidSans-webfont.svg
@@ -0,0 +1,251 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+This is a custom SVG webfont generated by Font Squirrel.
+Copyright   : Digitized data copyright  2006 Google Corporation
+Foundry     : Ascender Corporation
+Foundry URL : httpwwwascendercorpcom
+</metadata>
+<defs>
+<font id="webfont6rGBoMAO" horiz-adv-x="1126" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="530" />
+<glyph unicode=" "  horiz-adv-x="530" />
+<glyph unicode="&#x09;" horiz-adv-x="530" />
+<glyph unicode="&#xa0;" horiz-adv-x="530" />
+<glyph unicode="!" horiz-adv-x="550" d="M147 111q0 35 11 65q10 29 26 43q20 16 39 23q29 8 51 8q16 0 50 -8q20 -4 41 -23q16 -14 26 -43q10 -31 10 -65q0 -33 -10 -64q-8 -25 -26 -43q-14 -14 -41 -24q-23 -8 -50 -9q-33 0 -51 9q-25 10 -39 24q-18 18 -26 43q-11 31 -11 64zM164 1462h223l-51 -1048h-121z " />
+<glyph unicode="&#x22;" horiz-adv-x="821" d="M133 1462h197l-41 -528h-115zM494 1462h196l-41 -528h-114z" />
+<glyph unicode="#" horiz-adv-x="1320" d="M51 428v137h285l65 328h-274v137h299l82 432h147l-82 -432h293l84 432h144l-84 -432h262v-137h-289l-63 -328h280v-137h-307l-82 -428h-147l84 428h-291l-82 -428h-144l78 428h-258zM483 565h291l64 328h-291z" />
+<glyph unicode="$" d="M123 172v172q59 -27 76 -33q53 -18 92 -28q66 -16 98 -23q43 -8 98 -8v434q-100 35 -155 64q-70 37 -109 75q-43 43 -63.5 96.5t-20.5 129.5q0 68 25 123q25 53 69 96q45 41 111 69q57 25 143 35v180h138v-176q102 -6 184 -26q86 -23 152 -52l-66 -145q-45 20 -127 45 q-66 20 -143 27v-422q92 -33 155 -64q68 -35 113 -75q49 -47 70 -95q23 -55 22.5 -124.5t-24.5 -127.5q-23 -55 -72 -100q-45 -41 -113 -69q-63 -27 -151 -39v-230h-138v221q-33 0 -102 4q-33 2 -98 15q-53 10 -90 20q-43 13 -74 31zM315 1049q0 -39 9 -64q10 -33 28 -53 q20 -23 54 -41q37 -20 81 -37v369q-86 -14 -131 -60q-41 -40 -41 -114zM625 262q94 16 139 63.5t45 120.5q0 29 -10.5 60t-30.5 51.5t-57 40.5q-34 18 -86 37v-373z" />
+<glyph unicode="%" horiz-adv-x="1689" d="M102 1026q0 117 17 193q18 84 55 143t92.5 90t134.5 31q76 0 131 -31q53 -29 94.5 -90.5t59.5 -142.5q18 -86 19 -193q0 -109 -19 -195q-20 -92 -53 -145q-37 -59 -96 -90q-57 -31 -136 -31q-74 0 -129 31q-57 33 -94 90q-39 63 -57 145q-19 86 -19 195zM250 1026 q0 -170 35 -248q37 -82 116 -82q156 0 156 330q0 328 -156 328q-80 0 -116 -82q-35 -78 -35 -246zM362 0l812 1462h157l-811 -1462h-158zM985 440q0 106 19 193q18 90 53 143q37 59 92 90t135 31q76 0 131 -31q57 -33 94 -90q41 -63 58 -143q20 -96 20 -193q0 -109 -18 -194 q-18 -90 -53 -144q-39 -61 -95 -90q-61 -33 -137 -32q-72 0 -131 32q-55 31 -92 90q-41 63 -57 144q-19 85 -19 194zM1133 440q0 -166 36.5 -247.5t114.5 -81.5q156 0 156 329q0 328 -156 328q-78 0 -115 -82q-36 -84 -36 -246z" />
+<glyph unicode="&#x26;" horiz-adv-x="1437" d="M109 381q0 80 20 139q23 66 59 111q49 61 93 94q39 31 127 84q-6 8 -19.5 22.5l-24 26.5t-18.5 25q-29 39 -51 82q-20 39 -37 94q-14 45 -14 106q0 76 24 135q23 51 74 101q43 41 115 63q63 20 157 21q86 0 148 -21q70 -23 112 -63q41 -39 68 -101q25 -59 25 -135 q0 -63 -25 -118q-25 -53 -68 -101q-47 -51 -96 -86q-57 -41 -114 -76l352 -372q25 25 49 59l39 64q14 25 29 73q20 68 24 86h184q-16 -68 -36 -121q-31 -80 -45 -104q-33 -57 -60 -92q-45 -57 -72 -84l277 -293h-225l-168 172q-41 -39 -97 -80q-51 -39 -102 -61 q-55 -25 -117 -37q-72 -14 -139 -14q-109 0 -188 26q-86 29 -141.5 78t-88.5 127q-30 74 -30 170zM299 387q0 -55 18 -100q18 -47 50 -78q29 -29 82 -49q49 -18 108 -19q66 0 107 11q53 12 92 32q45 23 78 47q41 31 67 58l-387 407l-92 -65q-40 -31 -68 -68q-25 -33 -41 -78 q-14 -41 -14 -98zM422 1165q0 -37 8 -67q6 -25 25 -64q10 -23 43 -67q23 -31 61 -70q55 33 103 66q35 25 69 63q25 27 43 68q14 31 14 75q0 35 -12 66q-12 33 -37 53q-27 25 -57 35q-35 12 -74 12q-86 0 -137 -45q-49 -43 -4
 9 -125z" />
+<glyph unicode="'" horiz-adv-x="462" d="M133 1462h197l-41 -528h-115z" />
+<glyph unicode="(" horiz-adv-x="614" d="M82 561q0 123 18 246q18 125 56 237q37 117 92 220q53 100 135 198h172q-137 -188 -213 -424q-72 -223 -72 -475q0 -121 19 -237q20 -131 53 -232q37 -115 88 -219q39 -80 123 -199h-170q-86 100 -135 193q-57 109 -92 215q-37 114 -56 233q-18 121 -18 244z" />
+<glyph unicode=")" horiz-adv-x="614" d="M61 1462h172q76 -92 134 -198q59 -113 94 -220q37 -113 55 -237q18 -123 18.5 -246t-18.5 -244q-18 -120 -55 -233q-31 -96 -94 -215q-53 -98 -134 -193h-170q78 109 121 199q57 119 90 219.5t54 231.5q18 117 18 237q0 242 -72 475q-70 227 -213 424z" />
+<glyph unicode="*" d="M82 1081l29 193l391 -111l-43 393h205l-43 -393l397 111l26 -193l-378 -28l245 -326l-178 -96l-176 358l-158 -358l-184 96l242 326z" />
+<glyph unicode="+" d="M102 647v150h387v389h150v-389h387v-150h-387v-385h-150v385h-387z" />
+<glyph unicode="," horiz-adv-x="512" d="M63 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h198l15 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124q-6 -16 -51 -117h-138z" />
+<glyph unicode="-" horiz-adv-x="657" d="M82 465v168h496v-168h-496z" />
+<glyph unicode="." horiz-adv-x="548" d="M147 111q0 35 11 65q10 29 26 43q20 16 39 23q29 8 51 8q16 0 50 -8q20 -4 41 -23q16 -14 26 -43q10 -31 10 -65q0 -33 -10 -64q-8 -25 -26 -43q-14 -14 -41 -24q-23 -8 -50 -9q-33 0 -51 9q-25 10 -39 24q-18 18 -26 43q-11 31 -11 64z" />
+<glyph unicode="/" horiz-adv-x="763" d="M20 0l545 1462h178l-544 -1462h-179z" />
+<glyph unicode="0" d="M98 733q0 176 25 318q23 135 82 235q55 96 143 147.5t215 51.5q115 0 207 -51q86 -47 145 -146q61 -100 89 -237q29 -147 28 -318q0 -164 -26 -317q-23 -133 -82 -238q-51 -92 -146 -147q-88 -51 -215 -51q-121 0 -205 51q-90 55 -145 147q-59 98 -86 238 q-29 147 -29 317zM283 733q0 -143 16 -262q16 -121 47 -186q35 -76 86 -113t131 -37q76 0 131 37q53 37 88 110.5t49 186.5q16 121 16.5 264.5t-16.5 261.5q-16 113 -49 187q-35 74 -88 110q-55 37 -131 37q-80 0 -131 -37q-52 -37 -86 -110q-31 -66 -47 -187 q-16 -119 -16 -262z" />
+<glyph unicode="1" d="M178 1163l383 299h150v-1462h-176v913v93q0 16 1 47.5t1 48.5l4 94q0 14 1 41t1 37l-31 -31l-25 -24q-14 -12 -28 -27q-8 -8 -17.5 -15.5l-19.5 -15.5l-148 -121z" />
+<glyph unicode="2" d="M96 0v156l350 381l134 147q57 66 100 131q41 61 63.5 129t22.5 141q0 63 -16 105q-18 45 -50 76q-33 33 -73 47q-45 16 -97 16q-96 0 -172 -39q-88 -45 -145 -98l-102 119q40 37 86 67q55 37 100 56q68 29 111 36q59 12 124 13q98 0 173 -27q76 -27 133 -78 q49 -43 82 -123q31 -74 30 -163q0 -88 -26 -162q-29 -80 -74 -152q-51 -82 -111 -149l-139 -156l-281 -299v-8h689v-166h-912z" />
+<glyph unicode="3" d="M82 59v170q88 -47 188 -71q102 -25 195 -25q96 0 160 21q70 23 110 57q43 37 63.5 90t20.5 121q0 70 -26 117q-29 49 -76 79q-51 33 -119 48q-66 14 -160 14h-133v151h133q82 0 144 21q70 23 106 55q43 37 64 88q23 55 22 113q0 52 -18 92q-20 45 -51 70q-39 33 -78 45 q-43 14 -103 14q-109 0 -188 -33q-84 -35 -156 -88l-92 125q31 25 84 58q35 20 102 47q49 18 117 32q61 12 133 13q109 0 189 -27q84 -29 137 -76q57 -51 84 -114q27 -66 27 -146q0 -70 -23 -133t-64 -104q-45 -45 -100 -72q-61 -29 -129 -41v-6q174 -20 268 -113 q92 -90 93 -235q0 -98 -33 -176t-98.5 -137.5t-165.5 -90.5q-109 -33 -240 -32q-109 0 -205 18q-106 20 -182 61z" />
+<glyph unicode="4" d="M23 328v159l663 983h188v-976h213v-166h-213v-328h-176v328h-675zM201 494h497v356q0 18 1 57t1 60q0 82 2 120q0 18 1.5 54.5t3.5 54.5q4 70 4 86h-9q-2 -8 -9 -23.5t-9 -21.5q-6 -16 -22.5 -49t-24.5 -47q-16 -29 -25 -39z" />
+<glyph unicode="5" d="M131 59v172q37 -23 78 -41q43 -18 92 -30q47 -12 100 -19q49 -6 91 -6q80 0 141 19q63 18 104 57q47 45 68 98q23 61 22 140q0 143 -88 218.5t-256 75.5q-39 0 -59 -2q-10 0 -30.5 -4t-31.5 -4q-10 -2 -31.5 -5t-29.5 -3q-10 -2 -27.5 -5t-21.5 -3l-90 57l55 688h690 v-166h-532l-39 -419q53 10 84 14q51 6 125 6q102 0 184 -27q86 -29 149.5 -82t100.5 -135q35 -76 35 -184q0 -115 -33 -205q-31 -86 -102 -153q-63 -61 -166 -97q-100 -35 -226 -34q-51 0 -100 6q-66 8 -96 14q-46 9 -86 25q-47 18 -74 34z" />
+<glyph unicode="6" d="M113 625q0 92 10 209q10 106 37 200q27 90 73 176q45 82 117 144q68 59 170 94q100 35 232 35h43q12 0 45 -4q16 -2 45 -6q25 -4 39 -9v-155q-33 12 -78 18q-43 6 -88 6q-86 0 -158 -22q-76 -25 -119 -60q-53 -43 -84 -94q-35 -57 -55 -119q-20 -63 -31 -139 q-9 -74 -12 -154h12q22 37 49 68q29 31 66 53.5t86 34.5q53 14 106 14q95 0 173 -30q80 -33 131 -86q49 -53 82 -140q31 -82 30 -188q0 -113 -30 -205q-29 -88 -91 -155q-57 -63 -139 -97q-86 -35 -184 -34q-102 0 -187 38q-88 41 -151 119q-66 80 -102 203q-37 119 -37 285 zM295 506q0 -66 18 -133q18 -66 56 -119q39 -55 92 -88t127 -33q63 0 110 21q49 23 84 61q39 45 56 104q20 72 20 152q0 66 -16 125q-14 53 -49 94q-33 39 -84 62q-47 20 -115 20t-123 -24q-57 -27 -94 -60t-60 -86q-22 -51 -22 -96z" />
+<glyph unicode="7" d="M90 1296v166h940v-145l-555 -1317h-194l563 1296h-754z" />
+<glyph unicode="8" d="M106 373q0 72 23 135q18 55 59 108q33 43 90.5 84t110.5 66q-49 31 -92 68q-45 39 -74 81q-37 55 -51 99q-18 55 -18 121q0 88 34 153q37 70 91 109q61 45 131 65q78 23 155 23q80 0 158 -23q76 -23 131 -65.5t90 -110.5q33 -63 33 -153q0 -68 -21 -121q-20 -51 -55 -97 q-41 -51 -82 -79q-49 -34 -104 -62q49 -25 114 -69q47 -33 99 -87q39 -41 69 -106q27 -55 27 -131q0 -94 -33 -166q-35 -78 -94 -127q-63 -53 -145 -80q-90 -29 -187 -28q-115 0 -196.5 26.5t-143.5 77.5q-55 47 -88 125q-31 74 -31 164zM285 371q0 -51 16 -97 q18 -49 49 -77q31 -27 86 -47q51 -18 125 -19q71 0 123 19q59 20 90 49q35 33 53 77q18 47 19 103q0 51 -19 94q-16 35 -57 78q-39 39 -88 67q-88 51 -113 64l-30 14q-127 -61 -190.5 -136.5t-63.5 -188.5zM332 1126q0 -58 18 -98q23 -49 47 -74q33 -33 76 -57 q47 -27 94 -49q18 8 90 49q45 27 74 57q31 35 49 76q18 43 19 96q0 102 -64 154q-66 53 -172 53q-104 0 -167.5 -53.5t-63.5 -153.5z" />
+<glyph unicode="9" d="M106 991q0 113 31 205q29 88 90 156q59 66 139 98.5t184.5 32.5t188.5 -39q88 -41 152 -119q63 -80 100 -201q37 -123 37 -286q0 -92 -10 -209q-10 -106 -37 -201q-27 -90 -74 -176q-45 -82 -116 -143q-68 -59 -170 -95q-100 -35 -232 -34q-6 0 -20.5 1t-22.5 1 q-31 0 -45 2l-45 6q-25 4 -39 8v156q33 -12 80 -19q43 -6 86 -6q133 0 221 47q86 47 139 127q49 76 72 189q20 100 27 225h-13q-22 -37 -49 -68q-29 -31 -65 -53q-47 -27 -86 -37q-49 -12 -107 -12q-100 0 -172 28q-76 31 -131 89q-53 55 -84 139q-29 77 -29 188zM283 991 q0 -66 16 -125q16 -57 49 -96q31 -37 84 -59q47 -20 115 -21q72 0 123 23q53 25 94 61q40 37 61 86q20 47 21 96q0 66 -19 134q-18 70 -55 120q-39 55 -90 86q-53 33 -129 33q-61 0 -109 -20q-53 -23 -86 -62q-37 -43 -55 -106q-20 -72 -20 -150z" />
+<glyph unicode=":" horiz-adv-x="548" d="M147 111q0 35 11 65q10 29 26 43q20 16 39 23q29 8 51 8q16 0 50 -8q20 -4 41 -23q16 -14 26 -43q10 -31 10 -65q0 -33 -10 -64q-8 -25 -26 -43q-14 -14 -41 -24q-23 -8 -50 -9q-33 0 -51 9q-25 10 -39 24q-18 18 -26 43q-11 31 -11 64zM147 987q0 35 11 66q10 29 26 43 q20 16 39 22q29 8 51 8q16 0 50 -8q20 -4 41 -22q16 -14 26 -43q10 -31 10 -66q0 -37 -10 -63.5t-26 -42.5q-14 -14 -41 -25q-23 -8 -50 -8q-33 0 -51 8q-25 10 -39 25q-16 16 -26.5 42.5t-10.5 63.5z" />
+<glyph unicode=";" horiz-adv-x="548" d="M63 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h198l15 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124q-6 -16 -51 -117h-138zM147 987q0 35 11 66q10 29 26 43q20 16 39 22q29 8 51 8q16 0 50 -8q20 -4 41 -22q16 -14 26 -43q10 -31 10 -66 q0 -37 -10 -63.5t-26 -42.5q-14 -14 -41 -25q-23 -8 -50 -8q-33 0 -51 8q-25 10 -39 25q-16 16 -26.5 42.5t-10.5 63.5z" />
+<glyph unicode="&#x3c;" d="M102 662v102l924 481v-160l-735 -364l735 -322v-161z" />
+<glyph unicode="=" d="M102 442v150h924v-150h-924zM102 852v149h924v-149h-924z" />
+<glyph unicode="&#x3e;" d="M102 238v161l736 322l-736 364v160l924 -481v-102z" />
+<glyph unicode="?" horiz-adv-x="870" d="M37 1382q70 37 176 72q88 29 190 29q94 0 168 -25q72 -25 125.5 -74t79.5 -118q29 -74 29 -156q0 -57 -14 -119q-12 -55 -39 -98q-23 -37 -68 -86q-47 -51 -94 -90q-53 -45 -84 -78q-35 -35 -53 -66q-23 -37 -27 -63q-6 -35 -6 -78v-18h-139v37q0 43 8 104q4 37 26 84 q16 37 54 80q27 31 82 80q33 27 81 75q34 34 56 68q25 39 33 74q10 45 10 92q0 51 -15 88q-15 40 -43 68q-27 27 -71.5 43t-98.5 16q-78 0 -157 -27q-70 -23 -146 -59zM233 111q0 35 11 65q10 29 26 43q20 16 39 23q29 8 51 8q16 0 50 -8q20 -4 41 -23q16 -14 26 -43 q10 -31 10 -65q0 -33 -10 -64q-8 -25 -26 -43q-14 -14 -41 -24q-23 -8 -50 -9q-33 0 -51 9q-25 10 -39 24q-18 18 -26 43q-11 31 -11 64z" />
+<glyph unicode="@" horiz-adv-x="1773" d="M109 575q0 184 59 351q57 162 168 280q113 123 266 189q156 68 348 67q150 0 287 -51q131 -49 227.5 -145.5t147.5 -229.5q53 -137 53 -305q0 -57 -10 -125q-10 -72 -27 -119q-16 -51 -47 -104q-20 -37 -68 -84q-35 -35 -86 -57q-47 -20 -106 -21q-47 0 -82 14.5 t-61 40.5q-31 31 -43 58q-16 37 -23 67h-4q-18 -37 -45 -69q-29 -37 -62 -58q-31 -20 -81 -38q-41 -14 -97 -15q-76 0 -137 29q-59 29 -100 78q-39 49 -62 121q-23 74 -22 157q0 101 30 185q33 88 84 145q53 59 135.5 94t176.5 35q29 0 90 -4q35 -2 86 -10q37 -6 76 -17 q53 -14 57 -16l-23 -416q0 -8 -1 -19.5t-1 -15.5v-22v-13v-6q0 -51 11 -88q8 -33 26.5 -53t38.5 -27q29 -8 45 -8q46 0 80 31q37 33 60 82q20 45 34 123q12 71 13 147q0 141 -43 252t-119 186q-78 78 -180.5 117t-227.5 39q-170 0 -299 -55q-127 -53 -215 -156 q-86 -98 -133 -235q-45 -133 -45 -299q0 -154 39 -269q40 -117 117 -196q78 -82 190 -121q117 -41 260 -41q61 0 121 6q43 4 115 21q68 14 104 26q66 20 94 33v-141q-90 -39 -194 -60q-113 -23 -238 -22q-180 0 -319 51t-237.5 149.5t-1
 49.5 237.5t-51 319zM662 602 q0 -131 51 -192q49 -59 135 -60q53 0 94 23q39 20 64 63q29 51 38 99q14 63 17 127l14 253q-23 8 -67 15q-41 6 -80 6q-74 0 -125 -28.5t-82 -76.5q-29 -45 -45 -106q-14 -57 -14 -123z" />
+<glyph unicode="A" horiz-adv-x="1243" d="M0 0l537 1468h170l538 -1468h-190l-160 453h-545l-162 -453h-188zM410 618h426l-148 424l-4 12.5l-4 12.5l-6 18q-2 10 -8.5 25.5t-10.5 32.5l-16 61q-4 18 -9 33.5t-9 30.5q-2 -12 -17 -64l-16 -63q-9 -31 -19 -56q-4 -10 -6 -18t-4 -12t-4 -13z" />
+<glyph unicode="B" horiz-adv-x="1271" d="M199 0v1462h399q117 0 225 -20q100 -18 164 -61.5t98 -114.5q33 -68 33 -174q0 -53 -20 -115q-18 -57 -56 -96q-37 -40 -92 -68t-123 -37v-10q61 -10 129 -35q59 -20 107 -61q45 -39 70 -101q27 -66 26 -145q0 -100 -32.5 -178t-94.5 -133q-63 -57 -149 -84 q-92 -29 -199 -29h-485zM385 158h266q92 0 148 20q66 25 96 55q35 35 51 86q16 53 17 113q0 53 -17 103q-16 47 -53 81q-35 31 -100 52q-61 18 -154 18h-254v-528zM385 842h244q86 0 141 14q59 16 92 45q37 33 51.5 74t14.5 104q0 121 -76 172.5t-244 51.5h-223v-461z" />
+<glyph unicode="C" horiz-adv-x="1234" d="M125 733q0 164 43 303.5t129 237.5q88 100 209 153q125 55 287 56q104 0 206 -23q98 -20 177 -63l-78 -156q-82 39 -137 55q-78 23 -168 23q-106 0 -195 -41q-86 -40 -147 -117q-59 -74 -94 -184.5t-35 -245.5q0 -139 30 -250q31 -113 88 -184q59 -76 148 -115 q86 -39 205 -39q98 0 170 17q66 14 157 41v-162q-35 -14 -78 -27q-41 -12 -81 -18q-57 -8 -91 -10q-66 -4 -108 -4q-164 0 -285 55t-198 151q-76 92 -115 240q-39 145 -39 307z" />
+<glyph unicode="D" horiz-adv-x="1400" d="M199 0v1462h407q152 0 277 -47q127 -47 211 -135q90 -94 135 -225q47 -137 47 -310q0 -193 -47 -325q-51 -143 -139 -232q-98 -98 -224 -141q-135 -47 -301 -47h-366zM385 160h162q264 0 397 145q135 147 135 434q0 147 -32 252q-35 113 -97 176q-68 70 -155 103 q-90 33 -209 33h-201v-1143z" />
+<glyph unicode="E" horiz-adv-x="1079" d="M199 0v1462h759v-164h-573v-452h535v-162h-535v-520h573v-164h-759z" />
+<glyph unicode="F" horiz-adv-x="1005" d="M199 0v1462h759v-164h-573v-516h535v-164h-535v-618h-186z" />
+<glyph unicode="G" horiz-adv-x="1411" d="M125 733q0 170 47 311q45 135 139 236q92 98 224 150q135 53 305 53q106 0 213 -23q104 -23 190 -63l-72 -162q-35 18 -77 33q-29 10 -86 26q-43 12 -90 19q-46 6 -93 6q-119 0 -217 -41q-92 -39 -157 -117q-61 -74 -97 -184q-33 -104 -32 -246q0 -127 28 -237 q31 -117 86 -187q63 -80 156 -121q96 -43 229 -43q55 0 80 2q37 3 68 7q25 2 59 10q27 6 53 10v436h-299v164h484v-717q-37 -12 -111 -32q-37 -10 -115 -23q-39 -6 -125 -14q-63 -6 -139 -6q-156 0 -278 53q-121 53 -203 149q-84 100 -127 238t-43 313z" />
+<glyph unicode="H" horiz-adv-x="1435" d="M199 0v1462h186v-616h666v616h186v-1462h-186v682h-666v-682h-186z" />
+<glyph unicode="I" horiz-adv-x="692" d="M82 0v102l172 41v1176l-172 41v102h530v-102l-172 -41v-1176l172 -41v-102h-530z" />
+<glyph unicode="J" horiz-adv-x="552" d="M-184 -205q25 -6 73 -14q41 -6 84 -6q33 0 74 10q35 8 68 35q35 27 51 67q18 43 18 113v1462h187v-1442q0 -111 -29 -182q-33 -80 -82 -127q-55 -51 -127 -76q-74 -25 -162 -24q-53 0 -90 6q-39 6 -65 18v160z" />
+<glyph unicode="K" horiz-adv-x="1185" d="M199 0v1462h186v-731l121 168l452 563h209l-520 -637l539 -825h-211l-451 698l-139 -114v-584h-186z" />
+<glyph unicode="L" horiz-adv-x="1005" d="M199 0v1462h186v-1296h573v-166h-759z" />
+<glyph unicode="M" horiz-adv-x="1781" d="M199 0v1462h276l412 -1192h6l414 1192h276v-1462h-186v887q0 74 2 119l6 129l6 143h-8l-447 -1278h-153l-443 1280h-8q8 -98 10 -147q6 -109 7 -132q2 -47 2 -127v-874h-172z" />
+<glyph unicode="N" horiz-adv-x="1492" d="M199 0v1462h213l716 -1204h7l-7 150q0 10 -1 31.5t-1 33.5l-4 68q0 12 -1 32.5t-1 30.5v58v800h174v-1462h-215l-719 1210h-8q8 -102 10 -153l7 -135q2 -47 2 -129v-793h-172z" />
+<glyph unicode="O" horiz-adv-x="1519" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q154 0 272.5 -53.5t198.5 -151.5q78 -96 119 -237.5t41 -309.5q0 -166 -41 -307q-41 -145 -119 -240q-78 -96 -199 -151t-274 -55q-163 0 -283 55q-121 55 -198 151q-76 92 -115 240q-39 145 -39 309z M322 733q0 -127 26 -246q23 -102 80 -186q52 -77 135 -117q86 -41 196.5 -41t196.5 41q83 40 136 117q57 84 79 186q25 111 25 246q0 139 -25 248q-25 104 -77 184q-49 74 -135.5 115t-197 41t-196.5 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248z" />
+<glyph unicode="P" horiz-adv-x="1179" d="M199 0v1462h362q129 0 232 -28q92 -27 159 -84q61 -53 92 -133t31 -183q0 -90 -28.5 -176t-90.5 -147q-63 -63 -165.5 -102.5t-255.5 -39.5h-150v-569h-186zM385 727h129q86 0 162 16q70 14 115 52q49 39 69 92q23 57 23 137q0 143 -82 211q-84 68 -256 68h-160v-576z " />
+<glyph unicode="Q" horiz-adv-x="1517" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q154 0 272.5 -53.5t198.5 -151.5q78 -96 119 -237.5t41 -309.5q0 -131 -25 -244q-25 -115 -72 -204.5t-118 -155.5q-76 -70 -164 -104q41 -92 112 -166q63 -66 158 -131l-121 -142q-104 74 -190 172 q-84 94 -137 226q-12 -2 -37 -2q-8 0 -20.5 -1t-18.5 -1q-163 0 -283 55q-121 55 -198 151q-76 92 -115 240q-39 145 -39 309zM322 733q0 -127 26 -246q23 -102 80 -186q52 -77 135 -117q86 -41 196.5 -41t196.5 41q83 40 136 117q57 84 79 186q25 111 25 246q0 139 -25 248 q-25 104 -77 184q-49 74 -135.5 115t-197 41t-196.5 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248z" />
+<glyph unicode="R" horiz-adv-x="1206" d="M199 0v1462h356q270 0 393 -102q127 -104 127 -313q0 -88 -24 -152q-25 -61 -66 -110.5t-92 -77.5q-49 -29 -107 -52l398 -655h-219l-351 604h-229v-604h-186zM385 762h164q89 0 153 18q63 18 103 51q41 35 59 87q18 53 19 120q0 74 -21 121q-25 55 -61 82 q-47 33 -105 47q-59 14 -151 15h-160v-541z" />
+<glyph unicode="S" horiz-adv-x="1062" d="M104 49v178q51 -23 78 -32q39 -14 90 -27q49 -12 101 -18q70 -8 100 -9q162 0 236 60q78 61 77 172q0 57 -14 94q-16 41 -51 74q-39 37 -98 65q-61 31 -154 68q-92 35 -154 76q-70 45 -108 94q-41 49 -64 119q-20 61 -20 149q0 86 32.5 157.5t90.5 116.5q61 49 137 72 q80 25 178 25q113 0 213 -23q88 -20 170 -57l-67 -156q-76 33 -148 51q-80 20 -170 21q-119 0 -188 -57q-68 -55 -68 -152q0 -57 14 -98q14 -39 52 -76q27 -27 92 -62q49 -27 141 -63.5t160 -73.5q70 -39 115 -86q47 -49 69 -110q23 -59 23 -150q0 -94 -35 -174 q-34 -77 -98 -129q-66 -53 -156 -80q-96 -29 -207 -28q-113 0 -207 18q-103 20 -162 51z" />
+<glyph unicode="T" horiz-adv-x="1062" d="M20 1298v164h1022v-164h-417v-1298h-187v1298h-418z" />
+<glyph unicode="U" horiz-adv-x="1429" d="M184 520v942h187v-952q0 -175 86 -270q86 -96 262 -97q92 0 153 27q66 29 105 76q40 49 61 116q20 63 21 150v952h186v-948q0 -117 -33 -213q-35 -102 -100 -170q-72 -76 -166 -113q-104 -41 -237 -40q-129 0 -226 38q-98 39 -164 109q-68 70 -102 172q-33 96 -33 221z " />
+<glyph unicode="V" horiz-adv-x="1161" d="M0 1462h197l295 -927l51 -175l37 -159l38 159q12 49 54 181l293 921h198l-489 -1462h-187z" />
+<glyph unicode="W" horiz-adv-x="1808" d="M20 1462h197l223 -889l23 -96l18 -98q6 -33 15 -94q6 -51 12 -84q6 37 12 86q2 18 9.5 54t9.5 48q12 74 20 111q12 55 25 104l225 858h197l229 -856l29 -112l14 -49t14 -60q6 -23 21 -98q12 -61 16 -86q2 18 10 84q8 61 15 94q4 18 9 51t7 49q10 63 21 101l200 882h199 l-367 -1462h-188l-254 938q-14 47 -27 104l-12 51.5l-12 51.5l-23 106q-4 -23 -10 -49t-12 -57l-23 -103q-16 -74 -26 -110l-242 -932h-188z" />
+<glyph unicode="X" horiz-adv-x="1118" d="M0 0l453 764l-422 698h198l332 -559l334 559h190l-421 -692l456 -770h-211l-354 635l-367 -635h-188z" />
+<glyph unicode="Y" horiz-adv-x="1077" d="M0 1462h203l336 -739l340 739h200l-446 -893v-569h-187v559z" />
+<glyph unicode="Z" horiz-adv-x="1103" d="M82 0v145l711 1151h-691v166h899v-145l-710 -1151h731v-166h-940z" />
+<glyph unicode="[" horiz-adv-x="620" d="M164 -324v1786h405v-149h-223v-1487h223v-150h-405z" />
+<glyph unicode="\" horiz-adv-x="763" d="M23 1462h178l544 -1462h-178z" />
+<glyph unicode="]" horiz-adv-x="620" d="M51 -174h223v1487h-223v149h406v-1786h-406v150z" />
+<glyph unicode="^" horiz-adv-x="1089" d="M41 549l459 924h102l447 -924h-160l-338 735l-348 -735h-162z" />
+<glyph unicode="_" horiz-adv-x="841" d="M-4 -184h850v-140h-850v140z" />
+<glyph unicode="`" horiz-adv-x="1181" d="M393 1548v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="a" horiz-adv-x="1085" d="M94 307q0 164 115 252q115 86 352 96l184 7v69q0 70 -14 113t-43 71q-27 27 -67 39t-93 13q-86 0 -155 -25q-82 -29 -137 -57l-64 137q74 40 166 68q96 29 190 28q106 0 177 -20q72 -20 122 -66q45 -39 72 -112q25 -68 25 -168v-752h-131l-37 152h-8q-35 -45 -66 -78 t-72 -54q-41 -23 -88 -30q-55 -10 -110 -10q-61 0 -127 20q-55 18 -101 59q-39 37 -65 103q-25 61 -25 145zM283 305q0 -92 49 -135t127 -43q61 0 112 18q55 20 91 58q39 41 59 98q23 61 22 137v99l-143 -7q-80 -2 -151 -20q-55 -14 -97 -45q-39 -29 -53 -68 q-16 -43 -16 -92z" />
+<glyph unicode="b" horiz-adv-x="1198" d="M174 0v1556h182v-376q0 -10 -1 -35t-1 -39q0 -51 -2 -74l-4 -78h8q18 29 52 66q27 29 67 51q47 25 86 35q49 12 109 12q95 0 172 -37q76 -37 131 -106q51 -66 84 -178q31 -109 30 -246q0 -141 -30 -248q-33 -113 -84 -178q-57 -74 -131 -109q-77 -37 -172 -36 q-49 0 -107 14q-47 12 -86 33q-31 16 -69 51q-23 20 -52 61h-12l-37 -139h-133zM356 551q0 -100 13 -180q12 -76 47 -131q37 -57 86 -82q53 -27 135 -27q133 0 199 109q63 106 63 313q0 209 -63.5 311.5t-200.5 102.5q-82 0 -133 -24.5t-86 -78t-47.5 -131.5t-12.5 -182z " />
+<glyph unicode="c" horiz-adv-x="946" d="M113 542.5q0 149.5 39 266.5q37 111 104 178q72 72 156 100q89 31 190 31q86 0 152 -16q78 -20 125 -43l-54 -154q-14 6 -51 19q-53 18 -57 18t-26.5 5t-33.5 7q-37 4 -55 4q-160 0 -229 -100q-72 -102 -72 -313q0 -213 71.5 -309.5t221.5 -96.5q82 0 147 19 q61 18 119 43v-162q-57 -29 -115 -43q-66 -16 -151 -16q-94 0 -188 32q-89 31 -154 99q-66 70 -102.5 176t-36.5 255.5z" />
+<glyph unicode="d" horiz-adv-x="1198" d="M113 547q0 141 30 248q33 113 84 178q55 72 133 108.5t170 36.5q57 0 107 -12q33 -8 86 -37q37 -20 70 -49q23 -20 51 -62h12l-4 35t-2 31l-4 53q-2 18 -2 43v436h182v-1556h-147l-27 147h-8q-25 -39 -51 -65q-37 -37 -68 -53q-47 -25 -86 -35q-57 -14 -109 -14 q-92 0 -170 36q-80 39 -133 107q-51 66 -84 178q-30 109 -30 246zM301 545q0 -211 64 -312q66 -102 200 -102q74 0 129 23q47 18 84 69q33 45 49 119q12 59 17 164v41q0 100 -13 180q-12 76 -47 131q-37 57 -86 82q-53 27 -135 27q-133 0 -198 -109q-64 -106 -64 -313z" />
+<glyph unicode="e" horiz-adv-x="1095" d="M113 541q0 139 32 243q35 109 95 181q63 76 143 114.5t184 38.5q102 0 178 -35q78 -37 134 -100q51 -59 84 -156q31 -90 30 -200v-113h-692q6 -195 82 -285t227 -90q66 0 95 4q57 8 83 15q43 10 78 24q70 29 78 33v-162l-78 -33q-27 -10 -80 -22t-84 -14q-57 -4 -94 -4 q-109 0 -201 36.5t-157 108.5q-61 68 -100 176q-37 105 -37 240zM305 662h492q0 70 -13 124q-10 51 -43 97q-27 39 -71.5 61.5t-106.5 22.5q-113 0 -180 -78q-66 -73 -78 -227z" />
+<glyph unicode="f" horiz-adv-x="673" d="M29 961v75l194 68v96q0 104 23 178q20 68 65 113q41 41 105 59q55 16 139 17q68 0 109 -11q53 -14 88 -26l-47 -141q-25 10 -68 20q-33 8 -76 8q-39 0 -69.5 -10t-47.5 -33q-20 -27 -28 -65q-10 -47 -10 -107v-104h245v-137h-245v-961h-183v961h-194z" />
+<glyph unicode="g" horiz-adv-x="1060" d="M37 -186q0 55 20 106q18 45 52 78q29 29 77 53q37 18 90 33q-41 16 -69 59q-27 39 -27 95q0 61 33 106q29 41 100 86q-39 16 -77 49q-35 29 -62 72q-25 41 -37 88q-14 57 -14 100q0 88 24 158q25 72 74 121t123 74q80 27 170 26q35 0 76 -6q45 -6 67 -14h363v-113 l-197 -27q29 -35 47.5 -90t18.5 -123q0 -82 -23 -141q-25 -63 -71 -110q-46 -46 -117 -74q-68 -27 -164 -27h-45q-14 0 -35 4q-12 -6 -33 -22q-23 -16 -30 -29q-14 -18 -22.5 -36.5t-8.5 -43.5q0 -28 12 -43q14 -18 33 -26q23 -10 47 -13q18 -2 60 -2h176q94 0 157 -24 q66 -25 105 -64t57.5 -94t18.5 -115q0 -90 -33 -157q-35 -72 -99 -119q-72 -51 -169 -76q-102 -25 -242 -25q-111 0 -187 21q-82 23 -133 61.5t-80 96.5q-26 53 -26 127zM209 -180q0 -39 12 -70q12 -33 43 -53q39 -27 78 -37q57 -14 121 -14q188 0 278 57q92 58 93 166 q0 49 -13 76q-14 31 -39 45q-31 16 -71 22q-46 6 -111 6h-176q-41 0 -74 -8q-41 -10 -69 -30q-31 -23 -52 -60q-20 -39 -20 -100zM301 745.5q0 -118.5 53 -172.5q55 -55 153.5 -55t151.5 55q51 53 52 175q0 125 -51.5 182t-153.
 5 57q-100 0 -152 -59q-53 -64 -53 -182.5z " />
+<glyph unicode="h" horiz-adv-x="1204" d="M174 0v1556h182v-462l-8 -144h10q23 41 60 74q33 31 76 53q40 22 86 31q51 10 94 10q184 0 276 -96t92 -305v-717h-182v707q0 129 -53 194.5t-164 65.5q-76 0 -135 -27q-57 -27 -90 -76q-31 -47 -47 -125q-14 -70 -15 -170v-569h-182z" />
+<glyph unicode="i" horiz-adv-x="528" d="M160 1395q0 59 30 88q29 27 76 26q23 0 41 -6q20 -8 35 -20q12 -12 23 -37q8 -18 8 -51q0 -58 -31 -86q-33 -29 -76 -29t-76 29q-30 28 -30 86zM174 0v1098h182v-1098h-182z" />
+<glyph unicode="j" horiz-adv-x="528" d="M-68 -319q16 -6 54 -15q28 -6 61 -6q20 0 49 8q20 6 41 27q18 18 27 51q10 37 10 84v1268h182v-1256q0 -84 -16 -139q-20 -66 -53 -104q-37 -43 -92 -68q-51 -23 -129 -23q-49 0 -80 7q-33 6 -54 18v148zM160 1395q0 59 30 88q29 27 76 26q23 0 41 -6q20 -8 35 -20 q12 -12 23 -37q8 -18 8 -51q0 -58 -31 -86q-33 -29 -76 -29t-76 29q-30 28 -30 86z" />
+<glyph unicode="k" horiz-adv-x="1015" d="M174 0v1556h180v-714l-16 -275h4l135 170l293 361h211l-401 -475l428 -623h-209l-336 504l-109 -82v-422h-180z" />
+<glyph unicode="l" horiz-adv-x="528" d="M174 0v1556h182v-1556h-182z" />
+<glyph unicode="m" horiz-adv-x="1832" d="M174 0v1098h148l26 -148h10q27 45 58 74q39 37 71 53q39 20 84 31q47 10 91 10q117 0 200 -45q80 -43 117 -137h8q27 49 62 82q35 31 81 55q49 25 90.5 35t98.5 10q174 0 264 -96q88 -94 88 -305v-717h-182v707q0 129 -49 194.5t-156 65.5q-78 0 -125 -22.5t-82 -70 t-49 -112.5q-14 -63 -14 -156v-606h-183v707q0 129 -49 194.5t-155 65.5q-72 0 -129 -27q-55 -27 -84 -76q-35 -57 -45 -125q-12 -74 -13 -170v-569h-182z" />
+<glyph unicode="n" horiz-adv-x="1204" d="M174 0v1098h148l26 -148h10q23 41 60 74q33 31 76 53q40 22 86 31q51 10 94 10q184 0 276 -96t92 -305v-717h-182v707q0 129 -53 194.5t-164 65.5q-76 0 -135 -27q-57 -27 -90 -76q-31 -47 -47 -125q-14 -70 -15 -170v-569h-182z" />
+<glyph unicode="o" horiz-adv-x="1181" d="M113 551q0 133 34 242q35 106 95 178q61 74 151 110.5t201 36.5q104 0 190 -37q84 -37 150 -110q63 -72 100 -178q35 -98 35 -242q0 -139 -33 -244q-31 -100 -96 -178q-61 -74 -152 -111q-94 -39 -200 -38q-100 0 -191 38q-84 37 -149 111q-61 70 -98 178 q-37 107 -37 244zM301 551q0 -211 67.5 -315.5t223.5 -104.5q154 0 221.5 104.5t67.5 315.5q0 209 -68 313q-66 102 -223 103q-156 0 -221 -103q-68 -104 -68 -313z" />
+<glyph unicode="p" horiz-adv-x="1198" d="M174 -492v1590h148l26 -148h8q18 29 52 66q29 33 67 53q47 25 86 35q57 14 109 14q95 0 172 -37q76 -37 131 -106q51 -66 84 -178q31 -109 30 -246q0 -141 -30 -248q-33 -113 -84 -178q-57 -74 -131 -109q-77 -37 -172 -36q-49 0 -107 14q-47 12 -86 33q-31 16 -69 51 q-23 20 -52 61h-12l4 -34.5t2 -30.5l4 -54q2 -18 2 -43v-469h-182zM356 551q0 -100 13 -180q12 -76 47 -131q37 -57 86 -82q53 -27 135 -27q133 0 199 109q63 106 63 313q0 209 -63.5 311.5t-200.5 102.5q-74 0 -129 -23q-47 -18 -84 -70q-34 -46 -49 -116q-12 -59 -17 -166 v-41z" />
+<glyph unicode="q" horiz-adv-x="1198" d="M113 547q0 141 30 248q33 113 84 178q55 72 133 108.5t170 36.5q49 0 107 -14q47 -12 86 -35q35 -20 67.5 -53t53.5 -66h8l27 148h147v-1590h-182v469q0 29 2 48q0 10 1 20t2 17.5t1 19.5q0 16 2 31.5t4 33.5h-12q-25 -39 -51 -65q-37 -37 -68 -53q-47 -25 -86 -35 q-57 -14 -109 -14q-92 0 -170 36q-80 39 -133 107q-51 66 -84 178q-30 109 -30 246zM301 545q0 -211 64 -312q66 -102 200 -102q74 0 129 23q47 18 84 69q33 45 49 119q12 59 17 164v41q0 100 -13 180q-12 76 -47 131q-37 57 -86 82q-53 27 -135 27q-133 0 -198 -109 q-64 -106 -64 -313z" />
+<glyph unicode="r" horiz-adv-x="815" d="M174 0v1098h148l22 -201h8q23 41 54 84q27 39 63.5 69.5t79.5 49t100 18.5q41 0 66 -2q43 -4 61 -8l-24 -168q-20 4 -58 8q-41 4 -55 4q-57 0 -115 -26q-53 -25 -90 -72q-35 -43 -57 -115q-20 -63 -21 -147v-592h-182z" />
+<glyph unicode="s" horiz-adv-x="923" d="M90 49v166q20 -10 70 -31q45 -18 80 -28q43 -12 86 -19q57 -8 88 -8q72 0 110 10q47 12 74 33q31 25 41 49q14 37 14 65.5t-10 55.5t-37 51q-31 27 -71 49q-37 20 -119 56q-71 31 -129.5 61.5t-98.5 67.5q-41 39 -61 84q-20 47 -21 116q0 72 27 125q25 51 78 90t121 58 q70 18 155 18q100 0 177 -20q86 -23 153 -56l-63 -147q-80 35 -133 51q-63 20 -140 21q-104 0 -151 -33q-49 -33 -49 -96q0 -37 12 -62q16 -31 39 -49q18 -14 76 -45q53 -29 116 -53q102 -45 129 -60q57 -33 97 -67q40 -37 61 -86q20 -47 20 -115q0 -76 -28 -139 q-27 -59 -84 -101q-55 -41 -131 -61q-74 -20 -174 -20q-111 0 -187 18q-84 20 -137 51z" />
+<glyph unicode="t" horiz-adv-x="692" d="M33 961v81l155 78l78 230h105v-252h276v-137h-276v-637q0 -92 32 -146q31 -49 103 -49q27 0 41 2q6 0 20.5 2t22.5 2l20.5 5t18.5 3q16 2 26 7v-138q-14 -6 -32 -12q-29 -8 -45 -10q-8 -2 -24.5 -4t-25.5 -4q-16 -2 -51 -2q-59 0 -115 16q-52 15 -92 55q-39 39 -59 105 q-23 72 -23 168v637h-155z" />
+<glyph unicode="u" horiz-adv-x="1204" d="M164 381v717h182v-707q0 -129 53.5 -194.5t163.5 -65.5q76 0 135 27q55 25 90 75q31 43 48 125q14 70 14 170v570h182v-1098h-147l-27 147h-10q-27 -45 -60 -75q-29 -25 -75 -52q-40 -22 -86 -30q-51 -10 -95 -10q-88 0 -159 22q-68 23 -117 74q-41 45 -68 125 q-24 78 -24 180z" />
+<glyph unicode="v" horiz-adv-x="980" d="M0 1098h188l199 -611q6 -18 27 -86l28 -104q6 -25 14.5 -51.5t14.5 -50.5q14 -57 16 -74h7l18 74q16 66 27 102l28 104q20 68 27 86l199 611h188l-375 -1098h-231z" />
+<glyph unicode="w" horiz-adv-x="1527" d="M20 1098h191l131 -584l9 -44l11 -54q12 -63 19 -103q14 -76 16 -98q2 -12 5.5 -37.5t5.5 -36.5h6q2 14 6 31.5t8 38.5q9 43 18 92q6 27 12.5 50.5t10.5 45.5q4 14 11 41t9 39l179 619h196l172 -619q8 -35 21 -80q10 -37 22 -94q4 -14 21 -92q8 -41 12 -72h6q2 8 5 33 t5 37q10 68 15 94q2 16 9 51l11 56q12 68 21 102l137 584h186l-284 -1098h-215l-168 616q-2 12 -11 41q-4 14 -12 48l-12 51l-12 51l-29 119h-6l-27 -121l-12 -53.5t-12 -49.5q-18 -76 -23 -90l-172 -612h-211z" />
+<glyph unicode="x" horiz-adv-x="1024" d="M35 0l373 563l-353 535h207l250 -410l250 410h207l-355 -535l373 -563h-207l-268 436l-270 -436h-207z" />
+<glyph unicode="y" horiz-adv-x="999" d="M10 1098h189l215 -613l28 -84q8 -20 27 -88q14 -49 23 -86q8 -39 12 -75h6l6 25l10 42q10 43 25 92q16 66 27 97q8 27 15 46t11 33l199 611h188l-434 -1241q-29 -82 -61 -146q-35 -68 -74 -108q-41 -43 -103 -70q-57 -25 -137 -25q-66 0 -90 5q-41 6 -65 12v145 q16 -4 53 -8q41 -4 67 -4q49 0 82 12q41 14 62 33q27 25 45 53q12 20 33 74l57 160z" />
+<glyph unicode="z" horiz-adv-x="901" d="M82 0v125l536 836h-503v137h688v-146l-524 -815h542v-137h-739z" />
+<glyph unicode="{" horiz-adv-x="724" d="M61 492v155q126 0 191 43q66 43 65 146v333q0 80 27 134q27 51 74 90q43 35 114 51q78 18 142 18v-149q-27 0 -72 -8q-37 -6 -55 -23q-23 -20 -35 -49q-12 -31 -12 -78v-332q0 -102 -60 -166q-57 -59 -174 -82v-12q117 -23 174 -82q59 -63 60 -166v-331q0 -47 12 -78 q12 -29 35 -49q18 -16 55 -23q45 -8 72 -8v-150q-72 0 -142 17q-68 16 -114 53q-47 39 -74 90q-27 53 -27 133v334q0 102 -65 146q-65 43 -191 43z" />
+<glyph unicode="|" d="M489 -492v2048h150v-2048h-150z" />
+<glyph unicode="}" horiz-adv-x="724" d="M51 -174q27 0 72 8q37 6 55 23q23 20 35 49q12 31 12 78v331q0 102 60 166q57 59 174 82v12q-117 23 -174 82q-59 63 -60 166v332q0 47 -12 78q-12 29 -35 49q-18 16 -55 23q-45 8 -72 8v149q63 0 142 -18q72 -16 114 -51q47 -39 74 -90q27 -53 27 -134v-333 q0 -49 16 -88q14 -35 49 -58q39 -25 82 -33q55 -10 109 -10v-155q-126 0 -191 -43q-66 -43 -65 -146v-334q0 -80 -27 -133q-27 -51 -74 -90q-47 -37 -114 -53q-70 -16 -142 -17v150z" />
+<glyph unicode="~" d="M102 586v162q102 109 248 108q37 0 53.5 -2t53.5 -10q28 -6 61 -19q43 -16 80 -32.5t64 -26.5q29 -12 51 -18q16 -4 45 -9q14 -2 41 -2q23 0 57 11q31 9 62 24q20 10 57 39q18 14 51 47v-162q-98 -109 -248 -108q-37 0 -53 2t-53 10q-28 6 -62 18q-43 16 -80 33l-65 27 q-28 12 -49 18q-14 4 -43 9q-14 2 -43 2q-31 0 -58 -9q-14 -4 -59 -26q-20 -10 -57 -39q-29 -22 -54 -47z" />
+<glyph unicode="&#xa1;" horiz-adv-x="550" d="M147 979q0 37 10.5 63.5t26.5 42.5q12 12 41 25q18 8 49 8t50 -8q29 -12 41 -25q16 -16 26 -42.5t10 -63.5q0 -33 -10 -64q-10 -29 -26 -43q-23 -20 -41 -24q-29 -8 -49.5 -8t-49.5 8q-18 4 -41 24q-16 14 -26 43q-11 31 -11 64zM162 -373l51 1049h121l51 -1049h-223z " />
+<glyph unicode="&#xa2;" d="M188 743q0 143 27 242q31 111 74 170q49 68 119 105q76 39 155 51v172h137v-164q72 -4 140 -19q53 -12 114 -40l-53 -154q-37 16 -51 20q-37 12 -57 17q-4 0 -26 5t-34 7q-41 4 -55 4q-160 0 -229 -100q-72 -102 -72 -313t72 -308q74 -98 221 -98q84 0 147 18 q61 18 119 43v-161q-49 -28 -105 -43q-47 -12 -131 -17v-200h-137v206q-88 12 -155 50q-72 39 -119 104q-53 72 -76 166q-25 98 -25 237z" />
+<glyph unicode="&#xa3;" d="M68 0v154q51 14 82 32q35 20 61 54q29 35 43 82q14 45 14 116v213h-198v137h198v324q0 92 29 156q33 74 82 116q53 47 127 72t160 25q102 0 192 -23q84 -20 154 -57l-66 -144q-53 27 -127 49.5t-145 22.5q-41 0 -88 -14q-41 -12 -72 -43q-33 -33 -47 -76 q-16 -49 -16 -113v-295h376v-137h-376v-211q0 -72 -11 -106q-12 -45 -32 -78q-18 -29 -46 -53q-27 -23 -51 -37h748v-166h-991z" />
+<glyph unicode="&#xa4;" d="M123 1065l98 98l127 -129q47 31 101 49q55 18 114.5 18.5t112.5 -18.5q57 -20 100 -49l129 129l99 -96l-130 -129q31 -47 50 -100q18 -55 18 -114.5t-18 -115.5q-20 -61 -50 -100l127 -127l-96 -96l-129 127q-43 -29 -100 -50q-47 -16 -113 -16q-59 0 -114 19 q-53 18 -101 49l-127 -127l-96 96l127 127q-33 49 -49.5 98t-16.5 114.5t17 113.5q20 57 49 100zM324 723q0 -51 18 -94t51 -76t76 -51.5t94 -18.5q53 0 96 18.5t76 51.5q37 37 53 76q18 43 19 94q0 53 -18.5 96t-53.5 78q-33 33 -76 51.5t-96 18.5q-51 0 -94 -18.5 t-76 -51.5q-31 -31 -51 -78q-18 -43 -18 -96z" />
+<glyph unicode="&#xa5;" d="M29 1462h192l342 -739l346 739h191l-385 -768h239v-137h-301v-158h301v-137h-301v-262h-178v262h-301v137h301v158h-301v137h234z" />
+<glyph unicode="&#xa6;" d="M489 289h150v-781h-150v781zM489 776v780h150v-780h-150z" />
+<glyph unicode="&#xa7;" horiz-adv-x="993" d="M121 55v158q20 -10 69 -31q29 -12 80 -26q43 -12 86 -18.5t88 -6.5q68 0 115 12q46 12 74 31q25 16 39 45q12 25 12 53q0 33 -8 52q-10 23 -35 45q-27 23 -72 47q-46 25 -123 55q-70 29 -131 61.5t-98 69.5q-35 35 -59 90q-20 47 -21 117q0 49 13 92q10 35 36 74 q25 35 51.5 55.5t59.5 36.5q-76 37 -117 94q-43 58 -43 142q0 63 26.5 110t78 82t120.5 53q72 18 156 19q100 0 176 -21q84 -23 150 -51l-56 -139q-70 31 -135 47q-78 20 -141 20q-98 0 -149.5 -30.5t-51.5 -85.5q0 -28 13 -50q14 -27 38 -45q14 -12 78 -45q53 -29 117 -53 q80 -31 129 -61q57 -35 94 -72q43 -43 62 -86q20 -47 20 -111q0 -51 -12 -94q-14 -47 -33 -78q-18 -29 -47 -57q-25 -27 -53 -41q72 -39 106 -92q39 -57 39 -133q0 -72 -31 -127q-33 -59 -81 -94q-47 -33 -132 -58q-74 -20 -174 -20q-104 0 -186 16q-71 14 -137 49zM291 831 q0 -41 14 -69q16 -35 45 -60q33 -31 82 -57q31 -16 123 -57l35 -15q16 8 41 31q20 16 37 41q18 25 26 51q10 31 11 62q0 39 -13 69q-12 33 -45 62q-37 35 -88 59q-55 29 -135 58q-33 -12 -49.5 -22.5t-40.5 -39.5q-
 16 -18 -31 -51q-12 -28 -12 -62z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1181" d="M307 1394.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM682 1394.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25 q-29 24 -29 77.5z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1703" d="M100 731q0 109 27 201q29 98 76 178q53 90 116.5 153.5t153.5 116.5q80 47 178 76q92 27 201 27t201 -27q98 -29 178 -76q90 -53 153.5 -116.5t116.5 -153.5q47 -80 76 -178q27 -92 27 -200.5t-27 -201.5q-29 -98 -76 -178q-53 -90 -116.5 -153.5t-153.5 -116.5 q-80 -47 -178 -76q-92 -27 -201 -26.5t-201 26.5q-98 29 -178 76q-90 53 -153.5 116.5t-116.5 153.5q-47 80 -76 178q-27 92 -27 201zM209 731q0 -129 51 -250q49 -117 137 -205t205 -137q121 -51 250 -51t250 51q117 49 205 137.5t137 204.5q51 121 51 250t-51 250 q-49 117 -137 205t-205 137q-121 51 -250 51t-250 -51q-117 -49 -205 -137t-137 -205q-51 -121 -51 -250zM479 733q0 104 27 185q27 82 80 143q51 59 129 94q74 33 176 33q59 0 129 -17q59 -14 125 -45l-62 -127q-47 23 -100 39q-45 14 -92 15q-59 0 -108.5 -22.5 t-77.5 -63.5q-37 -51 -50 -101q-16 -66 -16 -135q0 -80 14 -137q16 -66 45 -102q31 -39 78 -62q49 -23 115 -22q12 0 49 4q23 2 57 10q37 8 56 14q8 2 26.5 7.5t26.5 9.5v-131q-16 -8 -49 -21q-18 -8 -51 -14q-39 -8 -56 -11q-41 -4 
 -65 -4q-104 0 -178 33q-80 35 -127 94 q-53 68 -76 146q-25 86 -25 188z" />
+<glyph unicode="&#xaa;" horiz-adv-x="677" d="M68 989q0 100 71 156q68 53 213 59l99 4v31q0 72 -31 100q-33 29 -86 29q-49 0 -92 -14.5t-88 -36.5l-48 100q57 27 109 43q59 18 119 19q125 0 184.5 -53.5t59.5 -174.5v-454h-91l-28 82q-12 -14 -37 -39q-18 -18 -43 -30.5t-51 -18.5q-29 -6 -64 -7q-43 0 -80 13 q-33 10 -61 39q-27 27 -41 63.5t-14 89.5zM199 987q0 -52 24 -74q27 -23 68 -22q33 0 63 10q27 8 52 33q20 20 32.5 55t12.5 76v49l-74 -4q-49 -2 -84 -12q-34 -9 -55 -25q-20 -14 -29 -35q-10 -24 -10 -51z" />
+<glyph unicode="&#xab;" horiz-adv-x="995" d="M82 526v27l309 414l117 -78l-238 -348l238 -348l-117 -78zM489 526v27l310 414l116 -78l-237 -348l237 -348l-116 -78z" />
+<glyph unicode="&#xac;" d="M102 647v150h924v-535h-149v385h-775z" />
+<glyph unicode="&#xad;" horiz-adv-x="657" d="M82 465v168h496v-168h-496z" />
+<glyph unicode="&#xae;" horiz-adv-x="1703" d="M100 731q0 109 27 201q29 98 76 178q53 90 116.5 153.5t153.5 116.5q80 47 178 76q92 27 201 27t201 -27q98 -29 178 -76q90 -53 153.5 -116.5t116.5 -153.5q47 -80 76 -178q27 -92 27 -200.5t-27 -201.5q-29 -98 -76 -178q-53 -90 -116.5 -153.5t-153.5 -116.5 q-80 -47 -178 -76q-92 -27 -201 -26.5t-201 26.5q-98 29 -178 76q-90 53 -153.5 116.5t-116.5 153.5q-47 80 -76 178q-27 92 -27 201zM209 731q0 -129 51 -250q49 -117 137 -205t205 -137q121 -51 250 -51t250 51q117 49 205 137.5t137 204.5q51 121 51 250t-51 250 q-49 117 -137 205t-205 137q-121 51 -250 51t-250 -51q-117 -49 -205 -137t-137 -205q-51 -121 -51 -250zM586 285v893h233q166 0 248 -66q78 -63 78 -199q0 -43 -15 -86q-12 -37 -34 -65q-18 -25 -52 -49q-25 -18 -59 -33l121 -197l43 -73l37 -64q16 -29 26 -45l11 -16 h-179l-206 352h-95v-352h-157zM743 768h72q90 0 131 37q39 37 39 104q0 74 -41 103q-43 31 -131 30h-70v-274z" />
+<glyph unicode="&#xaf;" horiz-adv-x="1024" d="M-6 1556v140h1036v-140h-1036z" />
+<glyph unicode="&#xb0;" horiz-adv-x="876" d="M123 1167q0 65 24 123q25 57 68 100.5t100 67.5q58 25 123 25t123 -25q57 -25 100.5 -67.5t67.5 -100.5q25 -58 25 -123t-25 -123q-23 -53 -67 -98q-43 -43 -101 -67q-58 -25 -123 -25t-123 25q-57 25 -100 67q-45 45 -68 98q-24 58 -24 123zM246 1167q0 -43 14 -73 q16 -37 41 -61.5t61 -41.5q31 -14 76 -14q43 0 74 14q35 16 63 41q23 18 41 62q14 31 15 73q0 41 -14.5 76t-41.5 62q-23 23 -63 41q-37 16 -74 16q-39 0 -76 -16q-43 -18 -61 -41q-29 -33 -41 -62q-14 -35 -14 -76z" />
+<glyph unicode="&#xb1;" d="M102 0v150h924v-150h-924zM102 647v150h387v389h150v-389h387v-150h-387v-385h-150v385h-387z" />
+<glyph unicode="&#xb2;" horiz-adv-x="677" d="M49 586v112l209 228l92 104q35 41 58 76q20 33 26 63q8 41 8 64q0 66 -32 96q-37 33 -88.5 33t-96.5 -25q-39 -20 -92 -63l-78 94q49 45 121 80q66 33 148 33q55 0 108 -17q45 -14 82 -47q35 -31 53 -78q18 -45 19 -102q0 -51 -15 -92q-18 -51 -41 -86q-25 -39 -67 -88 l-90 -101l-148 -157h396v-127h-572z" />
+<glyph unicode="&#xb3;" horiz-adv-x="677" d="M31 625v133q70 -37 129 -53q66 -18 119 -19q102 0 143 41q43 43 43 115q0 74 -53 108q-51 33 -150 33h-98v113h98q92 0 133 39q43 40 43 104q0 29 -10 55q-8 25 -27 39q-20 18 -41 23q-25 6 -51 6q-61 0 -108 -21q-45 -20 -99 -57l-69 96q31 23 59.5 41.5t65.5 30.5 q43 16 71 21q49 8 82 8q74 0 121 -17q59 -20 88 -47q37 -33 53.5 -71.5t16.5 -90.5q0 -78 -41 -131t-109 -77q86 -20 131 -76t45 -131q0 -63 -20 -111q-23 -49 -61 -84q-39 -33 -105 -55q-61 -20 -149 -21q-70 0 -131 13q-60 12 -119 43z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1181" d="M393 1241v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1216" d="M174 -492v1590h182v-707q0 -129 53.5 -194.5t163.5 -65.5q78 0 138 27q51 23 88 75q31 43 47 125q14 70 14 170v570h182v-1098h-147l-27 147h-10q-47 -80 -121 -124q-70 -43 -174 -43q-70 0 -125 22q-53 23 -88 66q0 -51 2 -78q4 -45 4 -78v-84v-320h-182z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1339" d="M113 1042q0 150 32 246q33 94 93 158q57 61 143 86q82 25 182 24h563v-1816h-120v1657h-207v-1657h-121v819q-61 -18 -146 -18q-88 0 -172 26q-78 25 -133 84q-51 53 -84 156q-30 94 -30 235z" />
+<glyph unicode="&#xb7;" horiz-adv-x="548" d="M147 723q0 35 11 65q10 29 26 43q20 16 39 23q29 8 51 8q16 0 50 -8q20 -4 41 -23q16 -14 26 -43q10 -31 10 -65q0 -37 -10 -63.5t-26 -43.5q-14 -14 -41 -24q-23 -8 -50 -8q-33 0 -51 8q-25 10 -39 24q-16 16 -26.5 43t-10.5 64z" />
+<glyph unicode="&#xb8;" horiz-adv-x="419" d="M35 -375q20 -4 39 -4q8 0 22.5 -1t18.5 -1q72 0 110 21q41 23 41 71q0 23 -12 41q-10 16 -37 31q-23 12 -55 22l-68 19l90 176h121l-57 -115q45 -12 63 -20q29 -12 51 -35q20 -20 33 -49q12 -28 13 -68q0 -96 -70 -151q-68 -53 -221 -54q-31 0 -45 3q-22 3 -37 6v108z " />
+<glyph unicode="&#xb9;" horiz-adv-x="677" d="M63 1274l244 188h135v-876h-145v516v55q0 10 1 29.5t1 30.5l4 59q0 10 1 26.5t1 22.5q-6 -6 -16 -18.5t-16.5 -18.5l-41.5 -37l-94 -73z" />
+<glyph unicode="&#xba;" horiz-adv-x="716" d="M66 1133q0 86 20 147q20 63 59 109q41 47 93 67q57 23 122 23q59 0 115 -23q47 -20 92 -67q39 -43 62 -109q23 -68 22 -147q0 -86 -20 -148q-25 -74 -60 -111q-43 -45 -92 -67q-51 -23 -123 -23q-70 0 -116 23q-52 25 -93 67q-35 37 -59 111q-22 68 -22 148zM197 1133 q0 -113 39 -179q37 -61 122.5 -61t122.5 61.5t37 178.5q0 120 -37 178q-37 57 -123 57t-122 -57q-39 -61 -39 -178z" />
+<glyph unicode="&#xbb;" horiz-adv-x="995" d="M84 193l238 348l-238 348l117 78l309 -414v-27l-309 -411zM492 193l237 348l-237 348l116 78l310 -414v-27l-310 -411z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1507" d="M63 1274l244 188h135v-876h-145v516v55q0 10 1 29.5t1 30.5l4 59q0 10 1 26.5t1 22.5q-6 -6 -16 -18.5t-16.5 -18.5l-41.5 -37l-94 -73zM1202 1462l-811 -1462h-157l811 1462h157zM1419 192h-125v-192h-143v192h-375v111l377 579h141v-563h125v-127zM1151 319v195 q0 14 1 45t1 47q0 33 4 98q-2 -4 -6 -14t-8 -16q-4 -8 -8 -13.5t-7.5 -11.5t-7.5 -14l-22 -41l-21 -35l-155 -240h229z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1507" d="M45 1274l244 188h135v-876h-145v516v55q0 10 1 29.5t1 30.5l4 59q0 10 1 26.5t1 22.5q-6 -6 -16 -18.5t-16.5 -18.5l-41.5 -37l-94 -73zM1181 1462l-811 -1462h-157l811 1462h157zM868 0v112l209 228l92 104q35 41 58 76q20 33 26 63q8 41 8 64q0 66 -32 96 q-37 33 -88.5 33t-96.5 -25q-39 -20 -92 -63l-78 94q49 45 121 80q66 33 148 33q55 0 108 -17q45 -14 82 -47q35 -31 53 -78q18 -45 19 -102q0 -51 -15 -92q-18 -51 -41 -86q-25 -39 -67 -88l-90 -101l-148 -157h396v-127h-572z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1507" d="M31 625v133q70 -37 129 -53q66 -18 119 -19q102 0 143 41q43 43 43 115q0 74 -53 108q-51 33 -150 33h-98v113h98q92 0 133 39q43 40 43 104q0 29 -10 55q-8 25 -27 39q-20 18 -41 23q-25 6 -51 6q-61 0 -108 -21q-45 -20 -99 -57l-69 96q31 23 59.5 41.5t65.5 30.5 q43 16 71 21q49 8 82 8q74 0 121 -17q59 -20 88 -47q37 -33 53.5 -71.5t16.5 -90.5q0 -78 -41 -131t-109 -77q86 -20 131 -76t45 -131q0 -63 -20 -111q-23 -49 -61 -84q-39 -33 -105 -55q-61 -20 -149 -21q-70 0 -131 13q-60 12 -119 43zM1296 1462l-811 -1462h-157 l811 1462h157zM1486 192h-125v-192h-143v192h-375v111l377 579h141v-563h125v-127zM1218 319v195q0 14 1 45t1 47q0 33 4 98q-2 -4 -6 -14t-8 -16q-4 -8 -8 -13.5t-7.5 -11.5t-7.5 -14l-22 -41l-21 -35l-155 -240h229z" />
+<glyph unicode="&#xbf;" horiz-adv-x="870" d="M68 -20q0 59 14 120q12 51 39 97q27 43 67 88q39 43 95 88q70 61 86 78q29 29 51 65.5t26 63.5q6 35 7 77v19h139v-37q0 -63 -8 -104q-10 -49 -27 -86q-18 -39 -53 -78q-39 -41 -82 -80q-43 -35 -82 -74q-34 -34 -55 -67q-25 -37 -33 -76q-10 -45 -10 -92q0 -51 14 -88 t45 -68q29 -29 70 -43q45 -16 98 -16q80 0 160 26q74 25 143 60l64 -146q-90 -47 -177 -72q-98 -29 -190 -28q-88 0 -168 26q-76 25 -125 72q-51 47 -80 119q-28 70 -28 156zM385 979q0 37 10.5 63.5t26.5 42.5q12 12 41 25q18 8 49 8t49 -8q29 -12 41 -25 q16 -16 26.5 -42.5t10.5 -63.5q0 -33 -10 -64q-10 -29 -27 -43q-23 -20 -41 -24q-29 -8 -49 -8t-49 8q-18 4 -41 24q-16 14 -27 43q-10 31 -10 64z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1243" d="M0 0l537 1468h170l538 -1468h-190l-160 453h-545l-162 -453h-188zM410 618h426l-148 424l-4 12.5l-4 12.5l-6 18q-2 10 -8.5 25.5t-10.5 32.5l-16 61q-4 18 -9 33.5t-9 30.5q-2 -12 -17 -64l-16 -63q-9 -31 -19 -56q-4 -10 -6 -18t-4 -12t-4 -13zM325 1886v21h219 q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1243" d="M0 0l537 1468h170l538 -1468h-190l-160 453h-545l-162 -453h-188zM410 618h426l-148 424l-4 12.5l-4 12.5l-6 18q-2 10 -8.5 25.5t-10.5 32.5l-16 61q-4 18 -9 33.5t-9 30.5q-2 -12 -17 -64l-16 -63q-9 -31 -19 -56q-4 -10 -6 -18t-4 -12t-4 -13zM534 1579v27l45 67 l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1243" d="M0 0l537 1468h170l538 -1468h-190l-160 453h-545l-162 -453h-188zM410 618h426l-148 424l-4 12.5l-4 12.5l-6 18q-2 10 -8.5 25.5t-10.5 32.5l-16 61q-4 18 -9 33.5t-9 30.5q-2 -12 -17 -64l-16 -63q-9 -31 -19 -56q-4 -10 -6 -18t-4 -12t-4 -13zM289 1579v27 q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1243" d="M0 0l537 1468h170l538 -1468h-190l-160 453h-545l-162 -453h-188zM410 618h426l-148 424l-4 12.5l-4 12.5l-6 18q-2 10 -8.5 25.5t-10.5 32.5l-16 61q-4 18 -9 33.5t-9 30.5q-2 -12 -17 -64l-16 -63q-9 -31 -19 -56q-4 -10 -6 -18t-4 -12t-4 -13zM264 1579q6 63 21 109 q16 51 43 84q31 37 63 53q37 18 84 18q43 0 82 -18q8 -4 25.5 -11.5l31 -13.5t23.5 -12l71 -39q35 -18 64 -18q45 0 68 26q25 27 38 88h105q-6 -63 -21 -108q-16 -51 -43 -84q-31 -37 -63 -53q-37 -18 -84 -19q-45 0 -80 17q-37 16 -78 40q-14 8 -41.5 22.5t-29.5 16.5 q-31 16 -68 17q-45 0 -70 -27q-20 -23 -37 -88h-104z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1243" d="M0 0l537 1468h170l538 -1468h-190l-160 453h-545l-162 -453h-188zM410 618h426l-148 424l-4 12.5l-4 12.5l-6 18q-2 10 -8.5 25.5t-10.5 32.5l-16 61q-4 18 -9 33.5t-9 30.5q-2 -12 -17 -64l-16 -63q-9 -31 -19 -56q-4 -10 -6 -18t-4 -12t-4 -13zM340 1732.5 q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM715 1732.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z " />
+<glyph unicode="&#xc5;" horiz-adv-x="1243" d="M0 0l537 1468h170l538 -1468h-190l-160 453h-545l-162 -453h-188zM410 618h426l-148 424l-4 12.5l-4 12.5l-6 18q-2 10 -8.5 25.5t-10.5 32.5l-16 61q-4 18 -9 33.5t-9 30.5q-2 -12 -17 -64l-16 -63q-9 -31 -19 -56q-4 -10 -6 -18t-4 -12t-4 -13zM848 1583q0 -52 -18 -92 q-20 -43 -47 -68q-33 -29 -72 -43q-41 -14 -92 -14q-53 0 -90 14q-41 16 -72 43q-29 27 -45 68q-16 43 -16 90t16 90q16 41 45 68q31 27 72 43q37 14 90 14q49 0 90 -14q43 -15 74 -43q29 -27 47 -66q18 -41 18 -90zM731 1581q0 49 -32 82q-31 31 -80 31q-51 0 -82 -31 t-31 -82t29 -84q27 -29 84 -29q51 0 80 29q32 33 32 84z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1744" d="M-2 0l655 1462h969v-164h-573v-452h534v-162h-534v-520h573v-164h-760v453h-475l-203 -453h-186zM459 618h403v680h-108z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1234" d="M125 733q0 164 43 303.5t129 237.5q88 100 209 153q125 55 287 56q104 0 206 -23q98 -20 177 -63l-78 -156q-82 39 -137 55q-78 23 -168 23q-106 0 -195 -41q-86 -40 -147 -117q-59 -74 -94 -184.5t-35 -245.5q0 -139 30 -250q31 -113 88 -184q59 -76 148 -115 q86 -39 205 -39q98 0 170 17q66 14 157 41v-162q-35 -14 -78 -27q-41 -12 -81 -18q-57 -8 -91 -10q-66 -4 -108 -4q-164 0 -285 55t-198 151q-76 92 -115 240q-39 145 -39 307zM543 -375q20 -4 39 -4q8 0 22.5 -1t18.5 -1q72 0 110 21q41 23 41 71q0 23 -12 41 q-10 16 -37 31q-23 12 -55 22l-68 19l90 176h121l-57 -115q45 -12 63 -20q29 -12 51 -35q20 -20 33 -49q12 -28 13 -68q0 -96 -70 -151q-68 -53 -221 -54q-31 0 -45 3q-22 3 -37 6v108z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1079" d="M199 0v1462h759v-164h-573v-452h535v-162h-535v-520h573v-164h-759zM319 1886v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1079" d="M199 0v1462h759v-164h-573v-452h535v-162h-535v-520h573v-164h-759zM456 1579v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xca;" horiz-adv-x="1079" d="M199 0v1462h759v-164h-573v-452h535v-162h-535v-520h573v-164h-759zM244 1579v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104 q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1079" d="M199 0v1462h759v-164h-573v-452h535v-162h-535v-520h573v-164h-759zM297 1732.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM672 1732.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18 q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#xcc;" horiz-adv-x="692" d="M82 0v102l172 41v1176l-172 41v102h530v-102l-172 -41v-1176l172 -41v-102h-530zM61 1886v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xcd;" horiz-adv-x="692" d="M82 0v102l172 41v1176l-172 41v102h530v-102l-172 -41v-1176l172 -41v-102h-530zM258 1579v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xce;" horiz-adv-x="692" d="M82 0v102l172 41v1176l-172 41v102h530v-102l-172 -41v-1176l172 -41v-102h-530zM16 1579v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104 q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xcf;" horiz-adv-x="692" d="M82 0v102l172 41v1176l-172 41v102h530v-102l-172 -41v-1176l172 -41v-102h-530zM63 1732.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM438 1732.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6 t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1400" d="M47 643v162h152v657h407q152 0 277 -47q127 -47 211 -135q90 -94 135 -225q47 -137 47 -310q0 -193 -47 -325q-51 -143 -139 -232q-98 -98 -224 -141q-135 -47 -301 -47h-366v643h-152zM385 160h162q264 0 397 145q135 147 135 434q0 147 -32 252q-35 113 -97 176 q-68 70 -155 103q-90 33 -209 33h-201v-498h336v-162h-336v-483z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1492" d="M199 0v1462h213l716 -1204h7l-7 150q0 10 -1 31.5t-1 33.5l-4 68q0 12 -1 32.5t-1 30.5v58v800h174v-1462h-215l-719 1210h-8q8 -102 10 -153l7 -135q2 -47 2 -129v-793h-172zM397 1579q6 63 21 109q16 51 43 84q31 37 63 53q37 18 84 18q43 0 82 -18q8 -4 25.5 -11.5 l31 -13.5t23.5 -12l71 -39q35 -18 64 -18q45 0 68 26q25 27 38 88h105q-6 -63 -21 -108q-16 -51 -43 -84q-31 -37 -63 -53q-37 -18 -84 -19q-45 0 -80 17q-37 16 -78 40q-14 8 -41.5 22.5t-29.5 16.5q-31 16 -68 17q-45 0 -70 -27q-20 -23 -37 -88h-104z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1519" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q154 0 272.5 -53.5t198.5 -151.5q78 -96 119 -237.5t41 -309.5q0 -166 -41 -307q-41 -145 -119 -240q-78 -96 -199 -151t-274 -55q-163 0 -283 55q-121 55 -198 151q-76 92 -115 240q-39 145 -39 309z M322 733q0 -127 26 -246q23 -102 80 -186q52 -77 135 -117q86 -41 196.5 -41t196.5 41q83 40 136 117q57 84 79 186q25 111 25 246q0 139 -25 248q-25 104 -77 184q-49 74 -135.5 115t-197 41t-196.5 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248zM477 1886 v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1519" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q154 0 272.5 -53.5t198.5 -151.5q78 -96 119 -237.5t41 -309.5q0 -166 -41 -307q-41 -145 -119 -240q-78 -96 -199 -151t-274 -55q-163 0 -283 55q-121 55 -198 151q-76 92 -115 240q-39 145 -39 309z M322 733q0 -127 26 -246q23 -102 80 -186q52 -77 135 -117q86 -41 196.5 -41t196.5 41q83 40 136 117q57 84 79 186q25 111 25 246q0 139 -25 248q-25 104 -77 184q-49 74 -135.5 115t-197 41t-196.5 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248zM651 1579 v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1519" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q154 0 272.5 -53.5t198.5 -151.5q78 -96 119 -237.5t41 -309.5q0 -166 -41 -307q-41 -145 -119 -240q-78 -96 -199 -151t-274 -55q-163 0 -283 55q-121 55 -198 151q-76 92 -115 240q-39 145 -39 309z M322 733q0 -127 26 -246q23 -102 80 -186q52 -77 135 -117q86 -41 196.5 -41t196.5 41q83 40 136 117q57 84 79 186q25 111 25 246q0 139 -25 248q-25 104 -77 184q-49 74 -135.5 115t-197 41t-196.5 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248zM432 1579 v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1519" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q154 0 272.5 -53.5t198.5 -151.5q78 -96 119 -237.5t41 -309.5q0 -166 -41 -307q-41 -145 -119 -240q-78 -96 -199 -151t-274 -55q-163 0 -283 55q-121 55 -198 151q-76 92 -115 240q-39 145 -39 309z M322 733q0 -127 26 -246q23 -102 80 -186q52 -77 135 -117q86 -41 196.5 -41t196.5 41q83 40 136 117q57 84 79 186q25 111 25 246q0 139 -25 248q-25 104 -77 184q-49 74 -135.5 115t-197 41t-196.5 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248zM383 1579 q6 63 21 109q16 51 43 84q31 37 63 53q37 18 84 18q43 0 82 -18q8 -4 25.5 -11.5l31 -13.5t23.5 -12l71 -39q35 -18 64 -18q45 0 68 26q25 27 38 88h105q-6 -63 -21 -108q-16 -51 -43 -84q-31 -37 -63 -53q-37 -18 -84 -19q-45 0 -80 17q-37 16 -78 40q-14 8 -41.5 22.5 t-29.5 16.5q-31 16 -68 17q-45 0 -70 -27q-20 -23 -37 -88h-104z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1519" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q154 0 272.5 -53.5t198.5 -151.5q78 -96 119 -237.5t41 -309.5q0 -166 -41 -307q-41 -145 -119 -240q-78 -96 -199 -151t-274 -55q-163 0 -283 55q-121 55 -198 151q-76 92 -115 240q-39 145 -39 309z M322 733q0 -127 26 -246q23 -102 80 -186q52 -77 135 -117q86 -41 196.5 -41t196.5 41q83 40 136 117q57 84 79 186q25 111 25 246q0 139 -25 248q-25 104 -77 184q-49 74 -135.5 115t-197 41t-196.5 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248zM477 1732.5 q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM852 1732.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z " />
+<glyph unicode="&#xd7;" d="M141 1042l105 105l317 -318l322 318l104 -103l-321 -321l319 -320l-102 -102l-322 317l-317 -315l-103 103l316 317z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1519" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q98 0 174 -21q82 -23 147 -59l80 127l137 -78l-92 -149q90 -96 137.5 -244t47.5 -328q0 -166 -41 -307q-41 -145 -119 -240q-78 -96 -199 -151t-274 -55q-188 0 -322 71l-78 -127l-137 78l90 145 q-98 102 -143 248q-45 147 -45 340zM322 733q0 -127 22 -235q20 -104 72 -183l579 945q-59 33 -104 45q-61 16 -129 16q-111 0 -197 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248zM530 201q46 -28 105 -43q55 -14 125 -15q111 0 196 41q83 40 136 117 q57 84 79 186q25 111 25 246q0 258 -88 408z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1429" d="M184 520v942h187v-952q0 -175 86 -270q86 -96 262 -97q92 0 153 27q66 29 105 76q40 49 61 116q20 63 21 150v952h186v-948q0 -117 -33 -213q-35 -102 -100 -170q-72 -76 -166 -113q-104 -41 -237 -40q-129 0 -226 38q-98 39 -164 109q-68 70 -102 172q-33 96 -33 221z M454 1886v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xda;" horiz-adv-x="1429" d="M184 520v942h187v-952q0 -175 86 -270q86 -96 262 -97q92 0 153 27q66 29 105 76q40 49 61 116q20 63 21 150v952h186v-948q0 -117 -33 -213q-35 -102 -100 -170q-72 -76 -166 -113q-104 -41 -237 -40q-129 0 -226 38q-98 39 -164 109q-68 70 -102 172q-33 96 -33 221z M590 1579v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1429" d="M184 520v942h187v-952q0 -175 86 -270q86 -96 262 -97q92 0 153 27q66 29 105 76q40 49 61 116q20 63 21 150v952h186v-948q0 -117 -33 -213q-35 -102 -100 -170q-72 -76 -166 -113q-104 -41 -237 -40q-129 0 -226 38q-98 39 -164 109q-68 70 -102 172q-33 96 -33 221z M379 1579v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1429" d="M184 520v942h187v-952q0 -175 86 -270q86 -96 262 -97q92 0 153 27q66 29 105 76q40 49 61 116q20 63 21 150v952h186v-948q0 -117 -33 -213q-35 -102 -100 -170q-72 -76 -166 -113q-104 -41 -237 -40q-129 0 -226 38q-98 39 -164 109q-68 70 -102 172q-33 96 -33 221z M432 1732.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM807 1732.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25 q-29 24 -29 77.5z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1077" d="M0 1462h203l336 -739l340 739h200l-446 -893v-569h-187v559zM442 1579v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xde;" horiz-adv-x="1179" d="M199 0v1462h186v-252h176q129 0 232 -28q92 -27 159 -84q61 -53 92 -133t31 -183q0 -90 -28.5 -176t-90.5 -147q-63 -63 -165.5 -102.5t-255.5 -39.5h-150v-317h-186zM385 475h129q86 0 162 17q70 14 115 51q49 39 69 92q23 57 23 137q0 143 -82 211q-84 68 -256 68h-160 v-576z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1232" d="M174 0v1200q0 102 31 174q29 68 88 113q53 41 135 61q76 18 170 19q90 0 168 -19q70 -16 131 -57q51 -35 84 -96q29 -55 29 -135q0 -59 -21 -101q-23 -45 -53 -82q-20 -25 -70 -65l-33.5 -27.5t-35.5 -30.5q-27 -25 -52 -55q-23 -29 -22 -57q0 -22 6 -37q6 -16 27 -37 q10 -10 55 -43l92 -63q76 -51 101 -72q41 -35 73.5 -78t46.5 -88q16 -53 17 -111q0 -82 -29 -149q-27 -63 -78 -104.5t-121 -59.5q-78 -20 -155 -20q-94 0 -166 18q-74 18 -123 51v166q23 -14 59 -31q51 -23 68 -28q37 -12 74 -19q49 -8 75 -8q57 0 96.5 12.5t66 35 t38.5 54.5q12 31 12 72q0 39 -8 66q-8 29 -30 57q-27 35 -58 57q-51 39 -92 64q-59 37 -106 74q-35 27 -68 67q-25 31 -39 70q-10 29 -10 76q0 55 20 94q25 45 51.5 71.5t67.5 57.5q37 28 68 55q25 23 51 64q20 33 20 77q0 39 -16 72q-16 31 -47 53q-27 18 -72 29 q-47 10 -92 10t-92 -10t-78 -33q-37 -27 -53 -65q-18 -43 -19 -107v-1202h-182z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1085" d="M94 307q0 164 115 252q115 86 352 96l184 7v69q0 70 -14 113t-43 71q-27 27 -67 39t-93 13q-86 0 -155 -25q-82 -29 -137 -57l-64 137q74 40 166 68q96 29 190 28q106 0 177 -20q72 -20 122 -66q45 -39 72 -112q25 -68 25 -168v-752h-131l-37 152h-8q-35 -45 -66 -78 t-72 -54q-41 -23 -88 -30q-55 -10 -110 -10q-61 0 -127 20q-55 18 -101 59q-39 37 -65 103q-25 61 -25 145zM283 305q0 -92 49 -135t127 -43q61 0 112 18q55 20 91 58q39 41 59 98q23 61 22 137v99l-143 -7q-80 -2 -151 -20q-55 -14 -97 -45q-39 -29 -53 -68 q-16 -43 -16 -92zM284 1548v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1085" d="M94 307q0 164 115 252q115 86 352 96l184 7v69q0 70 -14 113t-43 71q-27 27 -67 39t-93 13q-86 0 -155 -25q-82 -29 -137 -57l-64 137q74 40 166 68q96 29 190 28q106 0 177 -20q72 -20 122 -66q45 -39 72 -112q25 -68 25 -168v-752h-131l-37 152h-8q-35 -45 -66 -78 t-72 -54q-41 -23 -88 -30q-55 -10 -110 -10q-61 0 -127 20q-55 18 -101 59q-39 37 -65 103q-25 61 -25 145zM283 305q0 -92 49 -135t127 -43q61 0 112 18q55 20 91 58q39 41 59 98q23 61 22 137v99l-143 -7q-80 -2 -151 -20q-55 -14 -97 -45q-39 -29 -53 -68 q-16 -43 -16 -92zM446 1241v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1085" d="M94 307q0 164 115 252q115 86 352 96l184 7v69q0 70 -14 113t-43 71q-27 27 -67 39t-93 13q-86 0 -155 -25q-82 -29 -137 -57l-64 137q74 40 166 68q96 29 190 28q106 0 177 -20q72 -20 122 -66q45 -39 72 -112q25 -68 25 -168v-752h-131l-37 152h-8q-35 -45 -66 -78 t-72 -54q-41 -23 -88 -30q-55 -10 -110 -10q-61 0 -127 20q-55 18 -101 59q-39 37 -65 103q-25 61 -25 145zM283 305q0 -92 49 -135t127 -43q61 0 112 18q55 20 91 58q39 41 59 98q23 61 22 137v99l-143 -7q-80 -2 -151 -20q-55 -14 -97 -45q-39 -29 -53 -68 q-16 -43 -16 -92zM227 1241v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1085" d="M94 307q0 164 115 252q115 86 352 96l184 7v69q0 70 -14 113t-43 71q-27 27 -67 39t-93 13q-86 0 -155 -25q-82 -29 -137 -57l-64 137q74 40 166 68q96 29 190 28q106 0 177 -20q72 -20 122 -66q45 -39 72 -112q25 -68 25 -168v-752h-131l-37 152h-8q-35 -45 -66 -78 t-72 -54q-41 -23 -88 -30q-55 -10 -110 -10q-61 0 -127 20q-55 18 -101 59q-39 37 -65 103q-25 61 -25 145zM283 305q0 -92 49 -135t127 -43q61 0 112 18q55 20 91 58q39 41 59 98q23 61 22 137v99l-143 -7q-80 -2 -151 -20q-55 -14 -97 -45q-39 -29 -53 -68 q-16 -43 -16 -92zM190 1241q6 63 21 109q16 51 43 84q31 37 63 53q37 18 84 18q43 0 82 -18q8 -4 25.5 -11.5l31 -13.5t23.5 -12l71 -39q35 -18 64 -18q45 0 68 26q25 27 38 88h105q-6 -63 -21 -108q-16 -51 -43 -84q-31 -37 -63 -53q-37 -18 -84 -19q-45 0 -80 17 q-37 16 -78 40q-14 8 -41.5 22.5t-29.5 16.5q-31 16 -68 17q-45 0 -70 -27q-20 -23 -37 -88h-104z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1085" d="M94 307q0 164 115 252q115 86 352 96l184 7v69q0 70 -14 113t-43 71q-27 27 -67 39t-93 13q-86 0 -155 -25q-82 -29 -137 -57l-64 137q74 40 166 68q96 29 190 28q106 0 177 -20q72 -20 122 -66q45 -39 72 -112q25 -68 25 -168v-752h-131l-37 152h-8q-35 -45 -66 -78 t-72 -54q-41 -23 -88 -30q-55 -10 -110 -10q-61 0 -127 20q-55 18 -101 59q-39 37 -65 103q-25 61 -25 145zM283 305q0 -92 49 -135t127 -43q61 0 112 18q55 20 91 58q39 41 59 98q23 61 22 137v99l-143 -7q-80 -2 -151 -20q-55 -14 -97 -45q-39 -29 -53 -68 q-16 -43 -16 -92zM272 1394.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM647 1394.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25 q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1085" d="M94 307q0 164 115 252q115 86 352 96l184 7v69q0 70 -14 113t-43 71q-27 27 -67 39t-93 13q-86 0 -155 -25q-82 -29 -137 -57l-64 137q74 40 166 68q96 29 190 28q106 0 177 -20q72 -20 122 -66q45 -39 72 -112q25 -68 25 -168v-752h-131l-37 152h-8q-35 -45 -66 -78 t-72 -54q-41 -23 -88 -30q-55 -10 -110 -10q-61 0 -127 20q-55 18 -101 59q-39 37 -65 103q-25 61 -25 145zM283 305q0 -92 49 -135t127 -43q61 0 112 18q55 20 91 58q39 41 59 98q23 61 22 137v99l-143 -7q-80 -2 -151 -20q-55 -14 -97 -45q-39 -29 -53 -68 q-16 -43 -16 -92zM782 1458q0 -52 -18 -92q-20 -43 -47 -68q-33 -29 -72 -43q-41 -14 -92 -14q-53 0 -90 14q-41 16 -72 43q-29 27 -45 68q-16 43 -16 90t16 90q16 41 45 68q31 27 72 43q37 14 90 14q49 0 90 -14q43 -15 74 -43q29 -27 47 -66q18 -41 18 -90zM665 1456 q0 49 -32 82q-31 31 -80 31q-51 0 -82 -31t-31 -82t29 -84q27 -29 84 -29q51 0 80 29q32 33 32 84z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1705" d="M94 307q0 164 115 252q115 86 352 96l184 7v69q0 70 -14 113t-43 71q-27 27 -67 39t-93 13q-86 0 -155 -25q-82 -29 -137 -57l-64 137q74 40 166 68q96 29 190 28q131 0 213 -43q84 -43 127 -135q53 86 133 131q84 47 186.5 47t174.5 -35q76 -37 131 -100q53 -61 82 -156 q29 -92 29 -200v-113h-672q6 -195 77.5 -285t221.5 -90q63 0 92 4q51 8 82 15q37 8 76 24q49 20 73 33v-162q-8 -4 -77 -33q-27 -12 -76 -22q-53 -12 -82 -14q-57 -4 -92 -4q-139 0 -239.5 57t-162.5 172q-27 -43 -71 -96q-29 -33 -86 -72q-43 -29 -107 -45 q-61 -16 -131 -16q-66 0 -133 20q-57 18 -107 59q-43 39 -69 103q-27 67 -27 145zM283 305q0 -92 49 -135t127 -43q61 0 112 18q55 20 91 58q39 41 59 98q23 61 22 137v99l-143 -7q-80 -2 -151 -20q-55 -14 -97 -45q-39 -29 -53 -68q-16 -43 -16 -92zM936 662h471 q0 70 -12.5 125t-41 96t-69.5 61q-45 23 -100 23q-109 0 -174 -78q-62 -73 -74 -227z" />
+<glyph unicode="&#xe7;" horiz-adv-x="946" d="M113 542.5q0 149.5 39 266.5q37 111 104 178q72 72 156 100q89 31 190 31q86 0 152 -16q78 -20 125 -43l-54 -154q-14 6 -51 19q-53 18 -57 18t-26.5 5t-33.5 7q-37 4 -55 4q-160 0 -229 -100q-72 -102 -72 -313q0 -213 71.5 -309.5t221.5 -96.5q82 0 147 19 q61 18 119 43v-162q-57 -29 -115 -43q-66 -16 -151 -16q-94 0 -188 32q-89 31 -154 99q-66 70 -102.5 176t-36.5 255.5zM357 -375q20 -4 39 -4q8 0 22.5 -1t18.5 -1q72 0 110 21q41 23 41 71q0 23 -12 41q-10 16 -37 31q-23 12 -55 22l-68 19l90 176h121l-57 -115 q45 -12 63 -20q29 -12 51 -35q20 -20 33 -49q12 -28 13 -68q0 -96 -70 -151q-68 -53 -221 -54q-31 0 -45 3q-22 3 -37 6v108z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1095" d="M113 541q0 139 32 243q35 109 95 181q63 76 143 114.5t184 38.5q102 0 178 -35q78 -37 134 -100q51 -59 84 -156q31 -90 30 -200v-113h-692q6 -195 82 -285t227 -90q66 0 95 4q57 8 83 15q43 10 78 24q70 29 78 33v-162l-78 -33q-27 -10 -80 -22t-84 -14q-57 -4 -94 -4 q-109 0 -201 36.5t-157 108.5q-61 68 -100 176q-37 105 -37 240zM305 662h492q0 70 -13 124q-10 51 -43 97q-27 39 -71.5 61.5t-106.5 22.5q-113 0 -180 -78q-66 -73 -78 -227zM284 1548v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27 h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1095" d="M113 541q0 139 32 243q35 109 95 181q63 76 143 114.5t184 38.5q102 0 178 -35q78 -37 134 -100q51 -59 84 -156q31 -90 30 -200v-113h-692q6 -195 82 -285t227 -90q66 0 95 4q57 8 83 15q43 10 78 24q70 29 78 33v-162l-78 -33q-27 -10 -80 -22t-84 -14q-57 -4 -94 -4 q-109 0 -201 36.5t-157 108.5q-61 68 -100 176q-37 105 -37 240zM305 662h492q0 70 -13 124q-10 51 -43 97q-27 39 -71.5 61.5t-106.5 22.5q-113 0 -180 -78q-66 -73 -78 -227zM475 1241v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67 q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xea;" horiz-adv-x="1095" d="M113 541q0 139 32 243q35 109 95 181q63 76 143 114.5t184 38.5q102 0 178 -35q78 -37 134 -100q51 -59 84 -156q31 -90 30 -200v-113h-692q6 -195 82 -285t227 -90q66 0 95 4q57 8 83 15q43 10 78 24q70 29 78 33v-162l-78 -33q-27 -10 -80 -22t-84 -14q-57 -4 -94 -4 q-109 0 -201 36.5t-157 108.5q-61 68 -100 176q-37 105 -37 240zM305 662h492q0 70 -13 124q-10 51 -43 97q-27 39 -71.5 61.5t-106.5 22.5q-113 0 -180 -78q-66 -73 -78 -227zM223 1241v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74 q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1095" d="M113 541q0 139 32 243q35 109 95 181q63 76 143 114.5t184 38.5q102 0 178 -35q78 -37 134 -100q51 -59 84 -156q31 -90 30 -200v-113h-692q6 -195 82 -285t227 -90q66 0 95 4q57 8 83 15q43 10 78 24q70 29 78 33v-162l-78 -33q-27 -10 -80 -22t-84 -14q-57 -4 -94 -4 q-109 0 -201 36.5t-157 108.5q-61 68 -100 176q-37 105 -37 240zM305 662h492q0 70 -13 124q-10 51 -43 97q-27 39 -71.5 61.5t-106.5 22.5q-113 0 -180 -78q-66 -73 -78 -227zM268 1394.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5 q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM643 1394.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#xec;" horiz-adv-x="528" d="M356 0h-182v1098h182v-1098zM-33 1548v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xed;" horiz-adv-x="528" d="M356 0h-182v1098h182v-1098zM184 1241v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xee;" horiz-adv-x="528" d="M356 0h-182v1098h182v-1098zM-68 1241v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xef;" horiz-adv-x="528" d="M356 0h-182v1098h182v-1098zM-19 1394.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM356 1394.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78 q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1181" d="M111 477q0 113 32 211q29 88 90 156q51 57 144 94q80 33 188 33q106 0 178 -29q80 -33 121 -90l8 4q-31 119 -92 213q-68 104 -149 178l-256 -153l-74 114l217 131l-82 56q-47 31 -90 53l70 123q70 -33 127 -68q55 -33 119 -80l227 138l74 -113l-195 -117 q63 -59 123 -143q49 -68 94 -172q40 -92 62 -203q23 -117 22 -240q0 -145 -32.5 -251.5t-96.5 -186.5q-57 -74 -152 -115q-92 -41 -200 -40q-106 0 -191 32q-90 35 -151 97q-59 59 -99 157q-36 92 -36 211zM303 471q0 -74 16 -139q16 -61 52 -107q37 -45 90 -69 q55 -25 131 -25q152 0 221 100q68 98 68 295q0 61 -17 109q-18 53 -53 94q-39 45 -88 68q-55 25 -131 24q-74 0 -131 -22q-53 -20 -90 -68q-35 -45 -52 -110q-16 -70 -16 -150z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1204" d="M174 0v1098h148l26 -148h10q23 41 60 74q33 31 76 53q40 22 86 31q51 10 94 10q184 0 276 -96t92 -305v-717h-182v707q0 129 -53 194.5t-164 65.5q-76 0 -135 -27q-57 -27 -90 -76q-31 -47 -47 -125q-14 -70 -15 -170v-569h-182zM252 1241q6 63 21 109q16 51 43 84 q31 37 63 53q37 18 84 18q43 0 82 -18q8 -4 25.5 -11.5l31 -13.5t23.5 -12l71 -39q35 -18 64 -18q45 0 68 26q25 27 38 88h105q-6 -63 -21 -108q-16 -51 -43 -84q-31 -37 -63 -53q-37 -18 -84 -19q-45 0 -80 17q-37 16 -78 40q-14 8 -41.5 22.5t-29.5 16.5q-31 16 -68 17 q-45 0 -70 -27q-20 -23 -37 -88h-104z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1181" d="M113 551q0 133 34 242q35 106 95 178q61 74 151 110.5t201 36.5q104 0 190 -37q84 -37 150 -110q63 -72 100 -178q35 -98 35 -242q0 -139 -33 -244q-31 -100 -96 -178q-61 -74 -152 -111q-94 -39 -200 -38q-100 0 -191 38q-84 37 -149 111q-61 70 -98 178 q-37 107 -37 244zM301 551q0 -211 67.5 -315.5t223.5 -104.5q154 0 221.5 104.5t67.5 315.5q0 209 -68 313q-66 102 -223 103q-156 0 -221 -103q-68 -104 -68 -313zM352 1548v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120 q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1181" d="M113 551q0 133 34 242q35 106 95 178q61 74 151 110.5t201 36.5q104 0 190 -37q84 -37 150 -110q63 -72 100 -178q35 -98 35 -242q0 -139 -33 -244q-31 -100 -96 -178q-61 -74 -152 -111q-94 -39 -200 -38q-100 0 -191 38q-84 37 -149 111q-61 70 -98 178 q-37 107 -37 244zM301 551q0 -211 67.5 -315.5t223.5 -104.5q154 0 221.5 104.5t67.5 315.5q0 209 -68 313q-66 102 -223 103q-156 0 -221 -103q-68 -104 -68 -313zM473 1241v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84 l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1181" d="M113 551q0 133 34 242q35 106 95 178q61 74 151 110.5t201 36.5q104 0 190 -37q84 -37 150 -110q63 -72 100 -178q35 -98 35 -242q0 -139 -33 -244q-31 -100 -96 -178q-61 -74 -152 -111q-94 -39 -200 -38q-100 0 -191 38q-84 37 -149 111q-61 70 -98 178 q-37 107 -37 244zM301 551q0 -211 67.5 -315.5t223.5 -104.5q154 0 221.5 104.5t67.5 315.5q0 209 -68 313q-66 102 -223 103q-156 0 -221 -103q-68 -104 -68 -313zM254 1241v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74 q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1181" d="M113 551q0 133 34 242q35 106 95 178q61 74 151 110.5t201 36.5q104 0 190 -37q84 -37 150 -110q63 -72 100 -178q35 -98 35 -242q0 -139 -33 -244q-31 -100 -96 -178q-61 -74 -152 -111q-94 -39 -200 -38q-100 0 -191 38q-84 37 -149 111q-61 70 -98 178 q-37 107 -37 244zM301 551q0 -211 67.5 -315.5t223.5 -104.5q154 0 221.5 104.5t67.5 315.5q0 209 -68 313q-66 102 -223 103q-156 0 -221 -103q-68 -104 -68 -313zM227 1241q6 63 21 109q16 51 43 84q31 37 63 53q37 18 84 18q43 0 82 -18q8 -4 25.5 -11.5l31 -13.5 t23.5 -12l71 -39q35 -18 64 -18q45 0 68 26q25 27 38 88h105q-6 -63 -21 -108q-16 -51 -43 -84q-31 -37 -63 -53q-37 -18 -84 -19q-45 0 -80 17q-37 16 -78 40q-14 8 -41.5 22.5t-29.5 16.5q-31 16 -68 17q-45 0 -70 -27q-20 -23 -37 -88h-104z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1181" d="M113 551q0 133 34 242q35 106 95 178q61 74 151 110.5t201 36.5q104 0 190 -37q84 -37 150 -110q63 -72 100 -178q35 -98 35 -242q0 -139 -33 -244q-31 -100 -96 -178q-61 -74 -152 -111q-94 -39 -200 -38q-100 0 -191 38q-84 37 -149 111q-61 70 -98 178 q-37 107 -37 244zM301 551q0 -211 67.5 -315.5t223.5 -104.5q154 0 221.5 104.5t67.5 315.5q0 209 -68 313q-66 102 -223 103q-156 0 -221 -103q-68 -104 -68 -313zM301 1394.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25 t-67.5 25q-29 24 -29 77.5zM676 1394.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#xf7;" d="M102 647v150h924v-150h-924zM449 373q0 33 10 59q8 20 24 37q18 18 35 23q23 6 45 6t43 -6q20 -6 37 -23q20 -20 27 -37q8 -23 8 -59q0 -33 -8 -55.5t-27 -41.5q-14 -14 -37 -20q-29 -8 -43 -8q-16 0 -45 8q-20 6 -34.5 20.5t-24.5 41t-10 55.5zM449 1071q0 33 10 59 q8 20 24 37q18 18 35 23q23 6 45 6t43 -6q20 -6 37 -23q20 -20 27 -37q8 -23 8 -59q0 -35 -8 -57q-8 -20 -27 -39q-16 -16 -37 -23q-22 -6 -43 -6q-23 0 -45 6q-16 4 -35 23q-16 16 -24 39q-10 26 -10 57z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1181" d="M115 551q0 133 35 242q35 106 94 178q61 74 151 110q88 37 201 37q68 0 119 -14q59 -16 106 -43l68 108l131 -73l-80 -129q63 -76 96 -179q35 -109 35 -237q0 -139 -33 -244q-31 -100 -96 -178q-61 -74 -151 -111q-94 -39 -201 -38q-123 0 -223 53l-68 -109l-131 74 l80 131q-65 71 -98 178q-35 111 -35 244zM303 551q0 -78 10 -150q9 -65 31 -116l397 647q-23 16 -67 26q-33 8 -82 9q-156 0 -221 -103q-68 -104 -68 -313zM446 164q23 -14 66 -25q33 -8 82 -8q154 0 221.5 104.5t67.5 315.5q0 162 -39 258z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1204" d="M164 381v717h182v-707q0 -129 53.5 -194.5t163.5 -65.5q76 0 135 27q55 25 90 75q31 43 48 125q14 70 14 170v570h182v-1098h-147l-27 147h-10q-27 -45 -60 -75q-29 -25 -75 -52q-40 -22 -86 -30q-51 -10 -95 -10q-88 0 -159 22q-68 23 -117 74q-41 45 -68 125 q-24 78 -24 180zM301 1548v21h219q15 -34 37 -74l45 -82q20 -37 47 -78q6 -8 15.5 -22.5l16.5 -25.5t13 -19v-27h-120q-47 37 -76 70l-80 86q-29 31 -70 84q-35 44 -47 67z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1204" d="M164 381v717h182v-707q0 -129 53.5 -194.5t163.5 -65.5q76 0 135 27q55 25 90 75q31 43 48 125q14 70 14 170v570h182v-1098h-147l-27 147h-10q-27 -45 -60 -75q-29 -25 -75 -52q-40 -22 -86 -30q-51 -10 -95 -10q-88 0 -159 22q-68 23 -117 74q-41 45 -68 125 q-24 78 -24 180zM489 1241v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1204" d="M164 381v717h182v-707q0 -129 53.5 -194.5t163.5 -65.5q76 0 135 27q55 25 90 75q31 43 48 125q14 70 14 170v570h182v-1098h-147l-27 147h-10q-27 -45 -60 -75q-29 -25 -75 -52q-40 -22 -86 -30q-51 -10 -95 -10q-88 0 -159 22q-68 23 -117 74q-41 45 -68 125 q-24 78 -24 180zM266 1241v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1204" d="M164 381v717h182v-707q0 -129 53.5 -194.5t163.5 -65.5q76 0 135 27q55 25 90 75q31 43 48 125q14 70 14 170v570h182v-1098h-147l-27 147h-10q-27 -45 -60 -75q-29 -25 -75 -52q-40 -22 -86 -30q-51 -10 -95 -10q-88 0 -159 22q-68 23 -117 74q-41 45 -68 125 q-24 78 -24 180zM309 1394.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM684 1394.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25 q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#xfd;" horiz-adv-x="999" d="M10 1098h189l215 -613l28 -84q8 -20 27 -88q14 -49 23 -86q8 -39 12 -75h6l6 25l10 42q10 43 25 92q16 66 27 97q8 27 15 46t11 33l199 611h188l-434 -1241q-29 -82 -61 -146q-35 -68 -74 -108q-41 -43 -103 -70q-57 -25 -137 -25q-66 0 -90 5q-41 6 -65 12v145 q16 -4 53 -8q41 -4 67 -4q49 0 82 12q41 14 62 33q27 25 45 53q12 20 33 74l57 160zM407 1241v27l45 67l22.5 36t24.5 42q8 12 45 82q22 40 37 74h219v-21q-12 -23 -47 -67q-31 -39 -71 -84l-78 -86q-29 -33 -76 -70h-121z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1198" d="M174 -492v2048h182v-458l-8 -148h8q18 29 52 66q29 33 67 53q47 25 86 35q57 14 109 14q95 0 172 -37q76 -37 131 -106q51 -66 84 -178q31 -109 30 -246q0 -141 -30 -248q-33 -113 -84 -178q-57 -74 -131 -109q-77 -37 -172 -36q-49 0 -107 14q-47 12 -86 33 q-31 16 -69 51q-23 20 -52 61h-12l4 -34.5t2 -30.5l4 -54q2 -18 2 -43v-469h-182zM356 551q0 -100 13 -180q12 -76 47 -131q37 -57 86 -82q53 -27 135 -27q133 0 199 109q63 106 63 313q0 209 -63.5 311.5t-200.5 102.5q-74 0 -129 -23q-47 -18 -84 -70q-34 -46 -49 -116 q-12 -59 -17 -166v-41z" />
+<glyph unicode="&#xff;" horiz-adv-x="999" d="M10 1098h189l215 -613l28 -84q8 -20 27 -88q14 -49 23 -86q8 -39 12 -75h6l6 25l10 42q10 43 25 92q16 66 27 97q8 27 15 46t11 33l199 611h188l-434 -1241q-29 -82 -61 -146q-35 -68 -74 -108q-41 -43 -103 -70q-57 -25 -137 -25q-66 0 -90 5q-41 6 -65 12v145 q16 -4 53 -8q41 -4 67 -4q49 0 82 12q41 14 62 33q27 25 45 53q12 20 33 74l57 160zM227 1394.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM602 1394.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6 t31 -18q10 -10 20 -31q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#x131;" horiz-adv-x="528" d="M356 0h-182v1098h182v-1098z" />
+<glyph unicode="&#x152;" horiz-adv-x="1822" d="M125 735q0 164 39 309q37 137 117 236q82 100 198 152q123 53 283 53q96 0 182 -23h756v-164h-574v-452h535v-162h-535v-520h574v-164h-758q-33 -6 -88 -14q-47 -6 -94 -6q-163 0 -283 55q-121 55 -198 151q-76 92 -115 240q-39 145 -39 309zM322 733q0 -127 26 -246 q23 -102 80 -186q52 -77 135 -117q86 -41 197 -41q55 0 96 9q47 10 84 24v1112q-35 14 -82 25q-39 8 -96 8q-111 0 -197 -41q-84 -41 -137 -115q-55 -77 -80 -184q-26 -117 -26 -248z" />
+<glyph unicode="&#x153;" horiz-adv-x="1863" d="M113 551q0 133 34 242q35 106 95 178q61 74 151 110.5t201 36.5q121 0 219 -55q94 -53 160 -162q63 109 153 162q92 55 209 55q102 0 178 -35q78 -37 134 -100q51 -59 84 -156q31 -90 30 -200v-113h-692q6 -195 82 -285t227 -90q66 0 95 4q57 8 83 15q43 10 78 24 q70 29 78 33v-162l-78 -33q-27 -10 -80 -22t-84 -14q-57 -4 -94 -4q-127 0 -231.5 57t-167.5 164q-66 -111 -162 -164q-102 -57 -227 -57q-100 0 -191 38q-84 37 -149 111q-61 70 -98 178q-37 107 -37 244zM301 551q0 -211 67.5 -315.5t223.5 -104.5q150 0 219.5 100.5 t69.5 309.5q0 221 -70 323.5t-221 102.5q-156 0 -221 -103q-68 -104 -68 -313zM1073 662h492q0 70 -13 124q-10 51 -43 97q-27 39 -71.5 61.5t-106.5 22.5q-113 0 -180 -78q-66 -73 -78 -227z" />
+<glyph unicode="&#x178;" horiz-adv-x="1077" d="M0 1462h203l336 -739l340 739h200l-446 -893v-569h-187v559zM258 1732.5q0 53.5 29 78.5q28 25 67.5 24.5t67.5 -24.5q29 -25 29 -78.5t-29 -77.5q-28 -25 -67.5 -25t-67.5 25q-29 24 -29 77.5zM633 1732.5q0 53.5 29 78.5q28 25 67 24q18 0 37 -6t31 -18q10 -10 20 -31 q8 -16 8 -47q0 -53 -28 -78q-27 -25 -68 -25q-40 0 -67 25q-29 24 -29 77.5z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1181" d="M258 1241v27q14 14 28.5 31.5l30.5 35.5q51 55 68 78q6 6 64 82q29 37 45 74h192q16 -37 45 -74q57 -76 64 -82q16 -23 67 -78l60 -67v-27h-121q-45 29 -105 82q-49 43 -106 104l-107 -104q-49 -45 -104 -82h-121z" />
+<glyph unicode="&#x2da;" horiz-adv-x="1181" d="M817 1458q0 -52 -18 -92q-20 -43 -47 -68q-33 -29 -72 -43q-41 -14 -92 -14q-53 0 -90 14q-41 16 -72 43q-29 27 -45 68q-16 43 -16 90t16 90q16 41 45 68q31 27 72 43q37 14 90 14q49 0 90 -14q43 -15 74 -43q29 -27 47 -66q18 -41 18 -90zM700 1456q0 49 -32 82 q-31 31 -80 31q-51 0 -82 -31t-31 -82t29 -84q27 -29 84 -29q51 0 80 29q32 33 32 84z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1181" d="M258 1241q6 63 21 109q16 51 43 84q31 37 63 53q37 18 84 18q43 0 82 -18q8 -4 25.5 -11.5l31 -13.5t23.5 -12l71 -39q35 -18 64 -18q45 0 68 26q25 27 38 88h105q-6 -63 -21 -108q-16 -51 -43 -84q-31 -37 -63 -53q-37 -18 -84 -19q-45 0 -80 17q-37 16 -78 40 q-14 8 -41.5 22.5t-29.5 16.5q-31 16 -68 17q-45 0 -70 -27q-20 -23 -37 -88h-104z" />
+<glyph unicode="&#x2000;" horiz-adv-x="952" />
+<glyph unicode="&#x2001;" horiz-adv-x="1906" />
+<glyph unicode="&#x2002;" horiz-adv-x="952" />
+<glyph unicode="&#x2003;" horiz-adv-x="1906" />
+<glyph unicode="&#x2004;" horiz-adv-x="634" />
+<glyph unicode="&#x2005;" horiz-adv-x="475" />
+<glyph unicode="&#x2006;" horiz-adv-x="315" />
+<glyph unicode="&#x2007;" horiz-adv-x="315" />
+<glyph unicode="&#x2008;" horiz-adv-x="237" />
+<glyph unicode="&#x2009;" horiz-adv-x="380" />
+<glyph unicode="&#x200a;" horiz-adv-x="104" />
+<glyph unicode="&#x2010;" horiz-adv-x="657" d="M82 465v168h496v-168h-496z" />
+<glyph unicode="&#x2011;" horiz-adv-x="657" d="M82 465v168h496v-168h-496z" />
+<glyph unicode="&#x2012;" horiz-adv-x="657" d="M82 465v168h496v-168h-496z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1024" d="M82 465v168h860v-168h-860z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2048" d="M82 465v168h1884v-168h-1884z" />
+<glyph unicode="&#x2018;" horiz-adv-x="356" d="M23 983l18 61l16 54q12 41 41 123l49 122l52 119h137q-6 -23 -15.5 -65.5l-13.5 -61.5q-18 -78 -28 -131q-4 -20 -11.5 -63l-11.5 -66q-2 -10 -20 -114h-199z" />
+<glyph unicode="&#x2019;" horiz-adv-x="356" d="M23 961q10 39 28 126l29 132l24 129l10.5 62.5l8.5 51.5h199l14 -22l-33 -115q-18 -61 -43 -123l-49 -125q-6 -16 -51 -116h-137z" />
+<glyph unicode="&#x201a;" horiz-adv-x="512" d="M63 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h198l15 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124q-6 -16 -51 -117h-138z" />
+<glyph unicode="&#x201c;" horiz-adv-x="741" d="M23 983l18 61l16 54q12 41 41 123l49 122l52 119h137q-6 -23 -15.5 -65.5l-13.5 -61.5q-18 -78 -28 -131q-4 -20 -11.5 -63l-11.5 -66q-2 -10 -20 -114h-199zM408 983l18 61l16 54q12 41 41 123l49 122l52 119h137q-6 -23 -15.5 -65.5l-13.5 -61.5q-18 -78 -28 -131 l-25 -129q-4 -23 -10 -62.5t-8 -51.5h-199z" />
+<glyph unicode="&#x201d;" horiz-adv-x="741" d="M23 961q10 39 28 126l29 132l24 129l10.5 62.5l8.5 51.5h199l14 -22l-33 -115q-18 -61 -43 -123l-49 -125q-6 -16 -51 -116h-137zM408 961q10 39 28 126l29 132l24 129l10.5 62.5l8.5 51.5h199l14 -22l-33 -115q-18 -61 -43 -123l-49 -125q-6 -16 -51 -116h-137z" />
+<glyph unicode="&#x201e;" horiz-adv-x="894" d="M63 -264q6 23 15.5 65.5l13.5 61.5l29 131l24 129l10.5 62.5t8.5 52.5h198l15 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124q-6 -16 -51 -117h-138zM449 -264l28 127l29 131l24 129l10.5 62.5t8.5 52.5h199l14 -23l-33 -115q-18 -61 -43 -123q-8 -25 -49 -124 q-6 -16 -51 -117h-137z" />
+<glyph unicode="&#x2022;" horiz-adv-x="768" d="M150 748q0 72 18 120q20 53 49 82t76 45q41 14 92 14.5t92 -14.5q47 -16 76 -44.5t49 -82.5q18 -49 19 -120q0 -70 -19 -119q-20 -53 -49 -82q-31 -31 -76 -47q-41 -14 -92 -14.5t-92 14.5q-45 16 -76 47q-29 29 -49 82q-18 49 -18 119z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1646" d="M147 111q0 35 11 65q10 29 26 43q20 16 39 23q29 8 51 8q16 0 50 -8q20 -4 41 -23q16 -14 26 -43q10 -31 10 -65q0 -33 -10 -64q-8 -25 -26 -43q-14 -14 -41 -24q-23 -8 -50 -9q-33 0 -51 9q-25 10 -39 24q-18 18 -26 43q-11 31 -11 64zM696 111q0 35 11 65q10 29 26 43 q20 16 39 23q29 8 51 8q16 0 49 -8q20 -4 41 -23q16 -14 27 -43q10 -31 10 -65q0 -33 -10 -64q-8 -25 -27 -43q-14 -14 -41 -24q-23 -8 -49 -9q-33 0 -51 9q-25 10 -39 24q-18 18 -26 43q-11 31 -11 64zM1245 111q0 35 10 65q10 29 27 43q20 16 41 23q29 8 49 8q16 0 49 -8 q20 -4 41 -23q16 -14 27 -43q10 -31 10 -65q0 -33 -10 -64q-8 -25 -27 -43q-14 -14 -41 -24q-23 -8 -49 -9q-55 0 -90 33q-37 33 -37 107z" />
+<glyph unicode="&#x202f;" horiz-adv-x="380" />
+<glyph unicode="&#x2039;" horiz-adv-x="589" d="M82 526v27l309 414l117 -78l-238 -348l238 -348l-117 -78z" />
+<glyph unicode="&#x203a;" horiz-adv-x="589" d="M82 193l237 348l-237 348l117 78l309 -414v-27l-309 -411z" />
+<glyph unicode="&#x2044;" horiz-adv-x="264" d="M616 1462l-811 -1462h-157l811 1462h157z" />
+<glyph unicode="&#x205f;" horiz-adv-x="475" />
+<glyph unicode="&#x20ac;" d="M63 502v137h148q-2 14 -2 39v43q0 8 1 22.5t1 22.5v31h-148v137h160q18 123 62 225q43 100 112 174q70 72 158 111q90 39 207 39q100 0 176 -21q78 -20 160 -71l-80 -146q-57 33 -111 53q-55 20 -131 21q-66 0 -129 -27q-55 -23 -104 -76t-82 -120.5t-51 -161.5h432v-137 h-447q0 -6 -1 -14.5t-1 -14.5v-25v-22v-39q0 -29 2 -43h385v-137h-366q33 -172 127 -266q92 -92 241 -93q70 0 142 17q66 14 127 41v-162q-59 -29 -125 -43q-72 -16 -158 -16q-115 0 -207 36q-88 35 -158 105q-68 68 -110 164q-45 98 -66 217h-164z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1533" d="M37 1354v108h522v-108h-199v-613h-127v613h-196zM625 741v721h186l180 -551l191 551h178v-721h-127v428v25q0 4 1 14.5t1 16.5v35q0 6 1 16t1 14h-6l-195 -549h-100l-186 549h-7q0 -8 1 -16t1 -17q0 -6 1.5 -17t1.5 -15v-27v-18v-439h-123z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1100" d="M0 1100h1100v-1100h-1100v1100z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1202" d="M29 961v75l194 68v96q0 104 23 178q20 68 65 113q41 41 105 59q55 16 139 17q68 0 109 -11q53 -14 88 -26l-47 -141q-25 10 -68 20q-33 8 -76 8q-39 0 -69.5 -10t-47.5 -33q-20 -27 -28 -65q-10 -47 -10 -107v-104h245v-137h-245v-961h-183v961h-194zM834 1395 q0 59 30 88q29 27 76 26q23 0 41 -6q20 -8 35 -20q12 -12 23 -37q8 -18 8 -51q0 -58 -31 -86q-33 -29 -76 -29t-76 29q-30 28 -30 86zM848 0v1098h182v-1098h-182z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1202" d="M29 961v75l194 68v96q0 104 23 178q20 68 65 113q41 41 105 59q55 16 139 17q68 0 109 -11q53 -14 88 -26l-47 -141q-25 10 -68 20q-33 8 -76 8q-39 0 -69.5 -10t-47.5 -33q-20 -27 -28 -65q-10 -47 -10 -107v-104h245v-137h-245v-961h-183v961h-194zM848 0v1556h182 v-1556h-182z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1875" d="M29 961v75l194 68v96q0 104 23 178q20 68 65 113q41 41 105 59q55 16 139 17q68 0 109 -11q53 -14 88 -26l-47 -141q-25 10 -68 20q-33 8 -76 8q-39 0 -69.5 -10t-47.5 -33q-20 -27 -28 -65q-10 -47 -10 -107v-104h245v-137h-245v-961h-183v961h-194zM703 961v75l194 68 v96q0 104 23 178q20 68 65 113q41 41 105 59q55 16 139 17q68 0 109 -11q53 -14 88 -26l-47 -141q-25 10 -68 20q-33 8 -76 8q-39 0 -69.5 -10t-47.5 -33q-20 -27 -28 -65q-10 -47 -10 -107v-104h245v-137h-245v-961h-183v961h-194zM1508 1395q0 59 30 88q29 27 76 26 q23 0 41 -6q20 -8 35 -20q12 -12 23 -37q8 -18 8 -51q0 -58 -31 -86q-33 -29 -76 -29t-76 29q-30 28 -30 86zM1522 0v1098h182v-1098h-182z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1875" d="M29 961v75l194 68v96q0 104 23 178q20 68 65 113q41 41 105 59q55 16 139 17q68 0 109 -11q53 -14 88 -26l-47 -141q-25 10 -68 20q-33 8 -76 8q-39 0 -69.5 -10t-47.5 -33q-20 -27 -28 -65q-10 -47 -10 -107v-104h245v-137h-245v-961h-183v961h-194zM703 961v75l194 68 v96q0 104 23 178q20 68 65 113q41 41 105 59q55 16 139 17q68 0 109 -11q53 -14 88 -26l-47 -141q-25 10 -68 20q-33 8 -76 8q-39 0 -69.5 -10t-47.5 -33q-20 -27 -28 -65q-10 -47 -10 -107v-104h245v-137h-245v-961h-183v961h-194zM1522 0v1556h182v-1556h-182z" />
+<glyph horiz-adv-x="677" d="M655 778h-125v-192h-143v192h-375v111l377 579h141v-563h125v-127zM387 905v195q0 14 1 45t1 47q0 33 4 98q-2 -4 -6 -14t-8 -16q-4 -8 -8 -13.5t-7.5 -11.5t-7.5 -14l-22 -41l-21 -35l-155 -240h229z" />
+</font>
+</defs></svg> 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/fonts/DroidSans-webfont.ttf
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/fonts/DroidSans-webfont.ttf b/pulse/src/main/webapp/css/fonts/DroidSans-webfont.ttf
new file mode 100644
index 0000000..e243507
Binary files /dev/null and b/pulse/src/main/webapp/css/fonts/DroidSans-webfont.ttf differ



[12/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/multiselect/jquery-ui.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/multiselect/jquery-ui.js b/pulse/src/main/webapp/scripts/multiselect/jquery-ui.js
new file mode 100644
index 0000000..6eccbfe
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/multiselect/jquery-ui.js
@@ -0,0 +1,14987 @@
+/*! jQuery UI - v1.10.2 - 2013-03-14
+* http://jqueryui.com
+* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
+(function( $, undefined ) {
+
+var uuid = 0,
+	runiqueId = /^ui-id-\d+$/;
+
+// $.ui might exist from components with no dependencies, e.g., $.ui.position
+$.ui = $.ui || {};
+
+$.extend( $.ui, {
+	version: "1.10.2",
+
+	keyCode: {
+		BACKSPACE: 8,
+		COMMA: 188,
+		DELETE: 46,
+		DOWN: 40,
+		END: 35,
+		ENTER: 13,
+		ESCAPE: 27,
+		HOME: 36,
+		LEFT: 37,
+		NUMPAD_ADD: 107,
+		NUMPAD_DECIMAL: 110,
+		NUMPAD_DIVIDE: 111,
+		NUMPAD_ENTER: 108,
+		NUMPAD_MULTIPLY: 106,
+		NUMPAD_SUBTRACT: 109,
+		PAGE_DOWN: 34,
+		PAGE_UP: 33,
+		PERIOD: 190,
+		RIGHT: 39,
+		SPACE: 32,
+		TAB: 9,
+		UP: 38
+	}
+});
+
+// plugins
+$.fn.extend({
+	focus: (function( orig ) {
+		return function( delay, fn ) {
+			return typeof delay === "number" ?
+				this.each(function() {
+					var elem = this;
+					setTimeout(function() {
+						$( elem ).focus();
+						if ( fn ) {
+							fn.call( elem );
+						}
+					}, delay );
+				}) :
+				orig.apply( this, arguments );
+		};
+	})( $.fn.focus ),
+
+	scrollParent: function() {
+		var scrollParent;
+		if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
+			scrollParent = this.parents().filter(function() {
+				return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
+			}).eq(0);
+		} else {
+			scrollParent = this.parents().filter(function() {
+				return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
+			}).eq(0);
+		}
+
+		return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
+	},
+
+	zIndex: function( zIndex ) {
+		if ( zIndex !== undefined ) {
+			return this.css( "zIndex", zIndex );
+		}
+
+		if ( this.length ) {
+			var elem = $( this[ 0 ] ), position, value;
+			while ( elem.length && elem[ 0 ] !== document ) {
+				// Ignore z-index if position is set to a value where z-index is ignored by the browser
+				// This makes behavior of this function consistent across browsers
+				// WebKit always returns auto if the element is positioned
+				position = elem.css( "position" );
+				if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+					// IE returns 0 when zIndex is not specified
+					// other browsers return a string
+					// we ignore the case of nested elements with an explicit value of 0
+					// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+					value = parseInt( elem.css( "zIndex" ), 10 );
+					if ( !isNaN( value ) && value !== 0 ) {
+						return value;
+					}
+				}
+				elem = elem.parent();
+			}
+		}
+
+		return 0;
+	},
+
+	uniqueId: function() {
+		return this.each(function() {
+			if ( !this.id ) {
+				this.id = "ui-id-" + (++uuid);
+			}
+		});
+	},
+
+	removeUniqueId: function() {
+		return this.each(function() {
+			if ( runiqueId.test( this.id ) ) {
+				$( this ).removeAttr( "id" );
+			}
+		});
+	}
+});
+
+// selectors
+function focusable( element, isTabIndexNotNaN ) {
+	var map, mapName, img,
+		nodeName = element.nodeName.toLowerCase();
+	if ( "area" === nodeName ) {
+		map = element.parentNode;
+		mapName = map.name;
+		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+			return false;
+		}
+		img = $( "img[usemap=#" + mapName + "]" )[0];
+		return !!img && visible( img );
+	}
+	return ( /input|select|textarea|button|object/.test( nodeName ) ?
+		!element.disabled :
+		"a" === nodeName ?
+			element.href || isTabIndexNotNaN :
+			isTabIndexNotNaN) &&
+		// the element and all of its ancestors must be visible
+		visible( element );
+}
+
+function visible( element ) {
+	return $.expr.filters.visible( element ) &&
+		!$( element ).parents().addBack().filter(function() {
+			return $.css( this, "visibility" ) === "hidden";
+		}).length;
+}
+
+$.extend( $.expr[ ":" ], {
+	data: $.expr.createPseudo ?
+		$.expr.createPseudo(function( dataName ) {
+			return function( elem ) {
+				return !!$.data( elem, dataName );
+			};
+		}) :
+		// support: jQuery <1.8
+		function( elem, i, match ) {
+			return !!$.data( elem, match[ 3 ] );
+		},
+
+	focusable: function( element ) {
+		return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+	},
+
+	tabbable: function( element ) {
+		var tabIndex = $.attr( element, "tabindex" ),
+			isTabIndexNaN = isNaN( tabIndex );
+		return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+	}
+});
+
+// support: jQuery <1.8
+if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
+	$.each( [ "Width", "Height" ], function( i, name ) {
+		var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+			type = name.toLowerCase(),
+			orig = {
+				innerWidth: $.fn.innerWidth,
+				innerHeight: $.fn.innerHeight,
+				outerWidth: $.fn.outerWidth,
+				outerHeight: $.fn.outerHeight
+			};
+
+		function reduce( elem, size, border, margin ) {
+			$.each( side, function() {
+				size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
+				if ( border ) {
+					size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
+				}
+				if ( margin ) {
+					size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
+				}
+			});
+			return size;
+		}
+
+		$.fn[ "inner" + name ] = function( size ) {
+			if ( size === undefined ) {
+				return orig[ "inner" + name ].call( this );
+			}
+
+			return this.each(function() {
+				$( this ).css( type, reduce( this, size ) + "px" );
+			});
+		};
+
+		$.fn[ "outer" + name] = function( size, margin ) {
+			if ( typeof size !== "number" ) {
+				return orig[ "outer" + name ].call( this, size );
+			}
+
+			return this.each(function() {
+				$( this).css( type, reduce( this, size, true, margin ) + "px" );
+			});
+		};
+	});
+}
+
+// support: jQuery <1.8
+if ( !$.fn.addBack ) {
+	$.fn.addBack = function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter( selector )
+		);
+	};
+}
+
+// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
+if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
+	$.fn.removeData = (function( removeData ) {
+		return function( key ) {
+			if ( arguments.length ) {
+				return removeData.call( this, $.camelCase( key ) );
+			} else {
+				return removeData.call( this );
+			}
+		};
+	})( $.fn.removeData );
+}
+
+
+
+
+
+// deprecated
+$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
+
+$.support.selectstart = "onselectstart" in document.createElement( "div" );
+$.fn.extend({
+	disableSelection: function() {
+		return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+			".ui-disableSelection", function( event ) {
+				event.preventDefault();
+			});
+	},
+
+	enableSelection: function() {
+		return this.unbind( ".ui-disableSelection" );
+	}
+});
+
+$.extend( $.ui, {
+	// $.ui.plugin is deprecated.  Use the proxy pattern instead.
+	plugin: {
+		add: function( module, option, set ) {
+			var i,
+				proto = $.ui[ module ].prototype;
+			for ( i in set ) {
+				proto.plugins[ i ] = proto.plugins[ i ] || [];
+				proto.plugins[ i ].push( [ option, set[ i ] ] );
+			}
+		},
+		call: function( instance, name, args ) {
+			var i,
+				set = instance.plugins[ name ];
+			if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
+				return;
+			}
+
+			for ( i = 0; i < set.length; i++ ) {
+				if ( instance.options[ set[ i ][ 0 ] ] ) {
+					set[ i ][ 1 ].apply( instance.element, args );
+				}
+			}
+		}
+	},
+
+	// only used by resizable
+	hasScroll: function( el, a ) {
+
+		//If overflow is hidden, the element might have extra content, but the user wants to hide it
+		if ( $( el ).css( "overflow" ) === "hidden") {
+			return false;
+		}
+
+		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+			has = false;
+
+		if ( el[ scroll ] > 0 ) {
+			return true;
+		}
+
+		// TODO: determine which cases actually cause this to happen
+		// if the element doesn't have the scroll set, see if it's possible to
+		// set the scroll
+		el[ scroll ] = 1;
+		has = ( el[ scroll ] > 0 );
+		el[ scroll ] = 0;
+		return has;
+	}
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+var uuid = 0,
+	slice = Array.prototype.slice,
+	_cleanData = $.cleanData;
+$.cleanData = function( elems ) {
+	for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+		try {
+			$( elem ).triggerHandler( "remove" );
+		// http://bugs.jquery.com/ticket/8235
+		} catch( e ) {}
+	}
+	_cleanData( elems );
+};
+
+$.widget = function( name, base, prototype ) {
+	var fullName, existingConstructor, constructor, basePrototype,
+		// proxiedPrototype allows the provided prototype to remain unmodified
+		// so that it can be used as a mixin for multiple widgets (#8876)
+		proxiedPrototype = {},
+		namespace = name.split( "." )[ 0 ];
+
+	name = name.split( "." )[ 1 ];
+	fullName = namespace + "-" + name;
+
+	if ( !prototype ) {
+		prototype = base;
+		base = $.Widget;
+	}
+
+	// create selector for plugin
+	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+		return !!$.data( elem, fullName );
+	};
+
+	$[ namespace ] = $[ namespace ] || {};
+	existingConstructor = $[ namespace ][ name ];
+	constructor = $[ namespace ][ name ] = function( options, element ) {
+		// allow instantiation without "new" keyword
+		if ( !this._createWidget ) {
+			return new constructor( options, element );
+		}
+
+		// allow instantiation without initializing for simple inheritance
+		// must use "new" keyword (the code above always passes args)
+		if ( arguments.length ) {
+			this._createWidget( options, element );
+		}
+	};
+	// extend with the existing constructor to carry over any static properties
+	$.extend( constructor, existingConstructor, {
+		version: prototype.version,
+		// copy the object used to create the prototype in case we need to
+		// redefine the widget later
+		_proto: $.extend( {}, prototype ),
+		// track widgets that inherit from this widget in case this widget is
+		// redefined after a widget inherits from it
+		_childConstructors: []
+	});
+
+	basePrototype = new base();
+	// we need to make the options hash a property directly on the new instance
+	// otherwise we'll modify the options hash on the prototype that we're
+	// inheriting from
+	basePrototype.options = $.widget.extend( {}, basePrototype.options );
+	$.each( prototype, function( prop, value ) {
+		if ( !$.isFunction( value ) ) {
+			proxiedPrototype[ prop ] = value;
+			return;
+		}
+		proxiedPrototype[ prop ] = (function() {
+			var _super = function() {
+					return base.prototype[ prop ].apply( this, arguments );
+				},
+				_superApply = function( args ) {
+					return base.prototype[ prop ].apply( this, args );
+				};
+			return function() {
+				var __super = this._super,
+					__superApply = this._superApply,
+					returnValue;
+
+				this._super = _super;
+				this._superApply = _superApply;
+
+				returnValue = value.apply( this, arguments );
+
+				this._super = __super;
+				this._superApply = __superApply;
+
+				return returnValue;
+			};
+		})();
+	});
+	constructor.prototype = $.widget.extend( basePrototype, {
+		// TODO: remove support for widgetEventPrefix
+		// always use the name + a colon as the prefix, e.g., draggable:start
+		// don't prefix for widgets that aren't DOM-based
+		widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
+	}, proxiedPrototype, {
+		constructor: constructor,
+		namespace: namespace,
+		widgetName: name,
+		widgetFullName: fullName
+	});
+
+	// If this widget is being redefined then we need to find all widgets that
+	// are inheriting from it and redefine all of them so that they inherit from
+	// the new version of this widget. We're essentially trying to replace one
+	// level in the prototype chain.
+	if ( existingConstructor ) {
+		$.each( existingConstructor._childConstructors, function( i, child ) {
+			var childPrototype = child.prototype;
+
+			// redefine the child widget using the same prototype that was
+			// originally used, but inherit from the new version of the base
+			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+		});
+		// remove the list of existing child constructors from the old constructor
+		// so the old child constructors can be garbage collected
+		delete existingConstructor._childConstructors;
+	} else {
+		base._childConstructors.push( constructor );
+	}
+
+	$.widget.bridge( name, constructor );
+};
+
+$.widget.extend = function( target ) {
+	var input = slice.call( arguments, 1 ),
+		inputIndex = 0,
+		inputLength = input.length,
+		key,
+		value;
+	for ( ; inputIndex < inputLength; inputIndex++ ) {
+		for ( key in input[ inputIndex ] ) {
+			value = input[ inputIndex ][ key ];
+			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+				// Clone objects
+				if ( $.isPlainObject( value ) ) {
+					target[ key ] = $.isPlainObject( target[ key ] ) ?
+						$.widget.extend( {}, target[ key ], value ) :
+						// Don't extend strings, arrays, etc. with objects
+						$.widget.extend( {}, value );
+				// Copy everything else by reference
+				} else {
+					target[ key ] = value;
+				}
+			}
+		}
+	}
+	return target;
+};
+
+$.widget.bridge = function( name, object ) {
+	var fullName = object.prototype.widgetFullName || name;
+	$.fn[ name ] = function( options ) {
+		var isMethodCall = typeof options === "string",
+			args = slice.call( arguments, 1 ),
+			returnValue = this;
+
+		// allow multiple hashes to be passed on init
+		options = !isMethodCall && args.length ?
+			$.widget.extend.apply( null, [ options ].concat(args) ) :
+			options;
+
+		if ( isMethodCall ) {
+			this.each(function() {
+				var methodValue,
+					instance = $.data( this, fullName );
+				if ( !instance ) {
+					return $.error( "cannot call methods on " + name + " prior to initialization; " +
+						"attempted to call method '" + options + "'" );
+				}
+				if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+					return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+				}
+				methodValue = instance[ options ].apply( instance, args );
+				if ( methodValue !== instance && methodValue !== undefined ) {
+					returnValue = methodValue && methodValue.jquery ?
+						returnValue.pushStack( methodValue.get() ) :
+						methodValue;
+					return false;
+				}
+			});
+		} else {
+			this.each(function() {
+				var instance = $.data( this, fullName );
+				if ( instance ) {
+					instance.option( options || {} )._init();
+				} else {
+					$.data( this, fullName, new object( options, this ) );
+				}
+			});
+		}
+
+		return returnValue;
+	};
+};
+
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+	widgetName: "widget",
+	widgetEventPrefix: "",
+	defaultElement: "<div>",
+	options: {
+		disabled: false,
+
+		// callbacks
+		create: null
+	},
+	_createWidget: function( options, element ) {
+		element = $( element || this.defaultElement || this )[ 0 ];
+		this.element = $( element );
+		this.uuid = uuid++;
+		this.eventNamespace = "." + this.widgetName + this.uuid;
+		this.options = $.widget.extend( {},
+			this.options,
+			this._getCreateOptions(),
+			options );
+
+		this.bindings = $();
+		this.hoverable = $();
+		this.focusable = $();
+
+		if ( element !== this ) {
+			$.data( element, this.widgetFullName, this );
+			this._on( true, this.element, {
+				remove: function( event ) {
+					if ( event.target === element ) {
+						this.destroy();
+					}
+				}
+			});
+			this.document = $( element.style ?
+				// element within the document
+				element.ownerDocument :
+				// element is window or document
+				element.document || element );
+			this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+		}
+
+		this._create();
+		this._trigger( "create", null, this._getCreateEventData() );
+		this._init();
+	},
+	_getCreateOptions: $.noop,
+	_getCreateEventData: $.noop,
+	_create: $.noop,
+	_init: $.noop,
+
+	destroy: function() {
+		this._destroy();
+		// we can probably remove the unbind calls in 2.0
+		// all event bindings should go through this._on()
+		this.element
+			.unbind( this.eventNamespace )
+			// 1.9 BC for #7810
+			// TODO remove dual storage
+			.removeData( this.widgetName )
+			.removeData( this.widgetFullName )
+			// support: jquery <1.6.3
+			// http://bugs.jquery.com/ticket/9413
+			.removeData( $.camelCase( this.widgetFullName ) );
+		this.widget()
+			.unbind( this.eventNamespace )
+			.removeAttr( "aria-disabled" )
+			.removeClass(
+				this.widgetFullName + "-disabled " +
+				"ui-state-disabled" );
+
+		// clean up events and states
+		this.bindings.unbind( this.eventNamespace );
+		this.hoverable.removeClass( "ui-state-hover" );
+		this.focusable.removeClass( "ui-state-focus" );
+	},
+	_destroy: $.noop,
+
+	widget: function() {
+		return this.element;
+	},
+
+	option: function( key, value ) {
+		var options = key,
+			parts,
+			curOption,
+			i;
+
+		if ( arguments.length === 0 ) {
+			// don't return a reference to the internal hash
+			return $.widget.extend( {}, this.options );
+		}
+
+		if ( typeof key === "string" ) {
+			// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+			options = {};
+			parts = key.split( "." );
+			key = parts.shift();
+			if ( parts.length ) {
+				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+				for ( i = 0; i < parts.length - 1; i++ ) {
+					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+					curOption = curOption[ parts[ i ] ];
+				}
+				key = parts.pop();
+				if ( value === undefined ) {
+					return curOption[ key ] === undefined ? null : curOption[ key ];
+				}
+				curOption[ key ] = value;
+			} else {
+				if ( value === undefined ) {
+					return this.options[ key ] === undefined ? null : this.options[ key ];
+				}
+				options[ key ] = value;
+			}
+		}
+
+		this._setOptions( options );
+
+		return this;
+	},
+	_setOptions: function( options ) {
+		var key;
+
+		for ( key in options ) {
+			this._setOption( key, options[ key ] );
+		}
+
+		return this;
+	},
+	_setOption: function( key, value ) {
+		this.options[ key ] = value;
+
+		if ( key === "disabled" ) {
+			this.widget()
+				.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
+				.attr( "aria-disabled", value );
+			this.hoverable.removeClass( "ui-state-hover" );
+			this.focusable.removeClass( "ui-state-focus" );
+		}
+
+		return this;
+	},
+
+	enable: function() {
+		return this._setOption( "disabled", false );
+	},
+	disable: function() {
+		return this._setOption( "disabled", true );
+	},
+
+	_on: function( suppressDisabledCheck, element, handlers ) {
+		var delegateElement,
+			instance = this;
+
+		// no suppressDisabledCheck flag, shuffle arguments
+		if ( typeof suppressDisabledCheck !== "boolean" ) {
+			handlers = element;
+			element = suppressDisabledCheck;
+			suppressDisabledCheck = false;
+		}
+
+		// no element argument, shuffle and use this.element
+		if ( !handlers ) {
+			handlers = element;
+			element = this.element;
+			delegateElement = this.widget();
+		} else {
+			// accept selectors, DOM elements
+			element = delegateElement = $( element );
+			this.bindings = this.bindings.add( element );
+		}
+
+		$.each( handlers, function( event, handler ) {
+			function handlerProxy() {
+				// allow widgets to customize the disabled handling
+				// - disabled as an array instead of boolean
+				// - disabled class as method for disabling individual parts
+				if ( !suppressDisabledCheck &&
+						( instance.options.disabled === true ||
+							$( this ).hasClass( "ui-state-disabled" ) ) ) {
+					return;
+				}
+				return ( typeof handler === "string" ? instance[ handler ] : handler )
+					.apply( instance, arguments );
+			}
+
+			// copy the guid so direct unbinding works
+			if ( typeof handler !== "string" ) {
+				handlerProxy.guid = handler.guid =
+					handler.guid || handlerProxy.guid || $.guid++;
+			}
+
+			var match = event.match( /^(\w+)\s*(.*)$/ ),
+				eventName = match[1] + instance.eventNamespace,
+				selector = match[2];
+			if ( selector ) {
+				delegateElement.delegate( selector, eventName, handlerProxy );
+			} else {
+				element.bind( eventName, handlerProxy );
+			}
+		});
+	},
+
+	_off: function( element, eventName ) {
+		eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+		element.unbind( eventName ).undelegate( eventName );
+	},
+
+	_delay: function( handler, delay ) {
+		function handlerProxy() {
+			return ( typeof handler === "string" ? instance[ handler ] : handler )
+				.apply( instance, arguments );
+		}
+		var instance = this;
+		return setTimeout( handlerProxy, delay || 0 );
+	},
+
+	_hoverable: function( element ) {
+		this.hoverable = this.hoverable.add( element );
+		this._on( element, {
+			mouseenter: function( event ) {
+				$( event.currentTarget ).addClass( "ui-state-hover" );
+			},
+			mouseleave: function( event ) {
+				$( event.currentTarget ).removeClass( "ui-state-hover" );
+			}
+		});
+	},
+
+	_focusable: function( element ) {
+		this.focusable = this.focusable.add( element );
+		this._on( element, {
+			focusin: function( event ) {
+				$( event.currentTarget ).addClass( "ui-state-focus" );
+			},
+			focusout: function( event ) {
+				$( event.currentTarget ).removeClass( "ui-state-focus" );
+			}
+		});
+	},
+
+	_trigger: function( type, event, data ) {
+		var prop, orig,
+			callback = this.options[ type ];
+
+		data = data || {};
+		event = $.Event( event );
+		event.type = ( type === this.widgetEventPrefix ?
+			type :
+			this.widgetEventPrefix + type ).toLowerCase();
+		// the original event may come from any element
+		// so we need to reset the target on the new event
+		event.target = this.element[ 0 ];
+
+		// copy original event properties over to the new event
+		orig = event.originalEvent;
+		if ( orig ) {
+			for ( prop in orig ) {
+				if ( !( prop in event ) ) {
+					event[ prop ] = orig[ prop ];
+				}
+			}
+		}
+
+		this.element.trigger( event, data );
+		return !( $.isFunction( callback ) &&
+			callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+			event.isDefaultPrevented() );
+	}
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+		if ( typeof options === "string" ) {
+			options = { effect: options };
+		}
+		var hasOptions,
+			effectName = !options ?
+				method :
+				options === true || typeof options === "number" ?
+					defaultEffect :
+					options.effect || defaultEffect;
+		options = options || {};
+		if ( typeof options === "number" ) {
+			options = { duration: options };
+		}
+		hasOptions = !$.isEmptyObject( options );
+		options.complete = callback;
+		if ( options.delay ) {
+			element.delay( options.delay );
+		}
+		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
+			element[ method ]( options );
+		} else if ( effectName !== method && element[ effectName ] ) {
+			element[ effectName ]( options.duration, options.easing, callback );
+		} else {
+			element.queue(function( next ) {
+				$( this )[ method ]();
+				if ( callback ) {
+					callback.call( element[ 0 ] );
+				}
+				next();
+			});
+		}
+	};
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+var mouseHandled = false;
+$( document ).mouseup( function() {
+	mouseHandled = false;
+});
+
+$.widget("ui.mouse", {
+	version: "1.10.2",
+	options: {
+		cancel: "input,textarea,button,select,option",
+		distance: 1,
+		delay: 0
+	},
+	_mouseInit: function() {
+		var that = this;
+
+		this.element
+			.bind("mousedown."+this.widgetName, function(event) {
+				return that._mouseDown(event);
+			})
+			.bind("click."+this.widgetName, function(event) {
+				if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
+					$.removeData(event.target, that.widgetName + ".preventClickEvent");
+					event.stopImmediatePropagation();
+					return false;
+				}
+			});
+
+		this.started = false;
+	},
+
+	// TODO: make sure destroying one instance of mouse doesn't mess with
+	// other instances of mouse
+	_mouseDestroy: function() {
+		this.element.unbind("."+this.widgetName);
+		if ( this._mouseMoveDelegate ) {
+			$(document)
+				.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+				.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
+		}
+	},
+
+	_mouseDown: function(event) {
+		// don't let more than one widget handle mouseStart
+		if( mouseHandled ) { return; }
+
+		// we may have missed mouseup (out of window)
+		(this._mouseStarted && this._mouseUp(event));
+
+		this._mouseDownEvent = event;
+
+		var that = this,
+			btnIsLeft = (event.which === 1),
+			// event.target.nodeName works around a bug in IE 8 with
+			// disabled inputs (#7620)
+			elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+		if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+			return true;
+		}
+
+		this.mouseDelayMet = !this.options.delay;
+		if (!this.mouseDelayMet) {
+			this._mouseDelayTimer = setTimeout(function() {
+				that.mouseDelayMet = true;
+			}, this.options.delay);
+		}
+
+		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+			this._mouseStarted = (this._mouseStart(event) !== false);
+			if (!this._mouseStarted) {
+				event.preventDefault();
+				return true;
+			}
+		}
+
+		// Click event may never have fired (Gecko & Opera)
+		if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
+			$.removeData(event.target, this.widgetName + ".preventClickEvent");
+		}
+
+		// these delegates are required to keep context
+		this._mouseMoveDelegate = function(event) {
+			return that._mouseMove(event);
+		};
+		this._mouseUpDelegate = function(event) {
+			return that._mouseUp(event);
+		};
+		$(document)
+			.bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+			.bind("mouseup."+this.widgetName, this._mouseUpDelegate);
+
+		event.preventDefault();
+
+		mouseHandled = true;
+		return true;
+	},
+
+	_mouseMove: function(event) {
+		// IE mouseup check - mouseup happened when mouse was out of window
+		if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
+			return this._mouseUp(event);
+		}
+
+		if (this._mouseStarted) {
+			this._mouseDrag(event);
+			return event.preventDefault();
+		}
+
+		if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+			this._mouseStarted =
+				(this._mouseStart(this._mouseDownEvent, event) !== false);
+			(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+		}
+
+		return !this._mouseStarted;
+	},
+
+	_mouseUp: function(event) {
+		$(document)
+			.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+			.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
+
+		if (this._mouseStarted) {
+			this._mouseStarted = false;
+
+			if (event.target === this._mouseDownEvent.target) {
+				$.data(event.target, this.widgetName + ".preventClickEvent", true);
+			}
+
+			this._mouseStop(event);
+		}
+
+		return false;
+	},
+
+	_mouseDistanceMet: function(event) {
+		return (Math.max(
+				Math.abs(this._mouseDownEvent.pageX - event.pageX),
+				Math.abs(this._mouseDownEvent.pageY - event.pageY)
+			) >= this.options.distance
+		);
+	},
+
+	_mouseDelayMet: function(/* event */) {
+		return this.mouseDelayMet;
+	},
+
+	// These are placeholder methods, to be overriden by extending plugin
+	_mouseStart: function(/* event */) {},
+	_mouseDrag: function(/* event */) {},
+	_mouseStop: function(/* event */) {},
+	_mouseCapture: function(/* event */) { return true; }
+});
+
+})(jQuery);
+
+(function( $, undefined ) {
+
+$.widget("ui.draggable", $.ui.mouse, {
+	version: "1.10.2",
+	widgetEventPrefix: "drag",
+	options: {
+		addClasses: true,
+		appendTo: "parent",
+		axis: false,
+		connectToSortable: false,
+		containment: false,
+		cursor: "auto",
+		cursorAt: false,
+		grid: false,
+		handle: false,
+		helper: "original",
+		iframeFix: false,
+		opacity: false,
+		refreshPositions: false,
+		revert: false,
+		revertDuration: 500,
+		scope: "default",
+		scroll: true,
+		scrollSensitivity: 20,
+		scrollSpeed: 20,
+		snap: false,
+		snapMode: "both",
+		snapTolerance: 20,
+		stack: false,
+		zIndex: false,
+
+		// callbacks
+		drag: null,
+		start: null,
+		stop: null
+	},
+	_create: function() {
+
+		if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
+			this.element[0].style.position = "relative";
+		}
+		if (this.options.addClasses){
+			this.element.addClass("ui-draggable");
+		}
+		if (this.options.disabled){
+			this.element.addClass("ui-draggable-disabled");
+		}
+
+		this._mouseInit();
+
+	},
+
+	_destroy: function() {
+		this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
+		this._mouseDestroy();
+	},
+
+	_mouseCapture: function(event) {
+
+		var o = this.options;
+
+		// among others, prevent a drag on a resizable-handle
+		if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
+			return false;
+		}
+
+		//Quit if we're not on a valid handle
+		this.handle = this._getHandle(event);
+		if (!this.handle) {
+			return false;
+		}
+
+		$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+			$("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>")
+			.css({
+				width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+				position: "absolute", opacity: "0.001", zIndex: 1000
+			})
+			.css($(this).offset())
+			.appendTo("body");
+		});
+
+		return true;
+
+	},
+
+	_mouseStart: function(event) {
+
+		var o = this.options;
+
+		//Create and append the visible helper
+		this.helper = this._createHelper(event);
+
+		this.helper.addClass("ui-draggable-dragging");
+
+		//Cache the helper size
+		this._cacheHelperProportions();
+
+		//If ddmanager is used for droppables, set the global draggable
+		if($.ui.ddmanager) {
+			$.ui.ddmanager.current = this;
+		}
+
+		/*
+		 * - Position generation -
+		 * This block generates everything position related - it's the core of draggables.
+		 */
+
+		//Cache the margins of the original element
+		this._cacheMargins();
+
+		//Store the helper's css position
+		this.cssPosition = this.helper.css("position");
+		this.scrollParent = this.helper.scrollParent();
+
+		//The element's absolute position on the page minus margins
+		this.offset = this.positionAbs = this.element.offset();
+		this.offset = {
+			top: this.offset.top - this.margins.top,
+			left: this.offset.left - this.margins.left
+		};
+
+		$.extend(this.offset, {
+			click: { //Where the click happened, relative to the element
+				left: event.pageX - this.offset.left,
+				top: event.pageY - this.offset.top
+			},
+			parent: this._getParentOffset(),
+			relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+		});
+
+		//Generate the original position
+		this.originalPosition = this.position = this._generatePosition(event);
+		this.originalPageX = event.pageX;
+		this.originalPageY = event.pageY;
+
+		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
+		(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+		//Set a containment if given in the options
+		if(o.containment) {
+			this._setContainment();
+		}
+
+		//Trigger event + callbacks
+		if(this._trigger("start", event) === false) {
+			this._clear();
+			return false;
+		}
+
+		//Recache the helper size
+		this._cacheHelperProportions();
+
+		//Prepare the droppable offsets
+		if ($.ui.ddmanager && !o.dropBehaviour) {
+			$.ui.ddmanager.prepareOffsets(this, event);
+		}
+
+
+		this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+
+		//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
+		if ( $.ui.ddmanager ) {
+			$.ui.ddmanager.dragStart(this, event);
+		}
+
+		return true;
+	},
+
+	_mouseDrag: function(event, noPropagation) {
+
+		//Compute the helpers position
+		this.position = this._generatePosition(event);
+		this.positionAbs = this._convertPositionTo("absolute");
+
+		//Call plugins and callbacks and use the resulting position if something is returned
+		if (!noPropagation) {
+			var ui = this._uiHash();
+			if(this._trigger("drag", event, ui) === false) {
+				this._mouseUp({});
+				return false;
+			}
+			this.position = ui.position;
+		}
+
+		if(!this.options.axis || this.options.axis !== "y") {
+			this.helper[0].style.left = this.position.left+"px";
+		}
+		if(!this.options.axis || this.options.axis !== "x") {
+			this.helper[0].style.top = this.position.top+"px";
+		}
+		if($.ui.ddmanager) {
+			$.ui.ddmanager.drag(this, event);
+		}
+
+		return false;
+	},
+
+	_mouseStop: function(event) {
+
+		//If we are using droppables, inform the manager about the drop
+		var element,
+			that = this,
+			elementInDom = false,
+			dropped = false;
+		if ($.ui.ddmanager && !this.options.dropBehaviour) {
+			dropped = $.ui.ddmanager.drop(this, event);
+		}
+
+		//if a drop comes from outside (a sortable)
+		if(this.dropped) {
+			dropped = this.dropped;
+			this.dropped = false;
+		}
+
+		//if the original element is no longer in the DOM don't bother to continue (see #8269)
+		element = this.element[0];
+		while ( element && (element = element.parentNode) ) {
+			if (element === document ) {
+				elementInDom = true;
+			}
+		}
+		if ( !elementInDom && this.options.helper === "original" ) {
+			return false;
+		}
+
+		if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+			$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+				if(that._trigger("stop", event) !== false) {
+					that._clear();
+				}
+			});
+		} else {
+			if(this._trigger("stop", event) !== false) {
+				this._clear();
+			}
+		}
+
+		return false;
+	},
+
+	_mouseUp: function(event) {
+		//Remove frame helpers
+		$("div.ui-draggable-iframeFix").each(function() {
+			this.parentNode.removeChild(this);
+		});
+
+		//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
+		if( $.ui.ddmanager ) {
+			$.ui.ddmanager.dragStop(this, event);
+		}
+
+		return $.ui.mouse.prototype._mouseUp.call(this, event);
+	},
+
+	cancel: function() {
+
+		if(this.helper.is(".ui-draggable-dragging")) {
+			this._mouseUp({});
+		} else {
+			this._clear();
+		}
+
+		return this;
+
+	},
+
+	_getHandle: function(event) {
+		return this.options.handle ?
+			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
+			true;
+	},
+
+	_createHelper: function(event) {
+
+		var o = this.options,
+			helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
+
+		if(!helper.parents("body").length) {
+			helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
+		}
+
+		if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
+			helper.css("position", "absolute");
+		}
+
+		return helper;
+
+	},
+
+	_adjustOffsetFromHelper: function(obj) {
+		if (typeof obj === "string") {
+			obj = obj.split(" ");
+		}
+		if ($.isArray(obj)) {
+			obj = {left: +obj[0], top: +obj[1] || 0};
+		}
+		if ("left" in obj) {
+			this.offset.click.left = obj.left + this.margins.left;
+		}
+		if ("right" in obj) {
+			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+		}
+		if ("top" in obj) {
+			this.offset.click.top = obj.top + this.margins.top;
+		}
+		if ("bottom" in obj) {
+			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+		}
+	},
+
+	_getParentOffset: function() {
+
+		//Get the offsetParent and cache its position
+		this.offsetParent = this.helper.offsetParent();
+		var po = this.offsetParent.offset();
+
+		// This is a special case where we need to modify a offset calculated on start, since the following happened:
+		// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+		//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+		if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+			po.left += this.scrollParent.scrollLeft();
+			po.top += this.scrollParent.scrollTop();
+		}
+
+		//This needs to be actually done for all browsers, since pageX/pageY includes this information
+		//Ugly IE fix
+		if((this.offsetParent[0] === document.body) ||
+			(this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
+			po = { top: 0, left: 0 };
+		}
+
+		return {
+			top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+			left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+		};
+
+	},
+
+	_getRelativeOffset: function() {
+
+		if(this.cssPosition === "relative") {
+			var p = this.element.position();
+			return {
+				top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+				left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+			};
+		} else {
+			return { top: 0, left: 0 };
+		}
+
+	},
+
+	_cacheMargins: function() {
+		this.margins = {
+			left: (parseInt(this.element.css("marginLeft"),10) || 0),
+			top: (parseInt(this.element.css("marginTop"),10) || 0),
+			right: (parseInt(this.element.css("marginRight"),10) || 0),
+			bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
+		};
+	},
+
+	_cacheHelperProportions: function() {
+		this.helperProportions = {
+			width: this.helper.outerWidth(),
+			height: this.helper.outerHeight()
+		};
+	},
+
+	_setContainment: function() {
+
+		var over, c, ce,
+			o = this.options;
+
+		if(o.containment === "parent") {
+			o.containment = this.helper[0].parentNode;
+		}
+		if(o.containment === "document" || o.containment === "window") {
+			this.containment = [
+				o.containment === "document" ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+				o.containment === "document" ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
+				(o.containment === "document" ? 0 : $(window).scrollLeft()) + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
+				(o.containment === "document" ? 0 : $(window).scrollTop()) + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+			];
+		}
+
+		if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor !== Array) {
+			c = $(o.containment);
+			ce = c[0];
+
+			if(!ce) {
+				return;
+			}
+
+			over = ($(ce).css("overflow") !== "hidden");
+
+			this.containment = [
+				(parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
+				(parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
+				(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderRightWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
+				(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderBottomWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top  - this.margins.bottom
+			];
+			this.relative_container = c;
+
+		} else if(o.containment.constructor === Array) {
+			this.containment = o.containment;
+		}
+
+	},
+
+	_convertPositionTo: function(d, pos) {
+
+		if(!pos) {
+			pos = this.position;
+		}
+
+		var mod = d === "absolute" ? 1 : -1,
+			scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+		return {
+			top: (
+				pos.top	+																// The absolute mouse position
+				this.offset.relative.top * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
+				this.offset.parent.top * mod -										// The offsetParent's offset without borders (offset + border)
+				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+			),
+			left: (
+				pos.left +																// The absolute mouse position
+				this.offset.relative.left * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
+				this.offset.parent.left * mod	-										// The offsetParent's offset without borders (offset + border)
+				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+			)
+		};
+
+	},
+
+	_generatePosition: function(event) {
+
+		var containment, co, top, left,
+			o = this.options,
+			scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
+			scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName),
+			pageX = event.pageX,
+			pageY = event.pageY;
+
+		/*
+		 * - Position constraining -
+		 * Constrain the position to a mix of grid, containment.
+		 */
+
+		if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+			if(this.containment) {
+			if (this.relative_container){
+				co = this.relative_container.offset();
+				containment = [ this.containment[0] + co.left,
+					this.containment[1] + co.top,
+					this.containment[2] + co.left,
+					this.containment[3] + co.top ];
+			}
+			else {
+				containment = this.containment;
+			}
+
+				if(event.pageX - this.offset.click.left < containment[0]) {
+					pageX = containment[0] + this.offset.click.left;
+				}
+				if(event.pageY - this.offset.click.top < containment[1]) {
+					pageY = containment[1] + this.offset.click.top;
+				}
+				if(event.pageX - this.offset.click.left > containment[2]) {
+					pageX = containment[2] + this.offset.click.left;
+				}
+				if(event.pageY - this.offset.click.top > containment[3]) {
+					pageY = containment[3] + this.offset.click.top;
+				}
+			}
+
+			if(o.grid) {
+				//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
+				top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
+				pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+				left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
+				pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+			}
+
+		}
+
+		return {
+			top: (
+				pageY -																	// The absolute mouse position
+				this.offset.click.top	-												// Click offset (relative to the element)
+				this.offset.relative.top -												// Only for relative positioned nodes: Relative offset from element to offset parent
+				this.offset.parent.top +												// The offsetParent's offset without borders (offset + border)
+				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+			),
+			left: (
+				pageX -																	// The absolute mouse position
+				this.offset.click.left -												// Click offset (relative to the element)
+				this.offset.relative.left -												// Only for relative positioned nodes: Relative offset from element to offset parent
+				this.offset.parent.left +												// The offsetParent's offset without borders (offset + border)
+				( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+			)
+		};
+
+	},
+
+	_clear: function() {
+		this.helper.removeClass("ui-draggable-dragging");
+		if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
+			this.helper.remove();
+		}
+		this.helper = null;
+		this.cancelHelperRemoval = false;
+	},
+
+	// From now on bulk stuff - mainly helpers
+
+	_trigger: function(type, event, ui) {
+		ui = ui || this._uiHash();
+		$.ui.plugin.call(this, type, [event, ui]);
+		//The absolute position has to be recalculated after plugins
+		if(type === "drag") {
+			this.positionAbs = this._convertPositionTo("absolute");
+		}
+		return $.Widget.prototype._trigger.call(this, type, event, ui);
+	},
+
+	plugins: {},
+
+	_uiHash: function() {
+		return {
+			helper: this.helper,
+			position: this.position,
+			originalPosition: this.originalPosition,
+			offset: this.positionAbs
+		};
+	}
+
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+	start: function(event, ui) {
+
+		var inst = $(this).data("ui-draggable"), o = inst.options,
+			uiSortable = $.extend({}, ui, { item: inst.element });
+		inst.sortables = [];
+		$(o.connectToSortable).each(function() {
+			var sortable = $.data(this, "ui-sortable");
+			if (sortable && !sortable.options.disabled) {
+				inst.sortables.push({
+					instance: sortable,
+					shouldRevert: sortable.options.revert
+				});
+				sortable.refreshPositions();	// Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
+				sortable._trigger("activate", event, uiSortable);
+			}
+		});
+
+	},
+	stop: function(event, ui) {
+
+		//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+		var inst = $(this).data("ui-draggable"),
+			uiSortable = $.extend({}, ui, { item: inst.element });
+
+		$.each(inst.sortables, function() {
+			if(this.instance.isOver) {
+
+				this.instance.isOver = 0;
+
+				inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+				this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+
+				//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid"
+				if(this.shouldRevert) {
+					this.instance.options.revert = this.shouldRevert;
+				}
+
+				//Trigger the stop of the sortable
+				this.instance._mouseStop(event);
+
+				this.instance.options.helper = this.instance.options._helper;
+
+				//If the helper has been the original item, restore properties in the sortable
+				if(inst.options.helper === "original") {
+					this.instance.currentItem.css({ top: "auto", left: "auto" });
+				}
+
+			} else {
+				this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+				this.instance._trigger("deactivate", event, uiSortable);
+			}
+
+		});
+
+	},
+	drag: function(event, ui) {
+
+		var inst = $(this).data("ui-draggable"), that = this;
+
+		$.each(inst.sortables, function() {
+
+			var innermostIntersecting = false,
+				thisSortable = this;
+
+			//Copy over some variables to allow calling the sortable's native _intersectsWith
+			this.instance.positionAbs = inst.positionAbs;
+			this.instance.helperProportions = inst.helperProportions;
+			this.instance.offset.click = inst.offset.click;
+
+			if(this.instance._intersectsWith(this.instance.containerCache)) {
+				innermostIntersecting = true;
+				$.each(inst.sortables, function () {
+					this.instance.positionAbs = inst.positionAbs;
+					this.instance.helperProportions = inst.helperProportions;
+					this.instance.offset.click = inst.offset.click;
+					if (this !== thisSortable &&
+						this.instance._intersectsWith(this.instance.containerCache) &&
+						$.contains(thisSortable.instance.element[0], this.instance.element[0])
+					) {
+						innermostIntersecting = false;
+					}
+					return innermostIntersecting;
+				});
+			}
+
+
+			if(innermostIntersecting) {
+				//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+				if(!this.instance.isOver) {
+
+					this.instance.isOver = 1;
+					//Now we fake the start of dragging for the sortable instance,
+					//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+					//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+					this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
+					this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+					this.instance.options.helper = function() { return ui.helper[0]; };
+
+					event.target = this.instance.currentItem[0];
+					this.instance._mouseCapture(event, true);
+					this.instance._mouseStart(event, true, true);
+
+					//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+					this.instance.offset.click.top = inst.offset.click.top;
+					this.instance.offset.click.left = inst.offset.click.left;
+					this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+					this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+
+					inst._trigger("toSortable", event);
+					inst.dropped = this.instance.element; //draggable revert needs that
+					//hack so receive/update callbacks work (mostly)
+					inst.currentItem = inst.element;
+					this.instance.fromOutside = inst;
+
+				}
+
+				//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+				if(this.instance.currentItem) {
+					this.instance._mouseDrag(event);
+				}
+
+			} else {
+
+				//If it doesn't intersect with the sortable, and it intersected before,
+				//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+				if(this.instance.isOver) {
+
+					this.instance.isOver = 0;
+					this.instance.cancelHelperRemoval = true;
+
+					//Prevent reverting on this forced stop
+					this.instance.options.revert = false;
+
+					// The out event needs to be triggered independently
+					this.instance._trigger("out", event, this.instance._uiHash(this.instance));
+
+					this.instance._mouseStop(event, true);
+					this.instance.options.helper = this.instance.options._helper;
+
+					//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+					this.instance.currentItem.remove();
+					if(this.instance.placeholder) {
+						this.instance.placeholder.remove();
+					}
+
+					inst._trigger("fromSortable", event);
+					inst.dropped = false; //draggable revert needs that
+				}
+
+			}
+
+		});
+
+	}
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+	start: function() {
+		var t = $("body"), o = $(this).data("ui-draggable").options;
+		if (t.css("cursor")) {
+			o._cursor = t.css("cursor");
+		}
+		t.css("cursor", o.cursor);
+	},
+	stop: function() {
+		var o = $(this).data("ui-draggable").options;
+		if (o._cursor) {
+			$("body").css("cursor", o._cursor);
+		}
+	}
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+	start: function(event, ui) {
+		var t = $(ui.helper), o = $(this).data("ui-draggable").options;
+		if(t.css("opacity")) {
+			o._opacity = t.css("opacity");
+		}
+		t.css("opacity", o.opacity);
+	},
+	stop: function(event, ui) {
+		var o = $(this).data("ui-draggable").options;
+		if(o._opacity) {
+			$(ui.helper).css("opacity", o._opacity);
+		}
+	}
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+	start: function() {
+		var i = $(this).data("ui-draggable");
+		if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
+			i.overflowOffset = i.scrollParent.offset();
+		}
+	},
+	drag: function( event ) {
+
+		var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
+
+		if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
+
+			if(!o.axis || o.axis !== "x") {
+				if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
+					i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+				} else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
+					i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+				}
+			}
+
+			if(!o.axis || o.axis !== "y") {
+				if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
+					i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+				} else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
+					i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+				}
+			}
+
+		} else {
+
+			if(!o.axis || o.axis !== "x") {
+				if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
+					scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+				} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
+					scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+				}
+			}
+
+			if(!o.axis || o.axis !== "y") {
+				if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
+					scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+				} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
+					scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+				}
+			}
+
+		}
+
+		if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
+			$.ui.ddmanager.prepareOffsets(i, event);
+		}
+
+	}
+});
+
+$.ui.plugin.add("draggable", "snap", {
+	start: function() {
+
+		var i = $(this).data("ui-draggable"),
+			o = i.options;
+
+		i.snapElements = [];
+
+		$(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
+			var $t = $(this),
+				$o = $t.offset();
+			if(this !== i.element[0]) {
+				i.snapElements.push({
+					item: this,
+					width: $t.outerWidth(), height: $t.outerHeight(),
+					top: $o.top, left: $o.left
+				});
+			}
+		});
+
+	},
+	drag: function(event, ui) {
+
+		var ts, bs, ls, rs, l, r, t, b, i, first,
+			inst = $(this).data("ui-draggable"),
+			o = inst.options,
+			d = o.snapTolerance,
+			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+
+		for (i = inst.snapElements.length - 1; i >= 0; i--){
+
+			l = inst.snapElements[i].left;
+			r = l + inst.snapElements[i].width;
+			t = inst.snapElements[i].top;
+			b = t + inst.snapElements[i].height;
+
+			//Yes, I know, this is insane ;)
+			if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+				if(inst.snapElements[i].snapping) {
+					(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+				}
+				inst.snapElements[i].snapping = false;
+				continue;
+			}
+
+			if(o.snapMode !== "inner") {
+				ts = Math.abs(t - y2) <= d;
+				bs = Math.abs(b - y1) <= d;
+				ls = Math.abs(l - x2) <= d;
+				rs = Math.abs(r - x1) <= d;
+				if(ts) {
+					ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+				}
+				if(bs) {
+					ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+				}
+				if(ls) {
+					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+				}
+				if(rs) {
+					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+				}
+			}
+
+			first = (ts || bs || ls || rs);
+
+			if(o.snapMode !== "outer") {
+				ts = Math.abs(t - y1) <= d;
+				bs = Math.abs(b - y2) <= d;
+				ls = Math.abs(l - x1) <= d;
+				rs = Math.abs(r - x2) <= d;
+				if(ts) {
+					ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+				}
+				if(bs) {
+					ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+				}
+				if(ls) {
+					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+				}
+				if(rs) {
+					ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+				}
+			}
+
+			if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
+				(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+			}
+			inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+
+		}
+
+	}
+});
+
+$.ui.plugin.add("draggable", "stack", {
+	start: function() {
+		var min,
+			o = this.data("ui-draggable").options,
+			group = $.makeArray($(o.stack)).sort(function(a,b) {
+				return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
+			});
+
+		if (!group.length) { return; }
+
+		min = parseInt($(group[0]).css("zIndex"), 10) || 0;
+		$(group).each(function(i) {
+			$(this).css("zIndex", min + i);
+		});
+		this.css("zIndex", (min + group.length));
+	}
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+	start: function(event, ui) {
+		var t = $(ui.helper), o = $(this).data("ui-draggable").options;
+		if(t.css("zIndex")) {
+			o._zIndex = t.css("zIndex");
+		}
+		t.css("zIndex", o.zIndex);
+	},
+	stop: function(event, ui) {
+		var o = $(this).data("ui-draggable").options;
+		if(o._zIndex) {
+			$(ui.helper).css("zIndex", o._zIndex);
+		}
+	}
+});
+
+})(jQuery);
+
+(function( $, undefined ) {
+
+function isOverAxis( x, reference, size ) {
+	return ( x > reference ) && ( x < ( reference + size ) );
+}
+
+$.widget("ui.droppable", {
+	version: "1.10.2",
+	widgetEventPrefix: "drop",
+	options: {
+		accept: "*",
+		activeClass: false,
+		addClasses: true,
+		greedy: false,
+		hoverClass: false,
+		scope: "default",
+		tolerance: "intersect",
+
+		// callbacks
+		activate: null,
+		deactivate: null,
+		drop: null,
+		out: null,
+		over: null
+	},
+	_create: function() {
+
+		var o = this.options,
+			accept = o.accept;
+
+		this.isover = false;
+		this.isout = true;
+
+		this.accept = $.isFunction(accept) ? accept : function(d) {
+			return d.is(accept);
+		};
+
+		//Store the droppable's proportions
+		this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+
+		// Add the reference and positions to the manager
+		$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
+		$.ui.ddmanager.droppables[o.scope].push(this);
+
+		(o.addClasses && this.element.addClass("ui-droppable"));
+
+	},
+
+	_destroy: function() {
+		var i = 0,
+			drop = $.ui.ddmanager.droppables[this.options.scope];
+
+		for ( ; i < drop.length; i++ ) {
+			if ( drop[i] === this ) {
+				drop.splice(i, 1);
+			}
+		}
+
+		this.element.removeClass("ui-droppable ui-droppable-disabled");
+	},
+
+	_setOption: function(key, value) {
+
+		if(key === "accept") {
+			this.accept = $.isFunction(value) ? value : function(d) {
+				return d.is(value);
+			};
+		}
+		$.Widget.prototype._setOption.apply(this, arguments);
+	},
+
+	_activate: function(event) {
+		var draggable = $.ui.ddmanager.current;
+		if(this.options.activeClass) {
+			this.element.addClass(this.options.activeClass);
+		}
+		if(draggable){
+			this._trigger("activate", event, this.ui(draggable));
+		}
+	},
+
+	_deactivate: function(event) {
+		var draggable = $.ui.ddmanager.current;
+		if(this.options.activeClass) {
+			this.element.removeClass(this.options.activeClass);
+		}
+		if(draggable){
+			this._trigger("deactivate", event, this.ui(draggable));
+		}
+	},
+
+	_over: function(event) {
+
+		var draggable = $.ui.ddmanager.current;
+
+		// Bail if draggable and droppable are same element
+		if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+			return;
+		}
+
+		if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+			if(this.options.hoverClass) {
+				this.element.addClass(this.options.hoverClass);
+			}
+			this._trigger("over", event, this.ui(draggable));
+		}
+
+	},
+
+	_out: function(event) {
+
+		var draggable = $.ui.ddmanager.current;
+
+		// Bail if draggable and droppable are same element
+		if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+			return;
+		}
+
+		if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+			if(this.options.hoverClass) {
+				this.element.removeClass(this.options.hoverClass);
+			}
+			this._trigger("out", event, this.ui(draggable));
+		}
+
+	},
+
+	_drop: function(event,custom) {
+
+		var draggable = custom || $.ui.ddmanager.current,
+			childrenIntersection = false;
+
+		// Bail if draggable and droppable are same element
+		if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+			return false;
+		}
+
+		this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
+			var inst = $.data(this, "ui-droppable");
+			if(
+				inst.options.greedy &&
+				!inst.options.disabled &&
+				inst.options.scope === draggable.options.scope &&
+				inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
+				$.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
+			) { childrenIntersection = true; return false; }
+		});
+		if(childrenIntersection) {
+			return false;
+		}
+
+		if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+			if(this.options.activeClass) {
+				this.element.removeClass(this.options.activeClass);
+			}
+			if(this.options.hoverClass) {
+				this.element.removeClass(this.options.hoverClass);
+			}
+			this._trigger("drop", event, this.ui(draggable));
+			return this.element;
+		}
+
+		return false;
+
+	},
+
+	ui: function(c) {
+		return {
+			draggable: (c.currentItem || c.element),
+			helper: c.helper,
+			position: c.position,
+			offset: c.positionAbs
+		};
+	}
+
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+
+	if (!droppable.offset) {
+		return false;
+	}
+
+	var draggableLeft, draggableTop,
+		x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
+		y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
+		l = droppable.offset.left, r = l + droppable.proportions.width,
+		t = droppable.offset.top, b = t + droppable.proportions.height;
+
+	switch (toleranceMode) {
+		case "fit":
+			return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
+		case "intersect":
+			return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
+				x2 - (draggable.helperProportions.width / 2) < r && // Left Half
+				t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
+				y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
+		case "pointer":
+			draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
+			draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
+			return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
+		case "touch":
+			return (
+				(y1 >= t && y1 <= b) ||	// Top edge touching
+				(y2 >= t && y2 <= b) ||	// Bottom edge touching
+				(y1 < t && y2 > b)		// Surrounded vertically
+			) && (
+				(x1 >= l && x1 <= r) ||	// Left edge touching
+				(x2 >= l && x2 <= r) ||	// Right edge touching
+				(x1 < l && x2 > r)		// Surrounded horizontally
+			);
+		default:
+			return false;
+		}
+
+};
+
+/*
+	This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+	current: null,
+	droppables: { "default": [] },
+	prepareOffsets: function(t, event) {
+
+		var i, j,
+			m = $.ui.ddmanager.droppables[t.options.scope] || [],
+			type = event ? event.type : null, // workaround for #2317
+			list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
+
+		droppablesLoop: for (i = 0; i < m.length; i++) {
+
+			//No disabled and non-accepted
+			if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
+				continue;
+			}
+
+			// Filter out elements in the current dragged item
+			for (j=0; j < list.length; j++) {
+				if(list[j] === m[i].element[0]) {
+					m[i].proportions.height = 0;
+					continue droppablesLoop;
+				}
+			}
+
+			m[i].visible = m[i].element.css("display") !== "none";
+			if(!m[i].visible) {
+				continue;
+			}
+
+			//Activate the droppable if used directly from draggables
+			if(type === "mousedown") {
+				m[i]._activate.call(m[i], event);
+			}
+
+			m[i].offset = m[i].element.offset();
+			m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+
+		}
+
+	},
+	drop: function(draggable, event) {
+
+		var dropped = false;
+		// Create a copy of the droppables in case the list changes during the drop (#9116)
+		$.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
+
+			if(!this.options) {
+				return;
+			}
+			if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
+				dropped = this._drop.call(this, event) || dropped;
+			}
+
+			if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+				this.isout = true;
+				this.isover = false;
+				this._deactivate.call(this, event);
+			}
+
+		});
+		return dropped;
+
+	},
+	dragStart: function( draggable, event ) {
+		//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
+		draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
+			if( !draggable.options.refreshPositions ) {
+				$.ui.ddmanager.prepareOffsets( draggable, event );
+			}
+		});
+	},
+	drag: function(draggable, event) {
+
+		//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+		if(draggable.options.refreshPositions) {
+			$.ui.ddmanager.prepareOffsets(draggable, event);
+		}
+
+		//Run through all droppables and check their positions based on specific tolerance options
+		$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+
+			if(this.options.disabled || this.greedyChild || !this.visible) {
+				return;
+			}
+
+			var parentInstance, scope, parent,
+				intersects = $.ui.intersect(draggable, this, this.options.tolerance),
+				c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
+			if(!c) {
+				return;
+			}
+
+			if (this.options.greedy) {
+				// find droppable parents with same scope
+				scope = this.options.scope;
+				parent = this.element.parents(":data(ui-droppable)").filter(function () {
+					return $.data(this, "ui-droppable").options.scope === scope;
+				});
+
+				if (parent.length) {
+					parentInstance = $.data(parent[0], "ui-droppable");
+					parentInstance.greedyChild = (c === "isover");
+				}
+			}
+
+			// we just moved into a greedy child
+			if (parentInstance && c === "isover") {
+				parentInstance.isover = false;
+				parentInstance.isout = true;
+				parentInstance._out.call(parentInstance, event);
+			}
+
+			this[c] = true;
+			this[c === "isout" ? "isover" : "isout"] = false;
+			this[c === "isover" ? "_over" : "_out"].call(this, event);
+
+			// we just moved out of a greedy child
+			if (parentInstance && c === "isout") {
+				parentInstance.isout = false;
+				parentInstance.isover = true;
+				parentInstance._over.call(parentInstance, event);
+			}
+		});
+
+	},
+	dragStop: function( draggable, event ) {
+		draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
+		//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
+		if( !draggable.options.refreshPositions ) {
+			$.ui.ddmanager.prepareOffsets( draggable, event );
+		}
+	}
+};
+
+})(jQuery);
+
+(function( $, undefined ) {
+
+function num(v) {
+	return parseInt(v, 10) || 0;
+}
+
+function isNumber(value) {
+	return !isNaN(parseInt(value, 10));
+}
+
+$.widget("ui.resizable", $.ui.mouse, {
+	version: "1.10.2",
+	widgetEventPrefix: "resize",
+	options: {
+		alsoResize: false,
+		animate: false,
+		animateDuration: "slow",
+		animateEasing: "swing",
+		aspectRatio: false,
+		autoHide: false,
+		containment: false,
+		ghost: false,
+		grid: false,
+		handles: "e,s,se",
+		helper: false,
+		maxHeight: null,
+		maxWidth: null,
+		minHeight: 10,
+		minWidth: 10,
+		// See #7960
+		zIndex: 90,
+
+		// callbacks
+		resize: null,
+		start: null,
+		stop: null
+	},
+	_create: function() {
+
+		var n, i, handle, axis, hname,
+			that = this,
+			o = this.options;
+		this.element.addClass("ui-resizable");
+
+		$.extend(this, {
+			_aspectRatio: !!(o.aspectRatio),
+			aspectRatio: o.aspectRatio,
+			originalElement: this.element,
+			_proportionallyResizeElements: [],
+			_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
+		});
+
+		//Wrap the element if it cannot hold child nodes
+		if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+			//Create a wrapper element and set the wrapper to the new current internal element
+			this.element.wrap(
+				$("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
+					position: this.element.css("position"),
+					width: this.element.outerWidth(),
+					height: this.element.outerHeight(),
+					top: this.element.css("top"),
+					left: this.element.css("left")
+				})
+			);
+
+			//Overwrite the original this.element
+			this.element = this.element.parent().data(
+				"ui-resizable", this.element.data("ui-resizable")
+			);
+
+			this.elementIsWrapper = true;
+
+			//Move margins to the wrapper
+			this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+			this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+
+			//Prevent Safari textarea resize
+			this.originalResizeStyle = this.originalElement.css("resize");
+			this.originalElement.css("resize", "none");
+
+			//Push the actual element to our proportionallyResize internal array
+			this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" }));
+
+			// avoid IE jump (hard set the margin)
+			this.originalElement.css({ margin: this.originalElement.css("margin") });
+
+			// fix handlers offset
+			this._proportionallyResize();
+
+		}
+
+		this.handles = o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se" : { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" });
+		if(this.handles.constructor === String) {
+
+			if ( this.handles === "all") {
+				this.handles = "n,e,s,w,se,sw,ne,nw";
+			}
+
+			n = this.handles.split(",");
+			this.handles = {};
+
+			for(i = 0; i < n.length; i++) {
+
+				handle = $.trim(n[i]);
+				hname = "ui-resizable-"+handle;
+				axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
+
+				// Apply zIndex to all handles - see #7960
+				axis.css({ zIndex: o.zIndex });
+
+				//TODO : What's going on here?
+				if ("se" === handle) {
+					axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
+				}
+
+				//Insert into internal handles object and append to element
+				this.handles[handle] = ".ui-resizable-"+handle;
+				this.element.append(axis);
+			}
+
+		}
+
+		this._renderAxis = function(target) {
+
+			var i, axis, padPos, padWrapper;
+
+			target = target || this.element;
+
+			for(i in this.handles) {
+
+				if(this.handles[i].constructor === String) {
+					this.handles[i] = $(this.handles[i], this.element).show();
+				}
+
+				//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+				if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+
+					axis = $(this.handles[i], this.element);
+
+					//Checking the correct pad and border
+					padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+
+					//The padding type i have to apply...
+					padPos = [ "padding",
+						/ne|nw|n/.test(i) ? "Top" :
+						/se|sw|s/.test(i) ? "Bottom" :
+						/^e$/.test(i) ? "Right" : "Left" ].join("");
+
+					target.css(padPos, padWrapper);
+
+					this._proportionallyResize();
+
+				}
+
+				//TODO: What's that good for? There's not anything to be executed left
+				if(!$(this.handles[i]).length) {
+					continue;
+				}
+			}
+		};
+
+		//TODO: make renderAxis a prototype function
+		this._renderAxis(this.element);
+
+		this._handles = $(".ui-resizable-handle", this.element)
+			.disableSelection();
+
+		//Matching axis name
+		this._handles.mouseover(function() {
+			if (!that.resizing) {
+				if (this.className) {
+					axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+				}
+				//Axis, default = se
+				that.axis = axis && axis[1] ? axis[1] : "se";
+			}
+		});
+
+		//If we want to auto hide the elements
+		if (o.autoHide) {
+			this._handles.hide();
+			$(this.element)
+				.addClass("ui-resizable-autohide")
+				.mouseenter(function() {
+					if (o.disabled) {
+						return;
+					}
+					$(this).removeClass("ui-resizable-autohide");
+					that._handles.show();
+				})
+				.mouseleave(function(){
+					if (o.disabled) {
+						return;
+					}
+					if (!that.resizing) {
+						$(this).addClass("ui-resizable-autohide");
+						that._handles.hide();
+					}
+				});
+		}
+
+		//Initialize the mouse interaction
+		this._mouseInit();
+
+	},
+
+	_destroy: function() {
+
+		this._mouseDestroy();
+
+		var wrapper,
+			_destroy = function(exp) {
+				$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+					.removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
+			};
+
+		//TODO: Unwrap at same DOM position
+		if (this.elementIsWrapper) {
+			_destroy(this.element);
+			wrapper = this.element;
+			this.originalElement.css({
+				position: wrapper.css("position"),
+				width: wrapper.outerWidth(),
+				height: wrapper.outerHeight(),
+				top: wrapper.css("top"),
+				left: wrapper.css("left")
+			}).insertAfter( wrapper );
+			wrapper.remove();
+		}
+
+		this.originalElement.css("resize", this.originalResizeStyle);
+		_destroy(this.originalElement);
+
+		return this;
+	},
+
+	_mouseCapture: function(event) {
+		var i, handle,
+			capture = false;
+
+		for (i in this.handles) {
+			handle = $(this.handles[i])[0];
+			if (handle === event.target || $.contains(handle, event.target)) {
+				capture = true;
+			}
+		}
+
+		return !this.options.disabled && capture;
+	},
+
+	_mouseStart: function(event) {
+
+		var curleft, curtop, cursor,
+			o = this.options,
+			iniPos = this.element.position(),
+			el = this.element;
+
+		this.resizing = true;
+
+		// bugfix for http://dev.jquery.com/ticket/1749
+		if ( (/absolute/).test( el.css("position") ) ) {
+			el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });
+		} else if (el.is(".ui-draggable")) {
+			el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });
+		}
+
+		this._renderProxy();
+
+		curleft = num(this.helper.css("left"));
+		curtop = num(this.helper.css("top"));
+
+		if (o.containment) {
+			curleft += $(o.containment).scrollLeft() || 0;
+			curtop += $(o.containment).scrollTop() || 0;
+		}
+
+		//Store needed variables
+		this.offset = this.helper.offset();
+		this.position = { left: curleft, top: curtop };
+		this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+		this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+		this.originalPosition = { left: curleft, top: curtop };
+		this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+		this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
+		//Aspect Ratio
+		this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+
+		cursor = $(".ui-resizable-" + this.axis).css("cursor");
+		$("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
+
+		el.addClass("ui-resizable-resizing");
+		this._propagate("start", event);
+		return true;
+	},
+
+	_mouseDrag: function(event) {
+
+		//Increase performance, avoid regex
+		var data,
+			el = this.helper, props = {},
+			smp = this.originalMousePosition,
+			a = this.axis,
+			prevTop = this.position.top,
+			prevLeft = this.position.left,
+			prevWidth = this.size.width,
+			prevHeight = this.size.height,
+			dx = (event.pageX-smp.left)||0,
+			dy = (event.pageY-smp.top)||0,
+			trigger = this._change[a];
+
+		if (!trigger) {
+			return false;
+		}
+
+		// Calculate the attrs that will be change
+		data = trigger.apply(this, [event, dx, dy]);
+
+		// Put this in the mouseDrag handler since the user can start pressing shift while resizing
+		this._updateVirtualBoundaries(event.shiftKey);
+		if (this._aspectRatio || event.shiftKey) {
+			data = this._updateRatio(data, event);
+		}
+
+		data = this._respectSize(data, event);
+
+		this._updateCache(data);
+
+		// plugins callbacks need to be called first
+		this._propagate("resize", event);
+
+		if (this.position.top !== prevTop) {
+			props.top = this.position.top + "px";
+		}
+		if (this.position.left !== prevLeft) {
+			props.left = this.position.left + "px";
+		}
+		if (this.size.width !== prevWidth) {
+			props.width = this.size.width + "px";
+		}
+		if (this.size.height !== prevHeight) {
+			props.height = this.size.height + "px";
+		}
+		el.css(props);
+
+		if (!this._helper && this._proportionallyResizeElements.length) {
+			this._proportionallyResize();
+		}
+
+		// Call the user callback if the element was resized
+		if ( ! $.isEmptyObject(props) ) {
+			this._trigger("resize", event, this.ui());
+		}
+
+		return false;
+	},
+
+	_mouseStop: function(event) {
+
+		this.resizing = false;
+		var pr, ista, soffseth, soffsetw, s, left, top,
+			o = this.options, that = this;
+
+		if(this._helper) {
+
+			pr = this._proportionallyResizeElements;
+			ista = pr.length && (/textarea/i).test(pr[0].nodeName);
+			soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height;
+			soffsetw = ista ? 0 : that.sizeDiff.width;
+
+			s = { width: (that.helper.width()  - soffsetw), height: (that.helper.height() - soffseth) };
+			left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null;
+			top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
+
+			if (!o.animate) {
+				this.element.css($.extend(s, { top: top, left: left }));
+			}
+
+			that.helper.height(that.size.height);
+			that.helper.width(that.size.width);
+
+			if (this._helper && !o.animate) {
+				this._proportionallyResize();
+			}
+		}
+
+		$("body").css("cursor", "auto");
+
+		this.element.removeClass("ui-resizable-resizing");
+
+		this._propagate("stop", event);
+
+		if (this._helper) {
+			this.helper.remove();
+		}
+
+		return false;
+
+	},
+
+	_updateVirtualBoundaries: function(forceAspectRatio) {
+		var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
+			o = this.options;
+
+		b = {
+			minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
+			maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
+			minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
+			maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
+		};
+
+		if(this._aspectRatio || forceAspectRatio) {
+			// We want to create an enclosing box whose aspect ration is the requested one
+			// First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
+			pMinWidth = b.minHeight * this.aspectRatio;
+			pMinHeight = b.minWidth / this.aspectRatio;
+			pMaxWidth = b.maxHeight * this.aspectRatio;
+			pMaxHeight = b.maxWidth / this.aspectRatio;
+
+			if(pMinWidth > b.minWidth) {
+				b.minWidth = pMinWidth;
+			}
+			if(pMinHeight > b.minHeight) {
+				b.minHeight = pMinHeight;
+			}
+			if(pMaxWidth < b.maxWidth) {
+				b.maxWidth = pMaxWidth;
+			}
+			if(pMaxHeight < b.maxHeight) {
+				b.maxHeight = pMaxHeight;
+			}
+		}
+		this._vBoundaries = b;
+	},
+
+	_updateCache: function(data) {
+		this.offset = this.helper.offset();
+		if (isNumber(data.left)) {
+			this.position.left = data.left;
+		}
+		if (isNumber(data.top)) {
+			this.position.top = data.top;
+		}
+		if (isNumber(data.height)) {
+			this.size.height = data.height;
+		}
+		if (isNumber(data.width)) {
+			this.size.width = data.width;
+		}
+	},
+
+	_updateRatio: function( data ) {
+
+		var cpos = this.position,
+			csize = this.size,
+			a = this.axis;
+
+		if (isNumber(data.height)) {
+			data.width = (data.height * this.aspectRatio);
+		} else if (isNumber(data.width)) {
+			data.height = (data.width / this.aspectRatio);
+		}
+
+		if (a === "sw") {
+			data.left = cpos.left + (csize.width - data.width);
+			data.top = null;
+		}
+		if (a === "nw") {
+			data.top = cpos.top + (csize.height - data.height);
+			data.left = cpos.left + (csize.width - data.width);
+		}
+
+		return data;
+	},
+
+	_respectSize: function( data ) {
+
+		var o = this._vBoundaries,
+			a = this.axis,
+			ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+			isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
+			dw = this.originalPosition.left + this.originalSize.width,
+			dh = this.position.top + this.size.height,
+			cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+		if (isminw) {
+			data.width = o.minWidth;
+		}
+		if (isminh) {
+			data.height = o.minHeight;
+		}
+		if (ismaxw) {
+			data.width = o.maxWidth;
+		}
+		if (ismaxh) {
+			data.height = o.maxHeight;
+		}
+
+		if (isminw && cw) {
+			data.left = dw - o.minWidth;
+		}
+		if (ismaxw && cw) {
+			data.left = dw - o.maxWidth;
+		}
+		if (isminh && ch) {
+			data.top = dh - o.minHeight;
+		}
+		if (ismaxh && ch) {
+			data.top = dh - o.maxHeight;
+		}
+
+		// fixing jump error on top/left - bug #2330
+		if (!data.width && !data.height && !data.left && data.top) {
+			data.top = null;
+		} else if (!data.width && !data.height && !data.top && data.left) {
+			data.left = null;
+		}
+
+		return data;
+	},
+
+	_proportionallyResize: function() {
+
+		if (!this._proportionallyResizeElements.length) {
+			return;
+		}
+
+		var i, j, borders, paddings, prel,
+			element = this.helper || this.element;
+
+		for ( i=0; i < this._proportionallyResizeElements.length; i++) {
+
+			prel = this._proportionallyResizeElements[i];
+
+			if (!this.borderDif) {
+				this.borderDif = [];
+				borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")];
+				paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")];
+
+				for ( j = 0; j < borders.length; j++ ) {
+					this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );
+				}
+			}
+
+			prel.css({
+				height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+				width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
+			});
+
+		}
+
+	},
+
+	_renderProxy: function() {
+
+		var el = this.element, o = this.options;
+		this.elementOffset = el.offset();
+
+		if(this._helper) {
+
+			this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
+
+			this.helper.addClass(this._helper).css({
+				width: this.element.outerWidth() - 1,
+				height: this.element.outerHeight() - 1,
+				position: "absolute",
+				left: this.elementOffset.left +"px",
+				top: this.elementOffset.top +"px",
+				zIndex: ++o.zIndex //TODO: Don't modify option
+			});
+
+			this.helper
+				.appendTo("body")
+				.disableSelection();
+
+		} else {
+			this.helper = this.element;
+		}
+
+	},
+
+	_change: {
+		e: function(event, dx) {
+			return { width: this.originalSize.width + dx };
+		},
+		w: function(event, dx) {
+			var cs = this.originalSize, sp = this.originalPosition;
+			return { left: sp.left + dx, width: cs.width - dx };
+		},
+		n: function(event, dx, dy) {
+			var cs = this.originalSize, sp = this.originalPosition;
+			return { top: sp.top + dy, height: cs.height - dy };
+		},
+		s: function(event, dx, dy) {
+			return { height: this.originalSize.height + dy };
+		},
+		se: function(event, dx, dy) {
+			return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+		},
+		sw: function(event, dx, dy) {
+			return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+		},
+		ne: function(event, dx, dy) {
+			return $.extend(this._change.n.apply(this, arguments), 

<TRUNCATED>


[35/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberKeyStatisticsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberKeyStatisticsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberKeyStatisticsService.java
new file mode 100644
index 0000000..29a533c
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberKeyStatisticsService.java
@@ -0,0 +1,88 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberKeyStatisticsService
+ * 
+ * This class contains implementations of getting Member's CPU, Memory and Read
+ * Write details
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberKeyStatistics")
+@Scope("singleton")
+public class MemberKeyStatisticsService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberKeyStatistics")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        // response
+        responseJSON
+            .put(
+                "cpuUsageTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_CPU_USAGE_SAMPLE)));
+        responseJSON
+            .put(
+                "memoryUsageTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_HEAP_USAGE_SAMPLE)));
+        responseJSON
+            .put(
+                "readPerSecTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_GETS_PER_SECOND)));
+        responseJSON
+            .put(
+                "writePerSecTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_PUTS_PER_SECOND)));
+      }
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberRegionsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberRegionsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberRegionsService.java
new file mode 100644
index 0000000..2549eb9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberRegionsService.java
@@ -0,0 +1,130 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberRegionsService
+ * 
+ * This class contains implementations of getting Memeber's Regions details.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+
+@Component
+@Service("MemberRegions")
+@Scope("singleton")
+public class MemberRegionsService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String NAME = "name";
+  private final String ENTRY_SIZE = "entrySize";
+  private final String DISC_STORE_NAME = "diskStoreName";
+  private final String DISC_SYNCHRONOUS = "diskSynchronous";
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberRegions")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+
+      if (clusterMember != null) {
+        responseJSON.put("memberId", clusterMember.getId());
+        responseJSON.put(this.NAME, clusterMember.getName());
+        responseJSON.put("host", clusterMember.getHost());
+
+        // member's regions
+        Cluster.Region[] memberRegions = clusterMember.getMemberRegionsList();
+        JSONArray regionsListJson = new JSONArray();
+        for (Cluster.Region memberRegion : memberRegions) {
+          JSONObject regionJSON = new JSONObject();
+          regionJSON.put(this.NAME, memberRegion.getName());
+
+          if (PulseConstants.PRODUCT_NAME_SQLFIRE
+              .equalsIgnoreCase(PulseController.getPulseProductSupport())) {
+            // Convert region path to dot separated region path
+            regionJSON.put("fullPath", StringUtils
+                .getTableNameFromRegionName(memberRegion.getFullPath()));
+          } else {
+            regionJSON.put("fullPath", memberRegion.getFullPath());
+          }
+
+          regionJSON.put("type", memberRegion.getRegionType());
+          regionJSON
+              .put("entryCount", memberRegion.getSystemRegionEntryCount());
+          Long entrySize = memberRegion.getEntrySize();
+
+          DecimalFormat form = new DecimalFormat(
+              PulseConstants.DECIMAL_FORMAT_PATTERN_2);
+          String entrySizeInMB = form.format(entrySize / (1024f * 1024f));
+
+          if (entrySize < 0) {
+            regionJSON.put(this.ENTRY_SIZE, this.VALUE_NA);
+          } else {
+            regionJSON.put(this.ENTRY_SIZE, entrySizeInMB);
+          }
+          regionJSON.put("scope", memberRegion.getScope());
+          String diskStoreName = memberRegion.getDiskStoreName();
+          if (StringUtils.isNotNullNotEmptyNotWhiteSpace(diskStoreName)) {
+            regionJSON.put(this.DISC_STORE_NAME, diskStoreName);
+            regionJSON.put(this.DISC_SYNCHRONOUS,
+                memberRegion.isDiskSynchronous());
+          } else {
+            regionJSON.put(this.DISC_SYNCHRONOUS, this.VALUE_NA);
+            regionJSON.put(this.DISC_STORE_NAME, "");
+          }
+          regionJSON.put("gatewayEnabled", memberRegion.getWanEnabled());
+
+          regionsListJson.put(regionJSON);
+        }
+        responseJSON.put("memberRegions", regionsListJson);
+
+        // response
+        responseJSON.put("status", "Normal");
+
+      }
+
+      // Send json response
+      return responseJSON;
+
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java
new file mode 100644
index 0000000..67ff368
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MembersListService.java
@@ -0,0 +1,68 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class MembersListService
+ * 
+ * This class contains implementations of getting list of Cluster Members.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MembersList")
+@Scope("singleton")
+public class MembersListService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    JSONArray memberListJson = new JSONArray();
+    Cluster.Member[] memberSet = cluster.getMembers();
+
+    try {
+      for (Cluster.Member member : memberSet) {
+        JSONObject memberJSON = new JSONObject();
+        memberJSON.put("memberId", member.getId());
+        memberJSON.put("name", member.getName());
+        memberJSON.put("host", member.getHost());
+
+        memberListJson.put(memberJSON);
+      }
+
+      // Response JSON
+      responseJSON.put("clusterMembers", memberListJson);
+      responseJSON.put("clusterName", cluster.getServerName());
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseService.java
new file mode 100644
index 0000000..e0cd5b3
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseService.java
@@ -0,0 +1,32 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Abstract class PulseService
+ * 
+ * This is a base class for all services in pulse.
+ * 
+ * @author azambare
+ * @since version 7.5
+ */
+public interface PulseService {
+
+  public final String VALUE_NA = "NA";
+  public final String VALUE_ON = "ON";
+  public final String VALUE_OFF = "OFF";
+
+  public JSONObject execute(HttpServletRequest httpServletRequest)
+      throws Exception;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseServiceFactory.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseServiceFactory.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseServiceFactory.java
new file mode 100644
index 0000000..08d12fe
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseServiceFactory.java
@@ -0,0 +1,46 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+
+/**
+ * Class PulseServiceFactory
+ * 
+ * @author azambare
+ * @since version 7.5
+ */
+@Component
+@Scope("singleton")
+public class PulseServiceFactory implements ApplicationContextAware {
+
+  static final long serialVersionUID = 02L;
+  ApplicationContext applicationContext = null;
+
+  public PulseService getPulseServiceInstance(final String servicename) {
+
+    if (applicationContext != null
+        && applicationContext.containsBean(servicename)) {
+      return (PulseService) applicationContext.getBean(servicename);
+    }
+    return null;
+  }
+
+  @Override
+  public void setApplicationContext(final ApplicationContext applicationContext)
+      throws BeansException {
+
+    this.applicationContext = applicationContext;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseVersionService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseVersionService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseVersionService.java
new file mode 100644
index 0000000..5b5ae57
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/PulseVersionService.java
@@ -0,0 +1,64 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class PulseVersionService
+ * 
+ * This class contains implementations of getting Pulse Applications Version's
+ * details (like version details, build details, source details, etc) from
+ * properties file
+ * 
+ * @author Sachin K
+ * @since version 7.0.Beta
+ */
+
+@Component
+@Service("PulseVersion")
+@Scope("singleton")
+public class PulseVersionService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // Response
+      responseJSON.put("pulseVersion",
+          PulseController.pulseVersion.getPulseVersion());
+      responseJSON.put("buildId",
+          PulseController.pulseVersion.getPulseBuildId());
+      responseJSON.put("buildDate",
+          PulseController.pulseVersion.getPulseBuildDate());
+      responseJSON.put("sourceDate",
+          PulseController.pulseVersion.getPulseSourceDate());
+      responseJSON.put("sourceRevision",
+          PulseController.pulseVersion.getPulseSourceRevision());
+      responseJSON.put("sourceRepository",
+          PulseController.pulseVersion.getPulseSourceRepository());
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+    // Send json response
+    return responseJSON;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/QueryStatisticsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/QueryStatisticsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/QueryStatisticsService.java
new file mode 100644
index 0000000..30ec856
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/QueryStatisticsService.java
@@ -0,0 +1,142 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class QueryStatisticsService
+ * 
+ * This class returns top N queries based on pagination and filtering criteria
+ * if any
+ * 
+ * @author Riya Bhandekar
+ * @since version 7.5
+ */
+@Component
+@Service("QueryStatistics")
+@Scope("singleton")
+public class QueryStatisticsService implements PulseService {
+
+  @Override
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      Cluster.Statement[] stmts = cluster.getStatements();
+
+      JSONObject queryJSON;
+      JSONArray queryListJson = new JSONArray();
+      for (int i = 0; i < stmts.length; ++i) {
+        queryJSON = new JSONObject();
+        queryJSON.put(PulseConstants.MBEAN_ATTRIBUTE_QUERYDEFINITION,
+            stmts[i].getQueryDefinition());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESCOMPILED,
+            (stmts[i].getNumTimesCompiled() < 0) ? this.VALUE_NA : stmts[i]
+                .getNumTimesCompiled());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTION,
+            (stmts[i].getNumExecution() < 0) ? this.VALUE_NA : stmts[i]
+                .getNumExecution());
+        queryJSON.put(PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTIONSINPROGRESS,
+            (stmts[i].getNumExecutionsInProgress() < 0) ? this.VALUE_NA
+                : stmts[i].getNumExecutionsInProgress());
+        queryJSON.put(PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESGLOBALINDEXLOOKUP,
+            (stmts[i].getNumTimesGlobalIndexLookup() < 0) ? this.VALUE_NA
+                : stmts[i].getNumTimesGlobalIndexLookup());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_NUMROWSMODIFIED,
+            (stmts[i].getNumRowsModified() < 0) ? this.VALUE_NA : stmts[i]
+                .getNumRowsModified());
+        queryJSON.put(PulseConstants.MBEAN_ATTRIBUTE_PARSETIME, (stmts[i]
+            .getParseTime() < 0) ? this.VALUE_NA : stmts[i].getParseTime());
+        queryJSON.put(PulseConstants.MBEAN_ATTRIBUTE_BINDTIME, (stmts[i]
+            .getBindTime() < 0) ? this.VALUE_NA : stmts[i].getBindTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_OPTIMIZETIME,
+            (stmts[i].getOptimizeTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getOptimizeTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_ROUTINGINFOTIME,
+            (stmts[i].getRoutingInfoTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getRoutingInfoTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_GENERATETIME,
+            (stmts[i].getGenerateTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getGenerateTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_TOTALCOMPILATIONTIME,
+            (stmts[i].getTotalCompilationTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getTotalCompilationTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_EXECUTIONTIME,
+            (stmts[i].getExecutionTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getExecutionTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_PROJECTIONTIME,
+            (stmts[i].getProjectionTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getProjectionTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_TOTALEXECUTIONTIME,
+            (stmts[i].getTotalExecutionTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getTotalExecutionTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_ROWSMODIFICATIONTIME,
+            (stmts[i].getRowsModificationTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getRowsModificationTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_QNNUMROWSSEEN,
+            (stmts[i].getqNNumRowsSeen() < 0) ? this.VALUE_NA : stmts[i]
+                .getqNNumRowsSeen());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_QNMSGSENDTIME,
+            (stmts[i].getqNMsgSendTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getqNMsgSendTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_QNMSGSERTIME,
+            (stmts[i].getqNMsgSerTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getqNMsgSerTime());
+        queryJSON.put(
+            PulseConstants.MBEAN_ATTRIBUTE_QNRESPDESERTIME,
+            (stmts[i].getqNRespDeSerTime() < 0) ? this.VALUE_NA : stmts[i]
+                .getqNRespDeSerTime());
+        queryListJson.put(queryJSON);
+      }
+      responseJSON.put("queriesList", queryListJson);
+
+      // return jmx status
+      responseJSON.put("connectedFlag", cluster.isConnectedFlag());
+      responseJSON.put("connectedErrorMsg", cluster.getConnectionErrorMsg());
+
+      // Send json response
+      return responseJSON;
+
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/SystemAlertsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/SystemAlertsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/SystemAlertsService.java
new file mode 100644
index 0000000..2d089e4
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/SystemAlertsService.java
@@ -0,0 +1,124 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class SystemAlertsService
+ * 
+ * This class contains implementations of getting system's alerts details (like
+ * errors, warnings and severe errors).
+ * 
+ * @author Anchal G
+ * @since version 7.5
+ */
+
+@Component
+@Service("SystemAlerts")
+@Scope("singleton")
+public class SystemAlertsService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      int pageNumber = 1; // Default
+      String strPageNumber = requestDataJSON.getJSONObject("SystemAlerts")
+          .getString("pageNumber");
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(strPageNumber)) {
+        try {
+          pageNumber = Integer.valueOf(strPageNumber);
+        } catch (NumberFormatException e) {
+        }
+      }
+
+      // clucter's Members
+      responseJSON.put("systemAlerts", getAlertsJson(cluster, pageNumber));
+      responseJSON.put("pageNumber", cluster.getNotificationPageNumber());
+      responseJSON.put("connectedFlag", cluster.isConnectedFlag());
+      responseJSON.put("connectedErrorMsg", cluster.getConnectionErrorMsg());
+
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+
+    // Send json response
+    return responseJSON;
+  }
+
+  /**
+   * function used for getting all members details in format of JSON Object
+   * array defined under a cluster
+   * 
+   * @param cluster
+   * @return JSONObject Array list
+   */
+  public static JSONObject getAlertsJson(Cluster cluster, int pageNumber)
+      throws JSONException {
+    // getting list of all types of alerts
+    Cluster.Alert[] alertsList = cluster.getAlertsList();
+
+    // create alerts json
+    JSONObject alertsJsonObject = new JSONObject();
+
+    if ((alertsList != null) && (alertsList.length > 0)) {
+      JSONArray errorJsonArray = new JSONArray();
+      JSONArray severeJsonArray = new JSONArray();
+      JSONArray warningJsonArray = new JSONArray();
+      JSONArray infoJsonArray = new JSONArray();
+
+      cluster.setNotificationPageNumber(pageNumber);
+      for (Cluster.Alert alert : alertsList) {
+        JSONObject objAlertJson = new JSONObject();
+        objAlertJson.put("description", alert.getDescription());
+        objAlertJson.put("memberName", alert.getMemberName());
+        objAlertJson.put("severity", alert.getSeverity());
+        objAlertJson.put("isAcknowledged", alert.isAcknowledged());
+        objAlertJson.put("timestamp", alert.getTimestamp().toString());
+        objAlertJson.put("iso8601Ts", alert.getIso8601Ts());
+        objAlertJson.put("id", alert.getId());
+
+        if (alert.getSeverity() == Cluster.Alert.SEVERE) {
+          severeJsonArray.put(objAlertJson);
+        } else if (alert.getSeverity() == Cluster.Alert.ERROR) {
+          errorJsonArray.put(objAlertJson);
+        } else if (alert.getSeverity() == Cluster.Alert.WARNING) {
+          warningJsonArray.put(objAlertJson);
+        } else {
+          infoJsonArray.put(objAlertJson);
+        }
+      }
+      alertsJsonObject.put("info", infoJsonArray);
+      alertsJsonObject.put("warnings", warningJsonArray);
+      alertsJsonObject.put("errors", errorJsonArray);
+      alertsJsonObject.put("severe", severeJsonArray);
+    }
+    return alertsJsonObject;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/ConnectionUtil.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/ConnectionUtil.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/ConnectionUtil.java
new file mode 100644
index 0000000..f1defe0
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/ConnectionUtil.java
@@ -0,0 +1,36 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.internal.util;
+
+import java.io.IOException;
+
+import javax.net.SocketFactory;
+import javax.net.ssl.SSLSocketFactory;
+
+
+/**
+ * 
+ * @author rishim
+ *
+ */
+public class ConnectionUtil {
+
+  
+  
+  public static SocketFactory getSocketFactory(boolean usessl)
+    throws IOException
+  {
+    if(usessl){
+      return (SSLSocketFactory)SSLSocketFactory.getDefault();
+    }else{
+      return SocketFactory.getDefault();
+    }    
+  }
+  
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/IPAddressUtil.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/IPAddressUtil.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/IPAddressUtil.java
new file mode 100644
index 0000000..0c2b63e
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/IPAddressUtil.java
@@ -0,0 +1,56 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.util;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+/* [ NOTE: 
+ * This class supposed to be removed, if required, after discussing with 
+ * VMware team ]
+ */
+/**
+ * Class IPAddressUtil This is utility class for checking whether ip address is
+ * versions i.e. IPv4 or IPv6 address
+ * 
+ * @author Sachin K
+ * 
+ * @since version 7.0.1
+ */
+public class IPAddressUtil {
+
+  private static Pattern VALID_IPV4_PATTERN = null;
+  private static Pattern VALID_IPV6_PATTERN = null;
+  private static final String ipv4Pattern = "(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])";
+  private static final String ipv6Pattern = "([0-9a-f]{1,4}:){7}([0-9a-f]){1,4}";
+
+  static {
+    try {
+      VALID_IPV4_PATTERN = Pattern.compile(ipv4Pattern,
+          Pattern.CASE_INSENSITIVE);
+      VALID_IPV6_PATTERN = Pattern.compile(ipv6Pattern,
+          Pattern.CASE_INSENSITIVE);
+    } catch (PatternSyntaxException e) {
+
+    }
+  }
+
+  public static Boolean isIPv4LiteralAddress(String IPAddress) {
+    Matcher matcher = IPAddressUtil.VALID_IPV4_PATTERN.matcher(IPAddress);
+    return matcher.matches();
+  }
+
+  public static Boolean isIPv6LiteralAddress(String IPAddress) {
+
+    Matcher matcher = IPAddressUtil.VALID_IPV6_PATTERN.matcher(IPAddress);
+    return matcher.matches();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/StringUtils.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/StringUtils.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/StringUtils.java
new file mode 100644
index 0000000..d9d75c3
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/StringUtils.java
@@ -0,0 +1,76 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.util;
+
+/**
+ * Class StringUtils This is utility class for string.
+ * 
+ * @author Sachin K
+ * 
+ * @since version 7.0.1
+ */
+public class StringUtils {
+  /**
+   * Checks the string if it is not null, not empty, and not white space only
+   * using standard Java classes.
+   * 
+   * @param string
+   *          String to be checked.
+   * @return {@code true} if provided String is not null, is not empty, and has
+   *         at least one character that is not considered white space.
+   */
+  public static boolean isNotNullNotEmptyNotWhiteSpace(final String string) {
+    return string != null && !string.isEmpty() && !string.trim().isEmpty();
+  }
+
+  /**
+   * Checking for String that is not null, not empty, and not white space only
+   * using standard Java classes.
+   * 
+   * @param value
+   *          String to be made compliant.
+   * @return string compliant string.
+   */
+  public static String makeCompliantName(String value) {
+    value = value.replace(':', '-');
+    value = value.replace(',', '-');
+    value = value.replace('=', '-');
+    value = value.replace('*', '-');
+    value = value.replace('?', '-');
+    if (value.length() < 1) {
+      value = "nothing";
+    }
+    return value;
+  }
+
+  /**
+   * Function to get table name derived from region name/full path
+   * 
+   * @param regionName
+   *          String to be made compliant.
+   * @return string compliant string.
+   */
+  public static String getTableNameFromRegionName(String regionName) {
+    String tableName = regionName.replaceFirst("/", "").replace('/', '.');
+    return tableName;
+  }
+
+  /**
+   * Function to get region name/full path derived from table name
+   * 
+   * @param regionName
+   *          String to be made compliant.
+   * @return string compliant string.
+   */
+  public static String getRegionNameFromTableName(String tableName) {
+    String regionName = "/" + tableName.replace('.', '/');
+    return regionName;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/TimeUtils.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/TimeUtils.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/TimeUtils.java
new file mode 100644
index 0000000..27cd16b
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/util/TimeUtils.java
@@ -0,0 +1,111 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.util;
+
+/**
+ * Class TimeUtils 
+ * 
+ * This is utility class used for conversions of time.
+ * 
+ * @author Sachin K
+ * 
+ * @since version 7.0.1
+ */
+public class TimeUtils {
+
+  /**
+   * Method to converts time given in milliseconds to string representation in
+   * days, hours, minutes and seconds
+   * 
+   * @param longMilliSecs
+   *          Time in milliseconds.
+   * @return String
+   */
+  public static String convertTimeMillisecondsToHMS(long longMilliSecs) {
+
+    long days = longMilliSecs / (1000 * 60 * 60 * 24);
+    long remainder = longMilliSecs % (1000 * 60 * 60 * 24);
+
+    long hours = remainder / (1000 * 60 * 60);
+    remainder = remainder % (1000 * 60 * 60);
+
+    long mins = remainder / (1000 * 60);
+    remainder = remainder % (1000 * 60);
+
+    long secs = remainder / 1000;
+
+    String strDaysHrsMinsSecs = "";
+
+    if (days > 0) {
+      strDaysHrsMinsSecs += days + " Days ";
+    }
+
+    if (hours > 0) {
+      strDaysHrsMinsSecs += hours + " Hours ";
+    } else {
+      strDaysHrsMinsSecs += "0 Hours ";
+    }
+
+    if (mins > 0) {
+      strDaysHrsMinsSecs += mins + " Mins ";
+    } else {
+      strDaysHrsMinsSecs += "0 Mins ";
+    }
+
+    strDaysHrsMinsSecs += secs + " Secs";
+
+    return strDaysHrsMinsSecs;
+  }
+
+  /**
+   * Method to converts time given in seconds to string representation in days,
+   * hours, minutes and seconds
+   * 
+   * @param longSecs
+   *          Time in seconds.
+   * @return String
+   */
+  public static String convertTimeSecondsToHMS(long longSecs) {
+
+    long days = longSecs / (60 * 60 * 24);
+    long remainder = longSecs % (60 * 60 * 24);
+
+    long hours = remainder / (60 * 60);
+    remainder = remainder % (60 * 60);
+
+    long mins = remainder / (60);
+    remainder = remainder % (60);
+
+    long secs = remainder;
+
+    String strDaysHrsMinsSecs = "";
+
+    if (days > 0) {
+      strDaysHrsMinsSecs += days + " Days ";
+    }
+
+    if (hours > 0) {
+      strDaysHrsMinsSecs += hours + " Hours ";
+    } else {
+      strDaysHrsMinsSecs += "0 Hours ";
+    }
+
+    if (mins > 0) {
+      strDaysHrsMinsSecs += mins + " Mins ";
+    } else {
+      strDaysHrsMinsSecs += "0 Mins ";
+    }
+
+    strDaysHrsMinsSecs += secs + " Secs";
+
+    return strDaysHrsMinsSecs;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/LogMessages_en_US.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/LogMessages_en_US.properties b/pulse/src/main/resources/LogMessages_en_US.properties
new file mode 100644
index 0000000..b721b6d
--- /dev/null
+++ b/pulse/src/main/resources/LogMessages_en_US.properties
@@ -0,0 +1,78 @@
+#Log message for English, United State
+LOG_MSG_PULSE_VERSION = Pulse Version:
+LOG_MSG_CONTEXT_INITIALIZED = Context Initialized.. 
+LOG_MSG_CONTEXT_DESTROYED = Context Destroyed.. 
+LOG_MSG_CHECK_LOG_PROPERTIES_IN_FILE = Checking whether log configurations provided in properties file..
+LOG_MSG_CHECK_LOG_PROPERTIES_IN_SYSTEM_PROPERTIES = Checking whether log configurations provided through system properties..
+LOG_MSG_LOG_PROPERTIES_FOUND_IN_FILE = Some/All Log properties provided in properties file
+LOG_MSG_LOG_PROPERTIES_NOT_FOUND_IN_FILE = None of the log properties provided in properties file
+LOG_MSG_LOG_PROPERTIES_FOUND_IN_SYSTEM_PROPERTIES = Some/All Log properties provided through system properties
+LOG_MSG_LOG_PROPERTIES_NOT_FOUND_IN_SYSTEM_PROPERTIES = None of the log properties provided through system properties
+LOG_MSG_CHECK_APP_RUNNING_MODE = Checking whether Pulse is running in embedded mode..
+LOG_MSG_APP_RUNNING_EMBEDDED_MODE = Pulse is running in Embedded Mode..
+LOG_MSG_APP_RUNNING_NONEMBEDDED_MODE = Pulse is running in Non-Embedded Mode..
+LOG_MSG_APP_RUNNING_EMBEDDED_SQLF_MODE = Pulse is running in Embedded SQLF system
+LOG_MSG_GET_JMX_USER_DETAILS = Getting JMX User details from properties
+LOG_MSG_JMX_USER_DETAILS_FOUND = JMX User Details Found.. 
+LOG_MSG_JMX_USER_DETAILS_NOT_FOUND = JMX User Details Not Found.. 
+LOG_MSG_GET_LOCATOR_DETAILS_1 = Getting locator/manager details through System Properties..
+LOG_MSG_GET_LOCATOR_DETAILS_2 = Getting locator/Manager details from Properties File..
+LOG_MSG_LOCATOR_DETAILS_FOUND = Locator/Manager Properties Found..
+LOG_MSG_LOCATOR_DETAILS_NOT_FOUND = Locator/Manager Properties NOT Found..
+
+################Property File Related #####################
+LOG_MSG_PROPERTIES_FOUND = Pulse properties found in properties file
+LOG_MSG_PROPERTIES_NOT_FOUND = Pulse properties not found
+LOG_MSG_FILE_FOUND = File Found 
+LOG_MSG_COULD_NOT_READ_FILE = Could not read Properties File
+LOG_MSG_REASON_FILE_NOT_FOUND =  Reason: could not find Properties File..  
+LOG_MSG_REASON_COULD_NOT_READ_FILE =  Reason: could not read Properties File.. 
+LOG_MSG_REASON_USER_DETAILS_NOT_FOUND =  Reason: jmx user details not present in Properties File.. 
+LOG_MSG_EXCEPTION_CLOSING_INPUT_STREAM =  Exception while closing input stream for file
+LOG_MSG_EXCEPTION_LOADING_PROPERTIES_FILE =  Exception while loading properties from properties file
+
+###################################################################################
+
+LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_1 =  Reason: System Properties Not Found..
+LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_2 =  Reason: Properties not found in Properties File..
+
+
+LOG_MSG_CREATE_NEW_THREAD = Creating New Cluster Thread...
+LOG_MSG_REMOVE_THREAD = Removing Cluster Thread...
+LOG_MSG_START_THREAD_UPDATES = Starting update thread for cluster
+LOG_MSG_STOP_THREAD_UPDATES = Stopping update thread for cluster
+LOG_MSG_CLUSTER_DATA_IS_UPDATING = Updating Cluster data for Cluster
+
+LOG_MSG_USE_LOCATOR_VALUE = Use Locator is set
+LOG_MSG_HOST = Host
+LOG_MSG_PORT = Port
+LOG_MSG_WITH_SSL =  with SSL
+LOG_MSG_WITHOUT_SSL =  without SSL
+LOG_MSG_LOCATOR_COULD_NOT_FIND_MANAGER = Locator could not find a jmx manager
+LOG_MSG_LOCATOR_FOUND_MANAGER = Locator has found a jmx manager
+LOG_MSG_REGISTERING_APP_URL_TO_MANAGER = Registering Pulse App URL to JMX Manager..
+LOG_MSG_SETTING_APP_URL_TO_MANAGER = Setting Pulse App URL to JMX Manager..
+LOG_MSG_APP_URL_ALREADY_PRESENT_IN_MANAGER = Pulse App URL is already present in JMX Manager..
+LOG_MSG_JMX_GET_NEW_CONNECTION = Get new JMX connection..
+LOG_MSG_JMX_GETTING_NEW_CONNECTION = Getting new JMX connection..
+LOG_MSG_JMX_CONNECTION_NOT_FOUND = JMX Connection Not Found..
+LOG_MSG_JMX_CONNECTION_IS_AVAILABLE = JMX Connection is available..
+LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST = Unknown Host
+LOG_MSG_JMX_CONNECTION_IPv6_ADDRESS = Host has IPv6 Address
+LOG_MSG_JMX_CONNECTION_BAD_ADDRESS = Bad Host Address
+LOG_MSG_JMX_CONNECTION_TIME_OUT = Connection Timed Out
+
+LOG_MSG_LOCATOR_IPV4_ADDRESS = Locator has IPv4 Address
+LOG_MSG_LOCATOR_IPV6_ADDRESS = Locator has IPv6 Address
+LOG_MSG_LOCATOR_BAD_ADDRESS = Locator address is badly formed
+# For Data Browser
+LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_NOT_FOUND = Pulse Query History log file not found..
+LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_DESCRIPTION = Pulse Data Browser Query logs ..
+
+# For MOCK data
+LOG_MSG_REFRESHING_MEMBER_DATA = Refreshing data for member
+
+ 
+# For SSL messages 
+LOG_MSG_GET_SSL_DETAILS = Setting SSL properties
+LOG_MSG_SSL_NOT_SET = SSL properties are not mentioned in Pulse.properties while either pulse.useSSL.locator or pulse.useSSL.manager property is marked as true. Connection wont be successful.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/LogMessages_fr_FR.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/LogMessages_fr_FR.properties b/pulse/src/main/resources/LogMessages_fr_FR.properties
new file mode 100644
index 0000000..bb76fd6
--- /dev/null
+++ b/pulse/src/main/resources/LogMessages_fr_FR.properties
@@ -0,0 +1,72 @@
+#Log message for English, United State
+LOG_MSG_PULSE_VERSION = Pulse Version: french
+LOG_MSG_CONTEXT_INITIALIZED = Context Initialized..french 
+LOG_MSG_CONTEXT_DESTROYED = Context Destroyed..french
+LOG_MSG_CHECK_LOG_PROPERTIES_IN_FILE = Checking whether log configurations provided in properties file..
+LOG_MSG_CHECK_LOG_PROPERTIES_IN_SYSTEM_PROPERTIES = Checking whether log configurations provided through system properties..
+LOG_MSG_LOG_PROPERTIES_FOUND_IN_FILE = Some/All Log properties provided in properties file
+LOG_MSG_LOG_PROPERTIES_NOT_FOUND_IN_FILE = None of the log properties provided in properties file
+LOG_MSG_LOG_PROPERTIES_FOUND_IN_SYSTEM_PROPERTIES = Some/All Log properties provided through system properties
+LOG_MSG_LOG_PROPERTIES_NOT_FOUND_IN_SYSTEM_PROPERTIES = None of the log properties provided through system properties
+LOG_MSG_CHECK_APP_RUNNING_MODE = Checking whether Pulse is running in embedded mode..
+LOG_MSG_APP_RUNNING_EMBEDDED_MODE = Pulse is running in Embedded Mode..
+LOG_MSG_APP_RUNNING_NONEMBEDDED_MODE = Pulse is running in Non-Embedded Mode..
+LOG_MSG_APP_RUNNING_EMBEDDED_SQLF_MODE = Pulse is running in Embedded SQLF system
+LOG_MSG_GET_JMX_USER_DETAILS = Getting JMX User details from properties
+LOG_MSG_JMX_USER_DETAILS_FOUND = JMX User Details Found.. 
+LOG_MSG_JMX_USER_DETAILS_NOT_FOUND = JMX User Details Not Found.. 
+LOG_MSG_GET_LOCATOR_DETAILS_1 = Getting locator/manager details through System Properties..
+LOG_MSG_GET_LOCATOR_DETAILS_2 = Getting locator/Manager details from Properties File..
+LOG_MSG_LOCATOR_DETAILS_FOUND = Locator/Manager Properties Found..
+LOG_MSG_LOCATOR_DETAILS_NOT_FOUND = Locator/Manager Properties NOT Found..
+LOG_MSG_PROPERTIES_FOUND = Pulse properties found in properties file
+LOG_MSG_PROPERTIES_NOT_FOUND = Pulse properties not found
+LOG_MSG_PROPERTIES_FILE_FOUND = Properties File Found 
+LOG_MSG_COULD_NOT_READ_FILE = Could not read Properties File.. 
+
+LOG_MSG_REASON_FILE_NOT_FOUND =  Reason: could not find Properties File..  
+LOG_MSG_REASON_COULD_NOT_READ_FILE =  Reason: could not read Properties File.. 
+LOG_MSG_REASON_USER_DETAILS_NOT_FOUND =  Reason: jmx user details not present in Properties File.. 
+LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_1 =  Reason: System Properties Not Found..
+LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_2 =  Reason: Properties not found in Properties File..
+LOG_MSG_EXCEPTION_CLOSING_INPUT_STREAM =  Exception while closing input stream
+LOG_MSG_EXCEPTION_LOADING_PROPERTIES_FILE =  Exception while loading properties from properties file
+
+LOG_MSG_CREATE_NEW_THREAD = Creating New Cluster Thread...
+LOG_MSG_REMOVE_THREAD = Removing Cluster Thread...
+LOG_MSG_START_THREAD_UPDATES = Starting update thread for cluster
+LOG_MSG_STOP_THREAD_UPDATES = Stopping update thread for cluster
+LOG_MSG_CLUSTER_DATA_IS_UPDATING = Updating Cluster data for Cluster
+
+LOG_MSG_USE_LOCATOR_VALUE = Use Locator is set
+LOG_MSG_HOST = Host
+LOG_MSG_PORT = Port
+LOG_MSG_WITH_SSL =  with SSL
+LOG_MSG_WITHOUT_SSL =  without SSL
+LOG_MSG_LOCATOR_COULD_NOT_FIND_MANAGER = Locator could not find a jmx manager
+LOG_MSG_LOCATOR_FOUND_MANAGER = Locator has found a jmx manager
+LOG_MSG_REGISTERING_APP_URL_TO_MANAGER = Registering Pulse App URL to JMX Manager..
+LOG_MSG_SETTING_APP_URL_TO_MANAGER = Setting Pulse App URL to JMX Manager..
+LOG_MSG_APP_URL_ALREADY_PRESENT_IN_MANAGER = Pulse App URL is already present in JMX Manager..
+LOG_MSG_JMX_GET_NEW_CONNECTION = Get new JMX connection..
+LOG_MSG_JMX_GETTING_NEW_CONNECTION = Getting new JMX connection..
+LOG_MSG_JMX_CONNECTION_NOT_FOUND = JMX Connection Not Found..
+LOG_MSG_JMX_CONNECTION_IS_AVAILABLE = JMX Connection is available..
+LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST = Unknown Host
+LOG_MSG_JMX_CONNECTION_IPv6_ADDRESS = Host has IPv6 Address
+LOG_MSG_JMX_CONNECTION_BAD_ADDRESS = Bad Host Address
+LOG_MSG_JMX_CONNECTION_TIME_OUT = Connection Timed Out
+
+LOG_MSG_LOCATOR_IPV4_ADDRESS = Locator has IPv4 Address
+LOG_MSG_LOCATOR_IPV6_ADDRESS = Locator has IPv6 Address
+LOG_MSG_LOCATOR_BAD_ADDRESS = Locator address is badly formed
+# For Data Browser
+LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_NOT_FOUND = Pulse Query History log file not found..
+LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_DESCRIPTION = Pulse Data Browser Query logs ..
+
+# For MOCK data
+LOG_MSG_REFRESHING_MEMBER_DATA = Refreshing data for member 
+
+# For SSL messages 
+LOG_MSG_GET_SSL_DETAILS = Setting SSL properties
+LOG_MSG_SSL_NOT_SET = SSL properties are not mentioned in Pulse.properties while either pulse.useSSL.locator or pulse.useSSL.manager property is marked as true. Connection wont be successful.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/NoDataFound1.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/NoDataFound1.txt b/pulse/src/main/resources/NoDataFound1.txt
new file mode 100644
index 0000000..2fb180d
--- /dev/null
+++ b/pulse/src/main/resources/NoDataFound1.txt
@@ -0,0 +1 @@
+{"message":"No Data Found"}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/NoDataFound2.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/NoDataFound2.txt b/pulse/src/main/resources/NoDataFound2.txt
new file mode 100644
index 0000000..c22e3af
--- /dev/null
+++ b/pulse/src/main/resources/NoDataFound2.txt
@@ -0,0 +1,35 @@
+{"result":[
+  {"message":"No Data Found"},
+  {
+   "member":[["java.lang.String","SachinK(S1:5840)<v1>:24856"]],
+   "result":[
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]]
+    ]
+  },
+  
+  {"message":"No Data Found"},
+  
+  {"message":"No Data Found"},
+  
+  {
+   "member":[["java.lang.String","SachinK(S3:5230)<v1>:32145"]],
+   "result":[
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]]
+    ]
+  },
+  
+  {
+   "member":[["java.lang.String","SachinK(S2:7572)<v2>:14582"]],
+   "result":[
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]],
+     ["java.lang.String[]",["FirststrArrval1","SecondstrArrval2","ThirdstrArrval3"]]
+    ]
+  },
+  
+  {"message":"No Data Found"}
+]}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/NoDataFound3.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/NoDataFound3.txt b/pulse/src/main/resources/NoDataFound3.txt
new file mode 100644
index 0000000..a6248eb
--- /dev/null
+++ b/pulse/src/main/resources/NoDataFound3.txt
@@ -0,0 +1,6 @@
+{"result":[
+   {"message":"No Data Found"},
+   {"message":"No Data Found"},
+   {"message":"No Data Found"},
+   {"message":"No Data Found"}
+]}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/default.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/default.properties b/pulse/src/main/resources/default.properties
new file mode 100644
index 0000000..46903d7
--- /dev/null
+++ b/pulse/src/main/resources/default.properties
@@ -0,0 +1,4 @@
+# All properties which are common between GemFire & SQLFire are to be added here. 
+# No property to repeat in specific files of GemFire and SQLFire products
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/gemfire.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/gemfire.properties b/pulse/src/main/resources/gemfire.properties
new file mode 100644
index 0000000..9ee4fc6
--- /dev/null
+++ b/pulse/src/main/resources/gemfire.properties
@@ -0,0 +1,28 @@
+# All properties for GemFire are to be added here. 
+# No property to repeat from default file
+pulse-writeputpersec-custom=Write/Sec.
+pulse-readgetpersec-custom=Read/Sec.
+pulse-writes-custom=Writes
+pulse-reads-custom=Reads
+pulse-monitoring-custom=images/pulse-monitoring.png
+pulse-aboutimg-custom=images/about.png
+pulse-help-custom=http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html
+pulse-about-custom=The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-regionstableCaps-custom=Regions
+pulse-rtSummaryBySize-custom=Regions Summary - By Entry Count
+pulse-regionstablePath-custom=Region Path:&nbsp;
+pulse-regionstableType-custom=Region Type:&nbsp;
+pulse-regionstableMembers-custom=Region Members
+pulse-memberRegionsTables-custom=Member Regions
+pulse-regionstableInvolved-custom=Regions Involved
+pulse-regiontabletooltip-custom=Regions
+pulse-writesRate-custom=Writes Rate
+pulse-readsRate-custom=Reads Rate
+pulse-regiontablePathColName-custom=Region Path
+pulse-regiontableName-custom=Region Name
+pulse-regionMemoryUsage-custom=Memory Usage
+pulse-regionDiskReadsWrites-custom=Disk Reads/Writes
+pulse-regionMemoryReadsWrites-custom=Reads/Writes
+pulse-entrysize-custom=Entry Size
+pulse-entrycount-custom=Entry Count
+pulse-functionprocedureCaps-custom=Functions

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/message.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/message.txt b/pulse/src/main/resources/message.txt
new file mode 100644
index 0000000..fadced5
--- /dev/null
+++ b/pulse/src/main/resources/message.txt
@@ -0,0 +1 @@
+{"message":"No Data Found"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/pulse-users.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/pulse-users.properties b/pulse/src/main/resources/pulse-users.properties
new file mode 100644
index 0000000..22a58ba
--- /dev/null
+++ b/pulse/src/main/resources/pulse-users.properties
@@ -0,0 +1,11 @@
+#Pulse-Users Properties File
+#Tue, 09 Oct 2012 16:39:00
+
+# Currently none of the users should have role as "ROLE_RESTRICTED"  
+
+jim=jimbob,ROLE_USER,enabled
+#admin=admin,ROLE_USER,enabled
+
+user1=user1,ROLE_USER,enabled
+user2=user2,ROLE_USER,enabled
+user3=user3,ROLE_USER,enabled
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/pulse.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/pulse.properties b/pulse/src/main/resources/pulse.properties
new file mode 100644
index 0000000..17299c2
--- /dev/null
+++ b/pulse/src/main/resources/pulse.properties
@@ -0,0 +1,35 @@
+#Pulse JMX Locator/Manager Properties File
+#Tue, 09 Oct 2012 16:39:00
+
+# JMX Locator/Manager Properties
+#pulse.useLocator=true
+#pulse.host=SachinK.clarice.com
+#pulse.useLocator=true
+#pulse.host=pnq-pratik.vmware.com
+#pulse.port=10334
+
+pulse.useLocator=true
+pulse.host=pnq-pratik.vmware.com
+pulse.port=10334
+
+#pulse.useSSL.locator=true
+#pulse.useSSL.manager=true
+
+# JMX User Properties
+pulse.jmxUserName=controlRole
+pulse.jmxUserPassword=R&D
+
+# Logging Configurations Properties
+pulse.Log-File-Name=PULSELOG
+#pulse.Log-File-Location=F:\\PulseLogs
+pulse.Log-File-Size=1048576
+pulse.Log-File-Count=3
+pulse.Log-Date-Pattern=yyyy/MM/dd HH:mm:ss.SSS z
+pulse.Log-Level=info
+pulse.Log-Append=true
+
+# For supporting gemfire and sqlfire both in pulse
+# valid values are as follows 
+# for GemFire "gemfire" 
+# for GemFireXD "gemfirexd" 
+pulse.product=gemfire

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/pulsesecurity.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/pulsesecurity.properties b/pulse/src/main/resources/pulsesecurity.properties
new file mode 100644
index 0000000..dbb4117
--- /dev/null
+++ b/pulse/src/main/resources/pulsesecurity.properties
@@ -0,0 +1,7 @@
+########### SSL Related Properties to be set in an SSL enabled environment ######################
+#javax.net.ssl.keyStore={KeyStorePath}
+#javax.net.ssl.keyStorePassword={KeyStorePassword}
+#javax.net.ssl.trustStore={TrustStorePath}
+#javax.net.ssl.trustStorePassword={TrustStorePassword}
+
+##################################################################################################
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/pulseversion.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/pulseversion.properties b/pulse/src/main/resources/pulseversion.properties
new file mode 100644
index 0000000..d9c777b
--- /dev/null
+++ b/pulse/src/main/resources/pulseversion.properties
@@ -0,0 +1,14 @@
+#Pulse Properties File
+#Wed, 03 Oct 2012 16:58:00 -0700
+
+pulse.version=7.0.Beta
+#pulse.buildId=build 38339
+#pulse.buildDate=10/03/2012 16\:57\:56 PDT
+#pulse.sourceDate=10/03/2012 16\:47 \:40 PDT
+#pulse.sourceRevision=38339
+#pulse.sourceRepository=gemfire/trunk
+Build-Id=build 38339
+Build-Date=10/03/2012 16\:57\:56 PDT
+Source-Date=10/03/2012 16\:47 \:40 PDT
+Source-Revision=38339
+Source-Repository=gemfire/trunk
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/sqlfire.properties
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/sqlfire.properties b/pulse/src/main/resources/sqlfire.properties
new file mode 100644
index 0000000..e80fc45
--- /dev/null
+++ b/pulse/src/main/resources/sqlfire.properties
@@ -0,0 +1,28 @@
+# All properties for SQLFire are to be added here. 
+# No property to repeat from default file
+pulse-writeputpersec-custom=Put/Sec.
+pulse-readgetpersec-custom=Get/Sec.
+pulse-writes-custom=Writes
+pulse-reads-custom=Reads
+pulse-monitoring-custom=images/sqlfire.png
+pulse-aboutimg-custom=images/about-sqlfire.png
+pulse-help-custom=http://pubs.vmware.com/vfabricNoSuite/topic/com.vmware.vfabric.gemfire.7.0/tools_modules/pulse/chapter_overview.html
+pulse-about-custom=The Pulse tool monitors vFabric&#0153; SQLFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.
+pulse-regionstableCaps-custom=Tables
+pulse-rtSummaryBySize-custom=Tables Summary - By Row Count
+pulse-regionstablePath-custom=Table Path:&nbsp;
+pulse-regionstableType-custom=Table Type:&nbsp;
+pulse-regionstableMembers-custom=Table Members
+pulse-memberRegionsTables-custom=Member Tables
+pulse-regionstableInvolved-custom=Tables Involved
+pulse-regiontabletooltip-custom=Tables
+pulse-writesRate-custom=Puts Rate
+pulse-readsRate-custom=Gets Rate
+pulse-regiontablePathColName-custom=Table Path
+pulse-regiontableName-custom=Table Name
+pulse-regionMemoryUsage-custom=Memory Usage
+pulse-regionDiskReadsWrites-custom=Disk Reads/Writes
+pulse-regionMemoryReadsWrites-custom=Reads/Writes
+pulse-entrysize-custom=Table Size
+pulse-entrycount-custom=Row Count
+pulse-functionprocedureCaps-custom=Procedures
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/test1.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/test1.txt b/pulse/src/main/resources/test1.txt
new file mode 100644
index 0000000..723d918
--- /dev/null
+++ b/pulse/src/main/resources/test1.txt
@@ -0,0 +1,5 @@
+{"result":[
+ ["java.lang.Integer",45],
+ ["java.lang.Integer",12],
+ ["java.lang.Integer",34]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/test2.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/test2.txt b/pulse/src/main/resources/test2.txt
new file mode 100644
index 0000000..8a9bf2e
--- /dev/null
+++ b/pulse/src/main/resources/test2.txt
@@ -0,0 +1,7 @@
+{"result":[
+ ["java.lang.Integer",45],
+ ["java.lang.Integer",12],
+ ["java.lang.Integer",34],
+ ["String","anystring"],
+ ["String","anotherstring"]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/test3.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/test3.txt b/pulse/src/main/resources/test3.txt
new file mode 100644
index 0000000..56c0c48
--- /dev/null
+++ b/pulse/src/main/resources/test3.txt
@@ -0,0 +1,5 @@
+{"result":[
+ ["int[]",[1000,1010,1020]],
+ ["int[]",[2000,2010,2020,2030]],
+ ["int[]",[3000,3010]]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/test4.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/test4.txt b/pulse/src/main/resources/test4.txt
new file mode 100644
index 0000000..799ad9c
--- /dev/null
+++ b/pulse/src/main/resources/test4.txt
@@ -0,0 +1,4 @@
+{"result":[
+ ["java.util.ArrayList",{"0":["java.lang.String","seeta"],"1":["java.lang.String","geeta"],"2":["java.lang.String","meeta"]}],
+ ["java.util.ArrayList",{"0":["java.lang.String","sonu"],"1":["java.lang.String","monu"],"2":["java.lang.String","chinu"]}]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/test5.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/test5.txt b/pulse/src/main/resources/test5.txt
new file mode 100644
index 0000000..342c11e
--- /dev/null
+++ b/pulse/src/main/resources/test5.txt
@@ -0,0 +1,7 @@
+{"result":[
+ ["java.util.ArrayList",{
+   "0":["java.lang.String[]",["one","two","three"]],
+   "1":["java.lang.String[]",["ek","do","teen"]],
+   "2":["java.lang.String[]",["one","two","three"]]
+ }]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/test6.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/test6.txt b/pulse/src/main/resources/test6.txt
new file mode 100644
index 0000000..f086f62
--- /dev/null
+++ b/pulse/src/main/resources/test6.txt
@@ -0,0 +1,11 @@
+{"result":[
+  {"member":[["java.lang.String","pc68(7930)<v9>:30319"]],
+   "result":[
+     ["com.gemstone.gemfire.cache.query.data.PortfolioDummy[]",[
+      {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["j
 ava.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]},
+	    {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}
+	   ]]
+    ]
+  }
+ ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/test7.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/test7.txt b/pulse/src/main/resources/test7.txt
new file mode 100644
index 0000000..aaf128a
--- /dev/null
+++ b/pulse/src/main/resources/test7.txt
@@ -0,0 +1,13 @@
+{"result":[
+ ["com.gemstone.gemfire.cache.query.data.PortfolioDummy[]",[
+   {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["java
 .util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]},
+   {"type":["java.lang.String","type0"],"ID":["int",1],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["java
 .util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}
+ ]],
+ ["myObjects[]",[
+   {"type":["java.lang.String","type0"],"ID":["int",123],"active":["boolean",true]},
+   {"type":["java.lang.String","type0"],"ID":["int",234],"active":["boolean",false]},
+   {"type":["java.lang.String","type0"],"ID":["int",345],"active":["boolean",false]}
+ ]],
+ ["int[]",[1000,1010, 1030]],
+ ["int[]",[2000,2010]]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testNullObjectsAtRootLevel1.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testNullObjectsAtRootLevel1.txt b/pulse/src/main/resources/testNullObjectsAtRootLevel1.txt
new file mode 100644
index 0000000..dea74cf
--- /dev/null
+++ b/pulse/src/main/resources/testNullObjectsAtRootLevel1.txt
@@ -0,0 +1,25 @@
+{"result":[
+    null,
+    
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":null,"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["java.util.Ha
 shSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    null,
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",2],"active":["boolean",true],"pk":["java.lang.String","2"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",8],"secId":["java.lang.String","SAP"],"mktValue":["double",9],"sharesOutstanding":["double",8000],"col":["java.util
 .HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",9],"secId":["java.lang.String","DELL"],"mktValue":["double",10],"sharesOutstanding":["double",9000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",7],"secId":["java.lang.String","ORCL"],"mktValue":["double",8],"sharesOutstanding":["double",7000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":["int",3],"active":["boolean",false],"pk":["java.lang.String","3"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",12],"secId":["java.lang.String","HP"],"mktValue":["double",13],"sharesOutstanding":["double",12000],"col":["java.ut
 il.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",13],"secId":["java.lang.String","SUN"],"mktValue":["double",14],"sharesOutstanding":["double",13000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",10],"secId":["java.lang.String","RHAT"],"mktValue":["double",11],"sharesOutstanding":["double",10000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",11],"secId":["java.lang.String","NOVL"],"mktValue":["double",12],"sharesOutstanding":["double",11000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    null,
+    
+    null,
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]   
+    ]
+}
\ No newline at end of file


[47/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.2.txt
----------------------------------------------------------------------
diff --git a/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.2.txt b/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.2.txt
new file mode 100644
index 0000000..f55d95f
--- /dev/null
+++ b/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.2.txt
@@ -0,0 +1,1639 @@
+open_source_license.txt
+
+Pivotal GemFire Pulse 7.0.2
+
+
+================================================================
+The following copyright statements and licenses apply to various 
+open source software packages (or portions thereof) that are 
+distributed with this GoPivotal, Inc. Product.
+
+The GoPivotal Product may also include other GoPivotal components, 
+which may contain additional open source software packages. One or 
+more such open_source_licenses.txt files may therefore accompany 
+this GoPivotal Product.
+
+The GoPivotal Product that includes this file does not necessarily 
+use all the open source software packages referred to below and may 
+also only use portions of a given package.
+
+=================================================================
+TABLE OF CONTENTS
+=================================================================
+The following is a listing of the open source components detailed 
+in this document. This list is provided for your convenience; please 
+read further if you wish to review the copyright notice(s) and the 
+full text of the license associated with each component.
+
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> flot-0.7
+   >>> infovistoolkit-2.0.1
+   >>> jqgrid-4.4.0
+   >>> jquery-1.7.2
+   >>> jquery-sparklines-2.0
+   >>> jquery-ui-1.8.23
+   >>> json-none
+
+
+
+SECTION 2: Apache License, V2.0
+
+   >>> commons-beanutils-1.8.3
+   >>> commons-digester-1.8.1
+   >>> commons-logging-1.1.1
+   >>> commons.collections-3.2.0
+   >>> spring-aop-3.1.1.release
+   >>> spring-asm-3.1.1.release
+   >>> spring-beans-3.1.1.release
+   >>> spring-context-3.1.1.release
+   >>> spring-core-3.1.1.release
+   >>> spring-expression-3.1.1.release
+   >>> spring-security-config-3.1.1.release
+   >>> spring-security-core-3.1.1.release
+   >>> spring-security-web-3.1.1.release
+   >>> spring-web-3.1.1.release
+
+
+
+SECTION 3: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5.0
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> Common Development and Distribution License, V1.0
+
+   >>> GNU Lesser General Public License, V2.1
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> flot-0.7
+
+Copyright (c) 2007-2012 IOLA and Ole Laursen
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+
+> Apache 2.0
+
+Downloads\flot-flot-v0.7-114-g7a22921.zip\flot-flot-7a22921\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> infovistoolkit-2.0.1
+
+Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> Apache 2.0
+
+Jit-2.0.1.zip\Jit\Extras\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> jqgrid-4.4.0
+
+[PLEASE NOTE:  GOPIVOTAL, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+Changes from Tony Tomov tony@trirand.com
+Dual licensed under the MIT and GPL licenses:
+http://www.opensource.org/licenses/mit-license.php
+http://www.gnu.org/licenses/gpl-2.0.html
+
+The MIT License (MIT)
+Copyright (c) <year> <copyright holders>
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> LGPL 2.1
+
+jquery.jqGrid-4.4.1.zip\src\JsonXml.js
+
+The below work is licensed under Creative Commons GNU LGPL License.
+
+Original work:
+
+License:     http://creativecommons.org/licenses/LGPL/2.1/
+Author:      Stefan Goessner/2006
+Web:         http://goessner.net/
+
+Modifications made:
+
+Version:     0.9-p5
+Description: Restructured code, JSLint validated (no strict whitespaces),
+added handling of empty arrays, empty strings, and int/floats values.
+Author:      Michael Schler/2008-01-29
+Web:         http://michael.hinnerup.net/blog/2008/01/26/converting-json-to-xml-and-xml-to-json/
+
+Description: json2xml added support to convert functions as CDATA
+so it will be easy to write characters that cause some problems when convert
+Author:      Tony Tomov
+
+
+>>> jquery-1.7.2
+
+[PLEASE NOTE:  GOPIVOTAL, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
+
+Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+
+Dual licensed under the MIT and GPL licenses:
+
+http://www.opensource.org/licenses/mit-license.php
+
+http://www.gnu.org/licenses/gpl.html
+
+The MIT License (MIT)
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> jquery-sparklines-2.0
+
+Copyright (c) 2012, Splunk Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of Splunk Inc nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+>>> jquery-ui-1.8.23
+
+[PLEASE NOTE:  GOPIVOTAL, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE.PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE.THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+
+Copyright 2011, John Resig
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+Includes Sizzle.js
+http://sizzlejs.com/
+Copyright 2011, The Dojo Foundation
+Released under the MIT, BSD, and GPL Licenses.
+
+Date: Wed Mar 21 12:46:34 2012 -0700
+
+
+Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/
+
+This software consists of voluntary contributions made by many
+individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
+contribution history, see the revision history and logs, available
+at http://jquery-ui.googlecode.com/svn/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> json-none
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 is applicable to the following component(s).
+
+
+>>> commons-beanutils-1.8.3
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons-digester-1.8.1
+
+Apache Commons Digester
+Copyright 2001-2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+>>> commons-logging-1.1.1
+
+Apache Commons Logging
+Copyright 2003-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons.collections-3.2.0
+
+Copyright 2003-2005 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+commons-collections-3.2.jar
+commons-collections-testframework-3.2.jar
+
+
+>>> spring-aop-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-asm-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-beans-3.1.1.release
+
+Copyright 2002-2009 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-context-3.1.1.release
+
+Copyright 2002-2011 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-core-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-expression-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-security-config-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-security-core-3.1.1.release
+
+Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+
+> MIT
+
+org.springframework.security.core-sources-3.1.1.RELEASE.jar\org\springframework\security\crypto\bcrypt\BCrypt.java
+
+Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+>>> spring-security-web-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-web-3.1.1.release
+
+Copyright 2002-2011 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5.0
+
+The contents of this file are subject to the terms
+of the Common Development and Distribution License
+(the "License").  You may not use this file except
+in compliance with the License.
+
+You can obtain a copy of the license at
+glassfish/bootstrap/legal/CDDLv1.0.txt or
+https://glassfish.dev.java.net/public/CDDLv1.0.html.
+See the License for the specific language governing
+permissions and limitations under the License.
+
+When distributing Covered Code, include this CDDL
+HEADER in each file and include the License file at
+glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable,
+add the following below this CDDL HEADER, with the
+fields enclosed by brackets "[]" replaced with your
+own identifying information: Portions Copyright [yyyy]
+[name of copyright owner]
+
+Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+
+Portions Copyright Apache Software Foundation.
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+--------------- SECTION 3: GNU Lesser General Public License, V2.1 -----------
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, 
+with your name and address to: GoPivotal, Inc., 1900 S. Norfolk Street #125, San Mateo, CA 94403, 
+Attention: General Counsel. All such requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. GoPivotal shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. 
+Alternatively, the Source Files may accompany the GoPivotal product.
+
+[GFPULSE702SS101013]


[52/79] incubator-geode git commit: GEODE-17 : Integrated Security Code Merge This is manual merge of code from int_security branch.

Posted by tu...@apache.org.
GEODE-17 : Integrated Security Code Merge
This is manual merge of code from int_security branch.

DE-17 : Integrated Security Code Merge


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1393ad27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1393ad27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1393ad27

Branch: refs/heads/feature/GEODE-17
Commit: 1393ad27d5d101484bc951a87843c0ac3f44905b
Parents: 1922937
Author: Tushar Khairnar <tk...@pivotal.io>
Authored: Thu Aug 27 10:28:57 2015 +0530
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:51:47 2015 +0530

----------------------------------------------------------------------
 .../management/internal/cli/commands/HDFSStoreCommands.java       | 2 +-
 .../gemfire/management/internal/security/ResourceConstants.java   | 3 ++-
 .../management/internal/security/ResourceOperationContext.java    | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1393ad27/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/HDFSStoreCommands.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/HDFSStoreCommands.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/HDFSStoreCommands.java
index 6bc5e5d..cc504fd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/HDFSStoreCommands.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/HDFSStoreCommands.java
@@ -58,7 +58,7 @@ import com.gemstone.gemfire.management.internal.security.ResourceOperation;
 public class HDFSStoreCommands   extends AbstractCommandsSupport {  
   @CliCommand (value = CliStrings.CREATE_HDFS_STORE, help = CliStrings.CREATE_HDFS_STORE__HELP)
   @CliMetaData (relatedTopic = CliStrings.TOPIC_GEMFIRE_HDFSSTORE, writesToSharedConfiguration = true)
-  @ResourceOperation( resource=Resource.DISTRIBUTED_SYSTEM, operation=ResourceConstants.CREATE_HDFS_STORE)
+  @ResourceOperation(resource = Resource.DISTRIBUTED_SYSTEM, operation= ResourceConstants.CREATE_HDFS_STORE)
   public Result createHdfsStore(      
       @CliOption (key = CliStrings.CREATE_HDFS_STORE__NAME,                  
                   mandatory = true,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1393ad27/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
index e26bc64..01abb8c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
@@ -46,7 +46,7 @@ public class ResourceConstants {
   public static final String DESTROY_DISKSTORE = "DESTROY_DISKSTORE";
   public static final String DESTROY_FUNCTION = "DESTROY_FUNCTION";
   public static final String DESTROY_INDEX = "DESTROY_INDEX";
-  
+
   public static final String DESTROY_REGION = "DESTROY_REGION";
   public static final String EXECUTE_FUNCTION = "EXECUTE_FUNCTION";
   public static final String EXPORT_CONFIG = "EXPORT_CONFIG";
@@ -93,6 +93,7 @@ public class ResourceConstants {
   public static final String STOP_CONTINUOUS_QUERY = "STOP_CONTINUOUS_QUERY";
   public static final String SET_DISK_USAGE = "SET_DISK_USAGE";
   
+
   public static final String CREATE_HDFS_STORE = "CREATE_HDFS_STORE";
   public static final String ALTER_HDFS_STORE = "ALTER_HDFS_STORE";
   public static final String DESTROY_HDFS_STORE = "DESTROY_HDFS_STORE";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1393ad27/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java
index 3801d66..c88e42c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java
@@ -88,7 +88,6 @@ public abstract class ResourceOperationContext extends OperationContext {
     private static final int OP_CREATE_HDFS_STORE = 64;
     private static final int OP_ALTER_HDFS_STORE = 65;
     private static final int OP_DESTROY_HDFS_STORE = 66;
-    
 
     private static final int OP_PULSE_DASHBOARD = 92;
     private static final int OP_PULSE_DATABROWSER = 93;


[08/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/PulseCallbacks.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/PulseCallbacks.js b/pulse/src/main/webapp/scripts/pulsescript/PulseCallbacks.js
new file mode 100644
index 0000000..6b12b74
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/PulseCallbacks.js
@@ -0,0 +1,1724 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+/**
+ *  @overview
+ * This is the actual response handling and processing of the web calls
+ * that are made by the PulseFunctions class. It will also process the 
+ * JSON response.
+ *
+ * @name PulseCallbacks.js
+ * @author ashutosh zambare.
+ * @version 1.0
+ *
+ */
+
+/**
+ * @function
+ * 
+ * @param r
+ *                This is the JSON object that is returned by the AJAX call made
+ *                by the PulseFunctions.
+ */
+var getPulseVersionBack = function(data) {
+
+  if (data.pulseVersion != undefined && data.pulseVersion != "") {
+    // Set Pulse version details
+    $('#pulseVersion').html(data.pulseVersion);
+    $('#pulseVer').html(data.pulseVersion);
+    $('#buildId').html(data.buildId);
+    $('#buildDate').html(data.buildDate);
+    $('#sourceDate').html(data.sourceDate);
+    $('#sourceRevision').html(data.sourceRevision);
+    $('#sourceRepository').html(data.sourceRepository);
+
+    // Display version details link
+    $('#pulseVersionDetailsLink').show();
+  } else {
+    // Hide version details link
+    $('#pulseVersionDetailsLink').hide();
+  }
+};
+
+
+/**
+ * Default handler for ClusterDetails service,
+ * function used for getting the response of Cluster Basic Details and wired
+ * them with HTML representing tags.
+ */
+var getClusterDetailsBack = null;
+
+/**
+ * For Gemfire, handler for ClusterDetails service
+ * function used for getting the response of Cluster Basic Details and wired
+ * them with HTML representing tags.
+ */
+var getClusterDetailsGemfireBack = function(data) {
+
+  if (severAlerts.length > 0) { // Severe
+    $('#clusterStatusText').html("Severe");
+    $("#clusterStatusIcon").addClass("severeStatus");
+  } else if (errorAlerts.length > 0) { // Error
+    $('#clusterStatusText').html("Error");
+    $("#clusterStatusIcon").addClass("errorStatus");
+    $("#clusterStatusIcon").removeClass("severeStatus");
+  } else if (warningAlerts.length > 0) { // Warning
+    $('#clusterStatusText').html("Warning");
+    $("#clusterStatusIcon").addClass("warningStatus");
+    $("#clusterStatusIcon").removeClass("severeStatus");
+    $("#clusterStatusIcon").removeClass("errorStatus");
+  } else { // Normal
+    $('#clusterStatusText').html("Normal");
+    $("#clusterStatusIcon").addClass("normalStatus");
+    $("#clusterStatusIcon").removeClass("severeStatus");
+    $("#clusterStatusIcon").removeClass("errorStatus");
+    $("#clusterStatusIcon").removeClass("warningStatus");
+  }
+
+  $('#clusterName').html(data.clusterName);
+  $('#clusterTotalMembersText').html(data.totalMembers);
+  $('#clusterServersText').html(data.servers);
+  $('#clusterClientsText').html(data.clients);
+  $('#clusterLocatorsText').html(data.locators);
+  $('#clusterTotalRegionsText').html(data.totalRegions);
+  $('#clusterTotalHeap').html(data.totalHeap);
+  $('#clusterFunctions').html(data.functions);
+  $('#clusterUniqueCQs').html(data.uniqueCQs);
+  $('#clusterSubscriptionsText').html(data.subscriptions);
+  $('#userName').html(data.userName);
+
+};
+
+/**
+ * function to sort array based on
+ *  string property
+ */
+var sortedArray =  function dynamicSort(property) { 
+	return function (obj1,obj2) {
+        return obj1[property] > obj2[property] ? 1
+            : obj1[property] < obj2[property] ? -1 : 0;
+    } 
+}
+
+/**
+ * For SQLfire, handler for ClusterDetails service
+ * function used for getting the response of Cluster Basic Details and wired
+ * them with HTML representing tags.
+ */
+var getClusterDetailsSQLfireBack = function(data) {
+
+  if (severAlerts.length > 0) { // Severe
+    $('#clusterStatusText').html("Severe");
+    $("#clusterStatusIcon").addClass("severeStatus");
+  } else if (errorAlerts.length > 0) { // Error
+    $('#clusterStatusText').html("Error");
+    $("#clusterStatusIcon").addClass("errorStatus");
+    $("#clusterStatusIcon").removeClass("severeStatus");
+  } else if (warningAlerts.length > 0) { // Warning
+    $('#clusterStatusText').html("Warning");
+    $("#clusterStatusIcon").addClass("warningStatus");
+    $("#clusterStatusIcon").removeClass("severeStatus");
+    $("#clusterStatusIcon").removeClass("errorStatus");
+  } else { // Normal
+    $('#clusterStatusText').html("Normal");
+    $("#clusterStatusIcon").addClass("normalStatus");
+    $("#clusterStatusIcon").removeClass("severeStatus");
+    $("#clusterStatusIcon").removeClass("errorStatus");
+    $("#clusterStatusIcon").removeClass("warningStatus");
+  }
+
+  $('#clusterName').html(data.clusterName);
+  $('#clusterTotalMembersText').html(data.totalMembers);
+  $('#clusterServersText').html(data.servers);
+  $('#clusterClientsText').html(data.clients);
+  $('#clusterLocatorsText').html(data.locators);
+  $('#clusterTotalRegionsText').html(data.totalRegions);
+  $('#clusterTotalHeap').html(data.totalHeap);
+  $('#clusterFunctions').html(data.functions);
+  $('#clusterTxnCommittedText').html(data.txnCommitted);
+  $('#clusterTxnRollbackText').html(data.txnRollback);
+  $('#userName').html(data.userName);
+
+};
+
+/**
+ * Default handler for ClusterKeyStatistics service,
+ * function used for getting the response of Cluster Key Statistics widget and wired
+ * them with HTML representing tags.
+ */
+var getClusterKeyStatisticsBack = null;
+
+/**
+ * For Gemfire, handler for ClusterKeyStatistics service 
+ * function used for getting the response of Cluster Key Statistics widget and
+ * wired them with HTML representing tags.
+ */
+var getClusterKeyStatisticsGemfireBack = function(data) {
+
+  // sparkline graph options
+  var sparklineOptions = {
+    width : '300px',
+    height : '20px',
+    lineColor : '#00CCFF',
+    fillColor : false,
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false
+  };
+
+  var writePerSecTrend = data.writePerSecTrend;
+  var readPerSecTrend = data.readPerSecTrend;
+  var queriesPerSecTrend = data.queriesPerSecTrend;
+
+  var sumWrites = 0;
+  for ( var i = 0; i < writePerSecTrend.length; i++) {
+    sumWrites += writePerSecTrend[i];
+  }
+
+  var avgWrites = 0;
+  if (writePerSecTrend.length > 0) {
+    avgWrites = sumWrites / writePerSecTrend.length;
+  }
+
+  var sumReads = 0;
+  for ( var i = 0; i < readPerSecTrend.length; i++) {
+    sumReads += readPerSecTrend[i];
+  }
+
+  var avgReads = 0;
+  if (readPerSecTrend.length > 0) {
+    avgReads = sumReads / readPerSecTrend.length;
+  }
+
+  var sumQueries = 0;
+  for ( var i = 0; i < queriesPerSecTrend.length; i++) {
+    sumQueries += queriesPerSecTrend[i];
+  }
+
+  var avgQueries = 0;
+  if (queriesPerSecTrend.length > 0) {
+    avgQueries = sumQueries / queriesPerSecTrend.length;
+  }
+  // write per sec
+  $('#writePerSec').html(applyNotApplicableCheck(avgWrites.toFixed(2)));
+  $('#writePerSecSparkLine').sparkline(writePerSecTrend, sparklineOptions);
+
+  // read per second
+  $('#readPerSec').html(applyNotApplicableCheck(avgReads.toFixed(2)));
+  $('#readPerSecSparkLine').sparkline(readPerSecTrend, sparklineOptions);
+
+  // queries per sec
+  $('#queriesPerSec').html(avgQueries.toFixed(2));
+  $('#queriesPerSecSparkLine').sparkline(queriesPerSecTrend, sparklineOptions);
+};
+
+/**
+ * For SQLfire, handler for ClusterKeyStatistics service
+ * function used for getting the response of Cluster Key Statistics widget and
+ * wired them with HTML representing tags.
+ */
+var getClusterKeyStatisticsSQLfireBack = function(data) {
+
+  // sparkline graph options
+  var sparklineOptions = {
+    width : '300px',
+    height : '20px',
+    lineColor : '#00CCFF',
+    fillColor : false,
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false
+  };
+
+  var writePerSecTrend = data.writePerSecTrend;
+  var readPerSecTrend = data.readPerSecTrend;
+  var queriesPerSecTrend = data.queriesPerSecTrend;
+
+  var sumWrites = 0;
+  for ( var i = 0; i < writePerSecTrend.length; i++) {
+    sumWrites += writePerSecTrend[i];
+  }
+
+  var avgWrites = 0;
+  if (writePerSecTrend.length > 0) {
+    avgWrites = sumWrites / writePerSecTrend.length;
+  }
+
+  var sumReads = 0;
+  for ( var i = 0; i < readPerSecTrend.length; i++) {
+    sumReads += readPerSecTrend[i];
+  }
+
+  var avgReads = 0;
+  if (readPerSecTrend.length > 0) {
+    avgReads = sumReads / readPerSecTrend.length;
+  }
+
+  var sumQueries = 0;
+  for ( var i = 0; i < queriesPerSecTrend.length; i++) {
+    sumQueries += queriesPerSecTrend[i];
+  }
+
+  var avgQueries = 0;
+  if (queriesPerSecTrend.length > 0) {
+    avgQueries = sumQueries / queriesPerSecTrend.length;
+  }
+  // write per sec
+  $('#writePerSec').html(applyNotApplicableCheck(avgWrites.toFixed(2)));
+  $('#writePerSecSparkLine').sparkline(writePerSecTrend, sparklineOptions);
+
+  // read per second
+  $('#readPerSec').html(applyNotApplicableCheck(avgReads.toFixed(2)));
+  $('#readPerSecSparkLine').sparkline(readPerSecTrend, sparklineOptions);
+};
+
+/**
+ * function used for getting the response of Cluster WAN Info widget and wired
+ * them with HTML representing tags.
+ */
+var getClusterWANInfoBack = function(data) {
+  var clusterList = data.connectedClusters;
+  var htmlList = "";
+  if (clusterList.length > 0) {
+    $('#wanInfoWidget').show();
+    for ( var i = 0; i < clusterList.length; i++) {
+      if (clusterList[i].status == true) {
+        htmlList += '<div class="statusUpDowmBlock statusUp">' + "Cluster_"
+            + clusterList[i].name + '</div>';
+      } else {
+        htmlList += '<div class="statusUpDowmBlock statusDown">' + "Cluster_"
+            + clusterList[i].name + '</div>';
+      }
+    }
+    $('#wanInfoList').html(htmlList);
+    $('.scroll-pane_1').jScrollPane();
+  } else {
+    $('#wanInfoWidget').hide();
+  }
+};
+
+/**
+ * function used for getting the response of Cluster Memory Usage widget and
+ * wired them with HTML representing tags.
+ */
+var getClusterMemoryUsageBack = function(data) {
+
+  var memoryUsageTrend = [];
+  memoryUsageTrend = data.memoryUsageTrend;
+
+  var sumMemory = 0;
+  for ( var i = 0; i < memoryUsageTrend.length; i++) {
+    sumMemory += memoryUsageTrend[i];
+  }
+
+  var avgMemory = 0;
+  if (memoryUsageTrend.length > 0) {
+    avgMemory = sumMemory / memoryUsageTrend.length;
+  }
+
+  var sparklineOptions = {
+    width : '230px',
+    height : '72px',
+    lineColor : '#FAB948',
+    fillColor : false,
+    spotRadius : 2.5,
+    labelPosition : 'left',
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false,
+    lineWidth : 2
+  };
+
+  $('#memoryUsage').sparkline(memoryUsageTrend, sparklineOptions);
+  // checking if currentMemoryUsage > 1024 then show the result in GB else
+  // show the result in MB
+  if (data.currentMemoryUsage > 1024) {
+    var memoryUsageGB = (avgMemory / 1024).toFixed(2);
+    $('#currentMemoryUsage').html(memoryUsageGB);
+    $('#memoryUsageMB').html("GB");
+
+  } else {
+    $('#currentMemoryUsage').html(applyNotApplicableCheck(avgMemory.toFixed(2)));
+    $('#memoryUsageMB').html("MB");
+  }
+
+};
+
+/**
+ * function used for getting the response of Cluster GCPauses widget and wired
+ * them with HTML representing tags.
+ */
+var getClusterJVMPausesBack = function(data) {
+
+  var gCPausesTrend = [];
+  gCPausesTrend = data.gCPausesTrend;
+
+  var sparklineOptions = {
+    width : '230px',
+    height : '72px',
+    lineColor : '#FAB948',
+    fillColor : false,
+    spotRadius : 2.5,
+    labelPosition : 'left',
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false,
+    lineWidth : 2
+  };
+
+  var sumOfPauses = 0;
+  for ( var i = 0; i < gCPausesTrend.length; i++) {
+    sumOfPauses += gCPausesTrend[i];
+  }
+
+  $('#gcPauses').sparkline(gCPausesTrend, sparklineOptions);
+  $('#currentGCPauses').html(sumOfPauses);
+};
+
+/**
+ * function used for getting the response of Cluster ThroughputWrites widget and
+ * wired them with HTML representing tags.
+ */
+var getClusterDiskThroughputBack = function(data) {
+
+  var throughputReads = data.throughputReads;
+  var throughputWrites = data.throughputWrites;
+
+  var readsSum = 0;
+  for ( var i = 0; i < throughputReads.length; i++) {
+    readsSum += throughputReads[i];
+  }
+
+  var avgThroughputReads = 0;
+  if (throughputReads.length > 0) {
+    avgThroughputReads = readsSum / throughputReads.length;
+  }
+
+  var writesSum = 0;
+  for ( var i = 0; i < throughputWrites.length; i++) {
+    writesSum += throughputWrites[i];
+  }
+
+  var avgThroughputWrites = 0;
+  if (throughputWrites.length > 0) {
+    avgThroughputWrites = writesSum / throughputWrites.length;
+  }
+
+  var sparklineOptions = {
+    width : '230px',
+    height : '72px',
+    lineColor : '#FAB948',
+    lineWidth : 2,
+    fillColor : false,
+    spotRadius : 3,
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false,
+    highlightSpotColor : false,
+    composite : false
+  };
+
+  // Reads trends
+  $('#diskReadsThroughputTrend').sparkline(throughputReads, sparklineOptions);
+  $('#diskReadsThroughput').html(applyNotApplicableCheck(avgThroughputReads.toFixed(2)));
+
+  // Writes trends
+  sparklineOptions.lineColor = '#2e84bb';
+  $('#diskWritesThroughputTrend').sparkline(throughputWrites, sparklineOptions);
+  $('#diskWritesThroughput').html(applyNotApplicableCheck(avgThroughputWrites.toFixed(2)));
+};
+
+/**
+ * function used for getting the response of Member Clients widget and wired
+ * them with HTML representing tags.
+ */
+var getMemberClientsBack = function(data) {
+  $('#memberClientsList').jqGrid('clearGridData');
+  var clients = data.memberClients;
+  if (clients.length > 0) {
+    $('#memberClientsWidget').show();
+    for ( var i = 0; i < clients.length; i++) {
+      var clientData = clients[i];
+      $('#memberClientsList').jqGrid('addRowData', i + 1, clientData);
+    }
+
+    var gridUserData = jQuery("#memberClientsList").getGridParam('userData');
+
+    // Apply sort order ans sort columns on updated jqgrid data
+    jQuery("#memberClientsList").jqGrid('setGridParam', {
+      sortname : gridUserData.sortColName,
+      sortorder : gridUserData.sortOrder
+    });
+    // Reload jqgrid
+    jQuery("#memberClientsList").trigger("reloadGrid");
+
+  } else {
+    $('#memberClientsWidget').hide();
+  }
+};
+
+/**
+ * function used for getting the response of Member Basic Details widget and wired
+ * them with HTML representing tags.
+ */
+var getMemberDetailsBack = function(data) {
+
+  // check if data for member is available or not
+  if (data.errorOnMember != undefined && data.errorOnMember != null
+      && $.trim(data.errorOnMember) != "") {
+
+    // Display error message
+    var message = data.errorOnMember;
+    message += "<div class=\"clear\"></div>"
+               + "<a onclick=\"openClusterDetail();\" href=\"#.\" >" 
+               + "Go To Cluster View</a>";
+    $('#connectionErrorMsgDiv').html(message);
+    $('#connectionStatusDiv').show();
+    return;
+  }
+
+  $('#userName').html(data.userName);
+  $('#clusterNameLink').html(data.clusterName);
+  $('#memberName').html(data.name);
+  $('#memberName').prop('title', data.name);
+  $('#memberRegionsCount').html(data.regionsCount);
+  $('#loadAverage').html(applyNotApplicableCheck(data.loadAverage));
+  $('#sockets').html(applyNotApplicableCheck(data.sockets));
+  $('#threads').html(data.threads);
+
+  // off heap free size
+  var offHeapFreeSize = convertBytesToMBorGB(data.offHeapFreeSize);
+  $('#offHeapFreeSize').html(offHeapFreeSize[0]+" "+offHeapFreeSize[1]);
+
+  // off heap used size
+  var offHeapUsedSize = convertBytesToMBorGB(data.offHeapUsedSize);
+  $('#offHeapUsedSize').html(offHeapUsedSize[0]+" "+offHeapUsedSize[1]);
+
+  $('#numClients').html(data.numClients);
+  
+  // setting member status according to notification alert
+  $('#memberStatus').html(data.status);
+  if (data.status == "Severe") { // Severes
+    if ($("#memberStatusIcon").hasClass("normalStatus"))
+      $("#memberStatusIcon").removeClass("normalStatus");
+    if ($("#memberStatusIcon").hasClass("errorStatus"))
+      $("#memberStatusIcon").removeClass("errorStatus");
+    if ($("#memberStatusIcon").hasClass("warningStatus"))
+      $("#memberStatusIcon").removeClass("warningStatus");
+
+    $('#memberStatus').html("Severe");
+    $("#memberStatusIcon").addClass("severeStatus");
+
+  } else if (data.status == "Error") { // Error
+
+    if ($("#memberStatusIcon").hasClass("normalStatus")) {
+      $("#memberStatusIcon").removeClass("normalStatus");
+    }
+    if ($("#memberStatusIcon").hasClass("warningStatus")) {
+      $("#memberStatusIcon").removeClass("warningStatus");
+    }
+    $("#memberStatusIcon").addClass("errorStatus");
+    $('#memberStatus').html("Error");
+  } else if (data.status == "Warning") { // Warning
+
+    if ($("#memberStatusIcon").hasClass("normalStatus")) {
+      $("#memberStatusIcon").removeClass("normalStatus");
+    }
+    if ($("#memberStatusIcon").hasClass("errorStatus")) {
+      $("#memberStatusIcon").removeClass("errorStatus");
+    }
+    if ($("#memberStatusIcon").hasClass("severeStatus")) {
+      $("#memberStatusIcon").removeClass("severeStatus");
+    }
+    $('#memberStatus').html("Warning");
+    $("#memberStatusIcon").addClass("warningStatus");
+  } else { // Normal
+
+    if ($("#memberStatusIcon").hasClass("severeStatus"))
+      $("#memberStatusIcon").removeClass("severeStatus");
+    if ($("#memberStatusIcon").hasClass("errorStatus"))
+      $("#memberStatusIcon").removeClass("errorStatus");
+    if ($("#memberStatusIcon").hasClass("warningStatus"))
+      $("#memberStatusIcon").removeClass("warningStatus");
+    $('#memberStatus').html("Normal");
+    $("#memberStatusIcon").addClass("normalStatus");
+  }
+  
+};
+
+/**
+ * function used for getting the response of Member KeyStatistics widget and
+ * wired them with HTML representing tags.
+ */
+var getMemberKeyStatisticsBack = function(data) {
+  // sparkline graph options
+  var sparklineOptions = {
+    width : '300px',
+    height : '20px',
+    lineColor : '#00CCFF',
+    fillColor : false,
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false
+  };
+
+  // cpu usage
+  var sumCPUUsage = 0;
+  var cpuUsageTrend = data.cpuUsageTrend;
+
+  for ( var i = 0; i < cpuUsageTrend.length; i++) {
+    sumCPUUsage += cpuUsageTrend[i];
+  }
+
+  var avgCPUUsage = 0;
+  if (cpuUsageTrend.length > 0) {
+    avgCPUUsage = sumCPUUsage / cpuUsageTrend.length;
+  }
+
+  $('#memberCPUUsageValue').html(avgCPUUsage.toFixed(2));
+  $('#memberCPUUsageSparkLine').sparkline(data.cpuUsageTrend, sparklineOptions);
+
+  // gets per sec
+  var readPerSecTrend = data.readPerSecTrend;
+  var sumReads = 0;
+  for ( var i = 0; i < readPerSecTrend.length; i++) {
+    sumReads += readPerSecTrend[i];
+  }
+
+  var avgReads = 0;
+  if (readPerSecTrend.length > 0) {
+    avgReads = sumReads / readPerSecTrend.length;
+  }
+
+  $('#memberGetsPerSecValue').html(applyNotApplicableCheck(avgReads.toFixed(2)));
+  $('#memberGetsPerSecSparkLine').sparkline(data.readPerSecTrend,
+      sparklineOptions);
+
+  // puts per sec
+  var writePerSecTrend = data.writePerSecTrend;
+  var sumWrites = 0;
+  for ( var i = 0; i < writePerSecTrend.length; i++) {
+    sumWrites += writePerSecTrend[i];
+  }
+
+  var avgWrites = 0;
+  if (writePerSecTrend.length > 0) {
+    avgWrites = sumWrites / writePerSecTrend.length;
+  }
+
+  $('#memberPutsPerSecValue').html(applyNotApplicableCheck(avgWrites.toFixed(2)));
+  $('#memberPutsPerSecSparkLineBar').sparkline(data.writePerSecTrend,
+      sparklineOptions);
+};
+
+/**
+ * function used for getting the response of Member GCPauses widget and wired
+ * them with HTML representing tags.
+ */
+var getMemberGCPausesBack = function(data) {
+
+  gcPausesTrend = data.gcPausesTrend;
+
+  var sparklineOptions = {
+    width : '230px',
+    height : '72px',
+    lineColor : '#FAB948',
+    fillColor : false,
+    spotRadius : 2.5,
+    labelPosition : 'left',
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false,
+    lineWidth : 2
+  };
+
+  var sumOfPauses = 0;
+  for ( var i = 0; i < gcPausesTrend.length; i++) {
+    sumOfPauses += gcPausesTrend[i];
+  }
+
+  $('#memberGCPauses').sparkline(gcPausesTrend, sparklineOptions);
+  $('#memberGcPausesAvg').html(sumOfPauses);
+};
+
+/**
+ * function used for getting the response of Member HeapUsage widget and wired
+ * them with HTML representing tags.
+ */
+var getMemberHeapUsageBack = function(data) {
+  var heapUsageTrend = [];
+  heapUsageTrend = data.heapUsageTrend;
+  var sumMemory = 0;
+  for ( var i = 0; i < heapUsageTrend.length; i++) {
+    sumMemory += heapUsageTrend[i];
+  }
+
+  var avgMemory = 0;
+  if (heapUsageTrend.length > 0) {
+    avgMemory = sumMemory / heapUsageTrend.length;
+  }
+
+  var sparklineOptions = {
+    width : '230px',
+    height : '72px',
+    lineColor : '#FAB948',
+    fillColor : false,
+    spotRadius : 2.5,
+    labelPosition : 'left',
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false,
+    lineWidth : 2
+  };
+
+  $('#memberHeapUsage').sparkline(heapUsageTrend, sparklineOptions);
+  // set current value
+  if (avgMemory > 1024) {
+    var heapUsageGB = (avgMemory / 1024).toFixed(2);
+    $('#memberHeapUsageAvg').html(
+        heapUsageGB + ' <span class="font-size23 paddingL5">GB</span>');
+
+  } else {
+    $('#memberHeapUsageAvg')
+        .html(
+            applyNotApplicableCheck(avgMemory.toFixed(2))
+                + ' <span class="font-size23 paddingL5">MB</span>');
+  }
+};
+
+/**
+ * function used for getting the response of Member TroughputWrites widget and
+ * wired them with HTML representing tags.
+ */
+var getMemberDiskThroughputBack = function(data) {
+  var throughputReadsTrend = data.throughputReadsTrend;
+  var throughputWritesTrend = data.throughputWritesTrend;
+
+  var readsSum = 0;
+  for ( var i = 0; i < throughputReadsTrend.length; i++) {
+    readsSum += throughputReadsTrend[i];
+  }
+
+  var avgThroughputReads = 0;
+  if (throughputReadsTrend.length > 0) {
+    avgThroughputReads = readsSum / throughputReadsTrend.length;
+  }
+
+  var writesSum = 0;
+  for ( var i = 0; i < throughputWritesTrend.length; i++) {
+    writesSum += throughputWritesTrend[i];
+  }
+
+  var avgThroughputWrites = 0;
+  if (throughputWritesTrend.length > 0) {
+    avgThroughputWrites = writesSum / throughputWritesTrend.length;
+  }
+
+  var sparklineOptions = {
+    width : '230px',
+    height : '72px',
+    lineColor : '#FAB948',
+    lineWidth : 2,
+    fillColor : false,
+    spotRadius : 3,
+    spotColor : false,
+    minSpotColor : false,
+    maxSpotColor : false,
+    highlightSpotColor : false,
+    composite : false
+  };
+
+  // Reads trends
+  // sparklineOptions.lineColor = '#87b025';
+  $('#diskReadsThroughputTrend').sparkline(throughputReadsTrend,
+      sparklineOptions);
+  $('#diskReadsThroughput').html(applyNotApplicableCheck(avgThroughputReads.toFixed(2)));
+
+  // Writes trends
+  sparklineOptions.lineColor = '#2e84bb';
+  $('#diskWritesThroughputTrend').sparkline(throughputWritesTrend,
+      sparklineOptions);
+  $('#diskWritesThroughput').html(applyNotApplicableCheck(avgThroughputWrites.toFixed(2)));
+
+};
+
+/**
+ * function used for getting the response of Member GatewayHub widget and wired
+ * them with HTML representing tags.
+ */
+var getMemberGatewayHubBack = function(data) {
+
+  var gatewayDetails = data;
+
+  if ((!data.isGatewayReceiver) && (!data.isGatewaySender)) {
+    // hide widget
+    $('#MemberGatewayHubWidget').hide();
+    return;
+  } else {
+    // show widget
+    $('#MemberGatewayHubWidget').show();
+  }
+
+  if (data.isGatewayReceiver) {
+    if (data.listeningPort != undefined && data.listeningPort != "") {
+      $('#receiverListeningPort').html(data.listeningPort);
+    } else {
+      $('#receiverListeningPort').html('-');
+    }
+
+    if (data.linkTroughput != undefined) {
+      $('#receiverLinkThroughput').html(data.linkTroughput.toFixed(1));
+    } else {
+      $('#receiverLinkThroughput').html('-');
+    }
+
+    if (data.avgBatchLatency != undefined ) {
+      $('#receiverAvgBatchLatency').html(
+          data.avgBatchLatency
+              + ' <span class="font-size13 paddingL5">ms</span>');
+    } else {
+      $('#receiverAvgBatchLatency').html('-');
+    }
+  } else {
+    $('#receiverListeningPort').html('-');
+    $('#receiverLinkThroughput').html('-');
+    $('#receiverAvgBatchLatency').html('-');
+  }
+
+  if (data.isGatewaySender) {
+
+    var endPoints = gatewayDetails.gatewaySenders;
+    var htmlListEndPoints = "";
+
+    endPoints = endPoints.sort(sortedArray('id'));
+
+    for ( var i = 0; i < endPoints.length; i++) {
+      htmlListEndPoints += '<div>'
+          + '<span class="pointDetailsPaddingMember pointC1" title="'
+          + endPoints[i].id + '">' + endPoints[i].id + '</span>'
+          + '<span class="pointDetailsPaddingMember pointC2" title="'
+          + endPoints[i].queueSize + '">' + endPoints[i].queueSize + '</span>';
+      if (endPoints[i].status == true) {
+        htmlListEndPoints += '<span class="pointDetailsPaddingMember pointC3" title="Running"><img src="images/status-up.png"></span>';
+      } else if (endPoints[i].status == false) {
+        htmlListEndPoints += '<span class="pointDetailsPaddingMember pointC3" title="Not Running"><img src="images/status-down.png"></span>';
+      }
+      htmlListEndPoints += '</div>';
+    }
+    $('#gatewaySendersList').html(htmlListEndPoints);
+    if(endPoints.length == 0){
+      $('#idGatewaySenderMoreDetailsLink').hide();
+    }
+
+    var regionList = gatewayDetails.regionsInvolved;
+    var htmlListRegions = "";
+    for ( var i = 0; i < regionList.length; i++) {
+      htmlListRegions += '<div> <span class="pointDetailsPaddingMember pointC1-2">'
+          + regionList[i].name
+          + '</span><span class="pointDetailsPaddingMember pointC3"></div>';
+    }
+    $('#regionInvolvedList').html(htmlListRegions);
+    
+    // initialize for the popup
+    gatewaysenderEndpoints = gatewayDetails.gatewaySenders;
+
+    $('.pointGridData').jScrollPane();
+    $('#idGatewaySenderMoreDetailsLink').show();
+  } else {
+    $('#idGatewaySenderMoreDetailsLink').hide();
+  }
+};
+
+/**
+ * function used for getting the response of Member Asynch Event Queues widget and wired
+ * them with HTML representing tags.
+ */
+var getMemberAsynchEventQueuesBack = function(data) {
+
+  if (!data.isAsyncEventQueuesPresent) {
+    // hide widget
+    $('#MemberAsynchEventQueuesWidget').hide();
+    return;
+  } else {
+    // show widget
+    $('#MemberAsynchEventQueuesWidget').show();
+  }
+
+  asyncEventQueueData = data.asyncEventQueues;
+  asyncEventQueueData = asyncEventQueueData.sort(sortedArray('id'));
+  if (asyncEventQueueData.length > 0){
+      var htmlListQueues = "";
+    
+      for ( var i = 0; i < asyncEventQueueData.length; i++) {
+        htmlListQueues += '<div>'
+            + '<span class="pointDetailsPaddingMember pointC1" title="'
+            + asyncEventQueueData[i].id + '">' + asyncEventQueueData[i].id + '</span>'
+            + '<span class="pointDetailsPaddingMember pointC2" title="'
+            + asyncEventQueueData[i].queueSize + '">' + asyncEventQueueData[i].queueSize + '</span>';
+
+        if (asyncEventQueueData[i].primary == true) {
+          htmlListQueues += '<span class="pointDetailsPaddingMember pointC3" title="Primary">Primary</span>';
+        } else if (asyncEventQueueData[i].primary == false) {
+          htmlListQueues += '<span class="pointDetailsPaddingMember pointC3" title="Not Primary">Secondary</span>';
+        }
+        
+        htmlListQueues += '</div>';
+      }
+      
+      $('#asynchList').html(htmlListQueues);
+      $('.pointGridData').jScrollPane();
+      $('#idAsynchMoreDetailsLink').show();
+  } else {
+    $('#idAsynchMoreDetailsLink').hide();
+  }
+};
+
+var getClearAllAlertsBack = function(data) {
+  numTotalSeverAlerts = 0;
+  numTotalErrorAlerts = 0;
+  numTotalWarningAlerts = 0;
+
+  severAlerts.splice(0, severAlerts.length);
+  errorAlerts.splice(0, errorAlerts.length);
+  warningAlerts.splice(0, warningAlerts.length);
+
+  document.getElementById("severeList").innerHTML = "";
+  document.getElementById("severeTotalCount").innerHTML = "";
+  document.getElementById("severeTotalCount").innerHTML = "0";
+
+  document.getElementById("errorList").innerHTML = "";
+  document.getElementById("errorTotalCount").innerHTML = "";
+  document.getElementById("errorTotalCount").innerHTML = "0";
+
+  document.getElementById("warningList").innerHTML = "";
+  document.getElementById("warningTotalCount").innerHTML = "";
+  document.getElementById("warningTotalCount").innerHTML = "0";
+
+  document.getElementById("allAlertList").innerHTML = "";
+  document.getElementById("allAlertCount").innerHTML = "";
+  document.getElementById("allAlertCount").innerHTML = "0";
+
+  // Hide Load More
+  $('#containerLoadMoreAlertsLink').hide();
+
+  // update dashboard stats
+  displayClusterStatus();
+
+  if (!(document.getElementById("memberStatusIcon") == null)) {
+    $('#memberStatus').html("Normal");
+    $("#memberStatusIcon").addClass("normalStatus");
+
+    if ($("#memberStatusIcon").hasClass("severeStatus"))
+      $("#memberStatusIcon").removeClass("severeStatus");
+    if ($("#memberStatusIcon").hasClass("errorStatus"))
+      $("#memberStatusIcon").removeClass("errorStatus");
+    if ($("#memberStatusIcon").hasClass("warningStatus"))
+      $("#memberStatusIcon").removeClass("warningStatus");
+  }
+  $("#allAlertScrollPane").addClass("hide-scroll-pane");
+};
+
+function getSystemAlertsBack(data) {
+  if (data.connectedFlag) {
+    $('#connectionStatusDiv').hide();
+  } else {
+    $('#connectionStatusDiv').show();
+    $('#connectionErrorMsgDiv').html(data.connectedErrorMsg);
+  }
+
+  $('#pageNumber').val(data.pageNumber);
+
+  // Update global alerts variables
+  severAlerts = new Array();
+  if(undefined != data.systemAlerts.severe){
+    severAlerts = data.systemAlerts.severe;
+  }
+
+  errorAlerts = new Array();
+  if(undefined != data.systemAlerts.errors){
+    errorAlerts = data.systemAlerts.errors;
+  }
+
+  warningAlerts = new Array();
+  if(undefined != data.systemAlerts.warnings){
+    warningAlerts = data.systemAlerts.warnings;
+  }
+
+  infoAlerts = new Array();
+  if(undefined != data.systemAlerts.info){
+    infoAlerts = data.systemAlerts.info;
+  }
+  
+  // Apply filter if text criteria is already specified by user on ui
+  applyFilterOnNotificationsList(currentActiveNotificationTab);
+  
+};
+
+/**
+ * function used for getting the response of Cluster R Graph widget and wired
+ * them with HTML representing tags.
+ */
+var getClusterMembersRGraphBack = function(data) {
+  // if member count is < 50 then make R-Graph as default view
+  if ("" == flagActiveTab && data.memberCount <= 50) {
+    openViewPanel('member', 'default','rgraph');
+  } else if ("" == flagActiveTab && data.memberCount > 50
+      && data.memberCount <= 100) { 
+    // if member count is > 50 and <=100 then make Tree map as default view
+    openViewPanel('member', 'default','treemap');
+  } else if ("" == flagActiveTab && data.memberCount > 100) { // if member
+    // count is > 100 then make grid as default view
+    openViewPanel('member', 'default','grid');
+  }
+
+  if (flagActiveTab == "MEM_R_GRAPH_DEF") // if
+  {
+    clusteRGraph.loadJSON(data.clustor);
+    clusteRGraph.compute('end');
+    if (vMode != 8)
+      refreshNodeAccAlerts();
+    clusteRGraph.refresh();
+  }
+};
+
+var getClusterMembersBack = function(data) {
+
+  gblClusterMembers = data.members;
+
+  memberCount = data.members.length;
+
+  if (flagActiveTab == "MEM_TREE_MAP_DEF") {
+    updateClusterMembersTreeMapDefault(data);
+  } else if (flagActiveTab == "MEM_TREE_MAP_SG") {
+    updateClusterMembersTreeMapSG(data);
+  } else if (flagActiveTab == "MEM_TREE_MAP_RZ") {
+    updateClusterMembersTreeMapRZ(data);
+  } else if (flagActiveTab == "MEM_GRID_DEF") {
+    updateClusterMembersGridDefault(data);
+  } else if (flagActiveTab == "MEM_GRID_SG") {
+    updateClusterMembersGridSG(data);
+  } else if (flagActiveTab == "MEM_GRID_RZ") {
+    updateClusterMembersGridRZ(data);
+  } else {
+    // Do Nothing
+  }
+};
+
+/**
+ * function used for getting the response of Cluster Member Default Tree Map 
+ * widget and wired them with HTML representing tags.
+ */
+var updateClusterMembersTreeMapDefault = function(data) {
+  var members = data.members;
+
+  var json = buildDefaultMembersTreeMapData(members);
+
+  clusterMemberTreeMap.loadJSON(json);
+  clusterMemberTreeMap.refresh();
+};
+
+/**
+ * function used for getting the response of Cluster Member Default Tree Map 
+ * widget and wired them with HTML representing tags.
+ */
+var updateClusterMembersTreeMapSG = function(data) {
+  var members = data.members;
+
+  var json = buildSGMembersTreeMapData(members);
+
+  clusterSGMemberTreeMap.loadJSON(json);
+  clusterSGMemberTreeMap.refresh();
+};
+
+/**
+ * function used for getting the response of Cluster Member Default Tree Map 
+ * widget and wired them with HTML representing tags.
+ */
+var updateClusterMembersTreeMapRZ = function(data) {
+  var members = data.members;
+
+  var json = buildRZMembersTreeMapData(members);
+
+  clusterRZMemberTreeMap.loadJSON(json);
+  clusterRZMemberTreeMap.refresh();
+};
+
+/**
+ * function used for getting the response of Cluster Member Default Tree Map 
+ * widget and wired them with HTML representing tags.
+ */
+var updateClusterRegionsTreeMapDefault = function(data) {
+  var regions = data.regions;
+
+  var json = buildRegionsTreeMapData(regions);
+
+  clusterRegionsTreeMap.loadJSON(json);
+  clusterRegionsTreeMap.refresh();
+};
+
+var updateClusterMembersGridDefault = function(data) {
+  var members = data.members;
+
+  memberCount = members.length;
+
+  $('#memberList').jqGrid('clearGridData');
+
+  for ( var i = 0; i < members.length; i++) {
+    var memberData = members[i];
+    $('#memberList').jqGrid('addRowData',
+        memberData.memberId + "&" + memberData.name, memberData);
+  }
+
+  var gridUserData = jQuery("#memberList").getGridParam('userData');
+
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#memberList").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  // Reload jqgrid
+  jQuery("#memberList").trigger("reloadGrid");
+
+  // apply scroll if grid container block is not minimized
+  if ($("#LargeBlock_1").css("display") != "none") {
+    $('.ui-jqgrid-bdiv').jScrollPane();
+  }
+};
+
+var updateClusterMembersGridSG = function(data) {
+  var members = buildSGMembersGridData(data.members);
+
+  $('#memberListSG').jqGrid('clearGridData');
+
+  for ( var i = 0; i < members.length; i++) {
+    var memberData = members[i];
+    $('#memberListSG').jqGrid('addRowData',
+        memberData.memberId + "&" + memberData.name, memberData);
+  }
+
+  var gridUserData = jQuery("#memberListSG").getGridParam('userData');
+
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#memberListSG").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  // Reload jqgrid
+  jQuery("#memberListSG").trigger("reloadGrid");
+
+  // apply scroll if grid container block is not minimized
+  if ($("#LargeBlock_1").css("display") != "none") {
+    $('.ui-jqgrid-bdiv').jScrollPane();
+  }
+};
+
+var updateClusterMembersGridRZ = function(data) {
+  var members = buildRZMembersGridData(data.members);
+
+  $('#memberListRZ').jqGrid('clearGridData');
+
+  for ( var i = 0; i < members.length; i++) {
+    var memberData = members[i];
+    $('#memberListRZ').jqGrid('addRowData',
+        memberData.memberId + "&" + memberData.name, memberData);
+  }
+
+  var gridUserData = jQuery("#memberListRZ").getGridParam('userData');
+
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#memberListRZ").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  // Reload jqgrid
+  jQuery("#memberListRZ").trigger("reloadGrid");
+
+  // apply scroll if grid container block is not minimized
+  if ($("#LargeBlock_1").css("display") != "none") {
+    $('.ui-jqgrid-bdiv').jScrollPane();
+  }
+};
+
+var updateClusterRegionsGridDefault = function(data) {
+  var regions = data.regions;
+
+  $('#regionsList').jqGrid('clearGridData');
+
+  for ( var i = 0; i < regions.length; i++) {
+    var regionData = regions[i];
+    $('#regionsList').jqGrid('addRowData',
+        regionData.id + "&" + regionData.name, regionData);
+  }
+
+  var gridUserData = jQuery("#regionsList").getGridParam('userData');
+
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#regionsList").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  // Reload jqgrid
+  jQuery("#regionsList").trigger("reloadGrid");
+
+  // apply scroll if grid container block is not minimized
+  if ($("#LargeBlock_1").css("display") != "none") {
+    $('.ui-jqgrid-bdiv').jScrollPane();
+  }
+};
+
+// function used for applying filter of cluster regions in data view screen
+var applyFilterOnClusterRegions = function() {
+  // console.log("applyFilterOnClusterRegions called");
+  var searchKeyword = extractFilterTextFrom("filterClusterRegionsBox");
+
+  if (searchKeyword != "") {
+    var filteredClusterRegions = new Array();
+    for ( var i = 0; i < clusterDataViewRegions.length; i++) {
+      // filtered list
+      if (clusterDataViewRegions[i].name.toLowerCase().indexOf(searchKeyword) !== -1) {
+        filteredClusterRegions.push(clusterDataViewRegions[i]);
+      }
+    }
+    updateDataViewDetails(filteredClusterRegions);
+  } else {
+    updateDataViewDetails(clusterDataViewRegions);
+  }
+};
+
+// update the cluster regions grid and treemap view on data view page
+function updateDataViewDetails(clusterRegions) {
+
+  $('#regionList').jqGrid('clearGridData');
+  jQuery("#regionList").trigger("reloadGrid");
+
+  // variable to store value of total of entry counts of all regions
+  var totalOfEntryCounts = 0;
+  // flag to determine if all regions are having entry count = 0
+  var flagSetEntryCountsToZero = false;
+
+  // Calculate the total of all regions entry counts
+  for ( var i = 0; i < clusterRegions.length; i++) {
+    totalOfEntryCounts += clusterRegions[i].entryCount;
+  }
+
+  // If totalOfEntryCounts is zero and at least one region is present
+  // then set flagSetEntryCountsToZero to avoid displaying circles
+  // in treemap as all valid regions are zero area regions and also display
+  // all regions with evenly placement of blocks
+  if (totalOfEntryCounts == 0 && clusterRegions.length > 0) {
+    flagSetEntryCountsToZero = true;
+  }
+
+  var childerensVal = [];
+  if (clusterRegions.length > 0) {
+
+    if (selectedDataViewTM == "") {
+      selectedDataViewTM = clusterRegions[0].regionPath;
+    } else {
+      // check selected region exists or not
+      // if selected region does not exists, set first region as selected
+      // region
+      var selectedRegionExists = false;
+      for ( var i = 0; i < clusterRegions.length; i++) {
+        if (selectedDataViewTM == clusterRegions[i].regionPath) {
+          selectedRegionExists = true;
+        }
+      }
+      if (!selectedRegionExists) {
+        selectedDataViewTM = clusterRegions[0].regionPath;
+      }
+    }
+
+    for ( var i = 0; i < clusterRegions.length; i++) {
+
+      $('#regionList').jqGrid('addRowData', i + 1, clusterRegions[i]);
+      var entryCount = clusterRegions[i].systemRegionEntryCount;
+      // If flagSetEntryCountsToZero is true then set entry count to
+      // display all
+      // regions with evenly placement of blocks
+      if (flagSetEntryCountsToZero && entryCount == 0) {
+        entryCount = 1;
+      }
+      var color = colorCodeForRegions;
+      if(clusterRegions[i].systemRegionEntryCount == 0){
+        color = colorCodeForZeroEntryCountRegions;
+      }
+
+      if (selectedDataViewTM == clusterRegions[i].regionPath)
+        color = colorCodeForSelectedRegion;
+
+      var wanEnabled = clusterRegions[i].wanEnabled;
+      var wanEnabledxt = "";
+      if (wanEnabled == true)
+        wanEnabledxt = "WAN Enabled";
+      // if (entryCount == 0)
+      // entryCount = 1;
+      var dataVal = {
+        "name" : clusterRegions[i].name,
+        "id" : clusterRegions[i].regionPath,
+        "$color" : color,
+        "$area" : entryCount,
+        "systemRegionEntryCount" : clusterRegions[i].systemRegionEntryCount,
+        "type" : clusterRegions[i].type,
+        "regionPath" : clusterRegions[i].regionPath,
+        "entrySize" : clusterRegions[i].entrySize,
+        "memberCount" : clusterRegions[i].memberCount,
+        "writes" : clusterRegions[i].putsRate,
+        "reads" : clusterRegions[i].getsRate,
+        "emptyNodes" : clusterRegions[i].emptyNodes,
+        "persistence" : clusterRegions[i].persistence,
+        "isEnableOffHeapMemory" : clusterRegions[i].isEnableOffHeapMemory,
+        "compressionCodec" : clusterRegions[i].compressionCodec,
+        "isHDFSWriteOnly" : clusterRegions[i].isHDFSWriteOnly,
+        "memberNames" : clusterRegions[i].memberNames,
+        "memoryWritesTrend" : clusterRegions[i].memoryWritesTrend,
+        "memoryReadsTrend" : clusterRegions[i].memoryReadsTrend,
+        "diskWritesTrend" : clusterRegions[i].diskWritesTrend,
+        "diskReadsTrend" : clusterRegions[i].diskReadsTrend,
+        "memoryUsage" : clusterRegions[i].memoryUsage,
+        "dataUsage" : clusterRegions[i].dataUsage,
+        "totalDataUsage" : clusterRegions[i].totalDataUsage,
+        "totalMemory" : clusterRegions[i].totalMemory
+      };
+      var childrenVal = {
+        "children" : [],
+        "data" : dataVal,
+        "id" : clusterRegions[i].regionPath,
+        "name" : wanEnabledxt
+      };
+      if (selectedDataViewTM == clusterRegions[i].regionPath)
+        displayRegionDetails(dataVal);
+      childerensVal[i] = childrenVal;
+    }
+
+  } else {
+    var dataVal = {
+      "name" : "",
+      "id" : "",
+      "$color" : "",
+      "$area" : 0,
+      "systemRegionEntryCount" : "",
+      "type" : "",
+      "regionPath" : "",
+      "entrySize" : "",
+      "memberCount" : "",
+      "writes" : "",
+      "reads" : "",
+      "emptyNodes" : "",
+      "persistence" : "",
+      "isEnableOffHeapMemory" : "",
+      "compressionCodec" : "",
+      "isHDFSWriteOnly" : "",
+      "memberNames" : "",
+      "memoryWritesTrend" : "",
+      "memoryReadsTrend" : "",
+      "diskWritesTrend" : "",
+      "diskReadsTrend" : "",
+      "memoryUsage" : 0,
+      "dataUsage" : "",
+      "totalDataUsage" : "",
+      "totalMemory" : 0
+    };
+    displayRegionDetails(dataVal);
+  }
+
+  var json = {
+    "children" : childerensVal,
+    "data" : {},
+    "id" : "root",
+    "name" : "Regions"
+  };
+
+  var gridUserData = jQuery("#regionList").getGridParam('userData');
+
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#regionList").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  // Reload jqgrid
+  jQuery("#regionList").trigger("reloadGrid");
+  $('.ui-jqgrid-bdiv').jScrollPane();
+
+  // Load treemap
+  dataViewRegionTM.loadJSON(json);
+  dataViewRegionTM.refresh();
+
+}
+
+// Callback function for ClusterRegion serice
+var getClusterRegionsBack = function(data) {
+  
+  if (flagActiveTab == "DATA_TREE_MAP_DEF") {
+    updateClusterRegionsTreeMapDefault(data);
+  } else if (flagActiveTab == "DATA_GRID_DEF") {
+    updateClusterRegionsGridDefault(data);
+  }
+  
+};
+
+//Callback function for ClusterRegion serice
+var getClusterRegionBack = function(data) {
+
+  $('#userName').html(data.userName);
+  document.getElementById("clusterName").innerHTML = data.clusterName;
+  clusterDataViewRegions = data.region;
+  // aaply filter and update data view details
+  applyFilterOnClusterRegions();
+};
+
+// function used for applying filter of member names in data view screen
+var applyFilterOnMembersList = function() {
+  var searchKeyword = extractFilterTextFrom('filterMembersListBox');
+  var htmlMemberListWithFilter = '';
+  if (searchKeyword != "") {
+    for ( var i = 0; i < memberList.length; i++) {
+      // filtered list
+      if (memberList[i].name.toLowerCase().indexOf(searchKeyword) !== -1) {
+        var divId = memberList[i].id + "&" + memberList[i].name;
+        htmlMemberListWithFilter += "<div class='pointDetailsPadding' title='"
+            + memberList[i].name + "' id='" + divId
+            + "' onClick = 'javascript:openMemberDetails(this.id)'>"
+            + memberList[i].name + "</div>";
+      }
+    }
+  } else {
+    for ( var i = 0; i < memberList.length; i++) {
+      // non filtered list
+      var divId = memberList[i].id + "&" + memberList[i].name;
+      htmlMemberListWithFilter += "<div class='pointDetailsPadding' title='"
+          + memberList[i].name + "' id='" + divId
+          + "' onClick = 'javascript:openMemberDetails(this.id)'>"
+          + memberList[i].name + "</div>";
+    }
+  }
+  document.getElementById("memberNames").innerHTML = htmlMemberListWithFilter;
+  $('.regionMembersSearchBlock').jScrollPane();
+};
+
+// function used for redirecting to member details page on click of any member
+// name from
+// the member names list.
+var openMemberDetails = function(divId) {
+  var member = divId.split("&");
+  location.href = 'MemberDetails.html?member=' + member[0] + '&memberName='
+      + member[1];
+};
+
+// function used for applying filter of member regions in member details page
+var applyFilterOnMemberRegions = function() {
+  // console.log("applyFilterOnMemberRegions called");
+  var searchKeyword = extractFilterTextFrom("filterMemberRegionsBox");
+
+  if (searchKeyword != "") {
+    var filteredMemberRegions = new Array();
+    for ( var i = 0; i < memberRegions.length; i++) {
+      // filtered list
+      if (memberRegions[i].name.toLowerCase().indexOf(searchKeyword) !== -1) {
+        filteredMemberRegions.push(memberRegions[i]);
+      }
+    }
+    updateMemberRegionViewDetails(filteredMemberRegions);
+  } else {
+    updateMemberRegionViewDetails(memberRegions);
+  }
+};
+
+// update the member regions grid and treemap view on members details page
+function updateMemberRegionViewDetails(regions) {
+
+  $('#memberRegionsList').jqGrid('clearGridData');
+  jQuery("#memberRegionsList").trigger("reloadGrid");
+
+  var childerensVal = [];
+
+  // variable to store value of total of entry counts of all regions
+  var totalOfEntryCounts = 0;
+  // flag to determine if all regions are having entry count = 0
+  var flagSetEntryCountsToZero = false;
+
+  // Calculate the total of all regions entry counts
+  for ( var i = 0; i < regions.length; i++) {
+    totalOfEntryCounts += regions[i].entryCount;
+  }
+
+  // If totalOfEntryCounts is zero and at least one region is present
+  // then set flagSetEntryCountsToZero to avoid displaying circles
+  // in treemap as all valid regions are zero area regions and also display
+  // all regions with evenly placement of blocks
+  if (totalOfEntryCounts == 0 && regions.length > 0) {
+    flagSetEntryCountsToZero = true;
+  }
+
+  for ( var i = 0; i < regions.length; i++) {
+    var regionData = regions[i];
+    $('#memberRegionsList').jqGrid('addRowData', i + 1, regionData);
+    var name = "";
+    name = regions[i].name;
+    var regionFullPath = regions[i].fullPath;
+    var entryCount = regions[i].entryCount;
+    // If flagSetEntryCountsToZero is true then set entry count to display
+    // all
+    // regions with evenly placement of blocks
+    if (flagSetEntryCountsToZero && entryCount == 0) {
+      entryCount = 1;
+    }
+    // if(entryCount == 0)
+    // entryCount = 1;
+
+    var colorCode = colorCodeForRegions;
+    if(regions[i].entryCount == 0){
+      colorCode = colorCodeForZeroEntryCountRegions;
+    }
+
+    var dataVal = {
+      "name" : name,
+      "id" : regionFullPath,
+      "$color" : colorCode,
+      "$area" : entryCount,
+      "regionType" : regions[i].type,
+      "entryCount" : regions[i].entryCount,
+      "entrySize" : regions[i].entrySize
+    };
+    var childrenVal = {
+      "children" : [],
+      "data" : dataVal,
+      "name" : name,
+      "id" : regionFullPath
+    };
+    childerensVal[i] = childrenVal;
+    
+  }
+
+  var gridUserData = jQuery("#memberRegionsList").getGridParam('userData');
+
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#memberRegionsList").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  
+  var gridHeight = 250;
+  // Adjust height of div and grid dynamically based on no of rows
+  if(regions.length > 10) {
+    gridHeight = 450;
+  }
+
+  jQuery("#memberRegionsList").jqGrid( 'setGridParam', {height : gridHeight} );
+  $("#gridBlocks_Panel").css('height', gridHeight + 54);
+
+  var gviewMemberRegionsListBDiv = $('#gview_memberRegionsList').children('.ui-jqgrid-bdiv');
+  gviewMemberRegionsListBDiv.css('height',gridHeight);
+
+  // Reload jqgrid
+  jQuery("#memberRegionsList").trigger("reloadGrid");
+  // apply scroll if grid container block is not minimized
+  if ($("#LargeBlock_1").css("display") != "none") {
+    $('.ui-jqgrid-bdiv').jScrollPane();
+  }
+
+  if (regions.length > 0) {
+    var json = {
+      "children" : childerensVal,
+      "data" : {},
+      "name" : "Regions",
+      "id" : "Root"
+    };
+
+    memberRegionsTreeMap.loadJSON(json);
+    memberRegionsTreeMap.refresh();
+  } else {
+    var json = {
+      "children" : [],
+      "data" : {},
+      "name" : "Regions",
+      "id" : "Root"
+    };
+    memberRegionsTreeMap.loadJSON(json);
+    memberRegionsTreeMap.refresh();
+  }
+
+}
+
+// Callback function for MemberRegions serice
+var getMemberRegionsBack = function(data) {
+
+  $('#memberRegionsList').jqGrid('clearGridData');
+
+  memberRegions = data.memberRegions;
+  // apply filter and update region details
+  applyFilterOnMemberRegions();
+};
+
+/**
+ * function used for getting the response of Members Name List widget and wired
+ * them with HTML representing tags.
+ */
+var getMembersListBack = function(data) {
+
+  // Update global list of cluster members
+  membersList = data.clusterMembers;
+
+  // update tabname
+  $('#clusterNameLink').html(data.clusterName);
+
+  // add filter functionality
+  if (!isMemberListFilterHandlerBound) {
+    $('#filterMembersBox').bind("keyup", applyFilterOnMembersListDropDown);
+    isMemberListFilterHandlerBound = true;
+  }
+
+  // apply filter criteria if exist
+  $('#filterMembersBox').keyup();
+
+};
+
+var getQueryStatisticsBack = function(data) {
+  
+  // each refresh display jmx connectiopn status
+  if (data.connectedFlag) {
+    $('#connectionStatusDiv').hide();
+  } else {
+    $('#connectionStatusDiv').show();
+    $('#connectionErrorMsgDiv').html(data.connectedErrorMsg);
+  }
+  
+  //load the data
+  $('#queryStatisticsList').jqGrid('clearGridData');
+  if (data.queriesList.length > 0) {
+
+    // load all queries
+    grid.jqGrid("getGridParam").data = data.queriesList;
+    
+    var gridUserData = jQuery("#queryStatisticsList").getGridParam('userData');
+    // Apply sort order ans sort columns on updated jqgrid data
+    jQuery("#queryStatisticsList").jqGrid('setGridParam', {
+      sortname : gridUserData.sortColName,
+      sortorder : gridUserData.sortOrder
+    });
+    
+    // Reload jqgrid
+    jQuery("#queryStatisticsList").trigger("reloadGrid");
+    var queryStatisticsList = $('#gview_queryStatisticsList');
+    var queryStatisticsListChild = queryStatisticsList
+        .children('.ui-jqgrid-bdiv');
+    var api = queryStatisticsListChild.data('jsp');
+    api.reinitialise();
+    
+    $('#queryStatisticsList').toggle();
+    refreshTheGrid($('#queryStatisticsList'));
+  }
+};
+
+//Callback function for ClusterSelectedRegion serice
+var getClusterSelectedRegionBack = function(data) {
+
+  $('#userName').html(data.userName);
+  $('#clusterName').html(data.clusterName);
+  $('#idClusterName').html(data.clusterName);
+  
+  var regionName = data.selectedRegion.name;
+  if(regionName){
+    // display details of regions
+    displaySelectedRegionDetails(regionName, data);
+  } else {
+    // check if region error is there and display it
+    if (data.selectedRegion.errorOnRegion != undefined && data.selectedRegion.errorOnRegion != null
+        && $.trim(data.selectedRegion.errorOnRegion) != "") {
+
+      // Display error message
+      var message = data.selectedRegion.errorOnRegion;
+      message += "<div class=\"clear\"></div>"
+                 + "<a onclick=\"openClusterDetail();\" href=\"#.\" >" 
+                 + "Go To Cluster View</a>";
+      $('#connectionErrorMsgDiv').html(message);
+      $('#connectionStatusDiv').show();
+      return;
+    }
+  }
+};
+
+var getClusterSelectedRegionsMemberBack = function(data) {
+  
+  regionMembers = data.selectedRegionsMembers;
+  applyFilterOnRegionMembers();
+
+};
+
+function updateClusterSelectedRegionMembers(regionOnMembers){
+  
+  //check if region error is there and display it
+  if (regionOnMembers.errorOnRegion != undefined 
+      && regionOnMembers.errorOnRegion != null
+      && $.trim(regionOnMembers.errorOnRegion) != "") {
+
+    // Display error message
+    var message = regionOnMembers.errorOnRegion;
+    message += "<div class=\"clear\"></div>"
+               + "<a onclick=\"openClusterDetail();\" href=\"#.\" >" 
+               + "Go To Cluster View</a>";
+    $('#connectionErrorMsgDiv').html(message);
+    $('#connectionStatusDiv').show();
+    return;
+  }
+
+  if(regionOnMembers){
+
+    // build members tree map
+    globalJson = buildMemberTreeMap(regionOnMembers);
+      
+    regionMemberTreeMap.loadJSON(globalJson);
+    regionMemberTreeMap.refresh();
+
+    updateSelectedRegionMembersGrid(regionOnMembers);
+
+    memberOnRegionJson = regionOnMembers;
+
+    if(tipObj != null){
+        var key = '';
+        var spo = {
+            width : '110px',
+            height : '50px',
+            lineColor : '#FAB948',
+            fillColor : false,
+            spotRadius : 2.5,
+            labelPosition : 'left',
+            spotColor : false,
+            minSpotColor : false,
+            maxSpotColor : false,
+            lineWidth : 2
+        };
+        
+        var memberName = tipObj.find('#idMemberName').html();
+        key = 'memberOnRegionJson.' + memberName + '.entryCount';
+        tipObj.find('#regionMemberEntryCount').html(eval(key));
+        key = 'memberOnRegionJson.' + memberName + '.entrySize';
+        tipObj.find('#regionMemberEntrySize').html(eval(key));
+        key = 'memberOnRegionJson.' + memberName + '.accessor';
+        tipObj.find('#regionMemberAccessor').html(eval(key));
+        
+        key = 'memberOnRegionJson.' + memberName + '.memoryReadsTrend';
+        tipObj.find('#memberMemoryReadsTrend').sparkline(eval(key),spo);
+        key = 'memberOnRegionJson.' + memberName + '.diskReadsTrend';
+        tipObj.find('#memberDiskReadsTrend').sparkline(eval(key),spo);
+        
+        // Writes trends
+        spo.lineColor = '#2e84bb';
+        key = 'memberOnRegionJson.' + memberName + '.diskWritesTrend';
+        tipObj.find('#memberDiskWritesTrend').sparkline(eval(key),spo);
+        key = 'memberOnRegionJson.' + memberName + '.memoryWritesTrend';
+        tipObj.find('#memberMemoryWritesTrend').sparkline(eval(key),spo);
+        
+        $.sparkline_display_visible(); 
+    }
+  }
+};
+
+function refreshTheGrid(gridDiv) {
+  setTimeout(function(){gridDiv.toggle();}, 500);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/PulseFunctions.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/PulseFunctions.js b/pulse/src/main/webapp/scripts/pulsescript/PulseFunctions.js
new file mode 100644
index 0000000..1ca170b
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/PulseFunctions.js
@@ -0,0 +1,216 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+/**
+ * @name PulseFunctions.js
+ * @author Ashutosh Zambare.
+ * @version 1.0
+ *
+ */
+
+/**
+  @class A thin JavaScript client that accesses the pulse services. It provides an abstraction layer to communicate with the system and returns json object as a result.
+
+  @constructor
+
+ */
+function PulseFunctions() {
+
+}
+
+/**
+ @description get pulse version function
+ @param responseBack Indicates which function to be called when a response is received. 
+ @example
+    var pulseVersionBack = function(r, jsonResponse) { ... // handle response };
+    pf.pulseVersion(pulseVersionBack, "param1", "param2");
+*/
+PulseFunctions.prototype.pulseVersion = function(responseBack) {
+    var po = new Object();
+    po.traceNo = UUIDv4();
+    ajaxPost("pulse/pulseVersion", po, responseBack);
+};
+
+PulseFunctions.prototype.CluserAlertNotificationFunc = function (funcName, postData) {
+  var qp = new Object();
+  qp.pageNumber = $('#pageNumber').val();
+  postData["SystemAlerts"] = qp;
+};
+
+PulseFunctions.prototype.ClusterKeyStatisticsFunc = function (funcName, postData) {
+  var qp = new Object();
+  //postData[funcName] = qp;
+  postData["ClusterKeyStatistics"] = qp;
+};
+
+PulseFunctions.prototype.ClusterMembersFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterMembers"] = qp;
+};
+
+PulseFunctions.prototype.ClusterJVMPAusesFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterJVMPauses"] = qp;
+};
+
+PulseFunctions.prototype.ClusterWanInformationFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterWANInfo"] = qp;
+};
+
+PulseFunctions.prototype.ClusterMemoryUsageFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterMemoryUsage"] = qp;
+};
+
+PulseFunctions.prototype.ClusterDiskThroughputFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterDiskThroughput"] = qp;
+};
+
+PulseFunctions.prototype.PulseVersionDetailsFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["PulseVersion"] = qp;
+
+};
+
+PulseFunctions.prototype.CluserBasicDetailsFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterDetails"] = qp;
+};
+
+
+PulseFunctions.prototype.ClusterMembersRGraphFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterMembersRGraph"] = qp;
+};
+
+PulseFunctions.prototype.ClusterRegionFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterRegion"] = qp;
+};
+
+PulseFunctions.prototype.ClusterRegionsFunc = function (funcName, postData) {
+  var qp = new Object();
+  postData["ClusterRegions"] = qp;
+};
+
+PulseFunctions.prototype.ClearAllAlertsFunc = function (funcName, postData) {
+  var qp = new Object();
+  qp.alertType = -1;
+  postData["ClearAllAlerts"] = qp;
+};
+
+PulseFunctions.prototype.MemberGatewayHubFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberGatewayHub"] = qp;
+};
+
+PulseFunctions.prototype.MemberAsynchEventQueuesFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberAsynchEventQueues"] = qp;
+};
+
+PulseFunctions.prototype.MemberDiskThroughputFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberDiskThroughput"] = qp;
+};
+
+PulseFunctions.prototype.MemberHeapUsageFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberHeapUsage"] = qp;
+};
+
+PulseFunctions.prototype.MemberClientsFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberClients"] = qp;
+};
+
+PulseFunctions.prototype.MemberRegionSummaryFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberRegions"] = qp;
+};
+
+PulseFunctions.prototype.MemberGCPausesFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberGCPauses"] = qp;
+};
+
+PulseFunctions.prototype.MemberKeyStatisticsFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberKeyStatistics"] = qp;
+};
+
+PulseFunctions.prototype.MembersListFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  postData["MembersList"] = qp;
+};
+
+PulseFunctions.prototype.MemberDetailsFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.memberId = memberId;
+  qp.memberName = memberName;
+  postData["MemberDetails"] = qp;
+};
+
+PulseFunctions.prototype.QueryStatisticsFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  // later send filter, page etc params here
+  //qp.memberId = memberId;
+  //qp.memberName = memberName;
+  postData["QueryStatistics"] = qp;
+};
+
+PulseFunctions.prototype.ClusterSelectedRegionFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.regionFullPath = regionFullPath;
+  postData["ClusterSelectedRegion"] = qp;
+};
+
+PulseFunctions.prototype.ClusterSelectedRegionsMemberFunc = function (funcName, postData) {
+  getRequestParams();
+  var qp = new Object();
+  qp.regionFullPath = regionFullPath;
+  postData["ClusterSelectedRegionsMember"] = qp;
+};
+
+/*
+PulseFunctions.prototype.ClusterMembersFunc = function (funcName, postData) {
+  var qp = new Object();
+  qp.param1 = "7777";
+  qp.param2 = 1;
+  postData["ClusterMembers"] = qp;
+};*/


[69/79] incubator-geode git commit: GEODE-306: support printing of off-heap compressed nodes

Posted by tu...@apache.org.
GEODE-306: support printing of off-heap compressed nodes

Before when a chunk of off-heap compressed memory tried to
get the type of the data stored in the chunk it needed to
decompress the data. Since it did not know what decompressor
to use it threw an UnsupportedOperationException.
Now for a compressed chunk it returns the DataType as either
a "compressed object of size xxx" or "compressed byte[xxx]".
It does not do a decompression.
Unit test coverage was added.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8ff01baa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8ff01baa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8ff01baa

Branch: refs/heads/feature/GEODE-17
Commit: 8ff01baa50917114c4fdc105ef43527f7e975f19
Parents: 208e9a1
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue Sep 1 16:40:43 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:52:44 2015 +0530

----------------------------------------------------------------------
 .../offheap/SimpleMemoryAllocatorImpl.java      |  8 +++-
 .../offheap/OffHeapValidationJUnitTest.java     | 45 +++++++++++++++-----
 2 files changed, 41 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff01baa/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
index 29319e0..7cf1656 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
@@ -3341,7 +3341,13 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
       }
       if (!isSerialized()) {
         // byte array
-        return "byte[" + ((Chunk)this.block).getDataSize() + "]";
+        if (isCompressed()) {
+          return "compressed byte[" + ((Chunk)this.block).getDataSize() + "]";
+        } else {
+          return "byte[" + ((Chunk)this.block).getDataSize() + "]";
+        }
+      } else if (isCompressed()) {
+        return "compressed object of size " + ((Chunk)this.block).getDataSize();
       }
       //Object obj = EntryEventImpl.deserialize(((Chunk)this.block).getRawBytes());
       byte[] bytes = ((Chunk)this.block).getRawBytes();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8ff01baa/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
index 7991872..1b40f2a 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
@@ -5,10 +5,13 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
+import java.io.IOException;
 import java.io.Serializable;
 import java.sql.Timestamp;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
@@ -33,9 +36,13 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.CacheFactory;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.compression.SnappyCompressor;
+import com.gemstone.gemfire.internal.HeapDataOutputStream;
+import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
@@ -87,7 +94,7 @@ public class OffHeapValidationJUnitTest {
   }
   
   @Test
-  public void testMemoryInspection() {
+  public void testMemoryInspection() throws IOException {
     // validate initial state
     MemoryAllocator allocator = this.cache.getOffHeapStore();
     assertNotNull(allocator);
@@ -113,6 +120,7 @@ public class OffHeapValidationJUnitTest {
     
     // create off-heap region
     Region<Object, Object> region = this.cache.createRegionFactory(getRegionShortcut()).setOffHeap(true).create(getRegionName());
+    Region<Object, Object> compressedRegion = this.cache.createRegionFactory(getRegionShortcut()).setOffHeap(true).setCompressor(SnappyCompressor.getDefaultInstance()).create(getRegionName()+"Compressed");
     
     // perform some ops
     List<ExpectedValues> expected = new ArrayList<ExpectedValues>();
@@ -120,8 +128,10 @@ public class OffHeapValidationJUnitTest {
     // Chunk.OFF_HEAP_HEADER_SIZE + 4 ?
     
     putString(region, expected);
+    putCompressedString(compressedRegion, expected);
     putDate(region, expected);
     putByteArray(region, expected);
+    putCompressedByteArray(compressedRegion, expected);
     putByteArrayArray(region, expected);
     putShortArray(region, expected);
     putStringArray(region, expected);
@@ -189,8 +199,11 @@ public class OffHeapValidationJUnitTest {
         assertTrue(obj instanceof String);
         assertEquals("this is a string", (String)obj);
       }
-      if (values.dataType.contains("[")) { //for (int j = 0; j < ((byte[])values.dataValue).length; j++) {
-        // TODO
+      if ((values.dataType.contains("byte [") && values.dataType.lastIndexOf('[') == values.dataType.indexOf('[')) || values.dataType.startsWith("compressed")) {
+        assertTrue("for dataType=" + values.dataType + " expected " + Arrays.toString((byte[])values.dataValue) + " but was " + Arrays.toString((byte[])block.getDataValue()),
+            Arrays.equals((byte[])values.dataValue, (byte[])block.getDataValue()));
+      } else if (values.dataType.contains("[")) {
+        // TODO: multiple dimension arrays or non-byte arrays
       } else if (values.dataValue instanceof Collection) {
         int diff = joint((Collection<?>)values.dataValue, (Collection<?>)block.getDataValue());
         assertEquals(i + ":" + values.dataType, 0, diff);
@@ -216,14 +229,6 @@ public class OffHeapValidationJUnitTest {
     
   }
   
-  @Test
-  public void testCompaction() {
-    // create fragmented state
-    // validate fragmented
-    // perform compaction
-    // validate freed fragments
-  }
-  
   /**
    * Returns -1 if c1 is missing an element in c2, 1 if c2 is missing an element
    * in c1, or 0 is they contain the exact same elements.
@@ -289,6 +294,17 @@ public class OffHeapValidationJUnitTest {
     expected.add(new ExpectedValues(value, value.length()*2, "java.lang.String", -1, getMemoryAddress(region, key), 1, 0, false, true));
   }
   
+  private void putCompressedString(Region<Object, Object> region, List<ExpectedValues> expected) throws IOException {
+    String key = "keyString";
+    String value = "this is a string";
+    region.put(key, value);
+    HeapDataOutputStream hdos = new HeapDataOutputStream(Version.CURRENT);
+    DataSerializer.writeObject(value, hdos);
+    byte[] uncompressedBytes = hdos.toByteArray();
+    byte[] expectedValue = SnappyCompressor.getDefaultInstance().compress(uncompressedBytes);
+    expected.add(new ExpectedValues(expectedValue, 32, "compressed object of size " + expectedValue.length, -1, getMemoryAddress(region, key), 1, 0, true, true));
+  }
+
   private void putDate(Region<Object, Object> region, List<ExpectedValues> expected) {
     String key = "keyDate";
     Date value = new Date();
@@ -302,6 +318,13 @@ public class OffHeapValidationJUnitTest {
     region.put(key, value);
     expected.add(new ExpectedValues(value, 24, "byte[10]", -1, getMemoryAddress(region, key), 1, 0, false, false));
   }
+  private void putCompressedByteArray(Region<Object, Object> region, List<ExpectedValues> expected) throws IOException {
+    String key = "keyByteArray";
+    byte[] value = new byte[10];
+    region.put(key, value);
+    byte[] expectedValue = SnappyCompressor.getDefaultInstance().compress(value);
+    expected.add(new ExpectedValues(expectedValue, 24, "compressed byte[" + expectedValue.length + "]", -1, getMemoryAddress(region, key), 1, 0, true, false));
+  }
   
   private void putByteArrayArray(Region<Object, Object> region, List<ExpectedValues> expected) {
     String key = "keyByteArrayArray";


[40/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JmxManagerFinder.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JmxManagerFinder.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JmxManagerFinder.java
new file mode 100644
index 0000000..8aaf86d
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/JmxManagerFinder.java
@@ -0,0 +1,165 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.net.SocketAddress;
+
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.util.ConnectionUtil;
+
+/**
+ * This class can be used to connect to a locator and ask it to find a jmx
+ * manager. If the locator can find a jmx manager that is already running it
+ * returns it. Otherwise the locator will attempt to start a jmx manager and
+ * then return it.
+ * 
+ * This code does not depend on gemfire.jar but in order to do this some of
+ * GemFire's internal serialization codes and byte sequences have been hard
+ * coded into this code.
+ * 
+ * @author darrel
+ * @since version 7.0.Beta 2012-09-23
+ * 
+ */
+public class JmxManagerFinder {
+
+  private final static PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+
+  /**
+   * @param args
+   * @throws IOException
+   */
+  /*
+   * public static void main(String[] args) throws IOException { if (args.length
+   * != 2) { System.err.println(
+   * "Usage: JmxManagerFinder locatorHost locatorPort. Expected two arguments but found "
+   * + args.length); return; } String locatorHost = args[0]; int locatorPort =
+   * Integer.parseInt(args[1]);
+   * 
+   * InetAddress addr = InetAddress.getByName(locatorHost); JmxManagerInfo
+   * locRes = askLocatorForJmxManager(addr, locatorPort, 15000);
+   * 
+   * if (locRes.port == 0) {
+   * System.out.println("Locator could not find a jmx manager"); } else {
+   * System.out.println("Locator on host " + locRes.host + " port " +
+   * locRes.port + (locRes.ssl ? " ssl" : "")); } }
+   */
+  private static final short JMX_MANAGER_LOCATOR_REQUEST = 2150;
+  private static final short JMX_MANAGER_LOCATOR_RESPONSE = 2151;
+  private static final byte DS_FIXED_ID_SHORT = 2;
+  private static final int GOSSIPVERSION = 1001;
+  private static final byte STRING_BYTES = 87;
+  private static final byte NULL_STRING = 69;
+
+  /**
+   * Describes the location of a jmx manager. If a jmx manager does not exist
+   * then port will be 0.
+   * 
+   * @author darrel
+   * 
+   */
+  public static class JmxManagerInfo {
+    JmxManagerInfo(String host, int port, boolean ssl) {
+      this.host = host;
+      this.port = port;
+      this.ssl = ssl;
+    }
+
+    /**
+     * The host/address the jmx manager is listening on.
+     */
+    public final String host;
+    /**
+     * The port the jmx manager is listening on.
+     */
+    public final int port;
+    /**
+     * True if the jmx manager is using SSL.
+     */
+    public final boolean ssl;
+  }
+
+  /**
+   * Ask a locator to find a jmx manager. The locator will start one if one is
+   * not already running.
+   * 
+   * @param addr
+   *          the host address the locator is listening on
+   * @param port
+   *          the port the locator is listening on
+   * @param timeout
+   *          the number of milliseconds to wait for a response; 15000 is a
+   *          reasonable default
+   * @return describes the location of the jmx manager. The port will be zero if
+   *         no jmx manager was found.
+   * @throws IOException
+   *           if a problem occurs trying to connect to the locator or
+   *           communicate with it.
+   */
+  public static JmxManagerInfo askLocatorForJmxManager(InetAddress addr,
+      int port, int timeout, boolean usessl) throws IOException {
+    SocketAddress sockaddr = new InetSocketAddress(addr, port);
+    Socket sock = ConnectionUtil.getSocketFactory(usessl).createSocket();
+    try {
+      sock.connect(sockaddr, timeout);
+      sock.setSoTimeout(timeout);
+      DataOutputStream out = new DataOutputStream(sock.getOutputStream());
+
+      out.writeInt(GOSSIPVERSION);
+      out.writeByte(DS_FIXED_ID_SHORT);
+      out.writeShort(JMX_MANAGER_LOCATOR_REQUEST);
+      out.flush();
+
+      DataInputStream in = new DataInputStream(sock.getInputStream());
+      byte header = in.readByte();
+      if (header != DS_FIXED_ID_SHORT) {
+        throw new IllegalStateException("Expected " + DS_FIXED_ID_SHORT
+            + " but found " + header);
+      }
+      int msgType = in.readShort();
+      if (msgType != JMX_MANAGER_LOCATOR_RESPONSE) {
+        throw new IllegalStateException("Expected "
+            + JMX_MANAGER_LOCATOR_RESPONSE + " but found " + msgType);
+      }
+      byte hostHeader = in.readByte();
+      String host;
+      if (hostHeader == NULL_STRING) {
+        host = "";
+      } else if (hostHeader == STRING_BYTES) {
+        int len = in.readUnsignedShort();
+        byte[] buf = new byte[len];
+        in.readFully(buf, 0, len);
+        @SuppressWarnings("deprecation")
+        String str = new String(buf, 0);
+        host = str;
+      } else {
+        throw new IllegalStateException("Expected " + STRING_BYTES + " or "
+            + NULL_STRING + " but found " + hostHeader);
+      }
+      int jmport = in.readInt();
+      boolean ssl = in.readBoolean();
+      if (host.equals("")) {
+        jmport = 0;
+      }
+      return new JmxManagerInfo(host, jmport, ssl);
+    } finally {
+      try {
+        sock.close();
+      } catch (Exception e) {
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConfig.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConfig.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConfig.java
new file mode 100644
index 0000000..c63bae9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConfig.java
@@ -0,0 +1,116 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+import java.util.logging.Level;
+
+/**
+ * Class PulseConfig
+ * 
+ * PulseConfig is used for configuring Pulse application.
+ * 
+ * @author Sachin K
+ * @since 7.0.1
+ * 
+ */
+public class PulseConfig {
+
+  // Log file name
+  private String LogFileName;
+
+  // Log file location
+  private String LogFileLocation;
+
+  // Log file size in MBs
+  private int logFileSize;
+
+  // Number of cyclic log files
+  private int logFileCount;
+
+  // Log messages date pattern
+  private String logDatePattern;
+
+  // Log level
+  private Level logLevel;
+
+  // Flag for appending log messages
+  private Boolean logAppend;
+
+  public PulseConfig() {
+    this.setLogFileName(PulseConstants.PULSE_LOG_FILE_NAME);
+    this.LogFileLocation = PulseConstants.PULSE_LOG_FILE_LOCATION;
+    this.logFileSize = PulseConstants.PULSE_LOG_FILE_SIZE;
+    this.logFileCount = PulseConstants.PULSE_LOG_FILE_COUNT;
+    this.logDatePattern = PulseConstants.PULSE_LOG_MESSAGE_DATE_PATTERN;
+    this.logLevel = PulseConstants.PULSE_LOG_LEVEL;
+    this.logAppend = PulseConstants.PULSE_LOG_APPEND;
+  }
+
+  public String getLogFileName() {
+    return LogFileName;
+  }
+
+  public void setLogFileName(String logFileName) {
+    this.LogFileName = logFileName + "_%g.log";
+  }
+
+  public String getLogFileLocation() {
+    return LogFileLocation;
+  }
+
+  public void setLogFileLocation(String logFileLocation) {
+    this.LogFileLocation = logFileLocation;
+  }
+
+  public String getLogFileFullName() {
+    return this.LogFileLocation + "/" + this.LogFileName;
+  }
+
+  public int getLogFileSize() {
+    return logFileSize;
+  }
+
+  public void setLogFileSize(int logFileSize) {
+    this.logFileSize = logFileSize;
+  }
+
+  public int getLogFileCount() {
+    return logFileCount;
+  }
+
+  public void setLogFileCount(int logFileCount) {
+    this.logFileCount = logFileCount;
+  }
+
+  public String getLogDatePattern() {
+    return logDatePattern;
+  }
+
+  public void setLogDatePattern(String logDatePattern) {
+    this.logDatePattern = logDatePattern;
+  }
+
+  public Level getLogLevel() {
+    return logLevel;
+  }
+
+  public void setLogLevel(Level logLevel) {
+    this.logLevel = logLevel;
+  }
+
+  public Boolean getLogAppend() {
+    return logAppend;
+  }
+
+  public void setLogAppend(Boolean logAppend) {
+    this.logAppend = logAppend;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
new file mode 100644
index 0000000..cac9b04
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseConstants.java
@@ -0,0 +1,406 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+import java.util.logging.Level;
+
+public class PulseConstants {
+
+  public static final String APP_NAME = "PULSE";
+  public static final String PULSE_LOG_FILE = APP_NAME + ".log";
+  // public static final String PULSE_LOG_FILE_LOCATION =
+  // System.getProperty("user.home");
+  public static final String PULSE_PROPERTIES_FILE = "pulse.properties";
+  public static final String PULSE_SECURITY_PROPERTIES_FILE = "pulsesecurity.properties";
+  public static final String PULSE_NOTIFICATION_ALERT_DATE_PATTERN = "yyyy-MM-dd'T'HH:mm'Z'";
+  public static final String LOG_MESSAGE_DATE_PATTERN = "yyyy/MM/dd HH:mm:ss.SSS z";
+
+  public static final String LOG_MESSAGES_FILE = "LogMessages";
+  public static final String APPLICATION_LANGUAGE = "en";
+  public static final String APPLICATION_COUNTRY = "US";
+
+  // Pulse version details properties from properties file
+  public static final String PULSE_VERSION_PROPERTIES_FILE = "pulseversion.properties";
+  public static final String PROPERTY_PULSE_VERSION = "pulse.version";
+  public static final String PROPERTY_BUILD_ID = "Build-Id";
+  public static final String PROPERTY_BUILD_DATE = "Build-Date";
+  public static final String PROPERTY_SOURCE_DATE = "Source-Date";
+  public static final String PROPERTY_SOURCE_REVISION = "Source-Revision";
+  public static final String PROPERTY_SOURCE_REPOSITORY = "Source-Repository";
+
+  // DEFAULT CONFIGUARTION VALUES FOR PULSE LOGGER
+  // Log File
+  public static final String PULSE_QUERY_HISTORY_FILE_NAME = APP_NAME
+      + "_QueryHistory.json";
+  // Log File location
+  public static final String PULSE_QUERY_HISTORY_FILE_LOCATION = System
+      .getProperty("user.home");
+  // Date pattern to be used in log messages
+  public static final String PULSE_QUERY_HISTORY_DATE_PATTERN = "EEE, MMM dd yyyy, HH:mm:ss z";
+
+  // Decimal format pattern "###.##" and "0.0000"
+  public static final String DECIMAL_FORMAT_PATTERN = "###.##";
+  public static final String DECIMAL_FORMAT_PATTERN_2 = "0.0000";
+
+  // DEFAULT VALUES
+  public static final String GEMFIRE_DEFAULT_HOST = "localhost";
+  public static final String GEMFIRE_DEFAULT_PORT = "1099";
+
+  // DEFAULT CONFIGUARTION VALUES FOR PULSE LOGGER
+  // Log File
+  public static final String PULSE_LOG_FILE_NAME = APP_NAME;
+  // Log File location
+  public static final String PULSE_LOG_FILE_LOCATION = System
+      .getProperty("user.home");
+  // Date pattern to be used in log messages
+  public static final String PULSE_LOG_MESSAGE_DATE_PATTERN = "yyyy/MM/dd HH:mm:ss.SSS z";
+  // Log file size - 1MB.
+  public static final int PULSE_LOG_FILE_SIZE = 1024 * 1024;
+  // The log file count - 4 files.
+  public static final int PULSE_LOG_FILE_COUNT = 4;
+  // Append logs - true.
+  public static final boolean PULSE_LOG_APPEND = true;
+  // Log level - FINE
+  public static final Level PULSE_LOG_LEVEL = Level.FINE;
+
+  // SYSTEM PROPERTIES
+  public static final String SYSTEM_PROPERTY_PULSE_EMBEDDED = "pulse.embedded";
+  public static final String SYSTEM_PROPERTY_PULSE_EMBEDDED_SQLF = "pulse.embedded.sqlf";
+  public static final String SYSTEM_PROPERTY_PULSE_USELOCATOR = "pulse.useLocator";
+  public static final String SYSTEM_PROPERTY_PULSE_HOST = "pulse.host";
+  public static final String SYSTEM_PROPERTY_PULSE_PORT = "pulse.port";
+
+  // APPLICATION PROPERTIES
+  public static final String APPLICATION_PROPERTY_PULSE_USELOCATOR = "pulse.useLocator";
+  public static final String APPLICATION_PROPERTY_PULSE_HOST = "pulse.host";
+  public static final String APPLICATION_PROPERTY_PULSE_PORT = "pulse.port";
+  public static final String APPLICATION_PROPERTY_PULSE_JMXUSERNAME = "pulse.jmxUserName";
+  public static final String APPLICATION_PROPERTY_PULSE_JMXPASSWORD = "pulse.jmxUserPassword";
+  public static final String APPLICATION_PROPERTY_PULSE_LOGFILENAME = "pulse.Log-File-Name";
+  public static final String APPLICATION_PROPERTY_PULSE_LOGFILELOCATION = "pulse.Log-File-Location";
+  public static final String APPLICATION_PROPERTY_PULSE_LOGFILESIZE = "pulse.Log-File-Size";
+  public static final String APPLICATION_PROPERTY_PULSE_LOGFILECOUNT = "pulse.Log-File-Count";
+  public static final String APPLICATION_PROPERTY_PULSE_LOGDATEPATTERN = "pulse.Log-Date-Pattern";
+  public static final String APPLICATION_PROPERTY_PULSE_LOGLEVEL = "pulse.Log-Level";
+  public static final String APPLICATION_PROPERTY_PULSE_LOGAPPEND = "pulse.Log-Append";
+  public static final String APPLICATION_PROPERTY_PULSE_PRODUCTSUPPORT = "pulse.product";
+
+  // STRING FLAGS
+  public static final String STRING_FLAG_TRUE = "true";
+  public static final String STRING_FLAG_FALSE = "false";
+  public static final String DEFAULT_SERVER_GROUP = "Default";
+  public static final String DEFAULT_REDUNDANCY_ZONE = "Default";
+  public static final String JVM_PAUSES_TYPE_CLUSTER = "cluster";
+  public static final String JVM_PAUSES_TYPE_MEMBER = "member";
+
+  // CONSTANTS FOR MBEAN DATA
+  public static final String OBJECT_DOMAIN_NAME_GEMFIRE = "GemFire";
+  public static final String OBJECT_DOMAIN_NAME_SQLFIRE = "GemFireXD";
+  public static final String OBJECT_NAME_MEMBER = OBJECT_DOMAIN_NAME_GEMFIRE + ":type=Member,*";
+  public static final String OBJECT_NAME_MEMBER_MANAGER = OBJECT_DOMAIN_NAME_GEMFIRE + ":service=Manager,type=Member,*";
+  public static final String OBJECT_NAME_SYSTEM_DISTRIBUTED = OBJECT_DOMAIN_NAME_GEMFIRE + ":service=System,type=Distributed";
+  public static final String OBJECT_NAME_REGION_DISTRIBUTED = OBJECT_DOMAIN_NAME_GEMFIRE + ":service=Region,type=Distributed,*";
+  public static final String OBJECT_NAME_STATEMENT_DISTRIBUTED = OBJECT_DOMAIN_NAME_SQLFIRE + ":service=Statement,type=Aggregate,*";
+  public static final String OBJECT_NAME_SF_CLUSTER = OBJECT_DOMAIN_NAME_SQLFIRE + ":service=Cluster";
+  public static final String OBJECT_NAME_SF_MEMBER_PATTERN = OBJECT_DOMAIN_NAME_SQLFIRE + ":group=*,type=Member,member=";
+  public static final String OBJECT_NAME_TABLE_AGGREGATE = OBJECT_DOMAIN_NAME_SQLFIRE + ":service=Table,type=Aggregate,table=*";
+  public static final String OBJECT_NAME_TABLE_AGGREGATE_PATTERN = OBJECT_DOMAIN_NAME_SQLFIRE + ":service=Table,type=Aggregate,table=";
+  public static final String OBJECT_NAME_REGION_ON_MEMBER_REGION = OBJECT_DOMAIN_NAME_GEMFIRE + ":service=Region,name=";
+  public static final String OBJECT_NAME_REGION_ON_MEMBER_MEMBER = ",type=Member,member=";
+
+  public static final String MBEAN_KEY_PROPERTY_SERVICE = "service";
+  public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_REGION = "Region";
+  public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_CACHESERVER = "CacheServer";
+  public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYRECEIVER = "GatewayReceiver";
+  public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_GATEWAYSENDER = "GatewaySender";
+  public static final String MBEAN_KEY_PROPERTY_SERVICE_VALUE_ASYNCEVENTQUEUE = "AsyncEventQueue";
+  public static final String MBEAN_KEY_PROPERTY_REGION_NAME = "name";
+
+  public static final String MBEAN_KEY_PROPERTY_MEMBER = "member";
+
+  public static final String MBEAN_ATTRIBUTE_MEMBER = "Member";
+  public static final String MBEAN_ATTRIBUTE_MEMBERS = "Members";
+  public static final String MBEAN_ATTRIBUTE_MANAGER = "Manager";
+  public static final String MBEAN_ATTRIBUTE_LOCATOR = "Locator";
+  public static final String MBEAN_ATTRIBUTE_SERVER = "Server";
+  public static final String MBEAN_ATTRIBUTE_SERVERGROUPS = "Groups";
+  public static final String MBEAN_ATTRIBUTE_REDUNDANCYZONES = "RedundancyZone";
+  public static final String MBEAN_ATTRIBUTE_DATASTORE = "DataStore";
+  public static final String MBEAN_ATTRIBUTE_ID = "Id";
+
+  public static final String MBEAN_ATTRIBUTE_GEMFIREVERSION = "Version";
+  public static final String MBEAN_ATTRIBUTE_MEMBERCOUNT = "MemberCount";
+  public static final String MBEAN_ATTRIBUTE_NUMCLIENTS = "NumClients";
+  public static final String MBEAN_ATTRIBUTE_NETWORKSERVERCLIENTCONNECTIONSTATS = "NetworkServerClientConnectionStats";
+  public static final String MBEAN_ATTRIBUTE_DISTRIBUTEDSYSTEMID = "DistributedSystemId";
+  public static final String MBEAN_ATTRIBUTE_LOCATORCOUNT = "LocatorCount";
+  public static final String MBEAN_ATTRIBUTE_TOTALREGIONCOUNT = "TotalRegionCount";
+  public static final String MBEAN_ATTRIBUTE_NUMRUNNIGFUNCTION = "NumRunningFunctions";
+  public static final String MBEAN_ATTRIBUTE_PROCEDURECALLSCOMPLETED = "ProcedureCallsCompleted";
+  public static final String MBEAN_ATTRIBUTE_PROCEDURECALLSINPROGRESS = "ProcedureCallsInProgress";
+  public static final String MBEAN_ATTRIBUTE_REGISTEREDCQCOUNT = "RegisteredCQCount";
+  public static final String MBEAN_ATTRIBUTE_NUMSUBSCRIPTIONS = "NumSubscriptions";
+  public static final String MBEAN_ATTRIBUTE_NUMTXNCOMMITTED = "TransactionCommitted";
+  public static final String MBEAN_ATTRIBUTE_NUMTXNROLLBACK = "TransactionRolledBack";
+  public static final String MBEAN_ATTRIBUTE_TOTALHEAPSIZE = "TotalHeapSize";
+  public static final String MBEAN_ATTRIBUTE_USEDHEAPSIZE = "UsedHeapSize";
+  public static final String MBEAN_ATTRIBUTE_OFFHEAPFREESIZE = "OffHeapFreeSize";
+  public static final String MBEAN_ATTRIBUTE_OFFHEAPUSEDSIZE = "OffHeapUsedSize";
+  public static final String MBEAN_ATTRIBUTE_TOTALREGIONENTRYCOUNT = "TotalRegionEntryCount";
+  public static final String MBEAN_ATTRIBUTE_CURRENTENTRYCOUNT = "CurrentQueryCount";
+  public static final String MBEAN_ATTRIBUTE_TOTALDISKUSAGE = "TotalDiskUsage";
+  public static final String MBEAN_ATTRIBUTE_DISKWRITESRATE = "DiskWritesRate";
+  public static final String MBEAN_ATTRIBUTE_AVERAGEWRITES = "AverageWrites";
+  public static final String MBEAN_ATTRIBUTE_DISKREADSRATE = "DiskReadsRate";
+  public static final String MBEAN_ATTRIBUTE_AVERAGEREADS = "AverageReads";
+  public static final String MBEAN_ATTRIBUTE_QUERYREQUESTRATE = "QueryRequestRate";
+  public static final String MBEAN_ATTRIBUTE_JVMPAUSES = "JVMPauses";
+  public static final String MBEAN_ATTRIBUTE_HOST = "Host";
+  public static final String MBEAN_ATTRIBUTE_PORT = "Port";
+  public static final String MBEAN_ATTRIBUTE_EVENTRECEIVEDDATE = "EventsReceivedRate";
+  public static final String MBEAN_ATTRIBUTE_AVEARGEBATCHPROCESSINGTIME = "AverageBatchProcessingTime";
+  public static final String MBEAN_ATTRIBUTE_RUNNING = "Running";
+  public static final String MBEAN_ATTRIBUTE_BATCHSIZE = "BatchSize";
+  public static final String MBEAN_ATTRIBUTE_SENDERID = "SenderId";
+  public static final String MBEAN_ATTRIBUTE_EVENTQUEUESIZE = "EventQueueSize";
+  public static final String MBEAN_ATTRIBUTE_PRIMARY = "Primary";
+  public static final String MBEAN_ATTRIBUTE_PERSISTENCEENABLED = "PersistenceEnabled";
+  public static final String MBEAN_ATTRIBUTE_PARALLEL = "Parallel";
+  public static final String MBEAN_ATTRIBUTE_REMOTE_DS_ID = "RemoteDSId";
+  public static final String MBEAN_ATTRIBUTE_EVENTS_EXCEEDING_ALERT_THRESHOLD = "EventsExceedingAlertThreshold";
+  public static final String MBEAN_ATTRIBUTE_FULLPATH = "FullPath";
+  public static final String MBEAN_ATTRIBUTE_EMPTYNODES = "EmptyNodes";
+  public static final String MBEAN_ATTRIBUTE_GETSRATE = "GetsRate";
+  public static final String MBEAN_ATTRIBUTE_PUTSRATE = "PutsRate";
+  public static final String MBEAN_ATTRIBUTE_LRUEVICTIONRATE = "LruEvictionRate";
+  public static final String MBEAN_ATTRIBUTE_REGIONTYPE = "RegionType";
+  public static final String MBEAN_ATTRIBUTE_ENTRYSIZE = "EntrySize";
+  public static final String MBEAN_ATTRIBUTE_SYSTEMREGIONENTRYCOUNT = "SystemRegionEntryCount";
+  public static final String MBEAN_ATTRIBUTE_PERSISTENTENABLED = "PersistentEnabled";
+  public static final String MBEAN_ATTRIBUTE_NAME = "Name";
+  public static final String MBEAN_ATTRIBUTE_GATEWAYENABLED = "GatewayEnabled";
+  public static final String MBEAN_ATTRIBUTE_DISKUSAGE = "DiskUsage";
+  public static final String MBEAN_ATTRIBUTE_TOTALFILEDESCRIPTOROPEN = "TotalFileDescriptorOpen";
+  public static final String MBEAN_ATTRIBUTE_LOADAVERAGE = "LoadAverage";
+  public static final String MBEAN_ATTRIBUTE_CURRENTHEAPSIZE = "CurrentHeapSize"; // deprecated in Gemfire8.1
+  public static final String MBEAN_ATTRIBUTE_USEDMEMORY = "UsedMemory";
+  public static final String MBEAN_ATTRIBUTE_MAXIMUMHEAPSIZE = "MaximumHeapSize"; // deprecated in Gemfire8.1
+  public static final String MBEAN_ATTRIBUTE_MAXMEMORY = "MaxMemory";
+  public static final String MBEAN_ATTRIBUTE_NUMTHREADS = "NumThreads";
+  public static final String MBEAN_ATTRIBUTE_MEMBERUPTIME = "MemberUpTime";
+  public static final String MBEAN_ATTRIBUTE_TOTALBYTESONDISK = "TotalBytesOnDisk";
+  public static final String MBEAN_ATTRIBUTE_CPUUSAGE = "CpuUsage";
+  public static final String MBEAN_ATTRIBUTE_HOSTCPUUSAGE = "HostCpuUsage";
+  public static final String MBEAN_ATTRIBUTE_ENTRYCOUNT = "EntryCount";
+  public static final String MBEAN_ATTRIBUTE_NUMBEROFROWS = "NumberOfRows";
+  public static final String MBEAN_ATTRIBUTE_LOCALMAXMEMORY = "LocalMaxMemory";
+
+  public static final String MBEAN_ATTRIBUTE_NUMTIMESCOMPILED = "NumTimesCompiled";
+  public static final String MBEAN_ATTRIBUTE_NUMEXECUTION = "NumExecution";
+  public static final String MBEAN_ATTRIBUTE_NUMEXECUTIONSINPROGRESS = "NumExecutionsInProgress";
+  public static final String MBEAN_ATTRIBUTE_NUMTIMESGLOBALINDEXLOOKUP = "NumTimesGlobalIndexLookup";
+  public static final String MBEAN_ATTRIBUTE_NUMROWSMODIFIED = "NumRowsModified";
+  public static final String MBEAN_ATTRIBUTE_PARSETIME = "ParseTime";
+  public static final String MBEAN_ATTRIBUTE_BINDTIME = "BindTime";
+  public static final String MBEAN_ATTRIBUTE_OPTIMIZETIME = "OptimizeTime";
+  public static final String MBEAN_ATTRIBUTE_ROUTINGINFOTIME = "RoutingInfoTime";
+  public static final String MBEAN_ATTRIBUTE_GENERATETIME = "GenerateTime";
+  public static final String MBEAN_ATTRIBUTE_TOTALCOMPILATIONTIME = "TotalCompilationTime";
+  public static final String MBEAN_ATTRIBUTE_EXECUTIONTIME = "ExecutionTime";
+  public static final String MBEAN_ATTRIBUTE_PROJECTIONTIME = "ProjectionTime";
+  public static final String MBEAN_ATTRIBUTE_TOTALEXECUTIONTIME = "TotalExecutionTime";
+  public static final String MBEAN_ATTRIBUTE_ROWSMODIFICATIONTIME = "RowsModificationTime";
+  public static final String MBEAN_ATTRIBUTE_QNNUMROWSSEEN = "QNNumRowsSeen";
+  public static final String MBEAN_ATTRIBUTE_QNMSGSENDTIME = "QNMsgSendTime";
+  public static final String MBEAN_ATTRIBUTE_QNMSGSERTIME = "QNMsgSerTime";
+  public static final String MBEAN_ATTRIBUTE_QNRESPDESERTIME = "QNRespDeSerTime";
+  public static final String MBEAN_ATTRIBUTE_QUERYDEFINITION = "Query";
+
+  public static final String MBEAN_ATTRIBUTE_AEQ_ASYNCEVENTID = "Id";
+  public static final String MBEAN_ATTRIBUTE_AEQ_PRIMARY = "Primary";
+  public static final String MBEAN_ATTRIBUTE_AEQ_PARALLEL = "Parallel";
+  public static final String MBEAN_ATTRIBUTE_AEQ_BATCH_SIZE = "BatchSize";
+  public static final String MBEAN_ATTRIBUTE_AEQ_BATCH_TIME_INTERVAL = "BatchTimeInterval";
+  public static final String MBEAN_ATTRIBUTE_AEQ_BATCH_CONFLATION_ENABLED = "BatchConflationEnabled";
+  public static final String MBEAN_ATTRIBUTE_AEQ_ASYNC_EVENT_LISTENER = "AsyncEventListener";
+  public static final String MBEAN_ATTRIBUTE_AEQ_EVENT_QUEUE_SIZE = "EventQueueSize";
+
+  // column names
+  public static final String MBEAN_COLNAME_NUMTIMESCOMPILED = "NumTimesCompiled";
+  public static final String MBEAN_COLNAME_NUMEXECUTION = "NumExecution";
+  public static final String MBEAN_COLNAME_NUMEXECUTIONSINPROGRESS = "NumExecutionsInProgress";
+  public static final String MBEAN_COLNAME_NUMTIMESGLOBALINDEXLOOKUP = "NumTimesGlobalIndexLookup";
+  public static final String MBEAN_COLNAME_NUMROWSMODIFIED = "NumRowsModified";
+  public static final String MBEAN_COLNAME_PARSETIME = "ParseTime(ms)";
+  public static final String MBEAN_COLNAME_BINDTIME = "BindTime(ms)";
+  public static final String MBEAN_COLNAME_OPTIMIZETIME = "OptimizeTime(ms)";
+  public static final String MBEAN_COLNAME_ROUTINGINFOTIME = "RoutingInfoTime(ms)";
+  public static final String MBEAN_COLNAME_GENERATETIME = "GenerateTime(ms)";
+  public static final String MBEAN_COLNAME_TOTALCOMPILATIONTIME = "TotalCompilationTime(ms)";
+  public static final String MBEAN_COLNAME_EXECUTIONTIME = "ExecutionTime(ns)";
+  public static final String MBEAN_COLNAME_PROJECTIONTIME = "ProjectionTime(ns)";
+  public static final String MBEAN_COLNAME_TOTALEXECUTIONTIME = "TotalExecutionTime(ns)";
+  public static final String MBEAN_COLNAME_ROWSMODIFICATIONTIME = "RowsModificationTime(ns)";
+  public static final String MBEAN_COLNAME_QNNUMROWSSEEN = "QNNumRowsSeen";
+  public static final String MBEAN_COLNAME_QNMSGSENDTIME = "QNMsgSendTime(ns)";
+  public static final String MBEAN_COLNAME_QNMSGSERTIME = "QNMsgSerTime(ns)";
+  public static final String MBEAN_COLNAME_QNRESPDESERTIME = "QNRespDeSerTime(ns)";
+  public static final String MBEAN_COLNAME_QUERYDEFINITION = "Query";
+
+  // TODO : add attributes for aggregate statistics
+  // public static final String MBEAN_ATTRIBUTE_ENTRYCOUNT = "EntryCount";
+
+  public static final String MBEAN_MANAGER_ATTRIBUTE_PULSEURL = "PulseURL";
+
+  public static final String MBEAN_OPERATION_LISTCACHESERVER = "listCacheServers";
+  public static final String MBEAN_OPERATION_LISTSERVERS = "listServers";
+  public static final String MBEAN_OPERATION_VIEWREMOTECLUSTERSTATUS = "viewRemoteClusterStatus";
+  public static final String MBEAN_OPERATION_SHOWALLCLIENTS = "showAllClientStats";
+  public static final String MBEAN_OPERATION_LISTREGIONATTRIBUTES = "listRegionAttributes";
+  public static final String MBEAN_OPERATION_QUERYDATABROWSER = "queryData";
+
+  // COMPOSITE DATA KEYS
+  public static final String COMPOSITE_DATA_KEY_CLIENTID = "clientId";
+  public static final String COMPOSITE_DATA_KEY_NAME = "name";
+  public static final String COMPOSITE_DATA_KEY_HOSTNAME = "hostName";
+  public static final String COMPOSITE_DATA_KEY_QUEUESIZE = "queueSize";
+  public static final String COMPOSITE_DATA_KEY_PROCESSCPUTIME = "processCpuTime";
+  public static final String COMPOSITE_DATA_KEY_UPTIME = "upTime";
+  public static final String COMPOSITE_DATA_KEY_NUMOFTHREADS = "numOfThreads";
+  public static final String COMPOSITE_DATA_KEY_NUMOFGETS = "numOfGets";
+  public static final String COMPOSITE_DATA_KEY_NUMOFPUTS = "numOfPuts";
+  public static final String COMPOSITE_DATA_KEY_CPUS = "cpus";
+  public static final String COMPOSITE_DATA_KEY_CLIENTCQCOUNT = "clientCQCount"; 
+  public static final String COMPOSITE_DATA_KEY_SUBSCRIPTIONENABLED = "subscriptionEnabled"; 
+  public static final String COMPOSITE_DATA_KEY_SCOPE = "scope";
+  public static final String COMPOSITE_DATA_KEY_DISKSTORENAME = "diskStoreName";
+  public static final String COMPOSITE_DATA_KEY_DISKSYNCHRONOUS = "diskSynchronous";
+  public static final String COMPOSITE_DATA_KEY_COMPRESSIONCODEC = "compressionCodec";
+  public static final String COMPOSITE_DATA_KEY_HDFSWRITEONLY = "hdfsWriteOnly";
+  public static final String COMPOSITE_DATA_KEY_ENABLEOFFHEAPMEMORY = "enableOffHeapMemory";
+  public static final String COMPOSITE_DATA_KEY_CONNECTIONSACTIVE = "connectionsActive";
+  public static final String COMPOSITE_DATA_KEY_CONNECTED = "connected";
+
+  public static final String ALERT_DESC_SEVERE = "Severe Alert! The cluster is on fire !";
+  public static final String ALERT_DESC_ERROR = "Error Alert! There is a problem with your cluster ! Better fix it !";
+  public static final String ALERT_DESC_WARNING = "Warning Alert! Look at this cluster after you finish your coffee !";
+  public static final String ALERT_DESC_INFO = "Info Alert! For your kind information !";
+
+  public static final String NOTIFICATION_TYPE_SYSTEM_ALERT = "system.alert";
+  public static final String NOTIFICATION_TYPE_CACHE_MEMBER_DEPARTED = "gemfire.distributedsystem.cache.member.departed";
+  public static final String NOTIFICATION_TYPE_REGION_DESTROYED = "gemfire.distributedsystem.cache.region.closed";
+
+  public static final String PRODUCT_NAME_GEMFIRE = "gemfire"; // For GemFire
+  public static final String PRODUCT_NAME_SQLFIRE = "gemfirexd"; // For SQLFire
+
+  public static final String[] REGION_MBEAN_ATTRIBUTES = {
+      MBEAN_ATTRIBUTE_MEMBERS, MBEAN_ATTRIBUTE_FULLPATH,
+      MBEAN_ATTRIBUTE_DISKREADSRATE, MBEAN_ATTRIBUTE_DISKWRITESRATE,
+      MBEAN_ATTRIBUTE_EMPTYNODES, MBEAN_ATTRIBUTE_GETSRATE,
+      MBEAN_ATTRIBUTE_LRUEVICTIONRATE, MBEAN_ATTRIBUTE_PUTSRATE,
+      MBEAN_ATTRIBUTE_REGIONTYPE, MBEAN_ATTRIBUTE_ENTRYSIZE,
+      MBEAN_ATTRIBUTE_ENTRYCOUNT, MBEAN_ATTRIBUTE_SYSTEMREGIONENTRYCOUNT,
+      MBEAN_ATTRIBUTE_MEMBERCOUNT, MBEAN_ATTRIBUTE_PERSISTENTENABLED,
+      MBEAN_ATTRIBUTE_NAME, MBEAN_ATTRIBUTE_GATEWAYENABLED,
+      MBEAN_ATTRIBUTE_DISKUSAGE, MBEAN_ATTRIBUTE_LOCALMAXMEMORY };
+
+  public static final String[] CLUSTER_MBEAN_ATTRIBUTES = {
+      MBEAN_ATTRIBUTE_MEMBERCOUNT, MBEAN_ATTRIBUTE_NUMCLIENTS,
+      MBEAN_ATTRIBUTE_DISTRIBUTEDSYSTEMID, MBEAN_ATTRIBUTE_LOCATORCOUNT,
+      MBEAN_ATTRIBUTE_TOTALREGIONCOUNT, MBEAN_ATTRIBUTE_NUMRUNNIGFUNCTION,
+      MBEAN_ATTRIBUTE_REGISTEREDCQCOUNT, MBEAN_ATTRIBUTE_NUMSUBSCRIPTIONS,
+      MBEAN_ATTRIBUTE_NUMTXNCOMMITTED, MBEAN_ATTRIBUTE_NUMTXNROLLBACK,
+      MBEAN_ATTRIBUTE_TOTALHEAPSIZE, MBEAN_ATTRIBUTE_USEDHEAPSIZE,
+      MBEAN_ATTRIBUTE_TOTALREGIONENTRYCOUNT, MBEAN_ATTRIBUTE_CURRENTENTRYCOUNT,
+      MBEAN_ATTRIBUTE_TOTALDISKUSAGE, MBEAN_ATTRIBUTE_DISKWRITESRATE,
+      MBEAN_ATTRIBUTE_AVERAGEWRITES, MBEAN_ATTRIBUTE_AVERAGEREADS,
+      MBEAN_ATTRIBUTE_QUERYREQUESTRATE, MBEAN_ATTRIBUTE_DISKREADSRATE,
+      MBEAN_ATTRIBUTE_JVMPAUSES };
+
+  public static final String[] GATEWAY_MBEAN_ATTRIBUTES = {
+      MBEAN_ATTRIBUTE_PORT, MBEAN_ATTRIBUTE_EVENTRECEIVEDDATE,
+      MBEAN_ATTRIBUTE_AVEARGEBATCHPROCESSINGTIME, MBEAN_ATTRIBUTE_RUNNING };
+
+  public static final String[] GATEWAYSENDER_MBEAN_ATTRIBUTES = {
+      MBEAN_ATTRIBUTE_EVENTRECEIVEDDATE, MBEAN_ATTRIBUTE_BATCHSIZE,
+      MBEAN_ATTRIBUTE_SENDERID, MBEAN_ATTRIBUTE_EVENTQUEUESIZE,
+      MBEAN_ATTRIBUTE_RUNNING, MBEAN_ATTRIBUTE_PRIMARY,
+      MBEAN_ATTRIBUTE_PERSISTENCEENABLED, MBEAN_ATTRIBUTE_PARALLEL,
+      MBEAN_ATTRIBUTE_REMOTE_DS_ID, MBEAN_ATTRIBUTE_EVENTS_EXCEEDING_ALERT_THRESHOLD};
+
+  public static final String[] ASYNC_EVENT_QUEUE_MBEAN_ATTRIBUTES = {
+    MBEAN_ATTRIBUTE_AEQ_ASYNCEVENTID, MBEAN_ATTRIBUTE_AEQ_PRIMARY,
+    MBEAN_ATTRIBUTE_AEQ_PARALLEL, MBEAN_ATTRIBUTE_AEQ_BATCH_SIZE,
+    MBEAN_ATTRIBUTE_AEQ_BATCH_TIME_INTERVAL, MBEAN_ATTRIBUTE_AEQ_BATCH_CONFLATION_ENABLED,
+    MBEAN_ATTRIBUTE_AEQ_ASYNC_EVENT_LISTENER, MBEAN_ATTRIBUTE_AEQ_EVENT_QUEUE_SIZE};
+
+  public static final String[] MEMBER_MBEAN_ATTRIBUTES = {
+      MBEAN_ATTRIBUTE_MANAGER, MBEAN_ATTRIBUTE_TOTALREGIONCOUNT,
+      MBEAN_ATTRIBUTE_LOCATOR, MBEAN_ATTRIBUTE_TOTALDISKUSAGE,
+      MBEAN_ATTRIBUTE_SERVER, MBEAN_ATTRIBUTE_TOTALFILEDESCRIPTOROPEN,
+      MBEAN_ATTRIBUTE_LOADAVERAGE, MBEAN_ATTRIBUTE_DISKWRITESRATE,
+      MBEAN_ATTRIBUTE_DISKREADSRATE, MBEAN_ATTRIBUTE_JVMPAUSES,
+      MBEAN_ATTRIBUTE_USEDMEMORY, MBEAN_ATTRIBUTE_MAXMEMORY,
+      MBEAN_ATTRIBUTE_NUMTHREADS, MBEAN_ATTRIBUTE_MEMBERUPTIME,
+      MBEAN_ATTRIBUTE_HOST, MBEAN_ATTRIBUTE_TOTALBYTESONDISK,
+      MBEAN_ATTRIBUTE_CPUUSAGE, MBEAN_ATTRIBUTE_HOSTCPUUSAGE,
+      MBEAN_ATTRIBUTE_MEMBER, MBEAN_ATTRIBUTE_ID, MBEAN_ATTRIBUTE_AVERAGEREADS,
+      MBEAN_ATTRIBUTE_AVERAGEWRITES, MBEAN_ATTRIBUTE_OFFHEAPFREESIZE,
+      MBEAN_ATTRIBUTE_OFFHEAPUSEDSIZE, MBEAN_ATTRIBUTE_SERVERGROUPS,
+      MBEAN_ATTRIBUTE_REDUNDANCYZONES, MBEAN_ATTRIBUTE_GEMFIREVERSION };
+
+  public static final String[] STATEMENT_MBEAN_ATTRIBUTES = {
+      MBEAN_ATTRIBUTE_NAME, MBEAN_ATTRIBUTE_NUMTIMESCOMPILED,
+      MBEAN_ATTRIBUTE_NUMEXECUTION, MBEAN_ATTRIBUTE_NUMEXECUTIONSINPROGRESS,
+      MBEAN_ATTRIBUTE_NUMTIMESGLOBALINDEXLOOKUP,
+      MBEAN_ATTRIBUTE_NUMROWSMODIFIED, MBEAN_ATTRIBUTE_PARSETIME,
+      MBEAN_ATTRIBUTE_BINDTIME, MBEAN_ATTRIBUTE_OPTIMIZETIME,
+      MBEAN_ATTRIBUTE_ROUTINGINFOTIME, MBEAN_ATTRIBUTE_GENERATETIME,
+      MBEAN_ATTRIBUTE_TOTALCOMPILATIONTIME, MBEAN_ATTRIBUTE_EXECUTIONTIME,
+      MBEAN_ATTRIBUTE_PROJECTIONTIME, MBEAN_ATTRIBUTE_TOTALEXECUTIONTIME,
+      MBEAN_ATTRIBUTE_ROWSMODIFICATIONTIME, MBEAN_ATTRIBUTE_QNNUMROWSSEEN,
+      MBEAN_ATTRIBUTE_QNMSGSENDTIME, MBEAN_ATTRIBUTE_QNMSGSERTIME };
+
+  public static final String[] REGION_ON_MEMBER_MBEAN_ATTRIBUTES = {
+    MBEAN_ATTRIBUTE_ENTRYSIZE,
+    MBEAN_ATTRIBUTE_ENTRYCOUNT,
+    MBEAN_ATTRIBUTE_PUTSRATE,
+    MBEAN_ATTRIBUTE_GETSRATE,
+    MBEAN_ATTRIBUTE_DISKREADSRATE,
+    MBEAN_ATTRIBUTE_DISKWRITESRATE,
+    MBEAN_ATTRIBUTE_LOCALMAXMEMORY
+    };
+
+  public static final String[] SF_CLUSTER_MBEAN_ATTRIBUTES = {
+      MBEAN_ATTRIBUTE_PROCEDURECALLSINPROGRESS,
+      MBEAN_ATTRIBUTE_NETWORKSERVERCLIENTCONNECTIONSTATS };
+
+  public static final String[] SF_MEMBER_MBEAN_ATTRIBUTES = {
+    MBEAN_ATTRIBUTE_DATASTORE,
+    MBEAN_ATTRIBUTE_NETWORKSERVERCLIENTCONNECTIONSTATS };
+
+  public static final String[] SF_TABLE_MBEAN_ATTRIBUTES = {
+      MBEAN_ATTRIBUTE_ENTRYSIZE, MBEAN_ATTRIBUTE_NUMBEROFROWS };
+
+  // SSL Related attributes
+
+  public static final String SSL_KEYSTORE = "javax.net.ssl.keyStore";
+  public static final String SSL_KEYSTORE_PASSWORD = "javax.net.ssl.keyStorePassword";
+  public static final String SSL_TRUSTSTORE = "javax.net.ssl.trustStore";
+  public static final String SSL_TRUSTSTORE_PASSWORD = "javax.net.ssl.trustStorePassword";
+  public static final String SSL_ENABLED_CIPHERS = "javax.rmi.ssl.client.enabledCipherSuites";
+  public static final String SSL_ENABLED_PROTOCOLS = "javax.rmi.ssl.client.enabledProtocols";
+
+  public static final String SYSTEM_PROPERTY_PULSE_USESSL_LOCATOR = "pulse.useSSL.locator";
+  public static final String SYSTEM_PROPERTY_PULSE_USESSL_MANAGER = "pulse.useSSL.manager";
+
+  public static final String REQUEST_PARAM_REGION_FULL_PATH = "regionFullPath";
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseVersion.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseVersion.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseVersion.java
new file mode 100644
index 0000000..1bfebdd
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/PulseVersion.java
@@ -0,0 +1,94 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+import java.util.ResourceBundle;
+
+/**
+ * Class PulseVersion
+ * 
+ * This class is for holding Pulse Applications Version's details (like version
+ * details, build details, source details, etc) from properties file
+ * 
+ * @author Sachin K
+ * @since version Helios
+ */
+
+public class PulseVersion {
+
+  private String pulseVersion;
+
+  public String getPulseVersion() {
+    return pulseVersion;
+  }
+
+  public void setPulseVersion(String pulseVersion) {
+    this.pulseVersion = pulseVersion;
+  }
+
+  private String pulseBuildId;
+
+  public String getPulseBuildId() {
+    return pulseBuildId;
+  }
+
+  public void setPulseBuildId(String pulseBuildId) {
+    this.pulseBuildId = pulseBuildId;
+  }
+
+  private String pulseBuildDate;
+
+  public String getPulseBuildDate() {
+    return pulseBuildDate;
+  }
+
+  public void setPulseBuildDate(String pulseBuildDate) {
+    this.pulseBuildDate = pulseBuildDate;
+  }
+
+  private String pulseSourceDate;
+
+  public String getPulseSourceDate() {
+    return pulseSourceDate;
+  }
+
+  public void setPulseSourceDate(String pulseSourceDate) {
+    this.pulseSourceDate = pulseSourceDate;
+  }
+
+  private String pulseSourceRevision;
+
+  public String getPulseSourceRevision() {
+    return pulseSourceRevision;
+  }
+
+  public void setPulseSourceRevision(String pulseSourceRevision) {
+    this.pulseSourceRevision = pulseSourceRevision;
+  }
+
+  private String pulseSourceRepository;
+
+  public String getPulseSourceRepository() {
+    return pulseSourceRepository;
+  }
+
+  public void setPulseSourceRepository(String pulseSourceRepository) {
+    this.pulseSourceRepository = pulseSourceRepository;
+  }
+
+  public String getPulseVersionLogMessage() {
+    ResourceBundle resourceBundle = Repository.get().getResourceBundle();
+    String logMessage = resourceBundle.getString("LOG_MSG_PULSE_VERSION") + " "
+        + this.getPulseVersion() + " " + this.getPulseBuildId() + " "
+        + this.getPulseBuildDate();
+    return logMessage;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java
new file mode 100644
index 0000000..5d9f650
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Repository.java
@@ -0,0 +1,205 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+import java.net.ConnectException;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * A Singleton instance of the memory cache for clusters.
+ * 
+ * @author Anand Hariharan
+ * @since version 7.0.Beta 2012-09-23
+ */
+public class Repository {
+  private PulseLogWriter LOGGER;
+
+  private static Repository instance = new Repository();
+  private HashMap<String, Cluster> clusterMap = new HashMap<String, Cluster>();
+  private Boolean jmxUseLocator;
+  private String jmxHost;
+  private String jmxPort;
+  private String jmxUserName;
+  private String jmxUserPassword;
+  private Boolean isEmbeddedMode;
+  private boolean useSSLLocator = false;
+  private boolean useSSLManager = false;
+  
+
+  private String pulseWebAppUrl;
+
+  Locale locale = new Locale(PulseConstants.APPLICATION_LANGUAGE,
+      PulseConstants.APPLICATION_COUNTRY);
+
+  private ResourceBundle resourceBundle = ResourceBundle.getBundle(
+      PulseConstants.LOG_MESSAGES_FILE, locale);
+
+  private PulseConfig pulseConfig = new PulseConfig();
+
+  private Repository() {
+
+  }
+
+  public static Repository get() {
+    return instance;
+  }
+
+  public Boolean getJmxUseLocator() {
+    return this.jmxUseLocator;
+  }
+
+  public void setJmxUseLocator(Boolean jmxUseLocator) {
+    this.jmxUseLocator = jmxUseLocator;
+  }
+
+  public String getJmxHost() {
+    return this.jmxHost;
+  }
+
+  public void setJmxHost(String jmxHost) {
+    this.jmxHost = jmxHost;
+  }
+
+  public String getJmxPort() {
+    return this.jmxPort;
+  }
+
+  public void setJmxPort(String jmxPort) {
+    this.jmxPort = jmxPort;
+  }
+
+  public String getJmxUserName() {
+    return this.jmxUserName;
+  }
+
+  public void setJmxUserName(String jmxUserName) {
+    this.jmxUserName = jmxUserName;
+  }
+
+  public String getJmxUserPassword() {
+    return this.jmxUserPassword;
+  }
+
+  public void setJmxUserPassword(String jmxUserPassword) {
+    this.jmxUserPassword = jmxUserPassword;
+  }
+
+  public Boolean getIsEmbeddedMode() {
+    return this.isEmbeddedMode;
+  }
+
+  public void setIsEmbeddedMode(Boolean isEmbeddedMode) {
+    this.isEmbeddedMode = isEmbeddedMode;
+  }
+
+  public boolean isUseSSLLocator() {
+    return useSSLLocator;
+  }
+
+  public void setUseSSLLocator(boolean useSSLLocator) {
+    this.useSSLLocator = useSSLLocator;
+  }
+
+  public boolean isUseSSLManager() {
+    return useSSLManager;
+  }
+
+  public void setUseSSLManager(boolean useSSLManager) {
+    this.useSSLManager = useSSLManager;
+  }
+
+  public String getPulseWebAppUrl() {
+    return this.pulseWebAppUrl;
+  }
+
+  public void setPulseWebAppUrl(String pulseWebAppUrl) {
+    this.pulseWebAppUrl = pulseWebAppUrl;
+  }
+
+  public PulseConfig getPulseConfig() {
+    return this.pulseConfig;
+  }
+
+  public void setPulseConfig(PulseConfig pulseConfig) {
+    this.pulseConfig = pulseConfig;
+  }
+
+  /**
+   * Convenience method for now, seeing that we're maintaining a 1:1 mapping
+   * between webapp and cluster
+   */
+  public Cluster getCluster() {
+    return this.getCluster(getJmxHost(), getJmxPort());
+  }
+
+  public Cluster getCluster(String host, String port) {
+    synchronized (this.clusterMap) {
+      String key = this.getClusterKey(host, port);
+      Cluster data = this.clusterMap.get(key);
+
+      LOGGER = PulseLogWriter.getLogger();
+
+      if (data == null) {
+        try {
+          if (LOGGER.infoEnabled()) {
+            LOGGER.info(resourceBundle.getString("LOG_MSG_CREATE_NEW_THREAD")
+                + " : " + key);
+          }
+          data = new Cluster(host, port, this.getJmxUserName(), this.getJmxUserPassword());
+          // Assign name to thread created
+          data.setName(PulseConstants.APP_NAME + "-" + host + ":" + port);
+          // Start Thread
+          data.start();
+          this.clusterMap.put(key, data);
+        } catch (ConnectException e) {
+          data = null;
+          if (LOGGER.fineEnabled()) {
+            LOGGER.fine(e.getMessage());
+          }
+        }
+      }
+      return data;
+    }
+  }
+
+  private String getClusterKey(String host, String port) {
+    return host + ":" + port;
+  }
+
+  // This method is used to remove all cluster threads
+  public void removeAllClusters() {
+
+    Iterator<Map.Entry<String, Cluster>> iter = clusterMap.entrySet()
+        .iterator();
+
+    while (iter.hasNext()) {
+      Map.Entry<String, Cluster> entry = iter.next();
+      Cluster c = entry.getValue();
+      String clusterKey = entry.getKey();
+      c.stopThread();
+      iter.remove();
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(resourceBundle.getString("LOG_MSG_REMOVE_THREAD") + " : "
+            + clusterKey.toString());
+      }
+    }
+  }
+
+  public ResourceBundle getResourceBundle() {
+    return this.resourceBundle;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/CDL.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/CDL.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/CDL.java
new file mode 100644
index 0000000..d867f6c
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/CDL.java
@@ -0,0 +1,279 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * This provides static methods to convert comma delimited text into a
+ * JSONArray, and to covert a JSONArray into comma delimited text. Comma
+ * delimited text is a very popular format for data interchange. It is
+ * understood by most database, spreadsheet, and organizer programs.
+ * <p>
+ * Each row of text represents a row in a table or a data record. Each row
+ * ends with a NEWLINE character. Each row contains one or more values.
+ * Values are separated by commas. A value can contain any character except
+ * for comma, unless is is wrapped in single quotes or double quotes.
+ * <p>
+ * The first row usually contains the names of the columns.
+ * <p>
+ * A comma delimited list can be converted into a JSONArray of JSONObjects.
+ * The names for the elements in the JSONObjects can be taken from the names
+ * in the first row.
+ * @author JSON.org
+ * @version 2010-12-24
+ */
+public class CDL {
+
+    /**
+     * Get the next value. The value can be wrapped in quotes. The value can
+     * be empty.
+     * @param x A JSONTokener of the source text.
+     * @return The value string, or null if empty.
+     * @throws JSONException if the quoted string is badly formed.
+     */
+    private static String getValue(JSONTokener x) throws JSONException {
+        char c;
+        char q;
+        StringBuffer sb;
+        do {
+            c = x.next();
+        } while (c == ' ' || c == '\t');
+        switch (c) {
+        case 0:
+            return null;
+        case '"':
+        case '\'':
+            q = c;
+            sb = new StringBuffer();
+            for (;;) {
+                c = x.next();
+                if (c == q) {
+                    break;
+                }
+                if (c == 0 || c == '\n' || c == '\r') {
+                    throw x.syntaxError("Missing close quote '" + q + "'.");
+                }
+                sb.append(c);
+            }
+            return sb.toString();
+        case ',':
+            x.back();
+            return "";
+        default:
+            x.back();
+            return x.nextTo(',');
+        }
+    }
+
+    /**
+     * Produce a JSONArray of strings from a row of comma delimited values.
+     * @param x A JSONTokener of the source text.
+     * @return A JSONArray of strings.
+     * @throws JSONException
+     */
+    public static JSONArray rowToJSONArray(JSONTokener x) throws JSONException {
+        JSONArray ja = new JSONArray();
+        for (;;) {
+            String value = getValue(x);
+            char c = x.next();
+            if (value == null || 
+                    (ja.length() == 0 && value.length() == 0 && c != ',')) {
+                return null;
+            }
+            ja.put(value);
+            for (;;) {                
+                if (c == ',') {
+                    break;
+                }
+                if (c != ' ') {
+                    if (c == '\n' || c == '\r' || c == 0) {
+                        return ja;
+                    }
+                    throw x.syntaxError("Bad character '" + c + "' (" +
+                            (int)c + ").");
+                }
+                c = x.next();
+            }
+        }
+    }
+
+    /**
+     * Produce a JSONObject from a row of comma delimited text, using a
+     * parallel JSONArray of strings to provides the names of the elements.
+     * @param names A JSONArray of names. This is commonly obtained from the
+     *  first row of a comma delimited text file using the rowToJSONArray
+     *  method.
+     * @param x A JSONTokener of the source text.
+     * @return A JSONObject combining the names and values.
+     * @throws JSONException
+     */
+    public static JSONObject rowToJSONObject(JSONArray names, JSONTokener x)
+            throws JSONException {
+        JSONArray ja = rowToJSONArray(x);
+        return ja != null ? ja.toJSONObject(names) :  null;
+    }
+
+    /**
+     * Produce a comma delimited text row from a JSONArray. Values containing
+     * the comma character will be quoted. Troublesome characters may be 
+     * removed.
+     * @param ja A JSONArray of strings.
+     * @return A string ending in NEWLINE.
+     */
+    public static String rowToString(JSONArray ja) {
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < ja.length(); i += 1) {
+            if (i > 0) {
+                sb.append(',');
+            }
+            Object object = ja.opt(i);
+            if (object != null) {
+                String string = object.toString();
+                if (string.length() > 0 && (string.indexOf(',') >= 0 || 
+                        string.indexOf('\n') >= 0 || string.indexOf('\r') >= 0 || 
+                        string.indexOf(0) >= 0 || string.charAt(0) == '"')) {
+                    sb.append('"');
+                    int length = string.length();
+                    for (int j = 0; j < length; j += 1) {
+                        char c = string.charAt(j);
+                        if (c >= ' ' && c != '"') {
+                            sb.append(c);
+                        }
+                    }
+                    sb.append('"');
+                } else {
+                    sb.append(string);
+                }
+            }
+        }
+        sb.append('\n');
+        return sb.toString();
+    }
+
+    /**
+     * Produce a JSONArray of JSONObjects from a comma delimited text string,
+     * using the first row as a source of names.
+     * @param string The comma delimited text.
+     * @return A JSONArray of JSONObjects.
+     * @throws JSONException
+     */
+    public static JSONArray toJSONArray(String string) throws JSONException {
+        return toJSONArray(new JSONTokener(string));
+    }
+
+    /**
+     * Produce a JSONArray of JSONObjects from a comma delimited text string,
+     * using the first row as a source of names.
+     * @param x The JSONTokener containing the comma delimited text.
+     * @return A JSONArray of JSONObjects.
+     * @throws JSONException
+     */
+    public static JSONArray toJSONArray(JSONTokener x) throws JSONException {
+        return toJSONArray(rowToJSONArray(x), x);
+    }
+
+    /**
+     * Produce a JSONArray of JSONObjects from a comma delimited text string
+     * using a supplied JSONArray as the source of element names.
+     * @param names A JSONArray of strings.
+     * @param string The comma delimited text.
+     * @return A JSONArray of JSONObjects.
+     * @throws JSONException
+     */
+    public static JSONArray toJSONArray(JSONArray names, String string)
+            throws JSONException {
+        return toJSONArray(names, new JSONTokener(string));
+    }
+
+    /**
+     * Produce a JSONArray of JSONObjects from a comma delimited text string
+     * using a supplied JSONArray as the source of element names.
+     * @param names A JSONArray of strings.
+     * @param x A JSONTokener of the source text.
+     * @return A JSONArray of JSONObjects.
+     * @throws JSONException
+     */
+    public static JSONArray toJSONArray(JSONArray names, JSONTokener x)
+            throws JSONException {
+        if (names == null || names.length() == 0) {
+            return null;
+        }
+        JSONArray ja = new JSONArray();
+        for (;;) {
+            JSONObject jo = rowToJSONObject(names, x);
+            if (jo == null) {
+                break;
+            }
+            ja.put(jo);
+        }
+        if (ja.length() == 0) {
+            return null;
+        }
+        return ja;
+    }
+
+
+    /**
+     * Produce a comma delimited text from a JSONArray of JSONObjects. The
+     * first row will be a list of names obtained by inspecting the first
+     * JSONObject.
+     * @param ja A JSONArray of JSONObjects.
+     * @return A comma delimited text.
+     * @throws JSONException
+     */
+    public static String toString(JSONArray ja) throws JSONException {
+        JSONObject jo = ja.optJSONObject(0);
+        if (jo != null) {
+            JSONArray names = jo.names();
+            if (names != null) {
+                return rowToString(names) + toString(names, ja);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Produce a comma delimited text from a JSONArray of JSONObjects using
+     * a provided list of names. The list of names is not included in the
+     * output.
+     * @param names A JSONArray of strings.
+     * @param ja A JSONArray of JSONObjects.
+     * @return A comma delimited text.
+     * @throws JSONException
+     */
+    public static String toString(JSONArray names, JSONArray ja)
+            throws JSONException {
+        if (names == null || names.length() == 0) {
+            return null;
+        }
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < ja.length(); i += 1) {
+            JSONObject jo = ja.optJSONObject(i);
+            if (jo != null) {
+                sb.append(rowToString(jo.toJSONArray(names)));
+            }
+        }
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/Cookie.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/Cookie.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/Cookie.java
new file mode 100644
index 0000000..84882ff
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/Cookie.java
@@ -0,0 +1,169 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * Convert a web browser cookie specification to a JSONObject and back.
+ * JSON and Cookies are both notations for name/value pairs.
+ * @author JSON.org
+ * @version 2010-12-24
+ */
+public class Cookie {
+
+    /**
+     * Produce a copy of a string in which the characters '+', '%', '=', ';'
+     * and control characters are replaced with "%hh". This is a gentle form
+     * of URL encoding, attempting to cause as little distortion to the
+     * string as possible. The characters '=' and ';' are meta characters in
+     * cookies. By convention, they are escaped using the URL-encoding. This is
+     * only a convention, not a standard. Often, cookies are expected to have
+     * encoded values. We encode '=' and ';' because we must. We encode '%' and
+     * '+' because they are meta characters in URL encoding.
+     * @param string The source string.
+     * @return       The escaped result.
+     */
+    public static String escape(String string) {
+        char         c;
+        String       s = string.trim();
+        StringBuffer sb = new StringBuffer();
+        int          length = s.length();
+        for (int i = 0; i < length; i += 1) {
+            c = s.charAt(i);
+            if (c < ' ' || c == '+' || c == '%' || c == '=' || c == ';') {
+                sb.append('%');
+                sb.append(Character.forDigit((char)((c >>> 4) & 0x0f), 16));
+                sb.append(Character.forDigit((char)(c & 0x0f), 16));
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+
+
+    /**
+     * Convert a cookie specification string into a JSONObject. The string
+     * will contain a name value pair separated by '='. The name and the value
+     * will be unescaped, possibly converting '+' and '%' sequences. The
+     * cookie properties may follow, separated by ';', also represented as
+     * name=value (except the secure property, which does not have a value).
+     * The name will be stored under the key "name", and the value will be
+     * stored under the key "value". This method does not do checking or
+     * validation of the parameters. It only converts the cookie string into
+     * a JSONObject.
+     * @param string The cookie specification string.
+     * @return A JSONObject containing "name", "value", and possibly other
+     *  members.
+     * @throws JSONException
+     */
+    public static JSONObject toJSONObject(String string) throws JSONException {
+        String         name;
+        JSONObject     jo = new JSONObject();
+        Object         value;
+        JSONTokener x = new JSONTokener(string);
+        jo.put("name", x.nextTo('='));
+        x.next('=');
+        jo.put("value", x.nextTo(';'));
+        x.next();
+        while (x.more()) {
+            name = unescape(x.nextTo("=;"));
+            if (x.next() != '=') {
+                if (name.equals("secure")) {
+                    value = Boolean.TRUE;
+                } else {
+                    throw x.syntaxError("Missing '=' in cookie parameter.");
+                }
+            } else {
+                value = unescape(x.nextTo(';'));
+                x.next();
+            }
+            jo.put(name, value);
+        }
+        return jo;
+    }
+
+
+    /**
+     * Convert a JSONObject into a cookie specification string. The JSONObject
+     * must contain "name" and "value" members.
+     * If the JSONObject contains "expires", "domain", "path", or "secure"
+     * members, they will be appended to the cookie specification string.
+     * All other members are ignored.
+     * @param jo A JSONObject
+     * @return A cookie specification string
+     * @throws JSONException
+     */
+    public static String toString(JSONObject jo) throws JSONException {
+        StringBuffer sb = new StringBuffer();
+
+        sb.append(escape(jo.getString("name")));
+        sb.append("=");
+        sb.append(escape(jo.getString("value")));
+        if (jo.has("expires")) {
+            sb.append(";expires=");
+            sb.append(jo.getString("expires"));
+        }
+        if (jo.has("domain")) {
+            sb.append(";domain=");
+            sb.append(escape(jo.getString("domain")));
+        }
+        if (jo.has("path")) {
+            sb.append(";path=");
+            sb.append(escape(jo.getString("path")));
+        }
+        if (jo.optBoolean("secure")) {
+            sb.append(";secure");
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Convert <code>%</code><i>hh</i> sequences to single characters, and
+     * convert plus to space.
+     * @param string A string that may contain
+     *      <code>+</code>&nbsp;<small>(plus)</small> and
+     *      <code>%</code><i>hh</i> sequences.
+     * @return The unescaped string.
+     */
+    public static String unescape(String string) {
+        int length = string.length();
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < length; ++i) {
+            char c = string.charAt(i);
+            if (c == '+') {
+                c = ' ';
+            } else if (c == '%' && i + 2 < length) {
+                int d = JSONTokener.dehexchar(string.charAt(i + 1));
+                int e = JSONTokener.dehexchar(string.charAt(i + 2));
+                if (d >= 0 && e >= 0) {
+                    c = (char)(d * 16 + e);
+                    i += 2;
+                }
+            }
+            sb.append(c);
+        }
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/CookieList.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/CookieList.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/CookieList.java
new file mode 100644
index 0000000..71616a7
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/CookieList.java
@@ -0,0 +1,90 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.util.Iterator;
+
+/**
+ * Convert a web browser cookie list string to a JSONObject and back.
+ * @author JSON.org
+ * @version 2010-12-24
+ */
+public class CookieList {
+
+    /**
+     * Convert a cookie list into a JSONObject. A cookie list is a sequence
+     * of name/value pairs. The names are separated from the values by '='.
+     * The pairs are separated by ';'. The names and the values
+     * will be unescaped, possibly converting '+' and '%' sequences.
+     *
+     * To add a cookie to a cooklist,
+     * cookielistJSONObject.put(cookieJSONObject.getString("name"),
+     *     cookieJSONObject.getString("value"));
+     * @param string  A cookie list string
+     * @return A JSONObject
+     * @throws JSONException
+     */
+    public static JSONObject toJSONObject(String string) throws JSONException {
+        JSONObject jo = new JSONObject();
+        JSONTokener x = new JSONTokener(string);
+        while (x.more()) {
+            String name = Cookie.unescape(x.nextTo('='));
+            x.next('=');
+            jo.put(name, Cookie.unescape(x.nextTo(';')));
+            x.next();
+        }
+        return jo;
+    }
+
+
+    /**
+     * Convert a JSONObject into a cookie list. A cookie list is a sequence
+     * of name/value pairs. The names are separated from the values by '='.
+     * The pairs are separated by ';'. The characters '%', '+', '=', and ';'
+     * in the names and values are replaced by "%hh".
+     * @param jo A JSONObject
+     * @return A cookie list string
+     * @throws JSONException
+     */
+    public static String toString(JSONObject jo) throws JSONException {
+        boolean      b = false;
+        Iterator     keys = jo.keys();
+        String       string;
+        StringBuffer sb = new StringBuffer();
+        while (keys.hasNext()) {
+            string = keys.next().toString();
+            if (!jo.isNull(string)) {
+                if (b) {
+                    sb.append(';');
+                }
+                sb.append(Cookie.escape(string));
+                sb.append("=");
+                sb.append(Cookie.escape(jo.getString(string)));
+                b = true;
+            }
+        }
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/HTTP.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/HTTP.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/HTTP.java
new file mode 100644
index 0000000..241a67d
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/HTTP.java
@@ -0,0 +1,163 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.util.Iterator;
+
+/**
+ * Convert an HTTP header to a JSONObject and back.
+ * @author JSON.org
+ * @version 2010-12-24
+ */
+public class HTTP {
+
+    /** Carriage return/line feed. */
+    public static final String CRLF = "\r\n";
+
+    /**
+     * Convert an HTTP header string into a JSONObject. It can be a request
+     * header or a response header. A request header will contain
+     * <pre>{
+     *    Method: "POST" (for example),
+     *    "Request-URI": "/" (for example),
+     *    "HTTP-Version": "HTTP/1.1" (for example)
+     * }</pre>
+     * A response header will contain
+     * <pre>{
+     *    "HTTP-Version": "HTTP/1.1" (for example),
+     *    "Status-Code": "200" (for example),
+     *    "Reason-Phrase": "OK" (for example)
+     * }</pre>
+     * In addition, the other parameters in the header will be captured, using
+     * the HTTP field names as JSON names, so that <pre>
+     *    Date: Sun, 26 May 2002 18:06:04 GMT
+     *    Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
+     *    Cache-Control: no-cache</pre>
+     * become
+     * <pre>{...
+     *    Date: "Sun, 26 May 2002 18:06:04 GMT",
+     *    Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
+     *    "Cache-Control": "no-cache",
+     * ...}</pre>
+     * It does no further checking or conversion. It does not parse dates.
+     * It does not do '%' transforms on URLs.
+     * @param string An HTTP header string.
+     * @return A JSONObject containing the elements and attributes
+     * of the XML string.
+     * @throws JSONException
+     */
+    public static JSONObject toJSONObject(String string) throws JSONException {
+        JSONObject     jo = new JSONObject();
+        HTTPTokener    x = new HTTPTokener(string);
+        String         token;
+
+        token = x.nextToken();
+        if (token.toUpperCase().startsWith("HTTP")) {
+
+// Response
+
+            jo.put("HTTP-Version", token);
+            jo.put("Status-Code", x.nextToken());
+            jo.put("Reason-Phrase", x.nextTo('\0'));
+            x.next();
+
+        } else {
+
+// Request
+
+            jo.put("Method", token);
+            jo.put("Request-URI", x.nextToken());
+            jo.put("HTTP-Version", x.nextToken());
+        }
+
+// Fields
+
+        while (x.more()) {
+            String name = x.nextTo(':');
+            x.next(':');
+            jo.put(name, x.nextTo('\0'));
+            x.next();
+        }
+        return jo;
+    }
+
+
+    /**
+     * Convert a JSONObject into an HTTP header. A request header must contain
+     * <pre>{
+     *    Method: "POST" (for example),
+     *    "Request-URI": "/" (for example),
+     *    "HTTP-Version": "HTTP/1.1" (for example)
+     * }</pre>
+     * A response header must contain
+     * <pre>{
+     *    "HTTP-Version": "HTTP/1.1" (for example),
+     *    "Status-Code": "200" (for example),
+     *    "Reason-Phrase": "OK" (for example)
+     * }</pre>
+     * Any other members of the JSONObject will be output as HTTP fields.
+     * The result will end with two CRLF pairs.
+     * @param jo A JSONObject
+     * @return An HTTP header string.
+     * @throws JSONException if the object does not contain enough
+     *  information.
+     */
+    public static String toString(JSONObject jo) throws JSONException {
+        Iterator     keys = jo.keys();
+        String       string;
+        StringBuffer sb = new StringBuffer();
+        if (jo.has("Status-Code") && jo.has("Reason-Phrase")) {
+            sb.append(jo.getString("HTTP-Version"));
+            sb.append(' ');
+            sb.append(jo.getString("Status-Code"));
+            sb.append(' ');
+            sb.append(jo.getString("Reason-Phrase"));
+        } else if (jo.has("Method") && jo.has("Request-URI")) {
+            sb.append(jo.getString("Method"));
+            sb.append(' ');
+            sb.append('"');
+            sb.append(jo.getString("Request-URI"));
+            sb.append('"');
+            sb.append(' ');
+            sb.append(jo.getString("HTTP-Version"));
+        } else {
+            throw new JSONException("Not enough material for an HTTP header.");
+        }
+        sb.append(CRLF);
+        while (keys.hasNext()) {
+            string = keys.next().toString();
+            if (!"HTTP-Version".equals(string)      && !"Status-Code".equals(string) &&
+                    !"Reason-Phrase".equals(string) && !"Method".equals(string) &&
+                    !"Request-URI".equals(string)   && !jo.isNull(string)) {
+                sb.append(string);
+                sb.append(": ");
+                sb.append(jo.getString(string));
+                sb.append(CRLF);
+            }
+        }
+        sb.append(CRLF);
+        return sb.toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/HTTPTokener.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/HTTPTokener.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/HTTPTokener.java
new file mode 100644
index 0000000..a3384c8
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/HTTPTokener.java
@@ -0,0 +1,77 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * The HTTPTokener extends the JSONTokener to provide additional methods
+ * for the parsing of HTTP headers.
+ * @author JSON.org
+ * @version 2010-12-24
+ */
+public class HTTPTokener extends JSONTokener {
+
+    /**
+     * Construct an HTTPTokener from a string.
+     * @param string A source string.
+     */
+    public HTTPTokener(String string) {
+        super(string);
+    }
+
+
+    /**
+     * Get the next token or string. This is used in parsing HTTP headers.
+     * @throws JSONException
+     * @return A String.
+     */
+    public String nextToken() throws JSONException {
+        char c;
+        char q;
+        StringBuffer sb = new StringBuffer();
+        do {
+            c = next();
+        } while (Character.isWhitespace(c));
+        if (c == '"' || c == '\'') {
+            q = c;
+            for (;;) {
+                c = next();
+                if (c < ' ') {
+                    throw syntaxError("Unterminated string.");
+                }
+                if (c == q) {
+                    return sb.toString();
+                }
+                sb.append(c);
+            }
+        } 
+        for (;;) {
+            if (c == 0 || Character.isWhitespace(c)) {
+                return sb.toString();
+            }
+            sb.append(c);
+            c = next();
+        }
+    }
+}


[77/79] incubator-geode git commit: Integrated Security DUnitTest for data/monitor commands

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f931bab/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
new file mode 100644
index 0000000..d8915a7
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
@@ -0,0 +1,585 @@
+package com.gemstone.gemfire.management.internal.security;
+
+import hydra.Log;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.management.Attribute;
+import javax.management.AttributeList;
+import javax.management.AttributeNotFoundException;
+import javax.management.InstanceNotFoundException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.JMX;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.junit.experimental.categories.Category;
+
+import junit.framework.TestCase;
+
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
+import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
+import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.distributed.DistributedLockService;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.management.AsyncEventQueueMXBean;
+import com.gemstone.gemfire.management.CacheServerMXBean;
+import com.gemstone.gemfire.management.DiskStoreMXBean;
+import com.gemstone.gemfire.management.DistributedLockServiceMXBean;
+import com.gemstone.gemfire.management.DistributedRegionMXBean;
+import com.gemstone.gemfire.management.DistributedSystemMXBean;
+import com.gemstone.gemfire.management.LockServiceMXBean;
+import com.gemstone.gemfire.management.ManagerMXBean;
+import com.gemstone.gemfire.management.MemberMXBean;
+import com.gemstone.gemfire.management.RegionMXBean;
+import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
+import com.gemstone.gemfire.management.internal.security.ResourceOperationContext.ResourceOperationCode;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+/**
+ * Test all mbean operations by granting and revoking the access levels required
+ * for performing that operation
+ * 
+ * @author tushark
+ * 
+ */
+@Category(UnitTest.class)
+public class MBeanSecurityJUnitTest extends TestCase {
+
+  private static final String USER = "custom";
+  private static final String PASSWORD = "password123";
+  private JMXConnector connector = null;
+  
+  
+  public static class MyAsyncEventListener implements AsyncEventListener {
+    @Override
+    public void close() {
+     
+      
+    }
+
+    @Override
+    public boolean processEvents(List<AsyncEvent> events) {
+      return false;
+    }
+    
+  }
+
+  public void testGemfireMBeans() throws IOException, InstanceNotFoundException, MBeanException, ReflectionException,
+      AttributeNotFoundException, InvalidAttributeValueException, MalformedObjectNameException {
+    Log.createLogWriter("testGemfireMBeans", "info");
+    GemFireCacheImpl cache = null;
+    DistributedSystem ds = null;
+    Properties pr = new Properties();
+    pr.put("name", "testGemfireMBeans");
+    pr.put(DistributionConfig.JMX_MANAGER_NAME, "true");
+    pr.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
+    int port = AvailablePortHelper.getRandomAvailableTCPPort();
+    pr.put(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(port));
+    pr.put(DistributionConfig.HTTP_SERVICE_PORT_NAME, "0");
+
+    pr.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME,
+        "com.gemstone.gemfire.management.internal.security.TestAuthenticator.create");
+    pr.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME,
+        "com.gemstone.gemfire.management.internal.security.TestAccessControl.create");
+    pr.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME,
+        "com.gemstone.gemfire.management.internal.security.TestAccessControl.create");
+    ds = DistributedSystem.connect(pr);
+    cache = (GemFireCacheImpl) CacheFactory.create(ds);
+    
+    DistributedLockService.create("mydsLock", ds);
+
+    TestAuthenticator.addUser(USER, PASSWORD);
+    TestAccessControl.grantResourceOp("custom", ResourceOperationCode.DATA_READ);
+    TestAccessControl.grantResourceOp("custom", ResourceOperationCode.CREATE_REGION);
+    TestAccessControl.grantCacheOp("custom", OperationCode.REGION_CREATE);
+    TestAccessControl.grantResourceOp("custom", ResourceOperationCode.CREATE_DISKSTORE);
+    TestAccessControl.grantResourceOp("custom", ResourceOperationCode.CREATE_AEQ);
+
+    int cacheServerPort = AvailablePortHelper.getRandomAvailableTCPPort();
+    CacheServer cacheServer = cache.addCacheServer();
+    cacheServer.setPort(cacheServerPort);
+    cacheServer.start();
+    
+    connector = getGemfireMBeanServer(port, USER, PASSWORD);
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName memberON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(), "fetchMemberObjectName",
+        new Object[] { "testGemfireMBeans" }, new String[] { String.class.getCanonicalName() });
+
+    MemberMXBean member = (MemberMXBean) JMX.newMBeanProxy(conn, memberON, MemberMXBean.class);
+
+    File diskDir = new File("mydiskstore");
+    diskDir.mkdir();
+    assertTrue(diskDir.exists());
+    String result = member.processCommand("create disk-store --name=mydiskstore --dir=" + diskDir.getAbsolutePath());
+    assertNotNull(result);
+    result = member.processCommand("create region --name=region1 --type=REPLICATE");
+    assertNotNull(result);    
+    result = member.processCommand(
+        "create async-event-queue --id=aeq1 --listener=\"com.gemstone.gemfire.management.internal.security.MBeanSecurityJUnitTest$MyAsyncEventListener\"");
+    assertNotNull(result);
+
+    TestAccessControl.revokeResourceOp("custom", ResourceOperationCode.CREATE_REGION);
+    TestAccessControl.revokeCacheOp("custom", OperationCode.REGION_CREATE);
+    TestAccessControl.revokeResourceOp("custom", ResourceOperationCode.CREATE_DISKSTORE);
+    TestAccessControl.revokeResourceOp("custom", ResourceOperationCode.CREATE_AEQ);
+
+    doTestDistributedSystemMXBean(port);
+    doTestMemberMXBean(port);
+
+    doTestDiskStoreMXBean(port);
+    doTestCacheServerMXBean(port, cacheServerPort);
+    //TODO : needs WAN
+    // doTestGatewayReceiverMXBean(port);
+    // doTestGatewaySenderMXBean(port);
+    doTestLockServiceMXBean(port);
+    doTestManagerMXBean(port);
+    doTestRegionMXBean(port);
+    //TODO : Needs Locator in DS
+    doTestLocatorMXBean(port);
+    doTestDistributedLockServiceMXBean(port);
+    doTestDistributedRegionMXBean(port);
+    doTestAsyncEventQueueMXBean(port);
+    doTestAccessControlMXBean(port);
+
+    cache.close();
+    ds.disconnect();
+  }
+
+  private void doTestAccessControlMXBean(int port) throws MalformedObjectNameException, IOException {    
+    ObjectName accessControlON = new ObjectName(ResourceConstants.OBJECT_NAME_ACCESSCONTROL);
+    checkMethod(port, AccessControlMXBean.class, accessControlON, "authorize", 
+        new Object[] { ResourceOperationCode.DATA_READ.toString() },
+        ResourceOperationCode.LIST_DS);
+  }
+
+  private void doTestAsyncEventQueueMXBean(int port) throws InstanceNotFoundException, ReflectionException, IOException {
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName aeqON = MBeanJMXAdapter.getAsycnEventQueueMBeanName("testGemfireMBeans", "aeq1");
+    
+    checkAttributes(port, AsyncEventQueueMXBean.class, aeqON, new String[] { "BatchSize", "BatchTimeInterval",
+        "BatchConflationEnabled", "Persistent", "Primary", "DispatcherThreads", "OrderPolicy", "DiskSynchronous",
+        "Parallel", "AsyncEventListener", "EventQueueSize" });
+    
+  }
+
+  private void doTestDistributedRegionMXBean(int port) throws IOException, InstanceNotFoundException, MBeanException,
+      ReflectionException {
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName regionON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(),
+        "fetchDistributedRegionObjectName", new Object[] { "/region1" },
+        new String[] { String.class.getCanonicalName() });
+
+    checkAttributes(port, DistributedRegionMXBean.class, regionON, new String[] { "Name", "RegionType", "FullPath",
+        "LastModifiedTime", "PutsRate", "GatewayEnabled", "PersistentEnabled" });
+
+    checkMethod(port, DistributedRegionMXBean.class, regionON, "listSubRegionPaths", new Object[] { true },
+        ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, DistributedRegionMXBean.class, regionON, "listRegionAttributes", null,
+        ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, DistributedRegionMXBean.class, regionON, "listMembershipAttributes", null,
+        ResourceOperationCode.LIST_DS);
+
+  }
+
+  private void doTestDistributedLockServiceMXBean(int port) throws IOException, InstanceNotFoundException,
+      MBeanException, ReflectionException {
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName mydsLockON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(),
+        "fetchDistributedLockServiceObjectName", new Object[] { "mydsLock" },
+        new String[] { String.class.getCanonicalName() });
+
+    checkAttributes(port, DistributedLockServiceMXBean.class, mydsLockON, new String[] { "Name", "MemberCount",
+        "MemberNames" });
+
+    checkMethod(port, DistributedLockServiceMXBean.class, mydsLockON, "fetchGrantorMember", null,
+        ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, DistributedLockServiceMXBean.class, mydsLockON, "listHeldLocks", null,
+        ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, DistributedLockServiceMXBean.class, mydsLockON, "listThreadsHoldingLock", null,
+        ResourceOperationCode.LIST_DS);
+
+  }
+
+  private void doTestLocatorMXBean(int port) {
+
+    /*MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName regionON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(), "fetchRegionObjectName",
+        new Object[] { "testGemfireMBeans", "/region1" },
+        new String[] { String.class.getCanonicalName(), String.class.getCanonicalName() });
+        
+      checkAttributes(port, LocatorMXBean.class, locatorON, new String[] { "Port",
+        "BindAddress",
+        "HostnameForClients",
+        "PeerLocator",
+        "ServerLocator"});   
+        
+      checkMethod(port, LocatorMXBean.class, locatorON, "viewLog", null,
+        ResourceOperationCode.LIST_DS);
+        
+      checkMethod(port, LocatorMXBean.class, locatorON, "listPotentialManagers", null,
+        ResourceOperationCode.LIST_DS); 
+        
+      checkMethod(port, LocatorMXBean.class, locatorON, "listManagers", null,
+        ResourceOperationCode.LIST_DS);                            
+        */
+    
+  }
+
+  private void doTestRegionMXBean(int port) throws IOException, InstanceNotFoundException, MBeanException,
+      ReflectionException {
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName regionON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(), "fetchRegionObjectName",
+        new Object[] { "testGemfireMBeans", "/region1" },
+        new String[] { String.class.getCanonicalName(), String.class.getCanonicalName() });
+
+    checkAttributes(port, RegionMXBean.class, regionON, new String[] { "Name", "RegionType", "FullPath",
+        "LastModifiedTime", "PutsRate", "GatewayEnabled", "PersistentEnabled" });
+
+    checkMethod(port, RegionMXBean.class, regionON, "listSubregionPaths", new Object[] { true },
+        ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, RegionMXBean.class, regionON, "listRegionAttributes", null, ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, RegionMXBean.class, regionON, "listMembershipAttributes", null, ResourceOperationCode.LIST_DS);
+
+  }
+
+  private void doTestManagerMXBean(int port) throws IOException, InstanceNotFoundException, MBeanException,
+      ReflectionException, AttributeNotFoundException, InvalidAttributeValueException {
+
+    ObjectName managerON = MBeanJMXAdapter.getManagerName();
+
+    checkAttributes(port, ManagerMXBean.class, managerON, new String[] { "Running", "StatusMessage" });
+
+    checkSetAttribute(port, managerON, "StatusMessage", "StatusMessage", ResourceOperationCode.LIST_DS);
+    
+    checkSetAttribute(port, managerON, "PulseURL", "PulseURL", ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, ManagerMXBean.class, managerON, "start", null, ResourceOperationCode.START_MANAGER);
+
+    /*-
+     * checkMethod(port, LockServiceMXBean.class, managerON, "stop", null,
+     * ResourceOperationCode.STOP_MANAGER);
+     */
+  }
+
+  private void doTestLockServiceMXBean(int port) throws IOException, InstanceNotFoundException, MBeanException,
+      ReflectionException {
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName mydsLockON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(),
+        "fetchLockServiceObjectName", new Object[] { "testGemfireMBeans", "mydsLock" },
+        new String[] { String.class.getCanonicalName(), String.class.getCanonicalName() });
+    checkAttributes(port, LockServiceMXBean.class, mydsLockON, new String[]{"Name", "Distributed",
+      "MemberCount", "MemberNames", "LockGrantor"});
+    
+    checkMethod(port, LockServiceMXBean.class, mydsLockON, "listThreadsHoldingLock", null,
+        ResourceOperationCode.LIST_DS);
+    
+    checkMethod(port, LockServiceMXBean.class, mydsLockON, "listHeldLocks", null,
+        ResourceOperationCode.LIST_DS);
+    
+    checkMethod(port, LockServiceMXBean.class, mydsLockON, "fetchGrantorMember", null,
+        ResourceOperationCode.LIST_DS);
+    
+    checkMethod(port, LockServiceMXBean.class, mydsLockON, "becomeLockGrantor", null,
+        ResourceOperationCode.BECOME_LOCK_GRANTOR);    
+  }
+
+  private void doTestGatewaySenderMXBean(int port) {
+
+  }
+
+  private void doTestGatewayReceiverMXBean(int port) {
+
+  }
+
+  private void doTestCacheServerMXBean(int port, int cacheServerPort) throws IOException, InstanceNotFoundException,
+      MBeanException, ReflectionException {
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName cacheServerON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(),
+        "fetchCacheServerObjectName", new Object[] { "testGemfireMBeans", cacheServerPort }, new String[] {
+            String.class.getCanonicalName(), int.class.getName() });
+    
+    checkAttributes(port, CacheServerMXBean.class, cacheServerON, new String[] { "Port", "BindAddress",
+        "MaxConnections", "Running" });
+    
+    checkMethod(port, CacheServerMXBean.class, cacheServerON, "showAllClientStats", null, ResourceOperationCode.LIST_DS);
+
+    /*checkMethod(port, CacheServerMXBean.class, cacheServerON, "showClientQueueDetails", null,
+        ResourceOperationCode.LIST_DS);*/
+    
+    checkMethod(port, CacheServerMXBean.class, cacheServerON, "removeIndex", new Object[]{"indexName"},
+        ResourceOperationCode.DESTROY_INDEX);
+    
+    checkMethod(port, CacheServerMXBean.class, cacheServerON, "executeContinuousQuery", new Object[]{"queryName"},
+        ResourceOperationCode.QUERY);
+    
+    checkMethod(port, CacheServerMXBean.class, cacheServerON, "stopContinuousQuery", new Object[]{"queryName"},
+        ResourceOperationCode.STOP_CONTINUOUS_QUERY);
+  }
+
+  private void doTestDiskStoreMXBean(int port) throws IOException, InstanceNotFoundException, MBeanException,
+      ReflectionException, AttributeNotFoundException, InvalidAttributeValueException {
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName diskStoreON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(),
+        "fetchDiskStoreObjectName", new Object[] { "testGemfireMBeans", "mydiskstore" },
+        new String[] { String.class.getCanonicalName(), String.class.getCanonicalName() });
+
+    checkMethod(port, DiskStoreMXBean.class, diskStoreON, "flush", null, ResourceOperationCode.FLUSH_DISKSTORE);
+
+    checkMethod(port, DiskStoreMXBean.class, diskStoreON, "forceRoll", null, ResourceOperationCode.FORCE_ROLL);
+
+    checkMethod(port, DiskStoreMXBean.class, diskStoreON, "forceCompaction", null,
+        ResourceOperationCode.FORCE_COMPACTION);
+
+    checkMethod(port, DiskStoreMXBean.class, diskStoreON, "isAutoCompact", null, ResourceOperationCode.LIST_DS);
+
+    checkSetAttribute(port, diskStoreON, "DiskUsageWarningPercentage", 0.78f,
+        ResourceOperationCode.SET_DISK_USAGE);
+
+    checkAttributes(port, DiskStoreMXBean.class, diskStoreON, new String[] { "MaxOpLogSize", "TimeInterval",
+        "WriteBufferSize", "DiskDirectories" , "AutoCompact", "CompactionThreshold" });
+  }
+
+  private void doTestMemberMXBean(int port) throws IOException, InstanceNotFoundException, MBeanException,
+      ReflectionException {
+    ObjectName distrSysON = MBeanJMXAdapter.getDistributedSystemName();
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    ObjectName memberON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(), "fetchMemberObjectName",
+        new Object[] { "testGemfireMBeans" }, new String[] { String.class.getCanonicalName() });
+
+    checkMethod(port, MemberMXBean.class, memberON, "showLog", new Object[] { 10 }, ResourceOperationCode.SHOW_LOG);
+
+    checkMethod(port, MemberMXBean.class, memberON, "viewLicense", null, ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, MemberMXBean.class, memberON, "compactAllDiskStores", null,
+        ResourceOperationCode.COMPACT_DISKSTORE);
+
+    checkMethod(port, MemberMXBean.class, memberON, "showJVMMetrics", null, ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, MemberMXBean.class, memberON, "showOSMetrics", null, ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, MemberMXBean.class, memberON, "listDiskStores", new Object[] { true },
+        ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, MemberMXBean.class, memberON, "listGemFireProperties", null, ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, MemberMXBean.class, memberON, "status", null, ResourceOperationCode.LIST_DS);
+  }
+
+  private void doTestDistributedSystemMXBean(int port) throws IOException {
+    ObjectName distrSysON = MBeanJMXAdapter.getDistributedSystemName();
+    checkMethod(port, DistributedSystemMXBean.class, distrSysON, "listMembers", null, ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, DistributedSystemMXBean.class, distrSysON, "changeAlertLevel", new Object[] { "error" },
+        ResourceOperationCode.CHANGE_ALERT_LEVEL);
+
+    checkMethod(port, DistributedSystemMXBean.class, distrSysON, "backupAllMembers", new Object[] { "error", "error" },
+        ResourceOperationCode.BACKUP_MEMBERS);
+
+    checkMethod(port, DistributedSystemMXBean.class, distrSysON, "showJVMMetrics", new Object[] { "memberName" },
+        ResourceOperationCode.LIST_DS);
+
+    checkMethod(port, DistributedSystemMXBean.class, distrSysON, "revokeMissingDiskStores",
+        new Object[] { "diskStoreId" }, ResourceOperationCode.REVOKE_MISSING_DISKSTORE);
+
+    checkMethod(port, DistributedSystemMXBean.class, distrSysON, "queryData", new Object[] { "queryString", "mmebers",
+        10 }, ResourceOperationCode.QUERY);
+
+    checkMethod(port, DistributedSystemMXBean.class, distrSysON, "setQueryResultSetLimit", new Object[] { 10 },
+        ResourceOperationCode.QUERY);
+
+    checkMethod(port, DistributedSystemMXBean.class, distrSysON, "setQueryCollectionsDepth", new Object[] { 10 },
+        ResourceOperationCode.QUERY);
+  }
+
+  private void checkMethod(int port, Class<?> mxBean, ObjectName mbeanObjectName, String methodName, Object[] args,
+      ResourceOperationCode opCode) throws IOException {
+    if (connector == null)
+      connector = getGemfireMBeanServer(port, USER, PASSWORD);
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    Object proxy = JMX.newMXBeanProxy(conn, mbeanObjectName, mxBean);
+    if (ResourceOperationCode.LIST_DS.equals(opCode)) {
+      testObject(proxy, methodName, args, false);
+    } else {
+      if (TestAccessControl.hasAccessToResourceOp(USER, opCode)) {
+        boolean removed = TestAccessControl.revokeResourceOp(USER, opCode);
+        if (!removed)
+          fail("Fail to removed opCode " + opCode);
+      }
+      testObject(proxy, methodName, args, true);
+      TestAccessControl.grantResourceOp(USER, opCode);
+      Log.getLogWriter().info("Grant opCode " + opCode);
+      testObject(proxy, methodName, args, false);
+      boolean removed = TestAccessControl.revokeResourceOp(USER, opCode);
+      if (!removed)
+        fail("Fail to removed opCode " + opCode);
+      else
+        Log.getLogWriter().info("Revoke opCode " + opCode);
+
+    }
+  }
+
+  private void checkAttributes(int port, Class<?> mxBean, ObjectName mbeanObjectName, String[] attrs)
+      throws IOException, InstanceNotFoundException, ReflectionException {
+    if (connector == null)
+      connector = getGemfireMBeanServer(port, USER, PASSWORD);
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    try {
+      AttributeList list = conn.getAttributes(mbeanObjectName, attrs);
+      assertNotNull(list);
+      assertEquals(list.size(), attrs.length);
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail("Unexpected exception " + e.getMessage());
+    } finally {
+
+    }
+    
+    //Try individual attribute to test getAttribute hook 
+    try {
+      for (String attr : attrs) {
+        conn.getAttribute(mbeanObjectName, attr);
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail("Unexpected exception " + e.getMessage());
+    } finally {
+
+    }
+    
+  }
+
+  private void checkSetAttribute(int port, ObjectName mbeanObjectName, String attr, Object value,
+      ResourceOperationCode opcode) throws IOException, InstanceNotFoundException, AttributeNotFoundException,
+      InvalidAttributeValueException, MBeanException, ReflectionException {
+    if (connector == null)
+      connector = getGemfireMBeanServer(port, USER, PASSWORD);
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
+    try {
+      Attribute attribute = new Attribute(attr, value);
+      conn.setAttribute(mbeanObjectName, attribute);
+      if (!opcode.equals(ResourceOperationCode.LIST_DS))
+        fail("SetAttribute suceeded without Access to " + opcode);
+    } catch (SecurityException e) {
+      // expected
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail("Unexpected Exception " + e.getMessage());
+    }
+
+    if (!opcode.equals(ResourceOperationCode.LIST_DS)) {
+      try {
+        TestAccessControl.grantResourceOp(USER, opcode);
+        Attribute attribute = new Attribute(attr, value);
+        conn.setAttribute(mbeanObjectName, attribute);
+      } catch (SecurityException e) {
+        e.printStackTrace();
+        fail("Unexpected SecurityException " + e.getMessage());
+      } catch (Exception e) {
+        e.printStackTrace();
+        fail("Unexpected Exception " + e.getMessage());
+      } finally {
+        TestAccessControl.revokeResourceOp(USER, opcode);
+      }
+    }
+
+  }
+
+  private void testObject(Object proxy, String methodName, Object[] args, boolean securityExceptionExpected) {
+    Method mt = null;
+    for (Method mts : proxy.getClass().getMethods()) {
+      if (mts.getName().equals(methodName)) {
+        mt = mts;
+      }
+    }
+    try {
+      Log.getLogWriter().info("Invoking method " + methodName);
+      mt.invoke(proxy, args);
+      if (securityExceptionExpected)
+        fail("Expected call to method " + methodName + " was expected to fail with security exception");
+      Log.getLogWriter().info("Successfully Invoked method " + methodName);
+    } catch (IllegalAccessException e) {
+      error("UnExpected error ", e);
+      fail(e.getMessage());
+    } catch (IllegalArgumentException e) {
+      error("UnExpected error ", e);
+      fail(e.getMessage());
+    } catch (InvocationTargetException e) {
+      Throwable t = e.getCause();
+      if (t instanceof SecurityException) {
+        if (!securityExceptionExpected) {
+          fail("Did not expect call to method " + methodName + " to fail with security exception");
+        }
+      } else {
+        // other errors are expected as wrong parameters are passed
+        // error("UnExpected error ", e);
+        // fail(e.getMessage());
+      }
+    } catch (SecurityException e) {
+      if (!securityExceptionExpected) {
+        fail("Did not expect call to method " + methodName + " to fail with security exception");
+      }
+    }
+  }
+
+  private void error(String string, Exception e) {
+    System.out.println(string);
+    e.printStackTrace();
+  }
+
+  private JMXConnector getGemfireMBeanServer(int port, String user, String pwd) {
+    String[] creds = null;
+    if (user != null)
+      creds = new String[] { user, pwd };
+    return _getGemfireMBeanServer(port, creds);
+  }
+
+  @SuppressWarnings({ "unchecked", "rawtypes" })
+  private JMXConnector _getGemfireMBeanServer(int port, Object creds) {
+    JMXServiceURL url;
+    try {
+      url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://:" + port + "/jmxrmi");
+      if (creds != null) {
+        Map env = new HashMap();
+        env.put(JMXConnector.CREDENTIALS, creds);
+        JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
+        return jmxc;
+      } else {
+        JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
+        return jmxc;
+      }
+    } catch (MalformedURLException e) {
+      fail("Error connecting to port=" + port + " " + e.getMessage());
+    } catch (IOException e) {
+      fail("Error connecting to port=" + port + " " + e.getMessage());
+    }
+    return null;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f931bab/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResultHandler.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResultHandler.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResultHandler.java
new file mode 100644
index 0000000..ab3c9ef
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResultHandler.java
@@ -0,0 +1,7 @@
+package com.gemstone.gemfire.management.internal.security;
+
+public interface ResultHandler {
+  
+  void handleExecutionResult(Object result, String sysout);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f931bab/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java
new file mode 100644
index 0000000..e777b0c
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java
@@ -0,0 +1,130 @@
+package com.gemstone.gemfire.management.internal.security;
+
+import hydra.Log;
+
+import java.security.Principal;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.operations.OperationContext;
+import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.management.internal.security.ResourceOperationContext.ResourceOperationCode;
+import com.gemstone.gemfire.security.AccessControl;
+import com.gemstone.gemfire.security.NotAuthorizedException;
+
+public class TestAccessControl implements AccessControl {
+  
+  private Principal principal=null;
+  
+  public static Map<String,Set<ResourceOperationCode>> resourceOpCodeMap = new HashMap<String,Set<ResourceOperationCode>>();
+  public static Map<String,Set<OperationCode>> opCodeMap = new HashMap<String,Set<OperationCode>>();
+  
+  public static void grantResourceOp(String user, ResourceOperationCode code) {
+    Set<ResourceOperationCode> list = resourceOpCodeMap.get(user);
+    if(list==null) {
+      list = new HashSet<ResourceOperationCode>();
+      resourceOpCodeMap.put(user,list);
+    }
+    list.add(code);
+  }
+  
+  public static void grantCacheOp(String user, OperationCode code) {
+    Set<OperationCode> list = opCodeMap.get(user);
+    if(list==null) {
+      list = new HashSet<OperationCode>();
+      opCodeMap.put(user,list);
+    }
+    list.add(code);
+  }
+  
+  public static boolean hasAccessToResourceOp(String user, ResourceOperationCode code) {
+    Set<ResourceOperationCode> list = resourceOpCodeMap.get(user);
+    return list.contains(code);
+  }
+  
+  public static boolean revokeCacheOp(String user, OperationCode code) {
+    Set<OperationCode> list = opCodeMap.get(user);
+    boolean removed = list.remove(code);
+
+    if (!removed) {
+      Log.getLogWriter().warning("Code " + code + " was not found for REVOKE access");
+    }
+    return removed;
+  }
+
+  public static boolean revokeResourceOp(String user, ResourceOperationCode code) {
+    Set<ResourceOperationCode> list = resourceOpCodeMap.get(user);
+    boolean removed = list.remove(code);
+    if (!removed) {
+      Log.getLogWriter().warning("Code " + code + " was not found for REVOKE access");
+    }
+    return removed;
+  }
+  
+  public static AccessControl create(){
+    return new TestAccessControl();
+  }
+
+  @Override
+  public void close() {
+    
+  }
+
+  @Override
+  public void init(Principal principal, DistributedMember remoteMember, Cache cache) throws NotAuthorizedException {
+    this.principal = principal;    
+  }
+
+  @Override
+  public boolean authorizeOperation(String regionName, OperationContext context) {    
+    Log.getLogWriter().info("Context Received " + context);
+    Log.getLogWriter().info("Principal " + principal.getName());    
+    boolean flag = false;
+    if (!context.getOperationCode().equals(OperationCode.RESOURCE)) {
+      if (opCodeMap.containsKey(principal.getName())) {
+        Set<OperationCode> codes = opCodeMap.get(principal.getName());
+        for (OperationCode code : codes) {
+          Log.getLogWriter().info("Checking OpCode=" + code);
+          flag = code.equals(context.getOperationCode());
+          if (flag) {
+            Log.getLogWriter().info("For Principal " + principal.getName() + " Found Granted CacheOp=" + code);
+            break;
+          }
+        }
+      }
+
+      if (flag) {        
+        return true;
+      }
+    } else {
+      if (resourceOpCodeMap.containsKey(principal.getName())) {
+        Set<ResourceOperationCode> codes = resourceOpCodeMap.get(principal.getName());
+        ResourceOperationContext ctx = (ResourceOperationContext) context;
+        flag = false;
+        for (ResourceOperationCode code : codes) {
+          Log.getLogWriter().info("Checking ResourceOpCode=" + code);
+          flag = code.allowedOp(ctx.getResourceOperationCode());
+          if (flag) {
+            Log.getLogWriter().info("For Principal " + principal.getName() + " Found Granted ResourceOp=" + code);
+            return true;
+          }
+        }
+        Log.getLogWriter().info("For Principal " + principal.getName() + " authorizeOperation failed");
+        return false;
+      } else {
+        Log.getLogWriter().info("For Principal " + principal.getName() + " authorizeOperation failed");
+        return false;
+      }
+    }
+    Log.getLogWriter().info("For Principal " + principal.getName() + " authorizeOperation failed");
+    return false;
+  }
+
+  
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f931bab/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java
new file mode 100644
index 0000000..0eae45f
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java
@@ -0,0 +1,50 @@
+package com.gemstone.gemfire.management.internal.security;
+
+import hydra.Log;
+
+import java.security.Principal;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.management.internal.security.ResourceOperationJUnit.TestUsernamePrincipal;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import com.gemstone.gemfire.security.Authenticator;
+
+public class TestAuthenticator implements Authenticator {
+  
+  public static Map<String,String> userRepo = new HashMap<String,String>();
+  
+  public static void addUser(String user, String password) {
+    userRepo.put(user, password);
+  }
+  
+  public static Authenticator create() {
+    return new TestAuthenticator();
+  }
+
+  @Override
+  public void close() {
+    
+
+  }
+
+  @Override
+  public void init(Properties securityProps, LogWriter systemLogger, LogWriter securityLogger)
+      throws AuthenticationFailedException {
+  }
+
+  @Override
+  public Principal authenticate(Properties props, DistributedMember member) throws AuthenticationFailedException {
+    String user = props.getProperty(ResourceConstants.USER_NAME);
+    String pwd = props.getProperty(ResourceConstants.PASSWORD);
+    if (user != null && userRepo.containsKey(user) && pwd != null && pwd.equals(userRepo.get(user))) {
+      Log.getLogWriter().info("Authentication successful!! for " + user);
+      return new TestUsernamePrincipal(user);
+    } else
+      throw new AuthenticationFailedException("Wrong username/password");
+  }
+
+}


[78/79] incubator-geode git commit: Integrated Security DUnitTest for data/monitor commands

Posted by tu...@apache.org.
  Integrated Security DUnitTest for data/monitor commands

  ReviewBoard URL : https://reviews.apache.org/r/39585/


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/3f931bab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/3f931bab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/3f931bab

Branch: refs/heads/feature/GEODE-17
Commit: 3f931babacccb41cf3e66592f41194fc98d8fd3b
Parents: 9525e69
Author: tushark <tu...@apache.org>
Authored: Fri Oct 23 14:58:37 2015 +0530
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:54:35 2015 +0530

----------------------------------------------------------------------
 .../internal/security/CommandTestBase.java      | 601 +++++++++++++++++
 .../internal/security/HeadlessGfsh.java         | 315 +++++++++
 .../security/HeadlessGfshJUnitTest.java         |  68 ++
 .../security/IntegratedSecDUnitTest.java        | 661 +++++++++++++++++++
 .../security/MBeanSecurityJUnitTest.java        | 585 ++++++++++++++++
 .../internal/security/ResultHandler.java        |   7 +
 .../internal/security/TestAccessControl.java    | 130 ++++
 .../internal/security/TestAuthenticator.java    |  50 ++
 8 files changed, 2417 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f931bab/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java
new file mode 100644
index 0000000..a95e605
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java
@@ -0,0 +1,601 @@
+package com.gemstone.gemfire.management.internal.security;
+
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import util.TestException;
+//import util.TestHelper;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.management.ManagementService;
+import com.gemstone.gemfire.management.internal.cli.CommandManager;
+import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
+import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
+import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
+import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
+
+import dunit.Host;
+import dunit.SerializableCallable;
+import dunit.SerializableRunnable;
+
+/**
+ * Base class for all the CLI/gfsh command dunit tests. Derived from CliCommandTestBase but not using
+ * TestableGfsh but HeadlessGfsh
+ * 
+ * @author Tushar Khairnar
+ */
+public class CommandTestBase extends CacheTestCase {
+  
+  private static final long serialVersionUID = 1L;
+
+  protected static final String USE_HTTP_SYSTEM_PROPERTY = "useHTTP";
+
+  private ManagementService managementService;
+  
+  private transient HeadlessGfsh shell;
+
+  private boolean useHttpOnConnect = Boolean.getBoolean("useHTTP");
+
+  private int httpPort;
+  private int jmxPort;
+
+  private String jmxHost;
+  
+  protected String securityFile = null;
+  protected String userName = null;
+  protected String password = null;
+  protected String commandError = null;
+  
+  public CommandTestBase(String name) {
+    super(name);
+  }
+
+  public void setUp() throws Exception {
+    super.setUp();
+  }
+
+  @Override
+  public void tearDown2() throws Exception {
+    destroyDefaultSetup();
+    super.tearDown2();
+  }
+  
+  protected void setUseHttpOnConnect(boolean useHttpOnConnect){
+    this.useHttpOnConnect = useHttpOnConnect;
+  }
+  
+  /**
+   * Create all of the components necessary for the default setup. The provided properties will be used when creating
+   * the default cache. This will create GFSH in the controller VM (VM[4]) (no cache) and the manager in VM[0] (with
+   * cache). When adding regions, functions, keys, whatever to your cache for tests, you'll need to use
+   * Host.getHost(0).getVM(0).invoke(new SerializableRunnable() { public void run() { ... } } in order to have this
+   * setup run in the same VM as the manager.
+   * <p/>
+   * @param props the Properties used when creating the cache for this default setup.
+   * @return the default testable GemFire shell.
+   */
+  @SuppressWarnings("serial")
+  protected final HeadlessGfsh createDefaultSetup(final Properties props) {
+    Object[] result = (Object[]) Host.getHost(0).getVM(0).invoke(new SerializableCallable() {
+      public Object call() {
+        final Object[] result = new Object[3];
+        final Properties localProps = (props != null ? props : new Properties());
+
+        try {
+          jmxHost = InetAddress.getLocalHost().getHostName();
+        }
+        catch (UnknownHostException ignore) {
+          jmxHost = "localhost";
+        }
+
+        if (!localProps.containsKey(DistributionConfig.NAME_NAME)) {
+          localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+        }
+
+        final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
+
+        jmxPort = ports[0];
+        httpPort = ports[1];
+
+        localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
+        localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
+        localProps.setProperty(DistributionConfig.JMX_MANAGER_BIND_ADDRESS_NAME, String.valueOf(jmxHost));
+        localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
+        localProps.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
+
+        getSystem(localProps);
+        verifyManagementServiceStarted(getCache());
+
+        result[0] = jmxHost;
+        result[1] = jmxPort;
+        result[2] = httpPort;
+
+        return result;
+      }
+    });
+
+    this.jmxHost = (String) result[0];
+    this.jmxPort = (Integer) result[1];
+    this.httpPort = (Integer) result[2];
+
+    return defaultShellConnect();
+  }
+  
+  protected boolean useHTTPByTest(){
+    return false;
+  }
+
+  /**
+   * Destroy all of the components created for the default setup.
+   */
+  @SuppressWarnings("serial")
+  protected final void destroyDefaultSetup() {
+    if (this.shell != null) {
+      // Note: HeadlessGfsh doesn't use Launcher & code that does System.exit()
+      // for gfsh is in Launcher. This is just to ensure cleanup.
+      executeCommand(shell, "exit");
+      if(shell.isConnectedAndReady()){
+        executeCommand(shell, "disconnect");
+      }
+
+      this.shell.terminate();
+      this.shell = null;
+    }
+
+    disconnectAllFromDS();
+
+    Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
+      public void run() {
+        verifyManagementServiceStopped();
+        //if (Boolean.getBoolean(USE_HTTP_SYSTEM_PROPERTY)) {
+        //  System.gc();
+        //}
+      }
+    });
+  }
+
+  /**
+   * Start the default management service using the provided Cache.
+   * 
+   * @param cache
+   *          Cache to use when creating the management service
+   */
+  private void verifyManagementServiceStarted(Cache cache) {
+    assert(cache != null);
+
+    this.managementService = ManagementService.getExistingManagementService(cache);
+    assertNotNull(this.managementService);
+    assertTrue(this.managementService.isManager());
+    assertTrue(checkIfCommandsAreLoadedOrNot());
+  }
+  
+  public static boolean checkIfCommandsAreLoadedOrNot(){          
+    CommandManager manager;
+    try {
+      manager = CommandManager.getInstance();
+      Map<String,CommandTarget> commands = manager.getCommands();
+      Set set = commands.keySet();
+      if(commands.size() < 1 ){
+        return false;
+      }
+      return true;
+    } catch (ClassNotFoundException | IOException e) {
+      throw new RuntimeException("Could not load commands", e);
+    }                
+}
+
+  /**
+   * Stop the default management service.
+   */
+  private void verifyManagementServiceStopped() {
+    if (this.managementService != null) {
+      assertFalse(this.managementService.isManager());
+      this.managementService = null;
+    }
+  }
+
+  /**
+   * Connect the default shell to the default JMX server.
+   * 
+   * @return The default shell.
+   */
+  protected HeadlessGfsh defaultShellConnect() {
+    HeadlessGfsh shell = getDefaultShell();
+    shellConnect(this.jmxHost, this.jmxPort, this.httpPort, shell);
+    return shell;
+  }
+
+  /**
+   * Connect a shell to the JMX server at the given host and port
+   * 
+   * @param host
+   *          Host of the JMX server
+   * @param jmxPort
+   *          Port of the JMX server
+   * @param shell
+   *          Shell to connect
+   */
+  protected void shellConnect(final String host, final int jmxPort, final int httpPort, HeadlessGfsh shell) {
+    assert(host != null);
+    assert(shell != null);
+
+    final CommandStringBuilder command = new CommandStringBuilder(CliStrings.CONNECT);
+    String endpoint;
+
+    if (useHttpOnConnect) {
+      endpoint = "http://" + host + ":" + httpPort + "/gemfire/v1";
+      command.addOption(CliStrings.CONNECT__USE_HTTP, Boolean.TRUE.toString());
+      command.addOption(CliStrings.CONNECT__URL, endpoint);
+     
+    }
+    else {
+      endpoint = host + "[" + jmxPort + "]";
+      command.addOption(CliStrings.CONNECT__JMX_MANAGER, endpoint);
+    }
+
+    if(this.securityFile != null){
+      command.addOption(CliStrings.CONNECT__SECURITY_PROPERTIES, securityFile);
+    }
+    
+    if(this.userName!=null) {
+      command.addOption(CliStrings.CONNECT__USERNAME, userName);
+    }
+    
+    if(this.password!=null) {
+      command.addOption(CliStrings.CONNECT__PASSWORD, password);
+    }
+
+    CommandResult result = executeCommand(shell, command.toString());
+
+    if (!shell.isConnectedAndReady()) {
+      throw new TestException("Connect command failed to connect to manager " + endpoint + " result=" + commandResultToString(result));
+    }
+
+    info("Successfully connected to managing node using " + (useHttpOnConnect ? "HTTP" : "JMX"));
+    assertEquals(true, shell.isConnectedAndReady());
+  }
+
+  /**
+   * Get the default shell (will create one if it doesn't already exist).
+   * 
+   * @return The default shell
+   */
+  protected synchronized final HeadlessGfsh getDefaultShell() {
+    if (this.shell == null) {
+      this.shell = createShell();
+    }
+
+    return this.shell;
+  }
+
+  /**
+   * Create a TestableGfsh object.
+   * 
+   * @return The created shell.
+   */
+  protected HeadlessGfsh createShell() {
+    try {
+      Gfsh.SUPPORT_MUTLIPLESHELL = true;
+      String shellId = getClass().getSimpleName()+"_"+getName();
+      HeadlessGfsh shell = new HeadlessGfsh(shellId, 300);
+      //Various command use ThreadLocal instance. following call makes
+      //HeadlessGfsh available to all the commands
+      shell.setThreadLocalInstance();
+      //Added to avoid trimming of the columns
+      //shell.setEnvProperty(Gfsh.ENV_APP_RESULT_VIEWER, "non-basic");
+      //shell.start();
+      info("Started headless shell: " + shell);
+      return shell;
+    } catch (ClassNotFoundException e) {
+      throw new TestException(getStackTrace(e));
+    } catch (IOException e) {
+      throw new TestException(getStackTrace(e));
+    }
+  }
+
+  /**
+   * Execute a command using the default shell and clear the shell events before returning.
+   * 
+   * @param command
+   *          Command to execute
+   * @return The result of the command execution
+   */
+  protected CommandResult executeCommand(String command) {
+    assert(command != null);
+
+    return executeCommand(getDefaultShell(), command);
+  }
+
+  /**
+   * Execute a command in the provided shell and clear the shell events before returning.
+   * 
+   * @param shell
+   *          Shell in which to execute the command.
+   * @param command
+   *          Command to execute
+   * @return The result of the command execution
+   */
+  protected CommandResult executeCommand(HeadlessGfsh shell, String command) {
+    assert(shell != null);
+    assert(command != null);
+    CommandResult commandResult = executeCommandWithoutClear(shell, command);
+    shell.clear();
+    return commandResult;
+  }
+
+  /**
+   * Execute a command using the default shell. Useful for getting additional information from the shell after the
+   * command has been executed (using getDefaultShell().???). Caller is responsible for calling
+   * getDefaultShell().clearEvents() when done.
+   * 
+   * @param command
+   *          Command to execute
+   * @return The result of the command execution
+   */
+  @SuppressWarnings("unused")
+  protected CommandResult executeCommandWithoutClear(String command) {
+    assert(command != null);
+
+    return executeCommandWithoutClear(getDefaultShell(), command);
+  }
+
+  /**
+   * Execute a command in the provided shell. Useful for getting additional information from the shell after the command
+   * has been executed (using getDefaultShell().???). Caller is responsible for calling getDefaultShell().clearEvents()
+   * when done.
+   * 
+   * @param shell
+   *          Shell in which to execute the command.
+   * @param command
+   *          Command to execute
+   * @return The result of the command execution
+   */
+  protected CommandResult executeCommandWithoutClear(HeadlessGfsh shell, String command) {
+    assert(shell != null);
+    assert(command != null);
+
+    try {
+      info("Executing command " + command + " with command Mgr " + CommandManager.getInstance());
+    } catch (ClassNotFoundException cnfex) {
+      throw new TestException(getStackTrace(cnfex));
+    } catch (IOException ioex) {
+      throw new TestException(getStackTrace(ioex));
+    }
+    
+    Object result =null;
+    
+    try {
+      
+      boolean status = shell.executeCommand(command);
+      result = shell.getResult();
+      
+      info("CommandExecutionSuccess=" + status );
+      info("Status=" + shell.getCommandExecutionStatus());
+      info("ShellOutputString=<" + shell.outputString + ">");
+      info("ErrorString=<" + shell.getErrorString() + ">");
+      
+      if (shell.hasError() || shell.getCommandExecutionStatus() == -1) {
+        error("executeCommand completed with error : " + shell.getErrorString() + " output=<" + shell.outputString
+            + ">");
+      }
+      
+      if(result == null || result.equals(HeadlessGfsh.ERROR_RESULT))
+          return null;
+      
+    } catch (InterruptedException e) {
+      throw new TestException(getStackTrace(e));
+    }
+    
+    return (CommandResult)result;     
+  }
+
+  /**
+   * Utility method for viewing the results of a command.
+   * 
+   * @param commandResult
+   *          Results to dump
+   * @param printStream
+   *          Stream to dump the results to
+   */
+  protected void printResult(final CommandResult commandResult, PrintStream printStream) {
+    assert(commandResult != null);
+    assert(printStream != null);
+    commandResult.resetToFirstLine();
+    printStream.print(commandResultToString(commandResult));
+  }
+
+  protected String commandResultToString(final CommandResult commandResult) {
+    assertNotNull(commandResult);
+    commandResult.resetToFirstLine();
+    StringBuilder buffer = new StringBuilder(commandResult.getHeader());
+    while (commandResult.hasNextLine()) {
+      buffer.append(commandResult.nextLine());
+    }
+    buffer.append(commandResult.getFooter());
+    return buffer.toString();
+  }
+
+  /**
+   * Utility method for finding the CommandResult object in the Map of CommandOutput objects.
+   * 
+   * @param commandOutput
+   *          CommandOutput Map to search
+   * @return The CommandResult object or null if not found.
+   */
+  protected CommandResult extractCommandResult(Map<String, Object> commandOutput) {
+    assert(commandOutput != null);
+
+    for (Object resultObject : commandOutput.values()) {
+      if (resultObject instanceof CommandResult) {
+        CommandResult result = (CommandResult) resultObject;
+        result.resetToFirstLine();
+        return result;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Utility method to determine how many times a string occurs in another string. Note that when looking for matches
+   * substrings of other matches will be counted as a match. For example, looking for "AA" in the string "AAAA" will
+   * result in a return value of 3.
+   * 
+   * @param stringToSearch
+   *          String to search
+   * @param stringToCount
+   *          String to look for and count
+   * @return The number of matches.
+   */
+  protected int countMatchesInString(final String stringToSearch, final String stringToCount) {
+    assert(stringToSearch != null);
+    assert(stringToCount != null);
+    
+    int length = stringToSearch.length();
+    int count = 0;
+    for (int i = 0; i < length; i++) {
+      if (stringToSearch.substring(i).startsWith(stringToCount)) {
+        count++;
+      }
+    }
+    return count;
+  }
+
+  /**
+   * Determines if a string contains a trimmed line that matches the pattern. So, any single line whose leading and
+   * trailing spaces have been removed which contains a string that exactly matches the given pattern will be considered
+   * a match.
+   * 
+   * @param stringToSearch
+   *          String to search
+   * @param stringPattern
+   *          Pattern to search for
+   * @return True if a match is found, false otherwise
+   */
+  protected boolean stringContainsLine(final String stringToSearch, final String stringPattern) {
+    assert(stringToSearch != null);
+    assert(stringPattern != null);
+    
+    Pattern pattern = Pattern.compile("^\\s*" + stringPattern + "\\s*$", Pattern.MULTILINE);
+    Matcher matcher = pattern.matcher(stringToSearch);
+    return matcher.find();
+  }
+
+  /**
+   * Counts the number of distinct lines in a String.
+   * 
+   * @param stringToSearch
+   *          String to search for lines.
+   * @param countBlankLines
+   *          Whether to count blank lines (true to count)
+   * @return The number of lines found.
+   */
+  protected int countLinesInString(final String stringToSearch, final boolean countBlankLines) {
+    assert(stringToSearch != null);
+    
+    int length = stringToSearch.length();
+    int count = 0;
+    char character = 0;
+    boolean foundNonSpaceChar = false;
+
+    for (int i = 0; i < length; i++) {
+      character = stringToSearch.charAt(i);
+      if (character == '\n' || character == '\r') {
+        if (countBlankLines) {
+          count++;
+        } else {
+          if (foundNonSpaceChar) {
+            count++;
+          }
+        }
+        foundNonSpaceChar = false;
+      } else if (character != ' ' && character != '\t') {
+        foundNonSpaceChar = true;
+      }
+    }
+
+    // Even if the last line isn't terminated, it still counts as a line
+    if (character != '\n' && character != '\r') {
+      count++;
+    }
+
+    return count;
+  }
+
+  /** 
+   * Get a specific line from the string (using \n or \r as a line separator).
+   * 
+   * @param stringToSearch String to get the line from
+   * @param lineNumber Line number to get
+   * @return The line
+   */
+  protected String getLineFromString(final String stringToSearch, final int lineNumber) {
+    assert(stringToSearch != null);
+    assert(lineNumber > 0);
+    
+    int length = stringToSearch.length();
+    int count = 0;
+    int startIndex = 0;
+    char character;
+    int endIndex = length;
+
+    for (int i = 0; i < length; i++) {
+      character = stringToSearch.charAt(i);
+      if (character == '\n' || character == '\r') {
+        if (lineNumber == 1) {
+          endIndex = i;
+          break;
+        }
+        if (++count == lineNumber-1) {
+          startIndex = i+1;
+        } else if (count >= lineNumber) {
+          endIndex = i;
+          break;
+        }
+      }
+    }
+
+    return stringToSearch.substring(startIndex, endIndex);
+  }
+  
+  protected void info(String string) {
+    getLogWriter().info(string);
+  }
+
+  protected void debug(String string) {
+    getLogWriter().fine(string);
+  }
+
+  protected void error(String string) {
+    commandError = string;
+    getLogWriter().error(string);
+  }
+
+  protected void error(String string, Throwable e) {
+    commandError = string;
+    getLogWriter().error(string, e);
+  }
+  
+  protected Object[] getJMXEndPoint(){
+    return new Object[] {jmxHost, jmxPort };
+  }
+  
+  public static String getStackTrace(Throwable aThrowable) {
+    StringWriter sw = new StringWriter();
+    aThrowable.printStackTrace(new PrintWriter(sw, true));
+    return sw.toString();
+ }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f931bab/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/HeadlessGfsh.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/HeadlessGfsh.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/HeadlessGfsh.java
new file mode 100644
index 0000000..d73a260
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/HeadlessGfsh.java
@@ -0,0 +1,315 @@
+package com.gemstone.gemfire.management.internal.security;
+
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.logging.Level;
+
+import jline.ConsoleReader;
+
+import org.springframework.shell.core.ExitShellRequest;
+import org.springframework.shell.event.ShellStatus.Status;
+
+import com.gemstone.gemfire.management.internal.cli.CliUtil;
+import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
+import com.gemstone.gemfire.management.internal.cli.shell.GfshConfig;
+import com.gemstone.gemfire.management.internal.cli.shell.jline.GfshUnsupportedTerminal;
+
+
+/**
+ * This is headless shell which can be used to submit random commands and get command-result 
+ * It is used for commands testing but can be used as for anything like programmatically
+ * sending commands to operate on GemFire Distributed systems.
+ * TODO : Merge HeadlessGfsh and HeadlessGfshShell
+ * TODO : Provide constructor for optionally specifying GfshConfig to provide logDirectory and logLevel
+ *  
+ * @author tushark
+ *
+ */
+@SuppressWarnings("rawtypes")
+public class HeadlessGfsh  implements ResultHandler {
+  
+  public static final String ERROR_RESULT = "_$_ERROR_RESULT";
+
+  private HeadlessGfshShell shell = null;  
+  private LinkedBlockingQueue queue = new LinkedBlockingQueue<>();
+  private long timeout = 20;
+  public String outputString=null;
+  
+  public HeadlessGfsh(String name, int timeout) throws ClassNotFoundException, IOException {
+    this.timeout = timeout;
+    System.setProperty("jline.terminal", GfshUnsupportedTerminal.class.getName());    
+    this.shell = new HeadlessGfshShell(name, this);
+    this.shell.start();
+  }
+  
+  public void setThreadLocalInstance(){
+    shell.setThreadLocalInstance();
+  }
+  
+  //TODO : Have non-blocking method also where we move executeCommand call to separate thread-pool
+  public boolean executeCommand(String command) {
+    boolean status = false;
+    try {
+      outputString = null;
+      status = shell.executeCommand(command);
+    } catch (Exception e) {
+      outputString = e.getMessage();
+    }
+    return status;
+  }
+  
+  int getCommandExecutionStatus(){
+    return shell.getCommandExecutionStatus();
+  }
+  
+  @SuppressWarnings("unchecked")
+  @Override
+  public void handleExecutionResult(Object result, String sysout) {    
+    queue.add(result);
+    outputString = sysout;
+  }
+  
+  public Object getResult() throws InterruptedException {
+    Object result = queue.poll(timeout, TimeUnit.SECONDS);
+    queue.clear();
+    return result;
+  }
+  
+  public void clear(){
+    queue.clear();
+    outputString = null;
+  }
+  
+  public void terminate() {    
+    shell.terminate();
+  }
+  
+  public boolean isConnectedAndReady() {
+    return shell.isConnectedAndReady();
+  }
+  
+  public String getErrorString() {
+    return shell.errorString;
+  }
+
+  public boolean hasError() {
+    return shell.hasError();
+  }   
+  
+  public static class HeadlessGfshShell extends Gfsh {
+
+    private ResultHandler handler = null;
+    private final Lock lock = new ReentrantLock();
+    private final Condition endOfShell = lock.newCondition();
+    private ByteArrayOutputStream output = null;
+    private String errorString = null;
+    private boolean hasError = false;
+
+    protected HeadlessGfshShell(String testName, ResultHandler handler) throws ClassNotFoundException, IOException {
+      super(false, new String[] {}, new HeadlessGfshConfig(testName));
+      this.handler = handler;
+    }
+
+    public void setThreadLocalInstance() {
+      gfshThreadLocal.set(this);      
+    }
+
+    protected void handleExecutionResult(Object result) {
+      if(!result.equals(ERROR_RESULT)) {
+        super.handleExecutionResult(result);
+        handler.handleExecutionResult(result, output.toString());
+        output.reset();
+      } else {
+        //signal waiting queue with error condition with empty output
+        output.reset();
+        handler.handleExecutionResult(result, output.toString());        
+      }
+    }      
+
+    int getCommandExecutionStatus() {
+      return getLastExecutionStatus();
+    }
+
+    public void terminate() {
+      closeShell();
+      stopPromptLoop();
+      stop();
+    }
+    
+    private void stopPromptLoop() {
+      lock.lock();
+      try {
+        endOfShell.signalAll();
+      } finally {
+        lock.unlock();
+      }      
+    }
+    
+    public String getErrorString() {
+      return errorString;
+    }
+
+    public boolean hasError() {
+      return hasError;
+    }
+
+    /**
+     * We override this method just to fool runner thread in reading from nothing. It waits for Condition endOfShell
+     * which is signalled when terminate is called. This achieves clean shutdown of runner thread. 
+     */
+    @Override
+    public void promptLoop() {
+      lock.lock();
+      try {
+        while (true) {
+          try {
+            endOfShell.await();
+          } catch (InterruptedException e) {
+            //e.printStackTrace();
+          }
+          this.exitShellRequest = ExitShellRequest.NORMAL_EXIT;
+          setShellStatus(Status.SHUTTING_DOWN);
+          break;
+        }
+      } finally {
+        lock.unlock();
+      }
+    }
+
+    private static void setGfshOutErr(PrintStream outToUse) {
+      Gfsh.gfshout = outToUse;
+      Gfsh.gfsherr = outToUse;
+    }
+    
+    /**
+     * This prints out error messages when Exceptions occur in shell. Capture it
+     * and set error flag=true and send ERROR_RESULT on the queue to signal thread
+     * waiting for CommandResult
+     */
+    @Override
+    public void logWarning(String message, Throwable t) {
+      super.logWarning(message, t);
+      errorString = message;
+      hasError = true;
+      //signal waiting queue with error condition
+      handleExecutionResult(ERROR_RESULT);
+    }
+
+    /**
+     * This prints out error messages when Exceptions occur in shell. Capture it
+     * and set error flag=true and send ERROR_RESULT on the queue to signal thread
+     * waiting for CommandResult
+     */
+    @Override
+    public void logSevere(String message, Throwable t) {
+      super.logSevere(message, t);
+      errorString = message;
+      hasError = true;
+      //signal waiting queue with error condition
+      handleExecutionResult(ERROR_RESULT);
+    }
+    
+    /**
+     * Setup console-reader to capture Shell output
+     */
+    @Override
+    protected ConsoleReader createConsoleReader() {
+      try {        
+        output = new ByteArrayOutputStream(1024 * 10);
+        PrintStream sysout = new PrintStream(output);
+        Writer wrappedOut = new BufferedWriter(new OutputStreamWriter(sysout));
+        setGfshOutErr(sysout);
+        return new ConsoleReader(new FileInputStream(FileDescriptor.in),new PrintWriter(wrappedOut));
+      } catch (IOException e) {        
+        throw new RuntimeException(e);
+      }
+    }
+  }
+  
+  
+  /**
+   * HeadlessGfshConfig for tests. Taken from TestableGfsh
+   */
+  static class HeadlessGfshConfig extends GfshConfig {
+    {
+      // set vm as a gfsh vm
+      CliUtil.isGfshVM = true;
+    }
+
+    private File   parentDir;
+    private String fileNamePrefix;
+    private String name;
+    private String generatedHistoryFileName = null;
+
+    public HeadlessGfshConfig(String name) {
+      this.name = name;
+
+      if (isDUnitTest(this.name)) {
+        fileNamePrefix = this.name;
+      } else {        
+        fileNamePrefix = "non-hydra-client";
+      }
+
+      parentDir = new File("gfsh_files");
+      parentDir.mkdirs();
+    }
+
+    private static boolean isDUnitTest(String name) {
+      boolean isDUnitTest = false;
+      if (name != null) {
+        String[] split = name.split("_");
+        if (split.length != 0 && split[0].endsWith("DUnitTest")) {
+          isDUnitTest = true;
+        }
+      }
+      return isDUnitTest;
+    }
+
+    @Override
+    public String getLogFilePath() {
+      return new File(parentDir, getFileNamePrefix() + "-gfsh.log").getAbsolutePath();
+    }
+
+    private String getFileNamePrefix() {
+      String timeStamp = new java.sql.Time(System.currentTimeMillis()).toString();
+      timeStamp = timeStamp.replace(':', '_');
+      return fileNamePrefix + "-" + timeStamp;
+    }
+
+    @Override
+    public String getHistoryFileName() {
+      if(generatedHistoryFileName == null) {
+        String fileName = new File(parentDir, (getFileNamePrefix() +"-gfsh.history")).getAbsolutePath();
+        generatedHistoryFileName = fileName;
+        return fileName;
+      } else {
+        return generatedHistoryFileName;
+      }
+    }
+
+    @Override
+    public boolean isTestConfig() {
+      return true;
+    }
+
+    @Override
+    public Level getLogLevel() {
+      // Keep log level fine for tests
+      return Level.FINE;
+    }
+  }
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f931bab/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/HeadlessGfshJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/HeadlessGfshJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/HeadlessGfshJUnitTest.java
new file mode 100644
index 0000000..a5abc33
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/HeadlessGfshJUnitTest.java
@@ -0,0 +1,68 @@
+package com.gemstone.gemfire.management.internal.security;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import javax.management.ObjectName;
+
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+
+/**
+ * TODO : Add more tests for error-catch, different type of results etc
+ * 
+ * @author tushark
+ *
+ */
+@Category(UnitTest.class)
+public class HeadlessGfshJUnitTest {
+
+  @SuppressWarnings({ "unused", "deprecation", "unused" })
+  @Test
+  public void testHeadlessGfshTest() throws ClassNotFoundException, IOException, InterruptedException {    
+    GemFireCacheImpl cache = null;
+    DistributedSystem ds = null;
+    Properties pr = new Properties();
+    pr.put("name", "testHeadlessGfshTest");
+    pr.put(DistributionConfig.JMX_MANAGER_NAME, "true");
+    pr.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
+    int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
+    pr.put(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(port));
+    pr.put(DistributionConfig.HTTP_SERVICE_PORT_NAME, "0");
+    pr.put(DistributionConfig.MCAST_PORT_NAME,"0");
+    
+    ds = DistributedSystem.connect(pr);
+    cache = (GemFireCacheImpl) CacheFactory.create(ds);
+    ObjectName name = MBeanJMXAdapter.getDistributedSystemName();
+    
+    HeadlessGfsh gfsh = new HeadlessGfsh("Test",20);
+    for(int i=0;i<5;i++) {
+      gfsh.executeCommand("connect --jmx-manager=localhost["+port+"]");
+      Object result = gfsh.getResult();
+      assertTrue(gfsh.isConnectedAndReady());
+      assertNotNull(result);
+      gfsh.clear();
+      gfsh.executeCommand("list members");
+      result = gfsh.getResult();
+      assertNotNull(result);
+      gfsh.executeCommand("disconnect");
+      gfsh.getResult();
+    }
+    gfsh.terminate();    
+    cache.close();
+    ds.disconnect();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3f931bab/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java
new file mode 100644
index 0000000..8258e49
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java
@@ -0,0 +1,661 @@
+package com.gemstone.gemfire.management.internal.security;
+
+import hydra.Log;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionService;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.client.ClientCache;
+import com.gemstone.gemfire.cache.client.ClientCacheFactory;
+import com.gemstone.gemfire.cache.client.ClientRegionFactory;
+import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
+import com.gemstone.gemfire.management.internal.cli.domain.DataCommandRequest;
+import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
+import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData;
+import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData.SectionResultData;
+import com.gemstone.gemfire.management.internal.cli.result.ErrorResultData;
+import com.gemstone.gemfire.management.internal.cli.result.ResultData;
+import com.gemstone.gemfire.management.internal.security.ResourceOperationContext.ResourceOperationCode;
+import com.gemstone.gemfire.security.AuthInitialize;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+
+import dunit.Host;
+import dunit.SerializableRunnable;
+import dunit.VM;
+
+/**
+ * @author tushark
+ * 
+ */
+public class IntegratedSecDUnitTest extends CommandTestBase {
+
+  public static class AuthInitializer implements AuthInitialize {
+
+    public static AuthInitialize create() {
+      return new AuthInitializer();
+    }
+
+    public void init(LogWriter systemLogger, LogWriter securityLogger) throws AuthenticationFailedException {
+    }
+
+    public Properties getCredentials(Properties p, DistributedMember server, boolean isPeer)
+        throws AuthenticationFailedException {
+      return p;
+    }
+
+    public void close() {
+    }
+  }
+
+  private static final long serialVersionUID = 1L;
+  private static IntegratedSecDUnitTest instance = new IntegratedSecDUnitTest("IntegratedSecDUnitTest");
+
+  private Cache cache;
+  private DistributedSystem ds;
+  private CacheServer cacheServer;
+  private ClientCache clientCache;
+  private int cacheServerPort;
+  private String hostName;
+
+  public IntegratedSecDUnitTest(String name) {
+    super(name);
+  }
+
+  public Cache createCache(Properties props) throws Exception {
+    ds = getSystem(props);
+    cache = CacheFactory.create(ds);
+    if (cache == null) {
+      throw new Exception("CacheFactory.create() returned null ");
+    }
+    return cache;
+  }
+
+  private void createServer() throws IOException {
+    cacheServerPort = AvailablePortHelper.getRandomAvailableTCPPort();
+    cacheServer = cache.addCacheServer();
+    cacheServer.setPort(cacheServerPort);
+    cacheServer.start();
+    hostName = cacheServer.getHostnameForClients();
+  }
+
+  public int getCacheServerPort() {
+    return cacheServerPort;
+  }
+
+  public String getCacheServerHost() {
+    return hostName;
+  }
+
+  public void stopCacheServer() {
+    this.cacheServer.stop();
+  }
+
+  @SuppressWarnings("rawtypes")
+  public void setUpServerVM(Properties gemFireProps) throws Exception {
+    Log.getLogWriter().info("Creating server vm cache with props =" + gemFireProps);
+    gemFireProps.setProperty(DistributionConfig.NAME_NAME, testName + "Server");
+    createCache(gemFireProps);
+    RegionFactory factory = cache.createRegionFactory(RegionShortcut.REPLICATE);
+    Region r = factory.create("serverRegion");
+    assertNotNull(r);
+    r.put("serverkey", "servervalue");
+    assertEquals(1,r.size());
+    Log.getLogWriter().info("Created serverRegion with 1 key=serverKey");
+  }
+
+  public void setUpClientVM(Properties gemFireProps, String host, int port, String user, String password) {
+    gemFireProps.setProperty(DistributionConfig.NAME_NAME, testName + "Client");
+    //gemFireProps.setProperty("security-username", user);
+    //gemFireProps.setProperty("security-password", password);
+    gemFireProps.setProperty("security-client-auth-init",
+        "com.gemstone.gemfire.management.internal.security.IntegratedSecDUnitTest$AuthInitializer.create");
+    Log.getLogWriter().info("Creating client cache with props =" + gemFireProps);
+    ClientCacheFactory clientCacheFactory = new ClientCacheFactory(gemFireProps);
+    clientCacheFactory.addPoolServer(host, port);
+    clientCacheFactory.setPoolMultiuserAuthentication(true);
+    clientCache = clientCacheFactory.create();
+    ClientRegionFactory<String, String> regionFactory = clientCache
+        .createClientRegionFactory(ClientRegionShortcut.PROXY);
+           
+    Region<String, String> region = regionFactory.create("serverRegion");
+    assertNotNull(region);    
+    
+    Properties properties = new Properties();
+    properties.setProperty("security-username", user);
+    properties.setProperty("security-password", password);
+    RegionService regionService = instance.clientCache.createAuthenticatedView(properties);
+    Region secRegion = regionService.getRegion("serverRegion");
+    assertNotNull(secRegion.get("serverkey"));
+  }
+
+  public static void setUpServerVMTask(Properties props) throws Exception {
+    instance.setUpServerVM(props);
+  }
+
+  public static void createServerTask() throws Exception {
+    instance.createServer();
+  }
+
+  public static void setUpClientVMTask(Properties gemFireProps, String host, int port, String user, String password)
+      throws Exception {
+    instance.setUpClientVM(gemFireProps, host, port, user, password);
+  }
+
+  public static Object[] getCacheServerEndPointTask() {
+    Object[] array = new Object[2];
+    array[0] = instance.getCacheServerHost();
+    array[1] = instance.getCacheServerPort();
+    return array;
+  }
+
+  public static void closeCacheTask() {
+    instance.cache.close();
+  }
+
+  public static void closeClientCacheTask() {
+    instance.clientCache.close();
+  }
+
+  /**
+   * 
+   * VM0 -> Manager
+   * VM1 -> Server
+   * Vm2 -> CacheClient
+   * 
+   * @param testName
+   * @throws IOException
+   */
+
+  @SuppressWarnings("serial")
+  void setup(String testName) throws IOException {
+
+    configureIntSecDescriptor();
+
+    Properties props = new Properties();
+
+    props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME,
+        "com.gemstone.gemfire.management.internal.security.TestAuthenticator.create");
+    props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME,
+        "com.gemstone.gemfire.management.internal.security.TestAccessControl.create");
+    props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME,
+        "com.gemstone.gemfire.management.internal.security.TestAccessControl.create");
+    props.setProperty(DistributionConfig.NAME_NAME, "Manager");
+    HeadlessGfsh gfsh = createDefaultSetup(props);
+    assertNotNull(gfsh);
+    assertEquals(true, gfsh.isConnectedAndReady());
+
+    props.list(System.out);
+
+    final Host host = Host.getHost(0);
+    VM serverVM = host.getVM(1);
+    VM clientVM = host.getVM(2);
+    serverVM.invoke(IntegratedSecDUnitTest.class, "setUpServerVMTask", new Object[] { props });
+    serverVM.invoke(IntegratedSecDUnitTest.class, "createServerTask");
+
+    Object array[] = (Object[]) serverVM.invoke(IntegratedSecDUnitTest.class, "getCacheServerEndPointTask");
+    String hostName = (String) array[0];
+    int port = (Integer) array[1];
+    Object params[] = new Object[] { props, hostName, port, "tushark", "password123" };
+    Log.getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);
+    clientVM.invoke(IntegratedSecDUnitTest.class, "setUpClientVMTask", params);
+    
+    Log.getLogWriter().info("Sleeping for 5 seconds to get all mbeans registered on manager");
+    try {
+      Thread.sleep(5000);
+    } catch (InterruptedException e) {
+      e.printStackTrace();
+    }
+    
+  }
+
+  @SuppressWarnings("serial")
+  private void configureIntSecDescriptor() {
+    this.userName = "tushark";
+    this.password = "password123";
+
+    final Host host = Host.getHost(0);
+    final VM serverVM = host.getVM(1);
+    final VM clientVM = host.getVM(2);
+    final VM managerVM = host.getVM(0);
+    SerializableRunnable grantOpsUser1Runnable = new SerializableRunnable() {
+      @Override
+      public void run() {
+        TestAuthenticator.addUser("tushark", "password123");
+        TestAuthenticator.addUser("dataRead", "password123");
+        TestAuthenticator.addUser("dataWrite", "password123");
+        TestAuthenticator.addUser("monitor", "password123");
+        TestAuthenticator.addUser("admin", "password123");
+        TestAuthenticator.addUser("custom", "password123");
+
+        TestAccessControl.grantCacheOp("tushark", OperationCode.GET);
+        TestAccessControl.grantCacheOp("tushark", OperationCode.PUT);
+        TestAccessControl.grantCacheOp("tushark", OperationCode.DESTROY);
+        TestAccessControl.grantCacheOp("tushark", OperationCode.REMOVEALL);
+        TestAccessControl.grantCacheOp("tushark", OperationCode.EXECUTE_FUNCTION);
+        TestAccessControl.grantCacheOp("tushark", OperationCode.QUERY);
+
+        TestAccessControl.grantResourceOp("tushark", ResourceOperationCode.DATA_READ);
+        TestAccessControl.grantResourceOp("tushark", ResourceOperationCode.DATA_WRITE);
+        TestAccessControl.grantResourceOp("tushark", ResourceOperationCode.MONITOR);
+        TestAccessControl.grantResourceOp("tushark", ResourceOperationCode.CHANGE_ALERT_LEVEL);
+
+        TestAccessControl.grantCacheOp("dataRead", OperationCode.GET);
+        TestAccessControl.grantResourceOp("dataRead", ResourceOperationCode.DATA_READ);
+
+        TestAccessControl.grantCacheOp("dataWrite", OperationCode.GET);
+        TestAccessControl.grantCacheOp("dataWrite", OperationCode.PUT);
+        TestAccessControl.grantCacheOp("dataWrite", OperationCode.DESTROY);
+        TestAccessControl.grantCacheOp("dataWrite", OperationCode.REGION_CREATE);
+        TestAccessControl.grantCacheOp("dataWrite", OperationCode.REGION_DESTROY);
+        TestAccessControl.grantResourceOp("dataWrite", ResourceOperationCode.DATA_WRITE);
+
+        TestAccessControl.grantResourceOp("monitor", ResourceOperationCode.DATA_READ);
+        TestAccessControl.grantResourceOp("monitor", ResourceOperationCode.MONITOR);
+
+        TestAccessControl.grantResourceOp("admin", ResourceOperationCode.ADMIN);
+
+        TestAccessControl.grantResourceOp("custom", ResourceOperationCode.DATA_READ);
+        TestAccessControl.grantResourceOp("custom", ResourceOperationCode.SHOW_DEADLOCKS);        
+        TestAccessControl.grantResourceOp("custom", ResourceOperationCode.CREATE_REGION);
+        TestAccessControl.grantCacheOp("custom", OperationCode.REGION_CREATE);
+      }
+    };
+    managerVM.invoke(grantOpsUser1Runnable);
+    serverVM.invoke(grantOpsUser1Runnable);
+  }
+
+  @SuppressWarnings("serial")
+  public static void grantCacheOp(final String user, final String code) {
+    final Host host = Host.getHost(0);
+    final VM serverVM = host.getVM(1);
+    final VM managerVM = host.getVM(0);
+    SerializableRunnable grantOpsUser1Runnable = new SerializableRunnable() {
+      @Override
+      public void run() {
+        TestAccessControl.grantCacheOp(user, OperationCode.parse(code));
+      }
+    };
+    managerVM.invoke(grantOpsUser1Runnable);
+    serverVM.invoke(grantOpsUser1Runnable);
+  }
+
+  @SuppressWarnings("serial")
+  public static void revokeCacheOp(final String user, final String code) {
+    final Host host = Host.getHost(0);
+    final VM serverVM = host.getVM(1);
+    final VM managerVM = host.getVM(0);
+    SerializableRunnable grantOpsUser1Runnable = new SerializableRunnable() {
+      @Override
+      public void run() {
+        TestAccessControl.revokeCacheOp(user, OperationCode.parse(code));
+      }
+    };
+    managerVM.invoke(grantOpsUser1Runnable);
+    serverVM.invoke(grantOpsUser1Runnable);
+  }
+
+  @SuppressWarnings("serial")
+  public static void grantResourceOp(final String user, final String code) {
+    final Host host = Host.getHost(0);
+    final VM serverVM = host.getVM(1);
+    final VM managerVM = host.getVM(0);
+    SerializableRunnable grantOpsUser1Runnable = new SerializableRunnable() {
+      @Override
+      public void run() {
+        TestAccessControl.grantResourceOp(user, ResourceOperationCode.parse(code));
+      }
+    };
+    managerVM.invoke(grantOpsUser1Runnable);
+    serverVM.invoke(grantOpsUser1Runnable);
+  }
+
+  @SuppressWarnings("serial")
+  public static void revokeResourceOp(final String user, final String code) {
+    final Host host = Host.getHost(0);
+    final VM serverVM = host.getVM(1);
+    final VM managerVM = host.getVM(0);
+    SerializableRunnable grantOpsUser1Runnable = new SerializableRunnable() {
+      @Override
+      public void run() {
+        TestAccessControl.revokeResourceOp(user, ResourceOperationCode.parse(code));
+      }
+    };
+    managerVM.invoke(grantOpsUser1Runnable);
+    serverVM.invoke(grantOpsUser1Runnable);
+  }
+
+  
+  public static void doPutUsingClientCache(final String regionPath, final String key, final String value,
+      final boolean expectSuccess, String user, String password) {   
+    try {
+      Properties properties = new Properties();
+      properties.setProperty("security-username", user);
+      properties.setProperty("security-password", password);
+      RegionService regionService = instance.clientCache.createAuthenticatedView(properties);
+      Region region = regionService.getRegion(regionPath);
+      assertNotNull(region);
+      Object oldValue = region.put(key, value);
+      Log.getLogWriter().info("doPutUsingClientCache : Put key=" + key + " for user="+ user+" newValue="+ value + " oldValue="+ oldValue + " expectSuccess="+expectSuccess);
+      if (!expectSuccess)
+        fail("Region Put was expected to fail");
+    } catch (Exception e) {
+      if (!expectSuccess) {
+        Log.getLogWriter().info("expectSuccess=false => " + e.getMessage());
+      } else {
+        Log.getLogWriter().error("Unexpected error", e);
+        fail("Unknown reason " + e.getMessage());
+      }
+    }
+  }
+
+  public void doPutUsingGfsh(final String regionPath, final String key, final String value,
+      final boolean expectSuccess, String user, String password) {
+    String command = "put --region=" + regionPath + " --key=" + key + " --value=" + value;
+    changeGfshUser(user, password);
+    CommandResult result = executeCommand(command);
+    Log.getLogWriter().info("CommandResult " + result);
+    if (expectSuccess) {
+      validateGfshResult(result, expectSuccess);
+      printCommandOutput(result);
+    }
+    else {
+      Log.getLogWriter().info("Error line :" + this.commandError);
+      assertTrue(this.commandError.contains("Access Denied"));
+      this.commandError = null;
+      // validateGfshResultError(result);
+    }
+  }
+
+  private static void validateGfshResultError(CommandResult result) {
+    if (result.getType().equals(ResultData.TYPE_ERROR)) {
+      ErrorResultData data = (ErrorResultData) result.getResultData();
+      Log.getLogWriter().info("Error resultData : " + data.toString());
+    } else
+      fail("Unexpected result type " + result.getType());
+  }
+
+  private static void validateGfshResult(CommandResult cmdResult, boolean expected) {
+    if (ResultData.TYPE_COMPOSITE.equals(cmdResult.getType())) {
+      CompositeResultData rd = (CompositeResultData) cmdResult.getResultData();
+      SectionResultData section = rd.retrieveSectionByIndex(0);
+      boolean result = (Boolean) section.retrieveObject("Result");
+      assertEquals(expected, result);
+    } else
+      fail("Expected CompositeResult Returned Result Type " + cmdResult.getType());
+  }
+
+  public static void doGetUsingClientCache(final String regionPath, final String key, final boolean expectSuccess,
+      String user, String password) {    
+    try {
+      Properties properties = new Properties();
+      properties.setProperty("security-username", user);
+      properties.setProperty("security-password", password);
+      RegionService regionService = instance.clientCache.createAuthenticatedView(properties);
+      Region region = regionService.getRegion(regionPath);
+      assertNotNull(region);
+      Object value = region.get(key);
+      Log.getLogWriter().info("doGetUsingClientCache : Get key=" + key + " for user="+ user+" value="+ value + " expectSuccess="+expectSuccess);
+      assertNotNull(value);
+      if (!expectSuccess)
+        fail("Region Get was expected to fail");
+    } catch (Exception e) {
+      if (!expectSuccess) {
+        Log.getLogWriter().info("expectSuccess=true => " + e.getMessage());
+      } else {
+        Log.getLogWriter().error("Unexpected error", e);
+        fail("Unknown reason " + e.getMessage());
+      }
+    }
+  }
+  
+  public void doGetUsingGfsh(final String regionPath, final String key, final boolean expectSuccess, String user,
+      String password) {
+    String command = "get --region=" + regionPath + " --key=" + key;
+    changeGfshUser(user, password);
+    CommandResult result = executeCommand(command);    
+    if (expectSuccess) {
+      printCommandOutput(result);
+      validateGfshResult(result, expectSuccess);      
+    }
+    else {
+      Log.getLogWriter().info("Error line :" + this.commandError);
+      assertTrue(this.commandError.contains("Access Denied"));
+      this.commandError = null;
+    }
+  }
+
+  private void changeGfshUser(String user, String password) {
+    if (!this.userName.equals(user)) {
+      executeCommand("disconnect");
+      this.userName = user;
+      this.password = password;
+      defaultShellConnect();
+    }
+  }
+  
+  public void doCommandUsingGfsh(String command, final boolean expectSuccess, String user, String password) {
+    changeGfshUser(user, password);
+    CommandResult result = executeCommand(command);
+    if (expectSuccess) {
+      assertNotNull(result);
+      printCommandOutput(result);
+      //assertFalse(result.getType().equals(ResultData.TYPE_ERROR));
+    }
+    else {
+      Log.getLogWriter().info("Error line :" + this.commandError);
+      assertTrue(this.commandError.contains("Access Denied"));
+      this.commandError = null;
+    }
+  }
+  
+  private static void printCommandOutput(CommandResult cmdResult) {
+    assertNotNull(cmdResult);
+    Log.getLogWriter().info("Command Output : ");
+    StringBuilder sb = new StringBuilder();
+    cmdResult.resetToFirstLine();
+    while (cmdResult.hasNextLine()) {
+      sb.append(cmdResult.nextLine()).append(DataCommandRequest.NEW_LINE);
+    }
+    Log.getLogWriter().info(sb.toString());
+    Log.getLogWriter().info("");      
+  }
+  
+  private void doShowLogUsingJMX(boolean expectSuccess, String user, String password) {
+    Object[] endPoint = getJMXEndPoint();
+    String[] creds = new String[] { user, password };
+    try {
+      JMXConnector connector = _getGemfireMBeanServer((Integer) endPoint[1], creds);
+      MBeanServerConnection mbeanServer = connector.getMBeanServerConnection();
+      ObjectName memberON = (ObjectName)mbeanServer.invoke(MBeanJMXAdapter.getDistributedSystemName(), "fetchMemberObjectName", 
+          new Object[]{"Manager"}, new String[]{String.class.getCanonicalName()});      
+      String logs = (String) mbeanServer.invoke(memberON, "showLog", new Object[]{60}, new String[]{int.class.toString()});
+      Log.getLogWriter().info("JMX Output :" + logs);
+      connector.close();
+      if(!expectSuccess)
+        fail("Expected Access Denied...");      
+    } catch (InstanceNotFoundException e) {
+      Log.getLogWriter().error("Unexpected Error", e);
+      fail("Unexpected Error " + e.getMessage());
+    } catch (MBeanException e) {
+      Log.getLogWriter().error("Unexpected Error", e);
+      fail("Unexpected Error " + e.getMessage());
+    } catch (ReflectionException e) {
+      Log.getLogWriter().error("Unexpected Error", e);
+      fail("Unexpected Error " + e.getMessage());
+    } catch (IOException e) {
+      Log.getLogWriter().error("Unexpected Error", e);
+      fail("Unexpected Error " + e.getMessage());
+    } catch (SecurityException e) {
+      if(expectSuccess){
+        fail("Expected successful jmx execution");
+      } else {
+        //expected
+      }
+    }
+  }
+  
+  
+  
+  @SuppressWarnings({ "unchecked", "rawtypes" })
+  private JMXConnector _getGemfireMBeanServer(int port, Object creds) {
+    JMXServiceURL url;
+    try {
+      url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://:" + port + "/jmxrmi");
+      if (creds != null) {
+        Map env = new HashMap();        
+        env.put(JMXConnector.CREDENTIALS, creds);
+        JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
+        return jmxc;
+      } else {
+        JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
+        return jmxc;
+      }
+    } catch (MalformedURLException e) {
+      fail("Error connecting to port=" + port + " " + e.getMessage());
+    } catch (IOException e) {
+      fail("Error connecting to port=" + port + " " + e.getMessage());
+    }
+    return null;
+  }
+
+  public void testDataCommandsFromDifferentClients() throws IOException {
+    final Host host = Host.getHost(0);
+    final VM clientVM = host.getVM(2);
+
+    setup("testDataCommandsFromDifferentClients");
+    executeCommand("list members");
+    changeGfshUser("dataRead", "password123");
+    executeCommand("list members");
+
+    // check tushark can execute get/put/delete/execute function/query operation from cacheclient and through
+    // data-commands
+    String region = "serverRegion";
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doPutUsingClientCache", new Object[] { region, "myk1", "myv1", true,
+        "tushark", "password123" });
+    doGetUsingGfsh(region, "myk1", true, "tushark", "password123");
+    doPutUsingGfsh(region, "myk2", "myv2", true, "tushark", "password123");
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doGetUsingClientCache", new Object[] { region, "myk2", true,
+        "tushark", "password123" });
+    revokeCacheOp("tushark", "PUT");
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doPutUsingClientCache", new Object[] { region, "myk1", "myv1",
+        false, "tushark", "password123" });
+    doPutUsingGfsh(region, "myk2", "myv2", false, "tushark", "password123");
+    grantCacheOp("tushark", "PUT");
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doPutUsingClientCache", new Object[] { region, "myk1", "myv1", true,
+        "tushark", "password123" });
+    doPutUsingGfsh(region, "myk2", "myv2", true, "tushark", "password123");
+    
+    
+    //dataRead Role
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doPutUsingClientCache", new Object[] { region, "myk1", "myv1", false,
+      "dataRead", "password123" });
+    doPutUsingGfsh(region, "myk2", "myv2", false, "dataRead", "password123");
+    doGetUsingGfsh(region, "myk1", true, "dataRead", "password123");
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doGetUsingClientCache", new Object[] { region, "myk2", true,
+      "dataRead", "password123" });    
+    
+    //dataWrite Role
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doPutUsingClientCache", new Object[] { region, "myk1", "myv1", true,
+      "dataWrite", "password123" });
+    doPutUsingGfsh(region, "myk2", "myv2", true, "dataWrite", "password123");
+    doGetUsingGfsh(region, "myk1", true, "dataWrite", "password123");
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doGetUsingClientCache", new Object[] { region, "myk2", true,
+      "dataWrite", "password123" });
+    
+    
+    
+    //admin and monitor and custom roles can not execute get-put commands 
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doPutUsingClientCache", new Object[] { region, "myk1", "myv1", false,
+      "admin", "password123" });
+    doPutUsingGfsh(region, "myk2", "myv2", false, "admin", "password123");
+    doGetUsingGfsh(region, "myk1", false, "admin", "password123");
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doGetUsingClientCache", new Object[] { region, "myk2", false,
+      "admin", "password123" });
+    
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doPutUsingClientCache", new Object[] { region, "myk1", "myv1", false,
+      "monitor", "password123" });
+    doPutUsingGfsh(region, "myk2", "myv2", false, "monitor", "password123");
+    doGetUsingGfsh(region, "myk1", false, "monitor", "password123");
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doGetUsingClientCache", new Object[] { region, "myk2", false,
+      "monitor", "password123" });
+    
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doPutUsingClientCache", new Object[] { region, "myk1", "myv1", false,
+      "custom", "password123" });
+    doPutUsingGfsh(region, "myk2", "myv2", false, "custom", "password123");
+    doGetUsingGfsh(region, "myk1", false, "custom", "password123");
+    clientVM.invoke(IntegratedSecDUnitTest.class, "doGetUsingClientCache", new Object[] { region, "myk2", false,
+      "custom", "password123" });    
+    
+    // tushark can execute monitor command but not region create        
+    doCommandUsingGfsh("show metrics", true, "monitor", "password123");
+    doCommandUsingGfsh("show dead-locks --file=deadlocks_monitor.txt", true, "monitor", "password123");
+    
+    // dataWrite can execute create region
+    doCommandUsingGfsh("create region --type=REPLICATE --name=dataWriteRegion", true, "dataWrite", "password123");
+    doCommandUsingGfsh("create region --type=REPLICATE --name=dataReadRegion", false, "dataRead", "password123");
+    
+    // custom can create region create but not put region
+    doCommandUsingGfsh("create region --type=REPLICATE --name=customRegion", true, "custom", "password123");
+    doPutUsingGfsh("customRegion", "key", "value", false, "custom", "password123");
+    
+    // custom can execute show deadlocks - revoke it check again
+    doCommandUsingGfsh("show metrics", false, "custom", "password123");
+    doCommandUsingGfsh("show dead-locks --file=deadlocks_custom_1.txt", true, "custom", "password123");
+    revokeResourceOp("custom", ResourceOperationCode.SHOW_DEADLOCKS.toString());
+    grantResourceOp("custom", ResourceOperationCode.SHOW_METRICS.toString());
+    doCommandUsingGfsh("show metrics", true, "custom", "password123");
+    doCommandUsingGfsh("show dead-locks --file=deadlocks_custom_2.txt", false, "custom", "password123");
+    grantResourceOp("custom", ResourceOperationCode.SHOW_DEADLOCKS.toString());    
+    doCommandUsingGfsh("show metrics", true, "custom", "password123");
+    doCommandUsingGfsh("show dead-locks --file=deadlocks_custom_3.txt", true, "custom", "password123");    
+    
+    /* Commented due to error with gradle :  TailLogRequest/Response processed in application vm with shared logging
+    //check jmx and gfsh
+    doCommandUsingGfsh("show log --member=Manager", true, "monitor", "password123");
+    doCommandUsingGfsh("show log --member=Manager", false, "dataWrite", "password123");
+    doCommandUsingGfsh("show log --member=Manager", false, "custom", "password123");
+    
+    
+    doShowLogUsingJMX(true, "monitor", "password123");
+    doShowLogUsingJMX(false, "dataWrite", "password123");
+    doShowLogUsingJMX(false, "custom", "password123");
+
+    
+    grantResourceOp("custom", ResourceOperationCode.SHOW_LOG.toString());
+    doCommandUsingGfsh("show log --member=Manager", true, "custom", "password123");
+    doShowLogUsingJMX(true, "custom", "password123");*/
+  }
+
+  
+
+  public void tearDown2() throws Exception {
+    super.tearDown2();
+  }
+
+}


[73/79] incubator-geode git commit: Integrated Security related automated test using selenium. Test pulse authentication and access to data browser through selenium Review : https://reviews.apache.org/r/39646

Posted by tu...@apache.org.
Integrated Security related automated test using selenium. Test pulse authentication and access to data browser through selenium
Review : https://reviews.apache.org/r/39646


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/87c83da2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/87c83da2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/87c83da2

Branch: refs/heads/feature/GEODE-17
Commit: 87c83da23a4fd281d9ca0fda2cd61e57d7cfef52
Parents: 813d24c
Author: tushark <tu...@apache.org>
Authored: Mon Nov 2 18:32:11 2015 +0530
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:54:35 2015 +0530

----------------------------------------------------------------------
 .../pulse/internal/security/LogoutHandler.java  |   6 +-
 .../tools/pulse/tests/AccessControl.java        |  45 ++++
 .../tools/pulse/tests/AccessControlMBean.java   |   7 +
 .../tools/pulse/tests/IntegrateSecUITest.java   | 245 +++++++++++++++++++
 .../pulse/tests/PropsBackedAuthenticator.java   |  48 ++++
 .../gemfire/tools/pulse/tests/PulseTests.java   |   2 +-
 .../gemfire/tools/pulse/tests/Server.java       |  86 ++++---
 pulse/src/test/resources/test.properties        |  12 +
 8 files changed, 419 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87c83da2/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java
index 78d4703..b6187bc 100644
--- a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/security/LogoutHandler.java
@@ -30,8 +30,10 @@ public class LogoutHandler extends SimpleUrlLogoutSuccessHandler implements Logo
     LOGGER.fine("Invoked #LogoutHandler ...");
     if (Repository.get().isUseGemFireCredentials()) {
       GemFireAuthentication gemauthentication = (GemFireAuthentication) authentication;
-      gemauthentication.getJmxc().close();
-      LOGGER.info("#LogoutHandler : Closing GemFireAuthentication JMX Connection...");
+      if(gemauthentication!=null) {
+        gemauthentication.getJmxc().close();
+        LOGGER.fine("#LogoutHandler : Closing GemFireAuthentication JMX Connection...");
+      }
     }
     super.onLogoutSuccess(request, response, authentication);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87c83da2/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AccessControl.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AccessControl.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AccessControl.java
new file mode 100644
index 0000000..ee0d43b
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AccessControl.java
@@ -0,0 +1,45 @@
+package com.vmware.gemfire.tools.pulse.tests;
+
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.Principal;
+import java.util.Set;
+
+import javax.management.remote.JMXPrincipal;
+import javax.security.auth.Subject;
+
+/**
+ * 
+ * @author tushark
+ *
+ */
+public class AccessControl extends JMXBaseBean implements AccessControlMBean {
+
+  public static final String OBJECT_NAME_ACCESSCONTROL = "GemFire:service=AccessControl,type=Distributed";
+
+  @Override
+  public boolean authorize(String role) {
+    AccessControlContext acc = AccessController.getContext();
+    Subject subject = Subject.getSubject(acc);
+    Set<JMXPrincipal> principals = subject.getPrincipals(JMXPrincipal.class);    
+    if (principals == null || principals.isEmpty()) {
+      throw new SecurityException("Access denied");
+    }
+    
+    Principal principal = principals.iterator().next();    
+    String roleArray[] = getStringArray(principal.getName());
+    if(roleArray!=null) {
+      for(String roleStr:roleArray) {
+        if(roleStr.equals(role))
+          return true;
+      }
+    }    
+    return false;
+  }
+
+  @Override
+  protected String getKey(String propName) {    
+    return "users." + propName + "." + "roles";
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87c83da2/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AccessControlMBean.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AccessControlMBean.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AccessControlMBean.java
new file mode 100644
index 0000000..70423e9
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AccessControlMBean.java
@@ -0,0 +1,7 @@
+package com.vmware.gemfire.tools.pulse.tests;
+
+public interface AccessControlMBean {
+
+  public boolean authorize(String role);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87c83da2/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/IntegrateSecUITest.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/IntegrateSecUITest.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/IntegrateSecUITest.java
new file mode 100644
index 0000000..cc6e5b6
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/IntegrateSecUITest.java
@@ -0,0 +1,245 @@
+package com.vmware.gemfire.tools.pulse.tests;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import javax.management.JMException;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import static org.junit.Assert.*;
+
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+public class IntegrateSecUITest {
+  
+  private final static String jmxPropertiesFile = System.getProperty("pulse.propfile");
+  private static String path = System.getProperty("pulse.war");
+  private static Tomcat tomcat = null;
+  private static Server server = null;
+  private static String pulseURL = null;
+  private static String logoutURL = null;
+  private static String loginURL = null;
+  public static WebDriver driver;
+
+  @BeforeClass
+  public static void setUpBeforeClass() throws Exception {
+    try {      
+      //Enable Integrated Security Profile
+      System.setProperty("spring.profiles.active", "pulse.authentication.gemfire");
+      //assumes jmx port is 1099 in pulse war file
+      server = Server.createServer(1099, jmxPropertiesFile, true);
+      String host = "localhost";// InetAddress.getLocalHost().getHostAddress();
+      int port = 8080;
+      String context = "/pulse";      
+      tomcat = TomcatHelper.startTomcat(host, port, context, path);
+      pulseURL = "http://" + host + ":" + port + context;
+      logoutURL = "http://" + host + ":" + port  + context + "/pulse/clusterLogout";
+      loginURL = "http://" + host + ":" + port  + context + "/Login.html";
+      Thread.sleep(5000); // wait till tomcat settles down
+    } catch (FileNotFoundException e) {
+      e.printStackTrace();
+      fail("Error " + e.getMessage());
+    } catch (IOException e) {
+      e.printStackTrace();
+      fail("Error " + e.getMessage());
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail("Error " + e.getMessage());
+    }
+
+    driver = new FirefoxDriver();
+    driver.manage().window().maximize();
+    driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
+    driver.get(pulseURL);  
+  }
+  
+  /**
+   * This test only tests test extensions (ie. properties file based testbed) written for integrate security
+   *    1. PropsBackedAuthenticator
+   *    2. AccessControlMbean
+   * 
+   * @throws IOException
+   */
+  @Test
+  public void testServerAuthentication() throws IOException {
+    JMXConnector jmxc = attemptConnect("dataRead", "dataRead" , true);
+    jmxc.close();
+    attemptConnect("dataRead", "dataRead12321" , false);
+  }
+  
+  @Test
+  public void testServerAuthorization() throws IOException, JMException {        
+    try {
+      JMXConnector cc = attemptConnect("dataRead", "dataRead" , true);
+      testLevel(cc,"PULSE_DASHBOARD", true);
+      testLevel(cc,"PULSE_DATABROWSER", false);
+      cc.close();
+      
+      cc = attemptConnect("dataWrite", "dataWrite" , true);
+      testLevel(cc,"PULSE_DASHBOARD", true);
+      testLevel(cc,"PULSE_DATABROWSER", true);
+      cc.close();
+      
+      cc = attemptConnect("admin", "admin" , true);
+      testLevel(cc,"PULSE_DASHBOARD", true);
+      testLevel(cc,"PULSE_DATABROWSER", true);
+      cc.close();
+      
+    } catch (SecurityException e) {
+      fail("Authentication failed " + e.getMessage());
+    }
+  }
+  
+  /**
+   * Test pulse authentication through pulse login page and clusterLogout  
+   */
+  @Test
+  public void testPulseAuthentication() throws InterruptedException {
+    login("dataRead", "dataRead", true, true);
+    login("dataRead", "dataRead1234", true, false);
+    logout();
+  }
+
+  /**
+   * Test pulse authorization through pulse data browser page  
+   */
+  @Test
+  public void testPulseAuthorization() throws InterruptedException {
+    login("dataWrite", "dataWrite", false,true);
+    navigateToDataBrowerPage(true);    
+    login("dataRead", "dataRead", true,true);
+    navigateToDataBrowerPage(false);
+  }
+  
+  private JMXConnector attemptConnect(String user, String password, boolean expectSuccess) throws IOException {
+    String[] creds = { user, password };
+    Map<String, Object> env = new HashMap<String, Object>();
+    env.put(JMXConnector.CREDENTIALS, creds);
+    try {
+      JMXConnector cc = JMXConnectorFactory.connect(getURL(), env);
+      MBeanServerConnection mbsc = cc.getMBeanServerConnection();
+      if(!expectSuccess)
+        fail("Expected Authentication to fail");
+      return cc;
+    } catch (SecurityException e) {
+      if(expectSuccess)
+        fail("Authentication failed " + e.getMessage());
+    }
+    return null;
+  }
+  
+  private JMXServiceURL getURL() throws IOException {    
+    return new JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxrmi");
+  }
+  
+  private void testLevel(JMXConnector jmxc, String role, boolean expectTrue) throws IOException, JMException {
+    MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();      
+    ObjectName accObjName = new ObjectName(AccessControl.OBJECT_NAME_ACCESSCONTROL);
+    boolean hasAccess = (Boolean)mbsc.invoke(accObjName, "authorize", 
+        new Object[]{role}, new String[] {String.class.getName()});
+    if(expectTrue) {
+      assertTrue(hasAccess);
+    }
+    else {
+      if(hasAccess)
+        fail("Expected role "+ role + " rejection but user return true");
+    }     
+  }
+  
+  private void navigateToDataBrowerPage(boolean expectSuccess) {
+    WebElement element = driver.findElement(By.linkText("Data Browser"));
+    element.click();
+    if(expectSuccess) {
+      WebElement dbHeader = (new WebDriverWait(driver, 10))
+          .until(new ExpectedCondition<WebElement>() {
+            @Override
+            public WebElement apply(WebDriver d) {
+              return d.findElement(By.xpath("//*[@id=\"canvasWidth\"]/div[4]/div[1]/div[2]/label"));
+            }
+          });
+      assertNotNull(dbHeader);      
+    }
+  }
+
+  private void logout() {
+    driver.get(logoutURL); 
+    validateLoginPage();
+  }
+  
+  private void validateSuccessfulLogin() {
+    WebElement userNameOnPulsePage = (new WebDriverWait(driver, 10))
+        .until(new ExpectedCondition<WebElement>() {
+          @Override
+          public WebElement apply(WebDriver d) {
+            return d.findElement(By.id("userName"));
+          }
+        });
+    assertNotNull(userNameOnPulsePage);
+  }
+  
+  private void validateLoginPage() {
+    WebElement userNameOnPulseLoginPage = (new WebDriverWait(driver, 10))
+        .until(new ExpectedCondition<WebElement>() {
+          @Override
+          public WebElement apply(WebDriver d) {
+            return d.findElement(By.id("user_name"));
+          }
+        });
+    assertNotNull(userNameOnPulseLoginPage);
+  }
+  
+  private void login(String userName, String password, boolean logoutFirst, boolean expectSuccess) throws InterruptedException {
+    if(logoutFirst) {
+      logout();
+    }
+    WebElement userNameElement = driver.findElement(By.id("user_name"));
+    WebElement passwordElement = driver.findElement(By.id("user_password"));
+    userNameElement.sendKeys(userName);
+    passwordElement.sendKeys(password);
+    passwordElement.submit();
+    if(expectSuccess) {
+      validateSuccessfulLogin();
+    } else {
+      //We expect login to be unsucceesful so it should go back to Login.html
+      validateLoginPage();
+    }    
+  }
+  
+  
+  @AfterClass
+  public static void tearDownAfterClass() throws Exception {
+    if(driver!=null)
+      driver.close();
+    try {
+      if (tomcat != null) {
+        tomcat.stop();
+        tomcat.destroy();
+      }
+      System.out.println("Tomcat Stopped");
+      if (server != null) {
+        server.stop();
+      }
+      System.out.println("Server Stopped");
+    } catch (LifecycleException e) {
+      e.printStackTrace();
+    }
+  }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87c83da2/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PropsBackedAuthenticator.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PropsBackedAuthenticator.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PropsBackedAuthenticator.java
new file mode 100644
index 0000000..6076fbf
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PropsBackedAuthenticator.java
@@ -0,0 +1,48 @@
+package com.vmware.gemfire.tools.pulse.tests;
+
+import java.util.Collections;
+
+import javax.management.remote.JMXAuthenticator;
+import javax.management.remote.JMXPrincipal;
+import javax.security.auth.Subject;
+
+/**
+ * 
+ * @author tushark
+ *
+ */
+public class PropsBackedAuthenticator extends JMXBaseBean implements JMXAuthenticator {
+
+  @Override
+  public Subject authenticate(Object credentials) {
+    String username = null, password = null;
+    if (credentials instanceof String[]) {
+      final String[] aCredentials = (String[]) credentials;
+      username = (String) aCredentials[0];
+      password = (String) aCredentials[1];
+      System.out.println("#intSec User="+ username + " password="+password);
+      String users[] = getStringArray("users");
+      for(String u : users) {
+        if(username.equals(u)) {          
+          String storedpassword = getString("users."+u+".password");
+          System.out.println("#intSec PropUser="+ u + " PropPassword="+storedpassword);
+          if(storedpassword!=null && storedpassword.equals(password)) {
+            return new Subject(true, Collections.singleton(new JMXPrincipal(username)), Collections.EMPTY_SET,
+                Collections.EMPTY_SET);
+          } else {
+            throw new SecurityException("Authentication Failed 1");
+          }
+        }
+      }
+    } else {
+      throw new SecurityException("Credentials Missing");
+    }
+    throw new SecurityException("Authentication Failed 2");
+  }
+
+  @Override
+  protected String getKey(String propName) {    
+    return propName;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87c83da2/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTests.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTests.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTests.java
index b6dd7c6..c660ba7 100644
--- a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTests.java
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/PulseTests.java
@@ -131,7 +131,7 @@ public class PulseTests {
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {
     try {
-      server = Server.createServer(9999, jmxPropertiesFile);
+      server = Server.createServer(9999, jmxPropertiesFile, false);
 
       String host = "localhost";// InetAddress.getLocalHost().getHostAddress();
       int port = 8080;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87c83da2/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
index 42373c9..d20e10f 100644
--- a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
@@ -7,23 +7,26 @@
  */
 package com.vmware.gemfire.tools.pulse.tests;
 
-import java.io.IOException;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Set;
-
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.MalformedObjectNameException;
-import javax.management.NotCompliantMBeanException;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnectorServer;
-import javax.management.remote.JMXConnectorServerFactory;
-import javax.management.remote.JMXServiceURL;
+import java.io.IOException;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.MBeanRegistrationException;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.MalformedObjectNameException;
+import javax.management.NotCompliantMBeanException;
+import javax.management.ObjectName;
+import javax.management.remote.JMXAuthenticator;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
 
 public class Server {
   private static final String DEFAULT_HOST = "127.0.0.1"; //"localhost"
@@ -33,7 +36,7 @@ public class Server {
   private final JMXConnectorServer cs;
   private String propFile = null;
 
-  public Server(int port, String properties) throws IOException {
+  public Server(int port, String properties, boolean startIntSec) throws IOException {
     try {
       java.rmi.registry.LocateRegistry.createRegistry(port);
       System.out.println("RMI registry ready.");
@@ -44,14 +47,39 @@ public class Server {
 
     this.propFile = properties;
     mbs = MBeanServerFactory.createMBeanServer();
-    url = new JMXServiceURL(formJMXServiceURLString(DEFAULT_HOST, "" + port));
-    cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
-
-    cs.start();
-
-    loadMBeans();
-  }
-
+    url = new JMXServiceURL(formJMXServiceURLString(DEFAULT_HOST, "" + port));
+    
+    if(!startIntSec) {
+      cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
+    } else {
+      Map<String,Object> env = new HashMap<String,Object>();
+      env.put(JMXConnectorServer.AUTHENTICATOR, new PropsBackedAuthenticator());
+      cs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
+      System.out.println("#intSec Using PropsBackedAuthenticator");
+    }
+    
+    cs.start();   
+    loadMBeans();
+    if(startIntSec)
+      loadAccessControllerMBean();
+  }
+    
+
+  private void loadAccessControllerMBean() {
+    AccessControl ac = new AccessControl();
+    try {
+      mbs.registerMBean(ac, new ObjectName(AccessControl.OBJECT_NAME_ACCESSCONTROL));
+    } catch (InstanceAlreadyExistsException e) {
+      e.printStackTrace();
+    } catch (MBeanRegistrationException e) {
+      e.printStackTrace();
+    } catch (NotCompliantMBeanException e) {
+      e.printStackTrace();
+    } catch (MalformedObjectNameException e) {
+      e.printStackTrace();
+    }    
+  }
+
   private String formJMXServiceURLString(String host, String port)
       throws UnknownHostException {
     /*
@@ -330,14 +358,14 @@ public class Server {
       }
     }
 
-    createServer(port, props);
+    createServer(port, props, false);
   }
 
-  public static Server createServer(int port, String properties)
+  public static Server createServer(int port, String properties, boolean intSecEnabled)
       throws MalformedObjectNameException {
     Server s = null;
     try {
-      s = new Server(port, properties);
+      s = new Server(port, properties, intSecEnabled);
     } catch (Exception e) {
       e.printStackTrace();
       return null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/87c83da2/pulse/src/test/resources/test.properties
----------------------------------------------------------------------
diff --git a/pulse/src/test/resources/test.properties b/pulse/src/test/resources/test.properties
index fabeea1..67f51bb 100644
--- a/pulse/src/test/resources/test.properties
+++ b/pulse/src/test/resources/test.properties
@@ -6,6 +6,18 @@ members=M1 M2 M3
 gemfirexdmembers=M1 M2 M3
 aggregatequeries=Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 Q12 Q13 Q14 Q15 Q16 Q17 Q18 Q19 Q20 Q21 Q22 Q23 Q24 Q25
 
+# Integrated security
+users=dataRead dataWrite admin
+
+users.dataRead.password=dataRead
+users.dataRead.roles=PULSE_DASHBOARD
+
+users.dataWrite.password=dataWrite
+users.dataWrite.roles=PULSE_DASHBOARD PULSE_DATABROWSER
+
+users.admin.password=admin
+users.admin.roles=PULSE_DASHBOARD PULSE_DATABROWSER
+
 server.S1.listCacheServers=true
 server.S1.memberCount=3
 server.S1.numClients=2


[38/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONObject.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONObject.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONObject.java
new file mode 100644
index 0000000..fdc01ee
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONObject.java
@@ -0,0 +1,1593 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+/**
+ * A JSONObject is an unordered collection of name/value pairs. Its external
+ * form is a string wrapped in curly braces with colons between the names and
+ * values, and commas between the values and names. The internal form is an
+ * object having <code>get</code> and <code>opt</code> methods for accessing the
+ * values by name, and <code>put</code> methods for adding or replacing values
+ * by name. The values can be any of these types: <code>Boolean</code>,
+ * <code>JSONArray</code>, <code>JSONObject</code>, <code>Number</code>,
+ * <code>String</code>, or the <code>JSONObject.NULL</code> object. A JSONObject
+ * constructor can be used to convert an external form JSON text into an
+ * internal form whose values can be retrieved with the <code>get</code> and
+ * <code>opt</code> methods, or to convert values into a JSON text using the
+ * <code>put</code> and <code>toString</code> methods. A <code>get</code> method
+ * returns a value if one can be found, and throws an exception if one cannot be
+ * found. An <code>opt</code> method returns a default value instead of throwing
+ * an exception, and so is useful for obtaining optional values.
+ * <p>
+ * The generic <code>get()</code> and <code>opt()</code> methods return an
+ * object, which you can cast or query for type. There are also typed
+ * <code>get</code> and <code>opt</code> methods that do type checking and type
+ * coercion for you. The opt methods differ from the get methods in that they do
+ * not throw. Instead, they return a specified value, such as null.
+ * <p>
+ * The <code>put</code> methods add or replace values in an object. For example,
+ *
+ * <pre>
+ * myString = new JSONObject().put(&quot;JSON&quot;, &quot;Hello, World!&quot;).toString();
+ * </pre>
+ *
+ * produces the string <code>{"JSON": "Hello, World"}</code>.
+ * <p>
+ * The texts produced by the <code>toString</code> methods strictly conform to
+ * the JSON syntax rules. The constructors are more forgiving in the texts they
+ * will accept:
+ * <ul>
+ * <li>An extra <code>,</code>&nbsp;<small>(comma)</small> may appear just
+ * before the closing brace.</li>
+ * <li>Strings may be quoted with <code>'</code>&nbsp;<small>(single
+ * quote)</small>.</li>
+ * <li>Strings do not need to be quoted at all if they do not begin with a quote
+ * or single quote, and if they do not contain leading or trailing spaces, and
+ * if they do not contain any of these characters:
+ * <code>{ } [ ] / \ : , = ; #</code> and if they do not look like numbers and
+ * if they are not the reserved words <code>true</code>, <code>false</code>, or
+ * <code>null</code>.</li>
+ * <li>Keys can be followed by <code>=</code> or <code>=></code> as well as by
+ * <code>:</code>.</li>
+ * <li>Values can be followed by <code>;</code> <small>(semicolon)</small> as
+ * well as by <code>,</code> <small>(comma)</small>.</li>
+ * </ul>
+ *
+ * @author JSON.org
+ * @version 2012-07-02
+ */
+public class JSONObject {
+
+    /**
+     * JSONObject.NULL is equivalent to the value that JavaScript calls null,
+     * whilst Java's null is equivalent to the value that JavaScript calls
+     * undefined.
+     */
+     private static final class Null {
+
+        /**
+         * There is only intended to be a single instance of the NULL object,
+         * so the clone method returns itself.
+         * @return     NULL.
+         */
+        protected final Object clone() {
+            return this;
+        }
+
+        /**
+         * A Null object is equal to the null value and to itself.
+         * @param object    An object to test for nullness.
+         * @return true if the object parameter is the JSONObject.NULL object
+         *  or null.
+         */
+        public boolean equals(Object object) {
+            return object == null || object == this;
+        }
+
+        /**
+         * Get the "null" string value.
+         * @return The string "null".
+         */
+        public String toString() {
+            return "null";
+        }
+    }
+
+
+    /**
+     * The map where the JSONObject's properties are kept.
+     */
+    private final Map map;
+
+
+    /**
+     * It is sometimes more convenient and less ambiguous to have a
+     * <code>NULL</code> object than to use Java's <code>null</code> value.
+     * <code>JSONObject.NULL.equals(null)</code> returns <code>true</code>.
+     * <code>JSONObject.NULL.toString()</code> returns <code>"null"</code>.
+     */
+    public static final Object NULL = new Null();
+
+
+    /**
+     * Construct an empty JSONObject.
+     */
+    public JSONObject() {
+        this.map = new HashMap();
+    }
+
+
+    /**
+     * Construct a JSONObject from a subset of another JSONObject.
+     * An array of strings is used to identify the keys that should be copied.
+     * Missing keys are ignored.
+     * @param jo A JSONObject.
+     * @param names An array of strings.
+     * @throws JSONException
+     * @exception JSONException If a value is a non-finite number or if a name is duplicated.
+     */
+    public JSONObject(JSONObject jo, String[] names) {
+        this();
+        for (int i = 0; i < names.length; i += 1) {
+            try {
+                this.putOnce(names[i], jo.opt(names[i]));
+            } catch (Exception ignore) {
+            }
+        }
+    }
+
+
+    /**
+     * Construct a JSONObject from a JSONTokener.
+     * @param x A JSONTokener object containing the source string.
+     * @throws JSONException If there is a syntax error in the source string
+     *  or a duplicated key.
+     */
+    public JSONObject(JSONTokener x) throws JSONException {
+        this();
+        char c;
+        String key;
+
+        if (x.nextClean() != '{') {
+            throw x.syntaxError("A JSONObject text must begin with '{'");
+        }
+        for (;;) {
+            c = x.nextClean();
+            switch (c) {
+            case 0:
+                throw x.syntaxError("A JSONObject text must end with '}'");
+            case '}':
+                return;
+            default:
+                x.back();
+                key = x.nextValue().toString();
+            }
+
+// The key is followed by ':'. We will also tolerate '=' or '=>'.
+
+            c = x.nextClean();
+            if (c == '=') {
+                if (x.next() != '>') {
+                    x.back();
+                }
+            } else if (c != ':') {
+                throw x.syntaxError("Expected a ':' after a key");
+            }
+            this.putOnce(key, x.nextValue());
+
+// Pairs are separated by ','. We will also tolerate ';'.
+
+            switch (x.nextClean()) {
+            case ';':
+            case ',':
+                if (x.nextClean() == '}') {
+                    return;
+                }
+                x.back();
+                break;
+            case '}':
+                return;
+            default:
+                throw x.syntaxError("Expected a ',' or '}'");
+            }
+        }
+    }
+
+
+    /**
+     * Construct a JSONObject from a Map.
+     *
+     * @param map A map object that can be used to initialize the contents of
+     *  the JSONObject.
+     * @throws JSONException
+     */
+    public JSONObject(Map map) {
+        this.map = new HashMap();
+        if (map != null) {
+            Iterator i = map.entrySet().iterator();
+            while (i.hasNext()) {
+                Map.Entry e = (Map.Entry)i.next();
+                Object value = e.getValue();
+                if (value != null) {
+                    this.map.put(e.getKey(), wrap(value));
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Construct a JSONObject from an Object using bean getters.
+     * It reflects on all of the public methods of the object.
+     * For each of the methods with no parameters and a name starting
+     * with <code>"get"</code> or <code>"is"</code> followed by an uppercase letter,
+     * the method is invoked, and a key and the value returned from the getter method
+     * are put into the new JSONObject.
+     *
+     * The key is formed by removing the <code>"get"</code> or <code>"is"</code> prefix.
+     * If the second remaining character is not upper case, then the first
+     * character is converted to lower case.
+     *
+     * For example, if an object has a method named <code>"getName"</code>, and
+     * if the result of calling <code>object.getName()</code> is <code>"Larry Fine"</code>,
+     * then the JSONObject will contain <code>"name": "Larry Fine"</code>.
+     *
+     * @param bean An object that has getter methods that should be used
+     * to make a JSONObject.
+     */
+    public JSONObject(Object bean) {
+        this();
+        this.populateMap(bean);
+    }
+
+
+    /**
+     * Construct a JSONObject from an Object, using reflection to find the
+     * public members. The resulting JSONObject's keys will be the strings
+     * from the names array, and the values will be the field values associated
+     * with those keys in the object. If a key is not found or not visible,
+     * then it will not be copied into the new JSONObject.
+     * @param object An object that has fields that should be used to make a
+     * JSONObject.
+     * @param names An array of strings, the names of the fields to be obtained
+     * from the object.
+     */
+    public JSONObject(Object object, String names[]) {
+        this();
+        Class c = object.getClass();
+        for (int i = 0; i < names.length; i += 1) {
+            String name = names[i];
+            try {
+                this.putOpt(name, c.getField(name).get(object));
+            } catch (Exception ignore) {
+            }
+        }
+    }
+
+
+    /**
+     * Construct a JSONObject from a source JSON text string.
+     * This is the most commonly used JSONObject constructor.
+     * @param source    A string beginning
+     *  with <code>{</code>&nbsp;<small>(left brace)</small> and ending
+     *  with <code>}</code>&nbsp;<small>(right brace)</small>.
+     * @exception JSONException If there is a syntax error in the source
+     *  string or a duplicated key.
+     */
+    public JSONObject(String source) throws JSONException {
+        this(new JSONTokener(source));
+    }
+
+
+    /**
+     * Construct a JSONObject from a ResourceBundle.
+     * @param baseName The ResourceBundle base name.
+     * @param locale The Locale to load the ResourceBundle for.
+     * @throws JSONException If any JSONExceptions are detected.
+     */
+    public JSONObject(String baseName, Locale locale) throws JSONException {
+        this();
+        ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale,
+                Thread.currentThread().getContextClassLoader());
+
+// Iterate through the keys in the bundle.
+
+        Enumeration keys = bundle.getKeys();
+        while (keys.hasMoreElements()) {
+            Object key = keys.nextElement();
+            if (key instanceof String) {
+
+// Go through the path, ensuring that there is a nested JSONObject for each
+// segment except the last. Add the value using the last segment's name into
+// the deepest nested JSONObject.
+
+                String[] path = ((String)key).split("\\.");
+                int last = path.length - 1;
+                JSONObject target = this;
+                for (int i = 0; i < last; i += 1) {
+                    String segment = path[i];
+                    JSONObject nextTarget = target.optJSONObject(segment);
+                    if (nextTarget == null) {
+                        nextTarget = new JSONObject();
+                        target.put(segment, nextTarget);
+                    }
+                    target = nextTarget;
+                }
+                target.put(path[last], bundle.getString((String)key));
+            }
+        }
+    }
+
+
+    /**
+     * Accumulate values under a key. It is similar to the put method except
+     * that if there is already an object stored under the key then a
+     * JSONArray is stored under the key to hold all of the accumulated values.
+     * If there is already a JSONArray, then the new value is appended to it.
+     * In contrast, the put method replaces the previous value.
+     *
+     * If only one value is accumulated that is not a JSONArray, then the
+     * result will be the same as using put. But if multiple values are
+     * accumulated, then the result will be like append.
+     * @param key   A key string.
+     * @param value An object to be accumulated under the key.
+     * @return this.
+     * @throws JSONException If the value is an invalid number
+     *  or if the key is null.
+     */
+    public JSONObject accumulate(
+        String key,
+        Object value
+    ) throws JSONException {
+        testValidity(value);
+        Object object = this.opt(key);
+        if (object == null) {
+            this.put(key, value instanceof JSONArray
+                    ? new JSONArray().put(value)
+                    : value);
+        } else if (object instanceof JSONArray) {
+            ((JSONArray)object).put(value);
+        } else {
+            this.put(key, new JSONArray().put(object).put(value));
+        }
+        return this;
+    }
+
+
+    /**
+     * Append values to the array under a key. If the key does not exist in the
+     * JSONObject, then the key is put in the JSONObject with its value being a
+     * JSONArray containing the value parameter. If the key was already
+     * associated with a JSONArray, then the value parameter is appended to it.
+     * @param key   A key string.
+     * @param value An object to be accumulated under the key.
+     * @return this.
+     * @throws JSONException If the key is null or if the current value
+     *  associated with the key is not a JSONArray.
+     */
+    public JSONObject append(String key, Object value) throws JSONException {
+        testValidity(value);
+        Object object = this.opt(key);
+        if (object == null) {
+            this.put(key, new JSONArray().put(value));
+        } else if (object instanceof JSONArray) {
+            this.put(key, ((JSONArray)object).put(value));
+        } else {
+            throw new JSONException("JSONObject[" + key +
+                    "] is not a JSONArray.");
+        }
+        return this;
+    }
+
+
+    /**
+     * Produce a string from a double. The string "null" will be returned if
+     * the number is not finite.
+     * @param  d A double.
+     * @return A String.
+     */
+    public static String doubleToString(double d) {
+        if (Double.isInfinite(d) || Double.isNaN(d)) {
+            return "null";
+        }
+
+// Shave off trailing zeros and decimal point, if possible.
+
+        String string = Double.toString(d);
+        if (string.indexOf('.') > 0 && string.indexOf('e') < 0 &&
+                string.indexOf('E') < 0) {
+            while (string.endsWith("0")) {
+                string = string.substring(0, string.length() - 1);
+            }
+            if (string.endsWith(".")) {
+                string = string.substring(0, string.length() - 1);
+            }
+        }
+        return string;
+    }
+
+
+    /**
+     * Get the value object associated with a key.
+     *
+     * @param key   A key string.
+     * @return      The object associated with the key.
+     * @throws      JSONException if the key is not found.
+     */
+    public Object get(String key) throws JSONException {
+        if (key == null) {
+            throw new JSONException("Null key.");
+        }
+        Object object = this.opt(key);
+        if (object == null) {
+            throw new JSONException("JSONObject[" + quote(key) +
+                    "] not found.");
+        }
+        return object;
+    }
+
+
+    /**
+     * Get the boolean value associated with a key.
+     *
+     * @param key   A key string.
+     * @return      The truth.
+     * @throws      JSONException
+     *  if the value is not a Boolean or the String "true" or "false".
+     */
+    public boolean getBoolean(String key) throws JSONException {
+        Object object = this.get(key);
+        if (object.equals(Boolean.FALSE) ||
+                (object instanceof String &&
+                ((String)object).equalsIgnoreCase("false"))) {
+            return false;
+        } else if (object.equals(Boolean.TRUE) ||
+                (object instanceof String &&
+                ((String)object).equalsIgnoreCase("true"))) {
+            return true;
+        }
+        throw new JSONException("JSONObject[" + quote(key) +
+                "] is not a Boolean.");
+    }
+
+
+    /**
+     * Get the double value associated with a key.
+     * @param key   A key string.
+     * @return      The numeric value.
+     * @throws JSONException if the key is not found or
+     *  if the value is not a Number object and cannot be converted to a number.
+     */
+    public double getDouble(String key) throws JSONException {
+        Object object = this.get(key);
+        try {
+            return object instanceof Number
+                ? ((Number)object).doubleValue()
+                : Double.parseDouble((String)object);
+        } catch (Exception e) {
+            throw new JSONException("JSONObject[" + quote(key) +
+                "] is not a number.");
+        }
+    }
+
+
+    /**
+     * Get the int value associated with a key.
+     *
+     * @param key   A key string.
+     * @return      The integer value.
+     * @throws   JSONException if the key is not found or if the value cannot
+     *  be converted to an integer.
+     */
+    public int getInt(String key) throws JSONException {
+        Object object = this.get(key);
+        try {
+            return object instanceof Number
+                ? ((Number)object).intValue()
+                : Integer.parseInt((String)object);
+        } catch (Exception e) {
+            throw new JSONException("JSONObject[" + quote(key) +
+                "] is not an int.");
+        }
+    }
+
+
+    /**
+     * Get the JSONArray value associated with a key.
+     *
+     * @param key   A key string.
+     * @return      A JSONArray which is the value.
+     * @throws      JSONException if the key is not found or
+     *  if the value is not a JSONArray.
+     */
+    public JSONArray getJSONArray(String key) throws JSONException {
+        Object object = this.get(key);
+        if (object instanceof JSONArray) {
+            return (JSONArray)object;
+        }
+        throw new JSONException("JSONObject[" + quote(key) +
+                "] is not a JSONArray.");
+    }
+
+
+    /**
+     * Get the JSONObject value associated with a key.
+     *
+     * @param key   A key string.
+     * @return      A JSONObject which is the value.
+     * @throws      JSONException if the key is not found or
+     *  if the value is not a JSONObject.
+     */
+    public JSONObject getJSONObject(String key) throws JSONException {
+        Object object = this.get(key);
+        if (object instanceof JSONObject) {
+            return (JSONObject)object;
+        }
+        throw new JSONException("JSONObject[" + quote(key) +
+                "] is not a JSONObject.");
+    }
+
+
+    /**
+     * Get the long value associated with a key.
+     *
+     * @param key   A key string.
+     * @return      The long value.
+     * @throws   JSONException if the key is not found or if the value cannot
+     *  be converted to a long.
+     */
+    public long getLong(String key) throws JSONException {
+        Object object = this.get(key);
+        try {
+            return object instanceof Number
+                ? ((Number)object).longValue()
+                : Long.parseLong((String)object);
+        } catch (Exception e) {
+            throw new JSONException("JSONObject[" + quote(key) +
+                "] is not a long.");
+        }
+    }
+
+
+    /**
+     * Get an array of field names from a JSONObject.
+     *
+     * @return An array of field names, or null if there are no names.
+     */
+    public static String[] getNames(JSONObject jo) {
+        int length = jo.length();
+        if (length == 0) {
+            return null;
+        }
+        Iterator iterator = jo.keys();
+        String[] names = new String[length];
+        int i = 0;
+        while (iterator.hasNext()) {
+            names[i] = (String)iterator.next();
+            i += 1;
+        }
+        return names;
+    }
+
+
+    /**
+     * Get an array of field names from an Object.
+     *
+     * @return An array of field names, or null if there are no names.
+     */
+    public static String[] getNames(Object object) {
+        if (object == null) {
+            return null;
+        }
+        Class klass = object.getClass();
+        Field[] fields = klass.getFields();
+        int length = fields.length;
+        if (length == 0) {
+            return null;
+        }
+        String[] names = new String[length];
+        for (int i = 0; i < length; i += 1) {
+            names[i] = fields[i].getName();
+        }
+        return names;
+    }
+
+
+    /**
+     * Get the string associated with a key.
+     *
+     * @param key   A key string.
+     * @return      A string which is the value.
+     * @throws   JSONException if there is no string value for the key.
+     */
+    public String getString(String key) throws JSONException {
+        Object object = this.get(key);
+        if (object instanceof String) {
+            return (String)object;
+        }
+        throw new JSONException("JSONObject[" + quote(key) +
+            "] not a string.");
+    }
+
+
+    /**
+     * Determine if the JSONObject contains a specific key.
+     * @param key   A key string.
+     * @return      true if the key exists in the JSONObject.
+     */
+    public boolean has(String key) {
+        return this.map.containsKey(key);
+    }
+
+
+    /**
+     * Increment a property of a JSONObject. If there is no such property,
+     * create one with a value of 1. If there is such a property, and if
+     * it is an Integer, Long, Double, or Float, then add one to it.
+     * @param key  A key string.
+     * @return this.
+     * @throws JSONException If there is already a property with this name
+     * that is not an Integer, Long, Double, or Float.
+     */
+    public JSONObject increment(String key) throws JSONException {
+        Object value = this.opt(key);
+        if (value == null) {
+            this.put(key, 1);
+        } else if (value instanceof Integer) {
+            this.put(key, ((Integer)value).intValue() + 1);
+        } else if (value instanceof Long) {
+            this.put(key, ((Long)value).longValue() + 1);
+        } else if (value instanceof Double) {
+            this.put(key, ((Double)value).doubleValue() + 1);
+        } else if (value instanceof Float) {
+            this.put(key, ((Float)value).floatValue() + 1);
+        } else {
+            throw new JSONException("Unable to increment [" + quote(key) + "].");
+        }
+        return this;
+    }
+
+
+    /**
+     * Determine if the value associated with the key is null or if there is
+     *  no value.
+     * @param key   A key string.
+     * @return      true if there is no value associated with the key or if
+     *  the value is the JSONObject.NULL object.
+     */
+    public boolean isNull(String key) {
+        return JSONObject.NULL.equals(this.opt(key));
+    }
+
+
+    /**
+     * Get an enumeration of the keys of the JSONObject.
+     *
+     * @return An iterator of the keys.
+     */
+    public Iterator keys() {
+        return this.map.keySet().iterator();
+    }
+
+
+    /**
+     * Get the number of keys stored in the JSONObject.
+     *
+     * @return The number of keys in the JSONObject.
+     */
+    public int length() {
+        return this.map.size();
+    }
+
+
+    /**
+     * Produce a JSONArray containing the names of the elements of this
+     * JSONObject.
+     * @return A JSONArray containing the key strings, or null if the JSONObject
+     * is empty.
+     */
+    public JSONArray names() {
+        JSONArray ja = new JSONArray();
+        Iterator  keys = this.keys();
+        while (keys.hasNext()) {
+            ja.put(keys.next());
+        }
+        return ja.length() == 0 ? null : ja;
+    }
+
+    /**
+     * Produce a string from a Number.
+     * @param  number A Number
+     * @return A String.
+     * @throws JSONException If n is a non-finite number.
+     */
+    public static String numberToString(Number number)
+            throws JSONException {
+        if (number == null) {
+            throw new JSONException("Null pointer");
+        }
+        testValidity(number);
+
+// Shave off trailing zeros and decimal point, if possible.
+
+        String string = number.toString();
+        if (string.indexOf('.') > 0 && string.indexOf('e') < 0 &&
+                string.indexOf('E') < 0) {
+            while (string.endsWith("0")) {
+                string = string.substring(0, string.length() - 1);
+            }
+            if (string.endsWith(".")) {
+                string = string.substring(0, string.length() - 1);
+            }
+        }
+        return string;
+    }
+
+
+    /**
+     * Get an optional value associated with a key.
+     * @param key   A key string.
+     * @return      An object which is the value, or null if there is no value.
+     */
+    public Object opt(String key) {
+        return key == null ? null : this.map.get(key);
+    }
+
+
+    /**
+     * Get an optional boolean associated with a key.
+     * It returns false if there is no such key, or if the value is not
+     * Boolean.TRUE or the String "true".
+     *
+     * @param key   A key string.
+     * @return      The truth.
+     */
+    public boolean optBoolean(String key) {
+        return this.optBoolean(key, false);
+    }
+
+
+    /**
+     * Get an optional boolean associated with a key.
+     * It returns the defaultValue if there is no such key, or if it is not
+     * a Boolean or the String "true" or "false" (case insensitive).
+     *
+     * @param key              A key string.
+     * @param defaultValue     The default.
+     * @return      The truth.
+     */
+    public boolean optBoolean(String key, boolean defaultValue) {
+        try {
+            return this.getBoolean(key);
+        } catch (Exception e) {
+            return defaultValue;
+        }
+    }
+
+
+    /**
+     * Get an optional double associated with a key,
+     * or NaN if there is no such key or if its value is not a number.
+     * If the value is a string, an attempt will be made to evaluate it as
+     * a number.
+     *
+     * @param key   A string which is the key.
+     * @return      An object which is the value.
+     */
+    public double optDouble(String key) {
+        return this.optDouble(key, Double.NaN);
+    }
+
+
+    /**
+     * Get an optional double associated with a key, or the
+     * defaultValue if there is no such key or if its value is not a number.
+     * If the value is a string, an attempt will be made to evaluate it as
+     * a number.
+     *
+     * @param key   A key string.
+     * @param defaultValue     The default.
+     * @return      An object which is the value.
+     */
+    public double optDouble(String key, double defaultValue) {
+        try {
+            return this.getDouble(key);
+        } catch (Exception e) {
+            return defaultValue;
+        }
+    }
+
+
+    /**
+     * Get an optional int value associated with a key,
+     * or zero if there is no such key or if the value is not a number.
+     * If the value is a string, an attempt will be made to evaluate it as
+     * a number.
+     *
+     * @param key   A key string.
+     * @return      An object which is the value.
+     */
+    public int optInt(String key) {
+        return this.optInt(key, 0);
+    }
+
+
+    /**
+     * Get an optional int value associated with a key,
+     * or the default if there is no such key or if the value is not a number.
+     * If the value is a string, an attempt will be made to evaluate it as
+     * a number.
+     *
+     * @param key   A key string.
+     * @param defaultValue     The default.
+     * @return      An object which is the value.
+     */
+    public int optInt(String key, int defaultValue) {
+        try {
+            return this.getInt(key);
+        } catch (Exception e) {
+            return defaultValue;
+        }
+    }
+
+
+    /**
+     * Get an optional JSONArray associated with a key.
+     * It returns null if there is no such key, or if its value is not a
+     * JSONArray.
+     *
+     * @param key   A key string.
+     * @return      A JSONArray which is the value.
+     */
+    public JSONArray optJSONArray(String key) {
+        Object o = this.opt(key);
+        return o instanceof JSONArray ? (JSONArray)o : null;
+    }
+
+
+    /**
+     * Get an optional JSONObject associated with a key.
+     * It returns null if there is no such key, or if its value is not a
+     * JSONObject.
+     *
+     * @param key   A key string.
+     * @return      A JSONObject which is the value.
+     */
+    public JSONObject optJSONObject(String key) {
+        Object object = this.opt(key);
+        return object instanceof JSONObject ? (JSONObject)object : null;
+    }
+
+
+    /**
+     * Get an optional long value associated with a key,
+     * or zero if there is no such key or if the value is not a number.
+     * If the value is a string, an attempt will be made to evaluate it as
+     * a number.
+     *
+     * @param key   A key string.
+     * @return      An object which is the value.
+     */
+    public long optLong(String key) {
+        return this.optLong(key, 0);
+    }
+
+
+    /**
+     * Get an optional long value associated with a key,
+     * or the default if there is no such key or if the value is not a number.
+     * If the value is a string, an attempt will be made to evaluate it as
+     * a number.
+     *
+     * @param key          A key string.
+     * @param defaultValue The default.
+     * @return             An object which is the value.
+     */
+    public long optLong(String key, long defaultValue) {
+        try {
+            return this.getLong(key);
+        } catch (Exception e) {
+            return defaultValue;
+        }
+    }
+
+
+    /**
+     * Get an optional string associated with a key.
+     * It returns an empty string if there is no such key. If the value is not
+     * a string and is not null, then it is converted to a string.
+     *
+     * @param key   A key string.
+     * @return      A string which is the value.
+     */
+    public String optString(String key) {
+        return this.optString(key, "");
+    }
+
+
+    /**
+     * Get an optional string associated with a key.
+     * It returns the defaultValue if there is no such key.
+     *
+     * @param key   A key string.
+     * @param defaultValue     The default.
+     * @return      A string which is the value.
+     */
+    public String optString(String key, String defaultValue) {
+        Object object = this.opt(key);
+        return NULL.equals(object) ? defaultValue : object.toString();
+    }
+
+
+    private void populateMap(Object bean) {
+        Class klass = bean.getClass();
+
+// If klass is a System class then set includeSuperClass to false.
+
+        boolean includeSuperClass = klass.getClassLoader() != null;
+
+        Method[] methods = includeSuperClass
+                ? klass.getMethods()
+                : klass.getDeclaredMethods();
+        for (int i = 0; i < methods.length; i += 1) {
+            try {
+                Method method = methods[i];
+                if (Modifier.isPublic(method.getModifiers())) {
+                    String name = method.getName();
+                    String key = "";
+                    if (name.startsWith("get")) {
+                        if ("getClass".equals(name) ||
+                                "getDeclaringClass".equals(name)) {
+                            key = "";
+                        } else {
+                            key = name.substring(3);
+                        }
+                    } else if (name.startsWith("is")) {
+                        key = name.substring(2);
+                    }
+                    if (key.length() > 0 &&
+                            Character.isUpperCase(key.charAt(0)) &&
+                            method.getParameterTypes().length == 0) {
+                        if (key.length() == 1) {
+                            key = key.toLowerCase();
+                        } else if (!Character.isUpperCase(key.charAt(1))) {
+                            key = key.substring(0, 1).toLowerCase() +
+                                key.substring(1);
+                        }
+
+                        Object result = method.invoke(bean, (Object[])null);
+                        if (result != null) {
+                            this.map.put(key, wrap(result));
+                        }
+                    }
+                }
+            } catch (Exception ignore) {
+            }
+        }
+    }
+
+
+    /**
+     * Put a key/boolean pair in the JSONObject.
+     *
+     * @param key   A key string.
+     * @param value A boolean which is the value.
+     * @return this.
+     * @throws JSONException If the key is null.
+     */
+    public JSONObject put(String key, boolean value) throws JSONException {
+        this.put(key, value ? Boolean.TRUE : Boolean.FALSE);
+        return this;
+    }
+
+
+    /**
+     * Put a key/value pair in the JSONObject, where the value will be a
+     * JSONArray which is produced from a Collection.
+     * @param key   A key string.
+     * @param value A Collection value.
+     * @return      this.
+     * @throws JSONException
+     */
+    public JSONObject put(String key, Collection value) throws JSONException {
+        this.put(key, new JSONArray(value));
+        return this;
+    }
+
+
+    /**
+     * Put a key/double pair in the JSONObject.
+     *
+     * @param key   A key string.
+     * @param value A double which is the value.
+     * @return this.
+     * @throws JSONException If the key is null or if the number is invalid.
+     */
+    public JSONObject put(String key, double value) throws JSONException {
+        this.put(key, new Double(value));
+        return this;
+    }
+
+
+    /**
+     * Put a key/int pair in the JSONObject.
+     *
+     * @param key   A key string.
+     * @param value An int which is the value.
+     * @return this.
+     * @throws JSONException If the key is null.
+     */
+    public JSONObject put(String key, int value) throws JSONException {
+        this.put(key, new Integer(value));
+        return this;
+    }
+
+
+    /**
+     * Put a key/long pair in the JSONObject.
+     *
+     * @param key   A key string.
+     * @param value A long which is the value.
+     * @return this.
+     * @throws JSONException If the key is null.
+     */
+    public JSONObject put(String key, long value) throws JSONException {
+        this.put(key, new Long(value));
+        return this;
+    }
+
+
+    /**
+     * Put a key/value pair in the JSONObject, where the value will be a
+     * JSONObject which is produced from a Map.
+     * @param key   A key string.
+     * @param value A Map value.
+     * @return      this.
+     * @throws JSONException
+     */
+    public JSONObject put(String key, Map value) throws JSONException {
+        this.put(key, new JSONObject(value));
+        return this;
+    }
+
+
+    /**
+     * Put a key/value pair in the JSONObject. If the value is null,
+     * then the key will be removed from the JSONObject if it is present.
+     * @param key   A key string.
+     * @param value An object which is the value. It should be of one of these
+     *  types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String,
+     *  or the JSONObject.NULL object.
+     * @return this.
+     * @throws JSONException If the value is non-finite number
+     *  or if the key is null.
+     */
+    public JSONObject put(String key, Object value) throws JSONException {
+        if (key == null) {
+            throw new JSONException("Null key.");
+        }
+        if (value != null) {
+            testValidity(value);
+            this.map.put(key, value);
+        } else {
+            this.remove(key);
+        }
+        return this;
+    }
+
+
+    /**
+     * Put a key/value pair in the JSONObject, but only if the key and the
+     * value are both non-null, and only if there is not already a member
+     * with that name.
+     * @param key
+     * @param value
+     * @return his.
+     * @throws JSONException if the key is a duplicate
+     */
+    public JSONObject putOnce(String key, Object value) throws JSONException {
+        if (key != null && value != null) {
+            if (this.opt(key) != null) {
+                throw new JSONException("Duplicate key \"" + key + "\"");
+            }
+            this.put(key, value);
+        }
+        return this;
+    }
+
+
+    /**
+     * Put a key/value pair in the JSONObject, but only if the
+     * key and the value are both non-null.
+     * @param key   A key string.
+     * @param value An object which is the value. It should be of one of these
+     *  types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String,
+     *  or the JSONObject.NULL object.
+     * @return this.
+     * @throws JSONException If the value is a non-finite number.
+     */
+    public JSONObject putOpt(String key, Object value) throws JSONException {
+        if (key != null && value != null) {
+            this.put(key, value);
+        }
+        return this;
+    }
+
+
+    /**
+     * Produce a string in double quotes with backslash sequences in all the
+     * right places. A backslash will be inserted within </, producing <\/,
+     * allowing JSON text to be delivered in HTML. In JSON text, a string
+     * cannot contain a control character or an unescaped quote or backslash.
+     * @param string A String
+     * @return  A String correctly formatted for insertion in a JSON text.
+     */
+    public static String quote(String string) {
+        StringWriter sw = new StringWriter();
+        synchronized (sw.getBuffer()) {
+            try {
+                return quote(string, sw).toString();
+            } catch (IOException ignored) {
+                // will never happen - we are writing to a string writer
+                return "";
+            }
+        }
+    }
+
+    public static Writer quote(String string, Writer w) throws IOException {
+        if (string == null || string.length() == 0) {
+            w.write("\"\"");
+            return w;
+        }
+
+        char b;
+        char c = 0;
+        String hhhh;
+        int i;
+        int len = string.length();
+
+        w.write('"');
+        for (i = 0; i < len; i += 1) {
+            b = c;
+            c = string.charAt(i);
+            switch (c) {
+            case '\\':
+            case '"':
+                w.write('\\');
+                w.write(c);
+                break;
+            case '/':
+                if (b == '<') {
+                    w.write('\\');
+                }
+                w.write(c);
+                break;
+            case '\b':
+                w.write("\\b");
+                break;
+            case '\t':
+                w.write("\\t");
+                break;
+            case '\n':
+                w.write("\\n");
+                break;
+            case '\f':
+                w.write("\\f");
+                break;
+            case '\r':
+                w.write("\\r");
+                break;
+            default:
+                if (c < ' ' || (c >= '\u0080' && c < '\u00a0')
+                        || (c >= '\u2000' && c < '\u2100')) {
+                    hhhh = "000" + Integer.toHexString(c);
+                    w.write("\\u" + hhhh.substring(hhhh.length() - 4));
+                } else {
+                    w.write(c);
+                }
+            }
+        }
+        w.write('"');
+        return w;
+    }
+
+    /**
+     * Remove a name and its value, if present.
+     * @param key The name to be removed.
+     * @return The value that was associated with the name,
+     * or null if there was no value.
+     */
+    public Object remove(String key) {
+        return this.map.remove(key);
+    }
+
+    /**
+     * Try to convert a string into a number, boolean, or null. If the string
+     * can't be converted, return the string.
+     * @param string A String.
+     * @return A simple JSON value.
+     */
+    public static Object stringToValue(String string) {
+        Double d;
+        if (string.equals("")) {
+            return string;
+        }
+        if (string.equalsIgnoreCase("true")) {
+            return Boolean.TRUE;
+        }
+        if (string.equalsIgnoreCase("false")) {
+            return Boolean.FALSE;
+        }
+        if (string.equalsIgnoreCase("null")) {
+            return JSONObject.NULL;
+        }
+
+        /*
+         * If it might be a number, try converting it.
+         * If a number cannot be produced, then the value will just
+         * be a string. Note that the plus and implied string
+         * conventions are non-standard. A JSON parser may accept
+         * non-JSON forms as long as it accepts all correct JSON forms.
+         */
+
+        char b = string.charAt(0);
+        if ((b >= '0' && b <= '9') || b == '.' || b == '-' || b == '+') {
+            try {
+                if (string.indexOf('.') > -1 ||
+                        string.indexOf('e') > -1 || string.indexOf('E') > -1) {
+                    d = Double.valueOf(string);
+                    if (!d.isInfinite() && !d.isNaN()) {
+                        return d;
+                    }
+                } else {
+                    Long myLong = new Long(string);
+                    if (myLong.longValue() == myLong.intValue()) {
+                        return new Integer(myLong.intValue());
+                    } else {
+                        return myLong;
+                    }
+                }
+            }  catch (Exception ignore) {
+            }
+        }
+        return string;
+    }
+
+
+    /**
+     * Throw an exception if the object is a NaN or infinite number.
+     * @param o The object to test.
+     * @throws JSONException If o is a non-finite number.
+     */
+    public static void testValidity(Object o) throws JSONException {
+        if (o != null) {
+            if (o instanceof Double) {
+                if (((Double)o).isInfinite() || ((Double)o).isNaN()) {
+                    throw new JSONException(
+                        "JSON does not allow non-finite numbers.");
+                }
+            } else if (o instanceof Float) {
+                if (((Float)o).isInfinite() || ((Float)o).isNaN()) {
+                    throw new JSONException(
+                        "JSON does not allow non-finite numbers.");
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Produce a JSONArray containing the values of the members of this
+     * JSONObject.
+     * @param names A JSONArray containing a list of key strings. This
+     * determines the sequence of the values in the result.
+     * @return A JSONArray of values.
+     * @throws JSONException If any of the values are non-finite numbers.
+     */
+    public JSONArray toJSONArray(JSONArray names) throws JSONException {
+        if (names == null || names.length() == 0) {
+            return null;
+        }
+        JSONArray ja = new JSONArray();
+        for (int i = 0; i < names.length(); i += 1) {
+            ja.put(this.opt(names.getString(i)));
+        }
+        return ja;
+    }
+
+    /**
+     * Make a JSON text of this JSONObject. For compactness, no whitespace
+     * is added. If this would not result in a syntactically correct JSON text,
+     * then null will be returned instead.
+     * <p>
+     * Warning: This method assumes that the data structure is acyclical.
+     *
+     * @return a printable, displayable, portable, transmittable
+     *  representation of the object, beginning
+     *  with <code>{</code>&nbsp;<small>(left brace)</small> and ending
+     *  with <code>}</code>&nbsp;<small>(right brace)</small>.
+     */
+    public String toString() {
+        try {
+            return this.toString(0);
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+
+    /**
+     * Make a prettyprinted JSON text of this JSONObject.
+     * <p>
+     * Warning: This method assumes that the data structure is acyclical.
+     * @param indentFactor The number of spaces to add to each level of
+     *  indentation.
+     * @return a printable, displayable, portable, transmittable
+     *  representation of the object, beginning
+     *  with <code>{</code>&nbsp;<small>(left brace)</small> and ending
+     *  with <code>}</code>&nbsp;<small>(right brace)</small>.
+     * @throws JSONException If the object contains an invalid number.
+     */
+    public String toString(int indentFactor) throws JSONException {
+        StringWriter w = new StringWriter();
+        synchronized (w.getBuffer()) {
+            return this.write(w, indentFactor, 0).toString();
+        }
+    }
+
+    /**
+     * Make a JSON text of an Object value. If the object has an
+     * value.toJSONString() method, then that method will be used to produce
+     * the JSON text. The method is required to produce a strictly
+     * conforming text. If the object does not contain a toJSONString
+     * method (which is the most common case), then a text will be
+     * produced by other means. If the value is an array or Collection,
+     * then a JSONArray will be made from it and its toJSONString method
+     * will be called. If the value is a MAP, then a JSONObject will be made
+     * from it and its toJSONString method will be called. Otherwise, the
+     * value's toString method will be called, and the result will be quoted.
+     *
+     * <p>
+     * Warning: This method assumes that the data structure is acyclical.
+     * @param value The value to be serialized.
+     * @return a printable, displayable, transmittable
+     *  representation of the object, beginning
+     *  with <code>{</code>&nbsp;<small>(left brace)</small> and ending
+     *  with <code>}</code>&nbsp;<small>(right brace)</small>.
+     * @throws JSONException If the value is or contains an invalid number.
+     */
+    public static String valueToString(Object value) throws JSONException {
+        if (value == null || value.equals(null)) {
+            return "null";
+        }
+        if (value instanceof JSONString) {
+            Object object;
+            try {
+                object = ((JSONString)value).toJSONString();
+            } catch (Exception e) {
+                throw new JSONException(e);
+            }
+            if (object instanceof String) {
+                return (String)object;
+            }
+            throw new JSONException("Bad value from toJSONString: " + object);
+        }
+        if (value instanceof Number) {
+            return numberToString((Number) value);
+        }
+        if (value instanceof Boolean || value instanceof JSONObject ||
+                value instanceof JSONArray) {
+            return value.toString();
+        }
+        if (value instanceof Map) {
+            return new JSONObject((Map)value).toString();
+        }
+        if (value instanceof Collection) {
+            return new JSONArray((Collection)value).toString();
+        }
+        if (value.getClass().isArray()) {
+            return new JSONArray(value).toString();
+        }
+        return quote(value.toString());
+    }
+
+     /**
+      * Wrap an object, if necessary. If the object is null, return the NULL
+      * object. If it is an array or collection, wrap it in a JSONArray. If
+      * it is a map, wrap it in a JSONObject. If it is a standard property
+      * (Double, String, et al) then it is already wrapped. Otherwise, if it
+      * comes from one of the java packages, turn it into a string. And if
+      * it doesn't, try to wrap it in a JSONObject. If the wrapping fails,
+      * then null is returned.
+      *
+      * @param object The object to wrap
+      * @return The wrapped value
+      */
+     public static Object wrap(Object object) {
+         try {
+             if (object == null) {
+                 return NULL;
+             }
+             if (object instanceof JSONObject || object instanceof JSONArray  ||
+                     NULL.equals(object)      || object instanceof JSONString ||
+                     object instanceof Byte   || object instanceof Character  ||
+                     object instanceof Short  || object instanceof Integer    ||
+                     object instanceof Long   || object instanceof Boolean    ||
+                     object instanceof Float  || object instanceof Double     ||
+                     object instanceof String || object instanceof Enum) {
+                 return object;
+             }
+
+             if (object instanceof Collection) {
+                 return new JSONArray((Collection)object);
+             }
+             if (object.getClass().isArray()) {
+                 return new JSONArray(object);
+             }
+             if (object instanceof Map) {
+                 return new JSONObject((Map)object);
+             }
+             Package objectPackage = object.getClass().getPackage();
+             String objectPackageName = objectPackage != null
+                 ? objectPackage.getName()
+                 : "";
+             if (
+                 objectPackageName.startsWith("java.") ||
+                 objectPackageName.startsWith("javax.") ||
+                 object.getClass().getClassLoader() == null
+             ) {
+                 return object.toString();
+             }
+             return new JSONObject(object);
+         } catch(Exception exception) {
+             return null;
+         }
+     }
+
+
+     /**
+      * Write the contents of the JSONObject as JSON text to a writer.
+      * For compactness, no whitespace is added.
+      * <p>
+      * Warning: This method assumes that the data structure is acyclical.
+      *
+      * @return The writer.
+      * @throws JSONException
+      */
+     public Writer write(Writer writer) throws JSONException {
+        return this.write(writer, 0, 0);
+    }
+
+
+    static final Writer writeValue(Writer writer, Object value,
+            int indentFactor, int indent) throws JSONException, IOException {
+        if (value == null || value.equals(null)) {
+            writer.write("null");
+        } else if (value instanceof JSONObject) {
+            ((JSONObject) value).write(writer, indentFactor, indent);
+        } else if (value instanceof JSONArray) {
+            ((JSONArray) value).write(writer, indentFactor, indent);
+        } else if (value instanceof Map) {
+            new JSONObject((Map) value).write(writer, indentFactor, indent);
+        } else if (value instanceof Collection) {
+            new JSONArray((Collection) value).write(writer, indentFactor,
+                    indent);
+        } else if (value.getClass().isArray()) {
+            new JSONArray(value).write(writer, indentFactor, indent);
+        } else if (value instanceof Number) {
+            writer.write(numberToString((Number) value));
+        } else if (value instanceof Boolean) {
+            writer.write(value.toString());
+        } else if (value instanceof JSONString) {
+            Object o;
+            try {
+                o = ((JSONString) value).toJSONString();
+            } catch (Exception e) {
+                throw new JSONException(e);
+            }
+            writer.write(o != null ? o.toString() : quote(value.toString()));
+        } else {
+            quote(value.toString(), writer);
+        }
+        return writer;
+    }
+
+    static final void indent(Writer writer, int indent) throws IOException {
+        for (int i = 0; i < indent; i += 1) {
+            writer.write(' ');
+        }
+    }
+
+    /**
+     * Write the contents of the JSONObject as JSON text to a writer. For
+     * compactness, no whitespace is added.
+     * <p>
+     * Warning: This method assumes that the data structure is acyclical.
+     *
+     * @return The writer.
+     * @throws JSONException
+     */
+    Writer write(Writer writer, int indentFactor, int indent)
+            throws JSONException {
+        try {
+            boolean commanate = false;
+            final int length = this.length();
+            Iterator keys = this.keys();
+            writer.write('{');
+
+            if (length == 1) {
+                Object key = keys.next();
+                writer.write(quote(key.toString()));
+                writer.write(':');
+                if (indentFactor > 0) {
+                    writer.write(' ');
+                }
+                writeValue(writer, this.map.get(key), indentFactor, indent);
+            } else if (length != 0) {
+                final int newindent = indent + indentFactor;
+                while (keys.hasNext()) {
+                    Object key = keys.next();
+                    if (commanate) {
+                        writer.write(',');
+                    }
+                    if (indentFactor > 0) {
+                        writer.write('\n');
+                    }
+                    indent(writer, newindent);
+                    writer.write(quote(key.toString()));
+                    writer.write(':');
+                    if (indentFactor > 0) {
+                        writer.write(' ');
+                    }
+                    writeValue(writer, this.map.get(key), indentFactor,
+                            newindent);
+                    commanate = true;
+                }
+                if (indentFactor > 0) {
+                    writer.write('\n');
+                }
+                indent(writer, indent);
+            }
+            writer.write('}');
+            return writer;
+        } catch (IOException exception) {
+            throw new JSONException(exception);
+        }
+     }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONString.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONString.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONString.java
new file mode 100644
index 0000000..8f0ea3f
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONString.java
@@ -0,0 +1,18 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+/**
+ * The <code>JSONString</code> interface allows a <code>toJSONString()</code> 
+ * method so that a class can change the behavior of 
+ * <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>,
+ * and <code>JSONWriter.value(</code>Object<code>)</code>. The 
+ * <code>toJSONString</code> method will be used instead of the default behavior 
+ * of using the Object's <code>toString()</code> method and quoting the result.
+ */
+public interface JSONString {
+    /**
+     * The <code>toJSONString</code> method allows a class to produce its own JSON 
+     * serialization. 
+     * 
+     * @return A strictly syntactically correct JSON text.
+     */
+    public String toJSONString();
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONStringer.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONStringer.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONStringer.java
new file mode 100644
index 0000000..89b8ab0
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONStringer.java
@@ -0,0 +1,78 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2006 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.io.StringWriter;
+
+/**
+ * JSONStringer provides a quick and convenient way of producing JSON text.
+ * The texts produced strictly conform to JSON syntax rules. No whitespace is
+ * added, so the results are ready for transmission or storage. Each instance of
+ * JSONStringer can produce one JSON text.
+ * <p>
+ * A JSONStringer instance provides a <code>value</code> method for appending
+ * values to the
+ * text, and a <code>key</code>
+ * method for adding keys before values in objects. There are <code>array</code>
+ * and <code>endArray</code> methods that make and bound array values, and
+ * <code>object</code> and <code>endObject</code> methods which make and bound
+ * object values. All of these methods return the JSONWriter instance,
+ * permitting cascade style. For example, <pre>
+ * myString = new JSONStringer()
+ *     .object()
+ *         .key("JSON")
+ *         .value("Hello, World!")
+ *     .endObject()
+ *     .toString();</pre> which produces the string <pre>
+ * {"JSON":"Hello, World!"}</pre>
+ * <p>
+ * The first method called must be <code>array</code> or <code>object</code>.
+ * There are no methods for adding commas or colons. JSONStringer adds them for
+ * you. Objects and arrays can be nested up to 20 levels deep.
+ * <p>
+ * This can sometimes be easier than using a JSONObject to build a string.
+ * @author JSON.org
+ * @version 2008-09-18
+ */
+public class JSONStringer extends JSONWriter {
+    /**
+     * Make a fresh JSONStringer. It can be used to build one JSON text.
+     */
+    public JSONStringer() {
+        super(new StringWriter());
+    }
+
+    /**
+     * Return the JSON text. This method is used to obtain the product of the
+     * JSONStringer instance. It will return <code>null</code> if there was a
+     * problem in the construction of the JSON text (such as the calls to
+     * <code>array</code> were not properly balanced with calls to
+     * <code>endArray</code>).
+     * @return The JSON text.
+     */
+    public String toString() {
+        return this.mode == 'd' ? this.writer.toString() : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONTokener.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONTokener.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONTokener.java
new file mode 100644
index 0000000..d2c802a
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONTokener.java
@@ -0,0 +1,446 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringReader;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * A JSONTokener takes a source string and extracts characters and tokens from
+ * it. It is used by the JSONObject and JSONArray constructors to parse
+ * JSON source strings.
+ * @author JSON.org
+ * @version 2012-02-16
+ */
+public class JSONTokener {
+
+    private long    character;
+    private boolean eof;
+    private long    index;
+    private long    line;
+    private char    previous;
+    private Reader  reader;
+    private boolean usePrevious;
+
+
+    /**
+     * Construct a JSONTokener from a Reader.
+     *
+     * @param reader     A reader.
+     */
+    public JSONTokener(Reader reader) {
+        this.reader = reader.markSupported()
+            ? reader
+            : new BufferedReader(reader);
+        this.eof = false;
+        this.usePrevious = false;
+        this.previous = 0;
+        this.index = 0;
+        this.character = 1;
+        this.line = 1;
+    }
+
+
+    /**
+     * Construct a JSONTokener from an InputStream.
+     */
+    public JSONTokener(InputStream inputStream) throws JSONException {
+        this(new InputStreamReader(inputStream));
+    }
+
+
+    /**
+     * Construct a JSONTokener from a string.
+     *
+     * @param s     A source string.
+     */
+    public JSONTokener(String s) {
+        this(new StringReader(s));
+    }
+
+
+    /**
+     * Back up one character. This provides a sort of lookahead capability,
+     * so that you can test for a digit or letter before attempting to parse
+     * the next number or identifier.
+     */
+    public void back() throws JSONException {
+        if (this.usePrevious || this.index <= 0) {
+            throw new JSONException("Stepping back two steps is not supported");
+        }
+        this.index -= 1;
+        this.character -= 1;
+        this.usePrevious = true;
+        this.eof = false;
+    }
+
+
+    /**
+     * Get the hex value of a character (base16).
+     * @param c A character between '0' and '9' or between 'A' and 'F' or
+     * between 'a' and 'f'.
+     * @return  An int between 0 and 15, or -1 if c was not a hex digit.
+     */
+    public static int dehexchar(char c) {
+        if (c >= '0' && c <= '9') {
+            return c - '0';
+        }
+        if (c >= 'A' && c <= 'F') {
+            return c - ('A' - 10);
+        }
+        if (c >= 'a' && c <= 'f') {
+            return c - ('a' - 10);
+        }
+        return -1;
+    }
+
+    public boolean end() {
+        return this.eof && !this.usePrevious;
+    }
+
+
+    /**
+     * Determine if the source string still contains characters that next()
+     * can consume.
+     * @return true if not yet at the end of the source.
+     */
+    public boolean more() throws JSONException {
+        this.next();
+        if (this.end()) {
+            return false;
+        }
+        this.back();
+        return true;
+    }
+
+
+    /**
+     * Get the next character in the source string.
+     *
+     * @return The next character, or 0 if past the end of the source string.
+     */
+    public char next() throws JSONException {
+        int c;
+        if (this.usePrevious) {
+            this.usePrevious = false;
+            c = this.previous;
+        } else {
+            try {
+                c = this.reader.read();
+            } catch (IOException exception) {
+                throw new JSONException(exception);
+            }
+
+            if (c <= 0) { // End of stream
+                this.eof = true;
+                c = 0;
+            }
+        }
+        this.index += 1;
+        if (this.previous == '\r') {
+            this.line += 1;
+            this.character = c == '\n' ? 0 : 1;
+        } else if (c == '\n') {
+            this.line += 1;
+            this.character = 0;
+        } else {
+            this.character += 1;
+        }
+        this.previous = (char) c;
+        return this.previous;
+    }
+
+
+    /**
+     * Consume the next character, and check that it matches a specified
+     * character.
+     * @param c The character to match.
+     * @return The character.
+     * @throws JSONException if the character does not match.
+     */
+    public char next(char c) throws JSONException {
+        char n = this.next();
+        if (n != c) {
+            throw this.syntaxError("Expected '" + c + "' and instead saw '" +
+                    n + "'");
+        }
+        return n;
+    }
+
+
+    /**
+     * Get the next n characters.
+     *
+     * @param n     The number of characters to take.
+     * @return      A string of n characters.
+     * @throws JSONException
+     *   Substring bounds error if there are not
+     *   n characters remaining in the source string.
+     */
+     public String next(int n) throws JSONException {
+         if (n == 0) {
+             return "";
+         }
+
+         char[] chars = new char[n];
+         int pos = 0;
+
+         while (pos < n) {
+             chars[pos] = this.next();
+             if (this.end()) {
+                 throw this.syntaxError("Substring bounds error");
+             }
+             pos += 1;
+         }
+         return new String(chars);
+     }
+
+
+    /**
+     * Get the next char in the string, skipping whitespace.
+     * @throws JSONException
+     * @return  A character, or 0 if there are no more characters.
+     */
+    public char nextClean() throws JSONException {
+        for (;;) {
+            char c = this.next();
+            if (c == 0 || c > ' ') {
+                return c;
+            }
+        }
+    }
+
+
+    /**
+     * Return the characters up to the next close quote character.
+     * Backslash processing is done. The formal JSON format does not
+     * allow strings in single quotes, but an implementation is allowed to
+     * accept them.
+     * @param quote The quoting character, either
+     *      <code>"</code>&nbsp;<small>(double quote)</small> or
+     *      <code>'</code>&nbsp;<small>(single quote)</small>.
+     * @return      A String.
+     * @throws JSONException Unterminated string.
+     */
+    public String nextString(char quote) throws JSONException {
+        char c;
+        StringBuffer sb = new StringBuffer();
+        for (;;) {
+            c = this.next();
+            switch (c) {
+            case 0:
+            case '\n':
+            case '\r':
+                throw this.syntaxError("Unterminated string");
+            case '\\':
+                c = this.next();
+                switch (c) {
+                case 'b':
+                    sb.append('\b');
+                    break;
+                case 't':
+                    sb.append('\t');
+                    break;
+                case 'n':
+                    sb.append('\n');
+                    break;
+                case 'f':
+                    sb.append('\f');
+                    break;
+                case 'r':
+                    sb.append('\r');
+                    break;
+                case 'u':
+                    sb.append((char)Integer.parseInt(this.next(4), 16));
+                    break;
+                case '"':
+                case '\'':
+                case '\\':
+                case '/':
+                    sb.append(c);
+                    break;
+                default:
+                    throw this.syntaxError("Illegal escape.");
+                }
+                break;
+            default:
+                if (c == quote) {
+                    return sb.toString();
+                }
+                sb.append(c);
+            }
+        }
+    }
+
+
+    /**
+     * Get the text up but not including the specified character or the
+     * end of line, whichever comes first.
+     * @param  delimiter A delimiter character.
+     * @return   A string.
+     */
+    public String nextTo(char delimiter) throws JSONException {
+        StringBuffer sb = new StringBuffer();
+        for (;;) {
+            char c = this.next();
+            if (c == delimiter || c == 0 || c == '\n' || c == '\r') {
+                if (c != 0) {
+                    this.back();
+                }
+                return sb.toString().trim();
+            }
+            sb.append(c);
+        }
+    }
+
+
+    /**
+     * Get the text up but not including one of the specified delimiter
+     * characters or the end of line, whichever comes first.
+     * @param delimiters A set of delimiter characters.
+     * @return A string, trimmed.
+     */
+    public String nextTo(String delimiters) throws JSONException {
+        char c;
+        StringBuffer sb = new StringBuffer();
+        for (;;) {
+            c = this.next();
+            if (delimiters.indexOf(c) >= 0 || c == 0 ||
+                    c == '\n' || c == '\r') {
+                if (c != 0) {
+                    this.back();
+                }
+                return sb.toString().trim();
+            }
+            sb.append(c);
+        }
+    }
+
+
+    /**
+     * Get the next value. The value can be a Boolean, Double, Integer,
+     * JSONArray, JSONObject, Long, or String, or the JSONObject.NULL object.
+     * @throws JSONException If syntax error.
+     *
+     * @return An object.
+     */
+    public Object nextValue() throws JSONException {
+        char c = this.nextClean();
+        String string;
+
+        switch (c) {
+            case '"':
+            case '\'':
+                return this.nextString(c);
+            case '{':
+                this.back();
+                return new JSONObject(this);
+            case '[':
+                this.back();
+                return new JSONArray(this);
+        }
+
+        /*
+         * Handle unquoted text. This could be the values true, false, or
+         * null, or it can be a number. An implementation (such as this one)
+         * is allowed to also accept non-standard forms.
+         *
+         * Accumulate characters until we reach the end of the text or a
+         * formatting character.
+         */
+
+        StringBuffer sb = new StringBuffer();
+        while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) {
+            sb.append(c);
+            c = this.next();
+        }
+        this.back();
+
+        string = sb.toString().trim();
+        if ("".equals(string)) {
+            throw this.syntaxError("Missing value");
+        }
+        return JSONObject.stringToValue(string);
+    }
+
+
+    /**
+     * Skip characters until the next character is the requested character.
+     * If the requested character is not found, no characters are skipped.
+     * @param to A character to skip to.
+     * @return The requested character, or zero if the requested character
+     * is not found.
+     */
+    public char skipTo(char to) throws JSONException {
+        char c;
+        try {
+            long startIndex = this.index;
+            long startCharacter = this.character;
+            long startLine = this.line;
+            this.reader.mark(1000000);
+            do {
+                c = this.next();
+                if (c == 0) {
+                    this.reader.reset();
+                    this.index = startIndex;
+                    this.character = startCharacter;
+                    this.line = startLine;
+                    return c;
+                }
+            } while (c != to);
+        } catch (IOException exc) {
+            throw new JSONException(exc);
+        }
+
+        this.back();
+        return c;
+    }
+
+
+    /**
+     * Make a JSONException to signal a syntax error.
+     *
+     * @param message The error message.
+     * @return  A JSONException object, suitable for throwing
+     */
+    public JSONException syntaxError(String message) {
+        return new JSONException(message + this.toString());
+    }
+
+
+    /**
+     * Make a printable string of this JSONTokener.
+     *
+     * @return " at {index} [character {character} line {line}]"
+     */
+    public String toString() {
+        return " at " + this.index + " [character " + this.character + " line " +
+            this.line + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONWriter.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONWriter.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONWriter.java
new file mode 100644
index 0000000..887f2ed
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONWriter.java
@@ -0,0 +1,327 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/*
+Copyright (c) 2006 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/**
+ * JSONWriter provides a quick and convenient way of producing JSON text.
+ * The texts produced strictly conform to JSON syntax rules. No whitespace is
+ * added, so the results are ready for transmission or storage. Each instance of
+ * JSONWriter can produce one JSON text.
+ * <p>
+ * A JSONWriter instance provides a <code>value</code> method for appending
+ * values to the
+ * text, and a <code>key</code>
+ * method for adding keys before values in objects. There are <code>array</code>
+ * and <code>endArray</code> methods that make and bound array values, and
+ * <code>object</code> and <code>endObject</code> methods which make and bound
+ * object values. All of these methods return the JSONWriter instance,
+ * permitting a cascade style. For example, <pre>
+ * new JSONWriter(myWriter)
+ *     .object()
+ *         .key("JSON")
+ *         .value("Hello, World!")
+ *     .endObject();</pre> which writes <pre>
+ * {"JSON":"Hello, World!"}</pre>
+ * <p>
+ * The first method called must be <code>array</code> or <code>object</code>.
+ * There are no methods for adding commas or colons. JSONWriter adds them for
+ * you. Objects and arrays can be nested up to 20 levels deep.
+ * <p>
+ * This can sometimes be easier than using a JSONObject to build a string.
+ * @author JSON.org
+ * @version 2011-11-24
+ */
+public class JSONWriter {
+    private static final int maxdepth = 200;
+
+    /**
+     * The comma flag determines if a comma should be output before the next
+     * value.
+     */
+    private boolean comma;
+
+    /**
+     * The current mode. Values:
+     * 'a' (array),
+     * 'd' (done),
+     * 'i' (initial),
+     * 'k' (key),
+     * 'o' (object).
+     */
+    protected char mode;
+
+    /**
+     * The object/array stack.
+     */
+    private final JSONObject stack[];
+
+    /**
+     * The stack top index. A value of 0 indicates that the stack is empty.
+     */
+    private int top;
+
+    /**
+     * The writer that will receive the output.
+     */
+    protected Writer writer;
+
+    /**
+     * Make a fresh JSONWriter. It can be used to build one JSON text.
+     */
+    public JSONWriter(Writer w) {
+        this.comma = false;
+        this.mode = 'i';
+        this.stack = new JSONObject[maxdepth];
+        this.top = 0;
+        this.writer = w;
+    }
+
+    /**
+     * Append a value.
+     * @param string A string value.
+     * @return this
+     * @throws JSONException If the value is out of sequence.
+     */
+    private JSONWriter append(String string) throws JSONException {
+        if (string == null) {
+            throw new JSONException("Null pointer");
+        }
+        if (this.mode == 'o' || this.mode == 'a') {
+            try {
+                if (this.comma && this.mode == 'a') {
+                    this.writer.write(',');
+                }
+                this.writer.write(string);
+            } catch (IOException e) {
+                throw new JSONException(e);
+            }
+            if (this.mode == 'o') {
+                this.mode = 'k';
+            }
+            this.comma = true;
+            return this;
+        }
+        throw new JSONException("Value out of sequence.");
+    }
+
+    /**
+     * Begin appending a new array. All values until the balancing
+     * <code>endArray</code> will be appended to this array. The
+     * <code>endArray</code> method must be called to mark the array's end.
+     * @return this
+     * @throws JSONException If the nesting is too deep, or if the object is
+     * started in the wrong place (for example as a key or after the end of the
+     * outermost array or object).
+     */
+    public JSONWriter array() throws JSONException {
+        if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') {
+            this.push(null);
+            this.append("[");
+            this.comma = false;
+            return this;
+        }
+        throw new JSONException("Misplaced array.");
+    }
+
+    /**
+     * End something.
+     * @param mode Mode
+     * @param c Closing character
+     * @return this
+     * @throws JSONException If unbalanced.
+     */
+    private JSONWriter end(char mode, char c) throws JSONException {
+        if (this.mode != mode) {
+            throw new JSONException(mode == 'a'
+                ? "Misplaced endArray."
+                : "Misplaced endObject.");
+        }
+        this.pop(mode);
+        try {
+            this.writer.write(c);
+        } catch (IOException e) {
+            throw new JSONException(e);
+        }
+        this.comma = true;
+        return this;
+    }
+
+    /**
+     * End an array. This method most be called to balance calls to
+     * <code>array</code>.
+     * @return this
+     * @throws JSONException If incorrectly nested.
+     */
+    public JSONWriter endArray() throws JSONException {
+        return this.end('a', ']');
+    }
+
+    /**
+     * End an object. This method most be called to balance calls to
+     * <code>object</code>.
+     * @return this
+     * @throws JSONException If incorrectly nested.
+     */
+    public JSONWriter endObject() throws JSONException {
+        return this.end('k', '}');
+    }
+
+    /**
+     * Append a key. The key will be associated with the next value. In an
+     * object, every value must be preceded by a key.
+     * @param string A key string.
+     * @return this
+     * @throws JSONException If the key is out of place. For example, keys
+     *  do not belong in arrays or if the key is null.
+     */
+    public JSONWriter key(String string) throws JSONException {
+        if (string == null) {
+            throw new JSONException("Null key.");
+        }
+        if (this.mode == 'k') {
+            try {
+                this.stack[this.top - 1].putOnce(string, Boolean.TRUE);
+                if (this.comma) {
+                    this.writer.write(',');
+                }
+                this.writer.write(JSONObject.quote(string));
+                this.writer.write(':');
+                this.comma = false;
+                this.mode = 'o';
+                return this;
+            } catch (IOException e) {
+                throw new JSONException(e);
+            }
+        }
+        throw new JSONException("Misplaced key.");
+    }
+
+
+    /**
+     * Begin appending a new object. All keys and values until the balancing
+     * <code>endObject</code> will be appended to this object. The
+     * <code>endObject</code> method must be called to mark the object's end.
+     * @return this
+     * @throws JSONException If the nesting is too deep, or if the object is
+     * started in the wrong place (for example as a key or after the end of the
+     * outermost array or object).
+     */
+    public JSONWriter object() throws JSONException {
+        if (this.mode == 'i') {
+            this.mode = 'o';
+        }
+        if (this.mode == 'o' || this.mode == 'a') {
+            this.append("{");
+            this.push(new JSONObject());
+            this.comma = false;
+            return this;
+        }
+        throw new JSONException("Misplaced object.");
+
+    }
+
+
+    /**
+     * Pop an array or object scope.
+     * @param c The scope to close.
+     * @throws JSONException If nesting is wrong.
+     */
+    private void pop(char c) throws JSONException {
+        if (this.top <= 0) {
+            throw new JSONException("Nesting error.");
+        }
+        char m = this.stack[this.top - 1] == null ? 'a' : 'k';
+        if (m != c) {
+            throw new JSONException("Nesting error.");
+        }
+        this.top -= 1;
+        this.mode = this.top == 0
+            ? 'd'
+            : this.stack[this.top - 1] == null
+            ? 'a'
+            : 'k';
+    }
+
+    /**
+     * Push an array or object scope.
+     * @param c The scope to open.
+     * @throws JSONException If nesting is too deep.
+     */
+    private void push(JSONObject jo) throws JSONException {
+        if (this.top >= maxdepth) {
+            throw new JSONException("Nesting too deep.");
+        }
+        this.stack[this.top] = jo;
+        this.mode = jo == null ? 'a' : 'k';
+        this.top += 1;
+    }
+
+
+    /**
+     * Append either the value <code>true</code> or the value
+     * <code>false</code>.
+     * @param b A boolean.
+     * @return this
+     * @throws JSONException
+     */
+    public JSONWriter value(boolean b) throws JSONException {
+        return this.append(b ? "true" : "false");
+    }
+
+    /**
+     * Append a double value.
+     * @param d A double.
+     * @return this
+     * @throws JSONException If the number is not finite.
+     */
+    public JSONWriter value(double d) throws JSONException {
+        return this.value(new Double(d));
+    }
+
+    /**
+     * Append a long value.
+     * @param l A long.
+     * @return this
+     * @throws JSONException
+     */
+    public JSONWriter value(long l) throws JSONException {
+        return this.append(Long.toString(l));
+    }
+
+
+    /**
+     * Append an object value.
+     * @param object The object to append. It can be null, or a Boolean, Number,
+     *   String, JSONObject, or JSONArray, or an object that implements JSONString.
+     * @return this
+     * @throws JSONException If the value is out of sequence.
+     */
+    public JSONWriter value(Object object) throws JSONException {
+        return this.append(JSONObject.valueToString(object));
+    }
+}


[55/79] incubator-geode git commit: GEODE-309: Move AgentUtilJUnitTest to the proper package

Posted by tu...@apache.org.
GEODE-309: Move AgentUtilJUnitTest to the proper package

Move AgentUtilJUnitTest into com.gemstone.gemfire.management.internal
package. Cleanup test including:

- Remove unused imports

- Uncomment a commented test and use @Ignore with description


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5f82490a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5f82490a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5f82490a

Branch: refs/heads/feature/GEODE-17
Commit: 5f82490a1e80b7830e9deed45643909182dd4bd0
Parents: 8f92f8e
Author: Kirk Lund <kl...@pivotal.io>
Authored: Fri Sep 4 12:29:24 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:52:44 2015 +0530

----------------------------------------------------------------------
 .../src/test/java/AgentUtilJUnitTest.java       | 109 -------------------
 .../management/internal/AgentUtilJUnitTest.java | 106 ++++++++++++++++++
 2 files changed, 106 insertions(+), 109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5f82490a/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java b/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java
deleted file mode 100644
index 0f7563b..0000000
--- a/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import com.gemstone.gemfire.management.internal.AgentUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import static org.junit.Assert.*;
-
-@Category(IntegrationTest.class)
-public class AgentUtilJUnitTest {
-
-  private AgentUtil agentUtil;
-  private String version;
-
-  @Before
-  public void setUp() {
-    version = getGemfireVersion();
-    agentUtil = new AgentUtil(version);
-  }
-
-  @Test
-  public void testRESTApiExists() {
-    String gemFireWarLocation = agentUtil.getGemFireWebApiWarLocation();
-    assertNotNull(gemFireWarLocation, "GemFire REST API WAR File was not found");
-  }
-
-  /*
-   * This test should be activated when pulse gets added to Geode
-   */
-  // @Test
-  // public void testPulseWarExists() {
-  // String gemFireWarLocation = agentUtil.getPulseWarLocation();
-  // assertNotNull(gemFireWarLocation, "Pulse WAR File was not found");
-  // }
-
-  private String getGemfireVersion() {
-    String version = null;
-
-    Properties prop = new Properties();
-    InputStream inputStream = null;
-    String pathPrefix = null;
-    try {
-      pathPrefix = calculatePathPrefixToProjectRoot("gemfire-assembly/");
-      inputStream = new FileInputStream(pathPrefix + "gradle.properties");
-    } catch (FileNotFoundException e1) {
-      try {
-        pathPrefix = calculatePathPrefixToProjectRoot("gemfire-core/");
-        inputStream = new FileInputStream(pathPrefix + "gradle.properties");
-      } catch (FileNotFoundException e) {
-      }
-    }
-
-    if (inputStream != null) {
-      try {
-        prop.load(inputStream);
-        version = prop.getProperty("version");
-      } catch (FileNotFoundException e) {
-      } catch (IOException e) {
-      }
-    }
-    return version;
-  }
-
-  private String calculatePathPrefixToProjectRoot(String subDirectory) {
-    String pathPrefix = "";
-
-    String currentDirectoryPath = new File(".").getAbsolutePath();
-    int gemfireCoreLocationIx = currentDirectoryPath.indexOf(subDirectory);
-    if (gemfireCoreLocationIx < 0) {
-      return pathPrefix;
-    }
-
-    String pathFromRoot = currentDirectoryPath.substring(gemfireCoreLocationIx);
-    int segmentsCount = pathFromRoot.split("/").length - 1;
-
-    for (int i = 0; i < segmentsCount; i++) {
-      pathPrefix = pathPrefix + "../";
-    }
-    return pathPrefix;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5f82490a/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java b/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
new file mode 100644
index 0000000..cd2c429
--- /dev/null
+++ b/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.management.internal;
+
+import com.gemstone.gemfire.management.internal.AgentUtil;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import static org.junit.Assert.*;
+
+@Category(IntegrationTest.class)
+public class AgentUtilJUnitTest {
+
+  private AgentUtil agentUtil;
+  private String version;
+
+  @Before
+  public void setUp() {
+    version = getGemfireVersion();
+    agentUtil = new AgentUtil(version);
+  }
+
+  @Test
+  public void testRESTApiExists() {
+    String gemFireWarLocation = agentUtil.getGemFireWebApiWarLocation();
+    assertNotNull(gemFireWarLocation, "GemFire REST API WAR File was not found");
+  }
+
+  @Ignore("This test should be activated when pulse gets added to Geode")
+  @Test
+  public void testPulseWarExists() {
+    String gemFireWarLocation = agentUtil.getPulseWarLocation();
+    assertNotNull(gemFireWarLocation, "Pulse WAR File was not found");
+  }
+
+  private String getGemfireVersion() {
+    String version = null;
+
+    Properties prop = new Properties();
+    InputStream inputStream = null;
+    String pathPrefix = null;
+    try {
+      pathPrefix = calculatePathPrefixToProjectRoot("gemfire-assembly/");
+      inputStream = new FileInputStream(pathPrefix + "gradle.properties");
+    } catch (FileNotFoundException e1) {
+      try {
+        pathPrefix = calculatePathPrefixToProjectRoot("gemfire-core/");
+        inputStream = new FileInputStream(pathPrefix + "gradle.properties");
+      } catch (FileNotFoundException e) {
+      }
+    }
+
+    if (inputStream != null) {
+      try {
+        prop.load(inputStream);
+        version = prop.getProperty("version");
+      } catch (FileNotFoundException e) {
+      } catch (IOException e) {
+      }
+    }
+    return version;
+  }
+
+  private String calculatePathPrefixToProjectRoot(String subDirectory) {
+    String pathPrefix = "";
+
+    String currentDirectoryPath = new File(".").getAbsolutePath();
+    int gemfireCoreLocationIx = currentDirectoryPath.indexOf(subDirectory);
+    if (gemfireCoreLocationIx < 0) {
+      return pathPrefix;
+    }
+
+    String pathFromRoot = currentDirectoryPath.substring(gemfireCoreLocationIx);
+    int segmentsCount = pathFromRoot.split("/").length - 1;
+
+    for (int i = 0; i < segmentsCount; i++) {
+      pathPrefix = pathPrefix + "../";
+    }
+    return pathPrefix;
+  }
+}


[65/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/MapMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/MapMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/MapMessage.java
deleted file mode 100644
index 6f59a55..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/MapMessage.java
+++ /dev/null
@@ -1,629 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * HashMapMessage is a light weight message class for holding (name, value) paired
- * data. It holds all primitive values and nested HashMapMessage objects. 
- * @author dpark
- *
- */
-public class MapMessage implements Mappable, Cloneable
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-     * Used to dump messages.
-     */
-    private final static StringBuffer spaces = new StringBuffer("                               ");
-
-    private HashMap map = new HashMap();
-
-    /**
-     * Creates an empty HashMapMessage object.
-     */
-    public MapMessage()
-    {
-    }
-
-    /**
-     * Puts a Mappable to the message.
-     * @param name  The unique name identifying the value.
-     * @param mappable The value associated with the specified name.
-     */
-    public void put(String name, Mappable mappable)
-    {
-        map.put(name, mappable);
-    }
-    
-    /**
-     * Puts a Listable to the message.
-     * @param name  The unique name identifying the value.
-     * @param listable The value associated with the specified name.
-     */
-    public void put(String name, Listable listable)
-    {
-        map.put(name, listable);
-    }
-
-    /**
-     * Puts a String to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, String value)
-    {
-    	map.put(name, value);
-    }
-
-    /**
-     * Appends a boolean value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, boolean value)
-    {
-    	map.put(name, Boolean.valueOf(value));
-    }
-
-    /**
-     * Puts a byte value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, byte value)
-    {
-        map.put(name, Byte.valueOf(value));
-    }
-
-    /**
-     * Appends a short value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, short value)
-    {
-        map.put(name, Short.valueOf(value));
-    }
-
-    /**
-     * Puts a int value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, int value)
-    {
-        map.put(name, Integer.valueOf(value));
-    }
-
-    /**
-     * Appends a long value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, long value)
-    {
-        map.put(name, Long.valueOf(value));
-    }
-
-    /**
-     * Puts a float value to the message.
-     * @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, float value)
-    {
-        map.put(name, new Float(value));
-    }
-
-    /**
-     * Puts a double value to the message.
-     ** @param name  The unique name identifying the value.
-     * @param value The value associated with the specified name.
-     */
-    public void put(String name, double value)
-    {
-        map.put(name, new Double(value));
-    }
-
-    /**
-     * Returns the object identified by the specified name found
-     * in the message.
-     */
-    public Object getValue(String name)
-    {
-        return map.get(name);
-    }
-
-    /**
-     * Returns the boolean value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public boolean getBoolean(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Boolean) {
-    			return ((Boolean)value).booleanValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-    
-    public byte getByte(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Byte) {
-    			return ((Byte)value).byteValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the char value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public char getChar(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Character) {
-    			return ((Character)value).charValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the short value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public short getShort(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Short) {
-    			return ((Short)value).shortValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the int value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public int getInt(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Integer) {
-    			return ((Integer)value).intValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the long value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public long getLong(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Long) {
-    			return ((Long)value).longValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the float value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public float getFloat(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Float) {
-    			return ((Float)value).floatValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns the double value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public double getDouble(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof Double) {
-    			return ((Double)value).doubleValue();
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-    
-    /**
-     * Returns the String value identified by the specified name found
-     * in the message.
-     * @param name  The unique name identifying the value.
-     * @throws NoSuchFieldException Thrown if the mapping value is not found.
-     * @throws InvalidTypeException Thrown if the value type is different.
-     */
-    public String getString(String name) throws NoSuchFieldException, InvalidTypeException
-    {
-    	Object value = map.get(name);
-    	if (value == null) {
-    		throw new NoSuchFieldException("The field " + name + " is not found.");
-    	} else {
-    		if (value instanceof String) {
-    			return (String)value;
-    		} else {
-    			throw new InvalidTypeException("The field " + name + " has the type " + value.getClass().getName());
-    		}
-    	}
-    }
-
-    /**
-     * Returns true if the message contains nested Mappable.
-     */
-    public boolean hasMappable()
-    {
-        Map.Entry entries[] = getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable) {
-                return true;
-            }
-        }
-        return false;
-    }
-    
-    /**
-     * Returns true if the message contains nested Listable.
-     */
-    public boolean hasListable()
-    {
-        Map.Entry entries[] = getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Listable) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /**
-     * Removes the specified entry from the message.
-     */
-    public Object remove(String name)
-    {
-        return map.remove(name);
-    }
-
-    /**
-     * Returns the number of entries in this message.
-     */
-    public int size()
-    {
-        return map.size();
-    }
-    
-    public Collection values()
-    {
-    	return map.values();
-    }
-    
-    public Collection getValues()
-    {
-    	return map.values();
-    }
-    
-    public Set keys()
-    {
-    	return map.keySet();
-    }
-    
-    public Set getKeys()
-    {
-    	return map.keySet();
-    }
-    
-    public Set getEntries()
-    {
-    	return map.entrySet();
-    }
-
-    /**
-     * Returns all of the entries in the form of array.
-     */
-    public Map.Entry[] getAllEntries()
-    {
-        return (Map.Entry[])map.entrySet().toArray(new Map.Entry[0]);
-    }
-
-    /**
-     * Returns all of the primitive entries in the message.
-     */
-    public Map.Entry[] getAllPrimitives()
-    {
-    	Map.Entry entries[] = getAllEntries();
-    	Map.Entry messages[] = new Map.Entry[entries.length];
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable == false) {
-                messages[count++] = entries[i];
-            }
-        }
-        Map.Entry m[] = new Map.Entry[count];
-        System.arraycopy(messages, 0, m, 0, count);
-        return m;
-    }
-
-    /**
-     * Returns the number primitive entries in this message.
-     */
-    public int getPrimitiveCount()
-    {
-        Map.Entry entries[] = getAllEntries();
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable == false) {
-                count++;
-            }
-        }
-        return count;
-    }
-
-    /**
-     * Returns all of the entries that have the Mappable type, i.e., nested
-     * messages.
-     */
-    public Map.Entry[] getAllMappables()
-    {
-    	Map.Entry entries[] = getAllEntries();
-    	Map.Entry messages[] = new Map.Entry[entries.length];
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable) {
-                messages[count++] = entries[i];
-            }
-        }
-        Map.Entry m[] = new Map.Entry[count];
-        System.arraycopy(messages, 0, m, 0, count);
-        return m;
-    }
-    
-    /**
-     * Returns all of the entries that have the Listable type, i.e., nested
-     * messages.
-     */
-    public Map.Entry[] getAllListables()
-    {
-    	Map.Entry entries[] = getAllEntries();
-    	Map.Entry messages[] = new Map.Entry[entries.length];
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Listable) {
-                messages[count++] = entries[i];
-            }
-        }
-        Map.Entry m[] = new Map.Entry[count];
-        System.arraycopy(messages, 0, m, 0, count);
-        return m;
-    }
-
-    /**
-     * Returns the number of Mappable entries in this message.
-     */
-    public int getMappableCount()
-    {
-    	Map.Entry entries[] = getAllEntries();
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable) {
-                count++;
-            }
-        }
-        return count;
-    }
-    
-    /**
-     * Returns the number of Listable entries in this message.
-     */
-    public int getListableCount()
-    {
-    	Map.Entry entries[] = getAllEntries();
-        int count = 0;
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Listable) {
-                count++;
-            }
-        }
-        return count;
-    }
-
-    /**
-     * Clears the message. It removes all of the entries in the message.
-     *
-     */
-    public void clear()
-    {
-        map.clear();
-    }
-
-    private void convertToString(StringBuffer buffer, Mappable message, int level)
-    {
-    	Map.Entry entries[] = message.getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-            if (entries[i].getValue() instanceof Mappable) {
-                buffer.append(spaces.substring(0, level*3) + entries[i].getKey() + "*****" + "\n");
-                convertToString(buffer, (Mappable)entries[i].getValue(), level+1);
-            } else {
-                buffer.append(spaces.substring(0, level*3)+ entries[i].getKey() + " = " + entries[i].getValue() + "\n");
-            }
-        }
-    }
-
-//    public void convertToString(StringBuffer buffer)
-//    {
-//        if (buffer == null) {
-//            return;
-//        }
-//        convertToString(buffer);
-//    }
-
-    public String toString()
-    {
-        StringBuffer buffer = new StringBuffer(100);
-        convertToString(buffer, this, 0);
-        return buffer.toString();
-    }
-
-    /**
-     * Recursively dumps the message contents to the specified writer.
-     */
-    private void dump(PrintWriter writer, Mappable message, int level)
-    {
-    	Map.Entry entries[] = message.getAllEntries();
-        for (int i = 0; i < entries.length; i++) {
-        	if (entries[i].getValue() instanceof Mappable) {
-                writer.println(spaces.substring(0, level*3) + entries[i].getKey() + "*****");
-                dump(writer, (Mappable)entries[i].getValue(), level+1);
-        	} else if (entries[i].getValue() instanceof Listable) {
-                writer.println(spaces.substring(0, level*3) + entries[i].getKey() + "*****");
-                dump(writer, (Listable)entries[i].getValue(), level+1);
-            } else {
-                writer.println(spaces.substring(0, level*3)+ entries[i].getKey() + " = " + entries[i].getValue());
-            }
-        }
-    }
-    
-    /**
-     * Recursively dumps the message contents to the specified writer.
-     */
-    private void dump(PrintWriter writer, Listable message, int level)
-    {
-    	Object values[] = message.getAllValues();
-        for (int i = 0; i < values.length; i++) {
-        	if (values[i] instanceof Listable) {
-                writer.println(spaces.substring(0, level*3) + values[i] + "*****");
-                dump(writer, (Listable)values[i], level+1);
-        	} if (values[i] instanceof Listable) {
-        		writer.println(spaces.substring(0, level*3) + values[i] + "*****");
-                dump(writer, (Mappable)values[i], level+1);
-            } else {
-                writer.println(spaces.substring(0, level*3)+ values[i]);
-            }
-        }
-    }
-
-    /**
-     * Dumps the message contents to the specified output stream.
-     * @param out   The outputstream to which the contents are dumped.
-     */
-    public void dump(OutputStream out)
-    {
-        if (out == null) {
-            return;
-        }
-        PrintWriter writer = new PrintWriter(out);
-        dump(writer, this, 0);
-        writer.flush();
-    }
-
-    /**
-     * Dumps the message contents to the standard output stream (System.out).
-     */
-    public void dump()
-    {
-       PrintWriter writer = new PrintWriter(System.out);
-       dump(writer, this, 0);
-       writer.flush();
-    }
-
-    /**
-     * Returns a shallow copy of this <tt>HashMapMessage</tt> instance.  (The
-     * elements themselves are not copied.)
-     *
-     * @return  a clone of this <tt>HashMapMessage</tt> instance.
-     */
-    public Object clone()
-    {
-        MapMessage dup = new MapMessage();
-        dup.map = (HashMap)this.map.clone();
-        return dup;
-    }
-
-	public void fromData(DataInput dataInput) throws IOException, ClassNotFoundException
-	{
-		map = DataSerializer.readHashMap(dataInput);
-	}
-
-	public void toData(DataOutput dataOutput) throws IOException
-	{
-		DataSerializer.writeHashMap(map, dataOutput);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/Mappable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/Mappable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/Mappable.java
deleted file mode 100644
index 08d475a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/data/Mappable.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.data;
-
-import java.io.OutputStream;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.DataSerializable;
-
-public interface Mappable extends DataSerializable
-{
-	public void put(String key, Mappable mappable);
-	public void put(String key, Listable listable);
-	public void put(String key, String value);
-	public void put(String key, boolean value);
-	public void put(String key, byte value);
-	public void put(String key, short value);
-	public void put(String key, int value);
-	public void put(String key, long value);
-	public void put(String key, float value);
-	public void put(String key, double value);
-	public Object getValue(String key);
-	public boolean getBoolean(String key) throws NoSuchFieldException, InvalidTypeException;
-	public byte getByte(String name) throws NoSuchFieldException, InvalidTypeException;
-	public char getChar(String key) throws NoSuchFieldException, InvalidTypeException;
-	public short getShort(String key) throws NoSuchFieldException, InvalidTypeException;
-	public int getInt(String key) throws NoSuchFieldException, InvalidTypeException;
-	public long getLong(String key) throws NoSuchFieldException, InvalidTypeException;
-	public float getFloat(String key) throws NoSuchFieldException, InvalidTypeException;
-	public double getDouble(String key) throws NoSuchFieldException, InvalidTypeException;
-	public String getString(String key) throws NoSuchFieldException, InvalidTypeException;
-	public boolean hasMappable();
-	public boolean hasListable();
-	public Object remove(String key);
-	public int size();
-	public Collection getValues();
-	public Set getKeys();
-	public Set getEntries();
-	public Map.Entry[] getAllEntries();
-	public Map.Entry[] getAllPrimitives();
-	public int getPrimitiveCount();
-	public Map.Entry[] getAllMappables();
-	public Map.Entry[] getAllListables();
-	public int getMappableCount();
-	public int getListableCount();
-	public void clear();
-	public void dump(OutputStream out);
-	public Object clone();
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/EntryMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/EntryMap.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/EntryMap.java
deleted file mode 100644
index ccc5f57..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/EntryMap.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-
-public class EntryMap extends HashMap<DataSerializable, Object> implements DataSerializable
-{
-	private boolean keysOnly = false;
-	
-	public EntryMap()
-	{
-		super();
-	}
-
-	public EntryMap(int size)
-	{
-		super(size);
-	}
-
-	public EntryMap(int size, float loadfactor)
-	{
-		this(size, loadfactor, false);
-	}
-	
-	public EntryMap(int size, float loadfactor, boolean keysOnly)
-	{
-		super(size, loadfactor);
-		this.keysOnly = keysOnly;
-	} 
-
-	public void fromData(DataInput in) throws IOException,
-			ClassNotFoundException
-	{
-		keysOnly = in.readBoolean();
-		int size = in.readInt();
-		
-		if (keysOnly) {
-			
-			for(int i=0;i<size;i++)
-			{
-				DataSerializable key = (DataSerializable) DataSerializer.readObject(in);
-				put(key, key);
-			}
-			
-		} else {
-			for(int i=0;i<size;i++)
-			{
-				DataSerializable key = (DataSerializable) DataSerializer.readObject(in);
-				// This will be deserialized by Java client and this will never be used in the server...
-				// We can de-serialize the value object to it's base class, rather than
-				// to a byte array.
-				DataSerializable value = (DataSerializable) DataSerializer.readObject(in);
-				put(key, value);
-			}
-		}
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		out.writeBoolean(keysOnly);
-		out.writeInt(size());
-		if (keysOnly) {
-			for (Map.Entry<DataSerializable, Object> e : entrySet()) {
-				DataSerializer.writeObject(e.getKey(), out);
-			}
-		} else {
-			for (Map.Entry<DataSerializable, Object> e : entrySet()) {
-				DataSerializer.writeObject(e.getKey(), out);
-				out.write(((CachedDeserializable) e.getValue()).getSerializedValue());
-			}
-		}
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/IndexInfo.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/IndexInfo.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/IndexInfo.java
deleted file mode 100644
index aaac9ef..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/IndexInfo.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ReflectionUtil;
-
-
-public class IndexInfo implements DataSerializable
-{
-	private static final long serialVersionUID = 1L;
-
-	public int indexListSize;
-
-	public int indexMapSize;
-
-	public Object minSetQueryKey;
-	public Object maxSetQueryKey;
-
-	public int minSetSize = Integer.MAX_VALUE;
-	public int maxSetSize = 0;
-
-	public String toString()
-	{
-		return ReflectionUtil.toStringPublicMembers(this);
-	}
-
-	public void fromData(DataInput in) throws IOException,
-			ClassNotFoundException
-	{
-		indexListSize = in.readInt();
-		indexMapSize = in.readInt();
-		minSetSize = in.readInt();
-		maxSetSize = in.readInt();
-		minSetQueryKey = DataSerializer.readObject(in);
-		maxSetQueryKey = DataSerializer.readObject(in);
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		out.writeInt(indexListSize);
-		out.writeInt(indexMapSize);
-		out.writeInt(minSetSize);
-		out.writeInt(maxSetSize);
-		DataSerializer.writeObject(minSetQueryKey, out);
-		DataSerializer.writeObject(maxSetQueryKey, out);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/Indexer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/Indexer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/Indexer.java
deleted file mode 100644
index e75700d..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/Indexer.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index;
-
-import java.util.Map;
-
-
-public interface Indexer
-{
-	public Map query(Object queryKey);
-	
-	public int size(Object queryKey);
-	
-	public IndexInfo getIndexInfo();
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/IndexerManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/IndexerManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/IndexerManager.java
deleted file mode 100644
index a15f7ce..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/IndexerManager.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index;
-
-import java.util.HashMap;
-
-
-public class IndexerManager
-{
-	private static final IndexerManager indexerManager = new IndexerManager();
-	
-	private HashMap<String, Indexer> indexerMap = new HashMap();
-	
-	public static IndexerManager getIndexerManager()
-	{
-		return indexerManager;
-	}
-
-	private IndexerManager()
-	{
-//		indexerManager = this;
-	}
-	
-	void putIndxer(String regionPath, Indexer indexer)
-	{
-		indexerMap.put(regionPath, indexer);
-	}
-	
-	public Indexer getIndexer(String regionPath)
-	{
-		return indexerMap.get(regionPath);
-	}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/LookupService.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/LookupService.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/LookupService.java
deleted file mode 100644
index 5e15b26..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/LookupService.java
+++ /dev/null
@@ -1,352 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.internal.util.BlobHelper;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task.IndexInfoTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task.QuerySizeTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task.QueryTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.CommandClient;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-/**
- * LookupService provides custom query access to GemFire cache. It supports 
- * equality and "AND" conditions only. The server must install 
- * com.gemstone.gemfire.internal.tools.gfsh.cache.index.Indexer before LookupService can
- * be used. The gfcommand addon library includes the sample implementation 
- * com.gemstone.gemfire.tools.gfsh.cache.index.IndexBuilder which is for demo
- * purposes only as it lacks HA and recovery support.
- * @author dpark
- */
-public class LookupService
-{
-	CommandClient commandClient;
-
-	public LookupService(String poolNameOrEndpoints)
-	{
-		this(null, poolNameOrEndpoints);
-	}
-	
-	/**
-	 * Constructs a new LookupService object.
-	 * @param commandRegionPath The command region full path. This region is 
-	 *  						used to send query commands to the cache. If
-	 *  		null, the default "/__command" region is used.
-	 * @param poolNameOrEndpoints A pool name or comma separated list of GemFire cache servers.
-	 *            The endpoints format is "e1=host:port,e2=host2:port".
-	 *            If the name is not in the endpoints format then it is treated
-	 *            as a pool name.
-	 * @exception Throws a LookupServiceException if it encounters an error from the 
-     *            underlying GemFire communications mechanism.
-	 */
-	public LookupService(String commandRegionPath, String poolNameOrEndpoints)
-	{
-		try {
-			commandClient = new CommandClient(commandRegionPath, poolNameOrEndpoints);
-		} catch (Exception ex) {
-			throw new LookupServiceException("Unable to create LookupService due to a cache exception: " + ex.getMessage(), ex);
-		}
-	}
-	
-	/**
-	 * Constructs a new LookupService object with the specified command client 
-	 * object.
-	 * @param commandClient The command client object.
-	 */
-	public LookupService(CommandClient commandClient)
-	{
-		this.commandClient = commandClient;
-	}
-	
-	/**
-	 * Returns the command region path. It returns null, if the command
-	 * client is not defined.
-	 */
-	public String getCommandRegionPath()
-	{
-		if (commandClient == null) {
-			return null;
-		}
-		return commandClient.getOutboxRegionFullPath();
-	}
-	
-	/**
-	 * Returns the endpoints. It returns null if a pool is in use.
-	 */
-	public String getEndpoints()
-	{
-		if (commandClient == null) {
-			return null;
-		}
-		return commandClient.getEndpoints();
-	}
-	
-	/**
-	 * Returns the pool name. It returns null if endpoints are used.
-	 */
-	public String getPoolName()
-	{
-		if (commandClient == null) {
-			return null;
-		}
-		return commandClient.getPoolName();
-	}
-	
-	/**
-	 * Returns the query results in the form of Map. The returned
-     * Map contains the specified region (key, value) pairs.
-     * 
-	 * @param regionPath The full path of a region to query. Note that this region path is
-     * not the same as the command region path specified in the LookupService constructor. This
-     * region contains data that the query is to be executed. The LookupService constructor's 
-     * region path is used for sending the query command.
-     * 
-	 * @param queryKey The query key object that contains the fields to search.
-	 * @return Returns the query results in the form of Map. The returned
-     * 			Map contains the specified region (key, value) pairs.
-	 * @exception Throws a LookupServiceException if it encounters an error from the 
-     *            underlying GemFire communications mechanism.
-	 */
-	public Map entryMap(String regionPath, Object queryKey)
-	{
-		try {
-			CommandResults results = commandClient.execute(new QueryTask(regionPath, queryKey, QueryTask.TYPE_KEYS_VALUES));
-			Map resultMap = null;
-			switch (results.getCode()) {
-			case QueryTask.SUCCESS_RR:
-				{
-					byte[] blob = (byte[])results.getDataObject();
-					if (blob != null) {
-						resultMap = (Map)BlobHelper.deserializeBlob(blob);
-					}
-				}
-				break;
-				
-			case QueryTask.SUCCESS_PR:
-				{
-					List list = (List)results.getDataObject();
-					try {
-						Iterator<byte[]> iterator = list.iterator();
-						while (iterator.hasNext()) {
-							byte[] blob = iterator.next();
-							if (blob != null) {
-								Map map = (Map)BlobHelper.deserializeBlob(blob);
-								if (resultMap == null) {
-									resultMap = map;
-								} else {
-									resultMap.putAll(map);
-								}
-							}
-						}
-					} catch (Exception ex) {
-						CacheFactory.getAnyInstance().getLogger().warning("Error occurred while deserializing to blob: " + ex.getMessage(), ex);
-					}
-				}
-				break;
-			}
-			
-			return resultMap;
-		} catch (Exception ex) {
-			throw new LookupServiceException("Unable to retrieve the entry map due to a cache exception: " + ex.getMessage(), ex);
-		}
-	}
-	
-	/**
-	 * Returns the query results in the form of Set. The returned
-     * Set contains the specified region keys.
-	 * @param regionPath The full path of a region to query. Note that this region path is
-     * not the same as the command region path specified in the LookupService constructor. This
-     * region contains data that the query is to be executed. The LookupService constructor's 
-     * region path is used for sending the query command.
-	 * @param queryKey The query key object that contains the fields to search.
-	 * @return Returns the query results in the form of Set. The returned
-     * 			Set contains the specified region keys.
-	 */
-	public Set keySet(String regionPath, Object queryKey)
-	{
-		try {
-			CommandResults results = commandClient.execute(new QueryTask(regionPath, queryKey, QueryTask.TYPE_KEYS));
-			Set keys = null;
-			switch (results.getCode()) 
-			{
-				case QueryTask.SUCCESS_RR: 
-					{
-						byte[] blob = (byte[]) results.getDataObject();
-		
-						if (blob != null) {
-							keys = (Set) BlobHelper.deserializeBlob(blob);
-						}
-					}
-					break;
-					
-				case QueryTask.SUCCESS_PR: 
-					{
-						try {
-							List list = (List)results.getDataObject();
-							Iterator<byte[]> iterator = list.iterator();
-							while (iterator.hasNext()) {
-								byte[] blob = iterator.next();
-								if (blob != null) {
-									Set set = (Set)BlobHelper.deserializeBlob(blob);
-									if (keys == null) {
-										keys = set;
-									} else {
-										keys.addAll(set);
-									}
-								}
-							}
-						} catch (Exception ex) {
-							CacheFactory.getAnyInstance().getLogger().warning("Error occurred while deserializing to blob: " + ex.getMessage(), ex);
-						}
-					}
-					break;
-			}
-			return keys;
-		} catch (Exception ex) {
-			throw new LookupServiceException("Unable to retrieve the key set due to a cache exception: " + ex.getMessage(), ex);
-		}
-	}
-	
-	/**
-	 * Returns the query results in the form of Collection. The returned
-     * Collection contains the specified region values.
-	 * @param regionPath The full path of a region to query. Note that this region path is
-     * not the same as the command region path specified in the LookupService constructor. This
-     * region contains data that the query is to be executed. The LookupService constructor's 
-     * region path is used for sending the query command.
-	 * @param queryKey The query key object that contains the fields to search.
-	 * @return Returns the query results in the form of Collection. The returned
-     * 			Collection contains the specified region values.
-	 */
-	public Collection values(String regionPath, Object queryKey)
-	{
-		try {
-			CommandResults results = commandClient.execute(new QueryTask(regionPath, queryKey, QueryTask.TYPE_VALUES));
-			Collection values = null;
-			switch (results.getCode()) 
-			{
-				case QueryTask.SUCCESS_RR: 
-					{
-						byte[] blob = (byte[]) results.getDataObject();
-		
-						if (blob != null) {
-							values = (Collection) BlobHelper.deserializeBlob(blob);
-						}
-					}
-					break;
-					
-				case QueryTask.SUCCESS_PR: 
-					{
-						try {
-							List list = (List)results.getDataObject();
-							Iterator<byte[]> iterator = list.iterator();
-							while (iterator.hasNext()) {
-								byte[] blob = iterator.next();
-								if (blob != null) {
-									Collection col = (Collection)BlobHelper.deserializeBlob(blob);
-									if (values == null) {
-										values = col;
-									} else {
-										values.addAll(col);
-									}
-								}
-							}
-						} catch (Exception ex) {
-							CacheFactory.getAnyInstance().getLogger().warning("Error occurred while deserializing to blob: " + ex.getMessage(), ex);
-						}
-					}
-					break;
-			}
-			return values;
-		} catch (Exception ex) {
-			throw new LookupServiceException("Unable to retrieve the values to a cache exception: " + ex.getMessage(), ex);
-		}
-	}
-
-    /** 
-     * Returns the IndexInfo that contains the cache indexer information.
-     * 
-     * @param regionPath The full path of a region to query.
-     * @return Returns the IndexInfo that contains the cache indexer information.
-     * @exception Throws a LookupServiceException if it encounters an error from the 
-     *            underlying GemFire communications mechanism.
-     */
-    public IndexInfo[] getIndexInfoArray(String regionPath)
-    {
-        try {
-        	IndexInfo[] indexInfoArray = null;
-        	CommandResults results = commandClient.execute(new IndexInfoTask(regionPath));
-        	switch (results.getCode()) {
-			case QueryTask.SUCCESS_RR:
-				{
-					IndexInfo indexInfo = (IndexInfo)results.getDataObject();
-					if (indexInfo != null) {
-						indexInfoArray = new IndexInfo[] { indexInfo };
-					}
-				}
-				break;
-			
-			case QueryTask.SUCCESS_PR:
-				{ 
-		            List list = (List)results.getDataObject();
-		            if (list != null) {
-		            	indexInfoArray = (IndexInfo[])list.toArray(new IndexInfo[0]);
-		            }
-				}
-				break;
-        	}
-            return indexInfoArray;
-            
-        } catch (Exception ex) {
-            throw new LookupServiceException("Unable to retrieve index info due to a cache exception: " + ex.getMessage(), ex);
-        }
-    }
-
-    /** 
-     * Returns the size of the query results.
-  	 *
-  	 * @param regionPath The full path of a region to query.
-  	 * @param queryKey The query key object that contains the fields to search.
-     
-     * @return Returns the size of the query results.
-     * @exception Throws a LookupServiceException if it encounters an error from the 
-     *            underlying GemFire communications mechanism.
-     */
-    public int size(String regionPath, Object queryKey)
-    {
-        try {
-            CommandResults results = commandClient.execute(new QuerySizeTask(regionPath, queryKey));
-		    return (Integer)results.getDataObject();
-        }
-        catch (Exception ex)
-        {
-            throw new LookupServiceException("Unable to retrieve the size due to a cache exception: " + ex.getMessage(), ex);
-        }
-    }
-
-    /** 
-     * Closes the LookupService. Note that if there is another instance of LookupService that
-     * was created with the same constructor arguments, i.e., commandRegionPath and endpoints, 
-     * that instance will also be closed. Invoking this method more than once will throw
-     * a LookupServiceException.
-     * 
-     * @exception Throws a LookupServiceException if it encounters an error from the 
-     *            underlying GemFire communications mechanism.
-     */
-    public void close()
-    {
-        try
-        {
-            commandClient.close();
-        }
-        catch (Exception ex)
-        {
-            throw new LookupServiceException("Exception raised while closing LookupService: " + ex.getMessage(), ex);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/LookupServiceException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/LookupServiceException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/LookupServiceException.java
deleted file mode 100644
index e924230..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/LookupServiceException.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index;
-
-/**
- * LookupService throws LookupServiceException if it encounters
- * an error from the underlying GemFire communications mechanism.
- */
-class LookupServiceException extends RuntimeException
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Constructs a new LookupServiceException.
-	 */
-    LookupServiceException()
-    {
-        super();
-    }
-
-    /**
-     * Constructs a new LookupServiceException exception with the specified detail message.
-     *
-     * @param  message the detail message (which is saved for later retrieval
-     *         by the {@link #getMessage()} method).
-     */
-    public LookupServiceException(String message)
-    {
-        super(message, null);
-    }
-
-    /**
-     * Constructs a new LookupServiceException exception with the specified detail message and
-     * cause.
-     * <p>Note that the detail message associated with
-     * <code>cause</code> is <i>not</i> automatically incorporated in
-     * this exception's detail message.
-     *
-     * @param  message the detail message (which is saved for later retrieval
-     *         by the {@link #getMessage()} method).
-     * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link #getCause()} method).  (A <tt>null</tt> value is
-     *         permitted, and indicates that the cause is nonexistent or
-     *         unknown.)
-     */
-    public LookupServiceException(String message, Throwable cause)
-    {
-        super(message, cause);
-    }
-
-    /**
-     * Constructs a new LookupServiceException exception with the specified cause.
-     * <p>Note that the detail message associated with
-     * <code>cause</code> is <i>not</i> automatically incorporated in
-     * this exception's detail message.
-     *
-     * @param  cause the cause (which is saved for later retrieval by the
-     *         {@link #getCause()} method).  (A <tt>null</tt> value is
-     *         permitted, and indicates that the cause is nonexistent or
-     *         unknown.)
-     */
-    public LookupServiceException(Throwable cause)
-    {
-        super(cause);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/ForceGCTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/ForceGCTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/ForceGCTask.java
deleted file mode 100644
index 2ecd3c9..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/ForceGCTask.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-public class ForceGCTask implements CommandTask
-{
-	private static final long serialVersionUID = 1L;
-	
-	public ForceGCTask() {}
-	
-	@SuppressFBWarnings(value="DM_GC",justification="This is the desired functionality")
-	public CommandResults runTask(Object userData)
-	{
-		Runtime.getRuntime().gc();
-		return new CommandResults();
-	}
-
-	public void fromData(DataInput in) throws IOException,
-			ClassNotFoundException
-	{
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/IndexInfoTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/IndexInfoTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/IndexInfoTask.java
deleted file mode 100644
index f0e7d80..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/IndexInfoTask.java
+++ /dev/null
@@ -1,131 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.AggregatorException;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.AggregatorPeer;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.IndexInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.Indexer;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.IndexerManager;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.DataSerializerEx;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-
-public class IndexInfoTask implements CommandTask, AggregateFunction
-{
-	private static final long serialVersionUID = 1L;
-
-  private transient volatile boolean aggregationExecuted = false;
-  private final Object aggregationExecutedLock = new Object();
-	
-	private String regionPath;
-
-	public IndexInfoTask() {}
-
-	public IndexInfoTask(String regionPath)
-	{
-		this.regionPath = regionPath;
-	}
-
-	public CommandResults runTask(Object userData)
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		cache.getLogger().fine("IndexInfoTask.runTask(): regionPath = " + regionPath);
-		
-		CommandResults results = new CommandResults();
-		
-		Region region = cache.getRegion(regionPath);
-		if (region == null) {
-			results.setCode(QueryTask.ERROR_REGION_UNDEFINED);
-			results.setCodeMessage("The specified region " + regionPath + " is undefined.");
-			return results;
-		}
-		
-		if (region instanceof PartitionedRegion) {	
-
-			// Partitioned Region
-			AggregatorPeer aggregator = new AggregatorPeer((PartitionedRegion)region);
-			try {
-				Object obj = aggregator.aggregate(this);
-				results.setCode(QueryTask.SUCCESS_PR);
-				results.setDataObject(obj);
-			} catch (AggregatorException ex) {
-				results.setCode(QueryTask.ERROR_AGGREGATOR);
-				results.setCodeMessage("Unabled to create aggregator: " + ex.getMessage());
-				ex.printStackTrace();
-			}
-			
-		} else {
-			
-			// Replicated Region
-			results.setCode(QueryTask.SUCCESS_RR);
-			results.setDataObject(getIndexInfo());
-			
-		}
-
-		return results;
-	}
-
-	public AggregateResults run(FunctionContext context)
-	{
-		AggregateResults results = null;
-		synchronized (aggregationExecutedLock) {
-			if (aggregationExecuted == false) {
-				results = new AggregateResults();
-				results.setDataObject(getIndexInfo());
-				aggregationExecuted = true;
-			}
-		}
-		return results;
-	}
-
-	public Object aggregate(List list)
-	{
-		ArrayList<IndexInfo> aggregateList = null;
-		for (Iterator<AggregateResults> iterator = list.iterator(); iterator.hasNext();) {
-			AggregateResults results = iterator.next();
-			if (results != null) {
-				if (aggregateList == null) {
-					aggregateList = new ArrayList(list.size());
-				}
-				aggregateList.add((IndexInfo)results.getDataObject());
-			}
-		}
-		return aggregateList;
-	}
-
-	public Object aggregateDistributedSystems(Object[] results)
-	{
-		return null;
-	}
-	
-	private IndexInfo getIndexInfo()
-	{
-		Indexer indexer = IndexerManager.getIndexerManager().getIndexer(regionPath);
-		return indexer.getIndexInfo();
-	}
-
-	public void fromData(DataInput in) throws IOException,
-			ClassNotFoundException
-	{
-		regionPath = (String) DataSerializerEx.readUTF(in);
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		DataSerializerEx.writeUTF(regionPath, out);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/QuerySizeTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/QuerySizeTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/QuerySizeTask.java
deleted file mode 100644
index 0d9bee0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/QuerySizeTask.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.AggregatorException;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.AggregatorPeer;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.Indexer;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.IndexerManager;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.DataSerializerEx;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-
-public class QuerySizeTask implements CommandTask, AggregateFunction
-{
-	private static final long serialVersionUID = 1L;
-	
-  private transient volatile boolean aggregationExecuted = false;
-  private final Object aggregationExecutedLock = new Object();
-	
-	private String regionPath;
-	private Object queryKey;
-	
-	public QuerySizeTask() {}
-
-	public QuerySizeTask(String regionPath, Object queryKey)
-	{
-		this.regionPath = regionPath;
-		this.queryKey = queryKey;
-	}
-	
-	public CommandResults runTask(Object userData)
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		cache.getLogger().fine("QuerySizeTask.runTask(): regionPath = " + regionPath + ", queryKey = " + queryKey);
-		
-		CommandResults results = new CommandResults();
-		
-		Region region = cache.getRegion(regionPath);
-		if (region == null) {
-			results.setCode(QueryTask.ERROR_REGION_UNDEFINED);
-			results.setCodeMessage("The specified region " + regionPath + " is undefined.");
-			return results;
-		}
-		
-		if (region instanceof PartitionedRegion) {	
-
-			// Partitioned Region
-			AggregatorPeer aggregator = new AggregatorPeer((PartitionedRegion)region);
-			try {
-				Object obj = aggregator.aggregate(this);
-				results.setCode(QueryTask.SUCCESS_PR);
-				results.setDataObject(obj);
-			} catch (AggregatorException ex) {
-				results.setCode(QueryTask.ERROR_AGGREGATOR);
-				results.setCodeMessage("Unabled to create aggregator: " + ex.getMessage());
-				ex.printStackTrace();
-			}
-			
-		} else {
-			
-			// Replicated Region
-			results.setCode(QueryTask.SUCCESS_RR);
-			results.setDataObject(size());
-		}
-		
-		return results;
-	}
-
-	public AggregateResults run(FunctionContext context)
-	{
-		AggregateResults results = null;
-		synchronized (aggregationExecutedLock) {
-			if (aggregationExecuted == false) {
-				results = new AggregateResults();
-				results.setDataObject(size());
-				aggregationExecuted = true;
-			}
-		}
-		return results;
-	}
-
-	public Object aggregate(List list)
-	{
-		int totalSize = 0;
-		Iterator<AggregateResults> iterator = list.iterator();
-		while (iterator.hasNext()) {
-			AggregateResults results = iterator.next();
-			if (results != null) {
-				Integer size = (Integer)results.getDataObject();
-				if (size != null) {
-					totalSize += size;
-				}
-			}
-		}
-		return totalSize;
-	}
-
-	public Object aggregateDistributedSystems(Object[] results)
-	{
-		// Not supported
-		return null;
-	}
-	
-	private int size()
-	{
-		Indexer indexer = IndexerManager.getIndexerManager().getIndexer(regionPath);
-		return indexer.size(queryKey);
-	}
-
-	public void fromData(DataInput in) throws IOException,
-			ClassNotFoundException
-	{
-		regionPath = DataSerializerEx.readUTF(in);
-		queryKey = DataSerializer.readObject(in);
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		DataSerializerEx.writeUTF(regionPath, out);
-		DataSerializer.writeObject(queryKey, out);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/QueryTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/QueryTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/QueryTask.java
deleted file mode 100644
index ccd75c6..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/cache/index/task/QueryTask.java
+++ /dev/null
@@ -1,323 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.util.BlobHelper;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.AggregatorException;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.AggregatorPeer;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.Indexer;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.IndexerManager;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.DataSerializerEx;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-
-public class QueryTask implements CommandTask, AggregateFunction
-{
-	private static final long serialVersionUID = 1L;
-	
-	public final static byte TYPE_KEYS = 0;
-	public final static byte TYPE_VALUES = 1;
-	public final static byte TYPE_KEYS_VALUES = 2;
-	
-	public final static byte ERROR_NO_ERROR = CommandResults.CODE_NORMAL;
-	public final static byte ERROR_REGION_UNDEFINED = -2;
-	public final static byte ERROR_INDEX_UNDEFINED = -3;
-	public final static byte ERROR_AGGREGATOR = -3;
-	
-	public final static byte SUCCESS_RR = 1; //CommandResults.CODE_NORMAL + 1;
-	public final static byte SUCCESS_PR = 2; //CommandResults.CODE_NORMAL + 2;
-	
-	private transient volatile boolean aggregationExecuted = false;
-	private final Object aggregationExecutedLock = new Object();
-	
-	private String regionPath;
-	private Object queryKey;
-	private byte queryType = TYPE_KEYS_VALUES;
-
-//	private AggregatorPeer aggregator;
-	
-	private static Set<Integer> routingKeySet;
-	
-	static {
-		int numVMs = Integer.getInteger("indexer.aggregator.routingKeySize", 4);
-		routingKeySet = new CopyOnWriteArraySet<Integer>();
-		for (int i = 0; i < numVMs; i++) {
-			routingKeySet.add(i);
-		}
-	}
-	
-	public QueryTask() {}
-
-	public QueryTask(String regionPath, Object queryKey, byte queryType)
-	{
-		this.regionPath = regionPath;
-		this.queryKey = queryKey;
-		this.queryType = queryType;	
-	}
-
-	public CommandResults runTask(Object userData)
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		cache.getLogger().fine("QueryTask.runTask(): regionPath = " + regionPath + ", type = " + queryType + ", queryKey = " + queryKey);
-		
-		CommandResults results = new CommandResults();
-		
-		Region region = cache.getRegion(regionPath);
-		if (region == null) {
-			results.setCode(ERROR_REGION_UNDEFINED);
-			results.setCodeMessage("The specified region " + regionPath + " is undefined.");
-			return results;
-		}
-		
-		if (region instanceof PartitionedRegion) {	
-
-			// Partitioned Region
-			AggregatorPeer aggregator = new AggregatorPeer((PartitionedRegion)region);
-			try {
-				Object obj = aggregator.aggregate(this);
-				results.setCode(SUCCESS_PR);
-				results.setDataObject(obj);
-			} catch (AggregatorException ex) {
-				results.setCode(ERROR_AGGREGATOR);
-				results.setCodeMessage("Unabled to create aggregator: " + ex.getMessage());
-				ex.printStackTrace();
-			}
-			
-		} else {
-			
-			// Replicated Region
-			Indexer indexer = IndexerManager.getIndexerManager().getIndexer(regionPath);
-			if (indexer == null) {
-				results.setCode(ERROR_INDEX_UNDEFINED);
-				results.setCodeMessage("The indexer for the specified region " + regionPath + " is undefined.");
-				return results;
-			}
-			results.setCode(SUCCESS_RR);
-			results.setDataObject(run(indexer));
-			
-		}
-		return results;
-	}
-	
-	public AggregateResults run(FunctionContext context)
-	{
-		AggregateResults results = null;
-		synchronized (aggregationExecutedLock) {
-			if (aggregationExecuted == false) {
-				results = new AggregateResults();
-				Indexer indexer = IndexerManager.getIndexerManager().getIndexer(regionPath);
-				results.setDataObject(run(indexer));
-				aggregationExecuted = true;
-			}
-		}
-		return results;
-	}
-	
-	public Object aggregate(List list)
-	{	
-		Object aggregateResults = null;
-		
-		switch (queryType) {
-		
-		// Set
-		case TYPE_KEYS:
-			try {
-				Set aggregateSet = null;
-				Iterator iterator = list.iterator();
-				while (iterator.hasNext()) {
-					AggregateResults results = (AggregateResults)iterator.next();
-					byte[] blob = (byte[])results.getDataObject();
-					if (blob != null) {
-						Set set = (Set)BlobHelper.deserializeBlob(blob);
-						if (aggregateSet == null) {
-							aggregateSet = set;
-						} else {
-							aggregateSet.addAll(set);
-						}
-					}
-				}
-				aggregateResults = aggregateSet;
-			} catch (Exception ex) {
-				CacheFactory.getAnyInstance().getLogger().warning("Error occurred while deserializing to blob: " + ex.getMessage(), ex);
-			}
-			break;//FindBugs - Usually you need to end this 'case' with a break or return.
-			
-		// Collection
-		case TYPE_VALUES:
-			try {
-				Collection aggregateCollection = null;
-				Iterator iterator = list.iterator();
-				while (iterator.hasNext()) {
-					AggregateResults results = (AggregateResults)iterator.next();
-					byte[] blob = (byte[])results.getDataObject();
-					if (blob != null) {
-						Collection collection = (Collection)BlobHelper.deserializeBlob(blob);
-						if (aggregateCollection == null) {
-							aggregateCollection = collection;
-						} else {
-							aggregateCollection.addAll(collection);
-						}
-					}
-				}
-				aggregateResults = aggregateCollection;
-			} catch (Exception ex) {
-				CacheFactory.getAnyInstance().getLogger().warning("Error occurred while deserializing to blob: " + ex.getMessage(), ex);
-			}
-			break;//FindBugs - Usually you need to end this 'case' with a break or return.
-		
-		// Map
-		case TYPE_KEYS_VALUES:
-		default:
-			{
-				List aggregateList = new ArrayList(list.size());
-				Iterator iterator = list.iterator();
-				while (iterator.hasNext()) {
-					AggregateResults results = (AggregateResults)iterator.next();
-					if (results != null) {
-						byte[] blob = (byte[])results.getDataObject();
-						if (blob != null) {
-							aggregateList.add(blob);
-						}
-					}
-				}
-				aggregateResults = aggregateList;
-				break;
-			}
-		}
-		
-//		byte blob[] = null;
-//		if (aggregateResults != null) {
-//			try {
-//				blob = BlobHelper.serializeToBlob(aggregateResults);
-//			} catch (IOException ex) {
-//				CacheFactory.getAnyInstance().getLogger().warning("Error occurred while serializing to blob: " + ex.getMessage(), ex);
-//			}
-//		}
-//		
-//		return blob;
-		
-		return aggregateResults;
-	}
-
-	public Object aggregateDistributedSystems(Object[] results)
-	{
-		// TODO Auto-generated method stub
-		return null;
-	}
-	
-	private Object run(Indexer indexer)
-	{
-		Object dataObject = null;
-		
-		switch (queryType) {
-		case TYPE_KEYS:
-			dataObject = queryKeys(indexer);
-			break;
-		case TYPE_VALUES:
-			dataObject = queryValues(indexer);
-			break;
-		case TYPE_KEYS_VALUES:
-		default:
-			dataObject = queryKeysValues(indexer);
-			break;
-		}	
-		return dataObject;
-	}
-
-	
-	private Object queryKeys(Indexer indexer)
-	{
-		byte[] blob = null;
-
-		Map map = indexer.query(queryKey);
-		if (map != null) {
-			try {
-				// Need to serialize from here because "set" is
-				// synchronized in Indexer.
-				synchronized (map) {
-					blob = BlobHelper.serializeToBlob(new HashSet(map.keySet()));
-				}
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		}
-		map = null; // gc
-		
-		return blob;
-	}
-	
-	private Object queryValues(Indexer indexer)
-	{
-		byte[] blob = null;
-		
-		Map map = indexer.query(queryKey);
-		if (map != null) {
-			try {
-				// Need to serialize from here because "set" is
-				// synchronized in Indexer.
-				synchronized (map) {
-					blob = BlobHelper.serializeToBlob(new HashSet(map.values()));
-				}	
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		}
-		map = null; // gc
-		return blob;
-	}
-	
-	private Object queryKeysValues(Indexer indexer)
-	{	
-		byte[] blob = null;
-		
-		Map map = indexer.query(queryKey);
-		if (map != null) {
-			try {
-				// Need to serialize from here because "set" is
-				// synchronized in Indexer.
-				synchronized (map) {
-					blob = BlobHelper.serializeToBlob(map);
-				}
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		}
-		return blob;
-	}
-
-	public void fromData(DataInput in) throws IOException,
-			ClassNotFoundException
-	{
-		regionPath = DataSerializerEx.readUTF(in);
-		queryKey = DataSerializer.readObject(in);
-		queryType = in.readByte();
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		DataSerializerEx.writeUTF(regionPath, out);
-		DataSerializer.writeObject(queryKey, out);
-		out.writeByte(queryType);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandClient.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandClient.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandClient.java
deleted file mode 100644
index 3b4914c..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandClient.java
+++ /dev/null
@@ -1,417 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command;
-
-import java.util.ArrayList;
-import java.util.UUID;
-
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionCreateTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionDestroyTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.RegionAttributeInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.command.AbstractCommandTask;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-/**
- * CommandClient executes a CommandTask in the server.
- * 
- * @author dpark
- * 
- */
-public class CommandClient
-{
-	private static final String KEY_DEFAULT = "_command";
-	private static final String KEY_BROADCAST = "_bcast";
-
-	private Region outboxRegion;
-	private String outboxRegionFullPath;
-	private String endpoints;
-	private Pool pool;
-
-	private Region inboxRegion;
-	private boolean inboxEnabled = false;
-
-	private ArrayList commandResultsListenerList = new ArrayList(5);
-
-	private CommandResultsListener commandResultsListeners[] = new CommandResultsListener[0];
-
-	/**
-	 * Constrcuts a new CommandClient object with the specified pool name or
-	 * endpoints. If null, the default path "/__command" is assigned.
-	 * 
-	 * @param outboxRegionFullPath
-	 *            The region full path.
-	 * @param poolNameOrEndpoints
-	 *            The bridge client pool name or endpoints.  The endpoints format 
-	 *            is "e1=host:port,e2=host2:port".
-	 *            If the name is not in the endpoints format then it is treated
-	 *            as a pool name. If null, the region is created as
-	 *            a peer region if not already created.
-	 * @throws CacheException
-	 *             Thrown if unable to create cache connection.
-	 */
-	public CommandClient(String outboxRegionFullPath, String poolNameOrEndpoints) throws CacheException
-	{
-	  this(outboxRegionFullPath, poolNameOrEndpoints, isPoolName(poolNameOrEndpoints));
-//	  FindBugs - endpoints uninited & seems to be used by mistake, should have been poolNameOrEndpoints
-//		init(outboxRegionFullPath, endpoints, isPoolName(poolNameOrEndpoints));
-	}
-
-	/**
-	 * Creates a CommandClient object with the specified pool or endpoints.
-	 * @param outboxRegionFullPath The outbox region path. If null, the default path "/__command" is assigned.
-	 * @param poolNameOrEndpoints Pool name or endpoints.
-	 * @param isPool true if pool name, false if endpoints.
-	 */
-    public CommandClient(String outboxRegionFullPath, String poolNameOrEndpoints, boolean isPool)
-    {
-        init(outboxRegionFullPath, poolNameOrEndpoints, isPool);
-    }
-    
-    private static boolean isPoolName(String poolNameOrEndpoints)
-    {
-    	return poolNameOrEndpoints.indexOf(":") != -1;
-    }
-    
-    private void init(String outboxRegionFullPath, String poolNameOrEndpoints, boolean isPool)
-    {
-    	if (outboxRegionFullPath == null)
-        {
-            this.outboxRegionFullPath = "__command";
-        }
-        else
-        {
-            this.outboxRegionFullPath = outboxRegionFullPath;
-        }
-        if (isPool)
-        {
-            pool = PoolManager.find(poolNameOrEndpoints);
-            outboxRegion = RegionUtil.getRegion(this.outboxRegionFullPath, Scope.LOCAL, DataPolicy.EMPTY, pool, false);
-        }
-        else
-        {
-            endpoints = poolNameOrEndpoints;
-            outboxRegion = RegionUtil.getRegion(this.outboxRegionFullPath, Scope.LOCAL, DataPolicy.EMPTY, endpoints, false);
-        }
-    }
-
-	/**
-	 * Constructs a new Command Client object with the specified pool.
-	 * @param outboxRegionFullPath
-	 * @param pool The pool.
-	 * @throws CacheException Thrown if unable to create cache connection.
-	 */
-	public CommandClient(String outboxRegionFullPath, Pool pool) throws CacheException
-	{
-		if (outboxRegionFullPath == null) {
-			this.outboxRegionFullPath = "__command";
-		} else {
-			this.outboxRegionFullPath = outboxRegionFullPath;
-		}
-		this.pool = pool;
-		outboxRegion = RegionUtil.getRegion(this.outboxRegionFullPath, Scope.LOCAL, DataPolicy.EMPTY, pool, false);
-	}
-
-	/**
-	 * Constructs a CommandClient object with the default region "__command".
-	 * @param poolNameOrEndpoints
-	 *            The bridge client pool name or endpoints.  The endpoints format 
-	 *            is "e1=host:port,e2=host2:port".
-	 *            If the name is not in the endpoints format then it is treated
-	 *            as a pool name. If null, the region is created as
-	 *            a peer region if not already created.
-	 * @throws CacheException Thrown if unable to create cache connection.
-	 */
-	public CommandClient(String poolNameOrEndpoints) throws CacheException
-	{
-		this(null, poolNameOrEndpoints);
-	}
-
-	/**
-	 * Creates a CommandClient object that uses the default command region name,
-	 * "_command".
-	 * 
-	 * @param pool
-	 */
-	public CommandClient(Pool pool)
-	{
-		this.pool = pool;
-	}
-
-	/**
-	 * Executes the specified command task.
-	 * <p>
-	 * The server must have CommandServerManager registered with writer disabled
-	 * for this method to work.
-	 * 
-	 * @param task
-	 *            The command task to execute in the server.
-	 * @param isBroadcast
-	 *            true to broadcast the command execution to all peers. false to
-	 *            execute on one of the servers.
-	 * @return Returns CommandResults returned by CommandTask.runTask().
-	 */
-	private CommandResults execute(CommandTask task, boolean isBroadcast)
-	{
-		if (isClosed()) {
-			return null;
-		}
-
-		CommandResults results;
-		if (isInboxEnabled()) {
-			if (task instanceof AbstractCommandTask) {
-				((AbstractCommandTask) task).setResultSetRegionPath(inboxRegion.getFullPath());
-			}
-		}
-		if (isBroadcast) {
-			return (CommandResults) outboxRegion.get(KEY_BROADCAST, task);
-		} else {
-			return (CommandResults) outboxRegion.get(KEY_DEFAULT, task);
-		}
-	}
-
-	/**
-	 * Executes the specified command task.
-	 * <p>
-	 * The server must have CommandServerManager registered with writer disabled
-	 * for this method to work.
-	 * 
-	 * @param task
-	 *            The command task to execute in the server.
-	 * @return Returns CommandResults returned by CommandTask.runTask().
-	 */
-	public CommandResults execute(CommandTask task)
-	{
-		return execute(task, false);
-	}
-
-	/**
-	 * Broadcasts the specified command task.
-	 * <p>
-	 * The server must have CommandServerManager registered with writer disabled
-	 * for this method to work.
-	 * 
-	 * @param task
-	 *            The command task to execute in the server.
-	 * @return Returns CommandResults returned by CommandTask.runTask().
-	 */
-	public CommandResults broadcast(CommandTask task)
-	{
-		return execute(task, true);
-	}
-
-	/**
-	 * Executes the task. The data object is passed to CommandTask.runTask() as
-	 * user data, which has the type SerializedCacheValue. CommandTask.runTask()
-	 * can inflate the serialized object to its actual type or send it to other
-	 * GemFire members as a serialized object.
-	 * <p>
-	 * The server must have CommandServerManager registered with the writer
-	 * enabled for this method to work.
-	 * 
-	 * @param task
-	 * @param dataObject
-	 */
-	public void execute(CommandTask task, Object dataObject)
-	{
-		if (isClosed()) {
-			return;
-		}
-
-		outboxRegion.put(task, dataObject);
-	}
-
-	public void setInboxEnabled(boolean inboxEnabled) throws CommandException
-	{
-		if (isClosed()) {
-			return;
-		}
-		this.inboxEnabled = inboxEnabled;
-		setUniqueInbox(outboxRegion.getFullPath());
-	}
-
-	public boolean isInboxEnabled()
-	{
-		return inboxEnabled;
-	}
-
-	/**
-	 * Closes CommandClient. This object is no longer usable after this method
-	 * call.
-	 */
-	public void close() throws CommandException
-	{
-		CommandResults results = null;
-		if (inboxRegion != null) {
-			results = broadcast(new RegionDestroyTask(inboxRegion.getFullPath()));
-			inboxRegion = null;
-			inboxEnabled = false;
-		}
-
-		// Destroying the outboxRegion also destroys its child region
-		// inboxRegion.
-		if (outboxRegion != null) {
-			outboxRegion.localDestroyRegion();
-			outboxRegion = null;
-		}
-
-		if (results != null && results.getCode() == RegionDestroyTask.ERROR_REGION_DESTROY) {
-			throw new CommandException("Server may have not destroyed the client command region(s)", results
-					.getException());
-		}
-	}
-
-	public boolean isClosed()
-	{
-		return outboxRegion == null;
-	}
-
-	public String getInboxRegionFullPath()
-	{
-		if (inboxRegion == null) {
-			return null;
-		}
-		return inboxRegion.getFullPath();
-	}
-
-	private String createUniqueRegionName() throws Exception
-	{
-		UUID uuid = UUID.randomUUID();
-		return uuid.toString();
-	}
-
-	/**
-	 * Creates a unique inbox region under the specified regionFullPath.
-	 * 
-	 * @param regionFullPath
-	 *            The full path of the region in which a unique (and therefore
-	 *            private) inbox region is created.
-	 */
-	private void setUniqueInbox(String regionFullPath) throws CommandException
-	{
-		if (regionFullPath == null) {
-			inboxRegion = null;
-			return;
-		}
-
-		try {
-			String inboxPath = regionFullPath + "/" + createUniqueRegionName();
-			RegionAttributeInfo attrInfo = new RegionAttributeInfo();
-			attrInfo.setAttribute(RegionAttributeInfo.SCOPE, "local");
-			attrInfo.setAttribute(RegionAttributeInfo.DATA_POLICY, "empty");
-			CommandResults results = broadcast(new RegionCreateTask(inboxPath, attrInfo));
-
-			if (results.getCode() == RegionCreateTask.ERROR_REGION_NOT_CREATED) {
-				throw new CommandException("Unable to create a CommandResults reply region in the server.", results
-						.getException()); //FindBugs - forgets to throw new CommandException(String, Throwable)
-			}
-
-			if (endpoints != null) {
-				inboxRegion = RegionUtil.getRegion(inboxPath, Scope.LOCAL, DataPolicy.DEFAULT, endpoints, false);
-			} else {
-				inboxRegion = RegionUtil.getRegion(inboxPath, Scope.LOCAL, DataPolicy.DEFAULT, pool, false);
-			}
-			inboxRegion.getAttributesMutator().addCacheListener(new ReplyListener());
-			inboxRegion.registerInterestRegex(".*");
-		} catch (Exception ex) {
-			throw new CommandException(ex);
-		}
-	}
-
-	public SelectResults query(String queryString) throws CommandException
-	{
-		if (isClosed()) {
-			return null;
-		}
-
-		try {
-			return outboxRegion.query(queryString);
-		} catch (Exception ex) {
-			throw new CommandException(ex);
-		}
-	}
-
-	public String getOutboxRegionFullPath()
-	{
-		return outboxRegionFullPath;
-	}
-
-	/**
-	 * Returns the endpoints. If pool is used then it returns null.
-	 */
-	public String getEndpoints()
-	{
-		return endpoints;
-	}
-
-	/**
-	 * Returns the pool. If endpoints is used then it returns null.
-	 */
-	public Pool getPool()
-	{
-		return pool;
-	}
-	
-	/**
-	 * Returns the pool name. If endpoints is used then it returns null.
-	 */
-	public String getPoolName()
-	{
-		if (pool == null) {
-			return null;
-		} else {
-			return pool.getName();
-		}
-	}
-
-
-	public void addCommandResultsListener(CommandResultsListener commandResultsListener)
-	{
-		commandResultsListenerList.add(commandResultsListener);
-		commandResultsListeners = (CommandResultsListener[]) commandResultsListenerList
-				.toArray(new CommandResultsListener[0]);
-	}
-
-	public void removeCommandResultsListener(CommandResultsListener commandResultsListener)
-	{
-		commandResultsListenerList.remove(commandResultsListener);
-		commandResultsListeners = (CommandResultsListener[]) commandResultsListenerList
-				.toArray(new CommandResultsListener[0]);
-	}
-
-	protected void fireCommandResults(CommandResults results)
-	{
-		CommandResultsListener listeners[] = commandResultsListeners;
-		for (int i = 0; i < listeners.length; i++) {
-			listeners[i].commandResultsReceived(results);
-		}
-	}
-
-	class ReplyListener extends CacheListenerAdapter
-	{
-		private void handleReplyReceived(EntryEvent entryEvent)
-		{
-			CommandResults results = (CommandResults) entryEvent.getNewValue();
-			fireCommandResults(results);
-		}
-
-		public void afterCreate(EntryEvent entryEvent)
-		{
-			handleReplyReceived(entryEvent);
-		}
-
-		public void afterUpdate(EntryEvent entryEvent)
-		{
-			handleReplyReceived(entryEvent);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandException.java
deleted file mode 100644
index ebbeb4f..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandException.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command;
-
-/**
- * 
- * @author dpark
- *
- */
-
-
-public class CommandException extends Exception
-{
-    public CommandException()
-    {
-        super();
-    }
-    public CommandException(String message)
-    {
-        super(message);
-    }
-
-    public CommandException(String message, Throwable cause)
-    {
-        super(message, cause);
-    }
-
-    public CommandException(Throwable cause)
-    {
-        super(cause);
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandResultsListener.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandResultsListener.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandResultsListener.java
deleted file mode 100644
index 4712603..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/CommandResultsListener.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command;
-
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-
-/**
- * CommandResultsListener asynchronously receives CommandResults sent by 
- * AbstractCommandTask.sendResults().
- * @author dpark
- *
- */
-public interface CommandResultsListener
-{
-    void commandResultsReceived(CommandResults commandResults);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/EchoTask.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/EchoTask.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/EchoTask.java
deleted file mode 100644
index cf29a12..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/command/task/EchoTask.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.command.task;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandTask;
-
-/**
- * EchoTask returns itself back to the caller. CommandResults.getDataObject()
- * returns EchoTask.
- * @author dpark
- *
- */
-public class EchoTask implements CommandTask {
-	private static final long serialVersionUID = 1L;
-
-	public static final byte ERROR_REGION_DESTROY = 1;
-	
-	private String message;
-
-	public EchoTask() {
-	}
-
-	public EchoTask(String message) {
-		this.message = message;
-	}
-
-	public CommandResults runTask(Object userData) {
-		CommandResults results = new CommandResults();
-		results.setDataObject(this);
-		return results;
-	}
-
-	private void writeUTF(String value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeUTF("\0");
-		} else {
-			output.writeUTF(value);
-		}
-	}
-
-	private String readUTF(DataInput in) throws IOException
-	{
-		String value = in.readUTF();
-		if (value.equals("\0")) {
-			value = null;
-		}
-		return value;
-	}
-	
-	public void fromData(DataInput input) throws IOException,
-			ClassNotFoundException {
-		message = readUTF(input);
-	}
-
-	public void toData(DataOutput output) throws IOException {
-		writeUTF(message, output);
-	}
-
-}


[19/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery-1.7.2.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery-1.7.2.js b/pulse/src/main/webapp/scripts/lib/jquery-1.7.2.js
new file mode 100644
index 0000000..3774ff9
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery-1.7.2.js
@@ -0,0 +1,9404 @@
+/*!
+ * jQuery JavaScript Library v1.7.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Wed Mar 21 12:46:34 2012 -0700
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+	navigator = window.navigator,
+	location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// A simple way to check for HTML strings or ID strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+	// Check if a string has a non-whitespace character in it
+	rnotwhite = /\S/,
+
+	// Used for trimming whitespace
+	trimLeft = /^\s+/,
+	trimRight = /\s+$/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+	// Useragent RegExp
+	rwebkit = /(webkit)[ \/]([\w.]+)/,
+	ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+	rmsie = /(msie) ([\w.]+)/,
+	rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+	// Matches dashed string for camelizing
+	rdashAlpha = /-([a-z]|[0-9])/ig,
+	rmsPrefix = /^-ms-/,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return ( letter + "" ).toUpperCase();
+	},
+
+	// Keep a UserAgent string for use with jQuery.browser
+	userAgent = navigator.userAgent,
+
+	// For matching the engine and version of the browser
+	browserMatch,
+
+	// The deferred used on DOM ready
+	readyList,
+
+	// The ready event handler
+	DOMContentLoaded,
+
+	// Save a reference to some core methods
+	toString = Object.prototype.toString,
+	hasOwn = Object.prototype.hasOwnProperty,
+	push = Array.prototype.push,
+	slice = Array.prototype.slice,
+	trim = String.prototype.trim,
+	indexOf = Array.prototype.indexOf,
+
+	// [[Class]] -> type pairs
+	class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem, ret, doc;
+
+		// Handle $(""), $(null), or $(undefined)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle $(DOMElement)
+		if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+		}
+
+		// The body element only exists once, optimize finding it
+		if ( selector === "body" && !context && document.body ) {
+			this.context = document;
+			this[0] = document.body;
+			this.selector = selector;
+			this.length = 1;
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			// Are we dealing with HTML string or an ID?
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = quickExpr.exec( selector );
+			}
+
+			// Verify a match, and that no context was specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+					doc = ( context ? context.ownerDocument || context : document );
+
+					// If a single string is passed in and it's a single tag
+					// just do a createElement and skip the rest
+					ret = rsingleTag.exec( selector );
+
+					if ( ret ) {
+						if ( jQuery.isPlainObject( context ) ) {
+							selector = [ document.createElement( ret[1] ) ];
+							jQuery.fn.attr.call( selector, context, true );
+
+						} else {
+							selector = [ doc.createElement( ret[1] ) ];
+						}
+
+					} else {
+						ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+						selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
+					}
+
+					return jQuery.merge( this, selector );
+
+				// HANDLE: $("#id")
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The current version of jQuery being used
+	jquery: "1.7.2",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	// The number of elements contained in the matched element set
+	size: function() {
+		return this.length;
+	},
+
+	toArray: function() {
+		return slice.call( this, 0 );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems, name, selector ) {
+		// Build a new jQuery matched element set
+		var ret = this.constructor();
+
+		if ( jQuery.isArray( elems ) ) {
+			push.apply( ret, elems );
+
+		} else {
+			jQuery.merge( ret, elems );
+		}
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+
+		ret.context = this.context;
+
+		if ( name === "find" ) {
+			ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+		} else if ( name ) {
+			ret.selector = this.selector + "." + name + "(" + selector + ")";
+		}
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Attach the listeners
+		jQuery.bindReady();
+
+		// Add the callback
+		readyList.add( fn );
+
+		return this;
+	},
+
+	eq: function( i ) {
+		i = +i;
+		return i === -1 ?
+			this.slice( i ) :
+			this.slice( i, i + 1 );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	slice: function() {
+		return this.pushStack( slice.apply( this, arguments ),
+			"slice", slice.call(arguments).join(",") );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var options, name, src, copy, copyIsArray, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	noConflict: function( deep ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+		// Either a released hold or an DOMready/load event and not yet ready
+		if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+			// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+			if ( !document.body ) {
+				return setTimeout( jQuery.ready, 1 );
+			}
+
+			// Remember that the DOM is ready
+			jQuery.isReady = true;
+
+			// If a normal DOM Ready event fired, decrement, and wait if need be
+			if ( wait !== true && --jQuery.readyWait > 0 ) {
+				return;
+			}
+
+			// If there are functions bound, to execute
+			readyList.fireWith( document, [ jQuery ] );
+
+			// Trigger any bound ready events
+			if ( jQuery.fn.trigger ) {
+				jQuery( document ).trigger( "ready" ).off( "ready" );
+			}
+		}
+	},
+
+	bindReady: function() {
+		if ( readyList ) {
+			return;
+		}
+
+		readyList = jQuery.Callbacks( "once memory" );
+
+		// Catch cases where $(document).ready() is called after the
+		// browser event has already occurred.
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			return setTimeout( jQuery.ready, 1 );
+		}
+
+		// Mozilla, Opera and webkit nightlies currently support this event
+		if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", jQuery.ready, false );
+
+		// If IE event model is used
+		} else if ( document.attachEvent ) {
+			// ensure firing before onload,
+			// maybe late but safe also for iframes
+			document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", jQuery.ready );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var toplevel = false;
+
+			try {
+				toplevel = window.frameElement == null;
+			} catch(e) {}
+
+			if ( document.documentElement.doScroll && toplevel ) {
+				doScrollCheck();
+			}
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	isWindow: function( obj ) {
+		return obj != null && obj == obj.window;
+	},
+
+	isNumeric: function( obj ) {
+		return !isNaN( parseFloat(obj) ) && isFinite( obj );
+	},
+
+	type: function( obj ) {
+		return obj == null ?
+			String( obj ) :
+			class2type[ toString.call(obj) ] || "object";
+	},
+
+	isPlainObject: function( obj ) {
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!hasOwn.call(obj, "constructor") &&
+				!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+
+		var key;
+		for ( key in obj ) {}
+
+		return key === undefined || hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		for ( var name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	parseJSON: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+
+		// Make sure leading/trailing whitespace is removed (IE can't handle it)
+		data = jQuery.trim( data );
+
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		// Make sure the incoming data is actual JSON
+		// Logic borrowed from http://json.org/json2.js
+		if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+			.replace( rvalidtokens, "]" )
+			.replace( rvalidbraces, "")) ) {
+
+			return ( new Function( "return " + data ) )();
+
+		}
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		if ( typeof data !== "string" || !data ) {
+			return null;
+		}
+		var xml, tmp;
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && rnotwhite.test( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+	},
+
+	// args is for internal usage only
+	each: function( object, callback, args ) {
+		var name, i = 0,
+			length = object.length,
+			isObj = length === undefined || jQuery.isFunction( object );
+
+		if ( args ) {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.apply( object[ name ], args ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( ; i < length; ) {
+					if ( callback.apply( object[ i++ ], args ) === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isObj ) {
+				for ( name in object ) {
+					if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( ; i < length; ) {
+					if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return object;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: trim ?
+		function( text ) {
+			return text == null ?
+				"" :
+				trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( array, results ) {
+		var ret = results || [];
+
+		if ( array != null ) {
+			// The window, strings (and functions) also have 'length'
+			// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+			var type = jQuery.type( array );
+
+			if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+				push.call( ret, array );
+			} else {
+				jQuery.merge( ret, array );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, array, i ) {
+		var len;
+
+		if ( array ) {
+			if ( indexOf ) {
+				return indexOf.call( array, elem, i );
+			}
+
+			len = array.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in array && array[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var i = first.length,
+			j = 0;
+
+		if ( typeof second.length === "number" ) {
+			for ( var l = second.length; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var ret = [], retVal;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( var i = 0, length = elems.length; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value, key, ret = [],
+			i = 0,
+			length = elems.length,
+			// jquery objects are treated as arrays
+			isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( key in elems ) {
+				value = callback( elems[ key ], key, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return ret.concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		if ( typeof context === "string" ) {
+			var tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		var args = slice.call( arguments, 2 ),
+			proxy = function() {
+				return fn.apply( context, args.concat( slice.call( arguments ) ) );
+			};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Mutifunctional method to get and set values to a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+		var exec,
+			bulk = key == null,
+			i = 0,
+			length = elems.length;
+
+		// Sets many values
+		if ( key && typeof key === "object" ) {
+			for ( i in key ) {
+				jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+			}
+			chainable = 1;
+
+		// Sets one value
+		} else if ( value !== undefined ) {
+			// Optionally, function values get executed if exec is true
+			exec = pass === undefined && jQuery.isFunction( value );
+
+			if ( bulk ) {
+				// Bulk operations only iterate when executing function values
+				if ( exec ) {
+					exec = fn;
+					fn = function( elem, key, value ) {
+						return exec.call( jQuery( elem ), value );
+					};
+
+				// Otherwise they run against the entire set
+				} else {
+					fn.call( elems, value );
+					fn = null;
+				}
+			}
+
+			if ( fn ) {
+				for (; i < length; i++ ) {
+					fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+				}
+			}
+
+			chainable = 1;
+		}
+
+		return chainable ?
+			elems :
+
+			// Gets
+			bulk ?
+				fn.call( elems ) :
+				length ? fn( elems[0], key ) : emptyGet;
+	},
+
+	now: function() {
+		return ( new Date() ).getTime();
+	},
+
+	// Use of jQuery.browser is frowned upon.
+	// More details: http://docs.jquery.com/Utilities/jQuery.browser
+	uaMatch: function( ua ) {
+		ua = ua.toLowerCase();
+
+		var match = rwebkit.exec( ua ) ||
+			ropera.exec( ua ) ||
+			rmsie.exec( ua ) ||
+			ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+			[];
+
+		return { browser: match[1] || "", version: match[2] || "0" };
+	},
+
+	sub: function() {
+		function jQuerySub( selector, context ) {
+			return new jQuerySub.fn.init( selector, context );
+		}
+		jQuery.extend( true, jQuerySub, this );
+		jQuerySub.superclass = this;
+		jQuerySub.fn = jQuerySub.prototype = this();
+		jQuerySub.fn.constructor = jQuerySub;
+		jQuerySub.sub = this.sub;
+		jQuerySub.fn.init = function init( selector, context ) {
+			if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+				context = jQuerySub( context );
+			}
+
+			return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+		};
+		jQuerySub.fn.init.prototype = jQuerySub.fn;
+		var rootjQuerySub = jQuerySub(document);
+		return jQuerySub;
+	},
+
+	browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+	jQuery.browser[ browserMatch.browser ] = true;
+	jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+	jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+	trimLeft = /^[\s\xA0]+/;
+	trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+	DOMContentLoaded = function() {
+		document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+		jQuery.ready();
+	};
+
+} else if ( document.attachEvent ) {
+	DOMContentLoaded = function() {
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( document.readyState === "complete" ) {
+			document.detachEvent( "onreadystatechange", DOMContentLoaded );
+			jQuery.ready();
+		}
+	};
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+	if ( jQuery.isReady ) {
+		return;
+	}
+
+	try {
+		// If IE is used, use the trick by Diego Perini
+		// http://javascript.nwbox.com/IEContentLoaded/
+		document.documentElement.doScroll("left");
+	} catch(e) {
+		setTimeout( doScrollCheck, 1 );
+		return;
+	}
+
+	// and execute any waiting functions
+	jQuery.ready();
+}
+
+return jQuery;
+
+})();
+
+
+// String to Object flags format cache
+var flagsCache = {};
+
+// Convert String-formatted flags into Object-formatted ones and store in cache
+function createFlags( flags ) {
+	var object = flagsCache[ flags ] = {},
+		i, length;
+	flags = flags.split( /\s+/ );
+	for ( i = 0, length = flags.length; i < length; i++ ) {
+		object[ flags[i] ] = true;
+	}
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	flags:	an optional list of space-separated flags that will change how
+ *			the callback list behaves
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible flags:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( flags ) {
+
+	// Convert flags from String-formatted to Object-formatted
+	// (we check in cache first)
+	flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
+
+	var // Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = [],
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list was already fired
+		fired,
+		// Flag to know if list is currently firing
+		firing,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// Add one or several callbacks to the list
+		add = function( args ) {
+			var i,
+				length,
+				elem,
+				type,
+				actual;
+			for ( i = 0, length = args.length; i < length; i++ ) {
+				elem = args[ i ];
+				type = jQuery.type( elem );
+				if ( type === "array" ) {
+					// Inspect recursively
+					add( elem );
+				} else if ( type === "function" ) {
+					// Add if not in unique mode and callback is not in
+					if ( !flags.unique || !self.has( elem ) ) {
+						list.push( elem );
+					}
+				}
+			}
+		},
+		// Fire callbacks
+		fire = function( context, args ) {
+			args = args || [];
+			memory = !flags.memory || [ context, args ];
+			fired = true;
+			firing = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
+					memory = true; // Mark as halted
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( !flags.once ) {
+					if ( stack && stack.length ) {
+						memory = stack.shift();
+						self.fireWith( memory[ 0 ], memory[ 1 ] );
+					}
+				} else if ( memory === true ) {
+					self.disable();
+				} else {
+					list = [];
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					var length = list.length;
+					add( arguments );
+					// Do we need to add the callbacks to the
+					// current firing batch?
+					if ( firing ) {
+						firingLength = list.length;
+					// With memory, if we're not firing then
+					// we should call right away, unless previous
+					// firing was halted (stopOnFalse)
+					} else if ( memory && memory !== true ) {
+						firingStart = length;
+						fire( memory[ 0 ], memory[ 1 ] );
+					}
+				}
+				return this;
+			},
+			// Remove a callback from the list
+			remove: function() {
+				if ( list ) {
+					var args = arguments,
+						argIndex = 0,
+						argLength = args.length;
+					for ( ; argIndex < argLength ; argIndex++ ) {
+						for ( var i = 0; i < list.length; i++ ) {
+							if ( args[ argIndex ] === list[ i ] ) {
+								// Handle firingIndex and firingLength
+								if ( firing ) {
+									if ( i <= firingLength ) {
+										firingLength--;
+										if ( i <= firingIndex ) {
+											firingIndex--;
+										}
+									}
+								}
+								// Remove the element
+								list.splice( i--, 1 );
+								// If we have some unicity property then
+								// we only need to do this once
+								if ( flags.unique ) {
+									break;
+								}
+							}
+						}
+					}
+				}
+				return this;
+			},
+			// Control if a given callback is in the list
+			has: function( fn ) {
+				if ( list ) {
+					var i = 0,
+						length = list.length;
+					for ( ; i < length; i++ ) {
+						if ( fn === list[ i ] ) {
+							return true;
+						}
+					}
+				}
+				return false;
+			},
+			// Remove all callbacks from the list
+			empty: function() {
+				list = [];
+				return this;
+			},
+			// Have the list do nothing anymore
+			disable: function() {
+				list = stack = memory = undefined;
+				return this;
+			},
+			// Is it disabled?
+			disabled: function() {
+				return !list;
+			},
+			// Lock the list in its current state
+			lock: function() {
+				stack = undefined;
+				if ( !memory || memory === true ) {
+					self.disable();
+				}
+				return this;
+			},
+			// Is it locked?
+			locked: function() {
+				return !stack;
+			},
+			// Call all callbacks with the given context and arguments
+			fireWith: function( context, args ) {
+				if ( stack ) {
+					if ( firing ) {
+						if ( !flags.once ) {
+							stack.push( [ context, args ] );
+						}
+					} else if ( !( flags.once && memory ) ) {
+						fire( context, args );
+					}
+				}
+				return this;
+			},
+			// Call all the callbacks with the given arguments
+			fire: function() {
+				self.fireWith( this, arguments );
+				return this;
+			},
+			// To know if the callbacks have already been called at least once
+			fired: function() {
+				return !!fired;
+			}
+		};
+
+	return self;
+};
+
+
+
+
+var // Static reference to slice
+	sliceDeferred = [].slice;
+
+jQuery.extend({
+
+	Deferred: function( func ) {
+		var doneList = jQuery.Callbacks( "once memory" ),
+			failList = jQuery.Callbacks( "once memory" ),
+			progressList = jQuery.Callbacks( "memory" ),
+			state = "pending",
+			lists = {
+				resolve: doneList,
+				reject: failList,
+				notify: progressList
+			},
+			promise = {
+				done: doneList.add,
+				fail: failList.add,
+				progress: progressList.add,
+
+				state: function() {
+					return state;
+				},
+
+				// Deprecated
+				isResolved: doneList.fired,
+				isRejected: failList.fired,
+
+				then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
+					deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
+					return this;
+				},
+				always: function() {
+					deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
+					return this;
+				},
+				pipe: function( fnDone, fnFail, fnProgress ) {
+					return jQuery.Deferred(function( newDefer ) {
+						jQuery.each( {
+							done: [ fnDone, "resolve" ],
+							fail: [ fnFail, "reject" ],
+							progress: [ fnProgress, "notify" ]
+						}, function( handler, data ) {
+							var fn = data[ 0 ],
+								action = data[ 1 ],
+								returned;
+							if ( jQuery.isFunction( fn ) ) {
+								deferred[ handler ](function() {
+									returned = fn.apply( this, arguments );
+									if ( returned && jQuery.isFunction( returned.promise ) ) {
+										returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
+									} else {
+										newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+									}
+								});
+							} else {
+								deferred[ handler ]( newDefer[ action ] );
+							}
+						});
+					}).promise();
+				},
+				// Get a promise for this deferred
+				// If obj is provided, the promise aspect is added to the object
+				promise: function( obj ) {
+					if ( obj == null ) {
+						obj = promise;
+					} else {
+						for ( var key in promise ) {
+							obj[ key ] = promise[ key ];
+						}
+					}
+					return obj;
+				}
+			},
+			deferred = promise.promise({}),
+			key;
+
+		for ( key in lists ) {
+			deferred[ key ] = lists[ key ].fire;
+			deferred[ key + "With" ] = lists[ key ].fireWith;
+		}
+
+		// Handle state
+		deferred.done( function() {
+			state = "resolved";
+		}, failList.disable, progressList.lock ).fail( function() {
+			state = "rejected";
+		}, doneList.disable, progressList.lock );
+
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+
+		// All done!
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( firstParam ) {
+		var args = sliceDeferred.call( arguments, 0 ),
+			i = 0,
+			length = args.length,
+			pValues = new Array( length ),
+			count = length,
+			pCount = length,
+			deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+				firstParam :
+				jQuery.Deferred(),
+			promise = deferred.promise();
+		function resolveFunc( i ) {
+			return function( value ) {
+				args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+				if ( !( --count ) ) {
+					deferred.resolveWith( deferred, args );
+				}
+			};
+		}
+		function progressFunc( i ) {
+			return function( value ) {
+				pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+				deferred.notifyWith( promise, pValues );
+			};
+		}
+		if ( length > 1 ) {
+			for ( ; i < length; i++ ) {
+				if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
+					args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
+				} else {
+					--count;
+				}
+			}
+			if ( !count ) {
+				deferred.resolveWith( deferred, args );
+			}
+		} else if ( deferred !== firstParam ) {
+			deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+		}
+		return promise;
+	}
+});
+
+
+
+
+jQuery.support = (function() {
+
+	var support,
+		all,
+		a,
+		select,
+		opt,
+		input,
+		fragment,
+		tds,
+		events,
+		eventName,
+		i,
+		isSupported,
+		div = document.createElement( "div" ),
+		documentElement = document.documentElement;
+
+	// Preliminary tests
+	div.setAttribute("className", "t");
+	div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+	all = div.getElementsByTagName( "*" );
+	a = div.getElementsByTagName( "a" )[ 0 ];
+
+	// Can't get basic test support
+	if ( !all || !all.length || !a ) {
+		return {};
+	}
+
+	// First batch of supports tests
+	select = document.createElement( "select" );
+	opt = select.appendChild( document.createElement("option") );
+	input = div.getElementsByTagName( "input" )[ 0 ];
+
+	support = {
+		// IE strips leading whitespace when .innerHTML is used
+		leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+		// Make sure that tbody elements aren't automatically inserted
+		// IE will insert them into empty tables
+		tbody: !div.getElementsByTagName("tbody").length,
+
+		// Make sure that link elements get serialized correctly by innerHTML
+		// This requires a wrapper element in IE
+		htmlSerialize: !!div.getElementsByTagName("link").length,
+
+		// Get the style information from getAttribute
+		// (IE uses .cssText instead)
+		style: /top/.test( a.getAttribute("style") ),
+
+		// Make sure that URLs aren't manipulated
+		// (IE normalizes it by default)
+		hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+		// Make sure that element opacity exists
+		// (IE uses filter instead)
+		// Use a regex to work around a WebKit issue. See #5145
+		opacity: /^0.55/.test( a.style.opacity ),
+
+		// Verify style float existence
+		// (IE uses styleFloat instead of cssFloat)
+		cssFloat: !!a.style.cssFloat,
+
+		// Make sure that if no value is specified for a checkbox
+		// that it defaults to "on".
+		// (WebKit defaults to "" instead)
+		checkOn: ( input.value === "on" ),
+
+		// Make sure that a selected-by-default option has a working selected property.
+		// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+		optSelected: opt.selected,
+
+		// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+		getSetAttribute: div.className !== "t",
+
+		// Tests for enctype support on a form(#6743)
+		enctype: !!document.createElement("form").enctype,
+
+		// Makes sure cloning an html5 element does not cause problems
+		// Where outerHTML is undefined, this still works
+		html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
+
+		// Will be defined later
+		submitBubbles: true,
+		changeBubbles: true,
+		focusinBubbles: false,
+		deleteExpando: true,
+		noCloneEvent: true,
+		inlineBlockNeedsLayout: false,
+		shrinkWrapBlocks: false,
+		reliableMarginRight: true,
+		pixelMargin: true
+	};
+
+	// jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
+	jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
+
+	// Make sure checked status is properly cloned
+	input.checked = true;
+	support.noCloneChecked = input.cloneNode( true ).checked;
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as disabled)
+	select.disabled = true;
+	support.optDisabled = !opt.disabled;
+
+	// Test to see if it's possible to delete an expando from an element
+	// Fails in Internet Explorer
+	try {
+		delete div.test;
+	} catch( e ) {
+		support.deleteExpando = false;
+	}
+
+	if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+		div.attachEvent( "onclick", function() {
+			// Cloning a node shouldn't copy over any
+			// bound event handlers (IE does this)
+			support.noCloneEvent = false;
+		});
+		div.cloneNode( true ).fireEvent( "onclick" );
+	}
+
+	// Check if a radio maintains its value
+	// after being appended to the DOM
+	input = document.createElement("input");
+	input.value = "t";
+	input.setAttribute("type", "radio");
+	support.radioValue = input.value === "t";
+
+	input.setAttribute("checked", "checked");
+
+	// #11217 - WebKit loses check when the name is after the checked attribute
+	input.setAttribute( "name", "t" );
+
+	div.appendChild( input );
+	fragment = document.createDocumentFragment();
+	fragment.appendChild( div.lastChild );
+
+	// WebKit doesn't clone checked state correctly in fragments
+	support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+	// Check if a disconnected checkbox will retain its checked
+	// value of true after appended to the DOM (IE6/7)
+	support.appendChecked = input.checked;
+
+	fragment.removeChild( input );
+	fragment.appendChild( div );
+
+	// Technique from Juriy Zaytsev
+	// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+	// We only care about the case where non-standard event systems
+	// are used, namely in IE. Short-circuiting here helps us to
+	// avoid an eval call (in setAttribute) which can cause CSP
+	// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+	if ( div.attachEvent ) {
+		for ( i in {
+			submit: 1,
+			change: 1,
+			focusin: 1
+		}) {
+			eventName = "on" + i;
+			isSupported = ( eventName in div );
+			if ( !isSupported ) {
+				div.setAttribute( eventName, "return;" );
+				isSupported = ( typeof div[ eventName ] === "function" );
+			}
+			support[ i + "Bubbles" ] = isSupported;
+		}
+	}
+
+	fragment.removeChild( div );
+
+	// Null elements to avoid leaks in IE
+	fragment = select = opt = div = input = null;
+
+	// Run tests that need a body at doc ready
+	jQuery(function() {
+		var container, outer, inner, table, td, offsetSupport,
+			marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
+			paddingMarginBorderVisibility, paddingMarginBorder,
+			body = document.getElementsByTagName("body")[0];
+
+		if ( !body ) {
+			// Return for frameset docs that don't have a body
+			return;
+		}
+
+		conMarginTop = 1;
+		paddingMarginBorder = "padding:0;margin:0;border:";
+		positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
+		paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
+		style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
+		html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
+			"<table " + style + "' cellpadding='0' cellspacing='0'>" +
+			"<tr><td></td></tr></table>";
+
+		container = document.createElement("div");
+		container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
+		body.insertBefore( container, body.firstChild );
+
+		// Construct the test element
+		div = document.createElement("div");
+		container.appendChild( div );
+
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		// (only IE 8 fails this test)
+		div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
+		tds = div.getElementsByTagName( "td" );
+		isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+		tds[ 0 ].style.display = "";
+		tds[ 1 ].style.display = "none";
+
+		// Check if empty table cells still have offsetWidth/Height
+		// (IE <= 8 fail this test)
+		support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+		// Check if div with explicit width and no margin-right incorrectly
+		// gets computed margin-right based on width of container. For more
+		// info see bug #3333
+		// Fails in WebKit before Feb 2011 nightlies
+		// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+		if ( window.getComputedStyle ) {
+			div.innerHTML = "";
+			marginDiv = document.createElement( "div" );
+			marginDiv.style.width = "0";
+			marginDiv.style.marginRight = "0";
+			div.style.width = "2px";
+			div.appendChild( marginDiv );
+			support.reliableMarginRight =
+				( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+		}
+
+		if ( typeof div.style.zoom !== "undefined" ) {
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			// (IE < 8 does this)
+			div.innerHTML = "";
+			div.style.width = div.style.padding = "1px";
+			div.style.border = 0;
+			div.style.overflow = "hidden";
+			div.style.display = "inline";
+			div.style.zoom = 1;
+			support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+			// Check if elements with layout shrink-wrap their children
+			// (IE 6 does this)
+			div.style.display = "block";
+			div.style.overflow = "visible";
+			div.innerHTML = "<div style='width:5px;'></div>";
+			support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+		}
+
+		div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
+		div.innerHTML = html;
+
+		outer = div.firstChild;
+		inner = outer.firstChild;
+		td = outer.nextSibling.firstChild.firstChild;
+
+		offsetSupport = {
+			doesNotAddBorder: ( inner.offsetTop !== 5 ),
+			doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
+		};
+
+		inner.style.position = "fixed";
+		inner.style.top = "20px";
+
+		// safari subtracts parent border width here which is 5px
+		offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
+		inner.style.position = inner.style.top = "";
+
+		outer.style.overflow = "hidden";
+		outer.style.position = "relative";
+
+		offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
+		offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
+
+		if ( window.getComputedStyle ) {
+			div.style.marginTop = "1%";
+			support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
+		}
+
+		if ( typeof container.style.zoom !== "undefined" ) {
+			container.style.zoom = 1;
+		}
+
+		body.removeChild( container );
+		marginDiv = div = container = null;
+
+		jQuery.extend( support, offsetSupport );
+	});
+
+	return support;
+})();
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+	rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+	cache: {},
+
+	// Please use with caution
+	uuid: 0,
+
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+		"applet": true
+	},
+
+	hasData: function( elem ) {
+		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+		return !!elem && !isEmptyDataObject( elem );
+	},
+
+	data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var privateCache, thisCache, ret,
+			internalKey = jQuery.expando,
+			getByName = typeof name === "string",
+
+			// We have to handle DOM nodes and JS objects differently because IE6-7
+			// can't GC object references properly across the DOM-JS boundary
+			isNode = elem.nodeType,
+
+			// Only DOM nodes need the global jQuery cache; JS object data is
+			// attached directly to the object so GC can occur automatically
+			cache = isNode ? jQuery.cache : elem,
+
+			// Only defining an ID for JS objects if its cache already exists allows
+			// the code to shortcut on the same path as a DOM node with no cache
+			id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
+			isEvents = name === "events";
+
+		// Avoid doing any more work than we need to when trying to get data on an
+		// object that has no data at all
+		if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
+			return;
+		}
+
+		if ( !id ) {
+			// Only DOM nodes need a new unique ID for each element since their data
+			// ends up in the global cache
+			if ( isNode ) {
+				elem[ internalKey ] = id = ++jQuery.uuid;
+			} else {
+				id = internalKey;
+			}
+		}
+
+		if ( !cache[ id ] ) {
+			cache[ id ] = {};
+
+			// Avoids exposing jQuery metadata on plain JS objects when the object
+			// is serialized using JSON.stringify
+			if ( !isNode ) {
+				cache[ id ].toJSON = jQuery.noop;
+			}
+		}
+
+		// An object can be passed to jQuery.data instead of a key/value pair; this gets
+		// shallow copied over onto the existing cache
+		if ( typeof name === "object" || typeof name === "function" ) {
+			if ( pvt ) {
+				cache[ id ] = jQuery.extend( cache[ id ], name );
+			} else {
+				cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+			}
+		}
+
+		privateCache = thisCache = cache[ id ];
+
+		// jQuery data() is stored in a separate object inside the object's internal data
+		// cache in order to avoid key collisions between internal data and user-defined
+		// data.
+		if ( !pvt ) {
+			if ( !thisCache.data ) {
+				thisCache.data = {};
+			}
+
+			thisCache = thisCache.data;
+		}
+
+		if ( data !== undefined ) {
+			thisCache[ jQuery.camelCase( name ) ] = data;
+		}
+
+		// Users should not attempt to inspect the internal events object using jQuery.data,
+		// it is undocumented and subject to change. But does anyone listen? No.
+		if ( isEvents && !thisCache[ name ] ) {
+			return privateCache.events;
+		}
+
+		// Check for both converted-to-camel and non-converted data property names
+		// If a data property was specified
+		if ( getByName ) {
+
+			// First Try to find as-is property data
+			ret = thisCache[ name ];
+
+			// Test for null|undefined property data
+			if ( ret == null ) {
+
+				// Try to find the camelCased property
+				ret = thisCache[ jQuery.camelCase( name ) ];
+			}
+		} else {
+			ret = thisCache;
+		}
+
+		return ret;
+	},
+
+	removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+		if ( !jQuery.acceptData( elem ) ) {
+			return;
+		}
+
+		var thisCache, i, l,
+
+			// Reference to internal data cache key
+			internalKey = jQuery.expando,
+
+			isNode = elem.nodeType,
+
+			// See jQuery.data for more information
+			cache = isNode ? jQuery.cache : elem,
+
+			// See jQuery.data for more information
+			id = isNode ? elem[ internalKey ] : internalKey;
+
+		// If there is already no cache entry for this object, there is no
+		// purpose in continuing
+		if ( !cache[ id ] ) {
+			return;
+		}
+
+		if ( name ) {
+
+			thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+			if ( thisCache ) {
+
+				// Support array or space separated string names for data keys
+				if ( !jQuery.isArray( name ) ) {
+
+					// try the string as a key before any manipulation
+					if ( name in thisCache ) {
+						name = [ name ];
+					} else {
+
+						// split the camel cased version by spaces unless a key with the spaces exists
+						name = jQuery.camelCase( name );
+						if ( name in thisCache ) {
+							name = [ name ];
+						} else {
+							name = name.split( " " );
+						}
+					}
+				}
+
+				for ( i = 0, l = name.length; i < l; i++ ) {
+					delete thisCache[ name[i] ];
+				}
+
+				// If there is no data left in the cache, we want to continue
+				// and let the cache object itself get destroyed
+				if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+					return;
+				}
+			}
+		}
+
+		// See jQuery.data for more information
+		if ( !pvt ) {
+			delete cache[ id ].data;
+
+			// Don't destroy the parent cache unless the internal data object
+			// had been the only thing left in it
+			if ( !isEmptyDataObject(cache[ id ]) ) {
+				return;
+			}
+		}
+
+		// Browsers that fail expando deletion also refuse to delete expandos on
+		// the window, but it will allow it on all other JS objects; other browsers
+		// don't care
+		// Ensure that `cache` is not a window object #10080
+		if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+			delete cache[ id ];
+		} else {
+			cache[ id ] = null;
+		}
+
+		// We destroyed the cache and need to eliminate the expando on the node to avoid
+		// false lookups in the cache for entries that no longer exist
+		if ( isNode ) {
+			// IE does not allow us to delete expando properties from nodes,
+			// nor does it have a removeAttribute function on Document nodes;
+			// we must handle all of these cases
+			if ( jQuery.support.deleteExpando ) {
+				delete elem[ internalKey ];
+			} else if ( elem.removeAttribute ) {
+				elem.removeAttribute( internalKey );
+			} else {
+				elem[ internalKey ] = null;
+			}
+		}
+	},
+
+	// For internal use only.
+	_data: function( elem, name, data ) {
+		return jQuery.data( elem, name, data, true );
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		if ( elem.nodeName ) {
+			var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+			if ( match ) {
+				return !(match === true || elem.getAttribute("classid") !== match);
+			}
+		}
+
+		return true;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var parts, part, attr, name, l,
+			elem = this[0],
+			i = 0,
+			data = null;
+
+		// Gets all values
+		if ( key === undefined ) {
+			if ( this.length ) {
+				data = jQuery.data( elem );
+
+				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+					attr = elem.attributes;
+					for ( l = attr.length; i < l; i++ ) {
+						name = attr[i].name;
+
+						if ( name.indexOf( "data-" ) === 0 ) {
+							name = jQuery.camelCase( name.substring(5) );
+
+							dataAttr( elem, name, data[ name ] );
+						}
+					}
+					jQuery._data( elem, "parsedAttrs", true );
+				}
+			}
+
+			return data;
+		}
+
+		// Sets multiple values
+		if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		parts = key.split( ".", 2 );
+		parts[1] = parts[1] ? "." + parts[1] : "";
+		part = parts[1] + "!";
+
+		return jQuery.access( this, function( value ) {
+
+			if ( value === undefined ) {
+				data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+				// Try to fetch any internally stored data first
+				if ( data === undefined && elem ) {
+					data = jQuery.data( elem, key );
+					data = dataAttr( elem, key, data );
+				}
+
+				return data === undefined && parts[1] ?
+					this.data( parts[0] ) :
+					data;
+			}
+
+			parts[1] = value;
+			this.each(function() {
+				var self = jQuery( this );
+
+				self.triggerHandler( "setData" + part, parts );
+				jQuery.data( this, key, value );
+				self.triggerHandler( "changeData" + part, parts );
+			});
+		}, null, value, arguments.length > 1, null, false );
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+
+		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+		data = elem.getAttribute( name );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+				data === "false" ? false :
+				data === "null" ? null :
+				jQuery.isNumeric( data ) ? +data :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+					data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+	for ( var name in obj ) {
+
+		// if the public data object is empty, the private is still empty
+		if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+			continue;
+		}
+		if ( name !== "toJSON" ) {
+			return false;
+		}
+	}
+
+	return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+	var deferDataKey = type + "defer",
+		queueDataKey = type + "queue",
+		markDataKey = type + "mark",
+		defer = jQuery._data( elem, deferDataKey );
+	if ( defer &&
+		( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
+		( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
+		// Give room for hard-coded callbacks to fire first
+		// and eventually mark/queue something else on the element
+		setTimeout( function() {
+			if ( !jQuery._data( elem, queueDataKey ) &&
+				!jQuery._data( elem, markDataKey ) ) {
+				jQuery.removeData( elem, deferDataKey, true );
+				defer.fire();
+			}
+		}, 0 );
+	}
+}
+
+jQuery.extend({
+
+	_mark: function( elem, type ) {
+		if ( elem ) {
+			type = ( type || "fx" ) + "mark";
+			jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
+		}
+	},
+
+	_unmark: function( force, elem, type ) {
+		if ( force !== true ) {
+			type = elem;
+			elem = force;
+			force = false;
+		}
+		if ( elem ) {
+			type = type || "fx";
+			var key = type + "mark",
+				count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
+			if ( count ) {
+				jQuery._data( elem, key, count );
+			} else {
+				jQuery.removeData( elem, key, true );
+				handleQueueMarkDefer( elem, type, "mark" );
+			}
+		}
+	},
+
+	queue: function( elem, type, data ) {
+		var q;
+		if ( elem ) {
+			type = ( type || "fx" ) + "queue";
+			q = jQuery._data( elem, type );
+
+			// Speed up dequeue by getting out quickly if this is just a lookup
+			if ( data ) {
+				if ( !q || jQuery.isArray(data) ) {
+					q = jQuery._data( elem, type, jQuery.makeArray(data) );
+				} else {
+					q.push( data );
+				}
+			}
+			return q || [];
+		}
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			fn = queue.shift(),
+			hooks = {};
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+		}
+
+		if ( fn ) {
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift( "inprogress" );
+			}
+
+			jQuery._data( elem, type + ".run", hooks );
+			fn.call( elem, function() {
+				jQuery.dequeue( elem, type );
+			}, hooks );
+		}
+
+		if ( !queue.length ) {
+			jQuery.removeData( elem, type + "queue " + type + ".run", true );
+			handleQueueMarkDefer( elem, type, "queue" );
+		}
+	}
+});
+
+jQuery.fn.extend({
+	queue: function( type, data ) {
+		var setter = 2;
+
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+			setter--;
+		}
+
+		if ( arguments.length < setter ) {
+			return jQuery.queue( this[0], type );
+		}
+
+		return data === undefined ?
+			this :
+			this.each(function() {
+				var queue = jQuery.queue( this, type, data );
+
+				if ( type === "fx" && queue[0] !== "inprogress" ) {
+					jQuery.dequeue( this, type );
+				}
+			});
+	},
+	dequeue: function( type ) {
+		return this.each(function() {
+			jQuery.dequeue( this, type );
+		});
+	},
+	// Based off of the plugin by Clint Helfers, with permission.
+	// http://blindsignals.com/index.php/2009/07/jquery-delay/
+	delay: function( time, type ) {
+		time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+		type = type || "fx";
+
+		return this.queue( type, function( next, hooks ) {
+			var timeout = setTimeout( next, time );
+			hooks.stop = function() {
+				clearTimeout( timeout );
+			};
+		});
+	},
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	},
+	// Get a promise resolved when queues of a certain type
+	// are emptied (fx is the type by default)
+	promise: function( type, object ) {
+		if ( typeof type !== "string" ) {
+			object = type;
+			type = undefined;
+		}
+		type = type || "fx";
+		var defer = jQuery.Deferred(),
+			elements = this,
+			i = elements.length,
+			count = 1,
+			deferDataKey = type + "defer",
+			queueDataKey = type + "queue",
+			markDataKey = type + "mark",
+			tmp;
+		function resolve() {
+			if ( !( --count ) ) {
+				defer.resolveWith( elements, [ elements ] );
+			}
+		}
+		while( i-- ) {
+			if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+					( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+						jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+					jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
+				count++;
+				tmp.add( resolve );
+			}
+		}
+		resolve();
+		return defer.promise( object );
+	}
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+	rspace = /\s+/,
+	rreturn = /\r/g,
+	rtype = /^(?:button|input)$/i,
+	rfocusable = /^(?:button|input|object|select|textarea)$/i,
+	rclickable = /^a(?:rea)?$/i,
+	rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+	getSetAttribute = jQuery.support.getSetAttribute,
+	nodeHook, boolHook, fixSpecified;
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+	},
+
+	removeAttr: function( name ) {
+		return this.each(function() {
+			jQuery.removeAttr( this, name );
+		});
+	},
+
+	prop: function( name, value ) {
+		return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+	},
+
+	removeProp: function( name ) {
+		name = jQuery.propFix[ name ] || name;
+		return this.each(function() {
+			// try/catch handles cases where IE balks (such as removing a property on window)
+			try {
+				this[ name ] = undefined;
+				delete this[ name ];
+			} catch( e ) {}
+		});
+	},
+
+	addClass: function( value ) {
+		var classNames, i, l, elem,
+			setClass, c, cl;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).addClass( value.call(this, j, this.className) );
+			});
+		}
+
+		if ( value && typeof value === "string" ) {
+			classNames = value.split( rspace );
+
+			for ( i = 0, l = this.length; i < l; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.nodeType === 1 ) {
+					if ( !elem.className && classNames.length === 1 ) {
+						elem.className = value;
+
+					} else {
+						setClass = " " + elem.className + " ";
+
+						for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+							if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+								setClass += classNames[ c ] + " ";
+							}
+						}
+						elem.className = jQuery.trim( setClass );
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		var classNames, i, l, elem, className, c, cl;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).removeClass( value.call(this, j, this.className) );
+			});
+		}
+
+		if ( (value && typeof value === "string") || value === undefined ) {
+			classNames = ( value || "" ).split( rspace );
+
+			for ( i = 0, l = this.length; i < l; i++ ) {
+				elem = this[ i ];
+
+				if ( elem.nodeType === 1 && elem.className ) {
+					if ( value ) {
+						className = (" " + elem.className + " ").replace( rclass, " " );
+						for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+							className = className.replace(" " + classNames[ c ] + " ", " ");
+						}
+						elem.className = jQuery.trim( className );
+
+					} else {
+						elem.className = "";
+					}
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value,
+			isBool = typeof stateVal === "boolean";
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( i ) {
+				jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+			});
+		}
+
+		return this.each(function() {
+			if ( type === "string" ) {
+				// toggle individual class names
+				var className,
+					i = 0,
+					self = jQuery( this ),
+					state = stateVal,
+					classNames = value.split( rspace );
+
+				while ( (className = classNames[ i++ ]) ) {
+					// check each className given, space seperated list
+					state = isBool ? state : !self.hasClass( className );
+					self[ state ? "addClass" : "removeClass" ]( className );
+				}
+
+			} else if ( type === "undefined" || type === "boolean" ) {
+				if ( this.className ) {
+					// store className if set
+					jQuery._data( this, "__className__", this.className );
+				}
+
+				// toggle whole className
+				this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+			}
+		});
+	},
+
+	hasClass: function( selector ) {
+		var className = " " + selector + " ",
+			i = 0,
+			l = this.length;
+		for ( ; i < l; i++ ) {
+			if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		var hooks, ret, isFunction,
+			elem = this[0];
+
+		if ( !arguments.length ) {
+			if ( elem ) {
+				hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+					return ret;
+				}
+
+				ret = elem.value;
+
+				return typeof ret === "string" ?
+					// handle most common string cases
+					ret.replace(rreturn, "") :
+					// handle cases where value is null/undef or number
+					ret == null ? "" : ret;
+			}
+
+			return;
+		}
+
+		isFunction = jQuery.isFunction( value );
+
+		return this.each(function( i ) {
+			var self = jQuery(this), val;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call( this, i, self.val() );
+			} else {
+				val = value;
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray( val ) ) {
+				val = jQuery.map(val, function ( value ) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+			// If set returns undefined, fall back to normal setting
+			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	valHooks: {
+		option: {
+			get: function( elem ) {
+				// attributes.value is undefined in Blackberry 4.7 but
+				// uses .value. See #6932
+				var val = elem.attributes.value;
+				return !val || val.specified ? elem.value : elem.text;
+			}
+		},
+		select: {
+			get: function( elem ) {
+				var value, i, max, option,
+					index = elem.selectedIndex,
+					values = [],
+					options = elem.options,
+					one = elem.type === "select-one";
+
+				// Nothing was selected
+				if ( index < 0 ) {
+					return null;
+				}
+
+				// Loop through all the selected options
+				i = one ? index : 0;
+				max = one ? index + 1 : options.length;
+				for ( ; i < max; i++ ) {
+					option = options[ i ];
+
+					// Don't return options that are disabled or in a disabled optgroup
+					if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+							(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+						// Get the specific value for the option
+						value = jQuery( option ).val();
+
+						// We don't need an array for one selects
+						if ( one ) {
+							return value;
+						}
+
+						// Multi-Selects return an array
+						values.push( value );
+					}
+				}
+
+				// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+				if ( one && !values.length && options.length ) {
+					return jQuery( options[ index ] ).val();
+				}
+
+				return values;
+			},
+
+			set: function( elem, value ) {
+				var values = jQuery.makeArray( value );
+
+				jQuery(elem).find("option").each(function() {
+					this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+				});
+
+				if ( !values.length ) {
+					elem.selectedIndex = -1;
+				}
+				return values;
+			}
+		}
+	},
+
+	attrFn: {
+		val: true,
+		css: true,
+		html: true,
+		text: true,
+		data: true,
+		width: true,
+		height: true,
+		offset: true
+	},
+
+	attr: function( elem, name, value, pass ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set attributes on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		if ( pass && name in jQuery.attrFn ) {
+			return jQuery( elem )[ name ]( value );
+		}
+
+		// Fallback to prop when attributes are not supported
+		if ( typeof elem.getAttribute === "undefined" ) {
+			return jQuery.prop( elem, name, value );
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		// All attributes are lowercase
+		// Grab necessary hook if one is defined
+		if ( notxml ) {
+			name = name.toLowerCase();
+			hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+		}
+
+		if ( value !== undefined ) {
+
+			if ( value === null ) {
+				jQuery.removeAttr( elem, name );
+				return;
+
+			} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				elem.setAttribute( name, "" + value );
+				return value;
+			}
+
+		} else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+			return ret;
+
+		} else {
+
+			ret = elem.getAttribute( name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return ret === null ?
+				undefined :
+				ret;
+		}
+	},
+
+	removeAttr: function( elem, value ) {
+		var propName, attrNames, name, l, isBool,
+			i = 0;
+
+		if ( value && elem.nodeType === 1 ) {
+			attrNames = value.toLowerCase().split( rspace );
+			l = attrNames.length;
+
+			for ( ; i < l; i++ ) {
+				name = attrNames[ i ];
+
+				if ( name ) {
+					propName = jQuery.propFix[ name ] || name;
+					isBool = rboolean.test( name );
+
+					// See #9699 for explanation of this approach (setting first, then removal)
+					// Do not do this for boolean attributes (see #10870)
+					if ( !isBool ) {
+						jQuery.attr( elem, name, "" );
+					}
+					elem.removeAttribute( getSetAttribute ? name : propName );
+
+					// Set corresponding property to false for boolean attributes
+					if ( isBool && propName in elem ) {
+						elem[ propName ] = false;
+					}
+				}
+			}
+		}
+	},
+
+	attrHooks: {
+		type: {
+			set: function( elem, value ) {
+				// We can't allow the type property to be changed (since it causes problems in IE)
+				if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+					jQuery.error( "type property can't be changed" );
+				} else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+					// Setting the type on a radio button after the value resets the value in IE6-9
+					// Reset value to it's default in case type is set after value
+					// This is for element creation
+					var val = elem.value;
+					elem.setAttribute( "type", value );
+					if ( val ) {
+						elem.value = val;
+					}
+					return value;
+				}
+			}
+		},
+		// Use the value property for back compat
+		// Use the nodeHook for button elements in IE6/7 (#1954)
+		value: {
+			get: function( elem, name ) {
+				if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+					return nodeHook.get( elem, name );
+				}
+				return name in elem ?
+					elem.value :
+					null;
+			},
+			set: function( elem, value, name ) {
+				if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+					return nodeHook.set( elem, value, name );
+				}
+				// Does not return so that setAttribute is also used
+				elem.value = value;
+			}
+		}
+	},
+
+	propFix: {
+		tabindex: "tabIndex",
+		readonly: "readOnly",
+		"for": "htmlFor",
+		"class": "className",
+		maxlength: "maxLength",
+		cellspacing: "cellSpacing",
+		cellpadding: "cellPadding",
+		rowspan: "rowSpan",
+		colspan: "colSpan",
+		usemap: "useMap",
+		frameborder: "frameBorder",
+		contenteditable: "contentEditable"
+	},
+
+	prop: function( elem, name, value ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set properties on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		if ( notxml ) {
+			// Fix name and attach hooks
+			name = jQuery.propFix[ name ] || name;
+			hooks = jQuery.propHooks[ name ];
+		}
+
+		if ( value !== undefined ) {
+			if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				return ( elem[ name ] = value );
+			}
+
+		} else {
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+				return ret;
+
+			} else {
+				return elem[ name ];
+			}
+		}
+	},
+
+	propHooks: {
+		tabIndex: {
+			get: function( elem ) {
+				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+				var attributeNode = elem.getAttributeNode("tabindex");
+
+				return attributeNode && attributeNode.specified ?
+					parseInt( attributeNode.value, 10 ) :
+					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+						0 :
+						undefined;
+			}
+		}
+	}
+});
+
+// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
+jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+	get: function( elem, name ) {
+		// Align boolean attributes with corresponding properties
+		// Fall back to attribute presence where some booleans are not supported
+		var attrNode,
+			property = jQuery.prop( elem, name );
+		return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+			name.toLowerCase() :
+			undefined;
+	},
+	set: function( elem, value, name ) {
+		var propName;
+		if ( value === false ) {
+			// Remove boolean attributes when set to false
+			jQuery.removeAttr( elem, name );
+		} else {
+			// value is true since we know at this point it's type boolean and not false
+			// Set boolean attributes to the same name and set the DOM property
+			propName = jQuery.propFix[ name ] || name;
+			if ( propName in elem ) {
+				// Only set the IDL specifically if it already exists on the element
+				elem[ propName ] = true;
+			}
+
+			elem.setAttribute( name, name.toLowerCase() );
+		}
+		return name;
+	}
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+	fixSpecified = {
+		name: true,
+		id: true,
+		coords: true
+	};
+
+	// Use this for any attribute in IE6/7
+	// This fixes almost every IE6/7 issue
+	nodeHook = jQuery.valHooks.button = {
+		get: function( elem, name ) {
+			var ret;
+			ret = elem.getAttributeNode( name );
+			return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
+				ret.nodeValue :
+				undefined;
+		},
+		set: function( elem, value, name ) {
+			// Set the existing or create a new attribute node
+			var ret = elem.getAttributeNode( name );
+			if ( !ret ) {
+				ret = document.createAttribute( name );
+				elem.setAttributeNode( ret );
+			}
+			return ( ret.nodeValue = value + "" );
+		}
+	};
+
+	// Apply the nodeHook to tabindex
+	jQuery.attrHooks.tabindex.set = nodeHook.set;
+
+	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
+	// This is for removals
+	jQuery.each([ "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+			set: function( elem, value ) {
+				if ( value === "" ) {
+					elem.setAttribute( name, "auto" );
+					return value;
+				}
+			}
+		});
+	});
+
+	// Set contenteditable to false on removals(#10429)
+	// Setting to empty string throws an error as an invalid value
+	jQuery.attrHooks.contenteditable = {
+		get: nodeHook.get,
+		set: function( elem, value, name ) {
+			if ( value === "" ) {
+				value = "false";
+			}
+			nodeHook.set( elem, value, name );
+		}
+	};
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+	jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+			get: function( elem ) {
+				var ret = elem.getAttribute( name, 2 );
+				return ret === null ? undefined : ret;
+			}
+		});
+	});
+}
+
+if ( !jQuery.support.style ) {
+	jQuery.attrHooks.style = {
+		get: function( elem ) {
+			// Return undefined in the case of empty string
+			// Normalize to lowercase since IE uppercases css property names
+			return elem.style.cssText.toLowerCase() || undefined;
+		},
+		set: function( elem, value ) {
+			return ( elem.style.cssText = "" + value );
+		}
+	};
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+	jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+		get: function( elem ) {
+			var parent = elem.parentNode;
+
+			if ( parent ) {
+				parent.selectedIndex;
+
+				// Make sure that it also works with optgroups, see #5701
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+			return null;
+		}
+	});
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+	jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+	jQuery.each([ "radio", "checkbox" ], function() {
+		jQuery.valHooks[ this ] = {
+			get: function( elem ) {
+				// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+				return elem.getAttribute("value") === null ? "on" : elem.value;
+			}
+		};
+	});
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+	jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+		set: function( elem, value ) {
+			if ( jQuery.isArray( value ) ) {
+				return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+			}
+		}
+	});
+});
+
+
+
+
+var rformElems = /^(?:textarea|input|select)$/i,
+	rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
+	rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
+	rkeyEvent = /^key/,
+	rmouseEvent = /^(?:mouse|contextmenu)|click/,
+	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+	rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
+	quickParse = function( selector ) {
+		var quick = rquickIs.exec( selector );
+		if ( quick ) {
+			//   0  1    2   3
+			// [ _, tag, id, class ]
+			quick[1] = ( quick[1] || "" ).toLowerCase();
+			quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
+		}
+		return quick;
+	},
+	quickIs = function( elem, m ) {
+		var attrs = elem.attributes || {};
+		return (
+			(!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
+			(!m[2] || (attrs.id || {}).value === m[2]) &&
+			(!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
+		);
+	},
+	hoverHack = function( events ) {
+		return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+	};
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+	add: function( elem, types, handler, data, selector ) {
+
+		var elemData, eventHandle, events,
+			t, tns, type, namespaces, handleObj,
+			handleObjIn, quick, handlers, special;
+
+		// Don't attach events to noData or text/comment nodes (allow plain objects tho)
+		if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+			return;
+		}
+
+		// Caller can pass in an object of custom data in lieu of the handler
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+			selector = handleObjIn.selector;
+		}
+
+		// Make sure that the handler has a unique ID, used to find/remove it later
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure and main handler, if this is the first
+		events = elemData.events;
+		if ( !events ) {
+			elemData.events = events = {};
+		}
+		eventHandle = elemData.handle;
+		if ( !eventHandle ) {
+			elemData.handle = eventHandle = function( e ) {
+				// Discard the second event of a jQuery.event.trigger() and
+				// when an event is called after a page has unloaded
+				return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+			// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+			eventHandle.elem = elem;
+		}
+
+		// Handle multiple events separated by a space
+		// jQuery(...).bind("mouseover mouseout", fn);
+		types = jQuery.trim( hoverHack(types) ).split( " " );
+		for ( t = 0; t < types.length; t++ ) {
+
+			tns = rtypenamespace.exec( types[t] ) || [];
+			type = tns[1];
+			namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+			// If event changes its type, use the special event handlers for the changed type
+			special = jQuery.event.special[ type ] || {};
+
+			// If selector defined, determine special event api type, otherwise given type
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+
+			// Update special based on newly reset type
+			special = jQuery.event.special[ type ] || {};
+
+			// handleObj is passed to all event handlers
+			handleObj = jQuery.extend({
+				type: type,
+				origType: tns[1],
+				data: data,
+				handler: handler,
+				guid: handler.guid,
+				selector: selector,
+				quick: selector && quickParse( selector ),
+				namespace: namespaces.join(".")
+			}, handleObjIn );
+
+			// Init the event handler queue if we're the first
+			handlers = events[ type ];
+			if ( !handlers ) {
+				handlers = events[ type ] = [];
+				handlers.delegateCount = 0;
+
+				// Only use addEventListener/attachEvent if the special events handler returns false
+				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add to the element's handler list, delegates in front
+			if ( selector ) {
+				handlers.splice( handlers.delegateCount++, 0, handleObj );
+			} else {
+				handlers.push( handleObj );
+			}
+
+			// Keep track of which events have ever been used, for event optimization
+			jQuery.event.global[ type ] = true;
+		}
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	global: {},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, selector, mappedTypes ) {
+
+		var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+			t, tns, type, origType, namespaces, origCount,
+			j, events, special, handle, eventType, handleObj;
+
+		if ( !elemData || !(events = elemData.events) ) {
+			return;
+		}
+
+		// Once for each type.namespace in types; type may be omitted
+		types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+		for ( t = 0; t < types.length; t++ ) {
+			tns = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tns[1];
+			namespaces = tns[2];
+
+			// Unbind all events (on this namespace, if provided) for the element
+			if ( !type ) {
+				for ( type in events ) {
+					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+				}
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+			type = ( selector? special.delegateType : special.bindType ) || type;
+			eventType = events[ type ] || [];
+			origCount = eventType.length;
+			namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+
+			// Remove matching events
+			for ( j = 0; j < eventType.length; j++ ) {
+				handleObj = eventType[ j ];
+
+				if ( ( mappedTypes || origType === handleObj.origType ) &&
+					 ( !handler || handler.guid === handleObj.guid ) &&
+					 ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+					 ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+					eventType.splice( j--, 1 );
+
+					if ( handleObj.selector ) {
+						eventType.delegateCount--;
+					}
+					if ( special.remove ) {
+						special.remove.call( elem, handleObj );
+					}
+				}
+			}
+
+			// Remove generic event handler if we removed something and no more handlers exist
+			// (avoids potential for endless recursion during removal of special event handlers)
+			if ( eventType.length === 0 && origCount !== eventType.length ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			handle = elemData.handle;
+			if ( handle ) {
+				handle.elem = null;
+			}
+
+			// removeData also checks for emptiness and clears the expando if empty
+			// so use it instead of delete
+			jQuery.removeData( elem, [ "events", "handle" ], true );
+		}
+	},
+
+	// Events that are safe to short-circuit if no handlers are attached.
+	// Native DOM events should not be added, they may have inline handlers.
+	customEvent: {
+		"getData": true,
+		"setData": true,
+		"changeData": true
+	},
+
+	trigger: function( event, data, elem, onlyHandlers ) {
+		// Don't do events on text and comment nodes
+		if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+			return;
+		}
+
+		// Event object or event type
+		var type = event.type || event,
+			namespaces = [],
+			cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
+
+		// focus/blur morphs to focusin/out; ensure we're not firing them right now
+		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+			return;
+		}
+
+		if ( type.indexOf( "!" ) >= 0 ) {
+			// Exclusive events trigger only for the exact event (no namespaces)
+			type = type.slice(0, -1);
+			exclusive = true;
+		}
+
+		if ( type.indexOf( "." ) >= 0 ) {
+			// Namespaced trigger; create a regexp to match event type in handle()
+			namespaces = type.split(".");
+			type = namespaces.shift();
+			namespaces.sort();
+		}
+
+		if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+			// No jQuery handlers for this event type, and it can't have inline handlers
+			return;
+		}
+
+		// Caller can pass in an Event, Object, or just an event type string
+		event = typeof event === "object" ?
+			// jQuery.Event object
+			event[ jQuery.expando ] ? event :
+			// Object literal
+			new jQuery.Event( type, event ) :
+			// Just the event type (string)
+			new jQuery.Event( type );
+
+		event.type = type;
+		event.isTrigger = true;
+		event.exclusive = exclusive;
+		event.namespace = namespaces.join( "." );
+		event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+		ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+		// Handle a global trigger
+		if ( !elem ) {
+
+			// TODO: Stop taunting the data cache; remove global events and always attach to document
+			cache = jQuery.cache;
+			for ( i in cache ) {
+				if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+					jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+				}
+			}
+			return;
+		}
+
+		// Clean u

<TRUNCATED>


[05/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/common.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/common.js b/pulse/src/main/webapp/scripts/pulsescript/common.js
new file mode 100644
index 0000000..b9e6f15
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/common.js
@@ -0,0 +1,1615 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+// CONSTANTS
+var CONST_BACKEND_PRODUCT_GEMFIRE = "gemfire";
+var CONST_BACKEND_PRODUCT_SQLFIRE = "gemfirexd";  // "sqlfire";
+
+var host = '';
+var port = '';
+var memberId = '';
+var memberName = '';
+var regionFullPath = '';
+var clusteRGraph;
+var loadMore = false;
+var productname = 'gemfire';
+var currentSelectedAlertId = null;
+var colorCodeForRegions = "#8c9aab"; // Default color for regions
+var colorCodeForSelectedRegion = "#87b025";
+var colorCodeForZeroEntryCountRegions = "#848789";
+
+// Global reference for PulseFunctions
+var pf = new PulseFunctions();
+
+var infoAlerts = new Array();
+var severAlerts = new Array();
+var errorAlerts = new Array();
+var warningAlerts = new Array();
+var expanededNodIds = [];
+var functionStartArray = [];
+
+// global vars - for alerts
+var numTotalInfoAlerts = 0;
+var numTotalSeverAlerts = 0;
+var numTotalErrorAlerts = 0;
+var numTotalWarningAlerts = 0;
+
+var vMode = document.documentMode;
+
+function changeLocale(language, pagename) {
+  var locale_language = language;
+
+  // This will initialize the plugin
+  // and show two dialog boxes: one with the text "hello"
+  // and other with the text "Good morning John!"
+  jQuery.i18n.properties({
+    name : pagename,
+    path : 'properties/',
+    mode : 'both',
+    language : locale_language,
+    callback : function() {
+      $('#I18NTEXT').html(msg_welcome);
+    }
+  });
+}
+
+function customizeUI() {
+
+  productname = getCookie("productname");
+
+  // common call back function for default and selected languages
+  var propertiesFileLoadedCallBackFunction = function() {
+    // $.holdReady(false);
+    $("[data-prod-custom$='custom']").each(function() {
+      var grabValue = $(this).attr('data-prod-custom');
+      var customDisplayValue = jQuery.i18n.prop(grabValue);
+      if ($(this).is("div")) {
+        $(this).html(customDisplayValue);
+      } else if ($(this).is("img")) {
+        $(this).attr('src', customDisplayValue);
+      } else if ($(this).is("a")) {
+        $(this).attr('href', customDisplayValue);
+      } else if ($(this).is("span")) {
+        $(this).html(customDisplayValue);
+      }
+    });
+
+  };
+
+  // TODO : retrieve locale from VM and use it later i.e. returned from server
+  var locale_language = 'en';
+  jQuery.i18n.properties({
+    name : [ productname, 'default' ],
+    path : 'properties/',
+    mode : 'map',
+    cache : true,
+    language : locale_language,
+    callback : propertiesFileLoadedCallBackFunction
+  });
+}
+
+// function used for getting list of cookies
+function getCookie(c_name) {
+  var i, x, y, ARRcookies = document.cookie.split(";");
+  for (i = 0; i < ARRcookies.length; i++) {
+    x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
+    y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
+    x = x.replace(/^\s+|\s+$/g, "");
+    if (x == c_name) {
+      return unescape(y);
+    }
+  }
+}
+
+// function used for setting cookies
+function setCookie(c_name, value, exdays) {
+  var exdate = new Date();
+  exdate.setDate(exdate.getDate() + exdays);
+  var c_value = escape(value)
+      + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
+  document.cookie = c_name + "=" + c_value;
+}
+
+// function used for getting parameter from the url in js file
+function GetParam(name) {
+  var start = location.search.indexOf("?" + name + "=");
+  if (start < 0)
+    start = location.search.indexOf("&" + name + "=");
+  if (start < 0)
+    return '';
+  start += name.length + 2;
+  var end = location.search.indexOf("&", start) - 1;
+  if (end < 0)
+    end = location.search.length;
+  var result = '';
+  for ( var i = start; i <= end; i++) {
+    var c = location.search.charAt(i);
+    result = result + (c == '+' ? ' ' : c);
+  }
+  return unescape(result);
+}
+
+// function repsonseErrorHandler handles response errors
+// It check if its a HTTP Unauthorized access and redirect to Login Page
+function repsonseErrorHandler(data) {
+  // Check for unauthorized access
+  if (data.status == 401) {
+    // redirect user on Login Page
+    window.location.href = "Login.html?error=HTTP Error 401 : Unauthorized Access..";
+  }
+};
+
+// Function for removing/clearing all the three types of alerts
+function clearAlerts(alertType, flagClearAll) {
+
+  // Hide alert details pop up if displayed
+  $("#tooltip").hide();
+
+  // update global vars - for alerts
+  var requestData = {
+    // "alertType" : -1,
+    "clearAll" : flagClearAll
+  };
+
+  if ("severe" == alertType.toLowerCase()) { // Severe
+    requestData.alertType = 0;
+  } else if ("error" == alertType.toLowerCase()) { // Error
+    requestData.alertType = 1;
+  } else if ("warning" == alertType.toLowerCase()) { // Warning
+    requestData.alertType = 2;
+  } else { // All
+    requestData.alertType = -1;
+  }
+
+  $.getJSON("pulse/clearAlerts", requestData, function(data) {
+
+    // call system alerts callback handler
+    getSystemAlertsBack(data);
+
+    if (window.location.pathname.toLowerCase().indexOf('clusterdetail.html') != -1) {
+      var objForceUpdateForWidgets = {
+        "ClusterDetails" : {},
+        "ClusterMembers" : {},
+        "ClusterMembersRGraph" : {},
+        "ClusterKeyStatistics" : {},
+        "ClusterJVMPauses" : {},
+        "ClusterWANInfo" : {},
+        "ClusterMemoryUsage" : {},
+        "ClusterDiskThroughput" : {}
+      };
+      // Call forced pulse update function
+      forcePulseDataUpdate(objForceUpdateForWidgets);
+    } else if (window.location.pathname.toLowerCase().indexOf('memberdetails.html') != -1) {
+      var objForceUpdateForWidgets = {
+        "MemberDetails" : {
+          "memberId" : memberId,
+          "memberName" : memberName
+        }
+      };
+      // Call forced pulse update function
+      forcePulseDataUpdate(objForceUpdateForWidgets);
+    }
+  }).error(repsonseErrorHandler);
+
+  $("#allAlertScrollPane").addClass("hide-scroll-pane");
+}
+
+// function used to change the cluster status according to
+// member notification alerts
+function displayClusterStatus() {
+  memberDetailsRefreshFlag = 0;
+  if (!(document.getElementById("clusterStatusIcon") == null)) {
+    if (numTotalSeverAlerts > 0) { // Severe
+      $('#clusterStatusText').html("Severe");
+      $("#clusterStatusIcon").addClass("severeStatus");
+      if ($("#clusterStatusIcon").hasClass("errorStatus"))
+        $("#clusterStatusIcon").removeClass("errorStatus");
+      if ($("#clusterStatusIcon").hasClass("warningStatus"))
+        $("#clusterStatusIcon").removeClass("warningStatus");
+      if ($("#clusterStatusIcon").hasClass("normalStatus"))
+        $("#clusterStatusIcon").removeClass("normalStatus");
+
+    } else if (numTotalErrorAlerts > 0) { // Error
+      $('#clusterStatusText').html("Error");
+      $("#clusterStatusIcon").addClass("errorStatus");
+      if ($("#clusterStatusIcon").hasClass("severeStatus"))
+        $("#clusterStatusIcon").removeClass("severeStatus");
+      if ($("#clusterStatusIcon").hasClass("warningStatus"))
+        $("#clusterStatusIcon").removeClass("warningStatus");
+      if ($("#clusterStatusIcon").hasClass("normalStatus"))
+        $("#clusterStatusIcon").removeClass("normalStatus");
+    } else if (numTotalWarningAlerts > 0) { // Warning
+      $('#clusterStatusText').html("Warning");
+      $("#clusterStatusIcon").addClass("warningStatus");
+      if ($("#clusterStatusIcon").hasClass("severeStatus"))
+        $("#clusterStatusIcon").removeClass("severeStatus");
+      if ($("#clusterStatusIcon").hasClass("errorStatus"))
+        $("#clusterStatusIcon").removeClass("errorStatus");
+      if ($("#clusterStatusIcon").hasClass("normalStatus"))
+        $("#clusterStatusIcon").removeClass("normalStatus");
+    } else { // Normal
+      $('#clusterStatusText').html("Normal");
+      $("#clusterStatusIcon").addClass("normalStatus");
+      if ($("#clusterStatusIcon").hasClass("severeStatus"))
+        $("#clusterStatusIcon").removeClass("severeStatus");
+      if ($("#clusterStatusIcon").hasClass("errorStatus"))
+        $("#clusterStatusIcon").removeClass("errorStatus");
+      if ($("#clusterStatusIcon").hasClass("warningStatus"))
+        $("#clusterStatusIcon").removeClass("warningStatus");
+    }
+
+    // updating r graph
+    if (flagActiveTab == "MEM_R_GRAPH_DEF") {
+      var postData = new Object();
+      var qp = new Object();
+      postData["ClusterMembersRGraph"] = qp;
+      var data = {
+        "pulseData" : this.toJSONObj(postData)
+      };
+      $.post("pulse/pulseUpdate", data, function(data) {
+        updateRGraphFlags();
+        clusteRGraph.loadJSON(data.clustor);
+        clusteRGraph.compute('end');
+        if (vMode != 8)
+          refreshNodeAccAlerts();
+        clusteRGraph.refresh();
+      }).error(repsonseErrorHandler);
+    }
+    // updating tree map
+    if (flagActiveTab == "MEM_TREE_MAP_DEF") {
+      var postData = new Object();
+      var qp = new Object();
+      postData["ClusterMembers"] = qp;
+      var data = {
+        "pulseData" : this.toJSONObj(postData)
+      };
+
+      $.post("pulse/pulseUpdate", data, function(data) {
+        var members = data.members;
+        memberCount = members.length;
+        var childerensVal = [];
+
+        for ( var i = 0; i < members.length; i++) {
+          var color = "#a0c44a";
+          for ( var j = 0; j < warningAlerts.length; j++) {
+            if (members[i].name == warningAlerts[j].memberName) {
+              color = '#ebbf0f';
+              break;
+            }
+          }
+          for ( var j = 0; j < errorAlerts.length; j++) {
+            if (members[i].name == errorAlerts[j].memberName) {
+              color = '#de5a25';
+              break;
+            }
+          }
+          for ( var j = 0; j < severAlerts.length; j++) {
+            if (members[i].name == severAlerts[j].memberName) {
+              color = '#b82811';
+              break;
+            }
+          }
+          var heapSize = members[i].currentHeapUsage;
+          if (heapSize == 0)
+            heapSize = 1;
+          var name = "";
+          name = members[i].name;
+          var id = "";
+          id = members[i].memberId;
+          var dataVal = {
+            "name" : name,
+            "id" : id,
+            "$color" : color,
+            "$area" : heapSize,
+            "cpuUsage" : members[i].cpuUsage,
+            "heapUsage" : members[i].currentHeapUsage,
+            "loadAvg" : members[i].loadAvg,
+            "threads" : members[i].threads,
+            "sockets" : members[i].sockets,
+            "initial" : false
+          };
+          var childrenVal = {
+            "children" : [],
+            "data" : dataVal,
+            "id" : id,
+            "name" : name
+          };
+          childerensVal[i] = childrenVal;
+        }
+        var json = {
+          "children" : childerensVal,
+          "data" : {},
+          "id" : "root",
+          "name" : "Members"
+        };
+        clusterMemberTreeMap.loadJSON(json);
+        clusterMemberTreeMap.refresh();
+      }).error(repsonseErrorHandler);
+    }
+  }
+}
+
+/*
+ * Function to extract filtering criteria/text from html elemnt. 
+ * It removes extra leading and trailing white spaces and converts the 
+ * criteria/text into lower case version. 
+ *    
+ */
+function extractFilterTextFrom(elementId){
+  var filterText = $('#'+elementId).val();
+  // Remove leading and trailing space 
+  filterText = $.trim(filterText);
+  // Convert it to lowercase
+  filterText = filterText.toLowerCase();
+  
+  if("search" == filterText){
+    filterText = "";
+  }
+  
+  return filterText;
+}
+
+
+/*
+ * Function which applys filter on alerts list based on the filter criteria 
+ * and generates html for list of alerts satisfying criteria
+ */
+function applyFilterOnNotificationsList(alertsType){
+  
+  var filteredNotifications = new Object();
+  
+  if('severe' == alertsType.toLowerCase()){
+    var filterText = extractFilterTextFrom('filterSevereNotificationsListBox');
+    var filteredSevereAlertsList = new Array();
+    for(var cntr=0; cntr < severAlerts.length; cntr++){
+      if(severAlerts[cntr].description.toLowerCase().indexOf(filterText) > -1
+          || severAlerts[cntr].memberName.toLowerCase().indexOf(filterText) > -1){
+        filteredSevereAlertsList.push(severAlerts[cntr]);
+      }
+    }
+    filteredNotifications.info = infoAlerts;
+    filteredNotifications.severe = filteredSevereAlertsList;
+    filteredNotifications.errors = errorAlerts;
+    filteredNotifications.warnings = warningAlerts;    
+  }else if('error' == alertsType.toLowerCase()){
+    var filterText = extractFilterTextFrom('filterErrorNotificationsListBox');
+    var filteredErrorAlertsList = new Array();
+    for(var cntr=0; cntr < errorAlerts.length; cntr++){
+      if(errorAlerts[cntr].description.toLowerCase().indexOf(filterText) > -1
+          || errorAlerts[cntr].memberName.toLowerCase().indexOf(filterText) > -1){
+        filteredErrorAlertsList.push(errorAlerts[cntr]);
+      }
+    }
+    filteredNotifications.info = infoAlerts;
+    filteredNotifications.severe = severAlerts;
+    filteredNotifications.errors = filteredErrorAlertsList;
+    filteredNotifications.warnings = warningAlerts;
+  }else if('warning' == alertsType.toLowerCase()){
+    var filterText = extractFilterTextFrom('filterWarningNotificationsListBox');
+    var filteredWarningAlertsList = new Array();
+    for(var cntr=0; cntr < warningAlerts.length; cntr++){
+      if(warningAlerts[cntr].description.toLowerCase().indexOf(filterText) > -1
+          || warningAlerts[cntr].memberName.toLowerCase().indexOf(filterText) > -1){
+        filteredWarningAlertsList.push(warningAlerts[cntr]);
+      }
+    }
+    filteredNotifications.info = infoAlerts;
+    filteredNotifications.severe = severAlerts;
+    filteredNotifications.errors = errorAlerts;
+    filteredNotifications.warnings = filteredWarningAlertsList;
+  }else{ // all alerts
+    var filterText = extractFilterTextFrom('filterAllNotificationsListBox');
+    var filteredSevereAlertsList = new Array();
+    var filteredErrorAlertsList = new Array();
+    var filteredWarningAlertsList = new Array();
+    var filteredInfoAlertsList = new Array();
+    for(var cntr=0; cntr < infoAlerts.length; cntr++){
+      if(infoAlerts[cntr].description.toLowerCase().indexOf(filterText) > -1
+          || infoAlerts[cntr].memberName.toLowerCase().indexOf(filterText) > -1){
+        filteredInfoAlertsList.push(infoAlerts[cntr]);
+      }
+    }
+    for(var cntr=0; cntr < severAlerts.length; cntr++){
+      if(severAlerts[cntr].description.toLowerCase().indexOf(filterText) > -1
+          || severAlerts[cntr].memberName.toLowerCase().indexOf(filterText) > -1){
+        filteredSevereAlertsList.push(severAlerts[cntr]);
+      }
+    }
+    for(var cntr=0; cntr < errorAlerts.length; cntr++){
+      if(errorAlerts[cntr].description.toLowerCase().indexOf(filterText) > -1
+          || errorAlerts[cntr].memberName.toLowerCase().indexOf(filterText) > -1){
+        filteredErrorAlertsList.push(errorAlerts[cntr]);
+      }
+    }
+    for(var cntr=0; cntr < warningAlerts.length; cntr++){
+      if(warningAlerts[cntr].description.toLowerCase().indexOf(filterText) > -1
+          || warningAlerts[cntr].memberName.toLowerCase().indexOf(filterText) > -1){
+        filteredWarningAlertsList.push(warningAlerts[cntr]);
+      }
+    }
+    filteredNotifications.info = filteredInfoAlertsList;
+    filteredNotifications.severe = filteredSevereAlertsList;
+    filteredNotifications.errors = filteredErrorAlertsList;
+    filteredNotifications.warnings = filteredWarningAlertsList;
+  }
+  
+  var recordCount = parseInt($('#pageNumber').val()) * 100;
+  generateHTMLForNotificationsList(filteredNotifications, recordCount);
+}
+
+/*
+ * Function which generates html for list of notification alerts
+ */
+function generateHTMLForNotificationsList(notificationList, recordCount){
+
+  var errorAlertsList = notificationList.errors;
+  var severeAlertsList = notificationList.severe;
+  var warningAlertsList = notificationList.warnings;
+  var infoAlertsList = notificationList.info;
+
+  var allListHTML = "";
+  var allCount = 1;
+
+  if ($("#allAlertScrollPane").hasClass("hide-scroll-pane"))
+    $("#allAlertScrollPane").removeClass("hide-scroll-pane");
+
+  if (severeAlertsList != null && severeAlertsList != undefined) {
+
+    if ($("#severeAlertScrollPane").hasClass("hide-scroll-pane"))
+      $("#severeAlertScrollPane").removeClass("hide-scroll-pane");
+    document.getElementById("severeTotalCount").innerHTML = severeAlertsList.length
+        .toString();
+    // update global count
+    numTotalSeverAlerts = severeAlertsList.length;
+    var severeListHTML = "";
+    var severeCount = 1;
+
+    for ( var i = numTotalSeverAlerts - 1; i >= 0; i--) {
+      if (severeCount <= recordCount) {
+        severeListHTML = severeListHTML
+            + generateNotificationAlerts(severeAlertsList[i], "severe");
+        severeCount++;
+        //severAlerts[severAlerts.length] = severeAlertsList[i];
+      }
+      if (allCount <= recordCount) {
+        allCount++;
+        allListHTML = severeListHTML;
+      }
+    }
+    document.getElementById("severeList").innerHTML = severeListHTML;
+
+  } else {
+    numTotalSeverAlerts = 0;
+    document.getElementById("severeTotalCount").innerHTML = numTotalSeverAlerts;
+  }
+
+  if (errorAlertsList != null && errorAlertsList != undefined) {
+
+    if ($("#errorAlertScrollPane").hasClass("hide-scroll-pane"))
+      $("#errorAlertScrollPane").removeClass("hide-scroll-pane");
+    document.getElementById("errorTotalCount").innerHTML = errorAlertsList.length;
+    // update global count
+    numTotalErrorAlerts = errorAlertsList.length;
+    var errorListHTML = "";
+    var errorCount = 1;
+    for ( var i = numTotalErrorAlerts - 1; i >= 0; i--) {
+      if (errorCount <= recordCount) {
+        errorListHTML = errorListHTML
+            + generateNotificationAlerts(errorAlertsList[i], "error");
+        //errorAlerts[errorAlerts.length] = errorAlertsList[i];
+        errorCount++;
+      }
+      if (allCount <= recordCount) {
+        allCount++;
+        allListHTML = allListHTML
+            + generateNotificationAlerts(errorAlertsList[i], "error");
+      }
+
+    }
+    document.getElementById("errorList").innerHTML = errorListHTML;
+
+  } else {
+    numTotalErrorAlerts = 0;
+    document.getElementById("errorTotalCount").innerHTML = numTotalErrorAlerts;
+  }
+
+  if (warningAlertsList != null && warningAlertsList != undefined) {
+
+    if ($("#warningAlertScrollPane").hasClass("hide-scroll-pane"))
+      $("#warningAlertScrollPane").removeClass("hide-scroll-pane");
+    document.getElementById("warningTotalCount").innerHTML = warningAlertsList.length;
+    // update global count
+    numTotalWarningAlerts = warningAlertsList.length;
+    var warningListHTML = "";
+    var warningCount = 1;
+    for ( var i = numTotalWarningAlerts - 1; i >= 0; i--) {
+      if (warningCount <= recordCount) {
+        warningListHTML = warningListHTML
+            + generateNotificationAlerts(warningAlertsList[i], "warning");
+        //warningAlerts[warningAlerts.length] = warningAlertsList[i];
+        warningCount++;
+      }
+      if (allCount <= recordCount) {
+        allCount++;
+        allListHTML = allListHTML
+            + generateNotificationAlerts(warningAlertsList[i], "warning");
+      }
+    }
+    document.getElementById("warningList").innerHTML = warningListHTML;
+
+  } else {
+    numTotalWarningAlerts = 0;
+    document.getElementById("warningTotalCount").innerHTML = numTotalWarningAlerts;
+  }
+
+  if (infoAlertsList != null && infoAlertsList != undefined) {
+
+    // update global count
+    numTotalInfoAlerts = infoAlertsList.length;
+    var infoCount = 1;
+    for ( var i = numTotalInfoAlerts - 1; i >= 0; i--) {
+      if (infoCount <= recordCount) {
+        infoCount++;
+      }
+      if (allCount <= recordCount) {
+        allCount++;
+        allListHTML = allListHTML
+            + generateNotificationAlerts(infoAlertsList[i], "info");
+      }
+    }
+  } else {
+    numTotalInfoAlerts = 0;
+  }
+
+  // Show/hide alert count on top ribbon
+  displayAlertCounts();
+
+  // start : for all alerts tab
+  var allAlertCount = numTotalSeverAlerts + numTotalErrorAlerts
+      + numTotalWarningAlerts + numTotalInfoAlerts;
+  document.getElementById("allAlertCount").innerHTML = allAlertCount.toString();
+  // Display Load More only when number of alerts > 100
+  if (allAlertCount > 100) {
+    $('#containerLoadMoreAlertsLink').show();
+  } else {
+    $('#containerLoadMoreAlertsLink').hide();
+  }
+
+  /*var allAlertHTML = "";
+
+  allAlertHTML = allAlertHTML + document.getElementById("severeList").innerHTML;
+
+  allAlertHTML = allAlertHTML + document.getElementById("errorList").innerHTML;
+
+  allAlertHTML = allAlertHTML + document.getElementById("warningList").innerHTML;*/
+
+  document.getElementById("allAlertList").innerHTML = allListHTML;
+
+  // end : for all alerts tab
+
+  if (severAlerts.length > 0) { // Severe
+    if ($("#allAlertScrollPane").hasClass("hide-scroll-pane"))
+      $("#allAlertScrollPane").removeClass("hide-scroll-pane");
+    $('#clusterStatusText').html("Severe");
+    $("#clusterStatusIcon").addClass("severeStatus");
+  } else if (errorAlerts.length > 0) { // Error
+    if ($("#allAlertScrollPane").hasClass("hide-scroll-pane"))
+      $("#allAlertScrollPane").removeClass("hide-scroll-pane");
+    $('#clusterStatusText').html("Error");
+    $("#clusterStatusIcon").addClass("errorStatus");
+  } else if (warningAlerts.length > 0) { // Warning
+    if ($("#allAlertScrollPane").hasClass("hide-scroll-pane"))
+      $("#allAlertScrollPane").removeClass("hide-scroll-pane");
+    $('#clusterStatusText').html("Warning");
+    $("#clusterStatusIcon").addClass("warningStatus");
+  } else { // Normal
+    $('#clusterStatusText').html("Normal");
+    $("#clusterStatusIcon").addClass("normalStatus");
+  }
+  $('.scroll-pane').jScrollPane();
+
+  // tooltip
+  $("#allAlertScrollPane .jspPane").scroll(function() {
+
+  });
+  
+  // $(".tip_trigger").moveIntoView();
+  $(".tip_trigger").each(function() {
+    $(this).hover(function() {
+      var tooltip = $(this).find('.tooltip');
+
+      tooltip.show(100); // Show tooltip
+      var p = $(this);
+      var offset = p.offset();
+
+      var t = offset.top - $(window).scrollTop();
+      // var l = position.left;
+      $(tooltip).css("top", t);
+      $(tooltip).find('.tooltipcontent').css("height", 100);
+      $(tooltip).find('.tooltipcontent').jScrollPane();
+      // setTimeout($(this).show(), 500);
+    }, function() {
+      var tooltip = $(this).find('.tooltip');
+      tooltip.hide(); // Hide tooltip
+
+    });
+  });
+}
+/*
+ * Function show or hide alerts counts on notification ribbon
+ */
+function displayAlertCounts(){
+
+  if(severAlerts.length == 0){
+    $('#severeTotalCount').hide();
+  }else{
+    $('#severeTotalCount').show();
+  }
+  
+  if(errorAlerts.length == 0){
+    $('#errorTotalCount').hide();
+  }else{
+    $('#errorTotalCount').show();
+  }
+  
+  if(warningAlerts.length == 0){
+    $('#warningTotalCount').hide();
+  }else{
+    $('#warningTotalCount').show();
+  }
+  
+  if(severAlerts.length == 0
+      && errorAlerts.length == 0
+      && warningAlerts.length == 0
+      && infoAlerts.length == 0){
+    $('#allAlertCount').hide();
+  }else{
+    $('#allAlertCount').show();
+  }
+
+}
+
+// function used for generating alerts html div
+function generateNotificationAlerts(alertsList, type) {
+  var alertDiv = "";
+
+  alertDiv = "<div id='tip_trigger_" + alertsList.id + "' class='tip_trigger";
+  
+  // if alert is selected, highlight entry 
+  if(currentSelectedAlertId!= null && currentSelectedAlertId == alertsList.id){
+    alertDiv = alertDiv + " active";
+  }
+  
+  alertDiv = alertDiv + "' onclick='showNotificationPopup(event, this, \""
+      + type + "\", " + alertsList.id + ")'>";
+
+  alertDiv = alertDiv + "<div class='tabMessageMasterBlock'>";
+  alertDiv = alertDiv + "<div class='";
+
+  if (type == "severe") {
+    alertDiv = alertDiv + " tabSevere ";
+  } else if (type == "error") {
+    alertDiv = alertDiv + " tabError ";
+  } else if (type == "warning") {
+    alertDiv = alertDiv + " tabWarning ";
+  } else {
+    alertDiv = alertDiv + " tabInfo ";
+  }
+
+  if (alertsList.isAcknowledged) {
+    alertDiv = alertDiv + " tabMessageHeadingAckBlock ";
+  } else {
+    alertDiv = alertDiv + " tabMessageHeadingBlock ";
+  }
+
+  alertDiv = alertDiv + " defaultCursor' id='alertTitle_" + alertsList.id
+      + "'>" + alertsList.memberName + "</div>" + "<p id='alertShortMsg_"
+      + alertsList.id + "' class='tabMessageDetailsBlock ";
+
+  if (alertsList.isAcknowledged) {
+    alertDiv = alertDiv + " graytickmark ";
+  } else {
+    alertDiv = alertDiv + " notickmark ";
+  }
+
+  var alertDescription = alertsList.description;
+  if(alertDescription.length <= 38){
+    alertDiv = alertDiv + " '>" + alertDescription + "</p>";
+  }else{
+    alertDiv = alertDiv + " '>" + alertDescription.substring(0,36) + "..</p>";
+  }
+
+  alertDiv = alertDiv + "<div class='tabMessageDateBlock'>" 
+      + jQuery.timeago(alertsList.iso8601Ts) + "</div>"
+      + "</div>";
+
+  alertDiv = alertDiv + "</div>";
+
+  return alertDiv;
+}
+
+/*
+ * Function to generate html for Notification panel 
+ */
+function generateNotificationsPanel(){
+  var notificationPanelHtml = "";
+
+  // Notification tabs top ribbon
+  notificationPanelHtml += 
+      "<div class=\"TabTopPanelInnerBlock\">" 
+    + "<a id=\"btnTopTab_All\" class=\"position-relative TopTabLink "
+    + "TopTabLinkActive\" onClick=\"tabAll();toggleTab('TopTab_All');\" >" 
+    + "<span class=\"tabAll\"  >All</span>"
+    + "<span class=\"textbold postical-absolute notification\" id=\"allAlertCount\">0</span>"
+    + "</a>"
+    + "<a id=\"btnTopTab_Severe\" class=\"position-relative TopTabLink\" "
+    + "onClick=\"tabSevere();toggleTab('TopTab_Severe');\" >"
+    + "<span class=\"tabSevere\">&nbsp;</span>"
+    + "<span class=\"textbold postical-absolute notification\" id=\"severeTotalCount\">0</span>"
+    + "</a>"
+    + "<a id=\"btnTopTab_Error\" class=\"position-relative TopTabLink\" "
+    + "onClick=\"tabError();toggleTab('TopTab_Error');\" >"
+    + "<span class=\"tabError\"  >&nbsp;</span>"
+    + "<span class=\"textbold postical-absolute notification\" id=\"errorTotalCount\">0</span>"
+    + "</a>"
+    + "<a id=\"btnTopTab_Warning\" class=\"position-relative TopTabLink\" "
+    + "onClick=\"tabWarning();toggleTab('TopTab_Warning');\" >"
+    + "<span class=\"tabWarning\"  >&nbsp;</span>"
+    + "<span class=\"textbold postical-absolute notification\" id=\"warningTotalCount\">0</span>"
+    + "</a>"
+    + "</div>";
+
+  // Tab 1 - All
+  notificationPanelHtml += 
+      "<div class=\"postical-absolute display-block topTabBlock\" id=\"TopTab_All\">"
+    + "<!-- Search-->"
+    + "<div class=\"left marginL10 marginTop6\">"
+    + "<div class=\"searchBlockMaster\">"
+    + "<input type=\"button\" class=\"searchButton\">"
+    + "<input type=\"text\" placeholder=\"Search\" class=\"searchBox\" "
+    + "onkeyup=\"applyFilterOnNotificationsList('all');\" id=\"filterAllNotificationsListBox\">"
+    + "</div>"
+    + "</div>"
+    + "<!-- Clear Button-->"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('all', true)\">Clear All</a>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('all', false)\">Clear</a>"
+    + "</div>"
+    + "<div class=\"scroll-pane\" id=\"allAlertScrollPane\" >"
+    + "<div id=\"allAlertList\"></div>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('all', true)\">Clear All</a>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('all', false)\">Clear</a>"
+    + "</div>"
+    + "<div class=\"loadMoreButton\" id=\"containerLoadMoreAlertsLink\">"
+    + "<a href=\"#\" class=\"left linkButton\" onclick=\"loadMoreAlerts()\">Load More</a>"
+    + "</div>"
+    + "<input type=\"hidden\" name=\"pageNumber\" id=\"pageNumber\" value=\"1\" />"
+    + "</div>";
+
+  // Tab 2 - Severe
+  notificationPanelHtml +=
+      "<div class=\"postical-absolute display-none topTabBlock\" id=\"TopTab_Severe\">" 
+    + "<!-- Search-->"
+    + "<div class=\"left marginL10 marginTop6\">"
+    + "<div class=\"searchBlockMaster\">"
+    + "<input type=\"button\" class=\"searchButton\">"
+    + "<input type=\"text\" placeholder=\"Search\" class=\"searchBox\" "
+    + "onkeyup=\"applyFilterOnNotificationsList('severe');\" id=\"filterSevereNotificationsListBox\">"
+    + "</div>"
+    + "</div>"
+    + "<!-- Clear Button-->"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('severe', true)\">Clear All</a>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('severe', false)\">Clear</a>"
+    + "</div>"
+    + "<div class=\"scroll-pane\" id=\"severeAlertScrollPane\">"
+    + "<div id=\"severeList\"></div>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('severe', true)\">Clear All</a>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('severe', false)\">Clear</a>"
+    + "</div>"
+    + "</div>";
+
+  // Tab 3 - Error
+  notificationPanelHtml +=
+      "<div class=\"postical-absolute display-none topTabBlock\" id=\"TopTab_Error\" >" 
+    + "<!-- Search-->"
+    + "<div class=\"left marginL10 marginTop6\">"
+    + "<div class=\"searchBlockMaster\">"
+    + "<input type=\"button\" class=\"searchButton\">"
+    + "<input type=\"text\" placeholder=\"Search\" class=\"searchBox\" "
+    + "onkeyup=\"applyFilterOnNotificationsList('error');\" id=\"filterErrorNotificationsListBox\">"
+    + "</div>"
+    + "</div>"
+    + "<!-- Clear Button-->"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('error', true)\">Clear All</a>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('error', false)\">Clear</a>"
+    + "</div>"
+    + "<div class=\"scroll-pane\" id=\"errorAlertScrollPane\">"
+    + "<div id=\"errorList\"></div>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('error', true)\">Clear All</a>"
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('error', false)\">Clear</a>"
+    + "</div>"
+    + "</div>";
+
+  // Tab 4 - Warning
+  notificationPanelHtml += 
+      "<div class=\"postical-absolute display-none topTabBlock\" id=\"TopTab_Warning\">"
+    + "<!-- Search-->"
+    + "<div class=\"left marginL10 marginTop6\">"
+    + "<div class=\"searchBlockMaster\">"
+    + "<input type=\"button\" class=\"searchButton\">"
+    + "<input type=\"text\" placeholder=\"Search\" class=\"searchBox\" "
+    + "onkeyup=\"applyFilterOnNotificationsList('warning');\" id=\"filterWarningNotificationsListBox\">"
+    + "</div>"
+    + "</div>"
+    + "<!-- Clear Button-->"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('warning', true)\">Clear All</a>"
+    + "</div>"
+    + "<div class=\"clearButton\">" 
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('warning', false)\">Clear</a>"
+    + "</div>"
+    + "<div class=\"scroll-pane\" id=\"warningAlertScrollPane\" >"
+    + "<div id=\"warningList\"></div>" 
+    + "</div>"
+    + "<div class=\"clearButton\">"
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('warning', true)\">Clear All</a>"
+    + "</div>"
+    + "<div class=\"clearButton\">" 
+    + "<a href=\"#\" class=\"right linkButton\" onclick=\"clearAlerts('warning', false)\">Clear</a>"
+    + "</div>"
+    + "</div>";
+
+  // Set html into the notification panel
+  $("#notificationsPanel").html(notificationPanelHtml);
+
+}
+
+// function used to give functionality of expanding and collapsing the left
+// panel cluster name and member list
+function expandCollapse(liDiv, clusterNameDiv) {
+  if ($("#" + liDiv).hasClass("collapsable")) {
+    $("#" + liDiv).removeClass("collapsable");
+    $("#" + liDiv).addClass("expandable");
+    $("#" + clusterNameDiv).removeClass("hitarea collapsable-hitarea");
+    $("#" + clusterNameDiv).addClass("hitarea expandable-hitarea");
+    document.getElementById("clusterA_1").style.display = "block";
+  } else {
+    $("#" + liDiv).removeClass("expandable");
+    $("#" + liDiv).addClass("collapsable");
+    $("#" + clusterNameDiv).removeClass("hitarea expandable-hitarea");
+    $("#" + clusterNameDiv).addClass("hitarea collapsable-hitarea");
+    document.getElementById("clusterA_1").style.display = "none";
+  }
+}
+
+// function used to give functionality of expanding and collapsing all the three
+// alerts
+function expandCollapseAlerts(div1Id, div2Id, ulId) {
+  if ($("#" + div1Id).hasClass("collapsable")) {
+    $("#" + div1Id).removeClass("collapsable");
+    $("#" + div1Id).addClass("expandable");
+
+    $("#" + div2Id).removeClass("rightCollapseLabelDropdown");
+    $("#" + div2Id).addClass("rightLabelDropdown");
+
+    $("#" + div2Id).removeClass("hitarea collapsable-hitarea");
+    $("#" + div2Id).addClass("hitarea expandable-hitarea");
+    document.getElementById(ulId).style.display = "block";
+  } else {
+    $("#" + div1Id).removeClass("expandable");
+    $("#" + div1Id).addClass("collapsable");
+
+    $("#" + div2Id).removeClass("rightLabelDropdown");
+    $("#" + div2Id).addClass("rightCollapseLabelDropdown");
+
+    $("#" + div2Id).removeClass("hitarea expandable-hitarea");
+    $("#" + div2Id).addClass("hitarea collapsable-hitarea");
+    document.getElementById(ulId).style.display = "none";
+  }
+}
+
+// function used for getting request parameters
+function getRequestParams() {
+  // host
+  if (GetParam('host') != null || GetParam('host') != "") {
+    host = GetParam('host');
+  } else {
+    host = '';
+  }
+
+  // port
+  if (GetParam('port') != null || GetParam('port') != "") {
+    port = GetParam('port');
+  } else {
+    port = '';
+  }
+
+  // memberId
+  if (GetParam('member') != null || GetParam('member') != "") {
+    memberId = GetParam('member');
+  } else {
+    memberId = '';
+  }
+
+  // memberName
+  if (GetParam('memberName') != null || GetParam('memberName') != "") {
+    memberName = GetParam('memberName');
+  } else {
+    memberName = '';
+  }
+  
+  //regionFullPath
+  if (GetParam('regionFullPath') != null || GetParam('regionFullPath') != "") {
+    regionFullPath = GetParam('regionFullPath');
+  } else {
+    regionFullPath = '';
+  }
+}
+
+// function used for getting system Alerts details
+
+function getSystemAlerts() {
+
+  var requestData = {
+    "pageNumber" : $('#pageNumber').val()
+  };
+
+  $.getJSON(
+          "GetSystemAlerts",
+          requestData,
+          function(data) {
+            $('#pageNumber').val(data.pageNumber);
+            var recordCount = parseInt(data.pageNumber) * 100;
+            if ($("#allAlertScrollPane").hasClass("hide-scroll-pane"))
+              $("#allAlertScrollPane").removeClass("hide-scroll-pane");
+            var errorAlertsList = data.systemAlerts.errors;
+            var severeAlertsList = data.systemAlerts.severe;
+            var warningAlertsList = data.systemAlerts.warnings;
+            var infoAlertsList = data.systemAlerts.info;
+
+            var allListHTML = "";
+            var allCount = 1;
+
+            if (severeAlertsList != null && severeAlertsList != undefined) {
+
+              if ($("#severeAlertScrollPane").hasClass("hide-scroll-pane"))
+                $("#severeAlertScrollPane").removeClass("hide-scroll-pane");
+              document.getElementById("severeTotalCount").innerHTML = severeAlertsList.length
+                  .toString();
+              // update global count
+              numTotalSeverAlerts = severeAlertsList.length;
+              var severeListHTML = "";
+              var severeCount = 1;
+
+              for ( var i = numTotalSeverAlerts - 1; i >= 0; i--) {
+                if (severeCount <= recordCount) {
+                  severeListHTML = severeListHTML
+                      + generateNotificationAlerts(severeAlertsList[i],
+                          "severe");
+                  severeCount++;
+                  severAlerts[severAlerts.length] = severeAlertsList[i];
+                }
+                if (allCount <= recordCount) {
+                  allCount++;
+                  allListHTML = severeListHTML;
+                }
+              }
+              document.getElementById("severeList").innerHTML = severeListHTML;
+
+            }
+
+            if (errorAlertsList != null && errorAlertsList != undefined) {
+
+              if ($("#errorAlertScrollPane").hasClass("hide-scroll-pane"))
+                $("#errorAlertScrollPane").removeClass("hide-scroll-pane");
+              document.getElementById("errorTotalCount").innerHTML = errorAlertsList.length;
+              // update global count
+              numTotalErrorAlerts = errorAlertsList.length;
+              var errorListHTML = "";
+              var errorCount = 1;
+              for ( var i = numTotalErrorAlerts - 1; i >= 0; i--) {
+                if (errorCount <= recordCount) {
+                  errorListHTML = errorListHTML
+                      + generateNotificationAlerts(errorAlertsList[i], "error");
+                  errorAlerts[errorAlerts.length] = errorAlertsList[i];
+                  errorCount++;
+                }
+                if (allCount <= recordCount) {
+                  allCount++;
+                  allListHTML = allListHTML
+                      + generateNotificationAlerts(errorAlertsList[i], "error");
+                }
+
+              }
+              document.getElementById("errorList").innerHTML = errorListHTML;
+
+            }
+
+            if (warningAlertsList != null && warningAlertsList != undefined) {
+
+              if ($("#warningAlertScrollPane").hasClass("hide-scroll-pane"))
+                $("#warningAlertScrollPane").removeClass("hide-scroll-pane");
+              document.getElementById("warningTotalCount").innerHTML = warningAlertsList.length;
+              // update global count
+              numTotalWarningAlerts = warningAlertsList.length;
+              var warningListHTML = "";
+              var warningCount = 1;
+              for ( var i = numTotalWarningAlerts - 1; i >= 0; i--) {
+                if (warningCount <= recordCount) {
+                  warningListHTML = warningListHTML
+                      + generateNotificationAlerts(warningAlertsList[i],
+                          "warning");
+                  warningAlerts[warningAlerts.length] = warningAlertsList[i];
+                  warningCount++;
+                }
+                if (allCount <= recordCount) {
+                  allCount++;
+                  allListHTML = allListHTML
+                      + generateNotificationAlerts(warningAlertsList[i],
+                          "warning");
+                }
+              }
+              document.getElementById("warningList").innerHTML = warningListHTML;
+
+            }
+
+            if (infoAlertsList != null && infoAlertsList != undefined) {
+              
+              // update global count
+              numTotalInfoAlerts = infoAlertsList.length;
+              var infoCount = 1;
+              for ( var i = numTotalInfoAlerts - 1; i >= 0; i--) {
+                if (infoCount <= recordCount) {
+                  infoAlerts[infoAlerts.length] = infoAlertsList[i];
+                  infoCount++;
+                }
+                if (allCount <= recordCount) {
+                  allCount++;
+                  allListHTML = allListHTML
+                      + generateNotificationAlerts(infoAlertsList[i], "info");
+                }
+              }
+
+            }
+
+            // start : for all alerts tab
+            var allAlertCount = numTotalSeverAlerts + numTotalErrorAlerts
+                + numTotalWarningAlerts + numTotalInfoAlerts;
+            document.getElementById("allAlertCount").innerHTML = allAlertCount
+                .toString();
+            // Display Load More only when number of alerts > 100
+            if (allAlertCount > 100) {
+              $('#containerLoadMoreAlertsLink').show();
+            } else {
+              $('#containerLoadMoreAlertsLink').hide();
+            }
+
+            /*var allAlertHTML = "";
+
+            allAlertHTML = allAlertHTML
+                + document.getElementById("severeList").innerHTML;
+
+            allAlertHTML = allAlertHTML
+                + document.getElementById("errorList").innerHTML;
+
+            allAlertHTML = allAlertHTML
+                + document.getElementById("warningList").innerHTML;*/
+
+            document.getElementById("allAlertList").innerHTML = allListHTML;
+
+            // end : for all alerts tab
+
+            if (severAlerts.length > 0) { // Severe
+              if ($("#allAlertScrollPane").hasClass("hide-scroll-pane"))
+                $("#allAlertScrollPane").removeClass("hide-scroll-pane");
+              $('#clusterStatusText').html("Severe");
+              $("#clusterStatusIcon").addClass("severeStatus");
+            } else if (errorAlerts.length > 0) { // Error
+              if ($("#allAlertScrollPane").hasClass("hide-scroll-pane"))
+                $("#allAlertScrollPane").removeClass("hide-scroll-pane");
+              $('#clusterStatusText').html("Error");
+              $("#clusterStatusIcon").addClass("errorStatus");
+            } else if (warningAlerts.length > 0) { // Warning
+              if ($("#allAlertScrollPane").hasClass("hide-scroll-pane"))
+                $("#allAlertScrollPane").removeClass("hide-scroll-pane");
+              $('#clusterStatusText').html("Warning");
+              $("#clusterStatusIcon").addClass("warningStatus");
+            } else { // Normal
+              $('#clusterStatusText').html("Normal");
+              $("#clusterStatusIcon").addClass("normalStatus");
+            }
+            $('.scroll-pane').jScrollPane();
+          }).error(repsonseErrorHandler);
+
+  if (!loadMore)
+    setTimeout("getSystemAlerts()", 10000); // refreshing cluster disk storage
+  else
+    loadMore = false;
+  // widget in every 5 sec
+}
+
+// function to copy alert message to clipboard
+function copyAlertTextToClipboard(alertText) {
+
+  console.log("copyAlertTextToClipboard called");
+
+}
+
+// function used for acknowleding a system alert
+function acknowledgeAlert(divId) {
+  requestData = {
+    "alertId" : divId
+  };
+  $.getJSON(
+      "pulse/acknowledgeAlert",
+      requestData,
+      function(data) {
+        // Change color of alert title
+        $("#alertTitle_" + divId).addClass(
+            "tabMessageHeadingAckBlock defaultCursor");
+        $("#alertTitle_" + divId).removeClass("tabMessageHeadingBlock");
+
+        // Add Acknowledged Tick
+        $("#alertShortMsg_" + divId).addClass("graytickmark");
+        $("#alertShortMsg_" + divId).removeClass("notickmark");
+
+      }).error(repsonseErrorHandler);
+}
+
+function loadMoreAlerts() {
+  $('#pageNumber').val(parseInt($('#pageNumber').val()) + 1);
+  loadMore = true;
+  getSystemAlerts();
+}
+
+/*
+ * Displays Notification Alert Popup
+ */
+function showNotificationPopup(e, element, alertType, alertId) {
+  // set selected alert id
+  currentSelectedAlertId = alertId;
+  
+  var alertSelected = null;
+  
+  // create pop up content
+  if (alertType == "severe") {
+    for ( var i = 0; i < severAlerts.length; i++) {
+      if (alertId == severAlerts[i].id) {
+        alertSelected = severAlerts[i];
+      }
+    }
+  } else if (alertType == "error") {
+    for ( var i = 0; i < errorAlerts.length; i++) {
+      if (alertId == errorAlerts[i].id) {
+        alertSelected = errorAlerts[i];
+      }
+    }
+  } else if (alertType == "warning") {
+    for ( var i = 0; i < warningAlerts.length; i++) {
+      if (alertId == warningAlerts[i].id) {
+        alertSelected = warningAlerts[i];
+      }
+    }
+  } else {// info
+    for ( var i = 0; i < infoAlerts.length; i++) {
+      if (alertId == infoAlerts[i].id) {
+        alertSelected = infoAlerts[i];
+      }
+    }
+  }
+
+  // content html
+  var alertDiv = "<div class='content'>" + "<h3 class='";
+
+  if (alertType == "severe") {
+    alertDiv = alertDiv + " tabSevere ";
+  } else if (alertType == "error") {
+    alertDiv = alertDiv + " tabError ";
+  } else if (alertType == "warning") {
+    alertDiv = alertDiv + " tabWarning ";
+  } else {
+    alertDiv = alertDiv + " tabInfo ";
+  }
+
+  alertDiv = alertDiv + "'>" + alertSelected.memberName + "</h3>"
+      + "<div class='tooltipcontent'><p>" + alertSelected.description
+      + "</p></div>" + "<div class='notifications'>" + "<ul>"
+      + "<li><div class='tabMessageDateBlock'>" + alertSelected.timestamp
+      + "</div></li>" + "<li class='right'><a href='#.' ";
+  
+  // Add call to function handler only if alert is not acknowledged previously
+  if (!alertSelected.isAcknowledged) {
+    alertDiv = alertDiv + " onClick = 'javascript:acknowledgeAlert("
+        + alertSelected.id + ")' ";
+  }
+
+  alertDiv = alertDiv
+      + " >"
+      + "<span class='acknowledgedTick'></span></a></li>"
+      + "<!-- <li class='right'><a href='#.' onClick = 'javascript:copyAlertTextToClipboard(\""
+      + alertSelected.id + "\")' >"
+      + "<span class='copyNotification'></span></a></li> -->" 
+      + "</ul>"
+      + "</div>" + "</div>" 
+      + "<span class='bubble-arrow'></span>"
+      + "<a class='closePopup' href='javascript:hideNotificationPopup("
+      + alertSelected.id + ");'></a>";
+
+  $("#tooltip").html(alertDiv);
+
+  // Logic to display pop up
+  $(".tip_trigger").removeClass("active");
+  var parentOffset = $(element).offset();
+  $(element).addClass("active");
+
+  $("#tooltip").find('.tooltipcontent').css("height", 100);
+  $("#tooltip").find('.tooltipcontent').css("width", 277);
+  $("#tooltip").find('.content').css("width", 277);
+  $("#tooltip").css({
+    width : '277px'
+  });
+  var relX = parentOffset.left - $("#tooltip").width();
+  var relY = parentOffset.top - 160;
+
+  $("#tooltip").css({
+    top : relY,
+    left : relX
+  });
+  $("#tooltip").show();
+  $("#tooltip").find('.tooltipcontent').jScrollPane();
+
+}
+
+/*
+ * Hides Notification Alert Popup
+ */
+function hideNotificationPopup(divId) {
+  // Hide Pop up
+  $("#tooltip").hide();
+
+  // rmeove selected alert's highlighting
+  $('#tip_trigger_' + divId).removeClass('active');
+}
+
+function ajaxPost(pulseUrl, pulseData, pulseCallBackName) {
+  $.ajax({
+    url : pulseUrl,
+    type : "POST",
+    dataType : "json",
+    data : {
+      "pulseData" : this.toJSONObj(pulseData)
+    },
+    // data : pulseData,
+    // callback handler that will be called on success
+    success : function(data) {
+      pulseCallBackName(data);
+    },
+    // callback handler that will be called on error
+    error : function(jqXHR, textStatus, errorThrown) {
+      // log the error to the console
+      console.log("The following error occured: " + textStatus, errorThrown);
+      $('#connectionStatusDiv').show();
+      $('#connectionErrorMsgDiv').html("Pulse server is not connected");
+    },
+    // callback handler that will be called on completion
+    // which means, either on success or error
+    complete : function() {
+      // enable the inputs
+      // $inputs.removeAttr("disabled");
+    }
+  });
+
+}
+
+function toJSONObj(object) {
+  var type = typeof object;
+  switch (type) {
+  case 'undefined':
+  case 'function':
+  case 'unknown':
+    return;
+  case 'object':
+    break;
+  default:
+    return '"' + object.toString() + '"';
+  }
+  if (object === null)
+    return 'null';
+  if (object.ownerDocument === document)
+    return;
+
+  var results = [];
+  if (object.length) { // array
+    for ( var i = 0; i < object.length; i++) {
+      var value = this.toJSON(object[i]);
+      if (value !== undefined)
+        results.push(value);
+    }
+    return '[' + results.join(',') + ']';
+  } else { // object
+    for ( var property in object) {
+      var value = this.toJSONObj(object[property]);
+      if (value !== undefined) {
+        property = (property.split('_')[0] == "pseudo") ? '@'
+            + property.split('_')[1] : property;
+        results.push('"' + property + '"' + ':' + value);
+      }
+    }
+    return '{' + results.join(',') + '}';
+  }
+}
+
+UUIDv4 = function b(a) {
+  return a ? (a ^ Math.random() * 16 >> a / 4).toString(16) : ([ 1e7 ] + -1e3
+      + -4e3 + -8e3 + -1e11).replace(/[018]/g, b);
+};
+
+function scanPageForWidgets() {
+  var listOfActiveWidgets = $("[data-active ='yes']");
+  var functionTimingList = new Array();
+  for ( var i = 0; i < listOfActiveWidgets.length; i++) {
+    // alert( listOfActiveWidgets[i].dataset.widgetid);
+    widgetAlreadyPresent = false;
+    for ( var j = 0; j < functionTimingList.length; j++) {
+      if ((functionTimingList[j].indexOf(listOfActiveWidgets[i]
+          .getAttribute("data-timeline"), 0)) == 0) {
+        functionTimingList[j] = functionTimingList[j] + ","
+            + listOfActiveWidgets[i].getAttribute("data-widgetid") + "Func";
+        widgetAlreadyPresent = true;
+      }
+    }
+
+    if (!widgetAlreadyPresent) {
+      functionTimingList
+          .push(listOfActiveWidgets[i].getAttribute("data-timeline") + ":"
+              + listOfActiveWidgets[i].getAttribute("data-widgetid") + "Func");
+    }
+  }
+  prepareDataAndPost(functionTimingList);
+}
+
+function prepareDataAndPost(functionTimingList) {
+  var functionArray = [];
+  var timing;
+  for ( var i = 0; i < functionTimingList.length; i++) {
+    var colon = functionTimingList[i].indexOf(":");
+    timing = functionTimingList[i].substr(0, colon);
+    var functionList = functionTimingList[i].substr(colon + 1,
+        functionTimingList[i].length);
+    var func = "setInterval(function() {\n"
+        + "var postData = new Object();\n"
+        + "var listOfPulseFunction= '"
+        + functionList.toString()
+        + "'.split(\",\");\n"
+        + "for(var j=0; j< listOfPulseFunction.length; j++){\n"
+        + "var functionName = listOfPulseFunction[j];\n"
+        + "var funcCall =  'pf.'+functionName + \"('\" +functionName+\"',postData);\";\n"
+        + "eval(funcCall);\n"
+        + "}\n"
+        + "ajaxPost(\"pulse/pulseUpdate\", postData, responseCallbackHandler);\n"
+        + "postData = null;\n" + "postData = new Object();\n" + "}," + timing
+        + ");";
+    var loadOnStart = "setTimeout(function() {\n"
+        + "var postData = new Object();\n"
+        + "var listOfPulseFunction= '"
+        + functionList.toString()
+        + "'.split(\",\");\n"
+        + "for(var j=0; j< listOfPulseFunction.length; j++){\n"
+        + "var functionName = listOfPulseFunction[j];\n"
+        + "var funcCall =  'pf.'+functionName + \"('\" +functionName+\"',postData);\";\n"
+        + "eval(funcCall);\n"
+        + "}\n"
+        + "ajaxPost(\"pulse/pulseUpdate\", postData, responseCallbackHandler);\n"
+        + "postData = null;\n" + "postData = new Object();\n" + "},0);";
+    functionArray[i] = func;
+    functionStartArray[i] = loadOnStart;
+  }
+  for ( var k = 0; k < functionStartArray.length; k++) {
+    eval(functionStartArray[k]);
+  }
+  for ( var k = 0; k < functionArray.length; k++) {
+    eval(functionArray[k]);
+  }
+
+}
+/*
+ * function prepareDataAndPost(functionTimingList) { for ( var i = 0; i <
+ * functionTimingList.length; i++) { var postData = new Object(); var funcObj =
+ * new Array(); var colon = functionTimingList[i].indexOf(":"); var timing =
+ * functionTimingList[i].substr(0, colon); var functionList =
+ * functionTimingList[i].substr(colon + 1, functionTimingList[i].length);
+ * funcObj[i] = setInterval(function() { var listOfPulseFunction =
+ * functionList.split(","); for ( var j = 0; j < listOfPulseFunction.length;
+ * j++) { var functionName = listOfPulseFunction[j]; //Create the function call
+ * from function name and parameter. var funcCall = 'pf.'+functionName + "('" +
+ * functionName + "',postData);"; //Call the function eval(funcCall); }
+ * ajaxPost("pulse/pulseUpdate", postData, responseCallbackHandler); postData =
+ * null; postData = new Object(); }, timing); } }
+ */
+
+var responseCallbackHandler = function(data) {
+  for ( var widgetCallbackHandlerName in data) {
+    try {
+      eval('get' + widgetCallbackHandlerName
+          + 'Back(data[widgetCallbackHandlerName])');
+    } catch (err) {
+      console.log('Error in get' + widgetCallbackHandlerName + 'Back : ' + err);
+    }
+  }
+
+};
+/*
+* This function sends ajax request with passed post data.
+* Use this function to force periodic update of pulse data.
+*/
+function forcePulseDataUpdate(postData){
+  ajaxPost("pulse/pulseUpdate", postData, responseCallbackHandler);
+}
+
+// function used for getting pulse version
+function getPulseVersion() {
+
+  $.getJSON("pulse/pulseVersion", function(data) {
+
+    var pulseVersion = data.pulseVersion;
+    $('#pulseVersion').html(pulseVersion);
+    $('#pulseVer').html(data.pulseVersion);
+    $('#buildId').html(data.buildId);
+    $('#buildDate').html(data.buildDate);
+    $('#sourceDate').html(data.sourceDate);
+    $('#sourceRevision').html(data.sourceRevision);
+    $('#sourceRepository').html(data.sourceRepository);
+
+    if (data.pulseVersion != undefined && data.pulseVersion != "") {
+      // Display version details link
+      $('#pulseVersionDetailsLink').toggle();
+    }
+  });
+}
+
+/*
+ * String utility function to check whether string is empty or whitespace only
+ * or null or undefined
+ * 
+ */
+function isEmpty(str) {
+
+  // Remove extra spaces
+  str = str.replace(/\s+/g, ' ');
+
+  switch (str) {
+  case "":
+  case " ":
+  case null:
+  case false:
+  case typeof this == "undefined":
+  case (/^\s*$/).test(str):
+    return true;
+  default:
+    return false;
+  }
+}
+
+/*
+ * Utility function to check whether value is -1, 
+ * return true if -1 else false
+ * 
+ */
+function isNotApplicable(value) {
+  
+  if(!isNaN(value)){
+    // if number, convert to string
+    value = value.toString();
+  }else{
+    // Remove extra spaces
+    value = value.replace(/\s+/g, ' ');
+  }
+
+  
+
+  switch (value) {
+  case "-1":
+  case "-1.0":
+  case "-1.00":
+    return true;
+  default:
+    return false;
+  }
+}
+
+/*
+ * Utility function to apply Not Applicable constraint on value, 
+ * returns "NA" if isNotApplicable(value) returns true 
+ * else value itself
+ * 
+ */
+function applyNotApplicableCheck(value){
+  if(isNotApplicable(value)){
+    return "NA";
+  }else{
+    return value;
+  }
+}
+
+/*
+ * Utility function to convert given value in Bytes to KB or MB or GB
+ * 
+ */
+function convertBytesToMBorGB(value){
+  // UNITS VALUES IN BYTES
+  var ONE_KB = 1024;
+  var ONE_MB = 1024 * 1024;
+  var ONE_GB = 1024 * 1024 * 1024;
+  
+  var convertedValue = new Array();
+  var valueInMBorGB = value;
+  var isBorKBorMBorGB = "B";
+  
+  if (valueInMBorGB > ONE_KB && valueInMBorGB < ONE_MB) {
+    // Convert to KBs
+    valueInMBorGB = (valueInMBorGB / ONE_KB);
+    isBorKBorMBorGB = "KB";
+  }else if(valueInMBorGB > ONE_MB && valueInMBorGB < ONE_GB){
+    // Convert to MBs
+    valueInMBorGB = (valueInMBorGB / ONE_MB);
+    isBorKBorMBorGB = "MB";
+  }else if(valueInMBorGB > ONE_GB ){
+    // Convert to GBs
+    valueInMBorGB = (valueInMBorGB / ONE_GB);
+    isBorKBorMBorGB = "GB";
+  }
+
+  // converted value
+  convertedValue.push(valueInMBorGB.toFixed(2));
+  // B or KB or MB or GB
+  convertedValue.push(isBorKBorMBorGB);
+  
+  return convertedValue;
+}
+
+// Function to escape html entities
+function escapeHTML(htmlContent) {
+  return escapedHTML = htmlContent
+      .replace(/&/g, '&amp;')
+      .replace(/</g, '&lt;')
+      .replace(/>/g, '&gt;')
+      .replace(/"/g, '&quot;')
+      .replace(/'/g, '&#x27;')
+      .replace(/`/g, '&#x60;');
+}
+
+//Function to unescape html entities
+function unescapeHTML(htmlContent) {
+  return unescapedHTML = htmlContent
+      .replace(/&amp;/g, '&')
+      .replace(/&lt;/g, '<')
+      .replace(/&gt;/g, '>')
+      .replace(/&quot;/g, '"')
+      .replace(/&#x27;/g, "'")
+      .replace(/&#x60;/g, '`');
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js b/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js
new file mode 100644
index 0000000..aa72508
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowser.js
@@ -0,0 +1,651 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+// DataBrowser.js
+
+var clusterRegionsList = new Array();
+var eventsAdded = false;
+
+var labelType, useGradients, nativeTextSupport, animate;
+
+(function() {
+  var ua = navigator.userAgent,
+      iStuff = ua.match(/iPhone/i) || ua.match(/iPad/i),
+      typeOfCanvas = typeof HTMLCanvasElement,
+      nativeCanvasSupport = (typeOfCanvas == 'object' || typeOfCanvas == 'function'),
+      textSupport = nativeCanvasSupport 
+        && (typeof document.createElement('canvas').getContext('2d').fillText == 'function');
+  //I'm setting this based on the fact that ExCanvas provides text support for IE
+  //and that as of today iPhone/iPad current text support is lame
+  labelType = (!nativeCanvasSupport || (textSupport && !iStuff))? 'Native' : 'HTML';
+  nativeTextSupport = labelType == 'Native';
+  useGradients = nativeCanvasSupport;
+  animate = !(iStuff || !nativeCanvasSupport);
+})();
+
+
+$(document).ready(function() {
+  
+  // Load Notification HTML  
+  generateNotificationsPanel();
+
+  if (CONST_BACKEND_PRODUCT_SQLFIRE == productname.toLowerCase()) {
+    alterHtmlContainer(CONST_BACKEND_PRODUCT_SQLFIRE);
+  } else {
+    alterHtmlContainer(CONST_BACKEND_PRODUCT_GEMFIRE);
+  }
+
+  scanPageForWidgets();
+  $.ajaxSetup({ cache: false });
+  
+  var requestData = {};
+  getRequestParams();
+  $.getJSON("pulse/authenticateUser", requestData, function(data) {
+    
+    // return isUserLoggedIn
+    if(!data.isUserLoggedIn){
+      // redirect user on Login Page 
+      window.location.href = "Login.html";
+    }else{
+      getPulseVersion();
+      
+      // System Alerts
+      //getSystemAlerts();
+      
+      // keep "Execute" button disabled if editor is empty else make it enabled
+      onQueryTextChange();
+      
+      // Initialize Cluster's regions tree
+      initClusterRegions();
+      
+      // Display queries list in history panel
+      updateQueryHistory("view","");
+      //$('.queryHistoryScroll-pane').jScrollPane();/*Custome scroll*/
+      /*custom scroll bar*/
+      //$('.ScrollPaneBlock').jScrollPane();
+      
+      /*splitter*/
+      $('#widget').width('1002').height('100%').split({orientation:'vertical', limit:250, position: '250'});
+      $('#rightBlock').width('748')/*.height('100%')*/;
+      $('#leftBlock').width('250')/*.height('100%')*/.split({orientation:'horizontal', limit:310, position: '380'});
+       //$('#leftBlock').width('29.7%').height('100%');
+      $('.ScrollPaneBlock').jScrollPane();
+      
+      /*History Overlay Toggle*/
+      /*toggle*/
+
+      $("#historyIcon").click(queryHistoryIconOnClick);
+
+      $(document).click(function(event) {
+              var a = $(event.target).andSelf().parents("#detailsHistory");
+              if (a.length == 0 && $("#detailsHistory").is(":visible")) {
+                      $("#detailsHistory").toggle();
+                      $("#historyIcon").toggleClass('historyClicked-On').toggleClass('historyClicked-Off');
+              }
+      });
+      
+      // create pop up object explorer
+      createPopUpObjectExplorer();
+      
+    }
+
+  }).error(repsonseErrorHandler);
+  
+});
+
+// Handler for query history button click
+var queryHistoryIconOnClick = function(event) {
+  $("#detailsHistory").toggle();
+  $("#historyIcon").toggleClass('historyClicked-Off').toggleClass('historyClicked-On');
+  event.stopPropagation();
+
+  // Add slide event if not added
+  if (!eventsAdded) {
+    addSlideEvents();
+    eventsAdded = true;
+    $('.queryHistoryScroll-pane').jScrollPane();
+  }
+};
+
+/*
+ * Function to show and hide html elements/components based upon whether product
+ * is sqlfire or gemfire 
+ */
+function alterHtmlContainer(prodname){
+  if(CONST_BACKEND_PRODUCT_SQLFIRE == prodname.toLowerCase()){
+    // Show HTML for following
+    $('#subTabQueryStatistics').show();
+  }else{
+    // Hide HTML for following
+    $('#subTabQueryStatistics').hide();
+  }
+  
+}
+
+
+// Regions Tree settings
+var regionTreeConfigs = {
+              check: { 
+                enable: true 
+                },
+              data: { 
+                simpleData: { 
+                  enable: true 
+                  }
+                },
+              callback: {
+                //onClick: onClickHandler,
+                onCheck: zTreeOnCheck //onRegionCheck
+                }
+              };
+
+var regionsTreeElementName = "treeDemo";      // Regions tree html element name
+var referenceToRegionsTreeElement; // Reference to Regions tree html element
+//var dataBroswerRegions = new Array();    // Var to store cluster Regions
+function initClusterRegions(){
+  
+  // JQuery Reference to Regions tree html element
+  referenceToRegionsTreeElement = $("#"+regionsTreeElementName);
+  
+  // Initialize zTree with empty data
+  $.fn.zTree.init(referenceToRegionsTreeElement, regionTreeConfigs, []);
+  setCheck(regionsTreeElementName);
+  $("#py").bind("change", setCheck);
+  $("#sy").bind("change", setCheck);
+  $("#pn").bind("change", setCheck);
+  $("#sn").bind("change", setCheck);
+  
+  // update Regions tree
+  updateDataBrowserRegionsData();
+}
+
+function updateDataBrowserRegionsData(){
+  requestData = {};
+  $.getJSON("pulse/dataBrowserRegions", requestData, function(data) {
+    
+    // set cluster name on tab link to cluster page
+    if(data.clusterName != undefined && data.clusterName != null){
+      $("#clusterNameLink").html(data.clusterName);
+    }
+    
+    if(data.connectedFlag){
+      // update clusterRegionsList
+      clusterRegionsList = data.clusterRegions;
+      createRegionsTree(clusterRegionsList);
+    }
+    
+  }).error(repsonseErrorHandler);
+  
+
+  //setting refresh time interval to 10 sec
+  //setTimeout("updateDataBrowserRegionsData()", 10000);
+}
+
+function createRegionsTree(regionsList){
+
+  // Formulate region tree data
+  var dataBroswerRegionsData = formRegionTreeData(regionsList);
+  
+  // destroy existing zTree
+  $.fn.zTree.destroy();
+  
+  // recreate new zTree
+  $.fn.zTree.init(referenceToRegionsTreeElement, regionTreeConfigs, dataBroswerRegionsData);
+  setCheck(regionsTreeElementName);
+  $("#py").bind("change", setCheck);
+  $("#sy").bind("change", setCheck);
+  $("#pn").bind("change", setCheck);
+  $("#sn").bind("change", setCheck); 
+  
+}
+
+// Display Colocated regions
+function showColocatedRegions(){
+  if($("#linkColocatedRegions").hasClass("disabledLink")){
+    return false;
+  }
+  
+  // Clear members list
+  $("#membersList").html("");
+  
+  var selectedRegionFullPath = $("#selectedRegion").val();
+  var regionsmembers = new Array();
+  var colocatedRegions = new Array();
+  
+  // Determine selected region's members
+  for(var i=0; i<clusterRegionsList.length; i++){
+    if(selectedRegionFullPath == clusterRegionsList[i].fullPath){
+      regionsmembers = clusterRegionsList[i].members;
+      break;
+    }
+  }
+  
+  // Determine Co-located regions
+  for(var i=0; i<regionsmembers.length; i++){
+    var searchObject = JSON.stringify(regionsmembers[i]);
+    for(var j=0; j<clusterRegionsList.length; j++){
+      var members = JSON.stringify(clusterRegionsList[j].members);
+      if(members.indexOf(searchObject) > -1){
+        if($.inArray(clusterRegionsList[j], colocatedRegions) == -1){
+          colocatedRegions.push(clusterRegionsList[j]);
+        }
+      }
+    }
+  }
+  
+  //console.log(colocatedRegions);
+  // Generate colocated regions Tree
+  createRegionsTree(colocatedRegions);
+  var treeObj = $.fn.zTree.getZTreeObj(regionsTreeElementName);
+  treeObj.expandAll(true);
+  
+  // Disable colocated link and enable show all regions link
+  if($("#linkColocatedRegions").hasClass("enabledLink")){
+    $("#linkColocatedRegions").addClass("disabledLink");
+    $("#linkColocatedRegions").removeClass("enabledLink");
+
+    $("#linkAllRegions").addClass("enabledLink");
+    $("#linkAllRegions").removeClass("disabledLink");
+  }
+
+}
+
+// Function to display all regions in the cluster
+function showAllRegions(){
+  
+  if($("#linkAllRegions").hasClass("enabledLink")){
+
+    // Generate colocated regions Tree
+    createRegionsTree(clusterRegionsList);
+    var treeObj = $.fn.zTree.getZTreeObj(regionsTreeElementName);
+    treeObj.expandAll(false);
+    
+    $("#linkAllRegions").addClass("disabledLink");
+    $("#linkAllRegions").removeClass("enabledLink");
+    
+    $("#linkColocatedRegions").addClass("disabledLink");
+    $("#linkColocatedRegions").removeClass("enabledLink");
+    
+  }
+  
+}
+
+// This function applies filter on regions tree
+function applyFilterOnRegions() {
+
+  // filterText
+  var filterText = "";
+  filterText = $('#filterTextRegion').val().toLowerCase();
+  
+  var filteredRegionsListNew = new Array();
+
+  if (!isEmpty(filterText)) {
+    // Determine filtered regions
+    for(var i=0; i<clusterRegionsList.length; i++){
+      if(clusterRegionsList[i].name.toLowerCase().indexOf(filterText) != -1){
+        filteredRegionsListNew.push(clusterRegionsList[i]);
+        
+        var regionFullPath = clusterRegionsList[i].fullPath;
+        regionFullPath = regionFullPath.substring(1);
+        
+        // add if parent of region is not present in filtered list
+        while(regionFullPath.lastIndexOf('/') > 0 ){
+          var parentFullPath = regionFullPath.substring(0, regionFullPath.lastIndexOf('/'));
+          for(var j=0; j<clusterRegionsList.length; j++){
+            if('/'+parentFullPath == clusterRegionsList[j].fullPath){
+              if($.inArray(clusterRegionsList[j], filteredRegionsListNew) == -1){
+                filteredRegionsListNew.push(clusterRegionsList[j]);
+              }
+              break;
+            }
+          }
+          regionFullPath = parentFullPath;
+        }
+      }
+    }
+    
+    // Generate filtered regions Tree
+    createRegionsTree(filteredRegionsListNew);
+    var treeObj = $.fn.zTree.getZTreeObj(regionsTreeElementName);
+    treeObj.expandAll(true);
+    
+  } else {
+    
+    // Generate filtered regions Tree
+    createRegionsTree(clusterRegionsList);
+    var treeObj = $.fn.zTree.getZTreeObj(regionsTreeElementName);
+    treeObj.expandAll(false);
+    
+  }
+}
+
+function onClickHandler(event, treeId, treeNode, clickFlag) {
+  console.log("[ onClick ]&nbsp;&nbsp;clickFlag = " + clickFlag + 
+      " (" + (clickFlag===1 ? "single selected": (clickFlag===0 ? "<b>cancel selected</b>" : "<b>multi selected</b>")) + ")");
+  var treeObj = $.fn.zTree.getZTreeObj(regionsTreeElementName);
+  
+  // set check mark of node clicked
+  // Syntax: treeObj.checkNode(treeNode, boolean, boolean, boolean)
+  treeObj.checkNode(treeNode);  
+}
+
+function zTreeOnCheck(event, treeId, treeNode) {
+  console.log(treeNode.tId + ", " + treeNode.name + "," + treeNode.checked);
+  
+  var treeObj = $.fn.zTree.getZTreeObj(regionsTreeElementName);
+  var selectedNodes = treeObj.getCheckedNodes(true);
+  var selectedRegions = new Array();
+  
+  // If only one region is selected then activate colocated regions link else 
+  // deactivate link
+  if(selectedNodes.length == 1){
+    $("#linkColocatedRegions").addClass("enabledLink");
+    $("#linkColocatedRegions").removeClass("disabledLink");
+    // set selected region full path in html hidden input element
+    $("#selectedRegion").val(getRegionFullPathFromTreeNode(selectedNodes[0],""));
+  }else{
+    // else 
+    if($("#linkColocatedRegions").hasClass("enabledLink")){
+      $("#linkColocatedRegions").addClass("disabledLink");
+      $("#linkColocatedRegions").removeClass("enabledLink");
+    }
+  }
+  
+  // Display Members of selected regions
+  for(var i=0; i<selectedNodes.length; i++){
+    var selectedNode = selectedNodes[i];
+    //console.log(getRegionFullPathFromTreeNode(selectedNode,""));
+    // add to array
+    selectedRegions.push(getRegionFullPathFromTreeNode(selectedNode,""));
+  }
+  console.log(selectedRegions);
+  
+  // make intersection of selected regions members
+  var commonMembers = new Array();
+  if(selectedRegions.length == 1){
+    for(var i=0; i<clusterRegionsList.length; i++){
+      if(clusterRegionsList[i].fullPath == selectedRegions[0]){
+        commonMembers = clusterRegionsList[i].members;
+        break;
+      }
+    }
+  }else if(selectedRegions.length > 1){
+    
+    for(var i=0; i<clusterRegionsList.length; i++){
+      if($.inArray(clusterRegionsList[i].fullPath, selectedRegions) != -1){
+        
+        if(commonMembers.length == 0){
+          commonMembers = clusterRegionsList[i].members;
+        }else{
+          commonMembers = arrayIntersection(commonMembers, clusterRegionsList[i].members);
+        }
+        
+      }
+    }
+    
+  }
+  
+  // create members html
+  var membersHTML = "";
+  for(var j=0; j<commonMembers.length; j++){
+    membersHTML += "<li>" +
+      "<label for=\"Member"+j+"\">"+encodeMemberName(commonMembers[j].name)+"</label>" +
+      "<input type=\"checkbox\" name=\"Member\" id=\"Member"+j+"\" class=\"styled\" value=\""+commonMembers[j].id+"\">" +
+      "</li>";
+  }
+  $("#membersList").html(membersHTML);
+  // Apply Check Box styles on members
+  Custom.init();
+  
+  $('.ScrollPaneBlock').jScrollPane();
+  
+};
+
+// Function to get full path of treeNode
+function getRegionFullPathFromTreeNode(treeNode, path){
+  
+  if(treeNode.getParentNode() != null){
+    path = getRegionFullPathFromTreeNode(treeNode.getParentNode(), path) + '/'+treeNode.name;
+  }else{
+    path += '/'+treeNode.name;
+  }
+  return path;
+}
+
+// function which returns common elements of two arrays
+function arrayIntersection(A, B) {
+  var result = new Array();
+  for ( var i = 0; i < A.length; i++) {
+    for ( var j = 0; j < B.length; j++) {
+      if (A[i].id == B[j].id && $.inArray(A[i], result) == -1) {
+        result.push(A[i]);
+      }
+    }
+  }
+  return result;
+}
+
+
+
+/*function displayMembersByRegionsSelected(regionName){
+  console.log("regionName clicked");
+  var membersHTML = "";
+  for(var i=0; i<clusterRegionsList.length; i++){
+    if(clusterRegionsList[i].name.endsWith(regionName)){
+      var regionMembers = clusterRegionsList[i].members;
+      for(var j=0; j<regionMembers.length; j++){
+        membersHTML += "<li>" +
+          "<label for=\"Member"+j+"\">"+regionMembers[j]+"</label>" +
+          "<input type=\"checkbox\" name=\"Member"+j+"\" id=\"Member"+j+"\" class=\"styled\">" +
+          "</li>";
+      }  
+    }
+  }
+  $("#membersList").html(membersHTML);
+  // Apply Check Box styles on members
+  Custom.init();
+}*/
+
+// Regions Tree event handlers 
+var code;
+function setCheck(treeElementName) {
+        var zTree = $.fn.zTree.getZTreeObj(treeElementName),
+        py = $("#py").attr("checked")? "p":"",
+        sy = $("#sy").attr("checked")? "s":"",
+        pn = $("#pn").attr("checked")? "p":"",
+        sn = $("#sn").attr("checked")? "s":"",
+        type = { "Y":py + sy, "N":pn + sn};
+        zTree.setting.check.chkboxType = type;
+        showCode('setting.check.chkboxType = { "Y" : "' + type.Y + '", "N" : "' + type.N + '" };');
+}
+
+function showCode(str) {
+        if (!code) code = $("#code");
+        code.empty();
+        code.append("<li>"+str+"</li>");
+}
+
+$(function() 
+        {
+        $('span.level0').click(function(){
+        $(this).parent('li').toggleClass('active');
+        });
+});
+
+$(function() 
+        {
+        $('a.level0').dblclick(function(){
+        $(this).parent('li').toggleClass('active');
+        });
+});
+//Regions Tree event handlers - End
+
+// this function prepares data for region tree
+function formRegionTreeData(clusterRegions){
+  
+  if(clusterRegions.length == 0){
+    return new Array();
+  }
+  
+  var zTreeNodes = new Array();
+  
+  //console.log("clusterRegions B4 Sorting"); console.log(clusterRegions);
+  // Sort regions based on full path
+  clusterRegions.sort(dynamicSort("fullPath", "asc"));
+  //console.log("clusterRegions After Sorting"); console.log(clusterRegions);
+  
+  for(var i=0; i< clusterRegions.length ; i++){
+    var obj = {};
+    obj["name"] = clusterRegions[i].name.substring(clusterRegions[i].name.indexOf("/") + 1);
+    obj["isPartition"] = clusterRegions[i].isPartition;
+    obj["open"] = false;
+    obj["isParent"] = true;
+    //obj["click"] = "displayMembersByRegionsSelected('"+clusterRegions[i].name.substring(clusterRegions[i].name.indexOf("/") + 1)+"');",
+    obj["children"] = new Array(); 
+    
+    //console.log("object formed:");
+    //console.log(obj);
+    
+    var regionFullPath = clusterRegions[i].fullPath;
+    if(regionFullPath.indexOf("/") == 0){
+      // remove first slash from full path
+      regionFullPath = regionFullPath.substring(1); 
+    }
+    
+    var indexOfSlash = regionFullPath.indexOf("/");
+    
+    if(indexOfSlash == -1){
+      // Region is not subregion
+      zTreeNodes.push(obj);
+    }else{
+      // Region is subregion
+      
+      var parentRegions = regionFullPath.split("/");
+      //console.log("parentRegions.length : "+parentRegions.length);
+      
+      var j=0;
+      var refToParent;
+      // get reference to first parent
+      for(var k=0; k < zTreeNodes.length; k++){
+        if(zTreeNodes[k].name == parentRegions[j]){
+          refToParent = zTreeNodes[k]; 
+        }
+      }
+      
+      // traverse in parents trail till last parent
+      do{
+        for(var k=0; k < refToParent.children.length; k++){
+          if(refToParent.children[k].name == parentRegions[j]){
+            refToParent = refToParent.children[k]; 
+          }
+        }
+        j++;
+      }while(j<parentRegions.length - 1);
+        
+        //console.log("refToParent : "); console.log(refToParent);
+        
+        // get list children of parent and add child/sub-region into it 
+        var childrenList = refToParent["children"];
+        //console.log("childrenList B4: "); console.log(childrenList);
+        childrenList.push(obj);
+        //console.log("childrenList After: "); console.log(childrenList);
+        
+    }
+    
+    //console.log("final data zTreeNodes : "); console.log(zTreeNodes);
+    //dataBroswerRegions = zTreeNodes;
+  }
+  
+  return zTreeNodes;
+}
+
+// Sort Array of objects based upon object property 
+function dynamicSort(property, passedSortOrder) {
+  var sortOrder = 1;
+  if("desc" == passedSortOrder.toLowerCase()){
+    sortOrder = -1;
+  }else{
+    sortOrder = 1;
+  }
+  
+  if(property[0] === "-") {
+      sortOrder = sortOrder == -1 ? 1 : -1;
+      property = property.substr(1, property.length - 1);
+  }
+  return function (a,b) {
+      var result = (a[property] < b[property]) ? -1 : (a[property] > b[property]) ? 1 : 0;
+      return result * sortOrder;
+  };
+}
+
+/*
+ * Function to get basic details on Data Browser Page
+ */
+function getClusterBasicDetails(){
+  $.getJSON("pulse/dataBrowserBasicDetails", function(data) { 
+
+    $('#userName').html(data.userName);
+    
+    
+  }).error(repsonseErrorHandler);
+  setTimeout("getClusterBasic()", 5000); 
+}
+
+/*Slide Height History Panel*/
+/*Slide Height*/
+
+function addSlideEvents() {
+  var slideHeight = 67; // px
+  var elements = $('.wrap');
+
+  elements.each(function() {
+    var defHeight = $(this).height();
+    if (defHeight >= slideHeight) {
+      $(this).css('height', slideHeight + 'px');
+      /* read more block */
+      $(this).find('.read-more a').click(function() {
+        var curHeight = $(this).parent().parent().height();
+
+        if (curHeight == slideHeight) {
+          $(this).parent().parent().animate({
+            height : defHeight
+          },{
+            complete:function(){
+              $('.queryHistoryScroll-pane').jScrollPane();
+            }
+          });
+          $(this).toggleClass('remore_plus').toggleClass('remore_minus');
+          /* apply the selected style to the container */
+          $(this).parent().parent().parent().addClass('selectedHistory');
+        } else {
+          $(this).parent().parent().animate({
+            height : slideHeight
+          },{
+            complete:function(){
+                $('.queryHistoryScroll-pane').jScrollPane();
+              }
+          });
+          $(this).toggleClass('remore_minus').toggleClass('remore_plus');
+          /* removes the selected style to the container */
+          $(this).parent().parent().parent().removeClass('selectedHistory');
+        }
+
+        return false;
+      });
+      /* remove Block */
+      $('.remove a').click(function() {
+        // $(this).parent('.wrap').remove();
+        $(this).closest('.container').remove();
+      });
+    }
+
+  });
+
+}
+
+


[56/79] incubator-geode git commit: Fix for GEODE-278

Posted by tu...@apache.org.
Fix for GEODE-278

While applying changes to the Region, pass in List for gathering pendingCallbacks
rather than a null on the remote members to get the same behavior as transaction host.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a49ef251
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a49ef251
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a49ef251

Branch: refs/heads/feature/GEODE-17
Commit: a49ef2519d36284f8de4badad28f7f39ccdebc63
Parents: 6708517
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Tue Aug 25 10:23:21 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:52:44 2015 +0530

----------------------------------------------------------------------
 .../gemfire/internal/cache/TXCommitMessage.java | 34 +++++++---
 .../cache/RemoteTransactionDUnitTest.java       | 68 ++++++++++++++++++++
 2 files changed, 94 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a49ef251/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXCommitMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXCommitMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXCommitMessage.java
index f012bab..94aaadc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXCommitMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXCommitMessage.java
@@ -737,21 +737,39 @@ public class TXCommitMessage extends PooledDistributionMessage implements Member
   
   public void basicProcessOps() {
     {
+      List<EntryEventImpl> pendingCallbacks = new ArrayList<>();
       Collections.sort(this.farSideEntryOps);
       Iterator it = this.farSideEntryOps.iterator();
       while (it.hasNext()) {
         try {
           RegionCommit.FarSideEntryOp entryOp = (RegionCommit.FarSideEntryOp)it.next();
-          entryOp.process();
+          entryOp.process(pendingCallbacks);
         } catch (CacheRuntimeException problem) {
           processCacheRuntimeException(problem);
         } catch (Exception e ) {
           addProcessingException(e);
         }
       }
+      firePendingCallbacks(pendingCallbacks);
     }
   }
-  
+
+  private void firePendingCallbacks(List<EntryEventImpl> callbacks) {
+    Iterator<EntryEventImpl> ci = callbacks.iterator();
+    while(ci.hasNext()) {
+      EntryEventImpl ee = ci.next();
+      if(ee.getOperation().isDestroy()) {
+        ee.getRegion().invokeTXCallbacks(EnumListenerEvent.AFTER_DESTROY, ee, true);
+      } else if(ee.getOperation().isInvalidate()) {
+        ee.getRegion().invokeTXCallbacks(EnumListenerEvent.AFTER_INVALIDATE, ee, true);
+      } else if(ee.getOperation().isCreate()) {
+        ee.getRegion().invokeTXCallbacks(EnumListenerEvent.AFTER_CREATE, ee, true);
+      } else {
+        ee.getRegion().invokeTXCallbacks(EnumListenerEvent.AFTER_UPDATE, ee, true);
+      }
+    }
+  }
+
   protected void processCacheRuntimeException(CacheRuntimeException problem) {
     if (problem instanceof RegionDestroyedException) { // catch RegionDestroyedException
       addProcessingException(problem);
@@ -1262,7 +1280,7 @@ public class TXCommitMessage extends PooledDistributionMessage implements Member
      * Apply a single tx entry op on the far side
      */
     @SuppressWarnings("synthetic-access")
-    protected void txApplyEntryOp(FarSideEntryOp entryOp)
+    protected void txApplyEntryOp(FarSideEntryOp entryOp, List<EntryEventImpl> pendingCallbacks)
     {
       if (this.r == null) {
         return;
@@ -1312,7 +1330,7 @@ public class TXCommitMessage extends PooledDistributionMessage implements Member
                               entryOp.op,
                               getEventId(entryOp),
                               entryOp.callbackArg,
-                              null /* fire inline, no pending callbacks */,
+                              pendingCallbacks,
                               entryOp.filterRoutingInfo,
                               this.msg.bridgeContext,
                               false /* origin remote */,
@@ -1328,7 +1346,7 @@ public class TXCommitMessage extends PooledDistributionMessage implements Member
                                  false /*localOp*/,
                                  getEventId(entryOp),
                                  entryOp.callbackArg,
-                                 null /* fire inline, no pending callbacks */,
+                                 pendingCallbacks,
                                  entryOp.filterRoutingInfo,
                                  this.msg.bridgeContext,
                                  null/*txEntryState*/,
@@ -1343,7 +1361,7 @@ public class TXCommitMessage extends PooledDistributionMessage implements Member
                           this.txEvent,
                           getEventId(entryOp),
                           entryOp.callbackArg,
-                          null /* fire inline, no pending callbacks */,
+                          pendingCallbacks,
                           entryOp.filterRoutingInfo,
                           this.msg.bridgeContext,
                           null/*txEntryState*/,
@@ -1658,8 +1676,8 @@ public class TXCommitMessage extends PooledDistributionMessage implements Member
       /**
        * Performs this entryOp on the farside of a tx commit.
        */
-      public void process() {
-        txApplyEntryOp(this);
+      public void process(List<EntryEventImpl> pendingCallbacks) {
+        txApplyEntryOp(this, pendingCallbacks);
       }
       
       public void processAdjunctOnly() {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a49ef251/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
index 5834622..ccff0c6 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
@@ -4244,4 +4244,72 @@ protected static class ClientListener extends CacheListenerAdapter {
     Object value = entry._getValue();
     return value;
   }
+
+  /**
+   * Install Listeners and verify that they are invoked after all tx events have been applied to the cache
+   * see GEODE-278
+   */
+  public void testNonInlineRemoteEvents() {
+    Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+    final String key1 = "nonInline-1";
+    final String key2 = "nonInline-2";
+
+    class NonInlineListener extends CacheListenerAdapter {
+      boolean assertException = false;
+
+      @Override
+      public void afterCreate(EntryEvent event) {
+        if (event.getKey().equals(key1)) {
+          if (getCache().getRegion(D_REFERENCE).get(key2) == null) {
+            assertException = true;
+          }
+        }
+      }
+    }
+
+    SerializableCallable createRegionWithListener = new SerializableCallable() {
+      @Override
+      public Object call() throws Exception {
+        createRegion(false, 0, null);
+        getCache().getRegion(D_REFERENCE).getAttributesMutator().addCacheListener(new NonInlineListener());
+        return null;
+      }
+    };
+
+    vm0.invoke(createRegionWithListener);
+    vm1.invoke(createRegionWithListener);
+
+    vm0.invoke(new SerializableCallable() {
+      @Override
+      public Object call() throws Exception {
+        Region region = getCache().getRegion(D_REFERENCE);
+        CacheTransactionManager mgr = getCache().getCacheTransactionManager();
+        mgr.begin();
+        region.put(key1, "nonInlineValue-1");
+        region.put(key2, "nonInlineValue-2");
+        mgr.commit();
+        return null;
+      }
+    });
+
+    SerializableCallable verifyAssert = new SerializableCallable() {
+      @Override
+      public Object call() throws Exception {
+        CacheListener[] listeners = getCache().getRegion(D_REFERENCE).getAttributes().getCacheListeners();
+        for (CacheListener listener : listeners) {
+          if (listener instanceof NonInlineListener) {
+            NonInlineListener l = (NonInlineListener) listener;
+            assertFalse(l.assertException);
+          }
+        }
+        return null;
+      }
+    };
+
+    vm0.invoke(verifyAssert);
+    vm1.invoke(verifyAssert);
+
+  }
 }


[71/79] incubator-geode git commit: GEODE-307: Clear DiskStoreObserver after each test

Posted by tu...@apache.org.
GEODE-307: Clear DiskStoreObserver after each test

An observer was being left over and causing later tests to fail.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8f92f8e9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8f92f8e9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8f92f8e9

Branch: refs/heads/feature/GEODE-17
Commit: 8f92f8e9923aa2cc8c26774a66603f792e4f9328
Parents: 8ff01ba
Author: Dan Smith <up...@apache.org>
Authored: Wed Sep 2 15:23:11 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:52:44 2015 +0530

----------------------------------------------------------------------
 gemfire-core/src/test/java/dunit/DistributedTestCase.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8f92f8e9/gemfire-core/src/test/java/dunit/DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/DistributedTestCase.java b/gemfire-core/src/test/java/dunit/DistributedTestCase.java
index 8aa8b6d..2e7ac03 100755
--- a/gemfire-core/src/test/java/dunit/DistributedTestCase.java
+++ b/gemfire-core/src/test/java/dunit/DistributedTestCase.java
@@ -52,6 +52,7 @@ import com.gemstone.gemfire.internal.InternalInstantiator;
 import com.gemstone.gemfire.internal.OSProcess;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.admin.ClientStatsManager;
+import com.gemstone.gemfire.internal.cache.DiskStoreObserver;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.InitialImageOperation;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
@@ -784,6 +785,7 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
     Protocol.trace = GemFireTracer.DEBUG;
     DistributionMessageObserver.setInstance(null);
     QueryObserverHolder.reset();
+    DiskStoreObserver.setInstance(null);
     if (InternalDistributedSystem.systemAttemptingReconnect != null) {
       InternalDistributedSystem.systemAttemptingReconnect.stopReconnecting();
     }


[36/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMembersRGraphService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMembersRGraphService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMembersRGraphService.java
new file mode 100644
index 0000000..2e3ed9b
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMembersRGraphService.java
@@ -0,0 +1,362 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterMembersRGraphService
+ * 
+ * This class contains implementations of getting List of Cluster members and
+ * their details
+ * 
+ * @author Anchal G
+ * @since version 7.5
+ */
+@Component
+@Service("ClusterMembersRGraph")
+// @Service("ClusterMembers")
+@Scope("singleton")
+public class ClusterMembersRGraphService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String CLUSTER = "clustor";
+  private final String MEMBER_COUNT = "memberCount";
+  private final String ID = "id";
+  private final String NAME = "name";
+  private final String DATA = "data";
+  private final String MEMORY_USAGE = "memoryUsage";
+  private final String CPU_USAGE = "cpuUsage";
+  private final String REGIONS = "regions";
+  private final String HOST = "host";
+  private final String PORT = "port";
+  private final String CLIENTS = "clients";
+  private final String GC_PAUSES = "gcPauses";
+  private final String GATEWAY_SENDER = "gatewaySender";
+  private final String GATEWAY_RECEIVER = "gatewayReceiver";
+  private final String LOAD_AVG = "loadAvg";
+  private final String SOCKETS = "sockets";
+  private final String THREADS = "threads";
+  private final String NUM_THREADS = "numThreads";
+
+  private final String MEMBER_NODE_TYPE_NORMAL = "Normal";
+  private final String MEMBER_NODE_TYPE_WARNING = "Warning";
+  private final String MEMBER_NODE_TYPE_ERROR = "Error";
+  private final String MEMBER_NODE_TYPE_SEVERE = "Severe";
+  private final String CHILDREN = "children";
+
+  // traversing the alert array list and members which have severe, error or
+  // warnings
+  // alerts saving them in three different arraylists
+  private List<String> severeAlertList;
+  private List<String> errorAlertsList;
+  private List<String> warningAlertsList;
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // Reference to repository
+    Repository repository = Repository.get();
+
+    // get cluster object
+    Cluster cluster = repository.getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // clucter's Members
+      responseJSON.put(
+          this.CLUSTER,
+          getPhysicalServerJson(cluster, repository.getJmxHost(),
+              repository.getJmxPort()));
+      responseJSON.put(this.MEMBER_COUNT, cluster.getMemberCount());
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * function used for getting all members details in format of JSON Object
+   * array defined under a cluster. This function create json based on the
+   * relation of physical host and members related to it.
+   * 
+   * @param cluster
+   * @param host
+   * @param port
+   * @return Array list of JSON objects for required fields of members in
+   *         cluster
+   */
+  private JSONObject getPhysicalServerJson(Cluster cluster, String host,
+      String port) throws JSONException {
+    Map<String, List<Cluster.Member>> physicalToMember = cluster
+        .getPhysicalToMember();
+
+    JSONObject clusterTopologyJSON = new JSONObject();
+
+    clusterTopologyJSON.put(this.ID, cluster.getClusterId());
+    clusterTopologyJSON.put(this.NAME, cluster.getClusterId());
+    JSONObject data1 = new JSONObject();
+    clusterTopologyJSON.put(this.DATA, data1);
+    JSONArray childHostArray = new JSONArray();
+    DecimalFormat df2 = new DecimalFormat(PulseConstants.DECIMAL_FORMAT_PATTERN);
+
+    updateAlertLists(cluster);
+
+    for (Map.Entry<String, List<Cluster.Member>> physicalToMem : physicalToMember
+        .entrySet()) {
+      String hostName = physicalToMem.getKey();
+      Float hostCpuUsage = 0.0F;
+      Long hostMemoryUsage = (long) 0;
+      Double hostLoadAvg = 0.0;
+      int hostNumThreads = 0;
+      Long hostSockets = (long) 0;
+      boolean hostSevere = false;
+      boolean hostError = false;
+      boolean hostWarning = false;
+      String hostStatus;
+      JSONObject childHostObject = new JSONObject();
+      childHostObject.put(this.ID, hostName);
+      childHostObject.put(this.NAME, hostName);
+
+      JSONArray membersArray = new JSONArray();
+
+      List<Cluster.Member> memberList = physicalToMem.getValue();
+      for (Cluster.Member member : memberList) {
+        JSONObject memberJSONObj = new JSONObject();
+
+        memberJSONObj.put(this.ID, member.getId());
+        memberJSONObj.put(this.NAME, member.getName());
+
+        JSONObject memberData = new JSONObject();
+
+        memberData.put("gemfireVersion", member.getGemfireVersion());
+
+        Long currentHeap = member.getCurrentHeapSize();
+        Long usedHeapSize = cluster.getUsedHeapSize();
+
+        if (usedHeapSize > 0) {
+          float heapUsage = (currentHeap.floatValue() / usedHeapSize
+              .floatValue()) * 100;
+
+          memberData.put(this.MEMORY_USAGE,
+              Double.valueOf(df2.format(heapUsage)));
+        } else
+          memberData.put(this.MEMORY_USAGE, 0);
+
+        Float currentCPUUsage = member.getCpuUsage();
+
+        memberData.put(this.CPU_USAGE,
+            Float.valueOf(df2.format(currentCPUUsage)));
+        memberData.put(this.REGIONS, member.getMemberRegions().size());
+        memberData.put(this.HOST, member.getHost());
+        if ((member.getMemberPort() == null)
+            || (member.getMemberPort().equals("")))
+          memberData.put(this.PORT, "-");
+        else
+          memberData.put(this.PORT, member.getMemberPort());
+        memberData.put(this.CLIENTS, member.getMemberClientsHMap().size());
+        memberData.put(this.GC_PAUSES, member.getGarbageCollectionCount());
+        memberData.put(this.NUM_THREADS, member.getNumThreads());
+
+        // Host CPU Usage is aggregate of all members cpu usage
+        // hostCpuUsage = hostCpuUsage + currentCPUUsage;
+        hostCpuUsage = member.getHostCpuUsage();
+        hostMemoryUsage = hostMemoryUsage + member.getCurrentHeapSize();
+        hostLoadAvg = member.getLoadAverage();
+        hostNumThreads = member.getNumThreads();
+        hostSockets = member.getTotalFileDescriptorOpen();
+
+        // defining the status of Member Icons for R Graph based on the alerts
+        // created for that member
+        String memberNodeType = "";
+        // for severe alert
+        if (severeAlertList.contains(member.getName())) {
+          memberNodeType = getMemberNodeType(member,
+              this.MEMBER_NODE_TYPE_SEVERE);
+          if (!hostSevere) {
+            hostSevere = true;
+          }
+        }
+        // for error alerts
+        else if (errorAlertsList.contains(member.getName())) {
+          memberNodeType = getMemberNodeType(member,
+              this.MEMBER_NODE_TYPE_ERROR);
+          if (!hostError) {
+            hostError = true;
+          }
+        }
+        // for warning alerts
+        else if (warningAlertsList.contains(member.getName())) {
+          memberNodeType = getMemberNodeType(member,
+              this.MEMBER_NODE_TYPE_WARNING);
+          if (!hostWarning)
+            hostWarning = true;
+        } else {
+          memberNodeType = getMemberNodeType(member,
+              this.MEMBER_NODE_TYPE_NORMAL);
+        }
+
+        memberData.put("nodeType", memberNodeType);
+        memberData.put("$type", memberNodeType);
+        memberData.put(this.GATEWAY_SENDER, member.getGatewaySenderList()
+            .size());
+        if (member.getGatewayReceiver() != null) {
+          memberData.put(this.GATEWAY_RECEIVER, "1");
+        } else {
+          memberData.put(this.GATEWAY_RECEIVER, "0");
+        }
+        memberJSONObj.put(this.DATA, memberData);
+        memberJSONObj.put(this.CHILDREN, new JSONArray());
+        membersArray.put(memberJSONObj);
+      }
+      JSONObject data = new JSONObject();
+
+      data.put(this.LOAD_AVG, hostLoadAvg);
+      data.put(this.SOCKETS, hostSockets);
+      data.put(this.THREADS, hostNumThreads);
+      data.put(this.CPU_USAGE, Double.valueOf(df2.format(hostCpuUsage)));
+      data.put(this.MEMORY_USAGE, hostMemoryUsage);
+
+      String hostNodeType;
+      // setting physical host status
+      if (hostSevere) {
+        hostStatus = this.MEMBER_NODE_TYPE_SEVERE;
+        hostNodeType = "hostSevereNode";
+      } else if (hostError) {
+        hostStatus = this.MEMBER_NODE_TYPE_ERROR;
+        hostNodeType = "hostErrorNode";
+      } else if (hostWarning) {
+        hostStatus = this.MEMBER_NODE_TYPE_WARNING;
+        hostNodeType = "hostWarningNode";
+      } else {
+        hostStatus = this.MEMBER_NODE_TYPE_NORMAL;
+        hostNodeType = "hostNormalNode";
+      }
+      data.put("hostStatus", hostStatus);
+      data.put("$type", hostNodeType);
+
+      childHostObject.put(this.DATA, data);
+
+      childHostObject.put(this.CHILDREN, membersArray);
+      childHostArray.put(childHostObject);
+    }
+    clusterTopologyJSON.put(this.CHILDREN, childHostArray);
+
+    return clusterTopologyJSON;
+  }
+
+  /**
+   * used for getting member node type based on member's current state
+   * 
+   * @param member
+   *          Member
+   * @param memberState
+   *          i.e Severe, Error, Warning or Normal
+   * @return
+   */
+  private String getMemberNodeType(Cluster.Member member, String memberState) {
+    String memberNodeType = "";
+
+    if ((member.isLocator()) && (member.isServer()) && (member.isManager())) {
+      memberNodeType = "memberLocatorManagerServer" + memberState + "Node";
+    } else if ((member.isLocator()) && (member.isServer())
+        && !(member.isManager())) {
+      memberNodeType = "memberLocatorServer" + memberState + "Node";
+    } else if ((member.isLocator()) && !(member.isServer())
+        && (member.isManager())) {
+      memberNodeType = "memberLocatorManager" + memberState + "Node";
+    } else if ((member.isLocator()) && !(member.isServer())
+        && !(member.isManager())) {
+      memberNodeType = "memberLocator" + memberState + "Node";
+    } else if (!(member.isLocator()) && (member.isServer())
+        && (member.isManager())) {
+      memberNodeType = "memberManagerServer" + memberState + "Node";
+    } else if (!(member.isLocator()) && (member.isServer())
+        && !(member.isManager())) {
+      memberNodeType = "memberServer" + memberState + "Node";
+    } else if (!(member.isLocator()) && !(member.isServer())
+        && (member.isManager())) {
+      memberNodeType = "memberManager" + memberState + "Node";
+    } else if (!(member.isLocator()) && !(member.isServer())
+        && !(member.isManager())) {
+      memberNodeType = "member" + memberState + "Node";
+    }
+    return memberNodeType;
+  }
+
+  /**
+   * function used for getting list of all the alerts and save the member names
+   * in respective error, warning and severe alert lists
+   * 
+   * @param cluster
+   */
+  private void updateAlertLists(Cluster cluster) {
+
+    severeAlertList = new ArrayList<String>();
+    errorAlertsList = new ArrayList<String>();
+    warningAlertsList = new ArrayList<String>();
+
+    Cluster.Alert[] alertsList = cluster.getAlertsList();
+
+    for (Cluster.Alert alert : alertsList) {
+      // if alert is severe
+      if (alert.getSeverity() == Cluster.Alert.SEVERE) {
+        if (errorAlertsList.contains(alert.getMemberName())) {
+          errorAlertsList.remove(alert.getMemberName());
+        } else if (warningAlertsList.contains(alert.getMemberName())) {
+          warningAlertsList.remove(alert.getMemberName());
+        }
+        if (!severeAlertList.contains(alert.getMemberName())) {
+          severeAlertList.add(alert.getMemberName());
+        }
+      }
+      // if alert is error
+      else if (alert.getSeverity() == Cluster.Alert.ERROR) {
+        if (!severeAlertList.contains(alert.getMemberName())) {
+          if (warningAlertsList.contains(alert.getMemberName())) {
+            warningAlertsList.remove(alert.getMemberName());
+          }
+          if (!errorAlertsList.contains(alert.getMemberName())) {
+            errorAlertsList.add(alert.getMemberName());
+          }
+        }
+      }
+      // if alert is warning
+      else if (alert.getSeverity() == Cluster.Alert.WARNING) {
+        if (!severeAlertList.contains(alert.getMemberName())) {
+          if (!errorAlertsList.contains(alert.getMemberName())) {
+            if (!warningAlertsList.contains(alert.getMemberName())) {
+              warningAlertsList.add(alert.getMemberName());
+            }
+          }
+        }
+      }
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemoryUsageService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemoryUsageService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemoryUsageService.java
new file mode 100644
index 0000000..f5480fa
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterMemoryUsageService.java
@@ -0,0 +1,60 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterMemoryUsageService
+ * 
+ * This class contains implementations of getting Cluster's overall current
+ * memory usage details and its trend over the time.
+ * 
+ * @author Anchal G
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterMemoryUsage")
+@Scope("singleton")
+public class ClusterMemoryUsageService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+    // clucter's Memory Usage trend added to json response object
+
+    try {
+      responseJSON.put("currentMemoryUsage", cluster.getUsedHeapSize());
+      responseJSON.put(
+          "memoryUsageTrend",
+          new JSONArray(cluster
+              .getStatisticTrend(Cluster.CLUSTER_STAT_MEMORY_USAGE)));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionService.java
new file mode 100644
index 0000000..4b0d0e9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionService.java
@@ -0,0 +1,231 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class ClusterRegionService
+ *
+ * This class contains implementations of getting Cluster's regions details
+ *
+ * @author Anchal G
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterRegion")
+@Scope("singleton")
+public class ClusterRegionService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String ENTRY_SIZE = "entrySize";
+
+  // Comparator based upon regions entry count
+  private static Comparator<Cluster.Region> regionEntryCountComparator = new Comparator<Cluster.Region>() {
+    @Override
+    public int compare(Cluster.Region r1, Cluster.Region r2) {
+      long r1Cnt = r1.getSystemRegionEntryCount();
+      long r2Cnt = r2.getSystemRegionEntryCount();
+      if (r1Cnt < r2Cnt) {
+        return -1;
+      } else if (r1Cnt > r2Cnt) {
+        return 1;
+      } else {
+        return 0;
+      }
+    }
+  };
+
+  @Override
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("clusterName", cluster.getServerName());
+      responseJSON.put("userName", userName);
+      responseJSON.put("region", getRegionJson(cluster));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * This method is used to get various regions associated with the given
+   * cluster and create json for each region fields and returns Array List for
+   * all the regions associated with given cluster
+   *
+   * @param cluster
+   * @return JSONObject Array List
+   */
+  private List<JSONObject> getRegionJson(Cluster cluster) throws JSONException {
+
+    Long totalHeapSize = cluster.getTotalHeapSize();
+    Long totalDiskUsage = cluster.getTotalBytesOnDisk();
+
+    Map<String, Cluster.Region> clusterRegions = cluster.getClusterRegions();
+
+    List<Cluster.Region> clusterRegionsList = new ArrayList<Cluster.Region>();
+    clusterRegionsList.addAll(clusterRegions.values());
+
+    Collections.sort(clusterRegionsList, regionEntryCountComparator);
+
+    List<JSONObject> regionListJson = new ArrayList<JSONObject>();
+    for (int count = 0; count < clusterRegionsList.size(); count++) {
+      Cluster.Region reg = clusterRegionsList.get(count);
+      JSONObject regionJSON = new JSONObject();
+
+      regionJSON.put("name", reg.getName());
+      regionJSON.put("totalMemory", totalHeapSize);
+      regionJSON.put("systemRegionEntryCount", reg.getSystemRegionEntryCount());
+      regionJSON.put("memberCount", reg.getMemberCount());
+
+      final String regionType = reg.getRegionType();
+      regionJSON.put("type", regionType);
+      regionJSON.put("getsRate", reg.getGetsRate());
+      regionJSON.put("putsRate", reg.getPutsRate());
+
+      Cluster.Member[] clusterMembersList = cluster.getMembers();
+
+      JSONArray memberNameArray = new JSONArray();
+      for (String memberName : reg.getMemberName()) {
+        for (Cluster.Member member : clusterMembersList) {
+          String name = member.getName();
+          name = name.replace(":", "-");
+          String id = member.getId();
+          id = id.replace(":", "-");
+
+          if ((memberName.equals(id)) || (memberName.equals(name))) {
+            JSONObject regionMember = new JSONObject();
+            regionMember.put("id", member.getId());
+            regionMember.put("name", member.getName());
+            memberNameArray.put(regionMember);
+            break;
+          }
+        }
+      }
+
+      regionJSON.put("memberNames", memberNameArray);
+      regionJSON.put("entryCount", reg.getSystemRegionEntryCount());
+
+      Boolean persistent = reg.getPersistentEnabled();
+      if (persistent) {
+        regionJSON.put("persistence", VALUE_ON);
+      } else {
+        regionJSON.put("persistence", VALUE_OFF);
+      }
+
+      Boolean isEnableOffHeapMemory = reg.isEnableOffHeapMemory();
+      if (isEnableOffHeapMemory) {
+        regionJSON.put("isEnableOffHeapMemory", VALUE_ON);
+      } else {
+        regionJSON.put("isEnableOffHeapMemory", VALUE_OFF);
+      }
+
+      Boolean isHDFSWriteOnly = reg.isHdfsWriteOnly();
+      if (regionType.startsWith("HDFS")) {
+        if (isHDFSWriteOnly) {
+          regionJSON.put("isHDFSWriteOnly", VALUE_ON);
+        } else {
+          regionJSON.put("isHDFSWriteOnly", VALUE_OFF);
+        }
+      } else {
+        regionJSON.put("isHDFSWriteOnly", VALUE_NA);
+      }
+
+      String regCompCodec = reg.getCompressionCodec();
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(regCompCodec)) {
+        regionJSON.put("compressionCodec", reg.getCompressionCodec());
+      } else {
+        regionJSON.put("compressionCodec", VALUE_NA);
+      }
+
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        // Convert region path to dot separated region path
+        regionJSON.put("regionPath",
+            StringUtils.getTableNameFromRegionName(reg.getFullPath()));
+      } else {
+        regionJSON.put("regionPath", reg.getFullPath());
+      }
+
+      regionJSON
+          .put(
+              "memoryReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_GETS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "memoryWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_PUTS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_READS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_WRITES_PER_SEC_TREND)));
+      regionJSON.put("emptyNodes", reg.getEmptyNode());
+      Long entrySize = reg.getEntrySize();
+      DecimalFormat form = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN_2);
+      String entrySizeInMB = form.format(entrySize / (1024f * 1024f));
+
+      if (entrySize < 0) {
+        regionJSON.put(this.ENTRY_SIZE, VALUE_NA);
+      } else {
+        regionJSON.put(this.ENTRY_SIZE, entrySizeInMB);
+      }
+      regionJSON.put("dataUsage", reg.getDiskUsage());
+      regionJSON.put("wanEnabled", reg.getWanEnabled());
+      regionJSON.put("totalDataUsage", totalDiskUsage);
+
+      regionJSON.put("memoryUsage", entrySizeInMB);
+
+      regionListJson.add(regionJSON);
+    }
+
+    return regionListJson;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionsService.java
new file mode 100644
index 0000000..ab862c9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterRegionsService.java
@@ -0,0 +1,233 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class ClusterRegionsService
+ * 
+ * This class contains implementations of getting Cluster's regions details
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+
+@Component
+@Service("ClusterRegions")
+@Scope("singleton")
+public class ClusterRegionsService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String ENTRY_SIZE = "entrySize";
+
+  // Comparator based upon regions entry count
+  private static Comparator<Cluster.Region> regionEntryCountComparator = new Comparator<Cluster.Region>() {
+    @Override
+    public int compare(Cluster.Region r1, Cluster.Region r2) {
+      long r1Cnt = r1.getSystemRegionEntryCount();
+      long r2Cnt = r2.getSystemRegionEntryCount();
+      if (r1Cnt < r2Cnt) {
+        return -1;
+      } else if (r1Cnt > r2Cnt) {
+        return 1;
+      } else {
+        return 0;
+      }
+    }
+  };
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("regions", getRegionJson(cluster));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * This method is used to get various regions associated with the given
+   * cluster and create json for each region fields and returns Array List for
+   * all the regions associated with given cluster
+   * 
+   * @param cluster
+   * @return JSONObject Array List
+   */
+  private List<JSONObject> getRegionJson(Cluster cluster) throws JSONException {
+
+    Long totalHeapSize = cluster.getTotalHeapSize();
+    Long totalDiskUsage = cluster.getTotalBytesOnDisk();
+
+    Map<String, Cluster.Region> clusterRegions = cluster.getClusterRegions();
+
+    List<Cluster.Region> clusterRegionsList = new ArrayList<Cluster.Region>();
+    clusterRegionsList.addAll(clusterRegions.values());
+
+    Collections.sort(clusterRegionsList, regionEntryCountComparator);
+
+    List<JSONObject> regionListJson = new ArrayList<JSONObject>();
+    for (int count = 0; count < clusterRegionsList.size(); count++) {
+      Cluster.Region reg = clusterRegionsList.get(count);
+      JSONObject regionJSON = new JSONObject();
+
+      regionJSON.put("name", reg.getName());
+      regionJSON.put("totalMemory", totalHeapSize);
+      regionJSON.put("systemRegionEntryCount", reg.getSystemRegionEntryCount());
+      regionJSON.put("memberCount", reg.getMemberCount());
+
+      final String regionType = reg.getRegionType();
+      regionJSON.put("type", regionType);
+      regionJSON.put("getsRate", reg.getGetsRate());
+      regionJSON.put("putsRate", reg.getPutsRate());
+
+      Cluster.Member[] clusterMembersList = cluster.getMembers();
+
+      JSONArray memberNameArray = new JSONArray();
+      for (String memberName : reg.getMemberName()) {
+        for (Cluster.Member member : clusterMembersList) {
+          String name = member.getName();
+          name = name.replace(":", "-");
+          String id = member.getId();
+          id = id.replace(":", "-");
+
+          if ((memberName.equals(id)) || (memberName.equals(name))) {
+            JSONObject regionMember = new JSONObject();
+            regionMember.put("id", member.getId());
+            regionMember.put("name", member.getName());
+            memberNameArray.put(regionMember);
+            break;
+          }
+        }
+      }
+
+      regionJSON.put("memberNames", memberNameArray);
+      regionJSON.put("entryCount", reg.getSystemRegionEntryCount());
+
+      Boolean persistent = reg.getPersistentEnabled();
+      if (persistent) {
+        regionJSON.put("persistence", this.VALUE_ON);
+      } else {
+        regionJSON.put("persistence", this.VALUE_OFF);
+      }
+
+      Boolean isEnableOffHeapMemory = reg.isEnableOffHeapMemory();
+      if (isEnableOffHeapMemory) {
+        regionJSON.put("isEnableOffHeapMemory", this.VALUE_ON);
+      } else {
+        regionJSON.put("isEnableOffHeapMemory", this.VALUE_OFF);
+      }
+
+      Boolean isHDFSWriteOnly = reg.isHdfsWriteOnly();
+      if (regionType.startsWith("HDFS")) {
+        if (isHDFSWriteOnly) {
+          regionJSON.put("isHDFSWriteOnly", this.VALUE_ON);
+        } else {
+          regionJSON.put("isHDFSWriteOnly", this.VALUE_OFF);
+        }
+      } else {
+        regionJSON.put("isHDFSWriteOnly", this.VALUE_NA);
+      }
+
+      String regCompCodec = reg.getCompressionCodec();
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(regCompCodec)) {
+        regionJSON.put("compressionCodec", reg.getCompressionCodec());
+      } else {
+        regionJSON.put("compressionCodec", this.VALUE_NA);
+      }
+
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        // Convert region path to dot separated region path
+        regionJSON.put("regionPath",
+            StringUtils.getTableNameFromRegionName(reg.getFullPath()));
+        regionJSON.put("id",
+            StringUtils.getTableNameFromRegionName(reg.getFullPath()));
+      } else {
+        regionJSON.put("regionPath", reg.getFullPath());
+        regionJSON.put("id", reg.getFullPath());
+      }
+
+      regionJSON
+          .put(
+              "memoryReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_GETS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "memoryWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_PUTS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_READS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_WRITES_PER_SEC_TREND)));
+      regionJSON.put("emptyNodes", reg.getEmptyNode());
+      Long entrySize = reg.getEntrySize();
+      DecimalFormat form = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN_2);
+      String entrySizeInMB = form.format(entrySize / (1024f * 1024f));
+
+      if (entrySize < 0) {
+        regionJSON.put(this.ENTRY_SIZE, this.VALUE_NA);
+      } else {
+        regionJSON.put(this.ENTRY_SIZE, entrySizeInMB);
+      }
+      regionJSON.put("dataUsage", reg.getDiskUsage());
+      regionJSON.put("wanEnabled", reg.getWanEnabled());
+      regionJSON.put("totalDataUsage", totalDiskUsage);
+
+      regionJSON.put("memoryUsage", entrySizeInMB);
+
+      regionListJson.add(regionJSON);
+    }
+
+    return regionListJson;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionService.java
new file mode 100644
index 0000000..3bf79ff
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionService.java
@@ -0,0 +1,268 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+import com.vmware.gemfire.tools.pulse.internal.util.TimeUtils;
+
+/**
+ * Class ClusterSelectedRegionService
+ *
+ * This class contains implementations of getting Cluster's selected region details
+ *
+ * @author Riya Bhandekar
+ * @since version 7.5 cedar  2014-03-01
+ */
+
+@Component
+@Service("ClusterSelectedRegion")
+@Scope("singleton")
+public class ClusterSelectedRegionService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String ENTRY_SIZE = "entrySize";
+
+  // Comparator based upon regions entry count
+  private static Comparator<Cluster.Member> memberCurrentHeapUsageComparator = new Comparator<Cluster.Member>() {
+    @Override
+    public int compare(Cluster.Member m1, Cluster.Member m2) {
+      long m1HeapUsage = m1.getCurrentHeapSize();
+      long m2HeapUsage = m2.getCurrentHeapSize();
+      if (m1HeapUsage < m2HeapUsage) {
+        return -1;
+      } else if (m1HeapUsage > m2HeapUsage) {
+        return 1;
+      } else {
+        return 0;
+      }
+    }
+  };
+
+  @Override
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+    String pulseData = request.getParameter("pulseData");
+    JSONObject parameterMap = new JSONObject(pulseData);
+    String selectedRegionFullPath = parameterMap.getJSONObject("ClusterSelectedRegion").getString("regionFullPath");
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("clusterName", cluster.getServerName());
+      responseJSON.put("userName", userName);
+      responseJSON.put("selectedRegion", getSelectedRegionJson(cluster, selectedRegionFullPath));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * Create JSON for selected cluster region
+   *
+   * @param cluster
+   * @return JSONObject Array List
+   */
+  private JSONObject getSelectedRegionJson(Cluster cluster, String selectedRegionFullPath) throws JSONException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    Long totalHeapSize = cluster.getTotalHeapSize();
+    Long totalDiskUsage = cluster.getTotalBytesOnDisk();
+
+    Cluster.Region reg = cluster.getClusterRegion(selectedRegionFullPath);
+    if(reg != null){
+      JSONObject regionJSON = new JSONObject();
+
+      regionJSON.put("name", reg.getName());
+      regionJSON.put("path", reg.getFullPath());
+      regionJSON.put("totalMemory", totalHeapSize);
+      regionJSON.put("systemRegionEntryCount", reg.getSystemRegionEntryCount());
+      regionJSON.put("memberCount", reg.getMemberCount());
+
+      final String regionType = reg.getRegionType();
+      regionJSON.put("type", regionType);
+      regionJSON.put("getsRate", reg.getGetsRate());
+      regionJSON.put("putsRate", reg.getPutsRate());
+      regionJSON.put("lruEvictionRate", reg.getLruEvictionRate());
+
+      DecimalFormat df2 = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN);
+      Cluster.Member[] clusterMembersList = cluster.getMembers();
+
+      // collect members of this region
+      List<Cluster.Member> clusterMembersL = new ArrayList<Cluster.Member>();
+      for (String memberName : reg.getMemberName()) {
+       for (Cluster.Member member : clusterMembersList) {
+          String name = member.getName();
+          name = name.replace(":", "-");
+          String id = member.getId();
+          id = id.replace(":", "-");
+
+          if ((memberName.equals(id)) || (memberName.equals(name))) {
+             clusterMembersL.add(member);
+          }
+        }
+      }
+
+      // sort members of this region
+      Collections.sort(clusterMembersL, memberCurrentHeapUsageComparator);
+      // return sorted member list by heap usage
+      JSONArray memberArray = new JSONArray();
+      for (Cluster.Member member : clusterMembersL) {
+
+          JSONObject regionMember = new JSONObject();
+          regionMember.put("memberId", member.getId());
+          regionMember.put("name", member.getName());
+          regionMember.put("host", member.getHost());
+
+          long usedHeapSize = cluster.getUsedHeapSize();
+          long currentHeap = member.getCurrentHeapSize();
+          if (usedHeapSize > 0) {
+            float heapUsage = ((float) currentHeap / (float) usedHeapSize) * 100;
+            regionMember.put("heapUsage", Double.valueOf(df2.format(heapUsage)));
+          } else {
+            regionMember.put("heapUsage", 0);
+          }
+          Float currentCPUUsage = member.getCpuUsage();
+
+          regionMember.put("cpuUsage", Float.valueOf(df2.format(currentCPUUsage)));
+          regionMember.put("currentHeapUsage", member.getCurrentHeapSize());
+          regionMember.put("isManager", member.isManager());
+          regionMember.put("uptime", TimeUtils.convertTimeSecondsToHMS(member.getUptime()));
+
+          regionMember.put("loadAvg", member.getLoadAverage());
+          regionMember.put("sockets", member.getTotalFileDescriptorOpen());
+          regionMember.put("threads", member.getNumThreads());
+
+          if (PulseController.getPulseProductSupport().equalsIgnoreCase(
+              PulseConstants.PRODUCT_NAME_SQLFIRE)){
+            regionMember.put("clients", member.getNumSqlfireClients());
+          }else{
+            regionMember.put("clients", member.getMemberClientsHMap().size());
+          }
+          regionMember.put("queues", member.getQueueBacklog());
+          memberArray.put(regionMember);
+      }
+
+      regionJSON.put("members", memberArray);
+      regionJSON.put("entryCount", reg.getSystemRegionEntryCount());
+
+      Boolean persistent = reg.getPersistentEnabled();
+      if (persistent) {
+        regionJSON.put("persistence", PulseService.VALUE_ON);
+      } else {
+        regionJSON.put("persistence", PulseService.VALUE_OFF);
+      }
+
+      Boolean isEnableOffHeapMemory = reg.isEnableOffHeapMemory();
+      if (isEnableOffHeapMemory) {
+        regionJSON.put("isEnableOffHeapMemory", PulseService.VALUE_ON);
+      } else {
+        regionJSON.put("isEnableOffHeapMemory", PulseService.VALUE_OFF);
+      }
+
+      Boolean isHDFSWriteOnly = reg.isHdfsWriteOnly();
+      if (regionType.startsWith("HDFS")) {
+        if (isHDFSWriteOnly) {
+          regionJSON.put("isHDFSWriteOnly", PulseService.VALUE_ON);
+        } else {
+          regionJSON.put("isHDFSWriteOnly", PulseService.VALUE_OFF);
+        }
+      } else {
+        regionJSON.put("isHDFSWriteOnly", PulseService.VALUE_NA);
+      }
+
+      String regCompCodec = reg.getCompressionCodec();
+      if (StringUtils.isNotNullNotEmptyNotWhiteSpace(regCompCodec)) {
+        regionJSON.put("compressionCodec", reg.getCompressionCodec());
+      } else {
+        regionJSON.put("compressionCodec", PulseService.VALUE_NA);
+      }
+
+      if (PulseConstants.PRODUCT_NAME_SQLFIRE.equalsIgnoreCase(PulseController
+          .getPulseProductSupport())) {
+        // Convert region path to dot separated region path
+        regionJSON.put("regionPath",
+            StringUtils.getTableNameFromRegionName(reg.getFullPath()));
+      } else {
+        regionJSON.put("regionPath", reg.getFullPath());
+      }
+
+      regionJSON
+          .put(
+              "memoryReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_GETS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "memoryWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_PUTS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskReadsTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_READS_PER_SEC_TREND)));
+      regionJSON
+          .put(
+              "diskWritesTrend",
+              new JSONArray(
+                  reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_WRITES_PER_SEC_TREND)));
+      regionJSON.put("emptyNodes", reg.getEmptyNode());
+      Long entrySize = reg.getEntrySize();
+      DecimalFormat form = new DecimalFormat(
+          PulseConstants.DECIMAL_FORMAT_PATTERN_2);
+      String entrySizeInMB = form.format(entrySize / (1024f * 1024f));
+      if (entrySize < 0) {
+        regionJSON.put(this.ENTRY_SIZE, PulseService.VALUE_NA);
+      } else {
+        regionJSON.put(this.ENTRY_SIZE, entrySizeInMB);
+      }
+      regionJSON.put("dataUsage", reg.getDiskUsage());
+      regionJSON.put("wanEnabled", reg.getWanEnabled());
+      regionJSON.put("totalDataUsage", totalDiskUsage);
+      regionJSON.put("memoryUsage", entrySizeInMB);
+
+      LOGGER.fine("calling getSelectedRegionJson :: regionJSON = " + regionJSON);
+      return regionJSON;
+    } else {
+      JSONObject responseJSON = new JSONObject();
+      responseJSON.put("errorOnRegion", "Region [" + selectedRegionFullPath
+          + "] is not available");
+      return responseJSON;
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionsMemberService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionsMemberService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionsMemberService.java
new file mode 100644
index 0000000..d57c6dd
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterSelectedRegionsMemberService.java
@@ -0,0 +1,139 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster.RegionOnMember;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+
+/**
+ * Class ClusterSelectedRegionsMemberService
+ *
+ * This class contains implementations of getting Cluster's selected region's member specific details
+ * for all members in that region
+ *
+ * @author Riya Bhandekar
+ * @since version 7.5 cedar 2014-03-01
+ */
+
+@Component
+@Service("ClusterSelectedRegionsMember")
+@Scope("singleton")
+public class ClusterSelectedRegionsMemberService implements PulseService {
+
+  //Comparator based upon regions entry count
+  private static Comparator<Cluster.RegionOnMember> romEntryCountComparator = new Comparator<Cluster.RegionOnMember>() {
+   @Override
+     public int compare(Cluster.RegionOnMember m1, Cluster.RegionOnMember m2) {
+       long m1EntryCount = m1.getEntryCount();
+       long m2EntryCount = m2.getEntryCount();
+       if (m1EntryCount < m2EntryCount) {
+         return -1;
+       } else if (m1EntryCount > m2EntryCount) {
+         return 1;
+       } else {
+         return 0;
+       }
+     }
+  };
+
+  @Override
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    String userName = request.getUserPrincipal().getName();
+    String pulseData = request.getParameter("pulseData");
+    JSONObject parameterMap = new JSONObject(pulseData);
+    String selectedRegionFullPath = parameterMap.getJSONObject("ClusterSelectedRegionsMember").getString("regionFullPath");
+    LOGGER.finest("ClusterSelectedRegionsMemberService selectedRegionFullPath = " + selectedRegionFullPath);
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      // getting cluster's Regions
+      responseJSON.put("clusterName", cluster.getServerName());
+      responseJSON.put("userName", userName);
+      responseJSON.put("selectedRegionsMembers", getSelectedRegionsMembersJson(cluster, selectedRegionFullPath));
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+  /**
+   * Create JSON for selected cluster region's all members
+   *
+   * @param cluster, region path
+   * @return JSONObject Array List
+   */
+  private JSONObject getSelectedRegionsMembersJson(Cluster cluster, String selectedRegionFullPath) throws JSONException {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    Cluster.Region reg = cluster.getClusterRegion(selectedRegionFullPath);
+    if(reg != null){
+      JSONObject regionMemberJSON = new JSONObject();
+      RegionOnMember[] regionOnMembers = reg.getRegionOnMembers();
+
+      //sort on entry count
+      List<RegionOnMember> romList = Arrays.asList(regionOnMembers);
+      Collections.sort(romList, romEntryCountComparator);
+
+      for(RegionOnMember rom : romList) {
+
+        JSONObject memberJSON = new JSONObject();
+        memberJSON.put("memberName", rom.getMemberName());
+        memberJSON.put("regionFullPath", rom.getRegionFullPath());
+        memberJSON.put("entryCount", rom.getEntryCount());
+        memberJSON.put("entrySize", rom.getEntrySize());
+        memberJSON.put("accessor", ((rom.getLocalMaxMemory() == 0) ? "True" : "False"));
+        LOGGER.finest("calling getSelectedRegionsMembersJson :: rom.getLocalMaxMemory() = " + rom.getLocalMaxMemory());
+        memberJSON.put(
+            "memoryReadsTrend", new JSONArray(rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_GETS_PER_SEC_TREND)));
+        LOGGER.finest("memoryReadsTrend = " + rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_GETS_PER_SEC_TREND).length);
+        memberJSON.put(
+            "memoryWritesTrend", new JSONArray(rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_PUTS_PER_SEC_TREND)));
+        LOGGER.finest("memoryWritesTrend = " + rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_PUTS_PER_SEC_TREND).length);
+        memberJSON.put(
+            "diskReadsTrend", new JSONArray(rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_DISK_READS_PER_SEC_TREND)));
+        LOGGER.finest("diskReadsTrend = " + rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_DISK_READS_PER_SEC_TREND).length);
+        memberJSON.put(
+            "diskWritesTrend", new JSONArray(rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_DISK_WRITES_PER_SEC_TREND)));
+        LOGGER.finest("diskWritesTrend = " + rom.getRegionOnMemberStatisticTrend(RegionOnMember.REGION_ON_MEMBER_STAT_DISK_WRITES_PER_SEC_TREND).length);
+        regionMemberJSON.put(rom.getMemberName(), memberJSON);
+      }
+
+      LOGGER.fine("calling getSelectedRegionsMembersJson :: regionJSON = " + regionMemberJSON);
+      return regionMemberJSON;
+    } else {
+      JSONObject responseJSON = new JSONObject();
+      responseJSON.put("errorOnRegion", "Region [" + selectedRegionFullPath
+          + "] is not available");
+      return responseJSON;
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterWANInfoService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterWANInfoService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterWANInfoService.java
new file mode 100644
index 0000000..7f6be08
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/ClusterWANInfoService.java
@@ -0,0 +1,72 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Class ClusterWANInfoService
+ * 
+ * This class contains implementations of getting Cluster's WAN Informations
+ * (connected clusters)
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("ClusterWANInfo")
+@Scope("singleton")
+public class ClusterWANInfoService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    // ArrayList<Cluster> connectedClusters = cluster.getConnectedClusterList();
+    JSONArray connectedClusterListJson = new JSONArray();
+
+    try {
+
+      for (Map.Entry<String, Boolean> entry : cluster.getWanInformation()
+          .entrySet()) {
+        JSONObject clusterJSON = new JSONObject();
+        clusterJSON.put("clusterId", entry.getKey());
+        clusterJSON.put("name", entry.getKey());
+        clusterJSON.put("status", entry.getValue());
+
+        connectedClusterListJson.put(clusterJSON);
+      }
+      // Response JSON
+      responseJSON.put("connectedClusters", connectedClusterListJson);
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberAsynchEventQueuesService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberAsynchEventQueuesService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberAsynchEventQueuesService.java
new file mode 100644
index 0000000..31a5cfb
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberAsynchEventQueuesService.java
@@ -0,0 +1,97 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberAsynchEventQueuesService
+ * 
+ * This class contains implementations of getting Asynchronous Event Queues
+ * details of Cluster Member.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberAsynchEventQueues")
+@Scope("singleton")
+public class MemberAsynchEventQueuesService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject(
+          "MemberAsynchEventQueues").getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+
+      if (clusterMember != null) {
+        // response
+        Cluster.AsyncEventQueue[] asyncEventQueues = clusterMember
+            .getMemberAsyncEventQueueList();
+        JSONArray asyncEventQueueJsonList = new JSONArray();
+
+        if (asyncEventQueues != null && asyncEventQueues.length > 0) {
+
+          responseJSON.put("isAsyncEventQueuesPresent", true);
+
+          for (Cluster.AsyncEventQueue asyncEventQueue : asyncEventQueues) {
+            JSONObject asyncEventQueueJSON = new JSONObject();
+            asyncEventQueueJSON.put("id", asyncEventQueue.getId());
+            asyncEventQueueJSON.put("primary", asyncEventQueue.getPrimary());
+            asyncEventQueueJSON.put("senderType", asyncEventQueue.isParallel());
+            asyncEventQueueJSON
+                .put("batchSize", asyncEventQueue.getBatchSize());
+            asyncEventQueueJSON.put("batchTimeInterval",
+                asyncEventQueue.getBatchTimeInterval());
+            asyncEventQueueJSON.put("batchConflationEnabled",
+                asyncEventQueue.isBatchConflationEnabled());
+            asyncEventQueueJSON.put("asyncEventListener",
+                asyncEventQueue.getAsyncEventListener());
+            asyncEventQueueJSON.put("queueSize",
+                asyncEventQueue.getEventQueueSize());
+
+            asyncEventQueueJsonList.put(asyncEventQueueJSON);
+          }
+          responseJSON.put("asyncEventQueues", asyncEventQueueJsonList);
+        } else {
+          responseJSON.put("isAsyncEventQueuesPresent", false);
+        }
+
+      }
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberClientsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberClientsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberClientsService.java
new file mode 100644
index 0000000..3279130
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberClientsService.java
@@ -0,0 +1,113 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.util.Formatter;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+import com.vmware.gemfire.tools.pulse.internal.util.TimeUtils;
+
+/**
+ * Class MemberClientsService
+ * 
+ * This class contains implementations of getting Memeber's Clients.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberClients")
+@Scope("singleton")
+public class MemberClientsService implements PulseService {
+
+  // String constants used for forming a json response
+  private final String NAME = "name";
+  private final String HOST = "host";
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberClients")
+          .getString("memberName");
+
+      JSONArray clientListJson = new JSONArray();
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        responseJSON.put("memberId", clusterMember.getId());
+        responseJSON.put(this.NAME, clusterMember.getName());
+        responseJSON.put(this.HOST, clusterMember.getHost());
+
+        // member's clients
+
+        Cluster.Client[] memberClients = clusterMember.getMemberClients();
+        for (Cluster.Client memberClient : memberClients) {
+          JSONObject regionJSON = new JSONObject();
+          regionJSON.put("clientId", memberClient.getId());
+          regionJSON.put(this.NAME, memberClient.getName());
+          regionJSON.put(this.HOST, memberClient.getHost());
+          regionJSON.put("queueSize", memberClient.getQueueSize());
+          regionJSON.put("clientCQCount", memberClient.getClientCQCount()); 
+          if(memberClient.isConnected()){
+            regionJSON.put("isConnected", "Yes");
+          }else{
+            regionJSON.put("isConnected", "No");
+          }
+          
+          if(memberClient.isSubscriptionEnabled()){ 
+            regionJSON.put("isSubscriptionEnabled", "Yes"); 
+          }else{ 
+            regionJSON.put("isSubscriptionEnabled", "No"); 
+          } 
+
+          regionJSON.put("uptime",
+              TimeUtils.convertTimeSecondsToHMS(memberClient.getUptime()));
+          Formatter fmt = new Formatter();
+          regionJSON.put("cpuUsage",
+              fmt.format("%.4f", memberClient.getCpuUsage()).toString());
+          // regionJSON.put("cpuUsage", memberClient.getCpuUsage());
+          regionJSON.put("threads", memberClient.getThreads());
+          regionJSON.put("gets", memberClient.getGets());
+          regionJSON.put("puts", memberClient.getPuts());
+
+          clientListJson.put(regionJSON);
+          fmt.close();
+
+        }
+        responseJSON.put("memberClients", clientListJson);
+      }
+      // Send json response
+      return responseJSON;
+
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
new file mode 100644
index 0000000..a4b5c4d
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDetailsService.java
@@ -0,0 +1,119 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.text.DecimalFormat;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberDetailsService
+ * 
+ * This class contains implementations of getting Memeber's Statistics.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberDetails")
+@Scope("singleton")
+public class MemberDetailsService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    String userName = request.getUserPrincipal().getName();
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberDetails")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        responseJSON.put("memberId", clusterMember.getId());
+        responseJSON.put("name", clusterMember.getName());
+        responseJSON.put("host", clusterMember.getHost());
+        responseJSON.put("clusterId", cluster.getId());
+        responseJSON.put("clusterName", cluster.getServerName());
+        responseJSON.put("userName", userName);
+        responseJSON.put("loadAverage", clusterMember.getLoadAverage());
+        responseJSON.put("sockets", clusterMember.getTotalFileDescriptorOpen());
+        responseJSON.put("threads", clusterMember.getNumThreads());
+        responseJSON.put("offHeapFreeSize", clusterMember.getOffHeapFreeSize());
+        responseJSON.put("offHeapUsedSize", clusterMember.getOffHeapUsedSize());
+        responseJSON.put("regionsCount", clusterMember.getMemberRegionsList().length);
+
+        // Number of member clients
+        if (PulseController.getPulseProductSupport().equalsIgnoreCase(
+            PulseConstants.PRODUCT_NAME_SQLFIRE)){
+          responseJSON.put("numClients", clusterMember.getNumSqlfireClients());
+        }else{
+          responseJSON.put("numClients", clusterMember.getMemberClientsHMap().size());
+        }
+
+        DecimalFormat df2 = new DecimalFormat(
+            PulseConstants.DECIMAL_FORMAT_PATTERN);
+        Long diskUsageVal = clusterMember.getTotalDiskUsage();
+        Double diskUsage = diskUsageVal.doubleValue() / 1024;
+
+        responseJSON.put("diskStorageUsed",
+            Double.valueOf(df2.format(diskUsage)));
+
+        Cluster.Alert[] alertsList = cluster.getAlertsList();
+
+        String status = "Normal";
+
+        for (Cluster.Alert alert : alertsList) {
+          if (clusterMember.getName().equals(alert.getMemberName())) {
+            if (alert.getSeverity() == Cluster.Alert.SEVERE) {
+              status = "Severe";
+              break;
+            } else if (alert.getSeverity() == Cluster.Alert.ERROR) {
+              status = "Error";
+            } else if (alert.getSeverity() == Cluster.Alert.WARNING) {
+              status = "Warning";
+            }
+          }
+        }
+
+        responseJSON.put("status", status);
+
+      } else {
+        responseJSON.put("errorOnMember", "Member [" + memberName
+            + "] is not available");
+      }
+
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDiskThroughputService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDiskThroughputService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDiskThroughputService.java
new file mode 100644
index 0000000..265ff44
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberDiskThroughputService.java
@@ -0,0 +1,83 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberDiskThroughputService
+ * 
+ * This class contains implementations for getting Memeber's current Disk
+ * Throughput trends over the time.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberDiskThroughput")
+@Scope("singleton")
+public class MemberDiskThroughputService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    try {
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberDiskThroughput")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+
+      if (clusterMember != null) {
+        // response
+        responseJSON.put("throughputWrites",
+            clusterMember.getThroughputWrites());
+        responseJSON
+            .put(
+                "throughputWritesTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_THROUGHPUT_WRITES)));
+        responseJSON
+            .put("throughputReads", clusterMember.getThroughputWrites());
+        responseJSON
+            .put(
+                "throughputReadsTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_THROUGHPUT_READS)));
+      }
+
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGCPausesService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGCPausesService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGCPausesService.java
new file mode 100644
index 0000000..aa778a9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGCPausesService.java
@@ -0,0 +1,75 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberGCPausesService
+ * 
+ * This class contains implementations of getting Memeber's GC Pauses (JVM
+ * Pauses) details and its trend over the time.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+
+@Component
+@Service("MemberGCPauses")
+@Scope("singleton")
+public class MemberGCPausesService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberGCPauses")
+          .getString("memberName");
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        // response
+        responseJSON
+            .put(
+                "gcPausesTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_GARBAGE_COLLECTION)));
+        responseJSON.put("gcPausesCount",
+            clusterMember.getGarbageCollectionCount());
+      }
+
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGatewayHubService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGatewayHubService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGatewayHubService.java
new file mode 100644
index 0000000..ade9f5a
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberGatewayHubService.java
@@ -0,0 +1,153 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberGatewayHubService
+ * 
+ * This class contains implementations of getting Gateway Receivers and Senders
+ * details of Cluster Member.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberGatewayHub")
+@Scope("singleton")
+public class MemberGatewayHubService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    try {
+
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberGatewayHub")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+
+      if (clusterMember != null) {
+        // response
+        // get gateway receiver
+        Cluster.GatewayReceiver gatewayReceiver = clusterMember
+            .getGatewayReceiver();
+
+        Boolean isGateway = false;
+
+        if (gatewayReceiver != null) {
+          responseJSON.put("isGatewayReceiver", true);
+          responseJSON.put("listeningPort", gatewayReceiver.getListeningPort());
+          responseJSON
+              .put("linkTroughput", gatewayReceiver.getLinkThroughput());
+          responseJSON.put("avgBatchLatency",
+              gatewayReceiver.getAvgBatchProcessingTime());
+        } else {
+          responseJSON.put("isGatewayReceiver", false);
+        }
+
+        // get gateway senders
+        Cluster.GatewaySender[] gatewaySenders = clusterMember
+            .getMemberGatewaySenders();
+
+        if (gatewaySenders.length > 0) {
+          isGateway = true;
+        }
+        responseJSON.put("isGatewaySender", isGateway);
+        // Senders
+        JSONArray gatewaySendersJsonList = new JSONArray();
+
+        for (Cluster.GatewaySender gatewaySender : gatewaySenders) {
+          JSONObject gatewaySenderJSON = new JSONObject();
+          gatewaySenderJSON.put("id", gatewaySender.getId());
+          gatewaySenderJSON.put("queueSize", gatewaySender.getQueueSize());
+          gatewaySenderJSON.put("status", gatewaySender.getStatus());
+          gatewaySenderJSON.put("primary", gatewaySender.getPrimary());
+          gatewaySenderJSON.put("senderType", gatewaySender.getSenderType());
+          gatewaySenderJSON.put("batchSize", gatewaySender.getBatchSize());
+          gatewaySenderJSON.put("PersistenceEnabled",
+              gatewaySender.getPersistenceEnabled());
+          gatewaySenderJSON.put("remoteDSId",
+              gatewaySender.getRemoteDSId());
+          gatewaySenderJSON.put("eventsExceedingAlertThreshold",
+              gatewaySender.getEventsExceedingAlertThreshold());
+
+          gatewaySendersJsonList.put(gatewaySenderJSON);
+        }
+        // senders response
+        responseJSON.put("gatewaySenders", gatewaySendersJsonList);
+
+        // async event queues
+        Cluster.AsyncEventQueue[] asyncEventQueues = clusterMember.getMemberAsyncEventQueueList();
+        JSONArray asyncEventQueueJsonList = new JSONArray();
+
+        for (Cluster.AsyncEventQueue asyncEventQueue : asyncEventQueues) {
+          JSONObject asyncEventQueueJSON = new JSONObject();
+          asyncEventQueueJSON.put("id", asyncEventQueue.getId());
+          asyncEventQueueJSON.put("primary", asyncEventQueue.getPrimary());
+          asyncEventQueueJSON.put("senderType", asyncEventQueue.isParallel());
+          asyncEventQueueJSON.put("batchSize", asyncEventQueue.getBatchSize());
+          asyncEventQueueJSON.put("batchTimeInterval", asyncEventQueue.getBatchTimeInterval());
+          asyncEventQueueJSON.put("batchConflationEnabled", asyncEventQueue.isBatchConflationEnabled());
+          asyncEventQueueJSON.put("asyncEventListener", asyncEventQueue.getAsyncEventListener());
+          asyncEventQueueJSON.put("queueSize", asyncEventQueue.getEventQueueSize());
+
+          asyncEventQueueJsonList.put(asyncEventQueueJSON);
+        }
+        responseJSON.put("asyncEventQueues", asyncEventQueueJsonList);
+
+
+        Map<String,Cluster.Region> clusterRegions = cluster.getClusterRegions();
+
+        List<Cluster.Region> clusterRegionsList = new ArrayList<Cluster.Region>();
+        clusterRegionsList.addAll(clusterRegions.values());
+        
+        JSONArray regionsList = new JSONArray();
+
+        for (Cluster.Region region : clusterRegionsList) {
+          if (region.getWanEnabled()) {
+            JSONObject regionJSON = new JSONObject();
+            regionJSON.put("name", region.getName());
+            regionsList.put(regionJSON);
+          }
+        }
+        responseJSON.put("regionsInvolved", regionsList);
+      }
+      // Send json response
+      return responseJSON;
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberHeapUsageService.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberHeapUsageService.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberHeapUsageService.java
new file mode 100644
index 0000000..4e6956d
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/service/MemberHeapUsageService.java
@@ -0,0 +1,75 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.context.annotation.Scope;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class MemberHeapUsageService
+ * 
+ * This class contains implementations of getting Memeber's current Heap Usage
+ * and its trend over the time.
+ * 
+ * @author Sachin K
+ * @since version 7.5
+ */
+@Component
+@Service("MemberHeapUsage")
+@Scope("singleton")
+public class MemberHeapUsageService implements PulseService {
+
+  public JSONObject execute(final HttpServletRequest request) throws Exception {
+
+    // get cluster object
+    Cluster cluster = Repository.get().getCluster();
+
+    // json object to be sent as response
+    JSONObject responseJSON = new JSONObject();
+
+    // members list
+    try {
+      JSONObject requestDataJSON = new JSONObject(
+          request.getParameter("pulseData"));
+      String memberName = requestDataJSON.getJSONObject("MemberHeapUsage")
+          .getString("memberName");
+
+      Cluster.Member clusterMember = cluster.getMember(StringUtils
+          .makeCompliantName(memberName));
+      if (clusterMember != null) {
+        // response
+        responseJSON
+            .put(
+                "heapUsageTrend",
+                new JSONArray(
+                    clusterMember
+                        .getMemberStatisticTrend(Cluster.Member.MEMBER_STAT_HEAP_USAGE_SAMPLE)));
+        responseJSON
+            .put("currentHeapUsage", clusterMember.getCurrentHeapSize());
+      }
+
+      // Send json response
+      return responseJSON;
+
+    } catch (JSONException e) {
+      throw new Exception(e);
+    }
+  }
+}



[76/79] incubator-geode git commit: Selenium version changes for pulse

Posted by tu...@apache.org.
Selenium version changes for pulse


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a38795e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a38795e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a38795e8

Branch: refs/heads/feature/GEODE-17
Commit: a38795e828aeedd67fb12511ae784009bcbb2117
Parents: 9fdc8bc
Author: tushark <tu...@apache.org>
Authored: Tue Nov 3 15:07:59 2015 +0530
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:54:35 2015 +0530

----------------------------------------------------------------------
 pulse/build.gradle | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a38795e8/pulse/build.gradle
----------------------------------------------------------------------
diff --git a/pulse/build.gradle b/pulse/build.gradle
index b2bd5fc..09eab3d 100755
--- a/pulse/build.gradle
+++ b/pulse/build.gradle
@@ -31,11 +31,18 @@ dependencies {
 
   providedCompile 'commons-logging:commons-logging:1.1.3'
   providedCompile 'commons-codec:commons-codec:1.6'
-  providedCompile 'org.apache.httpcomponents:fluent-hc:4.3.3'
-  providedCompile 'org.apache.httpcomponents:httpclient:4.3.3'
-  providedCompile 'org.apache.httpcomponents:httpclient-cache:4.3.3'
-  providedCompile 'org.apache.httpcomponents:httpcore:4.3.2'
-  providedCompile 'org.apache.httpcomponents:httpmime:4.3.3'
+  
+//  providedCompile 'org.apache.httpcomponents:fluent-hc:4.3.3'
+//  providedCompile 'org.apache.httpcomponents:httpclient:4.3.3'
+//  providedCompile 'org.apache.httpcomponents:httpclient-cache:4.3.3'
+//  providedCompile 'org.apache.httpcomponents:httpcore:4.3.2'
+//  providedCompile 'org.apache.httpcomponents:httpmime:4.3.3'
+  
+  providedCompile 'org.apache.httpcomponents:fluent-hc:4.4.1'
+  providedCompile 'org.apache.httpcomponents:httpclient:4.4.1'
+  providedCompile 'org.apache.httpcomponents:httpclient-cache:4.4.1'
+  providedCompile 'org.apache.httpcomponents:httpcore:4.4.1'
+  providedCompile 'org.apache.httpcomponents:httpmime:4.4.1'
 
   provided 'org.mortbay.jetty:servlet-api:2.5-20081211'
 
@@ -43,9 +50,24 @@ dependencies {
   testCompile 'org.apache.tomcat.embed:tomcat-embed-core:7.0.30'
   testCompile 'org.apache.tomcat.embed:tomcat-embed-jasper:7.0.30'
   testCompile 'org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.30'
-  testCompile 'org.seleniumhq.selenium:selenium-server-standalone:2.41.0'
+//  testCompile 'org.seleniumhq.selenium:selenium-server-standalone:2.41.0'
 //  testCompile 'org.seleniumhq.selenium:selenium-server:2.47.1'
 
+  testCompile 'cglib:cglib-nodep:3.1'
+  testCompile 'com.google.code.gson:gson:2.4'
+  testCompile 'com.google.guava:guava:18.0'
+  testCompile 'net.java.dev.jna:jna:4.2.0'
+  testCompile 'net.java.dev.jna:jna-platform:4.2.0'
+  testCompile 'org.apache.commons:commons-exec:1.3'
+  testCompile 'org.apache.httpcomponents:httpclient:4.4.1'  
+  
+  testCompile 'org.seleniumhq.selenium:selenium-support:2.47.1'
+  testCompile 'org.seleniumhq.selenium:selenium-api:2.47.1'
+  testCompile 'org.seleniumhq.selenium:selenium-java:2.47.1'
+  testCompile 'org.seleniumhq.selenium:selenium-firefox-driver:2.47.1'
+  testCompile 'org.seleniumhq.selenium:selenium-remote-driver:2.47.1'
+  testCompile 'org.apache.commons:com.springsource.org.apache.commons.logging:1.1.1'
+
   // Required only for creating test categories
 //  testPulseCompile project(path: ':gemfire-junit', configuration: 'testOutput')
 


[16/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.jscrollpane.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.jscrollpane.js b/pulse/src/main/webapp/scripts/lib/jquery.jscrollpane.js
new file mode 100644
index 0000000..b43a61c
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.jscrollpane.js
@@ -0,0 +1,1340 @@
+(function($,window,undefined){
+
+	$.fn.jScrollPane = function(settings)
+	{
+		// JScrollPane "class" - public methods are available through $('selector').data('jsp')
+		function JScrollPane(elem, s)
+		{
+			var settings, jsp = this, pane, paneWidth, paneHeight, container, contentWidth, contentHeight,
+				percentInViewH, percentInViewV, isScrollableV, isScrollableH, verticalDrag, dragMaxY,
+				verticalDragPosition, horizontalDrag, dragMaxX, horizontalDragPosition,
+				verticalBar, verticalTrack, scrollbarWidth, verticalTrackHeight, verticalDragHeight, arrowUp, arrowDown,
+				horizontalBar, horizontalTrack, horizontalTrackWidth, horizontalDragWidth, arrowLeft, arrowRight,
+				reinitialiseInterval, originalPadding, originalPaddingTotalWidth, previousContentWidth,
+				wasAtTop = true, wasAtLeft = true, wasAtBottom = false, wasAtRight = false,
+				originalElement = elem.clone(false, false).empty(),
+				mwEvent = $.fn.mwheelIntent ? 'mwheelIntent.jsp' : 'mousewheel.jsp';
+
+			originalPadding = elem.css('paddingTop') + ' ' +
+								elem.css('paddingRight') + ' ' +
+								elem.css('paddingBottom') + ' ' +
+								elem.css('paddingLeft');
+			originalPaddingTotalWidth = (parseInt(elem.css('paddingLeft'), 10) || 0) +
+										(parseInt(elem.css('paddingRight'), 10) || 0);
+
+			function initialise(s)
+			{
+
+				var /*firstChild, lastChild, */isMaintainingPositon, lastContentX, lastContentY,
+						hasContainingSpaceChanged, originalScrollTop, originalScrollLeft,
+						maintainAtBottom = false, maintainAtRight = false;
+
+				settings = s;
+
+				if (pane === undefined) {
+					originalScrollTop = elem.scrollTop();
+					originalScrollLeft = elem.scrollLeft();
+
+					elem.css(
+						{
+							overflow: 'hidden',
+							padding: 0
+						}
+					);
+					// TODO: Deal with where width/ height is 0 as it probably means the element is hidden and we should
+					// come back to it later and check once it is unhidden...
+					paneWidth = elem.innerWidth() + originalPaddingTotalWidth;
+					paneHeight = elem.innerHeight();
+
+					elem.width(paneWidth);
+					
+					pane = $('<div class="jspPane" />').css('padding', originalPadding).append(elem.children());
+					container = $('<div class="jspContainer" />')
+						.css({
+							'width': paneWidth + 'px',
+							'height': paneHeight + 'px'
+						}
+					).append(pane).appendTo(elem);
+
+					/*
+					// Move any margins from the first and last children up to the container so they can still
+					// collapse with neighbouring elements as they would before jScrollPane 
+					firstChild = pane.find(':first-child');
+					lastChild = pane.find(':last-child');
+					elem.css(
+						{
+							'margin-top': firstChild.css('margin-top'),
+							'margin-bottom': lastChild.css('margin-bottom')
+						}
+					);
+					firstChild.css('margin-top', 0);
+					lastChild.css('margin-bottom', 0);
+					*/
+				} else {
+					elem.css('width', '');
+
+					maintainAtBottom = settings.stickToBottom && isCloseToBottom();
+					maintainAtRight  = settings.stickToRight  && isCloseToRight();
+
+					hasContainingSpaceChanged = elem.innerWidth() + originalPaddingTotalWidth != paneWidth || elem.outerHeight() != paneHeight;
+
+					if (hasContainingSpaceChanged) {
+						paneWidth = elem.innerWidth() + originalPaddingTotalWidth;
+						paneHeight = elem.innerHeight();
+						container.css({
+							width: paneWidth + 'px',
+							height: paneHeight + 'px'
+						});
+					}
+
+					// If nothing changed since last check...
+					if (!hasContainingSpaceChanged && previousContentWidth == contentWidth && pane.outerHeight() == contentHeight) {
+						elem.width(paneWidth);
+						return;
+					}
+					previousContentWidth = contentWidth;
+					
+					pane.css('width', '');
+					elem.width(paneWidth);
+
+					container.find('>.jspVerticalBar,>.jspHorizontalBar').remove().end();
+				}
+
+				pane.css('overflow', 'auto');
+				if (s.contentWidth) {
+					contentWidth = s.contentWidth;
+				} else {
+					contentWidth = pane[0].scrollWidth;
+				}
+				contentHeight = pane[0].scrollHeight;
+				pane.css('overflow', '');
+
+				percentInViewH = contentWidth / paneWidth;
+				percentInViewV = contentHeight / paneHeight;
+				isScrollableV = percentInViewV > 1;
+
+				isScrollableH = percentInViewH > 1;
+
+				//console.log(paneWidth, paneHeight, contentWidth, contentHeight, percentInViewH, percentInViewV, isScrollableH, isScrollableV);
+
+				if (!(isScrollableH || isScrollableV)) {
+					elem.removeClass('jspScrollable');
+					pane.css({
+						top: 0,
+						width: container.width() - originalPaddingTotalWidth
+					});
+					removeMousewheel();
+					removeFocusHandler();
+					removeKeyboardNav();
+					removeClickOnTrack();
+					unhijackInternalLinks();
+				} else {
+					elem.addClass('jspScrollable');
+
+					isMaintainingPositon = settings.maintainPosition && (verticalDragPosition || horizontalDragPosition);
+					if (isMaintainingPositon) {
+						lastContentX = contentPositionX();
+						lastContentY = contentPositionY();
+					}
+
+					initialiseVerticalScroll();
+					initialiseHorizontalScroll();
+					resizeScrollbars();
+
+					if (isMaintainingPositon) {
+						scrollToX(maintainAtRight  ? (contentWidth  - paneWidth ) : lastContentX, false);
+						scrollToY(maintainAtBottom ? (contentHeight - paneHeight) : lastContentY, false);
+					}
+
+					initFocusHandler();
+					initMousewheel();
+					initTouch();
+					
+					if (settings.enableKeyboardNavigation) {
+						initKeyboardNav();
+					}
+					if (settings.clickOnTrack) {
+						initClickOnTrack();
+					}
+					
+					observeHash();
+					if (settings.hijackInternalLinks) {
+						hijackInternalLinks();
+					}
+				}
+
+				if (settings.autoReinitialise && !reinitialiseInterval) {
+					reinitialiseInterval = setInterval(
+						function()
+						{
+							initialise(settings);
+						},
+						settings.autoReinitialiseDelay
+					);
+				} else if (!settings.autoReinitialise && reinitialiseInterval) {
+					clearInterval(reinitialiseInterval);
+				}
+
+				originalScrollTop && elem.scrollTop(0) && scrollToY(originalScrollTop, false);
+				originalScrollLeft && elem.scrollLeft(0) && scrollToX(originalScrollLeft, false);
+
+				elem.trigger('jsp-initialised', [isScrollableH || isScrollableV]);
+			}
+
+			function initialiseVerticalScroll()
+			{
+				if (isScrollableV) {
+
+					container.append(
+						$('<div class="jspVerticalBar" />').append(
+							$('<div class="jspCap jspCapTop" />'),
+							$('<div class="jspTrack" />').append(
+								$('<div class="jspDrag" />').append(
+									$('<div class="jspDragTop" />'),
+									$('<div class="jspDragBottom" />')
+								)
+							),
+							$('<div class="jspCap jspCapBottom" />')
+						)
+					);
+
+					verticalBar = container.find('>.jspVerticalBar');
+					verticalTrack = verticalBar.find('>.jspTrack');
+					verticalDrag = verticalTrack.find('>.jspDrag');
+
+					if (settings.showArrows) {
+						arrowUp = $('<a class="jspArrow jspArrowUp" />').bind(
+							'mousedown.jsp', getArrowScroll(0, -1)
+						).bind('click.jsp', nil);
+						arrowDown = $('<a class="jspArrow jspArrowDown" />').bind(
+							'mousedown.jsp', getArrowScroll(0, 1)
+						).bind('click.jsp', nil);
+						if (settings.arrowScrollOnHover) {
+							arrowUp.bind('mouseover.jsp', getArrowScroll(0, -1, arrowUp));
+							arrowDown.bind('mouseover.jsp', getArrowScroll(0, 1, arrowDown));
+						}
+
+						appendArrows(verticalTrack, settings.verticalArrowPositions, arrowUp, arrowDown);
+					}
+
+					verticalTrackHeight = paneHeight;
+					container.find('>.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow').each(
+						function()
+						{
+							verticalTrackHeight -= $(this).outerHeight();
+						}
+					);
+
+
+					verticalDrag.hover(
+						function()
+						{
+							verticalDrag.addClass('jspHover');
+						},
+						function()
+						{
+							verticalDrag.removeClass('jspHover');
+						}
+					).bind(
+						'mousedown.jsp',
+						function(e)
+						{
+							// Stop IE from allowing text selection
+							$('html').bind('dragstart.jsp selectstart.jsp', nil);
+
+							verticalDrag.addClass('jspActive');
+
+							var startY = e.pageY - verticalDrag.position().top;
+
+							$('html').bind(
+								'mousemove.jsp',
+								function(e)
+								{
+									positionDragY(e.pageY - startY, false);
+								}
+							).bind('mouseup.jsp mouseleave.jsp', cancelDrag);
+							return false;
+						}
+					);
+					sizeVerticalScrollbar();
+				}
+			}
+
+			function sizeVerticalScrollbar()
+			{
+				verticalTrack.height(verticalTrackHeight + 'px');
+				verticalDragPosition = 0;
+				scrollbarWidth = settings.verticalGutter + verticalTrack.outerWidth();
+
+				// Make the pane thinner to allow for the vertical scrollbar
+				pane.width(paneWidth - scrollbarWidth - originalPaddingTotalWidth);
+
+				// Add margin to the left of the pane if scrollbars are on that side (to position
+				// the scrollbar on the left or right set it's left or right property in CSS)
+				try {
+					if (verticalBar.position().left === 0) {
+						pane.css('margin-left', scrollbarWidth + 'px');
+					}
+				} catch (err) {
+				}
+			}
+
+			function initialiseHorizontalScroll()
+			{
+				if (isScrollableH) {
+
+					container.append(
+						$('<div class="jspHorizontalBar" />').append(
+							$('<div class="jspCap jspCapLeft" />'),
+							$('<div class="jspTrack" />').append(
+								$('<div class="jspDrag" />').append(
+									$('<div class="jspDragLeft" />'),
+									$('<div class="jspDragRight" />')
+								)
+							),
+							$('<div class="jspCap jspCapRight" />')
+						)
+					);
+
+					horizontalBar = container.find('>.jspHorizontalBar');
+					horizontalTrack = horizontalBar.find('>.jspTrack');
+					horizontalDrag = horizontalTrack.find('>.jspDrag');
+
+					if (settings.showArrows) {
+						arrowLeft = $('<a class="jspArrow jspArrowLeft" />').bind(
+							'mousedown.jsp', getArrowScroll(-1, 0)
+						).bind('click.jsp', nil);
+						arrowRight = $('<a class="jspArrow jspArrowRight" />').bind(
+							'mousedown.jsp', getArrowScroll(1, 0)
+						).bind('click.jsp', nil);
+						if (settings.arrowScrollOnHover) {
+							arrowLeft.bind('mouseover.jsp', getArrowScroll(-1, 0, arrowLeft));
+							arrowRight.bind('mouseover.jsp', getArrowScroll(1, 0, arrowRight));
+						}
+						appendArrows(horizontalTrack, settings.horizontalArrowPositions, arrowLeft, arrowRight);
+					}
+
+					horizontalDrag.hover(
+						function()
+						{
+							horizontalDrag.addClass('jspHover');
+						},
+						function()
+						{
+							horizontalDrag.removeClass('jspHover');
+						}
+					).bind(
+						'mousedown.jsp',
+						function(e)
+						{
+							// Stop IE from allowing text selection
+							$('html').bind('dragstart.jsp selectstart.jsp', nil);
+
+							horizontalDrag.addClass('jspActive');
+
+							var startX = e.pageX - horizontalDrag.position().left;
+
+							$('html').bind(
+								'mousemove.jsp',
+								function(e)
+								{
+									positionDragX(e.pageX - startX, false);
+								}
+							).bind('mouseup.jsp mouseleave.jsp', cancelDrag);
+							return false;
+						}
+					);
+					horizontalTrackWidth = container.innerWidth();
+					sizeHorizontalScrollbar();
+				}
+			}
+
+			function sizeHorizontalScrollbar()
+			{
+				container.find('>.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow').each(
+					function()
+					{
+						horizontalTrackWidth -= $(this).outerWidth();
+					}
+				);
+
+				horizontalTrack.width(horizontalTrackWidth + 'px');
+				horizontalDragPosition = 0;
+			}
+
+			function resizeScrollbars()
+			{
+				if (isScrollableH && isScrollableV) {
+					var horizontalTrackHeight = horizontalTrack.outerHeight(),
+						verticalTrackWidth = verticalTrack.outerWidth();
+					verticalTrackHeight -= horizontalTrackHeight;
+					$(horizontalBar).find('>.jspCap:visible,>.jspArrow').each(
+						function()
+						{
+							horizontalTrackWidth += $(this).outerWidth();
+						}
+					);
+					horizontalTrackWidth -= verticalTrackWidth;
+					paneHeight -= verticalTrackWidth;
+					paneWidth -= horizontalTrackHeight;
+					horizontalTrack.parent().append(
+						$('<div class="jspCorner" />').css('width', horizontalTrackHeight + 'px')
+					);
+					sizeVerticalScrollbar();
+					sizeHorizontalScrollbar();
+				}
+				// reflow content
+				if (isScrollableH) {
+					pane.width((container.outerWidth() - originalPaddingTotalWidth) + 'px');
+				}
+				contentHeight = pane.outerHeight();
+				percentInViewV = contentHeight / paneHeight;
+
+				if (isScrollableH) {
+					horizontalDragWidth = Math.ceil(1 / percentInViewH * horizontalTrackWidth);
+					if (horizontalDragWidth > settings.horizontalDragMaxWidth) {
+						horizontalDragWidth = settings.horizontalDragMaxWidth;
+					} else if (horizontalDragWidth < settings.horizontalDragMinWidth) {
+						horizontalDragWidth = settings.horizontalDragMinWidth;
+					}
+					horizontalDrag.width(horizontalDragWidth + 'px');
+					dragMaxX = horizontalTrackWidth - horizontalDragWidth;
+					_positionDragX(horizontalDragPosition); // To update the state for the arrow buttons
+				}
+				if (isScrollableV) {
+					verticalDragHeight = Math.ceil(1 / percentInViewV * verticalTrackHeight);
+					if (verticalDragHeight > settings.verticalDragMaxHeight) {
+						verticalDragHeight = settings.verticalDragMaxHeight;
+					} else if (verticalDragHeight < settings.verticalDragMinHeight) {
+						verticalDragHeight = settings.verticalDragMinHeight;
+					}
+					verticalDrag.height(verticalDragHeight + 'px');
+					dragMaxY = verticalTrackHeight - verticalDragHeight;
+					_positionDragY(verticalDragPosition); // To update the state for the arrow buttons
+				}
+			}
+
+			function appendArrows(ele, p, a1, a2)
+			{
+				var p1 = "before", p2 = "after", aTemp;
+				
+				// Sniff for mac... Is there a better way to determine whether the arrows would naturally appear
+				// at the top or the bottom of the bar?
+				if (p == "os") {
+					p = /Mac/.test(navigator.platform) ? "after" : "split";
+				}
+				if (p == p1) {
+					p2 = p;
+				} else if (p == p2) {
+					p1 = p;
+					aTemp = a1;
+					a1 = a2;
+					a2 = aTemp;
+				}
+
+				ele[p1](a1)[p2](a2);
+			}
+
+			function getArrowScroll(dirX, dirY, ele)
+			{
+				return function()
+				{
+					arrowScroll(dirX, dirY, this, ele);
+					this.blur();
+					return false;
+				};
+			}
+
+			function arrowScroll(dirX, dirY, arrow, ele)
+			{
+				arrow = $(arrow).addClass('jspActive');
+
+				var eve,
+					scrollTimeout,
+					isFirst = true,
+					doScroll = function()
+					{
+						if (dirX !== 0) {
+							jsp.scrollByX(dirX * settings.arrowButtonSpeed);
+						}
+						if (dirY !== 0) {
+							jsp.scrollByY(dirY * settings.arrowButtonSpeed);
+						}
+						scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.arrowRepeatFreq);
+						isFirst = false;
+					};
+
+				doScroll();
+
+				eve = ele ? 'mouseout.jsp' : 'mouseup.jsp';
+				ele = ele || $('html');
+				ele.bind(
+					eve,
+					function()
+					{
+						arrow.removeClass('jspActive');
+						scrollTimeout && clearTimeout(scrollTimeout);
+						scrollTimeout = null;
+						ele.unbind(eve);
+					}
+				);
+			}
+
+			function initClickOnTrack()
+			{
+				removeClickOnTrack();
+				if (isScrollableV) {
+					verticalTrack.bind(
+						'mousedown.jsp',
+						function(e)
+						{
+							if (e.originalTarget === undefined || e.originalTarget == e.currentTarget) {
+								var clickedTrack = $(this),
+									offset = clickedTrack.offset(),
+									direction = e.pageY - offset.top - verticalDragPosition,
+									scrollTimeout,
+									isFirst = true,
+									doScroll = function()
+									{
+										var offset = clickedTrack.offset(),
+											pos = e.pageY - offset.top - verticalDragHeight / 2,
+											contentDragY = paneHeight * settings.scrollPagePercent,
+											dragY = dragMaxY * contentDragY / (contentHeight - paneHeight);
+										if (direction < 0) {
+											if (verticalDragPosition - dragY > pos) {
+												jsp.scrollByY(-contentDragY);
+											} else {
+												positionDragY(pos);
+											}
+										} else if (direction > 0) {
+											if (verticalDragPosition + dragY < pos) {
+												jsp.scrollByY(contentDragY);
+											} else {
+												positionDragY(pos);
+											}
+										} else {
+											cancelClick();
+											return;
+										}
+										scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.trackClickRepeatFreq);
+										isFirst = false;
+									},
+									cancelClick = function()
+									{
+										scrollTimeout && clearTimeout(scrollTimeout);
+										scrollTimeout = null;
+										$(document).unbind('mouseup.jsp', cancelClick);
+									};
+								doScroll();
+								$(document).bind('mouseup.jsp', cancelClick);
+								return false;
+							}
+						}
+					);
+				}
+				
+				if (isScrollableH) {
+					horizontalTrack.bind(
+						'mousedown.jsp',
+						function(e)
+						{
+							if (e.originalTarget === undefined || e.originalTarget == e.currentTarget) {
+								var clickedTrack = $(this),
+									offset = clickedTrack.offset(),
+									direction = e.pageX - offset.left - horizontalDragPosition,
+									scrollTimeout,
+									isFirst = true,
+									doScroll = function()
+									{
+										var offset = clickedTrack.offset(),
+											pos = e.pageX - offset.left - horizontalDragWidth / 2,
+											contentDragX = paneWidth * settings.scrollPagePercent,
+											dragX = dragMaxX * contentDragX / (contentWidth - paneWidth);
+										if (direction < 0) {
+											if (horizontalDragPosition - dragX > pos) {
+												jsp.scrollByX(-contentDragX);
+											} else {
+												positionDragX(pos);
+											}
+										} else if (direction > 0) {
+											if (horizontalDragPosition + dragX < pos) {
+												jsp.scrollByX(contentDragX);
+											} else {
+												positionDragX(pos);
+											}
+										} else {
+											cancelClick();
+											return;
+										}
+										scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.trackClickRepeatFreq);
+										isFirst = false;
+									},
+									cancelClick = function()
+									{
+										scrollTimeout && clearTimeout(scrollTimeout);
+										scrollTimeout = null;
+										$(document).unbind('mouseup.jsp', cancelClick);
+									};
+								doScroll();
+								$(document).bind('mouseup.jsp', cancelClick);
+								return false;
+							}
+						}
+					);
+				}
+			}
+
+			function removeClickOnTrack()
+			{
+				if (horizontalTrack) {
+					horizontalTrack.unbind('mousedown.jsp');
+				}
+				if (verticalTrack) {
+					verticalTrack.unbind('mousedown.jsp');
+				}
+			}
+
+			function cancelDrag()
+			{
+				$('html').unbind('dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp');
+
+				if (verticalDrag) {
+					verticalDrag.removeClass('jspActive');
+				}
+				if (horizontalDrag) {
+					horizontalDrag.removeClass('jspActive');
+				}
+			}
+
+			function positionDragY(destY, animate)
+			{
+				if (!isScrollableV) {
+					return;
+				}
+				if (destY < 0) {
+					destY = 0;
+				} else if (destY > dragMaxY) {
+					destY = dragMaxY;
+				}
+
+				// can't just check if(animate) because false is a valid value that could be passed in...
+				if (animate === undefined) {
+					animate = settings.animateScroll;
+				}
+				if (animate) {
+					jsp.animate(verticalDrag, 'top', destY,	_positionDragY);
+				} else {
+					verticalDrag.css('top', destY);
+					_positionDragY(destY);
+				}
+
+			}
+
+			function _positionDragY(destY)
+			{
+				if (destY === undefined) {
+					destY = verticalDrag.position().top;
+				}
+
+				container.scrollTop(0);
+				verticalDragPosition = destY;
+
+				var isAtTop = verticalDragPosition === 0,
+					isAtBottom = verticalDragPosition == dragMaxY,
+					percentScrolled = destY/ dragMaxY,
+					destTop = -percentScrolled * (contentHeight - paneHeight);
+
+				if (wasAtTop != isAtTop || wasAtBottom != isAtBottom) {
+					wasAtTop = isAtTop;
+					wasAtBottom = isAtBottom;
+					elem.trigger('jsp-arrow-change', [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]);
+				}
+				
+				updateVerticalArrows(isAtTop, isAtBottom);
+				pane.css('top', destTop);
+				elem.trigger('jsp-scroll-y', [-destTop, isAtTop, isAtBottom]).trigger('scroll');
+			}
+
+			function positionDragX(destX, animate)
+			{
+				if (!isScrollableH) {
+					return;
+				}
+				if (destX < 0) {
+					destX = 0;
+				} else if (destX > dragMaxX) {
+					destX = dragMaxX;
+				}
+
+				if (animate === undefined) {
+					animate = settings.animateScroll;
+				}
+				if (animate) {
+					jsp.animate(horizontalDrag, 'left', destX,	_positionDragX);
+				} else {
+					horizontalDrag.css('left', destX);
+					_positionDragX(destX);
+				}
+			}
+
+			function _positionDragX(destX)
+			{
+				if (destX === undefined) {
+					destX = horizontalDrag.position().left;
+				}
+
+				container.scrollTop(0);
+				horizontalDragPosition = destX;
+
+				var isAtLeft = horizontalDragPosition === 0,
+					isAtRight = horizontalDragPosition == dragMaxX,
+					percentScrolled = destX / dragMaxX,
+					destLeft = -percentScrolled * (contentWidth - paneWidth);
+
+				if (wasAtLeft != isAtLeft || wasAtRight != isAtRight) {
+					wasAtLeft = isAtLeft;
+					wasAtRight = isAtRight;
+					elem.trigger('jsp-arrow-change', [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]);
+				}
+				
+				updateHorizontalArrows(isAtLeft, isAtRight);
+				pane.css('left', destLeft);
+				elem.trigger('jsp-scroll-x', [-destLeft, isAtLeft, isAtRight]).trigger('scroll');
+			}
+
+			function updateVerticalArrows(isAtTop, isAtBottom)
+			{
+				if (settings.showArrows) {
+					arrowUp[isAtTop ? 'addClass' : 'removeClass']('jspDisabled');
+					arrowDown[isAtBottom ? 'addClass' : 'removeClass']('jspDisabled');
+				}
+			}
+
+			function updateHorizontalArrows(isAtLeft, isAtRight)
+			{
+				if (settings.showArrows) {
+					arrowLeft[isAtLeft ? 'addClass' : 'removeClass']('jspDisabled');
+					arrowRight[isAtRight ? 'addClass' : 'removeClass']('jspDisabled');
+				}
+			}
+
+			function scrollToY(destY, animate)
+			{
+				var percentScrolled = destY / (contentHeight - paneHeight);
+				positionDragY(percentScrolled * dragMaxY, animate);
+			}
+
+			function scrollToX(destX, animate)
+			{
+				var percentScrolled = destX / (contentWidth - paneWidth);
+				positionDragX(percentScrolled * dragMaxX, animate);
+			}
+
+			function scrollToElement(ele, stickToTop, animate)
+			{
+				var e, eleHeight, eleWidth, eleTop = 0, eleLeft = 0, viewportTop, viewportLeft, maxVisibleEleTop, maxVisibleEleLeft, destY, destX;
+
+				// Legal hash values aren't necessarily legal jQuery selectors so we need to catch any
+				// errors from the lookup...
+				try {
+					e = $(ele);
+				} catch (err) {
+					return;
+				}
+				eleHeight = e.outerHeight();
+				eleWidth= e.outerWidth();
+
+				container.scrollTop(0);
+				container.scrollLeft(0);
+				
+				// loop through parents adding the offset top of any elements that are relatively positioned between
+				// the focused element and the jspPane so we can get the true distance from the top
+				// of the focused element to the top of the scrollpane...
+				while (!e.is('.jspPane')) {
+					eleTop += e.position().top;
+					eleLeft += e.position().left;
+					e = e.offsetParent();
+					if (/^body|html$/i.test(e[0].nodeName)) {
+						// we ended up too high in the document structure. Quit!
+						return;
+					}
+				}
+
+				viewportTop = contentPositionY();
+				maxVisibleEleTop = viewportTop + paneHeight;
+				if (eleTop < viewportTop || stickToTop) { // element is above viewport
+					destY = eleTop - settings.verticalGutter;
+				} else if (eleTop + eleHeight > maxVisibleEleTop) { // element is below viewport
+					destY = eleTop - paneHeight + eleHeight + settings.verticalGutter;
+				}
+				if (destY) {
+					scrollToY(destY, animate);
+				}
+				
+				viewportLeft = contentPositionX();
+	            maxVisibleEleLeft = viewportLeft + paneWidth;
+	            if (eleLeft < viewportLeft || stickToTop) { // element is to the left of viewport
+	                destX = eleLeft - settings.horizontalGutter;
+	            } else if (eleLeft + eleWidth > maxVisibleEleLeft) { // element is to the right viewport
+	                destX = eleLeft - paneWidth + eleWidth + settings.horizontalGutter;
+	            }
+	            if (destX) {
+	                scrollToX(destX, animate);
+	            }
+
+			}
+
+			function contentPositionX()
+			{
+				return -pane.position().left;
+			}
+
+			function contentPositionY()
+			{
+				return -pane.position().top;
+			}
+
+			function isCloseToBottom()
+			{
+				var scrollableHeight = contentHeight - paneHeight;
+				return (scrollableHeight > 20) && (scrollableHeight - contentPositionY() < 10);
+			}
+
+			function isCloseToRight()
+			{
+				var scrollableWidth = contentWidth - paneWidth;
+				return (scrollableWidth > 20) && (scrollableWidth - contentPositionX() < 10);
+			}
+
+			function initMousewheel()
+			{
+				container.unbind(mwEvent).bind(
+					mwEvent,
+					function (event, delta, deltaX, deltaY) {
+						var dX = horizontalDragPosition, dY = verticalDragPosition;
+						jsp.scrollBy(deltaX * settings.mouseWheelSpeed, -deltaY * settings.mouseWheelSpeed, false);
+						// return true if there was no movement so rest of screen can scroll
+						return dX == horizontalDragPosition && dY == verticalDragPosition;
+					}
+				);
+			}
+
+			function removeMousewheel()
+			{
+				container.unbind(mwEvent);
+			}
+
+			function nil()
+			{
+				return false;
+			}
+
+			function initFocusHandler()
+			{
+				pane.find(':input,a').unbind('focus.jsp').bind(
+					'focus.jsp',
+					function(e)
+					{
+						scrollToElement(e.target, false);
+					}
+				);
+			}
+
+			function removeFocusHandler()
+			{
+				pane.find(':input,a').unbind('focus.jsp');
+			}
+			
+			function initKeyboardNav()
+			{
+				var keyDown, elementHasScrolled, validParents = [];
+				isScrollableH && validParents.push(horizontalBar[0]);
+				isScrollableV && validParents.push(verticalBar[0]);
+				
+				// IE also focuses elements that don't have tabindex set.
+				pane.focus(
+					function()
+					{
+						elem.focus();
+					}
+				);
+				
+				elem.attr('tabindex', 0)
+					.unbind('keydown.jsp keypress.jsp')
+					.bind(
+						'keydown.jsp',
+						function(e)
+						{
+							if (e.target !== this && !(validParents.length && $(e.target).closest(validParents).length)){
+								return;
+							}
+							var dX = horizontalDragPosition, dY = verticalDragPosition;
+							switch(e.keyCode) {
+								case 40: // down
+								case 38: // up
+								case 34: // page down
+								case 32: // space
+								case 33: // page up
+								case 39: // right
+								case 37: // left
+									keyDown = e.keyCode;
+									keyDownHandler();
+									break;
+								case 35: // end
+									scrollToY(contentHeight - paneHeight);
+									keyDown = null;
+									break;
+								case 36: // home
+									scrollToY(0);
+									keyDown = null;
+									break;
+							}
+
+							elementHasScrolled = e.keyCode == keyDown && dX != horizontalDragPosition || dY != verticalDragPosition;
+							return !elementHasScrolled;
+						}
+					).bind(
+						'keypress.jsp', // For FF/ OSX so that we can cancel the repeat key presses if the JSP scrolls...
+						function(e)
+						{
+							if (e.keyCode == keyDown) {
+								keyDownHandler();
+							}
+							return !elementHasScrolled;
+						}
+					);
+				
+				if (settings.hideFocus) {
+					elem.css('outline', 'none');
+					if ('hideFocus' in container[0]){
+						elem.attr('hideFocus', true);
+					}
+				} else {
+					elem.css('outline', '');
+					if ('hideFocus' in container[0]){
+						elem.attr('hideFocus', false);
+					}
+				}
+				
+				function keyDownHandler()
+				{
+					var dX = horizontalDragPosition, dY = verticalDragPosition;
+					switch(keyDown) {
+						case 40: // down
+							jsp.scrollByY(settings.keyboardSpeed, false);
+							break;
+						case 38: // up
+							jsp.scrollByY(-settings.keyboardSpeed, false);
+							break;
+						case 34: // page down
+						case 32: // space
+							jsp.scrollByY(paneHeight * settings.scrollPagePercent, false);
+							break;
+						case 33: // page up
+							jsp.scrollByY(-paneHeight * settings.scrollPagePercent, false);
+							break;
+						case 39: // right
+							jsp.scrollByX(settings.keyboardSpeed, false);
+							break;
+						case 37: // left
+							jsp.scrollByX(-settings.keyboardSpeed, false);
+							break;
+					}
+
+					elementHasScrolled = dX != horizontalDragPosition || dY != verticalDragPosition;
+					return elementHasScrolled;
+				}
+			}
+			
+			function removeKeyboardNav()
+			{
+				elem.attr('tabindex', '-1')
+					.removeAttr('tabindex')
+					.unbind('keydown.jsp keypress.jsp');
+			}
+
+			function observeHash()
+			{
+				if (location.hash && location.hash.length > 1) {
+					var e,
+						retryInt,
+						hash = escape(location.hash) // hash must be escaped to prevent XSS
+						;
+					try {
+						e = $(hash);
+					} catch (err) {
+						return;
+					}
+
+					if (e.length && pane.find(hash)) {
+						// nasty workaround but it appears to take a little while before the hash has done its thing
+						// to the rendered page so we just wait until the container's scrollTop has been messed up.
+						if (container.scrollTop() === 0) {
+							retryInt = setInterval(
+								function()
+								{
+									if (container.scrollTop() > 0) {
+										scrollToElement(hash, true);
+										$(document).scrollTop(container.position().top);
+										clearInterval(retryInt);
+									}
+								},
+								50
+							);
+						} else {
+							scrollToElement(hash, true);
+							$(document).scrollTop(container.position().top);
+						}
+					}
+				}
+			}
+
+			function unhijackInternalLinks()
+			{
+				$('a.jspHijack').unbind('click.jsp-hijack').removeClass('jspHijack');
+			}
+
+			function hijackInternalLinks()
+			{
+				unhijackInternalLinks();
+				$('a[href^=#]').addClass('jspHijack').bind(
+					'click.jsp-hijack',
+					function()
+					{
+						var uriParts = this.href.split('#'), hash;
+						if (uriParts.length > 1) {
+							hash = uriParts[1];
+							if (hash.length > 0 && pane.find('#' + hash).length > 0) {
+								scrollToElement('#' + hash, true);
+								// Need to return false otherwise things mess up... Would be nice to maybe also scroll
+								// the window to the top of the scrollpane?
+								return false;
+							}
+						}
+					}
+				);
+			}
+			
+			// Init touch on iPad, iPhone, iPod, Android
+			function initTouch()
+			{
+				var startX,
+					startY,
+					touchStartX,
+					touchStartY,
+					moved,
+					moving = false;
+  
+				container.unbind('touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick').bind(
+					'touchstart.jsp',
+					function(e)
+					{
+						var touch = e.originalEvent.touches[0];
+						startX = contentPositionX();
+						startY = contentPositionY();
+						touchStartX = touch.pageX;
+						touchStartY = touch.pageY;
+						moved = false;
+						moving = true;
+					}
+				).bind(
+					'touchmove.jsp',
+					function(ev)
+					{
+						if(!moving) {
+							return;
+						}
+						
+						var touchPos = ev.originalEvent.touches[0],
+							dX = horizontalDragPosition, dY = verticalDragPosition;
+						
+						jsp.scrollTo(startX + touchStartX - touchPos.pageX, startY + touchStartY - touchPos.pageY);
+						
+						moved = moved || Math.abs(touchStartX - touchPos.pageX) > 5 || Math.abs(touchStartY - touchPos.pageY) > 5;
+						
+						// return true if there was no movement so rest of screen can scroll
+						return dX == horizontalDragPosition && dY == verticalDragPosition;
+					}
+				).bind(
+					'touchend.jsp',
+					function(e)
+					{
+						moving = false;
+						/*if(moved) {
+							return false;
+						}*/
+					}
+				).bind(
+					'click.jsp-touchclick',
+					function(e)
+					{
+						if(moved) {
+							moved = false;
+							return false;
+						}
+					}
+				);
+			}
+			
+			function destroy(){
+				var currentY = contentPositionY(),
+					currentX = contentPositionX();
+				elem.removeClass('jspScrollable').unbind('.jsp');
+				elem.replaceWith(originalElement.append(pane.children()));
+				originalElement.scrollTop(currentY);
+				originalElement.scrollLeft(currentX);
+
+				// clear reinitialize timer if active
+				if (reinitialiseInterval) {
+					clearInterval(reinitialiseInterval);
+				}
+			}
+
+			// Public API
+			$.extend(
+				jsp,
+				{
+					// Reinitialises the scroll pane (if it's internal dimensions have changed since the last time it
+					// was initialised). The settings object which is passed in will override any settings from the
+					// previous time it was initialised - if you don't pass any settings then the ones from the previous
+					// initialisation will be used.
+					reinitialise: function(s)
+					{
+						s = $.extend({}, settings, s);
+						initialise(s);
+					},
+					// Scrolls the specified element (a jQuery object, DOM node or jQuery selector string) into view so
+					// that it can be seen within the viewport. If stickToTop is true then the element will appear at
+					// the top of the viewport, if it is false then the viewport will scroll as little as possible to
+					// show the element. You can also specify if you want animation to occur. If you don't provide this
+					// argument then the animateScroll value from the settings object is used instead.
+					scrollToElement: function(ele, stickToTop, animate)
+					{
+						scrollToElement(ele, stickToTop, animate);
+					},
+					// Scrolls the pane so that the specified co-ordinates within the content are at the top left
+					// of the viewport. animate is optional and if not passed then the value of animateScroll from
+					// the settings object this jScrollPane was initialised with is used.
+					scrollTo: function(destX, destY, animate)
+					{
+						scrollToX(destX, animate);
+						scrollToY(destY, animate);
+					},
+					// Scrolls the pane so that the specified co-ordinate within the content is at the left of the
+					// viewport. animate is optional and if not passed then the value of animateScroll from the settings
+					// object this jScrollPane was initialised with is used.
+					scrollToX: function(destX, animate)
+					{
+						scrollToX(destX, animate);
+					},
+					// Scrolls the pane so that the specified co-ordinate within the content is at the top of the
+					// viewport. animate is optional and if not passed then the value of animateScroll from the settings
+					// object this jScrollPane was initialised with is used.
+					scrollToY: function(destY, animate)
+					{
+						scrollToY(destY, animate);
+					},
+					// Scrolls the pane to the specified percentage of its maximum horizontal scroll position. animate
+					// is optional and if not passed then the value of animateScroll from the settings object this
+					// jScrollPane was initialised with is used.
+					scrollToPercentX: function(destPercentX, animate)
+					{
+						scrollToX(destPercentX * (contentWidth - paneWidth), animate);
+					},
+					// Scrolls the pane to the specified percentage of its maximum vertical scroll position. animate
+					// is optional and if not passed then the value of animateScroll from the settings object this
+					// jScrollPane was initialised with is used.
+					scrollToPercentY: function(destPercentY, animate)
+					{
+						scrollToY(destPercentY * (contentHeight - paneHeight), animate);
+					},
+					// Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then
+					// the value of animateScroll from the settings object this jScrollPane was initialised with is used.
+					scrollBy: function(deltaX, deltaY, animate)
+					{
+						jsp.scrollByX(deltaX, animate);
+						jsp.scrollByY(deltaY, animate);
+					},
+					// Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then
+					// the value of animateScroll from the settings object this jScrollPane was initialised with is used.
+					scrollByX: function(deltaX, animate)
+					{
+						var destX = contentPositionX() + Math[deltaX<0 ? 'floor' : 'ceil'](deltaX),
+							percentScrolled = destX / (contentWidth - paneWidth);
+						positionDragX(percentScrolled * dragMaxX, animate);
+					},
+					// Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then
+					// the value of animateScroll from the settings object this jScrollPane was initialised with is used.
+					scrollByY: function(deltaY, animate)
+					{
+						var destY = contentPositionY() + Math[deltaY<0 ? 'floor' : 'ceil'](deltaY),
+							percentScrolled = destY / (contentHeight - paneHeight);
+						positionDragY(percentScrolled * dragMaxY, animate);
+					},
+					// Positions the horizontal drag at the specified x position (and updates the viewport to reflect
+					// this). animate is optional and if not passed then the value of animateScroll from the settings
+					// object this jScrollPane was initialised with is used.
+					positionDragX: function(x, animate)
+					{
+						positionDragX(x, animate);
+					},
+					// Positions the vertical drag at the specified y position (and updates the viewport to reflect
+					// this). animate is optional and if not passed then the value of animateScroll from the settings
+					// object this jScrollPane was initialised with is used.
+					positionDragY: function(y, animate)
+					{
+						positionDragY(y, animate);
+					},
+					// This method is called when jScrollPane is trying to animate to a new position. You can override
+					// it if you want to provide advanced animation functionality. It is passed the following arguments:
+					//  * ele          - the element whose position is being animated
+					//  * prop         - the property that is being animated
+					//  * value        - the value it's being animated to
+					//  * stepCallback - a function that you must execute each time you update the value of the property
+					// You can use the default implementation (below) as a starting point for your own implementation.
+					animate: function(ele, prop, value, stepCallback)
+					{
+						var params = {};
+						params[prop] = value;
+						ele.animate(
+							params,
+							{
+								'duration'	: settings.animateDuration,
+								'easing'	: settings.animateEase,
+								'queue'		: false,
+								'step'		: stepCallback
+							}
+						);
+					},
+					// Returns the current x position of the viewport with regards to the content pane.
+					getContentPositionX: function()
+					{
+						return contentPositionX();
+					},
+					// Returns the current y position of the viewport with regards to the content pane.
+					getContentPositionY: function()
+					{
+						return contentPositionY();
+					},
+					// Returns the width of the content within the scroll pane.
+					getContentWidth: function()
+					{
+						return contentWidth;
+					},
+					// Returns the height of the content within the scroll pane.
+					getContentHeight: function()
+					{
+						return contentHeight;
+					},
+					// Returns the horizontal position of the viewport within the pane content.
+					getPercentScrolledX: function()
+					{
+						return contentPositionX() / (contentWidth - paneWidth);
+					},
+					// Returns the vertical position of the viewport within the pane content.
+					getPercentScrolledY: function()
+					{
+						return contentPositionY() / (contentHeight - paneHeight);
+					},
+					// Returns whether or not this scrollpane has a horizontal scrollbar.
+					getIsScrollableH: function()
+					{
+						return isScrollableH;
+					},
+					// Returns whether or not this scrollpane has a vertical scrollbar.
+					getIsScrollableV: function()
+					{
+						return isScrollableV;
+					},
+					// Gets a reference to the content pane. It is important that you use this method if you want to
+					// edit the content of your jScrollPane as if you access the element directly then you may have some
+					// problems (as your original element has had additional elements for the scrollbars etc added into
+					// it).
+					getContentPane: function()
+					{
+						return pane;
+					},
+					// Scrolls this jScrollPane down as far as it can currently scroll. If animate isn't passed then the
+					// animateScroll value from settings is used instead.
+					scrollToBottom: function(animate)
+					{
+						positionDragY(dragMaxY, animate);
+					},
+					// Hijacks the links on the page which link to content inside the scrollpane. If you have changed
+					// the content of your page (e.g. via AJAX) and want to make sure any new anchor links to the
+					// contents of your scroll pane will work then call this function.
+					hijackInternalLinks: function()
+					{
+						hijackInternalLinks();
+					},
+					// Removes the jScrollPane and returns the page to the state it was in before jScrollPane was
+					// initialised.
+					destroy: function()
+					{
+							destroy();
+					}
+				}
+			);
+			
+			initialise(s);
+		}
+
+		// Pluginifying code...
+		settings = $.extend({}, $.fn.jScrollPane.defaults, settings);
+		
+		// Apply default speed
+		$.each(['mouseWheelSpeed', 'arrowButtonSpeed', 'trackClickSpeed', 'keyboardSpeed'], function() {
+			settings[this] = settings[this] || settings.speed;
+		});
+
+		return this.each(
+			function()
+			{
+				var elem = $(this), jspApi = elem.data('jsp');
+				if (jspApi) {
+					jspApi.reinitialise(settings);
+				} else {
+					jspApi = new JScrollPane(elem, settings);
+					elem.data('jsp', jspApi);
+				}
+			}
+		);
+	};
+
+	$.fn.jScrollPane.defaults = {
+		showArrows					: false,
+		maintainPosition			: true,
+		stickToBottom				: false,
+		stickToRight				: false,
+		clickOnTrack				: true,
+		autoReinitialise			: false,
+		autoReinitialiseDelay		: 500,
+		verticalDragMinHeight		: 0,
+		verticalDragMaxHeight		: 99999,
+		horizontalDragMinWidth		: 0,
+		horizontalDragMaxWidth		: 99999,
+		contentWidth				: undefined,
+		animateScroll				: false,
+		animateDuration				: 300,
+		animateEase					: 'linear',
+		hijackInternalLinks			: false,
+		verticalGutter				: 4,
+		horizontalGutter			: 4,
+		mouseWheelSpeed				: 0,
+		arrowButtonSpeed			: 0,
+		arrowRepeatFreq				: 50,
+		arrowScrollOnHover			: false,
+		trackClickSpeed				: 0,
+		trackClickRepeatFreq		: 70,
+		verticalArrowPositions		: 'split',
+		horizontalArrowPositions	: 'split',
+		enableKeyboardNavigation	: true,
+		hideFocus					: false,
+		keyboardSpeed				: 0,
+		initialDelay                : 300,        // Delay before starting repeating
+		speed						: 30,		// Default speed when others falsey
+		scrollPagePercent			: .8		// Percent of visible area scrolled when pageUp/Down or track area pressed
+	};
+
+})(jQuery,this);
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.mousewheel.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.mousewheel.js b/pulse/src/main/webapp/scripts/lib/jquery.mousewheel.js
new file mode 100644
index 0000000..d215b2b
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.mousewheel.js
@@ -0,0 +1,84 @@
+/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
+ * Licensed under the MIT License (LICENSE.txt).
+ *
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
+ *
+ * Version: 3.0.6
+ * 
+ * Requires: 1.2.2+
+ */
+
+(function($) {
+
+var types = ['DOMMouseScroll', 'mousewheel'];
+
+if ($.event.fixHooks) {
+    for ( var i=types.length; i; ) {
+        $.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
+    }
+}
+
+$.event.special.mousewheel = {
+    setup: function() {
+        if ( this.addEventListener ) {
+            for ( var i=types.length; i; ) {
+                this.addEventListener( types[--i], handler, false );
+            }
+        } else {
+            this.onmousewheel = handler;
+        }
+    },
+    
+    teardown: function() {
+        if ( this.removeEventListener ) {
+            for ( var i=types.length; i; ) {
+                this.removeEventListener( types[--i], handler, false );
+            }
+        } else {
+            this.onmousewheel = null;
+        }
+    }
+};
+
+$.fn.extend({
+    mousewheel: function(fn) {
+        return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
+    },
+    
+    unmousewheel: function(fn) {
+        return this.unbind("mousewheel", fn);
+    }
+});
+
+
+function handler(event) {
+    var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
+    event = $.event.fix(orgEvent);
+    event.type = "mousewheel";
+    
+    // Old school scrollwheel delta
+    if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
+    if ( orgEvent.detail     ) { delta = -orgEvent.detail/3; }
+    
+    // New school multidimensional scroll (touchpads) deltas
+    deltaY = delta;
+    
+    // Gecko
+    if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
+        deltaY = 0;
+        deltaX = -1*delta;
+    }
+    
+    // Webkit
+    if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
+    if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
+    
+    // Add event and delta to the front of the arguments
+    args.unshift(event, delta, deltaX, deltaY);
+    
+    return ($.event.dispatch || $.event.handle).apply(this, args);
+}
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.placeholder.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.placeholder.js b/pulse/src/main/webapp/scripts/lib/jquery.placeholder.js
new file mode 100644
index 0000000..5a9441d
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.placeholder.js
@@ -0,0 +1,106 @@
+/*
+* Placeholder plugin for jQuery
+* ---
+* Copyright 2010, Daniel Stocks (http://webcloud.se)
+* Released under the MIT, BSD, and GPL Licenses.
+*/
+(function($) {
+    function Placeholder(input) {
+        this.input = input;
+        if (input.attr('type') == 'password') {
+            this.handlePassword();
+        }
+        // Prevent placeholder values from submitting
+        $(input[0].form).submit(function() {
+            if (input.hasClass('placeholder') && input[0].value == input.attr('placeholder')) {
+                input[0].value = '';
+            }
+        });
+    }
+    Placeholder.prototype = {
+        show : function(loading) {
+            // FF and IE saves values when you refresh the page. If the user refreshes the page with
+            // the placeholders showing they will be the default values and the input fields won't be empty.
+            if (this.input[0].value === '' || (loading && this.valueIsPlaceholder())) {
+                if (this.isPassword) {
+                    try {
+                        this.input[0].setAttribute('type', 'text');
+                    } catch (e) {
+                        this.input.before(this.fakePassword.show()).hide();
+                    }
+                }
+                this.input.addClass('placeholder');
+                this.input[0].value = this.input.attr('placeholder');
+            }
+        },
+        hide : function() {
+            if (this.valueIsPlaceholder() && this.input.hasClass('placeholder')) {
+                this.input.removeClass('placeholder');
+                this.input[0].value = '';
+                if (this.isPassword) {
+                    try {
+                        this.input[0].setAttribute('type', 'password');
+                    } catch (e) { }
+                    // Restore focus for Opera and IE
+                    this.input.show();
+                    this.input[0].focus();
+                }
+            }
+        },
+        valueIsPlaceholder : function() {
+            return this.input[0].value == this.input.attr('placeholder');
+        },
+        handlePassword: function() {
+            var input = this.input;
+            input.attr('realType', 'password');
+            this.isPassword = true;
+            // IE < 9 doesn't allow changing the type of password inputs
+            if ($.browser.msie && input[0].outerHTML) {
+                var fakeHTML = $(input[0].outerHTML.replace(/type=(['"])?password\1/gi, 'type=$1text$1'));
+                this.fakePassword = fakeHTML.val(input.attr('placeholder')).addClass('placeholder').focus(function() {
+                    input.trigger('focus');
+                    $(this).hide();
+                });
+                $(input[0].form).submit(function() {
+                    fakeHTML.remove();
+                    input.show();
+                });
+            }
+        }
+    };
+    var NATIVE_SUPPORT = !!("placeholder" in document.createElement( "input" ));
+    $.fn.placeholder = function() {
+        return NATIVE_SUPPORT ? this : this.each(function() {
+            var input = $(this);
+            var placeholder = new Placeholder(input);
+            placeholder.show(true);
+            input.focus(function() {
+                placeholder.hide();
+            });
+            input.blur(function() {
+                placeholder.show(false);
+            });
+
+            // On page refresh, IE doesn't re-populate user input
+            // until the window.onload event is fired.
+            if ($.browser.msie) {
+                $(window).load(function() {
+                    if(input.val()) {
+                        input.removeClass("placeholder");
+                    }
+                    placeholder.show(true);
+                });
+                // What's even worse, the text cursor disappears
+                // when tabbing between text inputs, here's a fix
+                input.focus(function() {
+                    if(this.value == "") {
+                        var range = this.createTextRange();
+                        range.collapse(true);
+                        range.moveStart('character', 0);
+                        range.select();
+                    }
+                });
+            }
+        });
+    };
+})(jQuery);


[50/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.0.txt
----------------------------------------------------------------------
diff --git a/pulse/release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.0.txt b/pulse/release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.0.txt
new file mode 100644
index 0000000..a59c05a
--- /dev/null
+++ b/pulse/release/3rdparty_licenses/open_source_licenses-Pivotal_GemFire_Pulse_8.0.txt
@@ -0,0 +1,1947 @@
+open_source_license.txt
+
+GemFire Pulse 8.0.0 GA
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software packages (or portions thereof) that are distributed with
+this Pivotal Software, Inc. Product.
+
+The Pivotal Product may also include other Pivotal components, which may
+contain additional open source software packages. One or more such
+open_source_licenses.txt files may therefore accompany this Pivotal
+Product.
+
+The Pivotal Product that includes this file does not necessarily use all
+the open source software packages referred to below and may also only
+use portions of a given package.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in
+this document. This list is provided for your convenience; please read
+further if you wish to review the copyright notice(s) and the full text
+of the license associated with each component.
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> grid.locale-en.js-4.6.0
+   >>> html5.js-pre3.5
+   >>> infovistoolkit-2.0.1
+   >>> jqgrid-4.4.0
+   >>> jquery-1.7.2
+   >>> jquery-popup.js-2.1.0
+   >>> jquery-sparklines-2.0
+   >>> jquery-ui-1.10.2
+   >>> jquery-ui.js-1.10.2
+   >>> jquery.i18n.properties.js-1.0.9
+   >>> jquery.jscrollpane.js-none
+   >>> jquery.mousewheel.js-3.0.6
+   >>> jquery.multiselect.js-1.14pre
+   >>> jquery.placeholder.js-none
+   >>> jquery.tablednd.js-0.5
+   >>> jquery.timeago.js-1.3.0
+   >>> jquery.ztree.core-3.5.js-3.5
+   >>> jquery.ztree.excheck-3.5.js-3.5
+   >>> json-none
+
+
+
+SECTION 2: Apache License, V2.0
+
+   >>> commons-beanutils-1.8
+   >>> commons-digester-1.8.1
+   >>> commons-logging-1.1.1
+   >>> commons.collections-3.2.0
+   >>> excanvas.js-2.0
+   >>> prettify.js-2.0
+   >>> spring-aop-3.2.9
+   >>> spring-beans-3.2.9.release
+   >>> spring-context-3.2.9.release
+   >>> spring-core-3.2.9.release
+   >>> spring-expression-3.2.9.release
+   >>> spring-security-config-3.2.9.release
+   >>> spring-security-core-3.2.9.release
+   >>> spring-security-web-3.2.9.release
+   >>> spring-web-3.2.9.release
+
+
+
+SECTION 3: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5.0
+
+
+
+SECTION 4: GNU Lesser General Public License, V3.0
+
+   >>> jquery.splitter-0.5.js-0.5
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> Common Development and Distribution License, V1.0
+
+   >>> GNU Lesser General Public License, V3.0
+   
+   >>> GNU Lesser General Public License, V2.1
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> grid.locale-en.js-4.6.0
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE.   THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE]
+
+ 
+ * jqGrid English Translation
+ * Tony Tomov tony@trirand.com
+ * http://trirand.com/blog/ 
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+
+
+>>> html5.js-pre3.5
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE]
+
+ 
+Copyright (c) 2014 Alexander Farkas (aFarkas).
+
+Licensed under MIT
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> infovistoolkit-2.0.1
+
+Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> Apache 2.0
+
+Jit-2.0.1.zip\Jit\Extras\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> jqgrid-4.4.0
+
+[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+Changes from Tony Tomov tony@trirand.com
+Dual licensed under the MIT and GPL licenses:
+http://www.opensource.org/licenses/mit-license.php
+http://www.gnu.org/licenses/gpl-2.0.html
+
+The MIT License (MIT)
+Copyright (c) <year> <copyright holders>
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> LGPL 2.1
+
+jquery.jqGrid-4.4.1.zip\src\JsonXml.js
+
+The below work is licensed under Creative Commons GNU LGPL License.
+
+Original work:
+
+License:     http://creativecommons.org/licenses/LGPL/2.1/
+Author:      Stefan Goessner/2006
+Web:         http://goessner.net/
+
+Modifications made:
+
+Version:     0.9-p5
+Description: Restructured code, JSLint validated (no strict whitespaces),
+added handling of empty arrays, empty strings, and int/floats values.
+Author:      Michael Schler/2008-01-29
+Web:         http://michael.hinnerup.net/blog/2008/01/26/converting-json-to-xml-and-xml-to-json/
+
+Description: json2xml added support to convert functions as CDATA
+so it will be easy to write characters that cause some problems when convert
+Author:      Tony Tomov
+
+
+>>> jquery-1.7.2
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
+
+Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+
+Dual licensed under the MIT and GPL licenses:
+
+http://www.opensource.org/licenses/mit-license.php
+
+http://www.gnu.org/licenses/gpl.html
+
+The MIT License (MIT)
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> jquery-popup.js-2.1.0
+
+License: MIT
+
+
+>>> jquery-sparklines-2.0
+
+Copyright (c) 2012, Splunk Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of Splunk Inc nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+>>> jquery-ui-1.10.2
+
+jQuery UI - v1.10.2 - 2013-03-14
+* http://jqueryui.com
+* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT
+
+
+>>> jquery-ui.js-1.10.2
+
+Copyright 2013 jQuery Foundation and other contributors,
+http://jqueryui.com/
+
+This software consists of voluntary contributions made by many
+individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
+contribution history, see the revision history and logs, available
+at http://jquery-ui.googlecode.com/svn/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> jquery.i18n.properties.js-1.0.9
+
+The MIT License (MIT)
+
+Copyright (c) 2011 Nuno Miguel Correia Serra Fernandes <nf...@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+>>> jquery.jscrollpane.js-none
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE.  THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE]
+
+Scripts for the demo pages on the jScrollPane website. * 
+
+* You do not need to include this script or use it on your site. * 
+
+* Copyright (c) 2010 Kelvin Luck 
+* Dual licensed under the MIT or GPL licenses.
+
+
+>>> jquery.mousewheel.js-3.0.6
+
+* jScrollPane build script * http://jscrollpane.kelvinluck.com/ * * Copyright (c) 2013 Kelvin Luck * Licensed under the MIT license.
+
+
+>>> jquery.multiselect.js-1.14pre
+
+[PLEASE NOTE:  PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
+
+Dual licensed under the MIT and GPL licenses:  *   http://www.opensource.org/licenses/mit-license.php  *   http://www.gnu.org/licenses/gpl.html  *
+
+
+>>> jquery.placeholder.js-none
+
+License: BSD
+
+
+>>> jquery.tablednd.js-0.5
+
+License: MIT
+
+
+>>> jquery.timeago.js-1.3.0
+
+Copyright (c) 2008-2013 Ryan McGeary
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+fssm-0.2.0.gem
+
+
+>>> jquery.ztree.core-3.5.js-3.5
+
+* Copyright (c) 2010 Hunter.z  *  * Licensed same as jquery - MIT License  * http://www.opensource.org/licenses/mit-license.php
+
+
+>>> jquery.ztree.excheck-3.5.js-3.5
+
+Copyright (c) 2010 Hunter.z  *  * Licensed same as jquery - MIT License  * http://www.opensource.org/licenses/mit-license.php
+
+
+>>> json-none
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 is applicable to the following component(s).
+
+
+>>> commons-beanutils-1.8
+
+Apache Commons BeanUtils
+Copyright 2000-2009 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+>>> commons-digester-1.8.1
+
+Apache Commons Digester
+Copyright 2001-2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+>>> commons-logging-1.1.1
+
+Apache Commons Logging
+Copyright 2003-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons.collections-3.2.0
+
+Copyright 2003-2005 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+commons-collections-3.2.jar
+commons-collections-testframework-3.2.jar
+
+
+>>> excanvas.js-2.0
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> prettify.js-2.0
+
+Copyright (C) 2006 Google Inc. 
+
+Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.You may obtain a copy of the License at   
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.
+
+
+>>> spring-aop-3.2.9
+
+Copyright 2002-2012 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-beans-3.2.9.release
+
+* Copyright 2002-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+>>> spring-context-3.2.9.release
+
+Copyright 2002-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-core-3.2.9.release
+
+Copyright 2002-2012 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-expression-3.2.9.release
+
+Copyright 2002-2012 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-security-config-3.2.9.release
+
+* Copyright 2002-2012 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+
+
+>>> spring-security-core-3.2.9.release
+
+/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+
+>>> spring-security-web-3.2.9.release
+
+Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-web-3.2.9.release
+
+Copyright 2002-2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5.0
+
+The contents of this file are subject to the terms
+of the Common Development and Distribution License
+(the "License").  You may not use this file except
+in compliance with the License.
+
+You can obtain a copy of the license at
+glassfish/bootstrap/legal/CDDLv1.0.txt or
+https://glassfish.dev.java.net/public/CDDLv1.0.html.
+See the License for the specific language governing
+permissions and limitations under the License.
+
+When distributing Covered Code, include this CDDL
+HEADER in each file and include the License file at
+glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable,
+add the following below this CDDL HEADER, with the
+fields enclosed by brackets "[]" replaced with your
+own identifying information: Portions Copyright [yyyy]
+[name of copyright owner]
+
+Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+
+Portions Copyright Apache Software Foundation.
+
+
+--------------- SECTION 4: GNU Lesser General Public License, V3.0 ----------
+
+GNU Lesser General Public License, V3.0 is applicable to the following component(s).
+
+
+>>> jquery.splitter-0.5.js-0.5
+
+* JQuery Spliter Plugin
+ * Copyright (C) 2010-2013 Jakub Jankiewicz <http://jcubic.pl>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+--------------- SECTION 3: GNU Lesser General Public License, V3.0 -----------
+
+		   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
+
+
+
+
+--------------- SECTION 4: GNU Lesser General Public License, V2.1 -----------
+
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.


<TRUNCATED>

[53/79] incubator-geode git commit: Fix test : testAuthenticationUsingPropertiesBag Remvoed JSON template code from product

Posted by tu...@apache.org.
Fix test : testAuthenticationUsingPropertiesBag
Remvoed JSON template code from product


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/73be5635
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/73be5635
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/73be5635

Branch: refs/heads/feature/GEODE-17
Commit: 73be56354207d7e2bc1640fd76d7724b81a70bd6
Parents: 1393ad2
Author: Tushar Khairnar <tk...@pivotal.io>
Authored: Thu Aug 27 13:10:17 2015 +0530
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:52:43 2015 +0530

----------------------------------------------------------------------
 .../internal/security/JSONAuthorization.java    | 292 -------------------
 .../internal/security/JSONAuthCodeTest.java     | 184 ------------
 .../security/JSONAuthorizationTest.java         | 152 ----------
 .../security/ResourceOperationJUnit.java        |   7 +-
 4 files changed, 4 insertions(+), 631 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/73be5635/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
deleted file mode 100644
index 5455818..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
+++ /dev/null
@@ -1,292 +0,0 @@
-package com.gemstone.gemfire.management.internal.security;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.security.Principal;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.management.remote.JMXPrincipal;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import com.gemstone.gemfire.GemFireConfigException;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.operations.OperationContext;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.management.internal.security.ResourceOperationContext.ResourceOperationCode;
-import com.gemstone.gemfire.security.AccessControl;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import com.gemstone.gemfire.security.Authenticator;
-import com.gemstone.gemfire.security.NotAuthorizedException;
-
-public class JSONAuthorization implements AccessControl, Authenticator {
-	
-	public static class Role{
-		String[] permissions;
-		String name;
-		String regionName;
-		String serverGroup;		
-	}
-	
-	public static class User{
-		String name;
-		Role[] roles;
-		String pwd;
-	}
-	
-	private static Map<String,User> acl = null;
-	
-	public static JSONAuthorization create() throws IOException, JSONException {
-	  if(acl==null){
-	    readSecurityDescriptor(readDefault());
-	  }
-	  return new JSONAuthorization();
-	}
-	
-  public JSONAuthorization() {
-    if (acl == null) {
-      try {
-        readSecurityDescriptor(readDefault());
-      } catch (IOException e) {
-        throw new GemFireConfigException("Error creating JSONAuth", e);
-      } catch (JSONException e) {
-        throw new GemFireConfigException("Error creating JSONAuth", e);
-      }
-    }
-  }
-	
-	public static Set<ResourceOperationCode> getAuthorizedOps(User user, ResourceOperationContext context) {
-    Set<ResourceOperationCode> codeList = new HashSet<ResourceOperationCode>();
-    for(Role role : user.roles) {
-      for (String perm : role.permissions) {
-        ResourceOperationCode code = ResourceOperationCode.parse(perm);
-        if (role.regionName == null && role.serverGroup == null) {
-          addPermissions(code, codeList);
-        } else if (role.regionName != null) {
-          LogService.getLogger().info("This role requires region=" + role.regionName);
-          if (context instanceof CLIOperationContext) {
-            CLIOperationContext cliContext = (CLIOperationContext) context;
-            String region = cliContext.getCommandOptions().get("region");
-            if (region != null && region.equals(role.regionName)) {
-              addPermissions(code, codeList);
-            } else {
-              LogService.getLogger().info("Not adding permission " + code + " since region=" + region + " does not match");
-            }
-          }
-        }
-        // Same to be implemented for ServerGroup
-      }
-    }
-    LogService.getLogger().info("Final set of permisions " + codeList);
-    return codeList;
-  }
-	
-	private static void addPermissions(ResourceOperationCode code, Set<ResourceOperationCode> codeList) {
-	  if(code!=null) {
-      if(code.getChildren()==null)
-        codeList.add(code);
-      else {
-        for(ResourceOperationCode c : code.getChildren()){
-          codeList.add(c);
-        }
-      }
-    }    
-  }
-
-  private static String readDefault() throws IOException, JSONException {
-	  String str = System.getProperty(ResourceConstants.RESORUCE_SEC_DESCRIPTOR, ResourceConstants.RESORUCE_DEFAULT_SEC_DESCRIPTOR);
-		File file = new File(str);
-		FileReader reader = new FileReader(file);
-		char[] buffer = new char[(int) file.length()];
-		reader.read(buffer);
-		String json = new String(buffer);
-		reader.close();
-		return json;
-	}
-
-	public JSONAuthorization(String json) throws IOException, JSONException{
-		readSecurityDescriptor(json);
-	}
-	
-
-	private static void readSecurityDescriptor(String json) throws IOException, JSONException {		
-		JSONObject jsonBean = new JSONObject(json);		
-		acl = new HashMap<String,User>();		
-		Map<String,Role> roleMap = readRoles(jsonBean);
-		readUsers(acl,jsonBean,roleMap);		
-	}
-
-	private static void readUsers(Map<String, User> acl, JSONObject jsonBean,
-			Map<String, Role> roleMap) throws JSONException {
-		JSONArray array = jsonBean.getJSONArray("users");
-		for(int i=0;i<array.length();i++){
-			JSONObject obj = array.getJSONObject(i);
-			User user = new User();
-			user.name = obj.getString("name");
-			if(obj.has("password"))
-			  user.pwd = obj.getString("password");
-			else 
-			  user.pwd = user.name;
-			
-			JSONArray ops = obj.getJSONArray("roles");
-			user.roles = new Role[ops.length()];
-			for(int j=0;j<ops.length();j++){
-				String roleName = ops.getString(j);
-				user.roles[j] = roleMap.get(roleName);
-				if(user.roles[j]==null){
-					throw new RuntimeException("Role not present " + roleName);
-				}
-			}
-			acl.put(user.name, user);
-		}		
-	}
-
-	private static Map<String, Role> readRoles(JSONObject jsonBean) throws JSONException {
-		Map<String,Role> roleMap = new HashMap<String,Role>();
-		JSONArray array = jsonBean.getJSONArray("roles");
-		for(int i=0;i<array.length();i++){
-			JSONObject obj = array.getJSONObject(i);
-			Role role = new Role();
-			role.name = obj.getString("name");
-			
-			if(obj.has("operationsAllowed")){
-				JSONArray ops = obj.getJSONArray("operationsAllowed");
-				role.permissions = new String[ops.length()];
-				for(int j=0;j<ops.length();j++){
-					role.permissions[j] = ops.getString(j);
-				}
-			}else {
-				if (!obj.has("inherit"))
-					throw new RuntimeException(
-							"Role "
-									+ role.name
-									+ " does not have any permission neither it inherits any parent role");
-			}
-			
-			roleMap.put(role.name,role);
-			
-			if(obj.has("region")){
-				role.regionName = obj.getString("region");
-			}
-			
-			if(obj.has("serverGroup")){
-				role.serverGroup = obj.getString("serverGroup");
-			}
-		}
-		
-		for(int i=0;i<array.length();i++){
-			JSONObject obj = array.getJSONObject(i);
-			String name = obj.getString("name");
-			Role role = roleMap.get(name);
-			if (role == null) {
-				throw new RuntimeException("Role not present "
-						+ role);
-			}
-			if(obj.has("inherit")){				
-				JSONArray parentRoles = obj.getJSONArray("inherit");
-				for (int m = 0; m < parentRoles.length(); m++) {
-					String parentRoleName = parentRoles.getString(m);
-					Role parentRole = roleMap.get(parentRoleName);
-					if (parentRole == null) {
-						throw new RuntimeException("Role not present "
-								+ parentRoleName);
-					}
-					int oldLenth=0;
-					if(role.permissions!=null)
-						oldLenth = role.permissions.length;
-					int newLength = oldLenth + parentRole.permissions.length;
-					String[] str = new String[newLength];
-					int k = 0;
-					if(role.permissions!=null) {
-						for (; k < role.permissions.length; k++) {
-							str[k] = role.permissions[k];
-						}
-					}
-
-					for (int l = 0; l < parentRole.permissions.length; l++) {
-						str[k + l] = parentRole.permissions[l];
-					}
-					role.permissions = str;
-				}
-			}
-			
-		}		
-		return roleMap;
-	}
-
-	public static Map<String, User> getAcl() {
-		return acl;
-	}
-	
-	private Principal principal=null;
-
-  @Override
-  public void close() {
-    
-  }
-
-  @Override
-  public boolean authorizeOperation(String arg0, OperationContext context) {
-    
-    if(principal!=null) {
-      User user = acl.get(principal.getName());
-      if(user!=null) {
-        LogService.getLogger().info("Context received " + context);
-        ResourceOperationContext ctx = (ResourceOperationContext)context;
-        LogService.getLogger().info("Checking for code " + ctx.getResourceOperationCode());
-        
-        //TODO : This is for un-annotated commands
-        if(ctx.getResourceOperationCode()==null)
-          return true;        
-        
-        boolean found = false;
-        for(ResourceOperationCode code : getAuthorizedOps(user, (ResourceOperationContext) context)) {
-          if(ctx.getResourceOperationCode().equals(code)){
-            found =true;
-            LogService.getLogger().info("found code " + code.toString());
-            break;
-          }             
-        }
-        if(found)
-          return true;
-        LogService.getLogger().info("Did not find code " + ctx.getResourceOperationCode());
-        return false;        
-      }
-    } 
-    return false;
-  }
-
-  @Override
-  public void init(Principal principal, DistributedMember arg1, Cache arg2) throws NotAuthorizedException {
-    this.principal = principal;    
-  }
-
-  @Override
-  public Principal authenticate(Properties props, DistributedMember arg1) throws AuthenticationFailedException {
-    String user = props.getProperty(ResourceConstants.USER_NAME);
-    String pwd = props.getProperty(ResourceConstants.PASSWORD);
-    User userObj = acl.get(user);
-    if(userObj==null)
-      throw new AuthenticationFailedException("Wrong username/password");
-    LogService.getLogger().info("User="+user + " pwd="+pwd);
-    if (user!=null && !userObj.pwd.equals(pwd) && !"".equals(user))
-      throw new AuthenticationFailedException("Wrong username/password");
-    LogService.getLogger().info("Authentication successful!! for " + user);
-    return new JMXPrincipal(user);    
-  }
-
-  @Override
-  public void init(Properties arg0, LogWriter arg1, LogWriter arg2) throws AuthenticationFailedException {   
-    
-  }	
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/73be5635/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthCodeTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthCodeTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthCodeTest.java
deleted file mode 100644
index fa9a292..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthCodeTest.java
+++ /dev/null
@@ -1,184 +0,0 @@
-package com.gemstone.gemfire.management.internal.security;
-
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.management.remote.JMXPrincipal;
-
-import junit.framework.TestCase;
-
-import org.json.JSONException;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-@Category(IntegrationTest.class)
-public class JSONAuthCodeTest extends TestCase {
-  
-  /*private String readFile(String name) throws IOException, JSONException {
-    File file = new File(name);
-    FileReader reader = new FileReader(file);
-    char[] buffer = new char[(int) file.length()];
-    reader.read(buffer);
-    String json = new String(buffer);
-    reader.close();
-    return json;
-  }*/
-  
-  public void testSimpleUserAndRole() throws IOException, JSONException {    
-    System.setProperty("resource.secDescriptor", TestUtil.getResourcePath(getClass(), "auth1.json")); 
-    JSONAuthorization authorization = JSONAuthorization.create();        
-    authorization.init(new JMXPrincipal("tushark"), null, null);
-    
-    try {
-      JMXOperationContext context = new JMXOperationContext(MBeanJMXAdapter.getDistributedSystemName(), "queryData");
-      boolean result = authorization.authorizeOperation(null, context);
-      //assertTrue(result);
-      
-      context = new JMXOperationContext(MBeanJMXAdapter.getDistributedSystemName(), "changeAlertLevel");
-      result = authorization.authorizeOperation(null,context);
-      assertFalse(result);
-      
-    } catch (Exception e) {
-      e.printStackTrace();
-      fail(e.getMessage());
-    } finally{
-      System.clearProperty("resource.secDescriptor");
-    }
-        
-  }
-  
-  public void testInheritRole() {
-    
-  }
-  
-  /*
-  public void testUserMultipleRole() throws IOException, JSONException {
-    System.setProperty("resource.secDescriptor", JSONAuthorizationTest.filePathPrefix + "auth2.json"); 
-    JSONAuthorization authorization = JSONAuthorization.create();    
-    //AccessControl acc = (AccessControl)authorization;
-    
-    //check authentication
-    Properties props = new Properties();
-    props.setProperty(ManagementInterceptor.USER_NAME, "tushark");
-    props.setProperty(ManagementInterceptor.PASSWORD, "1234567");
-    try{
-      Principal pl = authorization.authenticate(props, null);
-      assertNotNull(pl);
-    }catch(AuthenticationFailedException fe) {
-      fail(fe.getMessage());
-    }
-    
-    authorization.init(new JMXPrincipal("tushark"), null, null);
-    JMXOperationContext context = new JMXOperationContext(MBeanJMXAdapter.getDistributedSystemName(), "queryData");
-    boolean result = authorization.authorizeOperation(null,context);
-    //assertTrue(result);
-    
-    System.setProperty("resource-auth-accessor", JSONAuthorization.class.getCanonicalName());
-    System.setProperty("resource-authenticator", JSONAuthorization.class.getCanonicalName());
-    GemFireCacheImpl cache = null;
-    DistributedSystem ds = null;
-    Properties pr = new Properties();
-    pr.put("name", "testJMXOperationContext");
-    pr.put(DistributionConfig.JMX_MANAGER_NAME, "true");
-    pr.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
-    int port = AvailablePortHelper.getRandomAvailableTCPPort();
-    pr.put(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(port));
-    pr.put(DistributionConfig.HTTP_SERVICE_PORT_NAME, "0");
-    ds = DistributedSystem.connect(pr);
-    cache = (GemFireCacheImpl) CacheFactory.create(ds);
-    
-    try {
-      CLIOperationContext cliContext = new CLIOperationContext("put --key=k1 --value=v1 --region=/region1");
-      authorization.init(new JMXPrincipal("tushark"), null, null);
-      result = authorization.authorizeOperation(null, cliContext);
-      assertTrue(result);
-
-      cliContext = new CLIOperationContext("locate entry --key=k1 --region=/region1");
-      result = authorization.authorizeOperation(null, cliContext);
-      assertTrue(result);
-
-      context = new JMXOperationContext(MBeanJMXAdapter.getDistributedSystemName(), "changeAlertLevel");
-      result = authorization.authorizeOperation(null, context);
-      assertFalse(result);
-    } catch (Exception e) {
-      e.printStackTrace();
-      fail(e.getMessage());
-    } finally {
-      System.clearProperty("resource.secDescriptor");
-      cache.close();
-      ds.disconnect();
-    }
-    
-  }*/
-  
-  public void testCLIAuthForRegion() throws IOException, JSONException {
-    System.setProperty("resource.secDescriptor", TestUtil.getResourcePath(getClass(), "auth3.json")); 
-    JSONAuthorization authorization = JSONAuthorization.create();       
-    authorization.init(new JMXPrincipal("tushark"), null, null);
-    
-    System.setProperty("resource-auth-accessor", JSONAuthorization.class.getCanonicalName());
-    System.setProperty("resource-authenticator", JSONAuthorization.class.getCanonicalName());
-    GemFireCacheImpl cache = null;
-    DistributedSystem ds = null;
-    Properties pr = new Properties();
-    pr.put("name", "testJMXOperationContext");
-    pr.put(DistributionConfig.JMX_MANAGER_NAME, "true");
-    pr.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
-    int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-    pr.put(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(port));
-    pr.put(DistributionConfig.HTTP_SERVICE_PORT_NAME, "0");
-    ds = DistributedSystem.connect(pr);
-    cache = (GemFireCacheImpl) CacheFactory.create(ds);
-    
-    try {
-      checkAccessControlMBean();
-      CLIOperationContext cliContext = new CLIOperationContext("locate entry --key=k1 --region=region1");
-      boolean result = authorization.authorizeOperation(null, cliContext);
-      assertTrue(result);
-
-      cliContext = new CLIOperationContext("locate entry --key=k1 --region=secureRegion");
-      result = authorization.authorizeOperation(null, cliContext);
-      System.out.println("Result for secureRegion=" + result);
-      //assertFalse(result); //this is failing due to logic issue
-
-      authorization.init(new JMXPrincipal("avinash"), null, null);
-      result = authorization.authorizeOperation(null, cliContext);
-      assertTrue(result);
-
-      cliContext = new CLIOperationContext("locate entry --key=k1 --region=region1");
-      result = authorization.authorizeOperation(null, cliContext);
-      assertTrue(result);
-      
-    } catch (Exception e) {
-      e.printStackTrace();
-      fail(e.getMessage());
-    } finally {
-      System.clearProperty("resource.secDescriptor");  
-      cache.close();
-      ds.disconnect();
-    }      
-    
-  }
-
-  private void checkAccessControlMBean() throws Exception {
-    ObjectName name = new ObjectName(ResourceConstants.OBJECT_NAME_ACCESSCONTROL);
-    MBeanServer platformMBeanServer = ManagementFactory.getPlatformMBeanServer();
-    Set<ObjectName> names = platformMBeanServer.queryNames(name, null);
-    assertFalse(names.isEmpty());
-    assertEquals(1, names.size());
-    assertEquals(name,names.iterator().next());
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/73be5635/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorizationTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorizationTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorizationTest.java
deleted file mode 100644
index 5a5d635..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorizationTest.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package com.gemstone.gemfire.management.internal.security;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.json.JSONException;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.management.internal.security.JSONAuthorization.User;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class JSONAuthorizationTest extends TestCase {
-  
-  public static String makePath(String[] strings) {
-    StringBuilder sb = new StringBuilder();
-    for(int i=0;i<strings.length;i++){
-      sb.append(strings[i]);      
-      sb.append(File.separator);
-    }
-    return sb.toString();
-  }
-	
-	public void testSimpleUserAndRole() throws IOException, JSONException {
-		String json = readFile(TestUtil.getResourcePath(getClass(), "testSimpleUserAndRole.json"));
-		JSONAuthorization authorization = new JSONAuthorization(json);		
-		Map<String, User> acl = authorization.getAcl();
-		assertNotNull(acl);
-		assertEquals(1, acl.size());		
-		User user = acl.get("tushark");
-		assertNotNull(user);
-		assertNotNull(user.roles);
-		assertEquals(1,user.roles.length);
-		assertEquals("jmxReader", user.roles[0].name);
-		assertEquals(1, user.roles[0].permissions.length);
-		assertEquals("QUERY", user.roles[0].permissions[0]);
-	}
-	
-	
-	public void testUserAndRoleRegionServerGroup() throws IOException, JSONException {
-		String json = readFile(TestUtil.getResourcePath(getClass(), "testUserAndRoleRegionServerGroup.json"));
-		JSONAuthorization authorization = new JSONAuthorization(json);		
-		Map<String, User> acl = authorization.getAcl();
-		assertNotNull(acl);
-		assertEquals(1, acl.size());		
-		User user = acl.get("tushark");
-		assertNotNull(user);
-		assertNotNull(user.roles);
-		assertEquals(1,user.roles.length);
-		assertEquals("jmxReader", user.roles[0].name);
-		assertEquals(1, user.roles[0].permissions.length);
-		assertEquals("QUERY", user.roles[0].permissions[0]);
-		
-		assertEquals("secureRegion", user.roles[0].regionName);
-		assertEquals("SG2", user.roles[0].serverGroup);
-	}
-	
-	public void testUserMultipleRole()throws IOException, JSONException {
-		String json = readFile(TestUtil.getResourcePath(getClass(), "testUserMultipleRole.json"));
-		JSONAuthorization authorization = new JSONAuthorization(json);		
-		Map<String, User> acl = authorization.getAcl();
-		assertNotNull(acl);
-		assertEquals(1, acl.size());		
-		User user = acl.get("tushark");
-		assertNotNull(user);
-		assertNotNull(user.roles);
-		assertEquals(2,user.roles.length);
-		
-		JSONAuthorization.Role role = user.roles[0];
-		if(role.name.equals("jmxReader")){			
-			assertEquals(1, role.permissions.length);
-			assertEquals("QUERY", role.permissions[0]);
-		} else {
-			assertEquals(7, role.permissions.length);
-			assertEquals("sysMonitors", role.name);
-		}		
-		
-		role = user.roles[1];
-		if(role.name.equals("jmxReader")){			
-			assertEquals(1, role.permissions.length);
-			assertEquals("QUERY", role.permissions[0]);
-		} else {
-			assertEquals(7, role.permissions.length);
-			assertEquals("sysMonitors", role.name);
-			assertTrue(contains(role.permissions, "CMD_EXORT_LOGS"));
-			assertTrue(contains(role.permissions, "CMD_STACK_TRACES"));
-			assertTrue(contains(role.permissions, "CMD_GC"));
-			assertTrue(contains(role.permissions, "CMD_NETSTAT"));
-			assertTrue(contains(role.permissions, "CMD_SHOW_DEADLOCKS")); 
-			assertTrue(contains(role.permissions, "CMD_SHOW_LOG")); 
-			assertTrue(contains(role.permissions, "SHOW_METRICS"));
-		}		
-	}
-	
-	private boolean contains(String[] permissions, String string) {
-		for(String str : permissions)
-			if(str.equals(string))
-					return true;
-		return false;
-	}
-
-
-	public void testInheritRole() throws IOException, JSONException {
-		String json = readFile(TestUtil.getResourcePath(getClass(), "testInheritRole.json"));
-		JSONAuthorization authorization = new JSONAuthorization(json);		
-		Map<String, User> acl = authorization.getAcl();
-		assertNotNull(acl);
-		assertEquals(3, acl.size());		
-		User user = acl.get("tushark");
-		assertNotNull(user);
-		assertNotNull(user.roles);
-		assertEquals(1,user.roles.length);
-		assertEquals("jmxReader", user.roles[0].name);
-		assertEquals(1, user.roles[0].permissions.length);
-		assertEquals("QUERY", user.roles[0].permissions[0]);
-		
-		User admin1 = acl.get("admin1");
-		assertNotNull(admin1);
-		assertNotNull(admin1.roles);
-		assertEquals(1,admin1.roles.length);
-		assertEquals("adminSG1", admin1.roles[0].name);
-		assertEquals("SG1", admin1.roles[0].serverGroup);
-		assertEquals(1, admin1.roles[0].permissions.length);
-		assertEquals("CMD_SHUTDOWN", admin1.roles[0].permissions[0]);
-		
-		User admin2 = acl.get("admin2");
-		assertNotNull(admin2);
-		assertNotNull(admin2.roles);
-		assertEquals(1,admin2.roles.length);
-		assertEquals("adminSG2", admin2.roles[0].name);
-		assertEquals("SG2", admin2.roles[0].serverGroup);
-		assertEquals(2, admin2.roles[0].permissions.length);
-		assertTrue(contains(admin2.roles[0].permissions, "CHANGE_LOG_LEVEL"));
-		assertTrue(contains(admin2.roles[0].permissions, "CMD_SHUTDOWN"));
-	}
-	
-	private String readFile(String name) throws IOException, JSONException {
-		File file = new File(name);
-		FileReader reader = new FileReader(file);
-		char[] buffer = new char[(int) file.length()];
-		reader.read(buffer);
-		String json = new String(buffer);
-		reader.close();
-		return json;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/73be5635/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationJUnit.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationJUnit.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationJUnit.java
index b88b56c..476af9b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationJUnit.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationJUnit.java
@@ -432,7 +432,7 @@ public class ResourceOperationJUnit  extends TestCase {
     GemFireCacheImpl cache = null;
     DistributedSystem ds = null;
     Properties pr = new Properties();
-    pr.put("name", "testJMXOperationContext");
+    pr.put("name", "testAuthenticationUsingPropertiesBag");
     pr.put(DistributionConfig.JMX_MANAGER_NAME, "true");
     pr.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
     int port = AvailablePortHelper.getRandomAvailableTCPPort();
@@ -474,9 +474,10 @@ public class ResourceOperationJUnit  extends TestCase {
       fail("Authentication should fail");
     } catch (AuthenticationFailedException e) {
       //expected
-    } catch (SecurityException e) {
+    } catch(SecurityException e){
       //expected
-    } catch(Exception e){
+    }
+    catch(Exception e){
       e.printStackTrace();
       fail("Unexpected error " + e.getMessage());      
     }


[79/79] incubator-geode git commit: Incorprating kirk's review comments : https://reviews.apache.org/r/39585/

Posted by tu...@apache.org.
Incorprating kirk's review comments : https://reviews.apache.org/r/39585/


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9fdc8bcd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9fdc8bcd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9fdc8bcd

Branch: refs/heads/feature/GEODE-17
Commit: 9fdc8bcd58e1492a933c530cf8417b0da08cbc91
Parents: 87c83da
Author: tushark <tu...@apache.org>
Authored: Tue Nov 3 15:06:19 2015 +0530
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:54:35 2015 +0530

----------------------------------------------------------------------
 .../internal/security/CommandTestBase.java      |   7 +-
 .../security/IntegratedSecDUnitTest.java        | 105 +++++++++++++------
 .../security/MBeanSecurityJUnitTest.java        |  37 +++----
 .../internal/security/TestAccessControl.java    |  28 ++---
 .../internal/security/TestAuthenticator.java    |   8 +-
 5 files changed, 111 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9fdc8bcd/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java
index a95e605..9fb9d94 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/CommandTestBase.java
@@ -160,9 +160,6 @@ public class CommandTestBase extends CacheTestCase {
     Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
       public void run() {
         verifyManagementServiceStopped();
-        //if (Boolean.getBoolean(USE_HTTP_SYSTEM_PROPERTY)) {
-        //  System.gc();
-        //}
       }
     });
   }
@@ -291,10 +288,12 @@ public class CommandTestBase extends CacheTestCase {
       Gfsh.SUPPORT_MUTLIPLESHELL = true;
       String shellId = getClass().getSimpleName()+"_"+getName();
       HeadlessGfsh shell = new HeadlessGfsh(shellId, 300);
+      
       //Various command use ThreadLocal instance. following call makes
       //HeadlessGfsh available to all the commands
       shell.setThreadLocalInstance();
-      //Added to avoid trimming of the columns
+      
+      //Added to avoid trimming of the columns. Not needed for non-interactive shell
       //shell.setEnvProperty(Gfsh.ENV_APP_RESULT_VIEWER, "non-basic");
       //shell.start();
       info("Started headless shell: " + shell);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9fdc8bcd/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java
index 8258e49..8e63524 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/IntegratedSecDUnitTest.java
@@ -1,6 +1,6 @@
 package com.gemstone.gemfire.management.internal.security;
 
-import hydra.Log;
+//import hydra.Log;
 
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -17,6 +17,8 @@ import javax.management.remote.JMXConnector;
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 
+import org.apache.logging.log4j.Logger;
+
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
@@ -34,6 +36,10 @@ import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.management.DistributedRegionMXBean;
+import com.gemstone.gemfire.management.ManagementService;
+import com.gemstone.gemfire.management.ManagerMXBean;
 import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
 import com.gemstone.gemfire.management.internal.cli.domain.DataCommandRequest;
 import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
@@ -45,6 +51,7 @@ import com.gemstone.gemfire.management.internal.security.ResourceOperationContex
 import com.gemstone.gemfire.security.AuthInitialize;
 import com.gemstone.gemfire.security.AuthenticationFailedException;
 
+import dunit.DistributedTestCase;
 import dunit.Host;
 import dunit.SerializableRunnable;
 import dunit.VM;
@@ -54,6 +61,8 @@ import dunit.VM;
  * 
  */
 public class IntegratedSecDUnitTest extends CommandTestBase {
+  
+  private static Logger logger = LogService.getLogger();
 
   public static class AuthInitializer implements AuthInitialize {
 
@@ -118,7 +127,7 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
 
   @SuppressWarnings("rawtypes")
   public void setUpServerVM(Properties gemFireProps) throws Exception {
-    Log.getLogWriter().info("Creating server vm cache with props =" + gemFireProps);
+    logger.info("Creating server vm cache with props =" + gemFireProps);
     gemFireProps.setProperty(DistributionConfig.NAME_NAME, testName + "Server");
     createCache(gemFireProps);
     RegionFactory factory = cache.createRegionFactory(RegionShortcut.REPLICATE);
@@ -126,16 +135,14 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
     assertNotNull(r);
     r.put("serverkey", "servervalue");
     assertEquals(1,r.size());
-    Log.getLogWriter().info("Created serverRegion with 1 key=serverKey");
+    logger.info("Created serverRegion with 1 key=serverKey");
   }
 
   public void setUpClientVM(Properties gemFireProps, String host, int port, String user, String password) {
     gemFireProps.setProperty(DistributionConfig.NAME_NAME, testName + "Client");
-    //gemFireProps.setProperty("security-username", user);
-    //gemFireProps.setProperty("security-password", password);
     gemFireProps.setProperty("security-client-auth-init",
         "com.gemstone.gemfire.management.internal.security.IntegratedSecDUnitTest$AuthInitializer.create");
-    Log.getLogWriter().info("Creating client cache with props =" + gemFireProps);
+    logger.info("Creating client cache with props =" + gemFireProps);
     ClientCacheFactory clientCacheFactory = new ClientCacheFactory(gemFireProps);
     clientCacheFactory.addPoolServer(host, port);
     clientCacheFactory.setPoolMultiuserAuthentication(true);
@@ -215,6 +222,7 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
     final Host host = Host.getHost(0);
     VM serverVM = host.getVM(1);
     VM clientVM = host.getVM(2);
+    VM managerVM = host.getVM(0);
     serverVM.invoke(IntegratedSecDUnitTest.class, "setUpServerVMTask", new Object[] { props });
     serverVM.invoke(IntegratedSecDUnitTest.class, "createServerTask");
 
@@ -222,16 +230,44 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
     String hostName = (String) array[0];
     int port = (Integer) array[1];
     Object params[] = new Object[] { props, hostName, port, "tushark", "password123" };
-    Log.getLogWriter().info("Starting client with server endpoint " + hostName + ":" + port);
+    logger.info("Starting client with server endpoint " + hostName + ":" + port);
     clientVM.invoke(IntegratedSecDUnitTest.class, "setUpClientVMTask", params);
     
-    Log.getLogWriter().info("Sleeping for 5 seconds to get all mbeans registered on manager");
-    try {
-      Thread.sleep(5000);
-    } catch (InterruptedException e) {
-      e.printStackTrace();
-    }
-    
+    SerializableRunnable checkRegionMBeans = new SerializableRunnable() {
+      @Override
+      public void run() {
+        Cache cache = getCache();
+        final ManagementService service = ManagementService.getManagementService(cache);
+
+        final WaitCriterion waitForMaangerMBean = new WaitCriterion() {
+          @Override
+          public boolean done() {
+            ManagerMXBean bean1 = service.getManagerMXBean();
+            DistributedRegionMXBean bean2 = service.getDistributedRegionMXBean("/serverRegion");
+            if (bean1 == null) {
+              logger.info("Still probing for ManagerMBean");
+              return false;
+            } else {
+              logger.info("Still probing for DistributedRegionMXBean=" + bean2);
+              return (bean2 != null);
+            }
+          }
+
+          @Override
+          public String description() {
+            return "Probing for DistributedRegionMXBean for serverRegion";
+          }
+        };
+
+        DistributedTestCase.waitForCriterion(waitForMaangerMBean, 30000, 2000, true);
+
+        assertNotNull(service.getMemberMXBean());
+        assertNotNull(service.getManagerMXBean());
+        DistributedRegionMXBean bean = service.getDistributedRegionMXBean("/serverRegion");
+        assertNotNull(bean);
+      }
+    };
+    managerVM.invoke(checkRegionMBeans);        
   }
 
   @SuppressWarnings("serial")
@@ -361,14 +397,14 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
       Region region = regionService.getRegion(regionPath);
       assertNotNull(region);
       Object oldValue = region.put(key, value);
-      Log.getLogWriter().info("doPutUsingClientCache : Put key=" + key + " for user="+ user+" newValue="+ value + " oldValue="+ oldValue + " expectSuccess="+expectSuccess);
+      logger.info("doPutUsingClientCache : Put key=" + key + " for user="+ user+" newValue="+ value + " oldValue="+ oldValue + " expectSuccess="+expectSuccess);
       if (!expectSuccess)
         fail("Region Put was expected to fail");
     } catch (Exception e) {
       if (!expectSuccess) {
-        Log.getLogWriter().info("expectSuccess=false => " + e.getMessage());
+        logger.info("expectSuccess=false => " + e.getMessage());
       } else {
-        Log.getLogWriter().error("Unexpected error", e);
+        logger.error("Unexpected error", e);
         fail("Unknown reason " + e.getMessage());
       }
     }
@@ -379,13 +415,13 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
     String command = "put --region=" + regionPath + " --key=" + key + " --value=" + value;
     changeGfshUser(user, password);
     CommandResult result = executeCommand(command);
-    Log.getLogWriter().info("CommandResult " + result);
+    logger.info("CommandResult " + result);
     if (expectSuccess) {
       validateGfshResult(result, expectSuccess);
       printCommandOutput(result);
     }
     else {
-      Log.getLogWriter().info("Error line :" + this.commandError);
+      logger.info("Error line :" + this.commandError);
       assertTrue(this.commandError.contains("Access Denied"));
       this.commandError = null;
       // validateGfshResultError(result);
@@ -395,7 +431,7 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
   private static void validateGfshResultError(CommandResult result) {
     if (result.getType().equals(ResultData.TYPE_ERROR)) {
       ErrorResultData data = (ErrorResultData) result.getResultData();
-      Log.getLogWriter().info("Error resultData : " + data.toString());
+      logger.info("Error resultData : " + data.toString());
     } else
       fail("Unexpected result type " + result.getType());
   }
@@ -420,15 +456,15 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
       Region region = regionService.getRegion(regionPath);
       assertNotNull(region);
       Object value = region.get(key);
-      Log.getLogWriter().info("doGetUsingClientCache : Get key=" + key + " for user="+ user+" value="+ value + " expectSuccess="+expectSuccess);
+      logger.info("doGetUsingClientCache : Get key=" + key + " for user="+ user+" value="+ value + " expectSuccess="+expectSuccess);
       assertNotNull(value);
       if (!expectSuccess)
         fail("Region Get was expected to fail");
     } catch (Exception e) {
       if (!expectSuccess) {
-        Log.getLogWriter().info("expectSuccess=true => " + e.getMessage());
+        logger.info("expectSuccess=true => " + e.getMessage());
       } else {
-        Log.getLogWriter().error("Unexpected error", e);
+        logger.error("Unexpected error", e);
         fail("Unknown reason " + e.getMessage());
       }
     }
@@ -444,7 +480,7 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
       validateGfshResult(result, expectSuccess);      
     }
     else {
-      Log.getLogWriter().info("Error line :" + this.commandError);
+      logger.info("Error line :" + this.commandError);
       assertTrue(this.commandError.contains("Access Denied"));
       this.commandError = null;
     }
@@ -468,7 +504,7 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
       //assertFalse(result.getType().equals(ResultData.TYPE_ERROR));
     }
     else {
-      Log.getLogWriter().info("Error line :" + this.commandError);
+      logger.info("Error line :" + this.commandError);
       assertTrue(this.commandError.contains("Access Denied"));
       this.commandError = null;
     }
@@ -476,14 +512,14 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
   
   private static void printCommandOutput(CommandResult cmdResult) {
     assertNotNull(cmdResult);
-    Log.getLogWriter().info("Command Output : ");
+    logger.info("Command Output : ");
     StringBuilder sb = new StringBuilder();
     cmdResult.resetToFirstLine();
     while (cmdResult.hasNextLine()) {
       sb.append(cmdResult.nextLine()).append(DataCommandRequest.NEW_LINE);
     }
-    Log.getLogWriter().info(sb.toString());
-    Log.getLogWriter().info("");      
+    logger.info(sb.toString());
+    logger.info("");      
   }
   
   private void doShowLogUsingJMX(boolean expectSuccess, String user, String password) {
@@ -495,21 +531,21 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
       ObjectName memberON = (ObjectName)mbeanServer.invoke(MBeanJMXAdapter.getDistributedSystemName(), "fetchMemberObjectName", 
           new Object[]{"Manager"}, new String[]{String.class.getCanonicalName()});      
       String logs = (String) mbeanServer.invoke(memberON, "showLog", new Object[]{60}, new String[]{int.class.toString()});
-      Log.getLogWriter().info("JMX Output :" + logs);
+      logger.info("JMX Output :" + logs);
       connector.close();
       if(!expectSuccess)
         fail("Expected Access Denied...");      
     } catch (InstanceNotFoundException e) {
-      Log.getLogWriter().error("Unexpected Error", e);
+      logger.error("Unexpected Error", e);
       fail("Unexpected Error " + e.getMessage());
     } catch (MBeanException e) {
-      Log.getLogWriter().error("Unexpected Error", e);
+      logger.error("Unexpected Error", e);
       fail("Unexpected Error " + e.getMessage());
     } catch (ReflectionException e) {
-      Log.getLogWriter().error("Unexpected Error", e);
+      logger.error("Unexpected Error", e);
       fail("Unexpected Error " + e.getMessage());
     } catch (IOException e) {
-      Log.getLogWriter().error("Unexpected Error", e);
+      logger.error("Unexpected Error", e);
       fail("Unexpected Error " + e.getMessage());
     } catch (SecurityException e) {
       if(expectSuccess){
@@ -635,7 +671,8 @@ public class IntegratedSecDUnitTest extends CommandTestBase {
     doCommandUsingGfsh("show metrics", true, "custom", "password123");
     doCommandUsingGfsh("show dead-locks --file=deadlocks_custom_3.txt", true, "custom", "password123");    
     
-    /* Commented due to error with gradle :  TailLogRequest/Response processed in application vm with shared logging
+    /* Commented due to error with gradle but was working with ant build earlier 
+    Error string is :  TailLogRequest/Response processed in application vm with shared logging
     //check jmx and gfsh
     doCommandUsingGfsh("show log --member=Manager", true, "monitor", "password123");
     doCommandUsingGfsh("show log --member=Manager", false, "dataWrite", "password123");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9fdc8bcd/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
index d8915a7..ed6a5e8 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/MBeanSecurityJUnitTest.java
@@ -1,6 +1,6 @@
 package com.gemstone.gemfire.management.internal.security;
 
-import hydra.Log;
+
 
 import java.io.File;
 import java.io.IOException;
@@ -27,6 +27,7 @@ import javax.management.remote.JMXConnector;
 import javax.management.remote.JMXConnectorFactory;
 import javax.management.remote.JMXServiceURL;
 
+import org.apache.logging.log4j.Logger;
 import org.junit.experimental.categories.Category;
 
 import junit.framework.TestCase;
@@ -41,6 +42,7 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.AvailablePortHelper;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.management.AsyncEventQueueMXBean;
 import com.gemstone.gemfire.management.CacheServerMXBean;
 import com.gemstone.gemfire.management.DiskStoreMXBean;
@@ -58,7 +60,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
  * Test all mbean operations by granting and revoking the access levels required
- * for performing that operation
+ * for performing that operation. Does not test wan mbeans 
  * 
  * @author tushark
  * 
@@ -66,6 +68,7 @@ import com.gemstone.gemfire.test.junit.categories.UnitTest;
 @Category(UnitTest.class)
 public class MBeanSecurityJUnitTest extends TestCase {
 
+  private static Logger logger = LogService.getLogger();
   private static final String USER = "custom";
   private static final String PASSWORD = "password123";
   private JMXConnector connector = null;
@@ -86,8 +89,7 @@ public class MBeanSecurityJUnitTest extends TestCase {
   }
 
   public void testGemfireMBeans() throws IOException, InstanceNotFoundException, MBeanException, ReflectionException,
-      AttributeNotFoundException, InvalidAttributeValueException, MalformedObjectNameException {
-    Log.createLogWriter("testGemfireMBeans", "info");
+      AttributeNotFoundException, InvalidAttributeValueException, MalformedObjectNameException {    
     GemFireCacheImpl cache = null;
     DistributedSystem ds = null;
     Properties pr = new Properties();
@@ -149,14 +151,9 @@ public class MBeanSecurityJUnitTest extends TestCase {
 
     doTestDiskStoreMXBean(port);
     doTestCacheServerMXBean(port, cacheServerPort);
-    //TODO : needs WAN
-    // doTestGatewayReceiverMXBean(port);
-    // doTestGatewaySenderMXBean(port);
     doTestLockServiceMXBean(port);
     doTestManagerMXBean(port);
-    doTestRegionMXBean(port);
-    //TODO : Needs Locator in DS
-    doTestLocatorMXBean(port);
+    doTestRegionMXBean(port);    
     doTestDistributedLockServiceMXBean(port);
     doTestDistributedRegionMXBean(port);
     doTestAsyncEventQueueMXBean(port);
@@ -225,9 +222,10 @@ public class MBeanSecurityJUnitTest extends TestCase {
 
   }
 
-  private void doTestLocatorMXBean(int port) {
+  /* Has issues while starting locator hence commented out
+   private void doTestLocatorMXBean(int port) {
 
-    /*MBeanServerConnection conn = connector.getMBeanServerConnection();
+    MBeanServerConnection conn = connector.getMBeanServerConnection();
     ObjectName regionON = (ObjectName) conn.invoke(MBeanJMXAdapter.getDistributedSystemName(), "fetchRegionObjectName",
         new Object[] { "testGemfireMBeans", "/region1" },
         new String[] { String.class.getCanonicalName(), String.class.getCanonicalName() });
@@ -246,9 +244,9 @@ public class MBeanSecurityJUnitTest extends TestCase {
         
       checkMethod(port, LocatorMXBean.class, locatorON, "listManagers", null,
         ResourceOperationCode.LIST_DS);                            
-        */
+        
     
-  }
+  }*/
 
   private void doTestRegionMXBean(int port) throws IOException, InstanceNotFoundException, MBeanException,
       ReflectionException {
@@ -329,9 +327,6 @@ public class MBeanSecurityJUnitTest extends TestCase {
         "MaxConnections", "Running" });
     
     checkMethod(port, CacheServerMXBean.class, cacheServerON, "showAllClientStats", null, ResourceOperationCode.LIST_DS);
-
-    /*checkMethod(port, CacheServerMXBean.class, cacheServerON, "showClientQueueDetails", null,
-        ResourceOperationCode.LIST_DS);*/
     
     checkMethod(port, CacheServerMXBean.class, cacheServerON, "removeIndex", new Object[]{"indexName"},
         ResourceOperationCode.DESTROY_INDEX);
@@ -434,13 +429,13 @@ public class MBeanSecurityJUnitTest extends TestCase {
       }
       testObject(proxy, methodName, args, true);
       TestAccessControl.grantResourceOp(USER, opCode);
-      Log.getLogWriter().info("Grant opCode " + opCode);
+      logger.info("Grant opCode " + opCode);
       testObject(proxy, methodName, args, false);
       boolean removed = TestAccessControl.revokeResourceOp(USER, opCode);
       if (!removed)
         fail("Fail to removed opCode " + opCode);
       else
-        Log.getLogWriter().info("Revoke opCode " + opCode);
+        logger.info("Revoke opCode " + opCode);
 
     }
   }
@@ -519,11 +514,11 @@ public class MBeanSecurityJUnitTest extends TestCase {
       }
     }
     try {
-      Log.getLogWriter().info("Invoking method " + methodName);
+      logger.info("Invoking method " + methodName);
       mt.invoke(proxy, args);
       if (securityExceptionExpected)
         fail("Expected call to method " + methodName + " was expected to fail with security exception");
-      Log.getLogWriter().info("Successfully Invoked method " + methodName);
+      logger.info("Successfully Invoked method " + methodName);
     } catch (IllegalAccessException e) {
       error("UnExpected error ", e);
       fail(e.getMessage());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9fdc8bcd/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java
index e777b0c..5c9971c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAccessControl.java
@@ -1,6 +1,6 @@
 package com.gemstone.gemfire.management.internal.security;
 
-import hydra.Log;
+
 
 import java.security.Principal;
 import java.util.HashMap;
@@ -9,16 +9,20 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.logging.log4j.Logger;
+
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.operations.OperationContext;
 import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
 import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.management.internal.security.ResourceOperationContext.ResourceOperationCode;
 import com.gemstone.gemfire.security.AccessControl;
 import com.gemstone.gemfire.security.NotAuthorizedException;
 
 public class TestAccessControl implements AccessControl {
   
+  private static Logger logger = LogService.getLogger();
   private Principal principal=null;
   
   public static Map<String,Set<ResourceOperationCode>> resourceOpCodeMap = new HashMap<String,Set<ResourceOperationCode>>();
@@ -52,7 +56,7 @@ public class TestAccessControl implements AccessControl {
     boolean removed = list.remove(code);
 
     if (!removed) {
-      Log.getLogWriter().warning("Code " + code + " was not found for REVOKE access");
+      logger.warn("Code " + code + " was not found for REVOKE access");
     }
     return removed;
   }
@@ -61,7 +65,7 @@ public class TestAccessControl implements AccessControl {
     Set<ResourceOperationCode> list = resourceOpCodeMap.get(user);
     boolean removed = list.remove(code);
     if (!removed) {
-      Log.getLogWriter().warning("Code " + code + " was not found for REVOKE access");
+      logger.warn("Code " + code + " was not found for REVOKE access");
     }
     return removed;
   }
@@ -82,17 +86,17 @@ public class TestAccessControl implements AccessControl {
 
   @Override
   public boolean authorizeOperation(String regionName, OperationContext context) {    
-    Log.getLogWriter().info("Context Received " + context);
-    Log.getLogWriter().info("Principal " + principal.getName());    
+    logger.info("Context Received " + context);
+    logger.info("Principal " + principal.getName());    
     boolean flag = false;
     if (!context.getOperationCode().equals(OperationCode.RESOURCE)) {
       if (opCodeMap.containsKey(principal.getName())) {
         Set<OperationCode> codes = opCodeMap.get(principal.getName());
         for (OperationCode code : codes) {
-          Log.getLogWriter().info("Checking OpCode=" + code);
+          logger.info("Checking OpCode=" + code);
           flag = code.equals(context.getOperationCode());
           if (flag) {
-            Log.getLogWriter().info("For Principal " + principal.getName() + " Found Granted CacheOp=" + code);
+            logger.info("For Principal " + principal.getName() + " Found Granted CacheOp=" + code);
             break;
           }
         }
@@ -107,21 +111,21 @@ public class TestAccessControl implements AccessControl {
         ResourceOperationContext ctx = (ResourceOperationContext) context;
         flag = false;
         for (ResourceOperationCode code : codes) {
-          Log.getLogWriter().info("Checking ResourceOpCode=" + code);
+          logger.info("Checking ResourceOpCode=" + code);
           flag = code.allowedOp(ctx.getResourceOperationCode());
           if (flag) {
-            Log.getLogWriter().info("For Principal " + principal.getName() + " Found Granted ResourceOp=" + code);
+            logger.info("For Principal " + principal.getName() + " Found Granted ResourceOp=" + code);
             return true;
           }
         }
-        Log.getLogWriter().info("For Principal " + principal.getName() + " authorizeOperation failed");
+        logger.info("For Principal " + principal.getName() + " authorizeOperation failed");
         return false;
       } else {
-        Log.getLogWriter().info("For Principal " + principal.getName() + " authorizeOperation failed");
+        logger.info("For Principal " + principal.getName() + " authorizeOperation failed");
         return false;
       }
     }
-    Log.getLogWriter().info("For Principal " + principal.getName() + " authorizeOperation failed");
+    logger.info("For Principal " + principal.getName() + " authorizeOperation failed");
     return false;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9fdc8bcd/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java
index 0eae45f..ca450c3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/TestAuthenticator.java
@@ -1,20 +1,22 @@
 package com.gemstone.gemfire.management.internal.security;
 
-import hydra.Log;
-
 import java.security.Principal;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 
+import org.apache.logging.log4j.Logger;
+
 import com.gemstone.gemfire.LogWriter;
 import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.management.internal.security.ResourceOperationJUnit.TestUsernamePrincipal;
 import com.gemstone.gemfire.security.AuthenticationFailedException;
 import com.gemstone.gemfire.security.Authenticator;
 
 public class TestAuthenticator implements Authenticator {
   
+  private static Logger logger = LogService.getLogger();
   public static Map<String,String> userRepo = new HashMap<String,String>();
   
   public static void addUser(String user, String password) {
@@ -41,7 +43,7 @@ public class TestAuthenticator implements Authenticator {
     String user = props.getProperty(ResourceConstants.USER_NAME);
     String pwd = props.getProperty(ResourceConstants.PASSWORD);
     if (user != null && userRepo.containsKey(user) && pwd != null && pwd.equals(userRepo.get(user))) {
-      Log.getLogWriter().info("Authentication successful!! for " + user);
+      logger.info("Authentication successful!! for " + user);
       return new TestUsernamePrincipal(user);
     } else
       throw new AuthenticationFailedException("Wrong username/password");


[48/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.1.txt
----------------------------------------------------------------------
diff --git a/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.1.txt b/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.1.txt
new file mode 100644
index 0000000..11680e6
--- /dev/null
+++ b/pulse/release/3rdparty_licenses/open_source_licenses-VMware_vFabric_GemFire_Pulse_7.0.1.txt
@@ -0,0 +1,1647 @@
+open_source_license.txt
+
+VMware vFabric GemFire Pulse 7.0.1 GA
+
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software components (or portions thereof) that are distributed with
+this VMware software products.
+
+The VMware Product may also include other VMware components, which may contain additional open 
+source software packages. One or more such open_source_licenses.txt files may therefore 
+accompany this VMware Product. 
+
+The VMware product that includes this file does not necessarily use all the
+open source software components referred to below and may also only use
+portions of a given component.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in this
+document.  This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> flot-0.7
+   >>> infovistoolkit-2.0.1
+   >>> jqgrid-4.4.0
+   >>> jquery-1.7.2
+   >>> jquery-sparklines-2.0
+   >>> jquery-ui-1.8.23
+   >>> json-none
+
+
+
+SECTION 2: Apache License, V2.0
+
+   >>> commons-beanutils-1.8.3
+   >>> commons-digester-1.8.1
+   >>> commons-logging-1.1.1
+   >>> commons.collections-3.2.0
+   >>> spring-aop-3.1.1.release
+   >>> spring-asm-3.1.1.release
+   >>> spring-beans-3.1.1.release
+   >>> spring-context-3.1.1.release
+   >>> spring-core-3.1.1.release
+   >>> spring-expression-3.1.1.release
+   >>> spring-security-config-3.1.1.release
+   >>> spring-security-core-3.1.1.release
+   >>> spring-security-web-3.1.1.release
+   >>> spring-web-3.1.1.release
+
+
+
+SECTION 3: Common Development and Distribution License, V1.0
+
+   >>> servlet-api-2.5.0
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> Common Development and Distribution License, V1.0
+
+   >>> GNU Lesser General Public License, V2.1 
+
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> flot-0.7
+
+Copyright (c) 2007-2012 IOLA and Ole Laursen
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+
+> Apache 2.0
+
+Downloads\flot-flot-v0.7-114-g7a22921.zip\flot-flot-7a22921\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> infovistoolkit-2.0.1
+
+Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> Apache 2.0
+
+Jit-2.0.1.zip\Jit\Extras\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> jqgrid-4.4.0
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+Changes from Tony Tomov tony@trirand.com
+Dual licensed under the MIT and GPL licenses:
+http://www.opensource.org/licenses/mit-license.php
+http://www.gnu.org/licenses/gpl-2.0.html
+
+The MIT License (MIT)
+Copyright (c) <year> <copyright holders>
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> LGPL 2.1
+
+jquery.jqGrid-4.4.1.zip\src\JsonXml.js
+
+The below work is licensed under Creative Commons GNU LGPL License.
+
+Original work:
+
+License:     http://creativecommons.org/licenses/LGPL/2.1/
+Author:      Stefan Goessner/2006
+Web:         http://goessner.net/
+
+Modifications made:
+
+Version:     0.9-p5
+Description: Restructured code, JSLint validated (no strict whitespaces),
+added handling of empty arrays, empty strings, and int/floats values.
+Author:      Michael Schler/2008-01-29
+Web:         http://michael.hinnerup.net/blog/2008/01/26/converting-json-to-xml-and-xml-to-json/
+
+Description: json2xml added support to convert functions as CDATA
+so it will be easy to write characters that cause some problems when convert
+Author:      Tony Tomov
+
+
+>>> jquery-1.7.2
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
+
+Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+
+Dual licensed under the MIT and GPL licenses:
+
+http://www.opensource.org/licenses/mit-license.php
+
+http://www.gnu.org/licenses/gpl.html
+
+The MIT License (MIT)
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> jquery-sparklines-2.0
+
+Copyright (c) 2012, Splunk Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of Splunk Inc nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+>>> jquery-ui-1.8.23
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE.PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE.THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+
+Copyright 2011, John Resig
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+Includes Sizzle.js
+http://sizzlejs.com/
+Copyright 2011, The Dojo Foundation
+Released under the MIT, BSD, and GPL Licenses.
+
+Date: Wed Mar 21 12:46:34 2012 -0700
+
+
+Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/
+
+This software consists of voluntary contributions made by many
+individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
+contribution history, see the revision history and logs, available
+at http://jquery-ui.googlecode.com/svn/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> json-none
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+--------------- SECTION 2: Apache License, V2.0 ----------
+
+Apache License, V2.0 is applicable to the following component(s).
+
+
+>>> commons-beanutils-1.8.3
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+ 
+      http://www.apache.org/licenses/LICENSE-2.0
+ 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons-digester-1.8.1
+
+Apache Commons Digester
+Copyright 2001-2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+>>> commons-logging-1.1.1
+
+Apache Commons Logging
+Copyright 2003-2007 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> commons.collections-3.2.0
+
+Copyright 2003-2005 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+commons-collections-3.2.jar
+commons-collections-testframework-3.2.jar
+
+
+>>> spring-aop-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-asm-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-beans-3.1.1.release
+
+Copyright 2002-2009 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-context-3.1.1.release
+
+Copyright 2002-2011 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-core-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-expression-3.1.1.release
+
+Copyright 2002-2010 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> spring-security-config-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-security-core-3.1.1.release
+
+Copyright 2004, 2005, 2006 Acegi Technology Pty Limited
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+
+> MIT
+
+org.springframework.security.core-sources-3.1.1.RELEASE.jar\org\springframework\security\crypto\bcrypt\BCrypt.java
+
+Copyright (c) 2006 Damien Miller <dj...@mindrot.org>
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+
+>>> spring-security-web-3.1.1.release
+
+License: Apache 2.0
+
+
+>>> spring-web-3.1.1.release
+
+Copyright 2002-2011 the original author or authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+--------------- SECTION 3: Common Development and Distribution License, V1.0 ----------
+
+Common Development and Distribution License, V1.0 is applicable to the following component(s).
+
+
+>>> servlet-api-2.5.0
+
+The contents of this file are subject to the terms
+of the Common Development and Distribution License
+(the "License").  You may not use this file except
+in compliance with the License.
+
+You can obtain a copy of the license at
+glassfish/bootstrap/legal/CDDLv1.0.txt or
+https://glassfish.dev.java.net/public/CDDLv1.0.html.
+See the License for the specific language governing
+permissions and limitations under the License.
+
+When distributing Covered Code, include this CDDL
+HEADER in each file and include the License file at
+glassfish/bootstrap/legal/CDDLv1.0.txt.  If applicable,
+add the following below this CDDL HEADER, with the
+fields enclosed by brackets "[]" replaced with your
+own identifying information: Portions Copyright [yyyy]
+[name of copyright owner]
+
+Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+
+Portions Copyright Apache Software Foundation.
+
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+
+--------------- SECTION 1: Apache License, V2.0 -----------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: Common Development and Distribution License, V1.0 -----------
+
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
+
+1. Definitions.
+
+1.1. "Contributor" means each individual or entity that creates or
+contributes to the creation of Modifications.
+
+1.2. "Contributor Version" means the combination of the Original Software,
+prior Modifications used by a Contributor (if any), and the Modifications
+made by that particular Contributor.
+
+1.3. "Covered Software" means (a) the Original Software, or (b)
+Modifications, or (c) the combination of files containing Original
+Software with files containing Modifications, in each case including
+portions thereof.
+
+1.4. "Executable" means the Covered Software in any form other than
+Source Code.
+
+1.5. "Initial Developer" means the individual or entity that first makes
+Original Software available under this License.
+
+1.6. "Larger Work" means a work which combines Covered Software or
+portions thereof with code not governed by the terms of this License.
+
+1.7. "License" means this document.
+
+1.8. "Licensable" means having the right to grant, to the maximum extent
+possible, whether at the time of the initial grant or subsequently
+acquired, any and all of the rights conveyed herein.
+
+1.9. "Modifications" means the Source Code and Executable form of any
+of the following:
+
+    A. Any file that results from an addition to, deletion from or
+    modification of the contents of a file containing Original Software
+    or previous Modifications;
+
+    B. Any new file that contains any part of the Original Software or
+    previous Modification; or
+
+    C. Any new file that is contributed or otherwise made available
+    under the terms of this License.
+
+1.10. "Original Software" means the Source Code and Executable form of
+computer software code that is originally released under this License.
+
+1.11. "Patent Claims" means any patent claim(s), now owned or hereafter
+acquired, including without limitation, method, process, and apparatus
+claims, in any patent Licensable by grantor.
+
+1.12. "Source Code" means (a) the common form of computer software code
+in which modifications are made and (b) associated documentation included
+in or with such code.
+
+1.13. "You" (or "Your") means an individual or a legal entity exercising
+rights under, and complying with all of the terms of, this License. For
+legal entities, "You" includes any entity which controls, is controlled
+by, or is under common control with You. For purposes of this definition,
+"control" means (a) the power, direct or indirect, to cause the direction
+or management of such entity, whether by contract or otherwise, or (b)
+ownership of more than fifty percent (50%) of the outstanding shares or
+beneficial ownership of such entity.
+
+2. License Grants. 
+
+2.1. The Initial Developer Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, the Initial Developer hereby
+grants You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Initial Developer, to use, reproduce, modify,
+    display, perform, sublicense and distribute the Original Software
+    (or portions thereof), with or without Modifications, and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using or selling
+    of Original Software, to make, have made, use, practice, sell, and
+    offer for sale, and/or otherwise dispose of the Original Software
+    (or portions thereof).
+
+    (c) The licenses granted in Sections 2.1(a) and (b) are effective
+    on the date Initial Developer first distributes or otherwise makes
+    the Original Software available to a third party under the terms of
+    this License.
+
+    (d) Notwithstanding Section 2.1(b) above, no patent license is
+    granted: (1) for code that You delete from the Original Software,
+    or (2) for infringements caused by: (i) the modification of the
+    Original Software, or (ii) the combination of the Original Software
+    with other software or devices.
+
+2.2. Contributor Grant.
+
+Conditioned upon Your compliance with Section 3.1 below and subject to
+third party intellectual property claims, each Contributor hereby grants
+You a world-wide, royalty-free, non-exclusive license:
+
+    (a) under intellectual property rights (other than patent or
+    trademark) Licensable by Contributor to use, reproduce, modify,
+    display, perform, sublicense and distribute the Modifications created
+    by such Contributor (or portions thereof), either on an unmodified
+    basis, with other Modifications, as Covered Software and/or as part
+    of a Larger Work; and
+
+    (b) under Patent Claims infringed by the making, using, or selling
+    of Modifications made by that Contributor either alone and/or
+    in combination with its Contributor Version (or portions of such
+    combination), to make, use, sell, offer for sale, have made, and/or
+    otherwise dispose of: (1) Modifications made by that Contributor
+    (or portions thereof); and (2) the combination of Modifications
+    made by that Contributor with its Contributor Version (or portions
+    of such combination).
+
+    (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+    on the date Contributor first distributes or otherwise makes the
+    Modifications available to a third party.
+
+    (d) Notwithstanding Section 2.2(b) above, no patent license is
+    granted: (1) for any code that Contributor has deleted from the
+    Contributor Version; (2) for infringements caused by: (i) third
+    party modifications of Contributor Version, or (ii) the combination
+    of Modifications made by that Contributor with other software
+    (except as part of the Contributor Version) or other devices; or (3)
+    under Patent Claims infringed by Covered Software in the absence of
+    Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+3.1. Availability of Source Code.
+
+Any Covered Software that You distribute or otherwise make available
+in Executable form must also be made available in Source Code form and
+that Source Code form must be distributed only under the terms of this
+License. You must include a copy of this License with every copy of the
+Source Code form of the Covered Software You distribute or otherwise make
+available. You must inform recipients of any such Covered Software in
+Executable form as to how they can obtain such Covered Software in Source
+Code form in a reasonable manner on or through a medium customarily used
+for software exchange.
+
+3.2. Modifications.
+
+The Modifications that You create or to which You contribute are governed
+by the terms of this License. You represent that You believe Your
+Modifications are Your original creation(s) and/or You have sufficient
+rights to grant the rights conveyed by this License.
+
+3.3. Required Notices.
+
+You must include a notice in each of Your Modifications that identifies
+You as the Contributor of the Modification.  You may not remove or alter
+any copyright, patent or trademark notices contained within the Covered
+Software, or any notices of licensing or any descriptive text giving
+attribution to any Contributor or the Initial Developer.
+
+3.4. Application of Additional Terms.
+
+You may not offer or impose any terms on any Covered Software in Source
+Code form that alters or restricts the applicable version of this License
+or the recipients' rights hereunder. You may choose to offer, and to
+charge a fee for, warranty, support, indemnity or liability obligations to
+one or more recipients of Covered Software.  However, you may do so only
+on Your own behalf, and not on behalf of the Initial Developer or any
+Contributor. You must make it absolutely clear that any such warranty,
+support, indemnity or liability obligation is offered by You alone, and
+You hereby agree to indemnify the Initial Developer and every Contributor
+for any liability incurred by the Initial Developer or such Contributor
+as a result of warranty, support, indemnity or liability terms You offer.
+
+3.5. Distribution of Executable Versions.
+
+You may distribute the Executable form of the Covered Software under the
+terms of this License or under the terms of a license of Your choice,
+which may contain terms different from this License, provided that You are
+in compliance with the terms of this License and that the license for the
+Executable form does not attempt to limit or alter the recipient's rights
+in the Source Code form from the rights set forth in this License. If
+You distribute the Covered Software in Executable form under a different
+license, You must make it absolutely clear that any terms which differ
+from this License are offered by You alone, not by the Initial Developer
+or Contributor. You hereby agree to indemnify the Initial Developer and
+every Contributor for any liability incurred by the Initial Developer
+or such Contributor as a result of any such terms You offer.
+
+3.6. Larger Works.
+
+You may create a Larger Work by combining Covered Software with other code
+not governed by the terms of this License and distribute the Larger Work
+as a single product. In such a case, You must make sure the requirements
+of this License are fulfilled for the Covered Software.
+
+4. Versions of the License. 
+
+4.1. New Versions.
+
+Sun Microsystems, Inc. is the initial license steward and may publish
+revised and/or new versions of this License from time to time. Each
+version will be given a distinguishing version number. Except as provided
+in Section 4.3, no one other than the license steward has the right to
+modify this License.
+
+4.2. Effect of New Versions.
+
+You may always continue to use, distribute or otherwise make the Covered
+Software available under the terms of the version of the License under
+which You originally received the Covered Software. If the Initial
+Developer includes a notice in the Original Software prohibiting it
+from being distributed or otherwise made available under any subsequent
+version of the License, You must distribute and make the Covered Software
+available under the terms of the version of the License under which You
+originally received the Covered Software. Otherwise, You may also choose
+to use, distribute or otherwise make the Covered Software available
+under the terms of any subsequent version of the License published by
+the license steward.
+
+4.3. Modified Versions.
+
+When You are an Initial Developer and You want to create a new license
+for Your Original Software, You may create and use a modified version of
+this License if You: (a) rename the license and remove any references
+to the name of the license steward (except to note that the license
+differs from this License); and (b) otherwise make it clear that the
+license contains terms which differ from this License.
+
+5. DISCLAIMER OF WARRANTY.
+
+COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF
+DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE
+IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT,
+YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST
+OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF
+WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY
+COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION. 
+
+6.1. This License and the rights granted hereunder will terminate
+automatically if You fail to comply with terms herein and fail to cure
+such breach within 30 days of becoming aware of the breach. Provisions
+which, by their nature, must remain in effect beyond the termination of
+this License shall survive.
+
+6.2. If You assert a patent infringement claim (excluding declaratory
+judgment actions) against Initial Developer or a Contributor (the
+Initial Developer or Contributor against whom You assert such claim is
+referred to as "Participant") alleging that the Participant Software
+(meaning the Contributor Version where the Participant is a Contributor
+or the Original Software where the Participant is the Initial Developer)
+directly or indirectly infringes any patent, then any and all rights
+granted directly or indirectly to You by such Participant, the Initial
+Developer (if the Initial Developer is not the Participant) and all
+Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60
+days notice from Participant terminate prospectively and automatically
+at the expiration of such 60 day notice period, unless if within such
+60 day period You withdraw Your claim with respect to the Participant
+Software against such Participant either unilaterally or pursuant to a
+written agreement with Participant.
+
+6.3. In the event of termination under Sections 6.1 or 6.2 above, all end
+user licenses that have been validly granted by You or any distributor
+hereunder prior to termination (excluding licenses granted to You by
+any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
+NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY
+OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER
+OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL,
+INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE,
+COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES
+OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY
+OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY
+FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO
+THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL
+DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+The Covered Software is a "commercial item," as that term is defined
+in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+software" (as that term is defined at 48 C.F.R.  252.227-7014(a)(1)) and
+"commercial computer software documentation" as such terms are used in
+48 C.F.R. 12.212 (Sept.  1995). Consistent with 48 C.F.R. 12.212 and 48
+C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End
+Users acquire Covered Software with only those rights set forth herein.
+This U.S. Government Rights clause is in lieu of, and supersedes, any
+other FAR, DFAR, or other clause or provision that addresses Government
+rights in computer software under this License.
+
+9. MISCELLANEOUS.
+
+This License represents the complete agreement concerning subject matter
+hereof. If any provision of this License is held to be unenforceable,
+such provision shall be reformed only to the extent necessary to make it
+enforceable. This License shall be governed by the law of the jurisdiction
+specified in a notice contained within the Original Software (except to
+the extent applicable law, if any, provides otherwise), excluding such
+jurisdiction's conflict-of-law provisions. Any litigation relating to
+this License shall be subject to the jurisdiction of the courts located
+in the jurisdiction and venue specified in a notice contained within
+the Original Software, with the losing party responsible for costs,
+including, without limitation, court costs and reasonable attorneys'
+fees and expenses. The application of the United Nations Convention on
+Contracts for the International Sale of Goods is expressly excluded. Any
+law or regulation which provides that the language of a contract shall
+be construed against the drafter shall not apply to this License.
+You agree that You alone are responsible for compliance with the United
+States export administration regulations (and the export control laws and
+regulation of any other countries) when You use, distribute or otherwise
+make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+As between Initial Developer and the Contributors, each party is
+responsible for claims and damages arising, directly or indirectly, out
+of its utilization of rights under this License and You agree to work
+with Initial Developer and Contributors to distribute such responsibility
+on an equitable basis. Nothing herein is intended or shall be deemed to
+constitute any admission of liability.
+
+
+
+--------------- SECTION 3: GNU Lesser General Public License, V2.1 -----------
+
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America. All such
+requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively,
+the Source Files may accompany the VMware product.
+
+[GFPULSE701GAKD021813]


[60/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/which.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/which.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/which.java
deleted file mode 100644
index df8bcf4..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/which.java
+++ /dev/null
@@ -1,159 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import java.util.HashMap;
-import java.util.TreeMap;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-public class which implements ServerExecutable
-{
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-	
-	static String major;
-	static String minor;
-	static String update;
-	static String build;
-	
-	static {
-		determineGemFireVersion();
-	}
-	
-	private static void determineGemFireVersion()
-	{
-		String gemfireVersion = GemFireVersion.getGemFireVersion();
-		String split[] = gemfireVersion.split("\\.");
-		
-		for (int i = 0;i < split.length; i++) {
-			switch (i) {
-			case 0:
-				major = split[i];
-				break;
-			case 1:
-				minor = split[i];
-				break;
-			case 2:
-				update = split[i];
-				break;
-			case 3:
-				build = split[i];
-				break;
-			}
-		}
-	}
-	
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		GfshData data = new GfshData(null);
-		Cache cache = CacheFactory.getAnyInstance();
-		
-		Object args[] = (Object[])arg;
-		if (args.length < 0) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = "Key not specified";
-			return data;
-		}
-		Object key = args[0];
-		boolean recursive = false;
-		if (args.length > 1) {
-			recursive = (Boolean)args[1];
-		}		
-		
-		try {
-			TreeMap<String, Object> map = new TreeMap();
-			
-			if (recursive == false) {	
-				
-				// Find the value from the partitioned region
-				if (regionPath == null || regionPath.equals("/")) {
-					code = AggregateResults.CODE_ERROR;
-					codeMessage = "Invalid region path " + regionPath;
-					return data;
-				}
-				Region region = cache.getRegion(regionPath);
-				if (region == null) {
-					code = AggregateResults.CODE_ERROR;
-					codeMessage = "Undefined region " + regionPath;
-					return data;
-				}
-				
-				Object value;
-				DistributedMember primaryMember = null;
-				if (region instanceof PartitionedRegion) {
-					PartitionedRegion pr = (PartitionedRegion)region;
-					Region localRegion = PartitionRegionHelper.getLocalData((PartitionedRegion)region);
-					value = localRegion.get(key);
-					primaryMember = PartitionRegionHelper.getPrimaryMemberForKey(region, key);
-					
-					// 6.0 - Note that this may or may not work
-//					int bucketId = PartitionedRegionHelper.getHashKey(pr, Operation.GET, key, null);
-					
-					// 6.5
-					int bucketId = pr.getKeyInfo(key).getBucketId();
-					
-					DistributedMember member = cache.getDistributedSystem().getDistributedMember();
-					boolean isPrimary = member == primaryMember;
-					HashMap<String, Object> prInfoMap = new HashMap<String, Object>();
-					prInfoMap.put("BucketId", bucketId);
-					prInfoMap.put("IsPrimary", isPrimary);
-					data.setUserData(prInfoMap);
-				} else {
-					value = region.get(key);
-				}
-				if (value != null) {
-					map.put(regionPath, value);
-				}
-				
-			} else {
-				
-				// Recursively find the keys starting from the specified region path.
-				String regionPaths[] = RegionUtil.getAllRegionPaths(cache, true);
-				for (int i = 0; i < regionPaths.length; i++) {
-					if (regionPaths[i].startsWith(regionPath)) {
-						Object value = null;
-						Region region = cache.getRegion(regionPaths[i]);
-												
-						if (region instanceof PartitionedRegion) {
-							PartitionedRegion pr = (PartitionedRegion)region;
-							Region localRegion = PartitionRegionHelper.getLocalData(pr);
-							value = localRegion.get(key);
-						} else {
-							value = region.get(key);
-						}
-						if (value != null) {
-							map.put(regionPaths[i], value);
-						}
-					}
-				}
-				
-			}
-		
-			data.setDataObject(map);
-			
-		} catch (Exception ex) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = ex.getMessage();
-		}
-		return data;
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-	
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/ClassFinder.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/ClassFinder.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/ClassFinder.java
deleted file mode 100644
index b9a062f..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/ClassFinder.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.misc.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-
-import com.gemstone.gemfire.internal.ClassPathLoader;
-
-public class ClassFinder
-{
-
-	/**
-	 * Returns all classes that are in the specified package. Use this method to find
-	 * inflated classes, i.e., classes that are kept in a directory. Use
-	 * getClasses(String jarPath, String packageName) if the classes are in a jar file.
-	 * 
-	 * @param packageName
-	 *            The base package
-	 * @return The classes
-	 * @throws ClassNotFoundException Thrown if unable to load a class
-	 * @throws IOException Thrown if error occurs while reading the jar file
-	 */
-	public static Class[] getClasses(String packageName) throws ClassNotFoundException, IOException
-	{
-		ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-//		assert classLoader != null;
-		String path = packageName.replace('.', '/');
-		Enumeration resources = classLoader.getResources(path);
-		List dirs = new ArrayList();
-		while (resources.hasMoreElements()) {
-			URL resource = (URL)resources.nextElement();
-			dirs.add(new File(resource.getFile()));
-		}
-		ArrayList classes = new ArrayList();
-		for (Iterator iterator = dirs.iterator(); iterator.hasNext();) {
-			File directory = (File)iterator.next();
-			classes.addAll(findClasses(directory, packageName));
-		}
-		return (Class[])classes.toArray(new Class[classes.size()]);
-	}
-
-	/**
-	 * Returns all classes found in the specified directory.
-	 * 
-	 * @param directory
-	 *            The base directory
-	 * @param packageName
-	 *            The package name for classes found inside the base directory
-	 * @return The classes 
-	 * @throws ClassNotFoundException Thrown if unable to load a class
-	 */
-	public static List findClasses(File directory, String packageName) throws ClassNotFoundException
-	{
-		List classes = new ArrayList();
-		if (!directory.exists()) {
-			return classes;
-		}
-		File[] files = directory.listFiles();
-		for (int i = 0; i < files.length; i++) {
-			File file = files[i];
-			if (file.isDirectory()) {
-//				assert !file.getName().contains(".");
-				classes.addAll(findClasses(file, packageName + "." + file.getName()));
-			} else if (file.getName().endsWith(".class")) {
-				classes
-						.add(Class
-								.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));
-			}
-		}
-		return classes;
-	}
-
-	/**
-	 * Returns all classes that are in the specified jar and package name.
-	 * @param jarPath The absolute or relative jar path.
-	 * @param packageName The package name.
-	 * @return Returns all classes that are in the specified jar and package name.
-	 * @throws ClassNotFoundException Thrown if unable to load a class
-	 * @throws IOException Thrown if error occurs while reading the jar file
-	 */
-	public static Class[] getClasses(String jarPath, String packageName) throws ClassNotFoundException, IOException
-	{
-		String[] classNames = getClassNames(jarPath, packageName);
-		Class classes[] = new Class[classNames.length];
-		for (int i = 0; i < classNames.length; i++) {
-			String className = (String)classNames[i];
-			classes[i] = Class.forName(className);
-		}
-		return classes;
-	}
-	
-	/**
-	 * Returns all names of classes that are defined in the specified jar and package name.
-	 * @param jarPath The absolute or relative jar path.
-	 * @param packageName The package name.
-	 * @return Returns all names of classes that are defined in the specified jar and package name.
-	 * @throws IOException Thrown if error occurs while reading the jar file
-	 */
-	public static String[] getClassNames(String jarPath, String packageName) throws IOException
-	{
-		if (jarPath == null) {
-			return new String[0];
-		}
-		
-		File file;
-		if (jarPath.startsWith("/") || jarPath.indexOf(':') >= 0) {
-			// absolute path
-			file = new File(jarPath);
-		} else {
-			// relative path
-			String workingDir = System.getProperty("user.dir");
-			file = new File(workingDir + "/" + jarPath);
-		}
-		
-		ArrayList arrayList = new ArrayList();
-		packageName = packageName.replaceAll("\\.", "/");
-		JarInputStream jarFile = new JarInputStream(new FileInputStream(file));
-		JarEntry jarEntry;
-		while (true) {
-			jarEntry = jarFile.getNextJarEntry();
-			if (jarEntry == null) {
-				break;
-			}
-			String name = jarEntry.getName();
-			if (name.startsWith(packageName) && (name.endsWith(".class"))) {
-				int endIndex = name.length() - 6;
-				name = name.replaceAll("/", "\\.");
-				name = name.substring(0, endIndex);
-				arrayList.add(name);
-			}
-		}
-		jarFile.close();
-
-		return (String[])arrayList.toArray(new String[0]);
-	}
-	
-	/**
-	 * Returns all classes that are in the specified jar.
-	 * @param jarPath The absolute or relative jar path.
-	 * @return Returns all classes that are in the specified jar
-	 * @throws ClassNotFoundException Thrown if unable to load a class
-	 * @throws IOException Thrown if error occurs while reading the jar file
-	 */
-	public static Class[] getAllClasses(String jarPath) throws ClassNotFoundException, IOException
-	{
-		String[] classNames = getAllClassNames(jarPath);
-		Class classes[] = new Class[classNames.length];
-		for (int i = 0; i < classNames.length; i++) {
-			String className = (String)classNames[i];
-			classes[i] = ClassPathLoader.getLatest().forName(className);
-		}
-		return classes;
-	}
-	
-	/**
-	 * Returns all names of classes that are defined in the specified jar.
-	 * @param jarPath The absolute or relative jar path.
-	 * @return Returns all names of classes that are defined in the specified jar.
-	 * @throws IOException Thrown if error occurs while reading the jar file
-	 */
-	public static String[] getAllClassNames(String jarPath) throws IOException
-	{
-		if (jarPath == null) {
-			return new String[0];
-		}
-		
-		jarPath = jarPath.trim();
-		if (jarPath.length() == 0) {
-			return new String[0];
-		}
-		
-		File file;
-		if (jarPath.startsWith("/") || jarPath.indexOf(':') >= 0) {
-			// absolute path
-			file = new File(jarPath);
-		} else {
-			// relative path
-			String workingDir = System.getProperty("user.dir");
-			file = new File(workingDir + "/" + jarPath);
-		}
-		
-		ArrayList arrayList = new ArrayList();
-		JarInputStream jarFile = new JarInputStream(new FileInputStream(file));
-		JarEntry jarEntry;
-		while (true) {
-			jarEntry = jarFile.getNextJarEntry();
-			if (jarEntry == null) {
-				break;
-			}
-			String name = jarEntry.getName();
-			if (name.endsWith(".class")) {
-				int endIndex = name.length() - 6;
-				name = name.replaceAll("/", "\\.");
-				name = name.substring(0, endIndex);
-				arrayList.add(name);
-			}
-		}
-		jarFile.close();
-
-		return (String[])arrayList.toArray(new String[0]);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/DataSerializerEx.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/DataSerializerEx.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/DataSerializerEx.java
deleted file mode 100644
index 6c77ddf..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/DataSerializerEx.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.misc.util;
-
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.zip.DataFormatException;
-import java.util.zip.Deflater;
-import java.util.zip.Inflater;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.internal.DSCODE;
-
-public abstract class DataSerializerEx extends DataSerializer
-{
-	/**
-	 * Writes the specified byte array to the output stream. This method is 
-	 * not thread safe.
-	 * 
-	 * @param array The byte array to compress
-	 * @param buffer The byte array buffer used as input to the deflater. This
-	 *               buffer must have enough space to hold the compressed data.
-	 * @param compressor java.util.Deflater. 
-	 * @param output The data output stream.
-	 * @throws IOException Thrown if unable to write to the output stream.
-	 */
-	public static void writeByteArray(byte array[], byte buffer[], Deflater compressor, DataOutput output) throws IOException
-	{
-		// Compress the bytes
-		 compressor.setInput(array);
-		 compressor.finish();
-		 int compressedDataLength = compressor.deflate(buffer);
-		 DataSerializer.writeByteArray(buffer, compressedDataLength, output);
-	}
-	
-	/**
-	 * Reads byte array from the input stream. This method is not thread safe.
-	 * 
-	 * @param buffer The buffer to hold the decompressed data. This buffer
-	 *               must be large enough to hold the decompressed data.
-	 * @param decompressor java.util.Inflater
-	 * @param input The data input stream.
-	 * @return Returns the actual byte array (not compressed) read from the 
-	 *         input stream.
-	 * @throws IOException Thrown if unable to read from the input stream or
-	 *                     unable to decompress the data.
-	 */
-	public static byte[] readByteArray(byte buffer[], Inflater decompressor, DataInput input) throws IOException
-	{
-		byte compressedBuffer[] = DataSerializer.readByteArray(input);	
-		// Decompress the bytes
-		decompressor.setInput(compressedBuffer, 0, compressedBuffer.length);
-		byte retval[] = null;
-		try {
-			int resultLength = decompressor.inflate(buffer);
-			retval = new byte[resultLength];
-			System.arraycopy(compressedBuffer, 0, retval, 0, resultLength);
-		} catch (DataFormatException e) {
-			throw new IOException("Unable to decompress the byte array due to a data format error. " + e.getMessage());
-		}
-		return retval;
-	}
-	
-	/**
-	 * Reads UTF string from the input. This method is analogous to 
-	 * DataInput.readUTF() except that it supports null string.
-	 * @param input The data input stream.
-	 * @return Returns null or non-null string value.
-	 * @throws IOException Thrown if unable to read from the input stream.
-	 */
-	public static String readUTF(DataInput input) throws IOException
-	{
-		byte header = input.readByte();
-		if (header == DSCODE.NULL_STRING) {
-			return null;
-		} 
-		return input.readUTF();
-	}
-	
-	/**
-	 * Writes the specified sting value to the output stream. This method
-	 * is analogous to DataOutput.writeUTF() except that it supports null
-	 * string.
-	 * @param value The string value to write to the output stream.
-	 * @param output The data output stream.
-	 * @throws IOException Thrown if unable to write to the output stream. 
-	 */
-	public static void writeUTF(String value, DataOutput output) throws IOException
-	{
-		if (value == null) {
-			output.writeByte(DSCODE.NULL_STRING);
-		} else {
-			output.writeByte(DSCODE.STRING);
-			output.writeUTF(value);
-		}		
-	}
-}
- 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/QueueDispatcherListener.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/QueueDispatcherListener.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/QueueDispatcherListener.java
deleted file mode 100644
index 9e0a9d5..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/QueueDispatcherListener.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.misc.util;
-
-/**
- * @author Dae Song Park
- * @since 1.0
- */
-public interface QueueDispatcherListener
-{
-    void objectDispatched(Object obj);
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/QueueDispatcherThread.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/QueueDispatcherThread.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/QueueDispatcherThread.java
deleted file mode 100644
index c206d4d..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/QueueDispatcherThread.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.misc.util;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Collections;
-
-
-/**
- * <p>Title:</p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) 2004</p>
- * <p>Company: GemStone Systems, Inc.</p>
- * @author Dae Song Park
- * @version 1.0
- */
-public class QueueDispatcherThread extends Thread
-{
-    private List list = Collections.synchronizedList(new LinkedList());
-    private QueueDispatcherListener queueDispatcherListener;
-    private boolean shouldRun = true;
-
-    public QueueDispatcherThread()
-    {
-        setDaemon(true);
-    }
-
-    public synchronized void enqueue(Object obj)
-    {
-        list.add(obj);
-        this.notify();
-    }
-
-    public synchronized Object dequeue() throws InterruptedException
-    {
-        while (list.size() == 0) {
-            this.wait(1000);
-        }
-        return list.remove(0);
-    }
-
-    public int size()
-    {
-        return list.size();
-    }
-
-    public boolean isEmpty()
-    {
-        return list.size() == 0;
-    }
-
-    public void setQueueDispatcherListener(QueueDispatcherListener listener)
-    {
-        this.queueDispatcherListener = listener;
-    }
-
-    public QueueDispatcherListener getQueueDispatcherListener()
-    {
-        return queueDispatcherListener;
-    }
-
-    public synchronized void run()
-    {
-        while (shouldRun) {
-            try {
-            	while (list.size() == 0 && shouldRun) {
-                    this.wait(1000);
-                }
-            	int size = list.size();
-            	if (size > 0) {
-            		for (int i = 0; i < size; i++) {
-            			Object obj = list.remove(0);
-		                if (queueDispatcherListener != null) {
-		                    queueDispatcherListener.objectDispatched(obj);
-		                }
-            		}
-            	}
-            } catch (InterruptedException ex) {
-                // ignore for the time being
-            }
-        }
-    }
-
-    public void terminate()
-    {
-        shouldRun = false;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/ReflectionUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/ReflectionUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/ReflectionUtil.java
deleted file mode 100644
index bf12eb7..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/ReflectionUtil.java
+++ /dev/null
@@ -1,303 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.misc.util;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.Collection;
-import java.util.Map;
-import java.util.TreeMap;
-
-
-
-public class ReflectionUtil
-{
-	/**
-     * Returns the values of all the public members in the specified object.
-     * The returned value has the format: member1 = value1, member2 = value2, ...
-     */
-	public static String toStringPublicMembers(Object object)
-    {
-        if (object == null) {
-            return null;
-        }
-
-        String retval = "";
-        Class cls = object.getClass();
-        Field fields[] = cls.getFields();
-        String name;
-        Object value;
-        try {
-            for (int i = 0; i < fields.length; i++) {
-                name = fields[i].getName();
-                value = fields[i].get(object);
-                if (value instanceof byte[]) {
-                    value = new String((byte[])value);
-                } else if (value instanceof Byte) {
-                    value = ((Byte)value).toString();
-                }
-                retval += name + " = " + value + ", ";
-            }
-        } catch (IllegalAccessException ex) {
-            ex.printStackTrace();
-        }
-
-        // Remove the trailing ", ".
-        if (retval.length() > 0) {
-            retval = retval.substring(0, retval.length() - 2);
-        }
-        return retval;
-    }
-
-    public static String toStringGetters(Object object)
-    {
-        if (object == null) {
-            return null;
-        }
-
-        String retval = "";
-        Class cls = object.getClass();
-        Method methods[] = cls.getMethods();
-        Method method;
-        Class retType;
-        String name;
-        Object value;
-        try {
-            for (int i = 0; i < methods.length; i++) {
-                method = methods[i];
-                name = method.getName();
-                if (name.length() <= 3 || name.startsWith("get") == false) {
-                    continue;
-                }
-                if ((method.getModifiers() & Modifier.STATIC) > 0) {
-                	continue;
-                }
-                if (name.equals("getClass")) {
-                	continue;
-                }
-                retType = method.getReturnType();
-                if (retType == Void.TYPE) {
-                    continue;
-                } 
-                try {
-                    value = method.invoke(object, (Object[])null);
-                    if (value instanceof byte[]) {
-                        value = new String((byte[])value);
-                    } else if (value instanceof Byte) {
-                        value = ((Byte)value).toString();
-                    }
-                    retval += name.substring(3) + " = " + value + ", ";
-                } catch (Exception ex) {
-                }
-            }
-
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-
-        // Remove the trailing ", ".
-        if (retval.length() > 0) {
-            retval = retval.substring(0, retval.length() - 2);
-        }
-        return retval;
-    }
-    
-    public static String toStringGettersAnd(Object object)
-    {
-        if (object == null) {
-            return null;
-        }
-
-        String retval = "";
-        Class cls = object.getClass();
-        Method methods[] = cls.getMethods();
-        Method method;
-        Class retType;
-        String name;
-        Object value;
-        try {
-            for (int i = 0; i < methods.length; i++) {
-                method = methods[i];
-                name = method.getName();
-                if (name.length() <= 3 || name.startsWith("get") == false) {
-                    continue;
-                }
-                if ((method.getModifiers() & Modifier.STATIC) > 0) {
-                	continue;
-                }
-                if (name.equals("getClass")) {
-                	continue;
-                }
-                retType = method.getReturnType();
-                if (retType == Void.TYPE) {
-                    continue;
-                } 
-                try {
-                    value = method.invoke(object, (Object[])null);
-                    if (value instanceof byte[]) {
-                        value = new String((byte[])value);
-                    } else if (value instanceof Byte) {
-                        value = ((Byte)value).toString();
-                    }
-                    if (value instanceof String) {
-                    	retval += name.substring(3) + "='" + value + "' and ";
-                    } else {
-                    	retval += name.substring(3) + "=" + value + " and ";
-                    }
-                } catch (Exception ex) {
-                }
-            }
-
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-
-        // Remove the trailing " and ".
-        if (retval.length() > 0) {
-            retval = retval.substring(0, retval.length() - 5);
-        }
-        return retval;
-    }
-    
-    public static String toStringSetters(Object object)
-    {
-        if (object == null) {
-            return null;
-        }
-
-        String retval = "";
-        Class cls = object.getClass();
-        Method methods[] = cls.getMethods();
-        Method method;
-        String name;
-        try {
-            for (int i = 0; i < methods.length; i++) {
-                method = methods[i];
-                name = method.getName();
-                if (name.length() <= 3 || name.startsWith("set") == false) {
-                    continue;
-                }
-                retval += name + ", ";
-            }
-
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-
-        // Remove the trailing ", ".
-        if (retval.length() > 0) {
-            retval = retval.substring(0, retval.length() - 2);
-        }
-        return retval;
-    }
-    
-    public static Method[] getAllSetters(Class cls)
-    {
-        Map map = getAllSettersMap(cls);
-        if (map == null) {
-        	return null;
-        }
-        Collection col = map.values();
-        return (Method[])col.toArray(new Method[0]);
-    }
-    
-    public static Map getAllSettersMap(Class cls)
-    {
-        if (cls == null) {
-            return null;
-        }
-        Method methods[] = cls.getMethods();
-        TreeMap map = new TreeMap();
-        Method method;
-        String name;
-        try {
-            for (int i = 0; i < methods.length; i++) {
-                method = methods[i];
-                name = method.getName();
-                if (name.length() <= 3 || name.startsWith("set") == false) {
-                    continue;
-                }
-               if (method.getParameterTypes().length == 1) {
-            	   map.put(method.getName(), method);
-               }
-            }
-
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-
-        return map;
-    }
-    
-    
-    public static Method[] getAllGetters(Class cls)
-    {
-		Map map = getAllGettersMap(cls);
-		if (map == null) {
-			return null;
-		}
-		Collection col = map.values();
-        return (Method[])col.toArray(new Method[0]);
-    }
-    
-    /**
-     * Returns Map<String, Method>
-     * @param cls
-     */
-    public static Map getAllGettersMap(Class cls)
-    {
-        if (cls == null) {
-            return null;
-        }
-        Method methods[] = cls.getMethods();
-        Method method;
-        Class retType;
-        String name;
-        TreeMap map = new TreeMap();
-        try {
-            for (int i = 0; i < methods.length; i++) {
-                method = methods[i];
-                name = method.getName();
-                if (name.length() <= 3 || name.startsWith("get") == false) {
-                    continue;
-                }
-                if ((method.getModifiers() & Modifier.STATIC) > 0) {
-                	continue;
-                }
-                if (name.equals("getClass")) {
-                	continue;
-                }
-                retType = method.getReturnType();
-                if (retType == Void.TYPE) {
-                    continue;
-                } 
-               if (method.getParameterTypes().length == 0) {
-            	   map.put(name, method);
-               }
-            }
-
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-
-        return map;
-    }
-    
-    /**
-     * 
-     * @param cls
-     * @return setter map
-     * @deprecated
-     *///FIXME: java docs @return, check if this is used?
-    public static Map getSetterMap(Class cls)
-    {
-    	TreeMap map = new TreeMap();
-    	Method methods[] = getAllSetters(cls);
-    	String memberName;
-    	for (int i = 0; i < methods.length; i++) {
-    		memberName = methods[i].getName();
-    		memberName = memberName.substring(3);
-    		map.put(memberName, methods[i]);
-    	}
-    	return map;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/StringUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/StringUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/StringUtil.java
deleted file mode 100644
index 2d97aef..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/StringUtil.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.misc.util;
-
-public class StringUtil
-{
-    /**
-     * Returns the short name of the fully-qualified class name.
-     * @param className The fully-qualified class name.
-     */
-    public static String getShortClassName(String className)
-    {
-        if (className == null) {
-            return null;
-        }
-        String shortName = null;
-        int index = className.lastIndexOf('.');
-        if (index == -1 || index >= className.length()-1) {
-            shortName = className;
-        } else {
-            shortName = className.substring(index+1);
-        }
-        return shortName;
-    }
-
-    /**
-     * Returns the short class name of the specified object.
-     * @param obj   The object from which its short name is to be derived.
-     */
-    public static String getShortClassName(Object obj)
-    {
-        if (obj == null) {
-            return null;
-        }
-        return getShortClassName(obj.getClass().getName());
-    }
-
-    /**
-     * Trims the matching character found in the left end of the string.
-     * @param str   The string to trim.
-     * @param c     The character remove.
-     */
-    public static String trimLeft(String str, char c)
-    {
-        int len = str.length();
-        int index = 0;
-        while (index < len && str.charAt(index++) == c);
-        index--;
-        if (index < 0) {
-            return "";
-        } else if (index < len) {
-            return str.substring(index);
-        } else {
-            return str;
-        }
-    }
-
-    /**
-     * Trims the matching character found in right end of the string.
-     * @param str   The string to trim.
-     * @param c     The character remove.
-     */
-    public static String trimRight(String str, char c)
-    {
-        int len = str.length();
-        int index = len - 1;
-        while (index >= 0 && str.charAt(index--) == c);
-        index++;
-        if (index > len - 1) {
-            return str;
-        } else if (index >= 0) {
-            return str.substring(0, index + 1);
-        } else  {
-            return "";
-        }
-    }
-
-    /**
-     * Trims all of the matching character in the string.
-     * @param str   The string to trim.
-     * @param c     The character remove.
-     */
-    public static String trim(String str, char c)
-    {
-        return trimRight(trimLeft(str, c), c);
-    }
-
-    /**
-     * Replaces the all of the matching oldValue in the string with the newValue.
-     * @param str   The string to replace matching substring.
-     * @param oldValue  The old value to match and replace.
-     * @param newValue  The new value to replace the old value with.
-     */
-    public static String replace(String str, String oldValue, String newValue)
-    {
-        if (str == null || oldValue == null || newValue == null) {
-            return null;
-        }
-
-        int index = str.indexOf(oldValue);
-        if (index != -1) {
-            int oldValueLen = oldValue.length();
-            int newValueLen = newValue.length();
-            String head;
-            String tail = str;
-            StringBuffer buffer = new StringBuffer(str.length() + newValueLen);
-            do {
-                head = tail.substring(0, index);
-                buffer.append(head);
-                buffer.append(newValue);
-                tail = tail.substring(index+oldValueLen);
-                index = tail.indexOf(oldValue);
-            } while (index != -1);
-            buffer.append(tail);
-
-            str = buffer.toString();
-        }
-
-        return str;
-    }
-    
-    public static String getLeftPaddedString(String value, int maxSize, char pad)
-	{
-		int diff = maxSize - value.length();
-		StringBuffer buffer = new StringBuffer(maxSize);
-		for (int i = 0; i < diff; i++) {
-			buffer.append(pad);
-		}
-		buffer.append(value);
-		return buffer.toString();
-	}
-	
-    public static String getRightPaddedString(String value, int maxSize, char pad)
-	{
-		int diff = maxSize - value.length();
-		StringBuffer buffer = new StringBuffer(maxSize);
-		buffer.append(value);
-		for (int i = 0; i < diff; i++) {
-			buffer.append(pad);
-		}
-		return buffer.toString();
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/SystemClassPathManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/SystemClassPathManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/SystemClassPathManager.java
deleted file mode 100644
index 0149aa8..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/SystemClassPathManager.java
+++ /dev/null
@@ -1,171 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.misc.util;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.internal.tools.gfsh.app.pogo.KeyType;
-import com.gemstone.gemfire.internal.tools.gfsh.app.pogo.KeyTypeManager;
-
-/**
- * SystemClassPathManager assigns the class path to the system class loader 
- * in runtime.
- * @author dpark
- *
- */
-public class SystemClassPathManager
-{
-	private static final Class[] parameters = new Class[] { URL.class };
-
-	public static void addFile(String s) throws IOException
-	{
-		File f = new File(s);
-		addFile(f);
-	}
-
-	public static void addFile(File f) throws IOException
-	{
-		addURL(f.toURI().toURL());
-	}
-
-	public static void addURL(URL u) throws IOException
-	{
-
-		URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader();
-		Class sysclass = URLClassLoader.class;
-
-		try {
-			Method method = sysclass.getDeclaredMethod("addURL", parameters);
-			method.setAccessible(true);
-			method.invoke(sysloader, new Object[] { u });
-		      } catch (VirtualMachineError e) {
-		        SystemFailure.initiateFailure(e);
-		        throw e;
-		      } catch (Throwable t) {
-		        SystemFailure.checkFailure();
-			t.printStackTrace();
-			throw new IOException("Error, could not add URL to system classloader");
-		}
-
-	}
-	
-	/**
-	 * Includes all of the jar files in the specified directory in the
-	 * class path. It first includes the latest dated jar files that end
-	 * with the extension '.vyyyyMMddHHmm.jar'. For example, if there are 
-	 * 'foo.v201010231217' and 'foo.v201010221011' then only the formal is 
-	 * added in the class path since it has the latest version date.
-	 * <p>
-	 * Once all of the date-versioned jar files are added, it then proceed
-	 * to add the rest of the jar files in sorted order.
-	 * <p>
-	 * It also auto registers versioned classes such as MapLite's KeyType.
-	 * 
-	 * @param dirPath The absolute or relative directory path.
-	 */
-	public static void addJarsInDir(String dirPath)
-	{
-		if (dirPath == null) {
-			return;
-		}
-		
-		File classDirFile = new File(dirPath);
-		classDirFile.mkdirs();
-		
-		ArrayList<String> jarList = new ArrayList();
-		File[] files = classDirFile.listFiles();
-		for (File file : files) {
-			if (file.isFile()) {
-				String fileName = file.getName();
-				jarList.add(file.getAbsolutePath());
-			}
-		}
-		
-		// Register the latest files only
-		Collections.sort(jarList);
-		String prevFileNameNoDate = "";
-		ArrayList<File> datedFiles = new ArrayList();
-		ArrayList<File> notDatedFiles = new ArrayList();
-		for (int i = jarList.size() - 1; i >= 0; i--) {
-			String filePath = jarList.get(i);
-			if (filePath.endsWith(".jar") == false) {
-				continue;
-			}
-			File file = new File(filePath);
-			String fileName = file.getName();
-			String nameNoExtension = fileName.substring(0, fileName.lastIndexOf(".jar"));
-			int index = nameNoExtension.lastIndexOf(".v");
-			if (index == -1) {
-				// not dated
-				notDatedFiles.add(file);
-				continue;
-			}
-			String fileNameNoDate = nameNoExtension.substring(0, index);
-			if (fileNameNoDate.equals(prevFileNameNoDate) == false) {
-				try {
-					SystemClassPathManager.addFile(file);
-					datedFiles.add(file);
-				} catch (IOException e) {
-					CacheFactory.getAnyInstance().getLogger().error(e);
-				}
-				prevFileNameNoDate = fileNameNoDate;
-			}
-		}
-		
-		// Add the not dated files - dated files take precedence
-		Collections.sort(notDatedFiles);
-		for (File file : notDatedFiles) {
-			try {
-				SystemClassPathManager.addFile(file);
-			} catch (IOException e) {
-				CacheFactory.getAnyInstance().getLogger().error(e);
-			}
-		}
-		
-		// Register KeyTypes for dated classes
-		registerKeyType(datedFiles);
-		
-		// Register KeyTypes for not dated classes
-		registerKeyType(notDatedFiles);
-		
-		// for gc
-		datedFiles.clear();
-		datedFiles = null;
-		notDatedFiles.clear();
-		notDatedFiles = null;
-		jarList.clear();
-		jarList = null;
-	}
-	
-	private static void registerKeyType(List<File> files)
-	{
-		for (File file : files) {
-			try {
-				Class[] classes = ClassFinder.getAllClasses(file.getAbsolutePath());
-				for (int j = 0; j < classes.length; j++) {
-					Class<?> cls = classes[j];
-					if (KeyType.class.isAssignableFrom(cls) && 
-						cls.getSimpleName().matches(".*_v\\d++$")) 
-					{
-						try {
-							Method method = cls.getMethod("getKeyType", (Class[])null);
-							KeyType keyType = (KeyType)method.invoke(cls, (Object[])null);
-							KeyTypeManager.registerSingleKeyType(keyType);
-						} catch (Exception ex) {
-							// ignore
-						}
-					}
-				}
-			} catch (Exception ex) {
-				// ignore
-			}
-		}	
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/InvalidKeyException.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/InvalidKeyException.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/InvalidKeyException.java
deleted file mode 100644
index c8a098f..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/InvalidKeyException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.pogo;
-
-import com.gemstone.gemfire.GemFireException;
-
-/**
- * InvalidKeyException is a runtime exception thrown if the key type 
- * is invalid. This can occur when the incorrect type value is put in
- * the message (MapLite) class.
- *   
- * @author dpark
- *
- */
-public class InvalidKeyException extends GemFireException
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Creates a new <code>InvalidKeyException</code> with the specified 
-	 * message.
-	 */
-	public InvalidKeyException(String message)
-	{
-		super(message);
-	}
-
-	/**
-	 * Creates a new <code>InvalidKeyException</code> wit the specified
-	 * message and exception.
-	 */
-	public InvalidKeyException(String message, Throwable ex)
-	{
-		super(message, ex);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/KeyType.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/KeyType.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/KeyType.java
deleted file mode 100644
index 054488a..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/KeyType.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.pogo;
-
-import java.util.Set;
-
-/**
- * KeyType represents the schema definitions for predefining keys for
- * lightweight self-describing message classes such as MapLite provided
- * in this package. 
- * @author dpark
- *
- */
-public interface KeyType
-{
-	/**
-	 * Return the universal ID that uniquely represents the key type across
-	 * space and time. The underlying message class implementation must 
-	 * guarantee the uniqueness of this ID to properly marshal objects 
-	 * crossing network and language boundaries. This ID is static and
-	 * permanent for the life of the key type class. 
-	 */
-	public Object getId();
-	
-	/**
-	 * Returns the version number.
-	 */
-	public int getVersion();
-	
-	/**
-	 * Returns the key count.
-	 */
-	public int getKeyCount();
-	
-	/**
-	 * Returns the index of the key.
-	 */
-	public int getIndex();
-	
-	/**
-	 * Returns the name of the key.
-	 */
-	public String getName();
-	
-	/**
-	 * Returns the class of the key.
-	 */
-	public Class getType();
-	
-	/**
-	 * Returns the entire keys.
-	 */
-	public KeyType[] getValues();
-	
-	/**
-	 * Returns the entire keys of the specified version.
-	 * @param version The version number.
-	 */
-	public KeyType[] getValues(int version);
-
-	/**
-	 * Returns the key of the specified key name.
-	 * @param name The key name.
-	 */
-	public KeyType getKeyType(String name);
-	
-	/**
-	 * Returns true if delta propagation is enabled.
-	 */
-	public boolean isDeltaEnabled();
-	
-	/**
-	 * Returns true if the key value is to be kept serialized until
-	 * it is accessed. This applies per key instance.
-	 */
-	public boolean isKeyKeepSerialized();
-	
-	/**
-	 * Returns true if the network payload is to be compressed.
-	 */
-	public boolean isCompressionEnabled();
-	
-	/**
-	 * Returns true if any of the key values is to be kept serialized.
-	 */
-	public boolean isPayloadKeepSerialized();
-	
-	/**
-	 * Returns the key name set.
-	 */
-	public Set<String> getNameSet();
-	
-	/**
-	 * Returns true if the specified key is defined.
-	 * @param name The key to check.
-	 */
-	public boolean containsKey(String name);
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/KeyTypeManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/KeyTypeManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/KeyTypeManager.java
deleted file mode 100644
index 5794c88..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/KeyTypeManager.java
+++ /dev/null
@@ -1,199 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.pogo;
-
-import java.lang.reflect.Field;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.Instantiator;
-
-/**
- * KeyTypeManager manages the key type classes for the process life time.
- * Each key type class requires registration through KeyTypeManager in
- * order to activate them within the process boundary. Using a key type 
- * without registering may fail as the underlying marshaling mechanism is 
- * maybe unable to properly map the key type.
- * 
- * @author dpark
- *
- */
-public class KeyTypeManager
-{
-	
-	/**
-	 * Map of key types.
-	 */
-	private static ConcurrentHashMap<UUID, Map<Integer, KeyType>> uuidMap = new ConcurrentHashMap<UUID, Map<Integer, KeyType>>();
-	
-	/**
-	 * Registers the specified key type. It assumes that all of the KeyType
-	 * version classes are in the "pogo" sub-package as the specified KeyType.
-	 * @param keyTypeName The fully qualified KeyType class name without
-	 *                      the version number, i.e., com.foo.orders.FOrder 
-	 *                      as opposed to com.foo.orders.pogo.FOrder_v1.
-	 */
-//FindBugs - private method never called
-//	private static void registerKeyType(String keyTypeName)
-//	{
-//		if (keyTypeName == null) {
-//			return;
-//		}
-//		Class cls;
-//		try {
-//			cls = Class.forName(keyTypeName);
-//			KeyType keyType = (KeyType)cls.newInstance();
-//			registerKeyType(keyType);
-//		} catch (Exception e) {
-//			// ignore
-//		}
-//	}
-	
-	/**
-	 * Registers the specified key type and all of the previous versions.
-	 * A key type must be registered before it can be used by the application.
-	 * @param keyType The key type to register.
-	 */
-	public static void registerKeyType(KeyType keyType)
-	{
-		if (keyType == null) {
-			return;
-		}
-		
-		registerSingleKeyType(keyType);
-		
-		Package pkg = keyType.getClass().getPackage();
-		String keyTypeName;
-		if (pkg == null) {
-			keyTypeName = "pogo." + keyType.getClass().getSimpleName();
-		} else {
-			keyTypeName = pkg.getName() + ".pogo." + keyType.getClass().getSimpleName();
-		}
-		
-		int version = keyType.getVersion();
-		do {
-			try {
-				Class cls = Class.forName(keyTypeName + "_v" + version);
-				if (cls.isEnum() == false) {
-					break;
-				}
-				Object[] consts = cls.getEnumConstants();
-				if (consts != null && consts.length > 0 && consts[0] instanceof KeyType) {
-					KeyType ft = (KeyType)consts[0];
-					registerSingleKeyType(ft);
-				}
-			} catch (ClassNotFoundException e) {
-				break;
-			}
-			version--;
-			
-		} while (true);
-	}
-	
-	/**
-	 * Registers the specified key type only. It will not register the 
-	 * previous versions.
-	 * @param keyType The key type to register
-	 */
-	public static void registerSingleKeyType(KeyType keyType)
-	{
-		if (keyType == null) {
-			return;
-		}
-		Map<Integer, KeyType> map = uuidMap.get(keyType.getId());
-		if (map == null) {
-			map = new TreeMap<Integer, KeyType>();
-			uuidMap.put((UUID)keyType.getId(), map);
-		}
-		map.put(keyType.getVersion(), keyType);
-	}
-	
-	/**
-	 * Returns true if the specified key type has been registered previously.
-	 * @param keyType The key type to check.
-	 */
-	public static boolean isRegistered(KeyType keyType)
-	{
-		if (keyType == null) {
-			return false;
-		}
-		Map<Integer, KeyType> map = uuidMap.get(keyType.getId());
-		if (map == null) {
-			return false;
-		}
-		return map.get(keyType.getVersion()) != null;
-	}
-	
-	/**
-	 * Loads a new key type. The main key type points to this key
-	 * type.
-	 * Experimental - NOT USED
-	 * @param keyType
-	 */
-	private static void loadKeyType(KeyType keyType)
-	{
-		registerKeyType(keyType);
-		Package pkg = keyType.getClass().getPackage();
-		String keyTypeName = pkg.getName() + keyType.getClass().getSimpleName();
-		try {
-			Class cls = Class.forName(keyTypeName);
-			Field field = cls.getField("VERSION");
-			field.setInt(field, keyType.getVersion());
-		} catch (ClassNotFoundException e) {
-			return;
-		} catch (NoSuchFieldException e) {
-			return;
-		} catch (IllegalAccessException e) {
-			return;
-		}
-	}
-	
-	/**
-	 * Returns the key type of the specified UUID most significant bits,
-	 * least significant bits and version.
-	 * 
-	 * @param uuidMostSigBits The most significant bits.
-	 * @param uuidLeastSigBits The least significant bits.
-	 * @param version The version number.
-	 * @return Returns the key type of the specified UUID most significant
-	 *         bits, least significant bits and version. It returns null if 
-	 *         the key type is not found.
-	 */
-	public static KeyType getKeyType(long uuidMostSigBits, long uuidLeastSigBits, int version)
-	{
-		return getKeyType(new UUID(uuidMostSigBits, uuidLeastSigBits), version);
-	}
-	
-	/**
-	 * Returns the key type of the specified UUID and version.
-	 * @param uuid The UUID representing the key type.
-	 * @param version The version number.
-	 * @return Returns the key type of the specified UUID and version. It
-	 *         returns null if the key type is not found.
-	 */
-	public static KeyType getKeyType(UUID uuid, int version)
-	{
-		Map<Integer, KeyType> map = uuidMap.get(uuid);
-		if (map == null) {
-			return null;
-		}
-		return map.get(version);
-	}
-	
-	/**
-	 * Returns the entire key type instances of the specified version.
-	 * @param keyType The key type.
-	 * @param version The version number.
-	 * @return Returns the entire key type instances of the specified version.
-	 *         It returns null if the key types are not found.
-	 */
-	public static KeyType[] getValues(KeyType keyType, int version)
-	{
-		KeyType ft = getKeyType((UUID)keyType.getId(), version);
-		if (ft == null) {
-			return null;
-		}
-		return ft.getValues();
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/MapLite.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/MapLite.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/MapLite.java
deleted file mode 100644
index b792147..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/pogo/MapLite.java
+++ /dev/null
@@ -1,1136 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.pogo;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.UUID;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.Delta;
-import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.Version;
-
-/**
- * MapLite is a GemFire data class for efficiently storing and retrieving data
- * to/from GemFire data fabrics. It is a lightweight map class designed for
- * delivering self-describing messages over the network without the cost of
- * embedded keys in the wire format. MapLite achieves this by predefining the
- * keys in the form of enum (and String) constants and deploying them as part of
- * the application binary classes. The enum key classes are automatically
- * versioned and generated using the provided IDE plug-in, ensuring full
- * compatibility and coexistence with other versions.
- * <p>
- * In addition to the code generator, MapLite includes the following GemFire
- * cache optimization and operational features while maintaining the same level
- * of self-describing message accessibility.
- * <p>
- * <ul>
- * <li>MapLite is fully POGO compliant.</li>
- * <li>MapLite implements {@link java.util.Map}.</li>
- * <li>MapLite and POGO are in general significantly lighter than POJO and
- * {@link HashMap}. Its wire format is compact and does not require class
- * reflection.</li>
- * <li>MapLite and POGO are faster than POJO and HashMap. Its smaller payload
- * size means it is serialized and delivered faster.</li>
- * <li>MapLite lookup is faster than HashMap. MapLite keeps values internally
- * indexed in an array for faster access.</li>
- * <li>MapLite fully supports GemFire delta propagation.
- * <li>MapLite fully supports selective key inflation (SKI). With SKI, the
- * underlying POGO mechanism inflates only the values that are accessed by the
- * application. The rest of the values are kept deflated until they are
- * accessed. This reduces the memory footprint and eliminates the unnecessary
- * latency overhead introduced by the serialization and deserialization
- * operations.</li>
- * <li>MapLite fully supports the GemFire query service.</li>
- * <li>MapLite is fully integrated with the key class versioning mechanism,
- * which enables multiple versions of MapLite key sets to coexist in the fabric.
- * All versioned key classes are fully forward and backward compatible.</li>
- * <li>MapLite key classes are universally unique across space and time,
- * eradicating the class ID requirement.</li>
- * <li>MapLite is natively integrated with the GemFire command line tool, gfsh.</li>
- * <li>MapLite is language neutral.</li>
- * </ul>
- * <p>
- * <h3>Lighter and Faster</h3>
- * MapLite, in general, is significantly lighter than HashMap in terms of both
- * size and speed. The size of a typical serialized MapLite object is
- * considerably smaller than the counterpart HashMap object. Enum
- * {@link #get(KeyType)} calls are faster than
- * {@link HashMap#get(Object)} because the values are indexed in an
- * array, circumventing the more expensive hash lookup operation.
- * 
- * <h3>Map with enum KeyType Keys</h3>
- * MapLite implements Map and therefore has the same Map methods and behaves
- * exactly like Map. Unlike HashMap which also implements Map, a MapLite object
- * is restricted to a fixed set of predefined keys in an enum class that
- * implements the interface KeyType. This restriction effectively makes MapLite
- * lighter, faster, and more acquiescent than HashMap. It removes the keys from
- * the wire format and provides a valid key list for strict allowed key and type
- * checking.
- * 
- * <h3>Code Generator</h3>
- * Editing keys, although it can be done manually, is done via the provided IDE
- * plug-in which automatically generates a new version of the enum class. The
- * built-in versioning mechanism allows the new versioned enum class to be
- * deployed to the servers and clients during runtime without the requirement of
- * restarting them. The servers automatically load the new versioned class
- * making it immediately available to the application along with the previous
- * versions.
- * 
- * <h3>String Keys</h3>
- * In addition to the enum keys, MapLite also supports String keys. String keys
- * are costlier than enum keys but comparable to HashMap in terms of the put and
- * get speeds. One of the benefits of using String keys is the flexibility of
- * executing ad hoc queries. MapLite is fully compliant with the GemFire query
- * service, making it ideal for object-relational mapping.
- * 
- * <p>
- * <h3>Using MapLite</h3>
- * <ol>
- * <li>
- * Create a <code>{@link KeyType}</code> enum class using the code generator or
- * the provided example template.</li>
- * <li>
- * Register the new <code>KeyType</code> enum class using
- * <code>{@link KeyTypeManager}</code>.</li>
- * <li>
- * Use <code>KeyType</code> to create <code>MapLite</code> objects. Always use
- * {@link #MapLite(KeyType)} to create <code>MapLite</code> objects.</li>
- * <li>
- * Put the MapLite objects into cache regions</li>
- * <li>
- * Get the MapLite objects from cache regions</li>
- * <li>
- * Get values from the objects using <code>KeyType</code> or <code>String</code>
- * keys</li>
- * </ol>
- * 
- * <h3>Examples</h3>
- * 
- * <pre>
- * import com.gemstone.gemfire.internal.tools.gfsh.pogo.KeyTypeManager;
- * import com.gemstone.gemfire.internal.tools.gfsh.pogo.MapLite;
- * import gemfire.examples.model.Dummy;
- * import gemfre.examples.model.pogo.Dummy_v1;
- * import gemfire.examples.model.pogo.Dummy_v2;
- * 
- * . . .
- *  
- * // Register the Dummy key type. This also registers
- * // all of the versions in the sub-package pogo. This registration
- * // call is not is not required if the registration plug-in
- * // is included in the GemFire cache.xml file.
- * KeyTypeManager.registerKeyType(Dummy.getKeyType());
- * 
- * // Create a MapLite object using the latest Dummy version.
- * // Dummy is equivalent to Dummy_v2 assuming that Dummy_v2 is the
- * // latest version.
- * MapLite ml = new MapLite(Dummy.getKeyType());
- * 
- * // put data using the Dummy.Message enum constant
- * ml.put(Dummy.Message, "Hello, world.");
- * 
- * // put data using the string key "Dummy" which is equivalent to
- * // Dummy.Message
- * ml.put("Message", "Hello, world.");
- * 
- * // Get the value using the Dummy.Message enum constant
- * String message = (String) ml.get(Dummy.Message);
- * 
- * // Get the value using the versioned enum class Dummy_v2 which is
- * // equivalent to Dummy assuming Dummy_v2 is the latest version.
- * message = (String) ml.get(Dummy_v2.Message);
- * 
- * // Get the value using the previous versioned class Dummy_v1 which
- * // may or may not work depending on the changes made to version 2.
- * // If the Message key type has been changed then the type cast will
- * // fail.
- * message = (String) ml.get(Dummy_v1.Message);
- * 
- * // Get the value using the string key "Message".
- * message = (String) ml.get("Message");
- * </pre>
- * 
- * @author dpark
- * 
- */
-public class MapLite<V> implements DataSerializable, Delta, Map<String, V>, Cloneable
-{
-	private static final long serialVersionUID = 1L;
-
-	private static final int BIT_MASK_SIZE = 32; // int type
-
-	private KeyType keyType;
-	private Object[] values;
-	private int keyVersion;
-	private int[] dirtyFlags;
-	private byte flags;
-
-	// serialized values
-	private byte[] serializedBytes;
-
-	/**
-	 * <font COLOR="#ff0000"><strong>The use of this constructor is strongly
-	 * discouraged. Always use {@link #MapLite(KeyType)} wherever
-	 * possible.</strong></font>
-	 * <p>
-	 * The default constructor creates a new MapLite object with KeyType
-	 * undefined. Undefined KeyType may lead to undesired effects. The following
-	 * restriction applies when using this constructor:
-	 * 
-	 * <blockquote><i> {@link #put(KeyType, Object)} or {@link #get(KeyType)}
-	 * must be invoked once with a {@link KeyType} enum constant before the
-	 * MapLite object can be used. These methods implicitly initialize the
-	 * MapLite object with the specified key type. MapLite ignores String keys
-	 * until the key type has been assigned. </i></blockquote>
-	 * 
-	 * An exception to the above restriction is {@link #putAll(Map)} with the
-	 * argument type of MapLite. If MapLite is passed in, then putAll()
-	 * transforms this <i>empty</i> MapLite object into the passed-in MapLite
-	 * key type.
-	 * <p>
-	 * It is recommended that the overloaded constructor
-	 * {@link #MapLite(KeyType)} should always be used wherever possible. This
-	 * default constructor is primarily for satisfying Java serialization
-	 * restrictions in addition to handling special operations such as putAll().
-	 * 
-	 */
-	public MapLite()
-	{
-	}
-
-	/**
-	 * Creates a new MapLite object with the specified key type. Once created,
-	 * all subsequent operations must use the same <code>KeyType</code> enum
-	 * class. The key type is obtained from the <i>no-arg</i> static method,
-	 * <code>getKeyType()</code>, included in the generated key type class. For
-	 * example,
-	 * 
-	 * <pre>
-	 * MapLite ml = new MapLite(Dummy.getKeyType());
-	 * </pre>
-	 * 
-	 * @param keyType
-	 *            The key type enum constant to assign to MapLite.
-	 */
-	public MapLite(KeyType keyType)
-	{
-		init(keyType);
-	}
-
-	/**
-	 * Initializes the MapLite object by creating data structures for the
-	 * specified key type.
-	 * 
-	 * @param keyType
-	 *            The key type enum constant to assign to MapLite.
-	 */
-	private void init(KeyType keyType)
-	{
-		if (keyType == null) {
-			return;
-		}
-		this.keyType = keyType;
-		this.keyVersion = keyType.getVersion();
-		int count = keyType.getKeyCount();
-		this.values = new Object[count];
-		int dirtyFlagCount = calculateDirtyFlagCount();
-		this.dirtyFlags = new int[dirtyFlagCount];
-
-		if (KeyTypeManager.isRegistered(keyType) == false) {
-			KeyTypeManager.registerKeyType(keyType);
-		}
-	}
-
-	/**
-	 * Calculates the dirty flag count. The dirty flags are kept in an array of
-	 * integers. Each integer value represents 32 dirty flags.
-	 * 
-	 * @return Returns the dirty flag count.
-	 */
-	private int calculateDirtyFlagCount()
-	{
-		int count = keyType.getKeyCount();
-		int dirtyFlagCount = count / BIT_MASK_SIZE;
-		int reminder = count % BIT_MASK_SIZE;
-		if (reminder > 0) {
-			dirtyFlagCount++;
-		}
-		return dirtyFlagCount;
-	}
-
-	/**
-	 * Marks all keys dirty.
-	 */
-	private void dirtyAllKeys()
-	{
-		if (dirtyFlags != null) {
-			for (int i = 0; i < dirtyFlags.length; i++) {
-				dirtyFlags[i] = 0xFFFFFFFF;
-			}
-		}
-	}
-
-	/**
-	 * Clears the entire dirty flags.
-	 */
-	private void clearDirty()
-	{
-		if (dirtyFlags != null) {
-			for (int i = 0; i < dirtyFlags.length; i++) {
-				dirtyFlags[i] = 0x0;
-			}
-		}
-	}
-
-	/**
-	 * Returns the key type constant used to initialize this object.
-	 */
-	public KeyType getKeyType()
-	{
-		return keyType;
-	}
-
-	/**
-	 * Returns the value of the specified key type. If the default constructor
-	 * {@link #MapLite()} is used to create this object then this method
-	 * implicitly initializes itself with the specified key type if it has not
-	 * been initialized previously.
-	 * 
-	 * @param keyType
-	 *            The key type constant to lookup the mapped value.
-	 * @return Returns the mapped value. It returns null if the value does not
-	 *         exist or it was explicitly set to null.
-	 */
-	public V get(KeyType keyType)
-	{
-		if (keyType == null) {
-			return null;
-		}
-
-		// Initialization is not thread safe.
-		// It allows the use of the default constructor but at
-		// the expense of the lack of thread safety.
-		if (values == null && keyType != null) {
-			init(keyType);
-		}
-
-		return (V) values[keyType.getIndex()];
-	}
-
-	/**
-	 * Puts the specified value mapped by the specified key type into this
-	 * object. If the default constructor {@link #MapLite()} is used to create
-	 * this object then this method implicitly initializes itself with the
-	 * specified key type if it has not been initialized previously.
-	 * <p>
-	 * Note that for MapLite to be language neutral, the value type must 
-	 * be a valid POGO type. It must be strictly enforced by the application.
-	 * For Java only applications, any Serializable objects are valid.
-	 * 
-	 * @param keyType
-	 *            The key type constant to lookup the mapped value.
-	 * @param value
-	 *            The value to put into the MapLite object.
-	 * @return Returns the old value. It returns null if the old value does not
-	 *         exist or has been explicitly set to null.
-	 * @throws InvalidKeyException
-	 *             A runtime exception thrown if the passed in value type does
-	 *             not match the key type.
-	 */
-	public V put(KeyType keyType, V value) throws InvalidKeyException
-	{
-		if (keyType == null) {
-			return null;
-		}
-
-		// Initialization is not thread safe.
-		// It allows the use of the default constructor but at
-		// the expense of the lack of thread safety.
-		if (values == null) {
-			init(keyType);
-		}
-		
-		V oldVal = (V) values[keyType.getIndex()];
-		values[keyType.getIndex()] = value;
-		
-		setDirty(keyType, dirtyFlags);
-		return oldVal;
-	}
-
-	/**
-	 * Returns the mapped value for the specified key. It uses the String value
-	 * of the key, i.e., key.toString(), to lookup the mapped value.
-	 * 
-	 * @param key
-	 *            The key object.
-	 */
-	public V get(Object key)
-	{
-		if (keyType == null || key == null) {
-			return null;
-		}
-		deserialize();
-		KeyType keyType = this.keyType.getKeyType(key.toString());
-		if (keyType == null) {
-			return null;
-		}
-		return get(keyType);
-	}
-
-	/**
-	 * Puts the specified value mapped by the specified key into this object.
-	 * Unlike {@link #put(KeyType, Object)}, this method will not implicitly
-	 * initialize this object if the default constructor is used. If this object
-	 * has not bee initialized, then it throws a runtime exception
-	 * InvalidKeyException.
-	 * 
-	 * @param key
-	 *            The key object.
-	 * @param value
-	 *            The value to put into the MapLite object.
-	 * @return Returns the old value.
-	 */
-	public V put(String key, V value) throws InvalidKeyException
-	{
-		if (keyType == null) {
-			if (value == null) {
-				throw new InvalidKeyException("KeyType undefined due to the use of the MapLite default constructor. "
-						+ "Use MapLite(KeyType) to register the key type.");
-			} else {
-				throw new InvalidKeyException("Invalid " + value.getClass().getName()
-						+ ". KeyType undefined due to the use of the default constructor.");
-			}
-		}
-		deserialize();
-		KeyType keyType = this.keyType.getKeyType(key.toString());
-		if (keyType == null) {
-			return null;
-		}
-		return put(keyType, value);
-	}
-
-	/**
-	 * Returns true if GemFire delta propagation is enabled and there are
-	 * changes in values.
-	 */
-	public boolean hasDelta()
-	{
-		if (keyType.isDeltaEnabled()) {
-			return isDirty();
-		}
-		return false;
-	}
-
-	/**
-	 * Returns true if there are changes made in values.
-	 */
-	public boolean isDirty()
-	{
-		for (int i = 0; i < dirtyFlags.length; i++) {
-			if ((dirtyFlags[i] & 0xFFFFFFFF) != 0) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Sets the specified key type dirty.
-	 * 
-	 * @param keyType
-	 *            The key type to set dirty.
-	 * @param flags
-	 *            The flags that contain the key type.
-	 */
-	private void setDirty(KeyType keyType, int flags[])
-	{
-		int index = keyType.getIndex();
-		setDirty(index, flags);
-	}
-
-	/**
-	 * Sets the specified contiguous bit of the flags. A contiguous bit is the
-	 * bit number of the contiguous array integers. For example, if the flags
-	 * array size is 2 then the contiguous bit of 32 represents the first bit of
-	 * the flags[1] integer, 33 represents the second bit, and etc.
-	 * 
-	 * @param contiguousBit
-	 *            The contiguous bit position.
-	 * @param flags
-	 *            The bit flags.
-	 */
-	private void setDirty(int contiguousBit, int flags[])
-	{
-		int dirtyFlagsIndex = contiguousBit / BIT_MASK_SIZE;
-		int bit = contiguousBit % BIT_MASK_SIZE;
-		flags[dirtyFlagsIndex] |= 1 << bit;
-	}
-
-	/**
-	 * Returns true if the specified key type is dirty.
-	 * 
-	 * @param keyType
-	 *            The key type to check.
-	 * @param flags
-	 *            The flags that contain the key type.
-	 */
-//FindBugs - private method never called
-//	private boolean isBitDirty(KeyType keyType, int flags[])
-//	{
-//		int index = keyType.getIndex();
-//		int dirtyFlagsIndex = index / BIT_MASK_SIZE;
-//		int bit = index % BIT_MASK_SIZE;
-//		return isBitDirty(flags[dirtyFlagsIndex], bit);
-//	}
-
-	/**
-	 * Returns true if the specified contiguous bit of the flags is set. A
-	 * contiguous bit the bit number of the contiguous array integers. For
-	 * example, if the flags array size is 2 then the contiguous bit of 32
-	 * represents the first bit of the flags[1] integer, 33 represents the
-	 * second bit, and etc.
-	 * 
-	 * @param contiguousBit
-	 *            The contiguous bit position
-	 * @param flags
-	 *            The bit flags
-	 */
-//FindBugs - private method never called
-//	private boolean isDirty(int contiguousBit, int flags[])
-//	{
-//		int dirtyFlagsIndex = contiguousBit / BIT_MASK_SIZE;
-//		int bit = contiguousBit % BIT_MASK_SIZE;
-//		return isBitDirty(flags[dirtyFlagsIndex], bit);
-//	}
-
-	/**
-	 * Returns true if the specified flag bit id dirty.
-	 * 
-	 * @param flag
-	 *            The flag to check.
-	 * @param bit
-	 *            The bit to compare.
-	 * @return true if the specified flag bit id dirty.
-	 */
-	private boolean isBitDirty(int flag, int bit)
-	{
-		return ((flag >> bit) & 1) == 1;
-	}
-
-	/**
-	 * Returns true if the any of the flag bits is dirty.
-	 * 
-	 * @param flag
-	 *            The flag to check.
-	 */
-	private boolean isDirty(int flag)
-	{
-		return (flag & 0xFFFFFFFF) != 0;
-	}
-
-	/**
-	 * Deserializes (inflates) the serialized bytes if has not been done.
-	 */
-	private void deserialize()
-	{
-		byte[] byteArray = serializedBytes;
-		if (byteArray != null) {
-			KeyType[] keyTypeValues = keyType.getValues(keyVersion);
-			ByteArrayInputStream bais = new ByteArrayInputStream(byteArray);
-			DataInputStream dis = new DataInputStream(bais);
-			try {
-				for (int i = 0; i < keyTypeValues.length; i++) {
-					if (keyTypeValues[i].isKeyKeepSerialized()) {
-						// deserialized values
-						values[i] = readValue(keyTypeValues, i, dis);
-					}
-				}
-				dis.close();
-				serializedBytes = null;
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			} catch (ClassNotFoundException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-		}
-	}
-
-	/**
-	 * Reads the value at for the specified key type index.
-	 * 
-	 * @param keyTypes
-	 *            The entire key types that represent the MapLite values.
-	 * @param index
-	 *            The index of the key to read.
-	 * @param input
-	 *            The input stream.
-	 * @return Returns the read value.
-	 * @throws IOException
-	 *             Thrown if an IO error encountered.
-	 * @throws ClassNotFoundException
-	 */
-	private Object readValue(KeyType[] keyTypes, int index, DataInput input) throws IOException, ClassNotFoundException
-	{
-		return MapLiteSerializer.read(keyTypes[index].getType(), input);
-	}
-
-	/**
-	 * Reads MapLite contents in the specified input stream.
-	 * 
-	 * @param input
-	 *            The input stream.
-	 * @throws IOException
-	 *             Thrown if an IO error encountered.
-	 * @throws ClassNotFoundException
-	 *             Thrown if the input stream contains the wrong class type.
-	 *             This should never occur with MapLite.
-	 */
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException
-	{
-		flags = MapLiteSerializer.readByte(input);
-		long mostSigBits = input.readLong();
-		long leastSigBits = input.readLong();
-		keyVersion = DataSerializer.readUnsignedShort(input);
-		keyType = KeyTypeManager.getKeyType(mostSigBits, leastSigBits, keyVersion);
-		init(keyType);
-		values = new Object[keyType.getKeyCount()];
-		KeyType[] keyTypeValues = keyType.getValues(keyVersion);
-		if (keyType.isPayloadKeepSerialized()) {
-			// need not to lock since fromData is invoked only
-			// once by GemFire
-			serializedBytes = DataSerializer.readByteArray(input);
-			byte[] deserializedBytes = DataSerializer.readByteArray(input);
-			ByteArrayInputStream bais = new ByteArrayInputStream(deserializedBytes);
-			DataInputStream dis = new DataInputStream(bais);
-			for (int i = 0; i < keyTypeValues.length; i++) {
-				if (keyTypeValues[i].isKeyKeepSerialized() == false) {
-					// deserialized values
-					values[i] = readValue(keyTypeValues, i, dis);
-				}
-			}
-			dis.close();
-		} else {
-			for (int i = 0; i < keyTypeValues.length; i++) {
-				values[i] = readValue(keyTypeValues, i, input);
-			}
-		}
-	}
-
-	/**
-	 * Writes the value of the specified index to the output stream.
-	 * 
-	 * @param keyTypes
-	 *            The entire key types that represent the MapLite values.
-	 * @param index
-	 *            The index of the key to write.
-	 * @param output
-	 *            The output stream.
-	 * @throws IOException
-	 *             Thrown if an IO error encountered.
-	 */
-	private void writeValue(KeyType[] keyTypes, int index, DataOutput output) throws IOException
-	{
-		try {
-			MapLiteSerializer.write(keyTypes[index].getType(), values[index], output);
-		} catch (Exception ex) {
-			throw new InvalidKeyException(ex.getMessage() + keyTypes.getClass() + " index=" + keyTypes[index].getName(), ex);
-		}
-	}
-
-	/**
-	 * Writes the MapLite contents to the specified output stream.
-	 * 
-	 * @param output
-	 *            The output stream.
-	 * @throws IOException
-	 *             Thrown if an IO error encountered.
-	 */
-	public void toData(DataOutput output) throws IOException
-	{
-		MapLiteSerializer.writeByte(flags, output);
-		output.writeLong(((UUID) keyType.getId()).getMostSignificantBits());
-		output.writeLong(((UUID) keyType.getId()).getLeastSignificantBits());
-		DataSerializer.writeUnsignedShort(keyType.getVersion(), output);
-		KeyType[] keyTypeValues = keyType.getValues(keyVersion);
-		if (keyType.isPayloadKeepSerialized()) {
-			// assign byteArray to serializedBytes beforehand to
-			// handle race condition
-			byte[] byteArray = serializedBytes;
-			if (byteArray != null) {
-				DataSerializer.writeByteArray(byteArray, output);
-				HeapDataOutputStream hdos2 = new HeapDataOutputStream(Version.CURRENT);
-				for (int i = 0; i < keyTypeValues.length; i++) {
-					if (keyTypeValues[i].isKeyKeepSerialized() == false) {
-						// keep it separate in deserialized array.
-						// this array is always deserialized
-						writeValue(keyTypeValues, i, hdos2);
-					}
-				}
-				DataSerializer.writeByteArray(hdos2.toByteArray(), output);
-				hdos2.close();
-			} else {
-				HeapDataOutputStream hdos = new HeapDataOutputStream(Version.CURRENT);
-				HeapDataOutputStream hdos2 = new HeapDataOutputStream(Version.CURRENT);
-				for (int i = 0; i < keyTypeValues.length; i++) {
-					if (keyTypeValues[i].isKeyKeepSerialized()) {
-						// serialize in the normal array
-						// the normal array is deserialized only when the
-						// one of its keys is accessed.
-						writeValue(keyTypeValues, i, hdos);
-					} else {
-						// keep it separate in deserialized array.
-						// this array is always deserialized
-						writeValue(keyTypeValues, i, hdos2);
-					}
-				}
-				DataSerializer.writeByteArray(hdos.toByteArray(), output);
-				DataSerializer.writeByteArray(hdos2.toByteArray(), output);
-				hdos.close();
-				hdos2.close();
-			}
-		} else {
-			for (int i = 0; i < keyTypeValues.length; i++) {
-				writeValue(keyTypeValues, i, output);
-			}
-		}
-		clearDirty();
-	}
-
-	/**
-	 * Reads deltas from the specified input stream.
-	 * 
-	 * @param input
-	 *            The input stream.
-	 * @throws IOException
-	 *             Thrown if an IO error encountered.
-	 * @throws InvalidDeltaException
-	 *             Thrown if the received deltas cannot be properly applied.
-	 */
-	public void fromDelta(DataInput input) throws IOException, InvalidDeltaException
-	{
-		KeyType[] keyTypeValues = keyType.getValues();
-		int bitCount = keyTypeValues.length;
-		int dirtyFlagCount = dirtyFlags.length;
-
-		int dirtyFlagsToApply[] = new int[dirtyFlagCount];
-		for (int i = 0; i < dirtyFlagCount; i++) {
-			dirtyFlagsToApply[i] = input.readInt();
-			// CacheFactory.getAnyInstance().getLogger().info("dirty = " +
-			// dirtyFlagsToApply[i]);
-		}
-
-		try {
-			int count = BIT_MASK_SIZE; // int
-			for (int i = 0; i < dirtyFlagsToApply.length; i++) {
-				int dirty = dirtyFlagsToApply[i]; // received dirty
-				int userDirty = dirtyFlags[i]; // app dirty
-				if (i == dirtyFlagsToApply.length - 1) {
-					count = bitCount % BIT_MASK_SIZE;
-					if (count == 0 && bitCount != 0) {
-						count = BIT_MASK_SIZE;
-					}
-				}
-
-				// Compare both the current bit and the received bit.
-				// The app might be modifying the object. If so, keep the
-				// user modified data and discard the change received.
-				int startIndex = i * BIT_MASK_SIZE;
-				for (int j = 0; j < count; j++) {
-					if (isBitDirty(dirty, j)) {
-						int index = startIndex + j;
-						Object value = MapLiteSerializer.readObject(input);
-						// Set the new value only if the app has not set the
-						// value
-						if (isBitDirty(userDirty, j) == false) {
-							values[index] = value;
-						}
-						// CacheFactory.getAnyInstance().getLogger().info("bit set = "
-						// + j + ", index = " + index);
-					}
-				}
-			}
-		} catch (ClassNotFoundException ex) {
-			// ignore
-		}
-	}
-
-	/**
-	 * Writes deltas to the specified output stream.
-	 * 
-	 * @param output
-	 *            The output stream.
-	 * @throws IOException
-	 *             Thrown if an IO error encountered.
-	 */
-	public void toDelta(DataOutput output) throws IOException
-	{
-		KeyType[] keyTypeValues = keyType.getValues();
-		int bitCount = keyTypeValues.length;
-
-		for (int i = 0; i < dirtyFlags.length; i++) {
-			output.writeInt(dirtyFlags[i]);
-			// System.out.println("dirty = " + dirtyFlags[i]);
-		}
-
-		int count = BIT_MASK_SIZE;
-
-		for (int i = 0; i < dirtyFlags.length; i++) {
-			int dirty = dirtyFlags[i];
-			if (isDirty(dirty) == false) {
-				continue;
-			}
-			if (i == dirtyFlags.length - 1) {
-				count = bitCount % BIT_MASK_SIZE;
-				if (count == 0 && bitCount != 0) {
-					count = BIT_MASK_SIZE;
-				}
-			}
-			int startIndex = i * BIT_MASK_SIZE;
-			for (int j = 0; j < count; j++) {
-				if (isBitDirty(dirty, j)) {
-					int index = startIndex + j;
-					MapLiteSerializer.writeObject(values[index], output);
-				}
-			}
-		}
-		clearDirty();
-	}
-
-	/**
-	 * Returns the key type ID that is universally unique. This call is
-	 * equivalent to <code>getKeyType().getId()</code>.
-	 */
-	public Object getId()
-	{
-		if (keyType == null) {
-			return null;
-		}
-		return keyType.getId();
-	}
-
-	/**
-	 * Returns the key type version. There are one or more key type versions per
-	 * ID. This method call is equivalent to invoking
-	 * <code>getKeyType().getVersion()</code>.
-	 */
-	public int getKeyTypeVersion()
-	{
-		if (keyType == null) {
-			return 0;
-		}
-		return keyType.getVersion();
-	}
-
-	/**
-	 * Returns the simple (short) class name of the key type. It returns null if
-	 * the key type is not defined.
-	 */
-	public String getName()
-	{
-		if (keyType == null) {
-			return null;
-		}
-		return (String) keyType.getClass().getSimpleName();
-	}
-
-	/**
-	 * Returns the fully qualified class name of the key type. It returns null
-	 * if the key type is not defined.
-	 */
-	public String getKeyTypeName()
-	{
-		if (keyType == null) {
-			return null;
-		}
-		return (String) keyType.getClass().getSimpleName();
-	}
-
-	/**
-	 * Returns all of the keys that map non-null values. It returns an empty set
-	 * if this object has not been initialized, i.e., KeyType is undefined.
-	 */
-	public Set<String> keySet()
-	{
-		TreeSet<String> retSet = new TreeSet<String>();
-		if (keyType != null) {
-
-			Set<String> set = (Set<String>) keyType.getNameSet();
-			for (String key : set) {
-				if (get(key) != null) {
-					retSet.add(key);
-				}
-			}
-		}
-		return retSet;
-	}
-
-	/**
-	 * Returns the entire collection of non-null values.
-	 */
-	public Collection<V> values()
-	{
-		ArrayList list = new ArrayList(values.length + 1);
-		for (int i = 0; i < values.length; i++) {
-			if (values[i] != null) {
-				list.add(values[i]);
-			}
-		}
-		return Collections.unmodifiableCollection(list);
-	}
-
-	/**
-	 * Returns the (string key, value) paired entry set that contains only
-	 * non-null values.
-	 */
-	public Set<Map.Entry<String, V>> entrySet()
-	{
-		if (keyType == null) {
-			return null;
-		}
-		HashMap<String, V> map = new HashMap(keyType.getKeyCount() + 1, 1f);
-		for (KeyType ft : keyType.getValues()) {
-			Object value = get(ft);
-			if (value != null) {
-				map.put((String) ft.getName(), get(ft));
-			}
-		}
-		return Collections.unmodifiableMap(map).entrySet();
-	}
-
-	/**
-	 * Clears the MapLite values. All non-null values are set to null and dirty.
-	 */
-	public void clear()
-	{
-		if (values != null) {
-			for (int i = 0; i < values.length; i++) {
-				if (values[i] != null) {
-					setDirty(i, dirtyFlags);
-				}
-			}
-			values = new Object[values.length];
-		}
-	}
-
-	/**
-	 * Returns true if the specified key maps a non-null value. It uses
-	 * key.toString() to search the key.
-	 * 
-	 * @param key
-	 *            The key to check.
-	 */
-	public boolean containsKey(Object key)
-	{
-		if (keyType == null) {
-			return false;
-		}
-		return get(key) != null;
-	}
-
-	/**
-	 * Returns true if the specified value exists in this object. It returns
-	 * null if the specified value is null and the MapLite object contains one
-	 * or more null values.
-	 * 
-	 * @param value
-	 *            The value to search.
-	 */
-	public boolean containsValue(Object value)
-	{
-		if (keyType == null) {
-			return false;
-		}
-		for (int i = 0; i < values.length; i++) {
-			if (values[i] == value) {
-				return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Returns true if there are no values stored in this object. A null value
-	 * is considered no value.
-	 */
-	public boolean isEmpty()
-	{
-		if (keyType == null || values == null) {
-			return true;
-		}
-		for (int i = 0; i < values.length; i++) {
-			if (values[i] != null) {
-				return false;
-			}
-		}
-		return false;
-	}
-
-	/**
-	 * Puts all entries found in the specified map into this MapLite object. The
-	 * specified map is handled based on its type as follows:
-	 * 
-	 * <ul>
-	 * <li>If the specified map is null then it is ignored.</li>
-	 * 
-	 * <li>If the specified map is MapLite and this object has not assigned
-	 * KeyType then this method shallow-copies the entire map image into this
-	 * object. As a result, MapLite object effectively becomes a clone of the
-	 * specified map with all of the keys marked dirty.</li>
-	 * 
-	 * <li>If the specified map is MapLite and this object has the same KeyType
-	 * as the map then the above bullet also applies.</li>
-	 * 
-	 * <li>If the specified map is Map or MapLite with a KeyType that is
-	 * different from this object then this method shallow-copies only the valid
-	 * keys and values. All invalid keys and values are ignored. The valid keys
-	 * must have the same key names defined in this object's KeyType. Similarly,
-	 * the valid values must have the same types defined in this object's
-	 * KeyType. All valid keys are marked dirty.</li>
-	 * </ul>
-	 * <p>
-	 * Note that the last bullet transforms any Map objects into MapLite
-	 * objects.
-	 * 
-	 * @param map
-	 *            Mappings to be stored in this MapLite object. If it is null
-	 *            then it is silently ignored.
-	 */
-	public void putAll(Map<? extends String, ? extends V> map)
-	{
-		if (map == null) {
-			return;
-		}
-
-		// if key type is not defined
-		if (keyType == null) {
-			if (map instanceof MapLite) {
-				MapLite ml = (MapLite) map;
-				if (ml.getKeyType() == null) {
-					return;
-				}
-				init(ml.getKeyType());
-				System.arraycopy(ml.values, 0, values, 0, values.length);
-				dirtyAllKeys();
-				return;
-			} else {
-				return;
-			}
-		}
-
-		// if key type is defined
-		if (map instanceof MapLite) {
-			MapLite ml = (MapLite) map;
-			if (keyType == ml.getKeyType()) {
-				System.arraycopy(ml.values, 0, values, 0, values.length);
-				dirtyAllKeys();
-				return;
-			}
-		}
-
-		// If Map or MapLite with a different KeyType - key must be string
-		Set<? extends Map.Entry<? extends String, ? extends V>> set = map.entrySet();
-		for (Map.Entry<? extends String, ? extends V> entry : set) {
-			KeyType keyType = this.keyType.getKeyType(entry.getKey());
-			if (keyType == null) {
-				continue;
-			}
-			if (entry.getValue() != null && keyType.getType() != entry.getValue().getClass()) {
-				continue;
-			}
-			put(keyType, entry.getValue());
-		}
-	}
-
-	/**
-	 * Removes the specified key's value. This method removes only the value
-	 * that the key maps to. The keys are never removed.
-	 * 
-	 * @param key
-	 *            The key of the value to remove.
-	 */
-	public V remove(Object key)
-	{
-		if (keyType == null || key == null) {
-			return null;
-		}
-
-		KeyType keyType = this.keyType.getKeyType(key.toString());
-		if (keyType == null) {
-			return null;
-		}
-
-		V oldVal = (V) values[keyType.getIndex()];
-
-		if (oldVal != null) {
-			// if (this.keyType.isDeltaEnabled()) {
-			setDirty(keyType, dirtyFlags);
-			// }
-		}
-		// TODO: take care of initial values for primitives
-		values[keyType.getIndex()] = null;
-		return oldVal;
-	}
-
-	/**
-	 * Returns the count of the non-null values.
-	 */
-	public int size()
-	{
-		if (keyType == null) {
-			return 0;
-		}
-		int count = 0;
-		for (int i = 0; i < values.length; i++) {
-			if (values[i] != null) {
-				count++;
-			}
-		}
-		return count;
-	}
-
-	/**
-	 * Returns the count of all keys defined by the key type. This method call
-	 * is equivalent to invoking
-	 * <code>{@link #getKeyType()}.getKeyCount()</code>. It returns 0 if MapLite
-	 * is not initialized, i.e., key type is not defined.
-	 */
-	public int getKeyCount()
-	{
-		if (keyType == null) {
-			return 0;
-		}
-		return keyType.getKeyCount();
-	}
-
-	/**
-	 * Clones this object by shallow-copying values. The returned object is the
-	 * exact image of this object including deltas and serialized values.
-	 */
-	public Object clone()
-	{
-		if (keyType == null) {
-			return new MapLite();
-		}
-		MapLite ml = new MapLite(keyType);
-		System.arraycopy(values, 0, ml.values, 0, values.length);
-		System.arraycopy(dirtyFlags, 0, ml.dirtyFlags, 0, dirtyFlags.length);
-		if (serializedBytes != null) {
-			System.arraycopy(serializedBytes, 0, ml.serializedBytes, 0, serializedBytes.length);
-		}
-		return ml;
-	}
-}



[34/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testNullObjectsAtRootLevel2.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testNullObjectsAtRootLevel2.txt b/pulse/src/main/resources/testNullObjectsAtRootLevel2.txt
new file mode 100644
index 0000000..53f1afb
--- /dev/null
+++ b/pulse/src/main/resources/testNullObjectsAtRootLevel2.txt
@@ -0,0 +1,30 @@
+{"result":[
+  {"member":[["java.lang.String","pc68(7930)<v9>:30319"]],
+   "result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["10","11","12","13","14"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["20","21","22","23","24"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["30","31","32","33","34"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data
 .Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+     null,
+     
+     null,
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",true],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN1","IBM1","YHOO1","GOOG1","MSFT1"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN2","IBM2","YHOO2","GOOG2","MSFT2"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN3","IBM3","YHOO3","GOOG3","MSFT3"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO1"],"mktValue":["double",3],"sharesOutstanding":["double",2001],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]
 ]}],"IBM1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM1"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]
+   ]
+  },
+  {"member":[["java.lang.String","pc68(7930)<v9>:40419"]],
+   "result":[
+    
+    null,
+    
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["10","11","12","13","14"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["20","21","22","23","24"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["30","31","32","33","34"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data
 .Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+     null,
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",true],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN1","IBM1","YHOO1","GOOG1","MSFT1"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN2","IBM2","YHOO2","GOOG2","MSFT2"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN3","IBM3","YHOO3","GOOG3","MSFT3"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO1"],"mktValue":["double",3],"sharesOutstanding":["double",2001],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]
 ]}],"IBM1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM1"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]
+   ]
+  }
+  ]
+}
\ No newline at end of file


[61/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rm.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rm.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rm.java
deleted file mode 100644
index dc4b7fb..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rm.java
+++ /dev/null
@@ -1,175 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.ObjectUtil;
-
-public class rm implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public rm(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("rm [-a|-g] [-k] <key>|<enum list>");
-		gfsh.println("     Remove keys locally and/or remotely. If no options are specified,");
-		gfsh.println("     it removes <key> from the local region only.");
-		gfsh.println("     -a Remove keys from both the local region and the server");
-		gfsh.println("        region. This command will be distributed to other caches if");
-        gfsh.println("        scope is not Scope.LOCAL.");
-		gfsh.println("     -g Remove keys globally. Remote from the local region and all");
-		gfsh.println("        server regions regardless of scope. This option also removes");
-		gfsh.println("        keys from server regions with Scope.LOCAL.");
-		gfsh.println("     -k Remove enumerated keys. If this option is not specified, then");
-		gfsh.println("        <key> is expected.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("rm -?")) {
-			help();
-		} else {
-			rm(command);
-		}
-	}
-	
-	private void rm(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 1) {
-			regionPath = (String)list.get(1);
-		} else {
-			gfsh.println("Error: must specify a region path to remove");
-			return;
-		}
-		
-		boolean enumerated = false;
-		boolean removeAll = false;
-		boolean removeServer = false;
-		
-		String val;
-		int keyIndex = 0;
-		for (int i = 1; i < list.size(); i++) {
-			val = list.get(i);
-			if (val.equals("-a")) {
-				removeServer = true;
-			} else if (val.equals("-g")) {
-				removeAll = true;
-			} else if (val.equals("-k")) {
-				enumerated = true;
-			} else {
-				keyIndex = i;
-				break;
-			}
-		}
-		
-		Region region = gfsh.getCurrentRegion();
-		String numbers;
-		Object key;
-		if (removeServer) {
-			
-			if (enumerated) {
-				Map keyMap = gfsh.getKeyMap(list, keyIndex);
-				Object keys[] = keyMap.values().toArray();
-				for (Object k: keyMap.values()) {
-					region.remove(k);
-					gfsh.println("removed server: " + ObjectUtil.getPrintableObject(k));
-				}
-				
-			} else {
-				key = gfsh.getQueryKey(list, keyIndex);
-				region.remove(key);
-				gfsh.println("removed server: " + ObjectUtil.getPrintableObject(key));
-			}
-			
-		} else if (removeAll) {
-			
-			if (enumerated) {
-				Map keyMap = gfsh.getKeyMap(list, keyIndex);
-				Object keys[] = keyMap.values().toArray();
-
-				boolean serverError = false;
-				List<AggregateResults> results = (List<AggregateResults>)gfsh.getAggregator().aggregate(new GfshFunction(command, gfsh.getCurrentPath(), keys), gfsh.getAggregateRegionPath());
-				for (Object k: keyMap.values()) {
-					try {
-						region.localDestroy(k);
-					} catch (Exception ex) {
-						// ignore
-					}
-					gfsh.println("removed all: " + ObjectUtil.getPrintableObject(k));
-				}
-				for (AggregateResults aggregateResults : results) {
-					if (aggregateResults.getCode() == AggregateResults.CODE_ERROR) {
-						gfsh.println("Error from server: " + aggregateResults.getCodeMessage());
-					}
-				}
-				if (serverError) {
-					gfsh.println("Error: One or more keys may have not been removed from the server(s)");
-				}
-			} else {
-				key = gfsh.getQueryKey(list, keyIndex);
-				
-				List<AggregateResults> results = (List<AggregateResults>)gfsh.getAggregator().aggregate(new GfshFunction(command, gfsh.getCurrentPath(), new Object[] { key }), gfsh.getAggregateRegionPath());
-				try {
-					region.localDestroy(key);
-				} catch (Exception ex) {
-					// ignore
-				}
-				boolean serverError = false;
-				for (AggregateResults aggregateResults : results) {
-					if (aggregateResults.getCode() == AggregateResults.CODE_ERROR) {
-						gfsh.println("Error from server: " + aggregateResults.getCodeMessage());
-						serverError = true;
-					}
-				}
-				if (serverError) {
-					gfsh.println("Error: One or more keys may have not been removed from the server(s)");
-				} else {
-					gfsh.println("removed: " + ObjectUtil.getPrintableObject(key));
-				}
-			}
-
-		} else {
-			// remove local
-			if (enumerated) {
-				Map keyMap = gfsh.getKeyMap(list, keyIndex);
-				for (Object k: keyMap.values()) {
-					// remove local
-					try {
-						region.localDestroy(k);
-						gfsh.println("removed local: " + ObjectUtil.getPrintableObject(k));
-					} catch (EntryNotFoundException ex) {
-						gfsh.println("local (not found): " + ObjectUtil.getPrintableObject(k));
-					}
-					
-				}
-			} else {
-				key = gfsh.getQueryKey(list, keyIndex);
-				// remove local
-				try {
-					region.localDestroy(key);
-					gfsh.println("removed local: " + ObjectUtil.getPrintableObject(key));
-				} catch (EntryNotFoundException ex) {
-					gfsh.println("local (not found): " + ObjectUtil.getPrintableObject(key));
-				}
-			}
-		}
-	}
-	
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rmdir.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rmdir.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rmdir.java
deleted file mode 100644
index 71491c8..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/rmdir.java
+++ /dev/null
@@ -1,249 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.Aggregator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.functions.util.RegionDestroyFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.CommandClient;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionDestroyTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-import com.gemstone.gemfire.internal.tools.gfsh.util.RegionUtil;
-
-public class rmdir implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public rmdir(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("rmdir [-a|-g|-s] [-?] <region path>");
-		gfsh.println("     Remove the local region if no options specified. The region path");
-		gfsh.println("     can be absolute or relative.");
-		gfsh.println("     -a Remove both the local region and the server region.");
-		gfsh.println("        The region destroy will be distributed to other caches if the");
-		gfsh.println("        scope is not Scope.LOCAL.");
-		gfsh.println("     -g Remove globally. Remove the local region and all server");
-		gfsh.println("        regions regardless of scope. This option also removes server");
-		gfsh.println("        regions with Scope.LOCAL.");
-		gfsh.println("     -s Remove only the server region. The local region is not destroyed.");
-		gfsh.println("        The region destroy will be distributed to other caches if the");
-		gfsh.println("        scope is not Scope.LOCAL."); 
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("rmdir -?")) {
-			help();
-		} else if (command.startsWith("rmdir -a")) {
-			rmdir_a(command);
-		} else if (command.startsWith("rmdir -g")) {
-			rmdir_g(command);
-		} else if (command.startsWith("rmdir -s")) {
-			rmdir_s(command);
-		} else {
-			rmdir_local(command);
-		}
-	}
-	
-	private void rmdir(String command) throws Exception
-	{
-		int index = command.indexOf(" ");
-		if (index == -1) {
-			gfsh.println("Error: rmdir requires a region path to remove");
-		} else {
-			Cache cache = gfsh.getCache();
-			Region region;
-			String newPath = command.substring(index).trim();
-			String fullPath = gfsh.getFullPath(newPath, gfsh.getCurrentPath());
-			if (fullPath == null) {
-				gfsh.println("Error: region path must be provided. mkdir <regionPath>");
-			} else {
-				// absolute path
-				region = cache.getRegion(fullPath);
-				if (region == null) {
-					gfsh.println("Error: region does not exist - " + fullPath);
-					return;
-				}
-				region.close();
-				gfsh.println("Region removed: " + fullPath);
-			}
-		}
-	}
-	
-	private void rmdir_local(String command) 
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 1) {
-			regionPath = (String)list.get(1);
-		} else {
-			gfsh.println("Error: must specify a region path to remove");
-			return;
-		}
-		
-		remove_local(regionPath);
-	}
-	
-	private void rmdir_a(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 2) {
-			regionPath = (String)list.get(2);
-		} else {
-			gfsh.println("Error: must specify a region path to remove");
-			return;
-		}
-		
-		remove_server(regionPath, false);
-		remove_local(regionPath);
-	}
-	
-	private void rmdir_g(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 2) {
-			regionPath = (String)list.get(2);
-		} else {
-			gfsh.println("Error: must specify a region path to remove");
-			return;
-		}
-		
-		remove_server(regionPath, true);
-		remove_local(regionPath);
-	}
-	
-	private void rmdir_s(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath = null;
-		if (list.size() > 2) {
-			regionPath = (String)list.get(2);
-		} else {
-			gfsh.println("Error: must specify a region path to remove");
-			return;
-		}
-		
-		remove_server(regionPath, false);
-	}
-	
-	private void remove_local(String regionPath)
-	{
-		if (regionPath == null) {
-			return;
-		}
-		
-		String currentPath = gfsh.getCurrentPath();
-		String fullPath = gfsh.getFullPath(regionPath, currentPath);
-		if (fullPath == null) {
-			gfsh.println("Error: invalid region path");
-		} else if (fullPath.equals("/")) {
-			gfsh.println("Error: cannot remove top level");
-		} else {
-			Region region = gfsh.getCache().getRegion(fullPath);
-			if (region == null) {
-				gfsh.println("Error: undefined region path " + fullPath);
-				return;
-			} 
-			region.close();
-			
-			// correct the current path if the removed region path
-			// lies in the current path
-			String currentSplit[] = currentPath.split("/");
-			Cache cache = gfsh.getCache();
-			Region currentRegion = null;
-			if (currentSplit.length > 1) {
-				currentRegion = region = cache.getRegion(currentSplit[1]);
-				if (region != null) {
-					for (int i = 2; i < currentSplit.length; i++) {
-						region = region.getSubregion(currentSplit[i]);
-						if (region == null) {
-							break;
-						}
-						currentRegion = region;
-					}
-				}
-			}
-			if (currentRegion == null) {
-				gfsh.setCurrentPath("/");
-			} else {
-				gfsh.setCurrentPath(currentRegion.getFullPath());
-			}
-			gfsh.setCurrentRegion(currentRegion);
-			
-			gfsh.println("Region removed from local VM: " + regionPath);
-		}
-	}
-	
-	private void remove_server(String regionPath, boolean global) throws Exception
-	{
-		if (regionPath == null) {
-			return;
-		}
-		
-		String currentPath = gfsh.getCurrentPath();
-		String fullPath = gfsh.getFullPath(regionPath, currentPath);
-		if (fullPath == null) {
-			gfsh.println("Error: invalid region path");
-		} else if (fullPath.equals("/")) {
-			gfsh.println("Error: cannot remove top level");
-		} else {
-			
-			String confirmation = gfsh.getLine("This command will remove the region " + fullPath + " from the server(s). \nDo you want to proceed? (yes|no): ");
-			if (confirmation.equalsIgnoreCase("yes") == false) {
-				gfsh.println("Command aborted.");
-				return;
-			}
-			
-			if (global) {
-				
-				Aggregator aggregator = gfsh.getAggregator();
-				List<CommandResults> aggregateList = (List<CommandResults>)aggregator.aggregate(new RegionDestroyFunction(fullPath), gfsh.getAggregateRegionPath());
-				
-				int i = 1;
-				for (CommandResults commandResults : aggregateList) {
-					
-					MemberInfo memberInfo = (MemberInfo)commandResults.getDataObject();
-					gfsh.print(i + ". " + memberInfo.getMemberName() + "(" + memberInfo.getMemberId() + ")" + ": ");
-					if (commandResults.getCode() == RegionDestroyTask.ERROR_REGION_DESTROY) {
-						gfsh.println("error - " + commandResults.getCodeMessage());
-					} else {
-						Region region = RegionUtil.getRegion(fullPath, Scope.LOCAL, DataPolicy.NORMAL, null);
-						gfsh.println("region removed: " + region.getFullPath());
-					}
-					i++;
-				}
-			} else {
-				CommandClient commandClient = gfsh.getCommandClient();
-				CommandResults commandResults = commandClient.execute(new RegionDestroyTask(fullPath));
-				MemberInfo memberInfo = (MemberInfo)commandResults.getDataObject();
-				gfsh.print(memberInfo.getMemberName() + "(" + memberInfo.getMemberId() + ")" + ": ");
-				if (commandResults.getCode() == RegionDestroyTask.ERROR_REGION_DESTROY) {
-					gfsh.println("error - " + commandResults.getCodeMessage());
-				} else {
-					Region region = RegionUtil.getRegion(regionPath, Scope.LOCAL, DataPolicy.NORMAL, null);
-					gfsh.println("region removed: " + region.getFullPath());
-				}
-			}
-		}
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/select.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/select.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/select.java
deleted file mode 100644
index 9caf017..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/select.java
+++ /dev/null
@@ -1,139 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Nextable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.QueryTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-public class select implements CommandExecutable, Nextable
-{
-	private final static int DEFAULT_LIMIT = 1000;
-	private final static int MAX_LIMIT = 5000;
-	
-	private Gfsh gfsh;
-	
-	private int limit = DEFAULT_LIMIT;
-
-	public select(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-		gfsh.setSelectLimit(limit);
-	}
-	
-	public void help()
-	{
-		gfsh.println("select [-l <limit>|-show] | -?");
-		gfsh.println("select <tuples where ...> | -?");
-		gfsh.println("     Execute the specified query in the remote cache.");
-		gfsh.println("     -l set the result set size limit, i.e.,");
-		gfsh.println("        'select ... from ... limit <limit>'. Note that gfsh automatically");
-		gfsh.println("        appends 'limit' to your select statement. Do not add your own limit.");
-		gfsh.println("        The default limit is 1000. The allowed max limit is 5000.");
-		gfsh.println("     -show Displays the select limit value.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{	
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		
-		String queryString = command;
-		
-		if (list.contains("-?")) {
-			help();
-		} else {
-			for (int i = 1; i < list.size(); i++) {
-				String token = list.get(i);
-				if (token.equals("-l")) {
-					if (i + 1 >= list.size()) {
-						gfsh.println("Error: '-l' requires limit value");
-						return;
-					}
-					int val = Integer.parseInt((String) list.get(++i));
-					if (val > MAX_LIMIT) {
-						limit = MAX_LIMIT;
-					} else if (val < 0) {
-						limit = 0;
-					} else {
-						limit = val;
-					}
-					gfsh.setSelectLimit(limit);
-					return;
-				} else if (token.equals("-show")) {
-					select_show();
-					return;
-				}
-			}
-			
-			queryString += " limit " + limit;
-			select(queryString, true);
-		}
-	}
-	
-	public List getRemoteKeys(String regionPath) throws Exception
-	{
-		List list = select("select * from " + regionPath + ".keySet limit " + limit, true);	
-		return list;
-	}
-	
-	public void select_show()
-	{
-		gfsh.println("select limit = " + limit);
-	}
-	
-	public List select(String queryString, boolean nextEnabled) throws Exception
-	{
-		long startTime = System.currentTimeMillis();
-		CommandResults cr = gfsh.getCommandClient().execute(new QueryTask(queryString, gfsh.getFetchSize(), nextEnabled));
-		long stopTime = System.currentTimeMillis();
-		if (cr.getCode() == QueryTask.ERROR_QUERY) {
-			gfsh.println(cr.getCodeMessage());
-			return null;
-		}
-		QueryResults results = (QueryResults) cr.getDataObject();
-		if (results == null) {
-			gfsh.println("No results");
-			return null;
-		}
-
-		List list = null;
-		Object obj = results.getResults();
-		if (obj instanceof SelectResults) {
-			SelectResults sr = (SelectResults) results.getResults();
-			list = sr.asList();
-			int startRowNum = results.getReturnedSize() - sr.size() + 1;
-			if (gfsh.isShowResults()) {
-				int rowsPrinted = PrintUtil.printSelectResults(sr, 0, startRowNum, sr.size());
-				gfsh.println("Fetch size: " + gfsh.getFetchSize() + ", Limit: " + limit);
-				gfsh.println("   Results: " + sr.size()
-						+ ", Returned: " + results.getReturnedSize() + "/" + results.getActualSize());
-				next n = (next)gfsh.getCommand("next");
-				n.setCommand(getClass().getSimpleName());
-			} else {
-				gfsh.println("Fetch size: " + gfsh.getFetchSize() + ", Limit: " + limit);
-				gfsh.println("   Results: " + sr.size() + 
-						", Returned: " + results.getReturnedSize() + "/" + results.getActualSize());
-			}
-		} else {
-			gfsh.println("Results: " + obj);
-		}
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-		return list;
-	}
-	
-	public List next(Object userData) throws Exception
-	{
-		select(null, true);
-		return null;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/show.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/show.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/show.java
deleted file mode 100644
index acea0de..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/show.java
+++ /dev/null
@@ -1,240 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.Map;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ReflectionUtil;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-public class show implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public show(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("show [-p [true|false]]");
-		gfsh.println("     [-t [true|false]]");
-		gfsh.println("     [-c|-k|-v]");
-		gfsh.println("     [-table [true|false]");
-		gfsh.println("     [-type [true|false]");
-		gfsh.println("     [-col <collection entry print count>]");
-		gfsh.println();
-		gfsh.println("     [-?]");
-		gfsh.println("     Show or toggle settings.");
-		gfsh.println("     <no option> Show all current settings.");
-		
-		gfsh.println("     -p Toggle print. If enabled, results are printed to stdout.");
-		gfsh.println("     -t Toggle the time taken to execute each command.");
-		gfsh.println("     -c Show configuration");
-		gfsh.println("     -k Show key class fields. Use the 'key' command to set key class.");
-		gfsh.println("     -v Show value class fields. Use the 'value' command to set value class.");
-		gfsh.println("     -table Set the print format to the tabular or catalog form. The");
-		gfsh.println("         tabular form prints in a table with a column header. The catalog");
-		gfsh.println("         form prints in each row in a data structure form.");
-		gfsh.println("     -type Enable or disable printing the data type. This option is");
-		gfsh.println("         valid only for the '-table false' option.");
-		gfsh.println("     -col <collection entry print count> In the catalog mode, gfsh");
-		gfsh.println("         prints the contents of Map and Collection objects. By default, it");
-		gfsh.println("         prints 5 entries per object. Use this option to change the count.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("show -?")) {
-			help();
-		} else if (command.startsWith("show -table")) {
-			show_table(command);
-		} else if (command.startsWith("show -type")) {
-			show_type(command);
-		} else if (command.startsWith("show -col")) {
-			show_count(command);
-		} else if (command.startsWith("show -p")) {
-			show_p(command);
-		} else if (command.startsWith("show -t")) {
-			show_t(command);
-		} else if (command.startsWith("show -c")) {
-			show_c();
-		} else if (command.startsWith("show -k")) {
-			show_k();
-		} else if (command.startsWith("show -v")) {
-			show_v();
-		} else {
-			show();
-		}
-	}
-	
-	private void show_table(String command) throws Exception
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() >= 3) {
-			boolean enable = list.get(2).equalsIgnoreCase("true");
-			gfsh.setTableFormat(enable);
-		} else {
-			gfsh.setTableFormat(!gfsh.isTableFormat());
-		}
-		gfsh.println("show -table is " + (gfsh.isTableFormat() ? "true" : "false"));
-		
-	}
-	
-	private void show_type(String command) throws Exception
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() >= 3) {
-			boolean enable = list.get(2).equalsIgnoreCase("true");
-			gfsh.setPrintType(enable);
-		} else {
-			gfsh.setPrintType(!gfsh.isPrintType());
-		}
-		gfsh.println("show -type is " + (gfsh.isPrintType() ? "true" : "false"));
-		
-	}
-
-	private void show_count(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 3) {
-			gfsh.println("Error: must specify <collection entry print count>. Current count is " + gfsh.getCollectionEntryPrintCount());
-			return;
-		}
-		try {
-			int count = Integer.parseInt((String)list.get(2));
-			gfsh.setCollectionEntryPrintCount(count);
-		} catch (Exception ex) {
-			gfsh.println("Error: " + ex.getClass().getSimpleName() + " - " + ex.getMessage());
-		}
-	}
-	
-	public void show_p(String command)
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() >= 3) {
-			boolean enable = list.get(2).equalsIgnoreCase("true");
-			gfsh.setShowResults(enable);
-		} else {
-			gfsh.setShowResults(!gfsh.isShowResults());
-		}
-		gfsh.println("show -p is " + (gfsh.isShowResults() ? "true" : "false"));
-	}
-
-	private void show_t(String command) throws Exception
-	{
-		ArrayList<String> list = new ArrayList();
-		gfsh.parseCommand(command, list);
-		if (list.size() >= 3) {
-			boolean enable = list.get(2).equalsIgnoreCase("true");
-			gfsh.setShowResults(enable);
-		} else {
-			gfsh.setShowTime(!gfsh.isShowTime());
-		}
-		gfsh.println("show -t is " + (gfsh.isShowTime() ? "true" : "false"));
-	}
-	
-	@SuppressFBWarnings(value="NM_METHOD_CONSTRUCTOR_CONFUSION",justification="This is method and not constructor")
-	public void show()
-	{
-		show_c();
-		gfsh.println();
-		show_k();
-		gfsh.println();
-		show_v();
-	}
-	
-	public void show_c()
-	{
-		db dbCommand = (db)gfsh.getCommand("db");
-//		String dbInit = dbCommand.getDbInitCommand();
-		
-		gfsh.println("     connected = " + gfsh.isConnected());
-		if (dbCommand/*dbInit*/ != null) {
-			gfsh.println("            db = " + /*dbInit*/dbCommand.getDbInitCommand());	
-		}
-		gfsh.println("          echo = " + gfsh.isEcho());
-		if (gfsh.getEndpoints() == null && gfsh.getEndpoints() == null) {
-			gfsh.println("      locators = null");
-			gfsh.println("       servers = null");
-		} else {
-			if (gfsh.isLocator()) {
-				gfsh.println("      locators = " + gfsh.getEndpoints());
-				if (gfsh.getServerGroup() == null) {
-					gfsh.println("  server group = <undefined>");
-				} else {
-					gfsh.println("  server group = " + gfsh.getServerGroup());
-				}
-			} else {
-				gfsh.println("       servers = " + gfsh.getEndpoints());
-			}
-			gfsh.println("  read timeout = " + gfsh.getReadTimeout());
-		}
-		
-		gfsh.println("  select limit = " + gfsh.getSelectLimit());
-		gfsh.println("         fetch = " + gfsh.getFetchSize());
-		gfsh.println("           key = " + gfsh.getQueryKeyClassName());
-		gfsh.println("         value = " + gfsh.getValueClassName());
-		gfsh.println("       show -p = " + gfsh.isShowResults());
-		gfsh.println("       show -t = " + gfsh.isShowTime());
-		gfsh.println("   show -table = " + gfsh.isTableFormat());
-		gfsh.println("    show -type = " + gfsh.isPrintType());
-		gfsh.println("     show -col = " + gfsh.getCollectionEntryPrintCount());
-		gfsh.println("  zone (hours) = " + gfsh.getZoneDifference() / (60 * 60 * 1000));
-//		gfsh.println("command region = " + gfsh.getCommandRegionPath());
-	}
-	
-	public void show_k()
-	{
-		printClassSetters(gfsh.getQueryKeyClass(), "key");
-	}
-	
-	public void show_v()
-	{
-		printClassSetters(gfsh.getValueClass(), "value");
-	}
-	
-	private void printClassSetters(Class cls, String header)
-	{
-		if (cls == null) {
-			gfsh.println(header + " class: undefined");
-		} else {
-			gfsh.println(header + " class " + cls.getName());
-			gfsh.println("{");
-			try {
-				Map<String, Method> setterMap = ReflectionUtil.getAllSettersMap(cls);
-				ArrayList list = new ArrayList(setterMap.keySet());
-				Collections.sort(list);
-				for (Object object : list) {
-					Method method = setterMap.get(object);
-					if (isSupportedMethod(method)) {
-						gfsh.println("    " + method.getName().substring(3) + "::"
-								+ method.getParameterTypes()[0].getCanonicalName());
-//						gfsh.println("    " + method.getParameterTypes()[0].getCanonicalName() + " " + method.getName().substring(3));
-					}
-				}
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-			gfsh.println("}");
-		}
-	}
-	
-	
-	private boolean isSupportedMethod(Method method)
-	{
-		return true;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/size.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/size.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/size.java
deleted file mode 100644
index 21f7c49..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/size.java
+++ /dev/null
@@ -1,281 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.functions.util.LocalRegionInfoFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionSizeTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.StringUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-public class size implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public size(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("size [-m|-s] | [-?] <region path>");
-		gfsh.println("     Display the local and server region sizes. If no option");
-		gfsh.println("     is provided then it displays the local region size");
-		gfsh.println("     -m List all server member region sizes.");
-		gfsh.println("     -s Display the region size of the connected server.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("size -?")) {
-			help();
-		} else if (command.startsWith("size -m")) {
-			size_m(command);
-		} else if (command.startsWith("size -s")) {
-			size_s(command);
-		} else {
-			size(command);
-		}
-	}
-	
-	// local region size
-	private void size(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath;
-		if (list.size() == 1) {
-			regionPath = gfsh.getCurrentPath();
-		} else if (list.size() == 2) {
-			regionPath = (String)list.get(1);
-		} else {
-			regionPath = (String)list.get(2);
-		}
-	
-		regionPath = regionPath.trim();
-		if (regionPath.equals("/")) {
-			gfsh.println("Error: Invalid path. Root path not allowed.");
-			return;
-		}
-		
-		regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-		
-		gfsh.println("            Region: " + regionPath);
-		
-		// Local region
-		Cache cache = gfsh.getCache();
-		Region region = cache.getRegion(regionPath);
-		if (region == null) {
-			gfsh.println("Error: region undefine - " + regionPath);
-		} else {
-			gfsh.println(" Local region size: " + region.size());
-		}
-	}
-	
-	private void size_m(String command) throws Exception
-	{
-		if (gfsh.getAggregateRegionPath() == null) {
-			gfsh.println("Error: The aggregate region path is not specified. Use the command ");
-			gfsh.println("'connect -a <region path>' to specify any existing partitioned region path in the server.");
-			return;
-		}
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath;
-		if (list.size() == 2) {
-			regionPath = gfsh.getCurrentPath();
-		} else {
-			regionPath = (String) list.get(2);
-		}
-		
-		regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-		
-		if (regionPath.equals("/")) {
-			gfsh.println("Error: invalid region \"/\". Change to a valid region or specify the region path, i.e. size -a /foo");
-			return;
-		}
-
-		long startTime = System.currentTimeMillis();
-		List<MapMessage> resultList = (List<MapMessage>)gfsh.getAggregator().aggregate(new LocalRegionInfoFunction(regionPath), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-		
-		String memberIdHeader = "Member Id";
-		String memberNameHeader = "Member Name";
-		String regionSizeHeader = "Region Size";
-		
-		
-		// Find the max string sizes
-		int memberIdMax = memberIdHeader.length();
-		int memberNameMax = memberNameHeader.length();
-		int regionSizeMax = regionSizeHeader.length();
-		boolean isPR = false;
-		boolean isPeerClient = false;
-		String returnedRegionPath = null;
-		HashMap<String, Mappable> infoMap = new HashMap<String, Mappable>();
-		for (int i = 0; i < resultList.size(); i++) {
-			Mappable info = resultList.get(i);
-			try {
-				if (info.getByte("Code") == AggregateResults.CODE_ERROR) {
-					gfsh.println("Error: " + info.getString("CodeMessage"));
-					return;
-				}
-			} catch (Exception ex) {
-				// ignore
-			}
-
-			isPR = info.getBoolean("IsPR");
-			if (isPR) {
-				try {
-					isPeerClient = info.getBoolean("IsPeerClient");
-				} catch (Exception ex) {
-					continue;
-				}
-				if (isPeerClient) {
-					continue;
-				}
-			}
-			
-			returnedRegionPath = info.getString("RegionPath");
-			String memberId = info.getString("MemberId");
-			if (memberIdMax < memberId.length()) {
-				memberIdMax = memberId.length();
-			}
-			String memberName = info.getString("MemberName");
-			if (memberName != null && memberNameMax < memberName.length()) {
-				memberNameMax = memberName.length();
-			}
-			String val = Integer.toString(info.getInt("RegionSize"));
-			if (regionSizeMax < val.length()) {
-				regionSizeMax = val.length();
-			}
-			infoMap.put(info.getString("MemberId"), info);
-		}
-		
-		ArrayList keyList = new ArrayList(infoMap.keySet());
-		Collections.sort(keyList);
-		
-		
-		// display
-		gfsh.println("     Region: " + returnedRegionPath);
-		if (isPR) {
-			gfsh.println("Region Type: Partitioned");
-		} else {
-			gfsh.println("Region Type: Replicated");
-		}
-		gfsh.print(StringUtil.getRightPaddedString(memberIdHeader, memberIdMax, ' '));
-		gfsh.print("  ");
-		gfsh.print(StringUtil.getRightPaddedString(memberNameHeader, memberNameMax, ' '));
-		gfsh.print("  ");
-		gfsh.println(regionSizeHeader);
-		gfsh.print(StringUtil.getRightPaddedString("---------", memberIdMax, ' '));
-		gfsh.print("  ");
-		gfsh.print(StringUtil.getRightPaddedString("-----------", memberNameMax, ' '));
-		gfsh.print("  ");
-		gfsh.println(StringUtil.getRightPaddedString("-----------", regionSizeMax, ' '));
-		
-		int totalRegionSize = 0;
-		for (int i = 0; i < keyList.size(); i++) {
-			Mappable info = infoMap.get(keyList.get(i));
-			try {
-				if (info.getByte("Code") == AggregateResults.CODE_ERROR) {
-					gfsh.println("Error: " + info.getString("CodeMessage"));
-					return;
-				}
-			} catch (Exception ex) {
-				// ignore
-			}
-			isPR = info.getBoolean("IsPR");
-			gfsh.print(StringUtil.getRightPaddedString(info.getString("MemberId"), memberIdMax, ' '));
-			gfsh.print("  ");
-			gfsh.print(StringUtil.getRightPaddedString(info.getString("MemberName"), memberNameMax, ' '));
-			gfsh.print("  ");
-			gfsh.println(StringUtil.getLeftPaddedString(Integer.toString(info.getInt("RegionSize")), regionSizeMax, ' '));
-			totalRegionSize += info.getInt("RegionSize");
-		}
-		
-		gfsh.println();
-		if (isPR) {
-			gfsh.print(StringUtil.getLeftPaddedString("Total: ", 
-					memberIdMax + memberNameMax + 2*2, ' '));
-			gfsh.println(StringUtil.getLeftPaddedString(Integer.toString(totalRegionSize), regionSizeMax, ' '));
-		}
-		gfsh.println();
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-	
-	private void size_s(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		String regionPath;
-		if (list.size() == 2) {
-			regionPath = gfsh.getCurrentPath();
-		} else {
-			regionPath = (String) list.get(2);
-		}
-		regionPath = regionPath.trim();
-		if (regionPath.equals("/")) {
-			gfsh.println("Error: Invalid path. Root path not allowed.");
-			return;
-		}
-		
-		regionPath = gfsh.getFullPath(regionPath, gfsh.getCurrentPath());
-		
-		gfsh.println("            Region: " + regionPath);
-		
-		// Local region
-		Cache cache = gfsh.getCache();
-		Region region = cache.getRegion(regionPath);
-		if (region == null) {
-			gfsh.println("Error: region undefine - " + regionPath);
-		} else {
-			gfsh.println(" Local region size: " + region.size());
-		}
-		
-		// Server region
-		CommandResults results = gfsh.getCommandClient().execute(new RegionSizeTask(regionPath));
-		Object obj = results.getDataObject();
-		if (obj == null) {
-			gfsh.println("Error: Unable to get size from the server - " + results.getCodeMessage());
-		} else {
-			ArrayList sizeList = new ArrayList(2);
-			sizeList.add(results.getDataObject());
-			PrintUtil.printMappableList(sizeList);
-		}
-	}
-	
-	
-//	private void size(String command) throws Exception
-//	{
-//		LinkedList list = new LinkedList();
-//		gfsh.parseCommand(command, list);
-//
-//		if (list.size() < 2) {
-//			gfsh.println("Error: size requires <query predicate>");
-//		} else {
-//			Object queryKey = gfsh.getQueryKey(list);
-//			if (queryKey == null) {
-//				return;
-//			}
-//			int size = gfsh.getLookupService().size(gfsh.getQueryRegionPath(), queryKey);
-//			gfsh.println("Size: " + size);
-//		}
-//
-//	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/value.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/value.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/value.java
deleted file mode 100644
index a689051..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/value.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-public class value implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public value(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("value [-?] <class name>");
-		gfsh.println("     Set the value class to be used for the 'put' command.");
-		gfsh.println("     Use the 'key' command to set the key class name.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("value -?")) {
-			help();
-		} else {
-			value(command);
-		}
-	}
-	
-	private void value(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			gfsh.println("value = " + gfsh.getValueClassName());
-			gfsh.println("   Use value <class name> to set the value class");
-		} else {
-			if (list.size() > 1) {
-				gfsh.setValueClass((String) list.get(1));
-			}
-		}
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/which.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/which.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/which.java
deleted file mode 100644
index 8d3ac52..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/which.java
+++ /dev/null
@@ -1,189 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.Aggregator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-
-public class which implements CommandExecutable
-{
-	private Gfsh gfsh;
-
-	public which(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-
-	public void help()
-	{
-		gfsh.println("which [-p <region path>] [-r] <query predicate> | -k <number> | [-?]");
-		gfsh.println("     Show the members and regions that have the specified key.");
-		gfsh.println("     -p <region path> The region path in which to find the specified key.");
-		gfsh.println("     -r Search recursively. It search all of the subregions including");
-		gfsh.println("        the specified region or the current region if not specified.");
-		gfsh.println("     -k <number>   Use an enumerated key. Use 'ls -k' to get the list");
-		gfsh.println("            of enumerated keys. Only one key number is supported.");
-		gfsh.println("     <query predicate>: field=val1 and field2='val1' \\");
-		gfsh.println("                        and field3=to_date('<date>', '<format>'");
-		gfsh.println("     Data formats: primitives, String, and java.util.Date");
-		gfsh.println("         <decimal>b|B - Byte      (e.g., 1b)");
-		gfsh.println("         <decimal>c|C - Character (e.g., 1c)");
-		gfsh.println("         <decimal>s|S - Short     (e.g., 12s)");
-		gfsh.println("         <decimal>i|I - Integer   (e.g., 15 or 15i)");
-		gfsh.println("         <decimal>l|L - Long      (e.g., 20l");
-		gfsh.println("         <decimal>f|F - Float     (e.g., 15.5 or 15.5f)");
-		gfsh.println("         <decimal>d|D - Double    (e.g., 20.0d)");
-		gfsh.println("         '<string with \\ delimiter>' (e.g., '\\'Wow!\\'!' Hello, world')");
-		gfsh.println("         to_date('<date string>', '<simple date format>'");
-		gfsh.println("                       (e.g., to_date('04/10/2009', 'MM/dd/yyyy')");
-		gfsh.println("Examples: ");
-		gfsh.println("      which 'string'  -- string key");
-		gfsh.println("      which 10f  -- float key");
-		gfsh.println("      which -k 1");
-		gfsh.println("      which -p /foo/yong -r x=10.0 and y=1 and date=to_date('04/10/2009', 'MM/dd/yyyy')");
-		gfsh.println();
-	}
-
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("which -?")) {
-			help();
-		} else {
-			which(command);
-		}
-	}
-
-	private Object getKeyFromInput(List list, int index) throws Exception
-	{
-		String input = (String) list.get(index);
-		Object key = null;
-		if (input.startsWith("'")) {
-			int lastIndex = -1;
-			if (input.endsWith("'") == false) {
-				lastIndex = input.length();
-			} else {
-				lastIndex = input.lastIndexOf("'");
-			}
-			if (lastIndex <= 1) {
-				gfsh.println("Error: Invalid key. Empty string not allowed.");
-				return null;
-			}
-			key = input.substring(1, lastIndex); // lastIndex exclusive
-		} else {
-			key = gfsh.getQueryKey(list, index);
-		}
-		return key;
-	}
-
-	private void which(String command) throws Exception
-	{
-		LinkedList<String> list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			gfsh.println("Error: 'which' requires a query predicate or key number");
-			return;
-		}
-
-		String regionPath = gfsh.getCurrentPath();
-		boolean recursive = false;
-		Object key = null;
-		for (int i = 1; i < list.size(); i++) {
-			String token = list.get(i);
-			if (token.equals("-p")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-p' requires region path");
-					return;
-				}
-				regionPath = list.get(++i);
-			} else if (token.equals("-r")) {
-				recursive = true;
-			} else if (token.equals("-k")) {
-				if (i + 1 >= list.size()) {
-					gfsh.println("Error: '-k' requires key number");
-					return;
-				}
-				int keyNum = Integer.parseInt((String) list.get(++i));
-				key = gfsh.getKeyFromKeyList(keyNum);
-				break;
-			} else {
-				int inputIndex = i;
-				key = getKeyFromInput(list, inputIndex);
-				break;
-			}
-		}
-
-		if (key == null) {
-			gfsh.println("Error: Key is not defined.");
-			return;
-		}
-		executeWhich(regionPath, key, recursive);
-	}
-
-	private void executeWhich(String regionPath, Object key, boolean recursive) throws Exception
-	{
-		String currentPath = gfsh.getCurrentPath();
-		String fullPath = gfsh.getFullPath(regionPath, currentPath);
-
-		Aggregator aggregator = gfsh.getAggregator();
-		long startTime = System.currentTimeMillis();
-		List<AggregateResults> results = (List<AggregateResults>) gfsh.getAggregator().aggregate(
-				new GfshFunction("which", fullPath, new Object[] { key, recursive }), gfsh.getAggregateRegionPath());
-		long stopTime = System.currentTimeMillis();
-
-		int i = 0;
-		for (AggregateResults aggregateResults : results) {
-			GfshData data = (GfshData) aggregateResults.getDataObject();
-			if (aggregateResults.getCode() == AggregateResults.CODE_ERROR) {
-				gfsh.println("Error: " + aggregateResults.getCodeMessage());
-				if (gfsh.isDebug() && aggregateResults.getException() != null) {
-					aggregateResults.getException().printStackTrace();
-				}
-				break;
-			}
-			Object value = data.getDataObject();
-			if (value != null) {
-				MemberInfo memberInfo = data.getMemberInfo();
-				Map map = (Map) value;
-				Set<Map.Entry> entrySet = map.entrySet();
-				if (map != null && map.size() > 0) {
-					i++;
-					gfsh.print(i + ". " + memberInfo.getMemberName() + " (" + memberInfo.getMemberId() + ")");
-					Object obj = data.getUserData();
-					if (obj != null) {
-						if (obj instanceof Map) {
-							Map infoMap = (Map)obj;
-							boolean isPrimary = (Boolean)infoMap.get("IsPrimary");
-							int bucketId = (Integer)infoMap.get("BucketId");
-							if (isPrimary) {
-								gfsh.println(" -- BucketId=" + bucketId + " *Primary PR*");
-							} else {
-								gfsh.println(" -- BucketId=" + bucketId);
-							}
-						}
-					} else {
-						gfsh.println();
-					}
-					PrintUtil.printEntries(map, map.size(), null, "Region", "Value", false, gfsh.isShowResults());
-					gfsh.println();
-				}
-			}
-		}
-		if (i == 0) {
-			gfsh.println("Key is not found.");
-		}
-		gfsh.println();
-		if (gfsh.isShowTime()) {
-			gfsh.println("elapsed (msec): " + (stopTime - startTime));
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/zone.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/zone.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/zone.java
deleted file mode 100644
index 4fb2c00..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/commands/zone.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.commands;
-
-import java.util.LinkedList;
-
-import com.gemstone.gemfire.internal.tools.gfsh.app.CommandExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.Gfsh;
-
-public class zone implements CommandExecutable
-{
-	private Gfsh gfsh;
-	
-	public zone(Gfsh gfsh)
-	{
-		this.gfsh = gfsh;
-	}
-	
-	public void help()
-	{
-		gfsh.println("zone [-?] <hours>");
-		gfsh.println("     Set the zone difference. This value is added to all time-related data.");
-		gfsh.println("     For example, set this value to -3 if the data in the cache is");
-		gfsh.println("     timestamped in EST and you are running this program in PST.");
-		gfsh.println();
-	}
-	
-	public void execute(String command) throws Exception
-	{
-		if (command.startsWith("zone -?")) {
-			help();
-		} else {
-			zone(command);
-		}
-	}
-	
-	// zone hours
-	// zone -3
-	private void zone(String command) throws Exception
-	{
-		LinkedList list = new LinkedList();
-		gfsh.parseCommand(command, list);
-		if (list.size() < 2) {
-			gfsh.println("zone = " + gfsh.getZoneDifference() / (60 * 60 * 1000));
-			gfsh.println("   Use zone <hours> to change the zone hour difference");
-		} else {
-			int hours = Integer.parseInt((String) list.get(1));
-			gfsh.setZoneDifference(hours * 60 * 60 * 1000L);//FindBugs - integer multiplication cast to long
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/GfshData.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/GfshData.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/GfshData.java
deleted file mode 100644
index 1d8c631..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/GfshData.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-
-public class GfshData implements DataSerializable
-{
-	private static final long serialVersionUID = 1L;
-	
-	private MemberInfo memberInfo;
-	private Object dataObject;
-	private Object userData;
-	
-	public GfshData() {}
-	
-	public GfshData(Object dataObject)
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		memberInfo = new MemberInfo();
-		DistributedMember member = cache.getDistributedSystem().getDistributedMember();
-		memberInfo.setHost(member.getHost());
-		memberInfo.setMemberId(member.getId());
-		memberInfo.setMemberName(cache.getName());
-		memberInfo.setPid(member.getProcessId());
-		
-		this.dataObject = dataObject;
-	}
-	
-	public GfshData(MemberInfo memberInfo, Object dataObject)
-	{
-		this.memberInfo = memberInfo;
-		this.dataObject = dataObject;
-	}
-
-	public MemberInfo getMemberInfo()
-	{
-		return memberInfo;
-	}
-
-	public void setMemberInfo(MemberInfo memberInfo)
-	{
-		this.memberInfo = memberInfo;
-	}
-
-	public Object getDataObject()
-	{
-		return dataObject;
-	}
-
-	public void setDataObject(Object dataObject)
-	{
-		this.dataObject = dataObject;
-	}
-	
-	public Object getUserData()
-	{
-		return userData;
-	}
-
-	public void setUserData(Object userData)
-	{
-		this.userData = userData;
-	}
-
-	public void fromData(DataInput in) throws IOException, ClassNotFoundException
-	{
-		memberInfo = (MemberInfo)DataSerializer.readObject(in);
-		dataObject = DataSerializer.readObject(in);
-		userData = DataSerializer.readObject(in);
-	}
-
-	public void toData(DataOutput out) throws IOException
-	{
-		DataSerializer.writeObject(memberInfo, out);
-		DataSerializer.writeObject(dataObject, out);
-		DataSerializer.writeObject(userData, out);
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/GfshFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/GfshFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/GfshFunction.java
deleted file mode 100644
index 65c7964..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/GfshFunction.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-
-public class GfshFunction implements AggregateFunction, DataSerializable
-{	
-	private static final long serialVersionUID = 1L;
-
-	private String command; 
-	private String regionPath;
-	private Object arg;
-	
-	public GfshFunction()
-	{
-	}
-	
-	public GfshFunction(String command, String regionPath, Object arg)
-	{
-		this.command = command;
-		this.regionPath = regionPath;
-		this.arg = arg;
-	}
-
-	public String getCommand()
-	{
-		return command;
-	}
-
-	public void setCommand(String command)
-	{
-		this.command = command;
-	}
-
-	public Object getArg()
-	{
-		return arg;
-	}
-
-	public void setArg(Object arg)
-	{
-		this.arg = arg;
-	}
-
-	public String getRegionPath() 
-	{
-		return regionPath;
-	}
-
-	public void setRegionPath(String regionPath) 
-	{
-		this.regionPath = regionPath;
-	}
-	
-	public AggregateResults run(FunctionContext context) 
-	{
-		AggregateResults results = new AggregateResults();
-		try {
-			String split[] = command.split(" ");
-			String className = split[0].trim();
-			Class clas = Class.forName("com.gemstone.gemfire.internal.tools.gfsh.app.function.command." + className);
-			ServerExecutable se = (ServerExecutable)clas.newInstance();
-			Object obj = se.execute(command, regionPath, arg);
-			results.setDataObject(obj);
-			results.setCode(se.getCode());
-			results.setCodeMessage(se.getCodeMessage());
-		} catch (Exception ex) {
-			results.setCode(AggregateResults.CODE_ERROR);
-			results.setCodeMessage(getCauseMessage(ex));
-			results.setException(ex);
-		}
-		return results;
-	}
-	
-	private String getCauseMessage(Throwable ex)
-	{
-		Throwable cause = ex.getCause();
-		String causeMessage = null;
-		if (cause != null) {
-			causeMessage = getCauseMessage(cause);
-		} else {
-			causeMessage = ex.getClass().getSimpleName();
-			causeMessage += " -- " + ex.getMessage();
-		}
-		return causeMessage;
-	}
-
-	/**
-	 * Returns a java.util.List of LocalRegionInfo objects;
-	 */
-	public synchronized Object aggregate(List list)
-	{
-		// 5.7: each bucket returns results. Discard all but one that is success
-		MemberInfo info;
-		HashMap map = new HashMap();
-		for (int i = 0; i < list.size(); i++) {
-			AggregateResults results = (AggregateResults)list.get(i);
-			GfshData data = (GfshData)results.getDataObject();
-			if (data == null) {
-				data = new GfshData(null);
-			}
-			info = data.getMemberInfo();
-			AggregateResults mapResults = (AggregateResults)map.get(info.getMemberId());
-			if (mapResults == null) {
-				map.put(info.getMemberId(), results);
-			} else if (mapResults.getCode() != AggregateResults.CODE_NORMAL) {
-				map.put(info.getMemberId(), results);
-			}
-		}
-		
-		return new ArrayList(map.values());
-	}
-	
-	public synchronized Object aggregateDistributedSystems(Object[] results)
-	{
-		ArrayList list = new ArrayList();
-		for (int i = 0; i < results.length; i++) {
-			list.add(results[i]);
-		}
-		return list;
-	}
-	
-	public void fromData(DataInput input) throws IOException, ClassNotFoundException 
-	{
-		command = DataSerializer.readString(input);
-		regionPath = DataSerializer.readString(input);
-		arg = DataSerializer.readObject(input);
-	}
-
-	public void toData(DataOutput output) throws IOException 
-	{
-		DataSerializer.writeString(command, output);
-		DataSerializer.writeString(regionPath, output);
-		DataSerializer.writeObject(arg, output);
-	}
-	
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/clear.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/clear.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/clear.java
deleted file mode 100644
index 24a5c36..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/clear.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import java.util.Iterator;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.LocalDataSet;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.ProxyBucketRegion;
-import com.gemstone.gemfire.internal.cache.partitioned.Bucket;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-
-public class clear implements ServerExecutable
-{
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-	
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		Region region = cache.getRegion(regionPath);
-		
-		if (region == null) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = "Undefined region: " + regionPath;
-			return null;
-		}
-		
-		MapMessage message = new MapMessage();
-		
-		if (region instanceof PartitionedRegion) {
-			PartitionedRegion pr = (PartitionedRegion)region;
-			if (pr.getDataStore() == null) {
-				code = AggregateResults.CODE_NORMAL;
-				codeMessage = "No data store: " + regionPath;
-				message.put("IsPeerClient", true);
-				return new GfshData(message);
-			}
-		}
-
-		message.put("IsPeerClient", false);
-		try {
-			synchronized (region) {
-				if (region instanceof PartitionedRegion) {
-					// PR clear is not supported. Must clear the local data set
-					// individually.
-					clearPartitionedRegion((PartitionedRegion)region);
-				} else {
-					region.clear();
-				}
-				codeMessage = "Cleared";
-			}
-		} catch (Exception ex) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = ex.getMessage();
-		}
-		return new GfshData(message);
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-	
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-	
-	private void clearPartitionedRegion(PartitionedRegion partitionedRegion)
-	{
-		LocalDataSet lds = (LocalDataSet)PartitionRegionHelper.getLocalPrimaryData(partitionedRegion);
-		Set<Integer>set = lds.getBucketSet(); // this returns bucket ids in the function context 
-		for (Integer bucketId : set) {
-			Bucket bucket = partitionedRegion.getRegionAdvisor().getBucket(bucketId);
-			if (bucket instanceof ProxyBucketRegion == false) {
-				if (bucket instanceof BucketRegion) {
-					BucketRegion bucketRegion = (BucketRegion) bucket;
-					Set keySet = bucketRegion.keySet();
-					for (Iterator iterator = keySet.iterator(); iterator.hasNext();) {
-						Object key = iterator.next();
-						bucketRegion.remove(key);
-					}
-				}
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/deploy.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/deploy.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/deploy.java
deleted file mode 100644
index 1935815..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/deploy.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.lang.reflect.Method;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ClassFinder;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.SystemClassPathManager;
-import com.gemstone.gemfire.internal.tools.gfsh.app.pogo.KeyType;
-import com.gemstone.gemfire.internal.tools.gfsh.app.pogo.KeyTypeManager;
-
-public class deploy implements ServerExecutable
-{
-	private final static String ENV_GEMFIRE_HOME = "GEMFIRE";
-	
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-	private final static SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyyMMddHHmm");
-	
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		GfshData data = new GfshData(null);
-		
-		Cache cache = CacheFactory.getAnyInstance();
-		
-		Object[] args = (Object[])arg;
-		
-		String operationType = (String)args[0];
-		if (operationType.equals("-jar")) {
-			String jarNames[] = (String[])args[1];
-			byte byteBuffers[][] = (byte[][])args[2];
-			try {
-				String home = System.getenv(ENV_GEMFIRE_HOME);
-				String classDir = home + "/gfsh/plugins";
-				File classDirFile = new File(classDir);
-				classDirFile.mkdirs();
-		
-				// Store the jar files
-				String datedFilePaths[] = new String[jarNames.length];
-				for (int i = 0; i < byteBuffers.length; i++) {
-					String filePath = classDir + "/" + getDatedJarName(jarNames[i]);
-					datedFilePaths[i] = filePath;
-					File file = new File(filePath);
-					FileOutputStream fos = new FileOutputStream(file);
-					fos.write(byteBuffers[i]);
-					fos.close();
-				}
-				
-				// Add the jars to the class path
-				for (int i = 0; i < datedFilePaths.length; i++) {
-					File file = new File(datedFilePaths[i]);
-					SystemClassPathManager.addFile(file);
-				}
-				
-				// Register KeyTypes
-				for (int i = 0; i < datedFilePaths.length; i++) {
-					Class[] classes = ClassFinder.getAllClasses(datedFilePaths[i]);
-					for (int j = 0; j < classes.length; j++) {
-						Class<?> cls = classes[j];
-						if (KeyType.class.isAssignableFrom(cls) && 
-							cls.getSimpleName().matches(".*_v\\d++$")) 
-						{
-							Method method = cls.getMethod("getKeyType", (Class[])null);
-							KeyType fieldType = (KeyType)method.invoke(cls, (Object[])null);
-							KeyTypeManager.registerSingleKeyType(fieldType);
-						}
-					}
-				}
-				
-				codeMessage = "deployed to " + classDirFile.getAbsolutePath();
-			} catch (Exception ex) {
-				while (ex.getCause() != null) {
-					ex = (Exception)ex.getCause();
-				}
-				codeMessage = ex.getMessage();
-				if (codeMessage != null) 
-					codeMessage = codeMessage.trim();
-				if (codeMessage == null || codeMessage.length() == 0) {
-					codeMessage = ex.getClass().getSimpleName();
-				}
-			}
-			
-			data.setDataObject(codeMessage);
-		}
-		
-		return data;
-	}
-	
-	private static String getDatedJarName(String jarName)
-	{
-		String nameNoExtension = jarName.substring(0, jarName.lastIndexOf(".jar"));
-		return nameNoExtension + ".v" + dateFormatter.format(new Date()) + ".jar";
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-	
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/gc.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/gc.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/gc.java
deleted file mode 100644
index e59568b..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/gc.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-public class gc implements ServerExecutable
-{
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-	
-	
-	@SuppressFBWarnings(value="DM_GC",justification="This is the desired functionality")
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		String memberId = (String)arg;
-		
-		if (memberId != null) {
-			Cache cache = CacheFactory.getAnyInstance();
-			String thisMemberId = cache.getDistributedSystem().getDistributedMember().getId();
-			if (memberId.equals(thisMemberId) == false) {
-				return new GfshData(null);
-			}
-		}
-		
-		try {
-			Runtime.getRuntime().gc(); //FindBugs - extremely dubious except in benchmarking code
-		} catch (Exception ex) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = ex.getMessage();
-		}
-		
-		return new GfshData(null);
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-	
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/index.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/index.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/index.java
deleted file mode 100644
index 5614df0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/index.java
+++ /dev/null
@@ -1,199 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexStatistics;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-
-public class index implements ServerExecutable
-{
-	public static enum DeleteType {
-		DELETE_INDEX,
-		DELETE_REGION_INDEXES,
-		DELETE_ALL_INDEXES
-	}
-	
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-	
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		GfshData data = new GfshData(null);
-		
-		Cache cache = CacheFactory.getAnyInstance();
-		
-		Region region = null;
-		if (regionPath != null) {
-			region = cache.getRegion(regionPath);
-		}
-		
-		String thisMemberId = cache.getDistributedSystem().getDistributedMember().getId();
-		QueryService qs = cache.getQueryService();
-		
-		Object[] args = (Object[])arg;
-		String memberId = null;
-		String indexName = null;
-		IndexType indexType;
-		boolean isFunctional;
-		String indexExpression;
-		String fromClause;
-		String imports;
-		
-		String operationType = (String)args[0];
-		if (operationType.equals("-create")) {
-			
-			memberId = (String)args[1];
-			if (memberId != null && memberId.equals(thisMemberId) == false) {
-				return data;
-			}
-			
-			indexName = (String)args[2];
-			isFunctional = (Boolean)args[3];
-			if (isFunctional) {
-				indexType = IndexType.FUNCTIONAL;
-			} else {
-				indexType = IndexType.PRIMARY_KEY;
-			}
-			indexExpression = (String)args[4];
-			fromClause = (String)args[5];
-			imports = (String)args[6];
-			
-			try {
-				Index index = qs.createIndex(indexName, indexType, indexExpression, fromClause, imports);
-				codeMessage = "index created: " + indexName;
-			} catch (Exception ex) {
-				while (ex.getCause() != null) {
-					ex = (Exception)ex.getCause();
-				}
-				codeMessage = ex.getMessage();
-				if (codeMessage != null) 
-					codeMessage = codeMessage.trim();
-				if (codeMessage == null || codeMessage.length() == 0) {
-					codeMessage = ex.getClass().getSimpleName();
-				}
-			}
-			
-			data.setDataObject(codeMessage);
-			
-		} else if (operationType.equals("-delete")) {
-			
-			DeleteType deleteType = (DeleteType)args[1];
-			
-			memberId = (String)args[2];
-			if (memberId != null && memberId.equals(thisMemberId) == false) {
-				return data;
-			}
-			indexName = (String)args[3];
-			
-			switch (deleteType) {
-			case DELETE_ALL_INDEXES:
-				qs.removeIndexes();
-				codeMessage = "all indexes deleted from the member";
-				break;
-				
-			case DELETE_REGION_INDEXES:
-				try {
-					qs.removeIndexes(region);
-					codeMessage = "all indexes deleted from " + region.getFullPath();
-				} catch (Exception ex) {
-					codeMessage = ex.getMessage();
-				}
-				break;
-				
-			case DELETE_INDEX:
-				Index index = qs.getIndex(region, indexName);
-				if (index == null) {
-					codeMessage = "index does not exist";
-				} else {
-					try {
-						qs.removeIndex(index);
-						codeMessage = "index deleted from " + region.getFullPath();
-					} catch (Exception ex) {
-						codeMessage = ex.getMessage();
-						if (codeMessage != null) 
-							codeMessage = codeMessage.trim();
-						if (codeMessage == null || codeMessage.length() == 0) {
-							codeMessage = ex.getClass().getSimpleName();
-						}
-					}
-				}
-				break;
-			}
-			data.setDataObject(codeMessage);
-
-		} else if (operationType.equals("-list")) {
-			
-			memberId = (String)args[1];
-			if (memberId != null && memberId.equals(thisMemberId) == false) {
-				return data;
-			}
-			
-			boolean isAll = (Boolean)args[2];
-			boolean isStats = (Boolean)args[3];
-			
-			Collection<Index> col = null;
-			if (isAll) {
-				col = qs.getIndexes();
-			} else if (region != null) {
-				col = qs.getIndexes(region);
-			} else {
-				codeMessage = "Invalid index command. Region path not specified.";
-				data.setDataObject(codeMessage);
-				return data;
-			}
-			
-			List<Mappable> mappableList = new ArrayList();
-			for (Index index : col) {
-				indexName = index.getName();
-				String type = index.getType().toString();
-				indexExpression = index.getIndexedExpression();
-				fromClause = index.getFromClause();
-				
-				MapMessage mapMessage = new MapMessage();
-				mapMessage.put("Name", indexName);
-				mapMessage.put("Type", type);
-				mapMessage.put("Expression", indexExpression);
-				mapMessage.put("From", fromClause);
-				if (isStats) {
-					try {
-						IndexStatistics stats = index.getStatistics();
-						mapMessage.put("Keys", stats.getNumberOfKeys());
-						mapMessage.put("Values", stats.getNumberOfValues());
-						mapMessage.put("Updates", stats.getNumUpdates());
-						mapMessage.put("TotalUpdateTime", stats.getTotalUpdateTime());
-						mapMessage.put("TotalUses", stats.getTotalUses());
-					} catch (Exception ex) {
-						// index not supported for pr
-					}
-				}
-				
-				mappableList.add(mapMessage);
-			}
-			data.setDataObject(mappableList);
-		}
-		
-		return data;
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-	
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/ls.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/ls.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/ls.java
deleted file mode 100644
index ace1161..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/ls.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import java.util.List;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.ListMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-
-public class ls implements ServerExecutable
-{
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-	
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		Region region = CacheFactory.getAnyInstance().getRegion(regionPath);
-		if (region == null) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = "Undefined region: " + regionPath;
-			return null;
-		}
-		
-		Cache cache = region.getCache();
-		ListMessage topMessage = new ListMessage();
-		if (command.startsWith("ls -c")) {
-			List<CacheServer> cacheServerList = cache.getCacheServers();
-			if (cacheServerList.size() > 0) {
-				for (CacheServer cacheServer : cacheServerList) {
-					MapMessage cacheServerMessage = new MapMessage();
-					String groups[] = cacheServer.getGroups();
-					if (groups.length > 0) {
-						String groupsStr = "";
-						for (int i = 0; i < groups.length; i++) {
-							groupsStr += groups[i];
-							if (i < groups.length - 1) {
-								groupsStr += ", ";
-							}
-						}
-						cacheServerMessage.put("ServerGroups", groupsStr);
-					} else {
-						cacheServerMessage.put("ServerGroups", "");
-					}
-					
-					cacheServerMessage.put("BindAddress", cacheServer.getBindAddress());
-					cacheServerMessage.put("HostnameForClients", cacheServer.getHostnameForClients());
-					cacheServerMessage.put("LoadPollInterval", cacheServer.getLoadPollInterval());
-					cacheServerMessage.put("MaxConnections", cacheServer.getMaxConnections());
-					cacheServerMessage.put("MaximumMessageCount", cacheServer.getMaximumMessageCount());
-					cacheServerMessage.put("MaximumTimeBetweenPings", cacheServer.getMaximumTimeBetweenPings());
-					cacheServerMessage.put("MaxThreads", cacheServer.getMaxThreads());
-					cacheServerMessage.put("MessageTimeToLive", cacheServer.getMessageTimeToLive());
-					cacheServerMessage.put("NotifyBySubscription", cacheServer.getNotifyBySubscription());
-					cacheServerMessage.put("Port", cacheServer.getPort());
-					cacheServerMessage.put("SocketBufferSize", cacheServer.getSocketBufferSize());
-					cacheServerMessage.put("TcpNoDelay", cacheServer.getTcpNoDelay());
-					
-					topMessage.add(cacheServerMessage);
-				}
-			}
-		}
-		
-		return new GfshData(topMessage);
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-	
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/pr.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/pr.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/pr.java
deleted file mode 100644
index 4c991eb..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/pr.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeMap;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-
-public class pr implements ServerExecutable
-{
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-	
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		
-		Object args[] = (Object[])arg;
-		
-		GfshData data = new GfshData(null);
-		try {
-			// Find the value from the partitioned region
-			if (regionPath == null || regionPath.equals("/")) {
-				code = AggregateResults.CODE_ERROR;
-				codeMessage = "Invalid region path " + regionPath;
-				return data;
-			}
-			Region region = cache.getRegion(regionPath);
-			if (region == null) {
-				code = AggregateResults.CODE_ERROR;
-				codeMessage = "Undefined region " + regionPath;
-				return data;
-			}
-			if (region instanceof PartitionedRegion == false) {
-				code = AggregateResults.CODE_ERROR;
-				codeMessage = "Not a partitioned region: " + regionPath;
-				return data;
-			}
-		
-			DistributedMember member = cache.getDistributedSystem().getDistributedMember();
-			
-//			PartitionRegionInfoImpl info = (PartitionRegionInfoImpl)PartitionRegionHelper.getPartitionRegionInfo(region);
-//			info.getLowRedundancyBucketCount();
-			PartitionedRegion pr = (PartitionedRegion)region;
-			if (pr.getDataStore() == null) {
-				// PROXY - no data store
-				code = AggregateResults.CODE_NORMAL;
-				codeMessage = "No data store: " + regionPath;
-				data.setUserData(pr.getPartitionAttributes().getTotalNumBuckets());
-				return data;
-			}
-			Set<BucketRegion> set2 = pr.getDataStore().getAllLocalBucketRegions();
-//			FindBugs - Unused
-//			TreeMap primaryMap = new TreeMap();
-//			TreeMap redundantMap = new TreeMap();
-//			for (BucketRegion br : set2) {
-//				TreeMap map = new TreeMap();
-//				map.put("Size", br.size());
-//				map.put("Bytes", br.getTotalBytes());
-//				InternalDistributedMember m = pr.getBucketPrimary(br.getId());
-//				if (m.getId().equals(member.getId())) {
-//					primaryMap.put(br.getId(), map);
-//				} else {
-//					redundantMap.put(br.getId(), map);
-//				}
-//			}
-			List<Mappable> primaryList = new ArrayList<Mappable>();
-			List<Mappable> redundantList = new ArrayList<Mappable>();
-			for (BucketRegion br : set2) {
-				MapMessage map = new MapMessage();
-				map.put("BucketId", br.getId());
-				map.put("Size", br.size());
-				map.put("Bytes", br.getTotalBytes());
-				InternalDistributedMember m = pr.getBucketPrimary(br.getId());
-				if (m.getId().equals(member.getId())) {
-					primaryList.add(map);
-				} else {
-					redundantList.add(map);
-				}
-			}
-			
-			TreeMap map = new TreeMap();
-//			map.put("Primary", primaryMap);
-//			map.put("Redundant", redundantMap);
-			map.put("Primary", primaryList);
-			map.put("Redundant", redundantList);
-			data.setDataObject(map);
-			data.setUserData(pr.getPartitionAttributes().getTotalNumBuckets());
-			
-		} catch (Exception ex) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = ex.getMessage();
-		}
-		return data;
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-	
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/rebalance.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/rebalance.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/rebalance.java
deleted file mode 100644
index 29cee32..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/rebalance.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.TimeUnit;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.control.RebalanceOperation;
-import com.gemstone.gemfire.cache.control.RebalanceResults;
-import com.gemstone.gemfire.cache.control.ResourceManager;
-import com.gemstone.gemfire.cache.partition.PartitionRebalanceInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-
-public class rebalance implements ServerExecutable
-{
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		GfshData data = new GfshData(null);
-		Cache cache = CacheFactory.getAnyInstance();
-		
-		// args[0] = memberId
-		// args[1] = simulate optional (default true)
-		// args[2] = timeout optional (default 20000 mesec)
-		
-		Object args[] = (Object[])arg;
-		boolean simulate = true;
-		String memberId = null;
-		if (args != null && args.length > 0) {
-			memberId = args[0].toString();
-		} else {
-			return data;
-		}
-		if (args.length > 1) {
-			if (args[1] instanceof Boolean) {
-				simulate = (Boolean)args[1];
-			}
-		}
-		long timeout = 60000; // 60 sec default
-		if (args.length > 2) {
-			timeout = (Long)args[2];
-		}
-
-		String thisMemberId = cache.getDistributedSystem().getDistributedMember().getId();
-		if (memberId.equals(thisMemberId) == false) {
-			return data;
-		}
-		
-		try {
-			Map map = null;
-			if (simulate) {
-				map = simulate();
-			} else {
-				map = rebalance(timeout);
-			}
-			data.setDataObject(map);
-		} catch (Exception ex) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = ex.getMessage();
-		}
-		return data;
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-
-	private Map rebalance(long timeout) throws CancellationException, InterruptedException
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		ResourceManager manager = cache.getResourceManager();
-		RebalanceOperation op = manager.createRebalanceFactory().start();
-
-		// Timeout if it's taking too long. Rebalancing will still complete.
-		try {
-			RebalanceResults results = op.getResults(timeout, TimeUnit.MILLISECONDS);	
-			return convertToMap(results);
-		} catch (Exception ex) {
-			return null;
-		}
-	}
-
-	private Map simulate() throws CancellationException, InterruptedException
-	{
-		Cache cache = CacheFactory.getAnyInstance();
-		ResourceManager manager = cache.getResourceManager();
-		RebalanceOperation op = manager.createRebalanceFactory().simulate();
-		RebalanceResults results = op.getResults();
-		Set<PartitionRebalanceInfo> set = results.getPartitionRebalanceDetails();
-		return convertToMap(results);
-	}
-	
-	private TreeMap convertToMap(RebalanceResults results)
-	{
-		TreeMap map = new TreeMap();
-//		if (results.getPartitionRebalanceDetails() != null) {
-//			map.put("RebalanceDetails", results.getPartitionRebalanceDetails());
-//		}
-//		Set<PartitionRebalanceInfo> set = results.getPartitionRebalanceDetails();
-//		if (set != null) {
-//			for (PartitionRebalanceInfo info : set) {
-//				info.
-//			}
-//		}
-		map.put("TotalBucketCreateBytes", results.getTotalBucketCreateBytes());
-		map.put("TotalBucketCreatesCompleted", results.getTotalBucketCreatesCompleted());
-		map.put("TotalBucketCreateTime", results.getTotalBucketCreateTime());
-		map.put("TotalBucketTransferBytes", results.getTotalBucketTransferBytes());
-		map.put("TotalBucketTransfersCompleted", results.getTotalBucketTransfersCompleted());
-		map.put("TotalBucketTransferTime", results.getTotalBucketTransferTime());
-		map.put("TotalPrimaryTransfersCompleted", results.getTotalPrimaryTransfersCompleted());
-		map.put("TotalPrimaryTransferTime", results.getTotalPrimaryTransferTime());
-		map.put("TotalTime", results.getTotalTime());
-		return map;
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/rm.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/rm.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/rm.java
deleted file mode 100644
index 0ca99aa..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/function/command/rm.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.function.command;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateResults;
-import com.gemstone.gemfire.internal.tools.gfsh.app.ServerExecutable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.function.GfshData;
-
-public class rm implements ServerExecutable
-{
-	private byte code = AggregateResults.CODE_NORMAL;
-	private String codeMessage = null;
-	
-	public Object execute(String command, String regionPath, Object arg) throws Exception
-	{
-		Region region = CacheFactory.getAnyInstance().getRegion(regionPath);
-		if (region == null) {
-			code = AggregateResults.CODE_ERROR;
-			codeMessage = "Undefined region: " + regionPath;
-			return null;
-		}
-		Object[] keys = (Object[])arg;
-		
-		for (int i = 0; i < keys.length; i++) {
-			try {
-				region.remove(keys[i]);
-			} catch (Exception ex) {
-				// ignore
-			}
-		}
-		return new GfshData(null);
-	}
-
-	public byte getCode()
-	{
-		return code;
-	}
-	
-	public String getCodeMessage()
-	{
-		return codeMessage;
-	}
-}



[25/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/fonts/DroidSans-webfont.woff
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/fonts/DroidSans-webfont.woff b/pulse/src/main/webapp/css/fonts/DroidSans-webfont.woff
new file mode 100644
index 0000000..8790d73
Binary files /dev/null and b/pulse/src/main/webapp/css/fonts/DroidSans-webfont.woff differ

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/grid/ui.jqgrid.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/grid/ui.jqgrid.css b/pulse/src/main/webapp/css/grid/ui.jqgrid.css
new file mode 100644
index 0000000..d65d6e8
--- /dev/null
+++ b/pulse/src/main/webapp/css/grid/ui.jqgrid.css
@@ -0,0 +1,841 @@
+/*Grid */
+.ui-state-default .ui-icon {
+	
+}
+
+.s-ico {
+	height: 20px;
+	float: right
+}
+
+.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled
+	{
+	background-image: none;
+	opacity: 0.35;
+	filter: alpha(opacity =             35);
+}
+
+.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled
+	{
+	background: url(../../images/arrow-up.png) no-repeat left bottom;
+	opacity: 0.35;
+}
+
+.ui-icon {
+	height: 16px;
+	width: 16px;
+}
+
+.ui-state-disabled {
+	cursor: default !important;
+}
+
+.ui-icon-triangle-1-s {
+	background: url(../../images/arrow-down.png) no-repeat left bottom
+}
+
+.ui-jqgrid-view .jspVerticalBar {
+	right: 0px !important
+}
+/*grid*/
+.ui-jqgrid {
+	position: relative;
+}
+
+.ui-jqgrid .ui-jqgrid-view {
+	position: relative;
+	left: 0px;
+	top: 0px;
+	padding: .0em;
+	font-size: 11px;
+}
+/* caption*/
+.ui-jqgrid .ui-jqgrid-titlebar {
+	padding: .3em .2em .2em .3em;
+	position: relative;
+	border-left: 0px none;
+	border-right: 0px none;
+	border-top: 0px none;
+}
+
+.ui-jqgrid .ui-jqgrid-title {
+	float: left;
+	margin: .1em 0 .2em;
+}
+
+.ui-jqgrid .ui-jqgrid-titlebar-close {
+	position: absolute;
+	top: 50%;
+	width: 19px;
+	margin: -10px 0 0 0;
+	padding: 1px;
+	height: 18px;
+}
+
+.ui-jqgrid .ui-jqgrid-titlebar-close span {
+	display: block;
+	margin: 1px;
+}
+
+.ui-jqgrid .ui-jqgrid-titlebar-close:hover {
+	padding: 0;
+}
+/* header*/
+.ui-jqgrid .ui-jqgrid-hdiv {
+	position: relative;
+	margin: 0em;
+	padding: 0em;
+	overflow-x: hidden;
+	border-left: 0px none !important;
+	border-top: 0px none !important;
+	border-right: 0px none !important;
+}
+
+.ui-jqgrid .ui-jqgrid-hbox {
+	float: left;
+	padding-right: 20px;
+	background: #202b39
+}
+
+.ui-jqgrid .ui-jqgrid-htable {
+	table-layout: fixed;
+	margin: 0em;
+}
+
+.ui-jqgrid .ui-jqgrid-htable th {
+	height: 20px;
+	padding: 7px 2px 7px 2px;
+	border-right: 1px solid #17232f;
+	border-bottom: 1px solid #11212c !important
+}
+
+.ui-jqgrid .ui-jqgrid-htable th:hover {
+	background: #1f313f !important
+}
+
+.ui-jqgrid .ui-jqgrid-htable th:hover .s-ico {
+	display: block !important
+}
+
+.ui-jqgrid .ui-jqgrid-htable th div {
+	overflow: hidden;
+	position: relative;
+	height: 17px;
+	padding: 0px 10px
+}
+
+.ui-th-column,.ui-jqgrid .ui-jqgrid-htable th.ui-th-column {
+	overflow: hidden;
+	white-space: nowrap;
+	text-align: left;
+	border-top: 0px none;
+	border-bottom: 0px none;
+	background: #202b39 url(../../images/border-left-grid.png) repeat-y left
+		top;
+	color: #3775c5;
+	font-weight: normal;
+	font-size: 13px
+}
+
+.ui-th-ltr,.ui-jqgrid .ui-jqgrid-htable th.ui-th-ltr {
+	border-left: 0px none;
+}
+
+.ui-th-rtl,.ui-jqgrid .ui-jqgrid-htable th.ui-th-rtl {
+	border-right: 0px none;
+}
+
+.ui-first-th-ltr {
+	border-right: 1px solid;
+}
+
+.ui-first-th-rtl {
+	border-left: 1px solid;
+}
+
+.ui-jqgrid .ui-th-div-ie {
+	white-space: nowrap;
+	zoom: 1;
+	height: 17px;
+}
+
+.ui-jqgrid .ui-jqgrid-resize {
+	height: 20px !important;
+	position: relative;
+	cursor: e-resize;
+	display: inline;
+	overflow: hidden;
+}
+
+.ui-jqgrid .ui-grid-ico-sort {
+	overflow: hidden;
+	position: absolute;
+	display: inline;
+	cursor: pointer !important;
+}
+
+.ui-jqgrid .ui-icon-asc {
+	margin-top: -3px;
+	height: 12px;
+	background: url(../../images/arrow-up.png) no-repeat left bottom;
+}
+
+.ui-jqgrid .ui-icon-desc {
+	margin-top: 3px;
+	height: 12px;
+	background: url(../../images/arrow-down.png) no-repeat left bottom;
+}
+
+.ui-jqgrid .ui-i-asc {
+	margin-top: 0px;
+	height: 16px;
+}
+
+.ui-jqgrid .ui-i-desc {
+	margin-top: 0px;
+	margin-left: 13px;
+	height: 16px;
+}
+
+.ui-jqgrid .ui-jqgrid-sortable {
+	cursor: pointer;
+}
+
+.ui-jqgrid tr.ui-search-toolbar th {
+	border-top-width: 1px !important;
+	border-top-color: inherit !important;
+	border-top-style: ridge !important
+}
+
+tr.ui-search-toolbar input {
+	margin: 1px 0px 0px 0px
+}
+
+tr.ui-search-toolbar select {
+	margin: 1px 0px 0px 0px
+}
+/* body */
+.ui-jqgrid .ui-jqgrid-bdiv {
+	position: relative;
+	margin: 0em;
+	padding: 0;
+	overflow-y: auto;
+	overflow-x: scroll;
+	text-align: left;
+}
+
+.ui-jqgrid .ui-jqgrid-btable {
+	table-layout: fixed;
+	margin: 0em;
+	outline-style: none;
+}
+
+.ui-jqgrid tr.jqgrow {
+	outline-style: none;
+}
+
+.ui-jqgrid tr.jqgrow:hover {
+	background: #1f313f
+}
+
+.ui-jqgrid tr.jqgroup {
+	outline-style: none;
+}
+
+.ui-jqgrid tr.jqgrow td {
+	font-weight: normal;
+	overflow: hidden;
+	white-space: pre;
+	height: 22px;
+	padding: 6px 12px 6px 12px;
+	border-top: 1px solid #1f313f;
+	border-bottom: 1px solid #11212c;
+	color: #89939a;
+	font-size: 13px;
+	background: url(../../images/border-left-grid.png) repeat-y left top;
+	text-overflow: ellipsis;
+}
+
+.ui-jqgrid tr.jqgfirstrow td {
+	padding: 0 2px 0 2px;
+	border-right-width: 1px;
+	border-right-style: solid;
+}
+
+.ui-jqgrid tr.jqgroup td {
+	font-weight: normal;
+	overflow: hidden;
+	white-space: pre;
+	height: 22px;
+	padding: 0 2px 0 2px;
+	border-bottom-width: 1px;
+	border-bottom-color: inherit;
+	border-bottom-style: solid;
+}
+
+.ui-jqgrid tr.jqfoot td {
+	font-weight: bold;
+	overflow: hidden;
+	white-space: pre;
+	height: 22px;
+	padding: 0 2px 0 2px;
+	border-bottom-width: 1px;
+	border-bottom-color: inherit;
+	border-bottom-style: solid;
+}
+
+.ui-jqgrid tr.ui-row-ltr td {
+	text-align: left;
+	border-right: 1px solid #17232F;
+}
+
+.ui-jqgrid tr.ui-row-rtl td {
+	text-align: right;
+	border-left: 1px solid red
+}
+
+.ui-jqgrid td.jqgrid-rownum {
+	padding: 0 2px 0 2px;
+	margin: 0px;
+	border: 0px none;
+}
+
+.ui-jqgrid .ui-jqgrid-resize-mark {
+	width: 2px;
+	left: 0;
+	background-color: #777;
+	cursor: e-resize;
+	cursor: col-resize;
+	position: absolute;
+	top: 0;
+	height: 100px;
+	overflow: hidden;
+	display: none;
+	border: 0 none;
+	z-index: 99999;
+}
+/* footer */
+.ui-jqgrid .ui-jqgrid-sdiv {
+	position: relative;
+	margin: 0em;
+	padding: 0em;
+	overflow: hidden;
+	border-left: 0px none !important;
+	border-top: 0px none !important;
+	border-right: 0px none !important;
+}
+
+.ui-jqgrid .ui-jqgrid-ftable {
+	table-layout: fixed;
+	margin-bottom: 0em;
+}
+
+.ui-jqgrid tr.footrow td {
+	font-weight: bold;
+	overflow: hidden;
+	white-space: nowrap;
+	height: 21px;
+	padding: 0 2px 0 2px;
+	border-top-width: 1px;
+	border-top-color: inherit;
+	border-top-style: solid;
+}
+
+.ui-jqgrid tr.footrow-ltr td {
+	text-align: left;
+	border-right-width: 1px;
+	border-right-color: inherit;
+	border-right-style: solid;
+}
+
+.ui-jqgrid tr.footrow-rtl td {
+	text-align: right;
+	border-left-width: 1px;
+	border-left-color: inherit;
+	border-left-style: solid;
+}
+/* Pager*/
+.ui-jqgrid .ui-jqgrid-pager {
+	border-left: 0px none !important;
+	border-right: 0px none !important;
+	border-bottom: 0px none !important;
+	margin: 0px !important;
+	padding: 0px !important;
+	position: relative;
+	height: 25px;
+	white-space: nowrap;
+	overflow: hidden;
+	font-size: 11px;
+}
+
+.ui-jqgrid .ui-pager-control {
+	position: relative;
+}
+
+.ui-jqgrid .ui-pg-table {
+	position: relative;
+	padding-bottom: 2px;
+	width: auto;
+	margin: 0em;
+}
+
+.ui-jqgrid .ui-pg-table td {
+	font-weight: normal;
+	vertical-align: middle;
+	padding: 1px;
+}
+
+.ui-jqgrid .ui-pg-button {
+	height: 19px !important;
+}
+
+.ui-jqgrid .ui-pg-button span {
+	display: block;
+	margin: 1px;
+	float: left;
+}
+
+.ui-jqgrid .ui-pg-button:hover {
+	padding: 0px;
+}
+
+.ui-jqgrid .ui-state-disabled:hover {
+	padding: 1px;
+}
+
+.ui-jqgrid .ui-pg-input {
+	height: 13px;
+	font-size: .8em;
+	margin: 0em;
+}
+
+.ui-jqgrid .ui-pg-selbox {
+	font-size: .8em;
+	line-height: 18px;
+	display: block;
+	height: 18px;
+	margin: 0em;
+}
+
+.ui-jqgrid .ui-separator {
+	height: 18px;
+	border-left: 1px solid #ccc;
+	border-right: 1px solid #ccc;
+	margin: 1px;
+	float: right;
+}
+
+.ui-jqgrid .ui-paging-info {
+	font-weight: normal;
+	height: 19px;
+	margin-top: 3px;
+	margin-right: 4px;
+}
+
+.ui-jqgrid .ui-jqgrid-pager .ui-pg-div {
+	padding: 1px 0;
+	float: left;
+	position: relative;
+}
+
+.ui-jqgrid .ui-jqgrid-pager .ui-pg-button {
+	cursor: pointer;
+}
+
+.ui-jqgrid .ui-jqgrid-pager .ui-pg-div  span.ui-icon {
+	float: left;
+	margin: 0 2px;
+}
+
+.ui-jqgrid td input,.ui-jqgrid td select .ui-jqgrid td textarea {
+	margin: 0em;
+}
+
+.ui-jqgrid td textarea {
+	width: auto;
+	height: auto;
+}
+
+.ui-jqgrid .ui-jqgrid-toppager {
+	border-left: 0px none !important;
+	border-right: 0px none !important;
+	border-top: 0px none !important;
+	margin: 0px !important;
+	padding: 0px !important;
+	position: relative;
+	height: 25px !important;
+	white-space: nowrap;
+	overflow: hidden;
+}
+
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div {
+	padding: 1px 0;
+	float: left;
+	position: relative;
+}
+
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-button {
+	cursor: pointer;
+}
+
+.ui-jqgrid .ui-jqgrid-toppager .ui-pg-div  span.ui-icon {
+	float: left;
+	margin: 0 2px;
+}
+/*subgrid*/
+.ui-jqgrid .ui-jqgrid-btable .ui-sgcollapsed span {
+	display: block;
+}
+
+.ui-jqgrid .ui-subgrid {
+	margin: 0em;
+	padding: 0em;
+	width: 100%;
+}
+
+.ui-jqgrid .ui-subgrid table {
+	table-layout: fixed;
+}
+
+.ui-jqgrid .ui-subgrid tr.ui-subtblcell td {
+	height: 18px;
+	border-right-width: 1px;
+	border-right-color: inherit;
+	border-right-style: solid;
+	border-bottom-width: 1px;
+	border-bottom-color: inherit;
+	border-bottom-style: solid;
+}
+
+.ui-jqgrid .ui-subgrid td.subgrid-data {
+	border-top: 0px none !important;
+}
+
+.ui-jqgrid .ui-subgrid td.subgrid-cell {
+	border-width: 0px 0px 1px 0px;
+}
+
+.ui-jqgrid .ui-th-subgrid {
+	height: 20px;
+}
+/* loading */
+.ui-jqgrid .loading {
+	position: absolute;
+	top: 45%;
+	left: 45%;
+	width: auto;
+	z-index: 101;
+	padding: 6px;
+	margin: 5px;
+	text-align: center;
+	font-weight: bold;
+	display: none;
+	border-width: 2px !important;
+	font-size: 11px;
+}
+
+.ui-jqgrid .jqgrid-overlay {
+	display: none;
+	z-index: 100;
+}
+
+* html .jqgrid-overlay {
+	width: expression(this.parentNode.offsetWidth +           'px');
+	height: expression(this.parentNode.offsetHeight +           'px');
+}
+
+* .jqgrid-overlay iframe {
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: -1;
+	width: expression(this.parentNode.offsetWidth +           'px');
+	height: expression(this.parentNode.offsetHeight +           'px');
+}
+/* end loading div */
+/* toolbar */
+.ui-jqgrid .ui-userdata {
+	border-left: 0px none;
+	border-right: 0px none;
+	height: 21px;
+	overflow: hidden;
+}
+/*Modal Window */
+.ui-jqdialog {
+	display: none;
+	width: 300px;
+	position: absolute;
+	padding: .2em;
+	font-size: 11px;
+	overflow: visible;
+}
+
+.ui-jqdialog .ui-jqdialog-titlebar {
+	padding: .3em .2em;
+	position: relative;
+}
+
+.ui-jqdialog .ui-jqdialog-title {
+	margin: .1em 0 .2em;
+}
+
+.ui-jqdialog .ui-jqdialog-titlebar-close {
+	position: absolute;
+	top: 50%;
+	width: 19px;
+	margin: -10px 0 0 0;
+	padding: 1px;
+	height: 18px;
+}
+
+.ui-jqdialog .ui-jqdialog-titlebar-close span {
+	display: block;
+	margin: 1px;
+}
+
+.ui-jqdialog .ui-jqdialog-titlebar-close:hover,.ui-jqdialog .ui-jqdialog-titlebar-close:focus
+	{
+	padding: 0;
+}
+
+.ui-jqdialog-content,.ui-jqdialog .ui-jqdialog-content {
+	border: 0;
+	padding: .3em .2em;
+	background: none;
+	height: auto;
+}
+
+.ui-jqdialog .ui-jqconfirm {
+	padding: .4em 1em;
+	border-width: 3px;
+	position: absolute;
+	bottom: 10px;
+	right: 10px;
+	overflow: visible;
+	display: none;
+	height: 80px;
+	width: 220px;
+	text-align: center;
+}
+/* end Modal window*/
+/* Form edit */
+.ui-jqdialog-content .FormGrid {
+	margin: 0px;
+}
+
+.ui-jqdialog-content .EditTable {
+	width: 100%;
+	margin-bottom: 0em;
+}
+
+.ui-jqdialog-content .DelTable {
+	width: 100%;
+	margin-bottom: 0em;
+}
+
+.EditTable td input,.EditTable td select,.EditTable td textarea {
+	margin: 0em;
+}
+
+.EditTable td textarea {
+	width: auto;
+	height: auto;
+}
+
+.ui-jqdialog-content td.EditButton {
+	text-align: right;
+	border-top: 0px none;
+	border-left: 0px none;
+	border-right: 0px none;
+	padding-bottom: 5px;
+	padding-top: 5px;
+}
+
+.ui-jqdialog-content td.navButton {
+	text-align: center;
+	border-left: 0px none;
+	border-top: 0px none;
+	border-right: 0px none;
+	padding-bottom: 5px;
+	padding-top: 5px;
+}
+
+.ui-jqdialog-content input.FormElement {
+	padding: .3em
+}
+
+.ui-jqdialog-content .data-line {
+	padding-top: .1em;
+	border: 0px none;
+}
+
+.ui-jqdialog-content .CaptionTD {
+	vertical-align: middle;
+	border: 0px none;
+	padding: 2px;
+	white-space: nowrap;
+}
+
+.ui-jqdialog-content .DataTD {
+	padding: 2px;
+	border: 0px none;
+	vertical-align: top;
+}
+
+.ui-jqdialog-content .form-view-data {
+	white-space: pre
+}
+
+.fm-button {
+	display: inline-block;
+	margin: 0 4px 0 0;
+	padding: .4em .5em;
+	text-decoration: none !important;
+	cursor: pointer;
+	position: relative;
+	text-align: center;
+	zoom: 1;
+}
+
+.fm-button-icon-left {
+	padding-left: 1.9em;
+}
+
+.fm-button-icon-right {
+	padding-right: 1.9em;
+}
+
+.fm-button-icon-left .ui-icon {
+	right: auto;
+	left: .2em;
+	margin-left: 0;
+	position: absolute;
+	top: 50%;
+	margin-top: -8px;
+}
+
+.fm-button-icon-right .ui-icon {
+	left: auto;
+	right: .2em;
+	margin-left: 0;
+	position: absolute;
+	top: 50%;
+	margin-top: -8px;
+}
+
+#nData,#pData {
+	float: left;
+	margin: 3px;
+	padding: 0;
+	width: 15px;
+}
+/* End Eorm edit */
+/*.ui-jqgrid .edit-cell {}*/
+.ui-jqgrid .selected-row,div.ui-jqgrid .selected-row td {
+	font-style: normal;
+	border-left: 0px none;
+}
+/* inline edit actions button*/
+.ui-inline-del.ui-state-hover span,.ui-inline-edit.ui-state-hover span,.ui-inline-save.ui-state-hover span,.ui-inline-cancel.ui-state-hover span
+	{
+	margin: -1px;
+}
+/* Tree Grid */
+.ui-jqgrid .tree-wrap {
+	float: left;
+	position: relative;
+	height: 18px;
+	white-space: nowrap;
+	overflow: hidden;
+}
+
+.ui-jqgrid .tree-minus {
+	position: absolute;
+	height: 15px;
+	width: 14px;
+	overflow: hidden;
+	background: url(../../images/plusMinusIcon.png) no-repeat 0 -15px;
+}
+
+.ui-jqgrid .tree-plus {
+	position: absolute;
+	height: 15px;
+	width: 14px;
+	overflow: hidden;
+	background: url(../../images/plusMinusIcon.png) no-repeat 0 0;
+}
+
+.ui-jqgrid .tree-leaf {
+	position: absolute;
+	height: 18px;
+	width: 18px;
+	overflow: hidden;
+}
+
+.ui-jqgrid .treeclick {
+	cursor: pointer;
+}
+/* moda dialog */
+* iframe.jqm {
+	position: absolute;
+	top: 0;
+	left: 0;
+	z-index: -1;
+	width: expression(this.parentNode.offsetWidth +           'px');
+	height: expression(this.parentNode.offsetHeight +           'px');
+}
+
+.ui-jqgrid-dnd tr td {
+	border-right-width: 1px;
+	border-right-color: inherit;
+	border-right-style: solid;
+	height: 20px
+}
+/* RTL Support */
+.ui-jqgrid .ui-jqgrid-title-rtl {
+	float: right;
+	margin: .1em 0 .2em;
+}
+
+.ui-jqgrid .ui-jqgrid-hbox-rtl {
+	float: right;
+	padding-left: 20px;
+}
+
+.ui-jqgrid .ui-jqgrid-resize-ltr {
+	float: right;
+	margin: -2px -2px -2px 0px;
+}
+
+.ui-jqgrid .ui-jqgrid-resize-rtl {
+	float: left;
+	margin: -2px 0px -1px -3px;
+}
+
+.ui-jqgrid .ui-sort-rtl {
+	left: 0px;
+}
+
+.ui-jqgrid .tree-wrap-ltr {
+	float: left;
+}
+
+.ui-jqgrid .tree-wrap-rtl {
+	float: right;
+}
+
+.ui-jqgrid .ui-ellipsis {
+	text-overflow: ellipsis;
+}
+
+.popup-innerblock .ui-jqgrid .ui-jqgrid-hbox {
+	padding-right: 0;
+}
+
+.popup-innerblock .ui-jqgrid .ui-icon-asc {
+	display: none;
+}
+
+.popup-innerblock .ui-jqgrid .ui-icon-desc {
+	display: none;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/ie/ie.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/ie/ie.css b/pulse/src/main/webapp/css/ie/ie.css
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/ie/ie7.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/ie/ie7.css b/pulse/src/main/webapp/css/ie/ie7.css
new file mode 100644
index 0000000..e306ed4
--- /dev/null
+++ b/pulse/src/main/webapp/css/ie/ie7.css
@@ -0,0 +1,2 @@
+.tabSevere{padding:1px 5px !important}
+.statusUpDowmBlock{margin-left:50px; display:block }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/ie/ie8.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/ie/ie8.css b/pulse/src/main/webapp/css/ie/ie8.css
new file mode 100644
index 0000000..7541048
--- /dev/null
+++ b/pulse/src/main/webapp/css/ie/ie8.css
@@ -0,0 +1 @@
+.tabSevere{padding:1px 5px !important}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/ie/ie9.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/ie/ie9.css b/pulse/src/main/webapp/css/ie/ie9.css
new file mode 100644
index 0000000..4478e5b
--- /dev/null
+++ b/pulse/src/main/webapp/css/ie/ie9.css
@@ -0,0 +1 @@
+.tabSevere{padding:1px 7px 1px 6px!important}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/jquery-ui.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/jquery-ui.css b/pulse/src/main/webapp/css/jquery-ui.css
new file mode 100644
index 0000000..085404b
--- /dev/null
+++ b/pulse/src/main/webapp/css/jquery-ui.css
@@ -0,0 +1,566 @@
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+/*
+ * jQuery UI Accordion 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }
+/*
+ * jQuery UI Autocomplete 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete { position: absolute; cursor: default; }	
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.16
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+	list-style:none;
+	padding: 2px;
+	margin: 0;
+	display:block;
+	float: left;
+}
+.ui-menu .ui-menu {
+	margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+	margin:0;
+	padding: 0;
+	zoom: 1;
+	float: left;
+	clear: left;
+	width: 100%;
+}
+.ui-menu .ui-menu-item a {
+	text-decoration:none;
+	display:block;
+	padding:.2em .4em;
+	line-height:1.5;
+	zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+	font-weight: normal;
+	margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; } 
+button.ui-button-icons-only { width: 3.7em; } 
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4;  }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*
+ * jQuery UI Datepicker 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month, 
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: normal; border: 0;  }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+    display: none; /*sorry for IE5*/
+    display/**/: block; /*sorry for IE5*/
+    position: absolute; /*must have*/
+    z-index: -1; /*must have*/
+    filter: mask(); /*must have*/
+    top: -4px; /*must have*/
+    left: -4px; /*must have*/
+    width: 200px; /*must have*/
+    height: 200px; /*must have*/
+}/*
+ * jQuery UI Dialog 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative;  }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*
+ * jQuery UI Progressbar 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/*
+ * jQuery UI Resizable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; }
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
+ * jQuery UI Selectable 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*
+ * jQuery UI Slider 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
+ * jQuery UI Tabs 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
+.ui-widget-content a { color: #222222/*{fcContent}*/; }
+.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
+.ui-widget-header a { color: #222222/*{fcHeader}*/; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background-color: #FFFFFF; font-weight: normal/*{fwDefault}*/; color: #575757/*{fcDefault}*/; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #575757/*{fcDefault}*/; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background-color: #FFFFFF;font-weight: normal/*{fwDefault}*/; color: #575757/*{fcHover}*/; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #575757/*{fcHover}*/; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background-color: #FFFFFF; font-weight: normal/*{fwDefault}*/; color: #575757/*{fcActive}*/; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #575757/*{fcActive}*/; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
+.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/jquery.jscrollpane.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/jquery.jscrollpane.css b/pulse/src/main/webapp/css/jquery.jscrollpane.css
new file mode 100644
index 0000000..a9896ae
--- /dev/null
+++ b/pulse/src/main/webapp/css/jquery.jscrollpane.css
@@ -0,0 +1,121 @@
+/*
+ * CSS Styles that are needed by jScrollPane for it to operate correctly.
+ *
+ * Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane
+ * may not operate correctly without them.
+ */
+
+.jspContainer
+{
+	overflow: hidden;
+	position: relative;
+}
+
+.jspPane
+{
+	position: absolute;
+}
+
+.jspVerticalBar
+{
+	position: absolute;
+	top: 0;
+	right: 0;
+	width: 8px;
+	height: 100%;
+	background: transparent;
+}
+
+.jspHorizontalBar
+{
+	position: absolute;
+	bottom: 0;
+	left: 0;
+	width: 100%;
+	height: 6px;
+	background: transparent;
+}
+
+.jspVerticalBar *,
+.jspHorizontalBar *
+{
+	margin: 0;
+	padding: 0;
+}
+
+.jspCap
+{
+	display: none;
+}
+
+.jspHorizontalBar .jspCap
+{
+	float: left;
+}
+
+.jspTrack
+{
+	background: transparent;
+	position: relative;
+}
+
+.jspDrag
+{
+	background: #4D5B66; /*#2b3c49;*/
+	position: relative;
+	top: 0;
+	left: 0;
+	cursor: pointer;
+	border-radius:4px;
+}
+
+.jspHorizontalBar .jspTrack,
+.jspHorizontalBar .jspDrag
+{
+	float: left;
+	height: 100%;
+}
+
+.jspArrow
+{
+	background: #50506d;
+	text-indent: -20000px;
+	display: block;
+	cursor: pointer;
+}
+
+.jspArrow.jspDisabled
+{
+	cursor: default;
+	background: #80808d;
+}
+
+.jspVerticalBar .jspArrow
+{
+	height: 16px;
+}
+
+.jspHorizontalBar .jspArrow
+{
+	width: 16px;
+	float: left;
+	height: 100%;
+}
+
+.jspVerticalBar .jspArrow:focus
+{
+	outline: none;
+}
+
+.jspCorner
+{
+	background: #eeeef4;
+	float: left;
+	height: 100%;
+}
+
+/* Yuk! CSS Hack for IE6 3 pixel bug :( */
+* html .jspCorner
+{
+	margin: 0 -3px 0 0;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/jquery.splitter.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/jquery.splitter.css b/pulse/src/main/webapp/css/jquery.splitter.css
new file mode 100644
index 0000000..68062c6
--- /dev/null
+++ b/pulse/src/main/webapp/css/jquery.splitter.css
@@ -0,0 +1,48 @@
+/*!
+ * StyleSheet for JQuery Spliter Plugin
+ * Copyright (C) 2010 Jakub Jankiewicz <http://jcubic.pl>
+ *
+ * Same license as plugin
+ */
+.spliter_panel {
+  position: relative;
+}
+.spliter_panel .vspliter {
+    background:#0f1c25 url(../images/ver-spiltter-dot.png) no-repeat center center;
+    cursor: col-resize;
+    z-index:7;
+    width: 8px;
+	
+	
+}
+
+.spliter_panel .hspliter {
+    background:#0f1c25 url(../images/hor-spiltter-dot.png) no-repeat center center;
+    cursor: row-resize;
+    z-index: 7;
+    height: 8px;
+	*height: auto;
+}
+.spliter_panel .vspliter, .spliter_panel .left_panel, .spliter_panel .right_panel,
+.spliter_panel .hspliter, .spliter_panel .top_panel, .spliter_panel .bottom_panel {
+    position: absolute;
+   /* overflow: auto;*/
+}
+.spliter_panel .vspliter, .spliter_panel .left_panel, .spliter_panel .right_panel {
+  height: 100%;
+}
+.spliter_panel .hspliter, .spliter_panel .top_panel, .spliter_panel .bottom_panel {
+  width: 100%;
+}
+.spliter_panel .top_panel, .spliter_panel .left_panel, .spliter_panel .vspliter {
+   top: 0%;
+}
+.spliter_panel .top_panel, .spliter_panel .bottom_panel, .spliter_panel .left_panel, .spliter_panel .hspliter {
+   left: 0%;
+}
+.spliter_panel .bottom_panel {
+   bottom: 0%;
+}
+.spliter_panel .right_panel {
+   right: 0%;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/jquery.ui.all.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/jquery.ui.all.css b/pulse/src/main/webapp/css/jquery.ui.all.css
new file mode 100644
index 0000000..1b31704
--- /dev/null
+++ b/pulse/src/main/webapp/css/jquery.ui.all.css
@@ -0,0 +1,11 @@
+/*
+ * jQuery UI CSS Framework 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming
+ */
+@import "jquery.ui.base.css";
+@import "jquery.ui.theme.css";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/jquery.ui.core.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/jquery.ui.core.css b/pulse/src/main/webapp/css/jquery.ui.core.css
new file mode 100644
index 0000000..375d4ad
--- /dev/null
+++ b/pulse/src/main/webapp/css/jquery.ui.core.css
@@ -0,0 +1,41 @@
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/jquery.ui.theme.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/jquery.ui.theme.css b/pulse/src/main/webapp/css/jquery.ui.theme.css
new file mode 100644
index 0000000..1f6c8f2
--- /dev/null
+++ b/pulse/src/main/webapp/css/jquery.ui.theme.css
@@ -0,0 +1,247 @@
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
+.ui-widget-content a { color: #222222/*{fcContent}*/; }
+.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
+.ui-widget-header a { color: #222222/*{fcHeader}*/; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
+.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
+.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/jquery.ztreestyle.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/jquery.ztreestyle.css b/pulse/src/main/webapp/css/jquery.ztreestyle.css
new file mode 100644
index 0000000..e9920de
--- /dev/null
+++ b/pulse/src/main/webapp/css/jquery.ztreestyle.css
@@ -0,0 +1,90 @@
+/*-------------------------------------
+zTree Style
+
+version:	3.4
+author:		Hunter.z
+email:		hunter.z@263.net
+website:	http://code.google.com/p/jquerytree/
+
+-------------------------------------*/
+
+.ztree * {padding:0; margin:0; font-size:14px;}
+.ztree {margin:0; padding:0; color:#fff}
+.ztree li{ padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0; clear:left;}
+.ztree li ul{ margin:0; padding:0;}
+.ztree li ul li { padding-left:8px; }
+.ztree li ul li li { padding-left:8px; margin-left:22px; }
+.ztree li ul li{ background:url(../images/line.png) 0 0 repeat-y;}
+.ztree li ul li:last-child { background:url(../images/lastLine.png) no-repeat top left; padding:7px 0 0 8px; }
+.ztree li.active { background:#203240; }
+.ztree li.level0 { padding:6px 10px; }
+.ztree li:first-child { padding-top:10px; }
+.ztree li li { padding:6px 0; }
+
+.ztree li a { padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#a7aaae; background-color: transparent;
+	text-decoration:none; vertical-align:top; display:block; float:left; width:55%;  text-overflow: ellipsis; overflow:hidden; }
+.ztree li a:hover {text-decoration:none;}
+.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
+.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
+.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
+	opacity:0.8; filter:alpha(opacity=80)}
+
+.ztree li span {line-height:16px; margin-right:2px}
+
+.ztree li span.bttn {line-height:0; margin:0; width:14px; height:15px; display:block; float:left; vertical-align:middle;
+	border:0 none; cursor: pointer;outline:none; background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
+	background-image:url("../images/plusMinusIcon.png");}
+
+.ztree li span.bttn.switch {width:14px; height:15px; margin-right:8px; }
+.ztree li span.bttn.root_open{background-position:0 -15px;}
+.ztree li span.bttn.root_close{background-position:0 0;}
+.ztree li span.bttn.roots_open{background-position:0 -15px;}
+.ztree li span.bttn.roots_close{background-position:0 0;}
+.ztree li span.bttn.center_open{background-position:0 -15px;}
+.ztree li span.bttn.center_close{background-position:0 0px;}
+.ztree li span.bttn.bottom_open{background-position:0 -15px;}
+.ztree li span.bttn.bottom_close{background-position:0 0px;}
+.ztree li span.bttn.noline_open{background-position:0 -15px;}
+.ztree li span.bttn.noline_close{background-position:0 0;}
+
+.ztree li li span.bttn.center_open{background-position:0 -30px; width:36px;}
+.ztree li li span.bttn.center_close {background-position:0 -45px; width:36px; }
+.ztree li li span.bttn.bottom_open{background-position:0 -30px; width:36px;}
+.ztree li li span.bttn.bottom_close {background-position:0 -45px; width:36px;}
+
+.ztree li span.bttn.root_docu{ display:none;}
+.ztree li span.bttn.roots_docu{display:none;}
+.ztree li span.bttn.center_docu{display:none;}
+.ztree li span.bttn.bottom_docu{display:none;}
+.ztree li span.bttn.noline_docu{ display:none;}
+.ztree li span.bttn.ico_open{ display:none;}
+.ztree li span.bttn.ico_close{display:none;}
+.ztree li span.bttn.ico_docu{display:none;}
+
+.ztree li span.bttn.ico_loading{margin-right:2px; background:url(../images/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
+
+.ztree li .iconRegionPartition { display:block; width:14px; height:15px; background:url(../images/regionIcons.png) no-repeat 0px -15px; float:right; margin-right:6px; }
+.ztree li .iconRegionReplicate { display:block; width:14px; height:15px; background:url(../images/regionIcons.png) no-repeat top left; float:right; margin-right:6px; }
+.iconRegionMir { background-position:bottom left; }
+.clrBoth { clear:both; height:0; line-height:0; font-size:0; }
+
+.ztree li span.bttn.chk {width:13px; height:13px; margin:2px 0 0 0; cursor: auto; background-image:url("../images/chkbox.png"); float:right; }
+.ztree li span.bttn.chk.checkbox_false_full {background-position:0 0}
+.ztree li span.bttn.chk.checkbox_false_full_focus {background-position:0 -25px}
+.ztree li span.bttn.chk.checkbox_false_part {background-position:0 -25px}
+.ztree li span.bttn.chk.checkbox_false_part_focus {background-position:0 -25px}
+.ztree li span.bttn.chk.checkbox_false_disable {background-position:0 -25px}
+.ztree li span.bttn.chk.checkbox_true_full {background-position:0 -50px}
+.ztree li span.bttn.chk.checkbox_true_full_focus {background-position:0 -50px}
+.ztree li span.bttn.chk.checkbox_true_part {background-position:0 -50px}
+.ztree li span.bttn.chk.checkbox_true_part_focus {background-position:0 -50px}
+.ztree li span.bttn.chk.checkbox_true_disable {background-position:0 -50px}
+
+/* level style*/
+/*.ztree li span.bttn.level0 {
+	display:none;
+}
+.ztree li ul.level0 {
+	padding:0;
+	background:none;
+}*/
\ No newline at end of file


[17/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.jqGrid.src.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.jqGrid.src.js b/pulse/src/main/webapp/scripts/lib/jquery.jqGrid.src.js
new file mode 100644
index 0000000..d6e361c
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.jqGrid.src.js
@@ -0,0 +1,12182 @@
+// ==ClosureCompiler==
+// @compilation_level SIMPLE_OPTIMIZATIONS
+
+/**
+ * @license jqGrid  4.4.0  - jQuery Grid
+ * Copyright (c) 2008, Tony Tomov, tony@trirand.com
+ * Dual licensed under the MIT and GPL licenses
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl-2.0.html
+ * Date: 2012-06-14
+ */
+//jsHint options
+/*global document, window, jQuery, DOMParser, ActiveXObject, $, alert */
+
+(function ($) {
+"use strict";
+$.jgrid = $.jgrid || {};
+$.extend($.jgrid,{
+	version : "4.4.0",
+	htmlDecode : function(value){
+		if(value && (value=='&nbsp;' || value=='&#160;' || (value.length===1 && value.charCodeAt(0)===160))) { return "";}
+		return !value ? value : String(value).replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&amp;/g, "&");		
+	},
+	htmlEncode : function (value){
+		return !value ? value : String(value).replace(/&/g, "&amp;").replace(/\"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+	},
+	format : function(format){ //jqgformat
+		var args = $.makeArray(arguments).slice(1);
+		if(format===undefined) { format = ""; }
+		return format.replace(/\{(\d+)\}/g, function(m, i){
+			return args[i];
+		});
+	},
+	getCellIndex : function (cell) {
+		var c = $(cell);
+		if (c.is('tr')) { return -1; }
+		c = (!c.is('td') && !c.is('th') ? c.closest("td,th") : c)[0];
+		if ($.browser.msie) { return $.inArray(c, c.parentNode.cells); }
+		return c.cellIndex;
+	},
+	stripHtml : function(v) {
+		v = v+"";
+		var regexp = /<("[^"]*"|'[^']*'|[^'">])*>/gi;
+		if (v) {
+			v = v.replace(regexp,"");
+			return (v && v !== '&nbsp;' && v !== '&#160;') ? v.replace(/\"/g,"'") : "";
+		} else {
+			return v;
+		}
+	},
+	stripPref : function (pref, id) {
+		var obj = $.type( pref );
+		if( obj == "string" || obj =="number") {
+			pref =  String(pref);
+			id = pref !== "" ? String(id).replace(String(pref), "") : id;
+		}
+		return id;
+	},
+	stringToDoc : function (xmlString) {
+		var xmlDoc;
+		if(typeof xmlString !== 'string') { return xmlString; }
+		try	{
+			var parser = new DOMParser();
+			xmlDoc = parser.parseFromString(xmlString,"text/xml");
+		}
+		catch(e) {
+			xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
+			xmlDoc.async=false;
+			xmlDoc.loadXML(xmlString);
+		}
+		return (xmlDoc && xmlDoc.documentElement && xmlDoc.documentElement.tagName != 'parsererror') ? xmlDoc : null;
+	},
+	parse : function(jsonString) {
+		var js = jsonString;
+		if (js.substr(0,9) == "while(1);") { js = js.substr(9); }
+		if (js.substr(0,2) == "/*") { js = js.substr(2,js.length-4); }
+		if(!js) { js = "{}"; }
+		return ($.jgrid.useJSON===true && typeof (JSON) === 'object' && typeof (JSON.parse) === 'function') ?
+			JSON.parse(js) :
+			eval('(' + js + ')');
+	},
+	parseDate : function(format, date) {
+		var tsp = {m : 1, d : 1, y : 1970, h : 0, i : 0, s : 0, u:0},k,hl,dM, regdate = /[\\\/:_;.,\t\T\s-]/;
+		if(date && date !== null && date !== undefined){
+			date = $.trim(date);
+			date = date.split(regdate);
+			if ($.jgrid.formatter.date.masks[format] !== undefined) {
+				format = $.jgrid.formatter.date.masks[format];
+			}
+			format = format.split(regdate);
+			var dfmt  = $.jgrid.formatter.date.monthNames;
+			var afmt  = $.jgrid.formatter.date.AmPm;
+			var h12to24 = function(ampm, h){
+				if (ampm === 0){ if (h === 12) { h = 0;} }
+				else { if (h !== 12) { h += 12; } }
+				return h;
+			};
+			for(k=0,hl=format.length;k<hl;k++){
+				if(format[k] == 'M') {
+					dM = $.inArray(date[k],dfmt);
+					if(dM !== -1 && dM < 12){
+						date[k] = dM+1;
+						tsp.m = date[k];
+					}
+				}
+				if(format[k] == 'F') {
+					dM = $.inArray(date[k],dfmt);
+					if(dM !== -1 && dM > 11){
+						date[k] = dM+1-12;
+						tsp.m = date[k];
+					}
+				}
+				if(format[k] == 'a') {
+					dM = $.inArray(date[k],afmt);
+					if(dM !== -1 && dM < 2 && date[k] == afmt[dM]){
+						date[k] = dM;
+						tsp.h = h12to24(date[k], tsp.h);
+					}
+				}
+				if(format[k] == 'A') {
+					dM = $.inArray(date[k],afmt);
+					if(dM !== -1 && dM > 1 && date[k] == afmt[dM]){
+						date[k] = dM-2;
+						tsp.h = h12to24(date[k], tsp.h);
+					}
+				}
+				if(date[k] !== undefined) {
+					tsp[format[k].toLowerCase()] = parseInt(date[k],10);
+				}
+			}
+			tsp.m = parseInt(tsp.m,10)-1;
+			var ty = tsp.y;
+			if (ty >= 70 && ty <= 99) {tsp.y = 1900+tsp.y;}
+			else if (ty >=0 && ty <=69) {tsp.y= 2000+tsp.y;}
+			if(tsp.j !== undefined) { tsp.d = tsp.j; }
+			if(tsp.n !== undefined) { tsp.m = parseInt(tsp.n,10)-1; }
+		}
+		return new Date(tsp.y, tsp.m, tsp.d, tsp.h, tsp.i, tsp.s, tsp.u);
+	},
+	jqID : function(sid){
+		return String(sid).replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&");
+	},
+	guid : 1,
+	uidPref: 'jqg',
+	randId : function( prefix )	{
+		return (prefix? prefix: $.jgrid.uidPref) + ($.jgrid.guid++);
+	},
+	getAccessor : function(obj, expr) {
+		var ret,p,prm = [], i;
+		if( typeof expr === 'function') { return expr(obj); }
+		ret = obj[expr];
+		if(ret===undefined) {
+			try {
+				if ( typeof expr === 'string' ) {
+					prm = expr.split('.');
+				}
+				i = prm.length;
+				if( i ) {
+					ret = obj;
+					while (ret && i--) {
+						p = prm.shift();
+						ret = ret[p];
+					}
+				}
+			} catch (e) {}
+		}
+		return ret;
+	},
+	getXmlData: function (obj, expr, returnObj) {
+		var ret, m = typeof (expr) === 'string' ? expr.match(/^(.*)\[(\w+)\]$/) : null;
+		if (typeof (expr) === 'function') { return expr(obj); }
+		if (m && m[2]) {
+			// m[2] is the attribute selector
+			// m[1] is an optional element selector
+			// examples: "[id]", "rows[page]"
+			return m[1] ? $(m[1], obj).attr(m[2]) : $(obj).attr(m[2]);
+		} else {
+			ret = $(expr, obj);
+			if (returnObj) { return ret; }
+			//$(expr, obj).filter(':last'); // we use ':last' to be more compatible with old version of jqGrid
+			return ret.length > 0 ? $(ret).text() : undefined;
+		}
+	},
+	cellWidth : function () {
+		var $testDiv = $("<div class='ui-jqgrid' style='left:10000px'><table class='ui-jqgrid-btable' style='width:5px;'><tr class='jqgrow'><td style='width:5px;'></td></tr></table></div>"),
+		testCell = $testDiv.appendTo("body")
+			.find("td")
+			.width();
+		$testDiv.remove();
+		return testCell !== 5;
+	},
+	ajaxOptions: {},
+	from : function(source){
+		// Original Author Hugo Bonacci
+		// License MIT http://jlinq.codeplex.com/license
+		var QueryObject=function(d,q){
+		if(typeof(d)=="string"){
+			d=$.data(d);
+		}
+		var self=this,
+		_data=d,
+		_usecase=true,
+		_trim=false,
+		_query=q,
+		_stripNum = /[\$,%]/g,
+		_lastCommand=null,
+		_lastField=null,
+		_orDepth=0,
+		_negate=false,
+		_queuedOperator="",
+		_sorting=[],
+		_useProperties=true;
+		if(typeof(d)=="object"&&d.push) {
+			if(d.length>0){
+				if(typeof(d[0])!="object"){
+					_useProperties=false;
+				}else{
+					_useProperties=true;
+				}
+			}
+		}else{
+			throw "data provides is not an array";
+		}
+		this._hasData=function(){
+			return _data===null?false:_data.length===0?false:true;
+		};
+		this._getStr=function(s){
+			var phrase=[];
+			if(_trim){
+				phrase.push("jQuery.trim(");
+			}
+			phrase.push("String("+s+")");
+			if(_trim){
+				phrase.push(")");
+			}
+			if(!_usecase){
+				phrase.push(".toLowerCase()");
+			}
+			return phrase.join("");
+		};
+		this._strComp=function(val){
+			if(typeof(val)=="string"){
+				return".toString()";
+			}else{
+				return"";
+			}
+		};
+		this._group=function(f,u){
+			return({field:f.toString(),unique:u,items:[]});
+		};
+		this._toStr=function(phrase){
+			if(_trim){
+				phrase=$.trim(phrase);
+			}
+			phrase=phrase.toString().replace(/\\/g,'\\\\').replace(/\"/g,'\\"');
+			return _usecase ? phrase : phrase.toLowerCase();
+		};
+		this._funcLoop=function(func){
+			var results=[];
+			$.each(_data,function(i,v){
+				results.push(func(v));
+			});
+			return results;
+		};
+		this._append=function(s){
+			var i;
+			if(_query===null){
+				_query="";
+			} else {
+				_query+=_queuedOperator === "" ? " && " :_queuedOperator;
+			}
+			for (i=0;i<_orDepth;i++){
+				_query+="(";
+			}
+			if(_negate){
+				_query+="!";
+			}
+			_query+="("+s+")";
+			_negate=false;
+			_queuedOperator="";
+			_orDepth=0;
+		};
+		this._setCommand=function(f,c){
+			_lastCommand=f;
+			_lastField=c;
+		};
+		this._resetNegate=function(){
+			_negate=false;
+		};
+		this._repeatCommand=function(f,v){
+			if(_lastCommand===null){
+				return self;
+			}
+			if(f!==null&&v!==null){
+				return _lastCommand(f,v);
+			}
+			if(_lastField===null){
+				return _lastCommand(f);
+			}
+			if(!_useProperties){
+				return _lastCommand(f);
+			}
+			return _lastCommand(_lastField,f);
+		};
+		this._equals=function(a,b){
+			return(self._compare(a,b,1)===0);
+		};
+		this._compare=function(a,b,d){
+			var toString = Object.prototype.toString;
+			if( d === undefined) { d = 1; }
+			if(a===undefined) { a = null; }
+			if(b===undefined) { b = null; }
+			if(a===null && b===null){
+				return 0;
+			}
+			if(a===null&&b!==null){
+				return 1;
+			}
+			if(a!==null&&b===null){
+				return -1;
+			}
+			if (toString.call(a) === '[object Date]' && toString.call(b) === '[object Date]') {
+				if (a < b) { return -d; }
+				if (a > b) { return d; }
+				return 0;
+			}
+			if(!_usecase && typeof(a) !== "number" && typeof(b) !== "number" ) {
+				a=String(a).toLowerCase();
+				b=String(b).toLowerCase();
+			}
+			if(a<b){return -d;}
+			if(a>b){return d;}
+			return 0;
+		};
+		this._performSort=function(){
+			if(_sorting.length===0){return;}
+			_data=self._doSort(_data,0);
+		};
+		this._doSort=function(d,q){
+			var by=_sorting[q].by,
+			dir=_sorting[q].dir,
+			type = _sorting[q].type,
+			dfmt = _sorting[q].datefmt;
+			if(q==_sorting.length-1){
+				return self._getOrder(d, by, dir, type, dfmt);
+			}
+			q++;
+			var values=self._getGroup(d,by,dir,type,dfmt);
+			var results=[];
+			for(var i=0;i<values.length;i++){
+				var sorted=self._doSort(values[i].items,q);
+				for(var j=0;j<sorted.length;j++){
+					results.push(sorted[j]);
+				}
+			}
+			return results;
+		};
+		this._getOrder=function(data,by,dir,type, dfmt){
+			var sortData=[],_sortData=[], newDir = dir=="a" ? 1 : -1, i,ab,j,
+			findSortKey;
+
+			if(type === undefined ) { type = "text"; }
+			if (type == 'float' || type== 'number' || type== 'currency' || type== 'numeric') {
+				findSortKey = function($cell) {
+					var key = parseFloat( String($cell).replace(_stripNum, ''));
+					return isNaN(key) ? 0.00 : key;
+				};
+			} else if (type=='int' || type=='integer') {
+				findSortKey = function($cell) {
+					return $cell ? parseFloat(String($cell).replace(_stripNum, '')) : 0;
+				};
+			} else if(type == 'date' || type == 'datetime') {
+				findSortKey = function($cell) {
+					return $.jgrid.parseDate(dfmt,$cell).getTime();
+				};
+			} else if($.isFunction(type)) {
+				findSortKey = type;
+			} else {
+				findSortKey = function($cell) {
+					if(!$cell) {$cell ="";}
+					return $.trim(String($cell).toUpperCase());
+				};
+			}
+			$.each(data,function(i,v){
+				ab = by!=="" ? $.jgrid.getAccessor(v,by) : v;
+				if(ab === undefined) { ab = ""; }
+				ab = findSortKey(ab, v);
+				_sortData.push({ 'vSort': ab,'index':i});
+			});
+
+			_sortData.sort(function(a,b){
+				a = a.vSort;
+				b = b.vSort;
+				return self._compare(a,b,newDir);
+			});
+			j=0;
+			var nrec= data.length;
+			// overhead, but we do not change the original data.
+			while(j<nrec) {
+				i = _sortData[j].index;
+				sortData.push(data[i]);
+				j++;
+			}
+			return sortData;
+		};
+		this._getGroup=function(data,by,dir,type, dfmt){
+			var results=[],
+			group=null,
+			last=null, val;
+			$.each(self._getOrder(data,by,dir,type, dfmt),function(i,v){
+				val = $.jgrid.getAccessor(v, by);
+				if(val === undefined) { val = ""; }
+				if(!self._equals(last,val)){
+					last=val;
+					if(group !== null){
+						results.push(group);
+					}
+					group=self._group(by,val);
+				}
+				group.items.push(v);
+			});
+			if(group !== null){
+				results.push(group);
+			}
+			return results;
+		};
+		this.ignoreCase=function(){
+			_usecase=false;
+			return self;
+		};
+		this.useCase=function(){
+			_usecase=true;
+			return self;
+		};
+		this.trim=function(){
+			_trim=true;
+			return self;
+		};
+		this.noTrim=function(){
+			_trim=false;
+			return self;
+		};
+		this.execute=function(){
+			var match=_query, results=[];
+			if(match === null){
+				return self;
+			}
+			$.each(_data,function(){
+				if(eval(match)){results.push(this);}
+			});
+			_data=results;
+			return self;
+		};
+		this.data=function(){
+			return _data;
+		};
+		this.select=function(f){
+			self._performSort();
+			if(!self._hasData()){ return[]; }
+			self.execute();
+			if($.isFunction(f)){
+				var results=[];
+				$.each(_data,function(i,v){
+					results.push(f(v));
+				});
+				return results;
+			}
+			return _data;
+		};
+		this.hasMatch=function(){
+			if(!self._hasData()) { return false; }
+			self.execute();
+			return _data.length>0;
+		};
+		this.andNot=function(f,v,x){
+			_negate=!_negate;
+			return self.and(f,v,x);
+		};
+		this.orNot=function(f,v,x){
+			_negate=!_negate;
+			return self.or(f,v,x);
+		};
+		this.not=function(f,v,x){
+			return self.andNot(f,v,x);
+		};
+		this.and=function(f,v,x){
+			_queuedOperator=" && ";
+			if(f===undefined){
+				return self;
+			}
+			return self._repeatCommand(f,v,x);
+		};
+		this.or=function(f,v,x){
+			_queuedOperator=" || ";
+			if(f===undefined) { return self; }
+			return self._repeatCommand(f,v,x);
+		};
+		this.orBegin=function(){
+			_orDepth++;
+			return self;
+		};
+		this.orEnd=function(){
+			if (_query !== null){
+				_query+=")";
+			}
+			return self;
+		};
+		this.isNot=function(f){
+			_negate=!_negate;
+			return self.is(f);
+		};
+		this.is=function(f){
+			self._append('this.'+f);
+			self._resetNegate();
+			return self;
+		};
+		this._compareValues=function(func,f,v,how,t){
+			var fld;
+			if(_useProperties){
+				fld='jQuery.jgrid.getAccessor(this,\''+f+'\')';
+			}else{
+				fld='this';
+			}
+			if(v===undefined) { v = null; }
+			//var val=v===null?f:v,
+			var val =v,
+			swst = t.stype === undefined ? "text" : t.stype;
+			if(v !== null) {
+			switch(swst) {
+				case 'int':
+				case 'integer':
+					val = (isNaN(Number(val)) || val==="") ? '0' : val; // To be fixed with more inteligent code
+					fld = 'parseInt('+fld+',10)';
+					val = 'parseInt('+val+',10)';
+					break;
+				case 'float':
+				case 'number':
+				case 'numeric':
+					val = String(val).replace(_stripNum, '');
+					val = (isNaN(Number(val)) || val==="") ? '0' : val; // To be fixed with more inteligent code
+					fld = 'parseFloat('+fld+')';
+					val = 'parseFloat('+val+')';
+					break;
+				case 'date':
+				case 'datetime':
+					val = String($.jgrid.parseDate(t.newfmt || 'Y-m-d',val).getTime());
+					fld = 'jQuery.jgrid.parseDate("'+t.srcfmt+'",'+fld+').getTime()';
+					break;
+				default :
+					fld=self._getStr(fld);
+					val=self._getStr('"'+self._toStr(val)+'"');
+			}
+			}
+			self._append(fld+' '+how+' '+val);
+			self._setCommand(func,f);
+			self._resetNegate();
+			return self;
+		};
+		this.equals=function(f,v,t){
+			return self._compareValues(self.equals,f,v,"==",t);
+		};
+		this.notEquals=function(f,v,t){
+			return self._compareValues(self.equals,f,v,"!==",t);
+		};
+		this.isNull = function(f,v,t){
+			return self._compareValues(self.equals,f,null,"===",t);
+		};
+		this.greater=function(f,v,t){
+			return self._compareValues(self.greater,f,v,">",t);
+		};
+		this.less=function(f,v,t){
+			return self._compareValues(self.less,f,v,"<",t);
+		};
+		this.greaterOrEquals=function(f,v,t){
+			return self._compareValues(self.greaterOrEquals,f,v,">=",t);
+		};
+		this.lessOrEquals=function(f,v,t){
+			return self._compareValues(self.lessOrEquals,f,v,"<=",t);
+		};
+		this.startsWith=function(f,v){
+			var val = (v===undefined || v===null) ? f: v,
+			length=_trim ? $.trim(val.toString()).length : val.toString().length;
+			if(_useProperties){
+				self._append(self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.substr(0,'+length+') == '+self._getStr('"'+self._toStr(v)+'"'));
+			}else{
+				length=_trim?$.trim(v.toString()).length:v.toString().length;
+				self._append(self._getStr('this')+'.substr(0,'+length+') == '+self._getStr('"'+self._toStr(f)+'"'));
+			}
+			self._setCommand(self.startsWith,f);
+			self._resetNegate();
+			return self;
+		};
+		this.endsWith=function(f,v){
+			var val = (v===undefined || v===null) ? f: v,
+			length=_trim ? $.trim(val.toString()).length:val.toString().length;
+			if(_useProperties){
+				self._append(self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.substr('+self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.length-'+length+','+length+') == "'+self._toStr(v)+'"');
+			} else {
+				self._append(self._getStr('this')+'.substr('+self._getStr('this')+'.length-"'+self._toStr(f)+'".length,"'+self._toStr(f)+'".length) == "'+self._toStr(f)+'"');
+			}
+			self._setCommand(self.endsWith,f);self._resetNegate();
+			return self;
+		};
+		this.contains=function(f,v){
+			if(_useProperties){
+				self._append(self._getStr('jQuery.jgrid.getAccessor(this,\''+f+'\')')+'.indexOf("'+self._toStr(v)+'",0) > -1');
+			}else{
+				self._append(self._getStr('this')+'.indexOf("'+self._toStr(f)+'",0) > -1');
+			}
+			self._setCommand(self.contains,f);
+			self._resetNegate();
+			return self;
+		};
+		this.groupBy=function(by,dir,type, datefmt){
+			if(!self._hasData()){
+				return null;
+			}
+			return self._getGroup(_data,by,dir,type, datefmt);
+		};
+		this.orderBy=function(by,dir,stype, dfmt){
+			dir =  dir === undefined || dir === null ? "a" :$.trim(dir.toString().toLowerCase());
+			if(stype === null || stype === undefined) { stype = "text"; }
+			if(dfmt === null || dfmt === undefined) { dfmt = "Y-m-d"; }
+			if(dir=="desc"||dir=="descending"){dir="d";}
+			if(dir=="asc"||dir=="ascending"){dir="a";}
+			_sorting.push({by:by,dir:dir,type:stype, datefmt: dfmt});
+			return self;
+		};
+		return self;
+		};
+	return new QueryObject(source,null);
+	},
+	extend : function(methods) {
+		$.extend($.fn.jqGrid,methods);
+		if (!this.no_legacy_api) {
+			$.fn.extend(methods);
+		}
+	}
+});
+
+$.fn.jqGrid = function( pin ) {
+	if (typeof pin == 'string') {
+		//var fn = $.fn.jqGrid[pin];
+		var fn = $.jgrid.getAccessor($.fn.jqGrid,pin);
+		if (!fn) {
+			throw ("jqGrid - No such method: " + pin);
+		}
+		var args = $.makeArray(arguments).slice(1);
+		return fn.apply(this,args);
+	}
+	return this.each( function() {
+		if(this.grid) {return;}
+
+		var p = $.extend(true,{
+			url: "",
+			height: 150,
+			page: 1,
+			rowNum: 20,
+			rowTotal : null,
+			records: 0,
+			pager: "",
+			pgbuttons: true,
+			pginput: true,
+			colModel: [],
+			rowList: [],
+			colNames: [],
+			sortorder: "asc",
+			sortname: "",
+			datatype: "xml",
+			mtype: "GET",
+			altRows: false,
+			selarrrow: [],
+			savedRow: [],
+			shrinkToFit: true,
+			xmlReader: {},
+			jsonReader: {},
+			subGrid: false,
+			subGridModel :[],
+			reccount: 0,
+			lastpage: 0,
+			lastsort: 0,
+			selrow: null,
+			beforeSelectRow: null,
+			onSelectRow: null,
+			onSortCol: null,
+			ondblClickRow: null,
+			onRightClickRow: null,
+			onPaging: null,
+			onSelectAll: null,
+			loadComplete: null,
+			gridComplete: null,
+			loadError: null,
+			loadBeforeSend: null,
+			afterInsertRow: null,
+			beforeRequest: null,
+			beforeProcessing : null,
+			onHeaderClick: null,
+			viewrecords: false,
+			loadonce: false,
+			multiselect: false,
+			multikey: false,
+			editurl: null,
+			search: false,
+			caption: "",
+			hidegrid: true,
+			hiddengrid: false,
+			postData: {},
+			userData: {},
+			treeGrid : false,
+			treeGridModel : 'nested',
+			treeReader : {},
+			treeANode : -1,
+			ExpandColumn: null,
+			tree_root_level : 0,
+			prmNames: {page:"page",rows:"rows", sort: "sidx",order: "sord", search:"_search", nd:"nd", id:"id",oper:"oper",editoper:"edit",addoper:"add",deloper:"del", subgridid:"id", npage: null, totalrows:"totalrows"},
+			forceFit : false,
+			gridstate : "visible",
+			cellEdit: false,
+			cellsubmit: "remote",
+			nv:0,
+			loadui: "enable",
+			toolbar: [false,""],
+			scroll: false,
+			multiboxonly : false,
+			deselectAfterSort : true,
+			scrollrows : false,
+			autowidth: false,
+			scrollOffset :18,
+			cellLayout: 5,
+			subGridWidth: 20,
+			multiselectWidth: 20,
+			gridview: false,
+			rownumWidth: 25,
+			rownumbers : false,
+			pagerpos: 'center',
+			recordpos: 'right',
+			footerrow : false,
+			userDataOnFooter : false,
+			hoverrows : true,
+			altclass : 'ui-priority-secondary',
+			viewsortcols : [false,'vertical',true],
+			resizeclass : '',
+			autoencode : false,
+			remapColumns : [],
+			ajaxGridOptions :{},
+			direction : "ltr",
+			toppager: false,
+			headertitles: false,
+			scrollTimeout: 40,
+			data : [],
+			_index : {},
+			grouping : false,
+			groupingView : {groupField:[],groupOrder:[], groupText:[],groupColumnShow:[],groupSummary:[], showSummaryOnHide: false, sortitems:[], sortnames:[], summary:[],summaryval:[], plusicon: 'ui-icon-circlesmall-plus', minusicon: 'ui-icon-circlesmall-minus'},
+			ignoreCase : false,
+			cmTemplate : {},
+			idPrefix : ""
+		}, $.jgrid.defaults, pin || {});
+		var ts= this, grid={
+			headers:[],
+			cols:[],
+			footers: [],
+			dragStart: function(i,x,y) {
+				this.resizing = { idx: i, startX: x.clientX, sOL : y[0]};
+				this.hDiv.style.cursor = "col-resize";
+				this.curGbox = $("#rs_m"+$.jgrid.jqID(p.id),"#gbox_"+$.jgrid.jqID(p.id));
+				this.curGbox.css({display:"block",left:y[0],top:y[1],height:y[2]});
+				$(ts).triggerHandler("jqGridResizeStart", [x, i]);
+				if($.isFunction(p.resizeStart)) { p.resizeStart.call(this,x,i); }
+				document.onselectstart=function(){return false;};
+			},
+			dragMove: function(x) {
+				if(this.resizing) {
+					var diff = x.clientX-this.resizing.startX,
+					h = this.headers[this.resizing.idx],
+					newWidth = p.direction === "ltr" ? h.width + diff : h.width - diff, hn, nWn;
+					if(newWidth > 33) {
+						this.curGbox.css({left:this.resizing.sOL+diff});
+						if(p.forceFit===true ){
+							hn = this.headers[this.resizing.idx+p.nv];
+							nWn = p.direction === "ltr" ? hn.width - diff : hn.width + diff;
+							if(nWn >33) {
+								h.newWidth = newWidth;
+								hn.newWidth = nWn;
+							}
+						} else {
+							this.newWidth = p.direction === "ltr" ? p.tblwidth+diff : p.tblwidth-diff;
+							h.newWidth = newWidth;
+						}
+					}
+				}
+			},
+			dragEnd: function() {
+				this.hDiv.style.cursor = "default";
+				if(this.resizing) {
+					var idx = this.resizing.idx,
+					nw = this.headers[idx].newWidth || this.headers[idx].width;
+					nw = parseInt(nw,10);
+					this.resizing = false;
+					$("#rs_m"+$.jgrid.jqID(p.id)).css("display","none");
+					p.colModel[idx].width = nw;
+					this.headers[idx].width = nw;
+					this.headers[idx].el.style.width = nw + "px";
+					this.cols[idx].style.width = nw+"px";
+					if(this.footers.length>0) {this.footers[idx].style.width = nw+"px";}
+					if(p.forceFit===true){
+						nw = this.headers[idx+p.nv].newWidth || this.headers[idx+p.nv].width;
+						this.headers[idx+p.nv].width = nw;
+						this.headers[idx+p.nv].el.style.width = nw + "px";
+						this.cols[idx+p.nv].style.width = nw+"px";
+						if(this.footers.length>0) {this.footers[idx+p.nv].style.width = nw+"px";}
+						p.colModel[idx+p.nv].width = nw;
+					} else {
+						p.tblwidth = this.newWidth || p.tblwidth;
+						$('table:first',this.bDiv).css("width",p.tblwidth+"px");
+						$('table:first',this.hDiv).css("width",p.tblwidth+"px");
+						this.hDiv.scrollLeft = this.bDiv.scrollLeft;
+						if(p.footerrow) {
+							$('table:first',this.sDiv).css("width",p.tblwidth+"px");
+							this.sDiv.scrollLeft = this.bDiv.scrollLeft;
+						}
+					}
+					$(ts).triggerHandler("jqGridResizeStop", [nw, idx]);
+					if($.isFunction(p.resizeStop)) { p.resizeStop.call(this,nw,idx); }
+				}
+				this.curGbox = null;
+				document.onselectstart=function(){return true;};
+			},
+			populateVisible: function() {
+				if (grid.timer) { clearTimeout(grid.timer); }
+				grid.timer = null;
+				var dh = $(grid.bDiv).height();
+				if (!dh) { return; }
+				var table = $("table:first", grid.bDiv);
+				var rows, rh;
+				if(table[0].rows.length) {
+					try {
+						rows = table[0].rows[1];
+						rh = rows ? $(rows).outerHeight() || grid.prevRowHeight : grid.prevRowHeight;
+					} catch (pv) {
+						rh = grid.prevRowHeight;
+					}
+				}
+				if (!rh) { return; }
+				grid.prevRowHeight = rh;
+				var rn = p.rowNum;
+				var scrollTop = grid.scrollTop = grid.bDiv.scrollTop;
+				var ttop = Math.round(table.position().top) - scrollTop;
+				var tbot = ttop + table.height();
+				var div = rh * rn;
+				var page, npage, empty;
+				if ( tbot < dh && ttop <= 0 &&
+					(p.lastpage===undefined||parseInt((tbot + scrollTop + div - 1) / div,10) <= p.lastpage))
+				{
+					npage = parseInt((dh - tbot + div - 1) / div,10);
+					if (tbot >= 0 || npage < 2 || p.scroll === true) {
+						page = Math.round((tbot + scrollTop) / div) + 1;
+						ttop = -1;
+					} else {
+						ttop = 1;
+					}
+				}
+				if (ttop > 0) {
+					page = parseInt(scrollTop / div,10) + 1;
+					npage = parseInt((scrollTop + dh) / div,10) + 2 - page;
+					empty = true;
+				}
+				if (npage) {
+					if (p.lastpage && page > p.lastpage || p.lastpage==1 || (page === p.page && page===p.lastpage) ) {
+						return;
+					}
+					if (grid.hDiv.loading) {
+						grid.timer = setTimeout(grid.populateVisible, p.scrollTimeout);
+					} else {
+						p.page = page;
+						if (empty) {
+							grid.selectionPreserver(table[0]);
+							grid.emptyRows.call(table[0], false, false);
+						}
+						grid.populate(npage);
+					}
+				}
+			},
+			scrollGrid: function( e ) {
+				if(p.scroll) {
+					var scrollTop = grid.bDiv.scrollTop;
+					if(grid.scrollTop === undefined) { grid.scrollTop = 0; }
+					if (scrollTop != grid.scrollTop) {
+						grid.scrollTop = scrollTop;
+						if (grid.timer) { clearTimeout(grid.timer); }
+						grid.timer = setTimeout(grid.populateVisible, p.scrollTimeout);
+					}
+				}
+				grid.hDiv.scrollLeft = grid.bDiv.scrollLeft;
+				if(p.footerrow) {
+					grid.sDiv.scrollLeft = grid.bDiv.scrollLeft;
+				}
+				if( e ) { e.stopPropagation(); }
+			},
+			selectionPreserver : function(ts) {
+				var p = ts.p,
+				sr = p.selrow, sra = p.selarrrow ? $.makeArray(p.selarrrow) : null,
+				left = ts.grid.bDiv.scrollLeft,
+				restoreSelection = function() {
+					var i;
+					p.selrow = null;
+					p.selarrrow = [];
+					if(p.multiselect && sra && sra.length>0) {
+						for(i=0;i<sra.length;i++){
+							if (sra[i] != sr) {
+								$(ts).jqGrid("setSelection",sra[i],false, null);
+							}
+						}
+					}
+					if (sr) {
+						$(ts).jqGrid("setSelection",sr,false,null);
+					}
+					ts.grid.bDiv.scrollLeft = left;
+					$(ts).unbind('.selectionPreserver', restoreSelection);
+				};
+				$(ts).bind('jqGridGridComplete.selectionPreserver', restoreSelection);				
+			}
+		};
+		if(this.tagName.toUpperCase()!='TABLE') {
+			alert("Element is not a table");
+			return;
+		}
+		if(document.documentMode !== undefined ) { // IE only
+			if(document.documentMode <= 5) {
+				alert("Grid can not be used in this ('quirks') mode!");
+				return;
+			}
+		}
+		$(this).empty().attr("tabindex","1");
+		this.p = p ;
+		this.p.useProp = !!$.fn.prop;
+		var i, dir;
+		if(this.p.colNames.length === 0) {
+			for (i=0;i<this.p.colModel.length;i++){
+				this.p.colNames[i] = this.p.colModel[i].label || this.p.colModel[i].name;
+			}
+		}
+		if( this.p.colNames.length !== this.p.colModel.length ) {
+			alert($.jgrid.errors.model);
+			return;
+		}
+		var gv = $("<div class='ui-jqgrid-view'></div>"), ii,
+		isMSIE = $.browser.msie ? true:false;
+		ts.p.direction = $.trim(ts.p.direction.toLowerCase());
+		if($.inArray(ts.p.direction,["ltr","rtl"]) == -1) { ts.p.direction = "ltr"; }
+		dir = ts.p.direction;
+
+		$(gv).insertBefore(this);
+		$(this).appendTo(gv).removeClass("scroll");
+		var eg = $("<div class='ui-jqgrid ui-widget ui-widget-content ui-corner-all'></div>");
+		$(eg).insertBefore(gv).attr({"id" : "gbox_"+this.id,"dir":dir});
+		$(gv).appendTo(eg).attr("id","gview_"+this.id);
+		if (isMSIE && $.browser.version <= 6) {
+			ii = '<iframe style="display:block;position:absolute;z-index:-1;filter:Alpha(Opacity=\'0\');" src="javascript:false;"></iframe>';
+		} else { ii="";}
+		$("<div class='ui-widget-overlay jqgrid-overlay' id='lui_"+this.id+"'></div>").append(ii).insertBefore(gv);
+		$("<div class='loading ui-state-default ui-state-active' id='load_"+this.id+"'>"+this.p.loadtext+"</div>").insertBefore(gv);
+		$(this).attr({cellspacing:"0",cellpadding:"0",border:"0","role":"grid","aria-multiselectable":!!this.p.multiselect,"aria-labelledby":"gbox_"+this.id});
+		var sortkeys = ["shiftKey","altKey","ctrlKey"],
+		intNum = function(val,defval) {
+			val = parseInt(val,10);
+			if (isNaN(val)) { return defval ? defval : 0;}
+			else {return val;}
+		},
+		formatCol = function (pos, rowInd, tv, rawObject, rowId, rdata){
+			var cm = ts.p.colModel[pos],
+			ral = cm.align, result="style=\"", clas = cm.classes, nm = cm.name, celp, acp=[];
+			if(ral) { result += "text-align:"+ral+";"; }
+			if(cm.hidden===true) { result += "display:none;"; }
+			if(rowInd===0) {
+				result += "width: "+grid.headers[pos].width+"px;";
+			} else if (cm.cellattr && $.isFunction(cm.cellattr))
+			{
+				celp = cm.cellattr.call(ts, rowId, tv, rawObject, cm, rdata);
+				if(celp && typeof(celp) === "string") {
+					celp = celp.replace(/style/i,'style').replace(/title/i,'title');
+					if(celp.indexOf('title') > -1) { cm.title=false;}
+					if(celp.indexOf('class') > -1) { clas = undefined;}
+					acp = celp.split("style");
+					if(acp.length === 2 ) {
+						acp[1] =  $.trim(acp[1].replace("=",""));
+						if(acp[1].indexOf("'") === 0 || acp[1].indexOf('"') === 0) {
+							acp[1] = acp[1].substring(1);
+						}
+						result += acp[1].replace(/'/gi,'"');
+					} else {
+						result += "\"";
+					}
+				}
+			}
+			if(!acp.length) { acp[0] = ""; result += "\"";}
+			result += (clas !== undefined ? (" class=\""+clas+"\"") :"") + ((cm.title && tv) ? (" title=\""+$.jgrid.stripHtml(tv)+"\"") :"");
+			result += " aria-describedby=\""+ts.p.id+"_"+nm+"\"";
+			return result + acp[0];
+		},
+		cellVal =  function (val) {
+			return val === undefined || val === null || val === "" ? "&#160;" : (ts.p.autoencode ? $.jgrid.htmlEncode(val) : val+"");
+		},
+		formatter = function (rowId, cellval , colpos, rwdat, _act){
+			var cm = ts.p.colModel[colpos],v;
+			if(typeof cm.formatter !== 'undefined') {
+				var opts= {rowId: rowId, colModel:cm, gid:ts.p.id, pos:colpos };
+				if($.isFunction( cm.formatter ) ) {
+					v = cm.formatter.call(ts,cellval,opts,rwdat,_act);
+				} else if($.fmatter){
+					v = $.fn.fmatter.call(ts,cm.formatter,cellval,opts,rwdat,_act);
+				} else {
+					v = cellVal(cellval);
+				}
+			} else {
+				v = cellVal(cellval);
+			}
+			return v;
+		},
+		addCell = function(rowId,cell,pos,irow, srvr) {
+			var v,prp;
+			v = formatter(rowId,cell,pos,srvr,'add');
+			prp = formatCol( pos,irow, v, srvr, rowId, true);
+			return "<td role=\"gridcell\" "+prp+">"+v+"</td>";
+		},
+		addMulti = function(rowid,pos,irow){
+			var	v = "<input role=\"checkbox\" type=\"checkbox\""+" id=\"jqg_"+ts.p.id+"_"+rowid+"\" class=\"cbox\" name=\"jqg_"+ts.p.id+"_"+rowid+"\"/>",
+			prp = formatCol( pos,irow,'',null, rowid, true);
+			return "<td role=\"gridcell\" "+prp+">"+v+"</td>";
+		},
+		addRowNum = function (pos,irow,pG,rN) {
+			var v =  (parseInt(pG,10)-1)*parseInt(rN,10)+1+irow,
+			prp = formatCol( pos,irow,v, null, irow, true);
+			return "<td role=\"gridcell\" class=\"ui-state-default jqgrid-rownum\" "+prp+">"+v+"</td>";
+		},
+		reader = function (datatype) {
+			var field, f=[], j=0, i;
+			for(i =0; i<ts.p.colModel.length; i++){
+				field = ts.p.colModel[i];
+				if (field.name !== 'cb' && field.name !=='subgrid' && field.name !=='rn') {
+					f[j]= datatype == "local" ?
+					field.name :
+					( (datatype=="xml" || datatype === "xmlstring") ? field.xmlmap || field.name : field.jsonmap || field.name );
+					j++;
+				}
+			}
+			return f;
+		},
+		orderedCols = function (offset) {
+			var order = ts.p.remapColumns;
+			if (!order || !order.length) {
+				order = $.map(ts.p.colModel, function(v,i) { return i; });
+			}
+			if (offset) {
+				order = $.map(order, function(v) { return v<offset?null:v-offset; });
+			}
+			return order;
+		},
+		emptyRows = function (scroll, locdata) {
+			var firstrow;
+			if (this.p.deepempty) {
+				$(this.rows).slice(1).remove();
+			} else {
+				firstrow = this.rows.length > 0 ? this.rows[0] : null;
+				$(this.firstChild).empty().append(firstrow);
+			}
+			if (scroll && this.p.scroll) {
+				$(this.grid.bDiv.firstChild).css({height: "auto"});
+				$(this.grid.bDiv.firstChild.firstChild).css({height: 0, display: "none"});
+				if (this.grid.bDiv.scrollTop !== 0) {
+					this.grid.bDiv.scrollTop = 0;
+				}
+			}
+			if(locdata === true && this.p.treeGrid) {
+				this.p.data = []; this.p._index = {};
+			}
+		},
+		refreshIndex = function() {
+			var datalen = ts.p.data.length, idname, i, val,
+			ni = ts.p.rownumbers===true ? 1 :0,
+			gi = ts.p.multiselect ===true ? 1 :0,
+			si = ts.p.subGrid===true ? 1 :0;
+
+			if(ts.p.keyIndex === false || ts.p.loadonce === true) {
+				idname = ts.p.localReader.id;
+			} else {
+				idname = ts.p.colModel[ts.p.keyIndex+gi+si+ni].name;
+			}
+			for(i =0;i < datalen; i++) {
+				val = $.jgrid.getAccessor(ts.p.data[i],idname);
+				ts.p._index[val] = i;
+			}
+		},
+		constructTr = function(id, hide, altClass, rd, cur) {
+			var tabindex = '-1', restAttr = '', attrName, style = hide ? 'display:none;' : '',
+				classes = 'ui-widget-content jqgrow ui-row-' + ts.p.direction + altClass,
+				rowAttrObj = $.isFunction(ts.p.rowattr) ? ts.p.rowattr.call(ts, rd, cur) : {};
+			if(!$.isEmptyObject( rowAttrObj )) {
+				if (rowAttrObj.hasOwnProperty("id")) {
+					id = rowAttrObj.id;
+					delete rowAttrObj.id;
+				}
+				if (rowAttrObj.hasOwnProperty("tabindex")) {
+					tabindex = rowAttrObj.tabindex;
+					delete rowAttrObj.tabindex;
+				}
+				if (rowAttrObj.hasOwnProperty("style")) {
+					style += rowAttrObj.style;
+					delete rowAttrObj.style;
+				}
+				if (rowAttrObj.hasOwnProperty("class")) {
+					classes += ' ' + rowAttrObj['class'];
+					delete rowAttrObj['class'];
+				}
+				// dot't allow to change role attribute
+				try { delete rowAttrObj.role; } catch(ra){}
+				for (attrName in rowAttrObj) {
+					if (rowAttrObj.hasOwnProperty(attrName)) {
+						restAttr += ' ' + attrName + '=' + rowAttrObj[attrName];
+					}
+				}
+			}
+			return '<tr role="row" id="' + id + '" tabindex="' + tabindex + '" class="' + classes + '"' +
+				(style === '' ? '' : ' style="' + style + '"') + restAttr + '>';
+		},
+		addXmlData = function (xml,t, rcnt, more, adjust) {
+			var startReq = new Date(),
+			locdata = (ts.p.datatype != "local" && ts.p.loadonce) || ts.p.datatype == "xmlstring",
+			xmlid = "_id_", xmlRd = ts.p.xmlReader,
+			frd = ts.p.datatype == "local" ? "local" : "xml";
+			if(locdata) {
+				ts.p.data = [];
+				ts.p._index = {};
+				ts.p.localReader.id = xmlid;
+			}
+			ts.p.reccount = 0;
+			if($.isXMLDoc(xml)) {
+				if(ts.p.treeANode===-1 && !ts.p.scroll) {
+					emptyRows.call(ts, false, true);
+					rcnt=1;
+				} else { rcnt = rcnt > 1 ? rcnt :1; }
+			} else { return; }
+			var i,fpos,ir=0,v,gi=ts.p.multiselect===true?1:0,si=ts.p.subGrid===true?1:0,ni=ts.p.rownumbers===true?1:0,idn, getId,f=[],F,rd ={}, xmlr,rid, rowData=[], cn=(ts.p.altRows === true) ? " "+ts.p.altclass:"",cn1;
+			if(!xmlRd.repeatitems) {f = reader(frd);}
+			if( ts.p.keyIndex===false) {
+				idn = $.isFunction( xmlRd.id ) ?  xmlRd.id.call(ts, xml) : xmlRd.id;
+			} else {
+				idn = ts.p.keyIndex;
+			}
+			if(f.length>0 && !isNaN(idn)) {
+				if (ts.p.remapColumns && ts.p.remapColumns.length) {
+					idn = $.inArray(idn, ts.p.remapColumns);
+				}
+				idn=f[idn];
+			}
+			if( (idn+"").indexOf("[") === -1 ) {
+				if (f.length) {
+					getId = function( trow, k) {return $(idn,trow).text() || k;};
+				} else {
+					getId = function( trow, k) {return $(xmlRd.cell,trow).eq(idn).text() || k;};
+				}
+			}
+			else {
+				getId = function( trow, k) {return trow.getAttribute(idn.replace(/[\[\]]/g,"")) || k;};
+			}
+			ts.p.userData = {};
+			ts.p.page = $.jgrid.getXmlData( xml,xmlRd.page ) || 0;
+			ts.p.lastpage = $.jgrid.getXmlData( xml,xmlRd.total );
+			if(ts.p.lastpage===undefined) { ts.p.lastpage=1; }
+			ts.p.records = $.jgrid.getXmlData( xml,xmlRd.records ) || 0;
+			if($.isFunction(xmlRd.userdata)) {
+				ts.p.userData = xmlRd.userdata.call(ts, xml) || {};
+			} else {
+				$.jgrid.getXmlData(xml, xmlRd.userdata, true).each(function() {ts.p.userData[this.getAttribute("name")]= $(this).text();});
+			}
+			var gxml = $.jgrid.getXmlData( xml, xmlRd.root, true);
+			gxml = $.jgrid.getXmlData( gxml, xmlRd.row, true);
+			if (!gxml) { gxml = []; }
+			var gl = gxml.length, j=0, grpdata=[], rn = parseInt(ts.p.rowNum,10);
+			if (gl > 0 &&  ts.p.page <= 0) { ts.p.page = 1; }
+			if(gxml && gl){
+			var br=ts.p.scroll?$.jgrid.randId():1,altr;
+			if (adjust) { rn *= adjust+1; }
+			var afterInsRow = $.isFunction(ts.p.afterInsertRow), hiderow=ts.p.grouping && ts.p.groupingView.groupCollapse === true;
+			while (j<gl) {
+				xmlr = gxml[j];
+				rid = getId(xmlr,br+j);
+				rid  = ts.p.idPrefix + rid;
+				altr = rcnt === 0 ? 0 : rcnt+1;
+				cn1 = (altr+j)%2 == 1 ? cn : '';
+				var iStartTrTag = rowData.length;
+				rowData.push("");
+				if( ni ) {
+					rowData.push( addRowNum(0,j,ts.p.page,ts.p.rowNum) );
+				}
+				if( gi ) {
+					rowData.push( addMulti(rid,ni,j) );
+				}
+				if( si ) {
+					rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,j+rcnt) );
+				}
+				if(xmlRd.repeatitems){
+					if (!F) { F=orderedCols(gi+si+ni); }
+					var cells = $.jgrid.getXmlData( xmlr, xmlRd.cell, true);
+					$.each(F, function (k) {
+						var cell = cells[this];
+						if (!cell) { return false; }
+						v = cell.textContent || cell.text;
+						rd[ts.p.colModel[k+gi+si+ni].name] = v;
+						rowData.push( addCell(rid,v,k+gi+si+ni,j+rcnt,xmlr) );
+					});
+				} else {
+					for(i = 0; i < f.length;i++) {
+						v = $.jgrid.getXmlData( xmlr, f[i]);
+						rd[ts.p.colModel[i+gi+si+ni].name] = v;
+						rowData.push( addCell(rid, v, i+gi+si+ni, j+rcnt, xmlr) );
+					}
+				}
+				rowData[iStartTrTag] = constructTr(rid, hiderow, cn1, rd, xmlr);
+				rowData.push("</tr>");
+				if(ts.p.grouping) {
+					grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, j);
+					rowData = [];
+				}
+				if(locdata || ts.p.treeGrid === true) {
+					rd[xmlid] = rid;
+					ts.p.data.push(rd);
+					ts.p._index[rid] = ts.p.data.length-1;
+				}
+				if(ts.p.gridview === false ) {
+					$("tbody:first",t).append(rowData.join(''));
+					$(ts).triggerHandler("jqGridAfterInsertRow", [rid, rd, xmlr]);
+					if(afterInsRow) {ts.p.afterInsertRow.call(ts,rid,rd,xmlr);}
+					rowData=[];
+				}
+				rd={};
+				ir++;
+				j++;
+				if(ir==rn) {break;}
+			}
+			}
+			if(ts.p.gridview === true) {
+				fpos = ts.p.treeANode > -1 ? ts.p.treeANode: 0;
+				if(ts.p.grouping) {
+					$(ts).jqGrid('groupingRender',grpdata,ts.p.colModel.length);
+					grpdata = null;
+				} else if(ts.p.treeGrid === true && fpos > 0) {
+					$(ts.rows[fpos]).after(rowData.join(''));
+				} else {
+					$("tbody:first",t).append(rowData.join(''));
+				}
+			}
+			if(ts.p.subGrid === true ) {
+				try {$(ts).jqGrid("addSubGrid",gi+ni);} catch (_){}
+			}
+			ts.p.totaltime = new Date() - startReq;
+			if(ir>0) { if(ts.p.records===0) { ts.p.records=gl;} }
+			rowData =null;
+			if( ts.p.treeGrid === true) {
+				try {$(ts).jqGrid("setTreeNode", fpos+1, ir+fpos+1);} catch (e) {}
+			}
+			if(!ts.p.treeGrid && !ts.p.scroll) {ts.grid.bDiv.scrollTop = 0;}
+			ts.p.reccount=ir;
+			ts.p.treeANode = -1;
+			if(ts.p.userDataOnFooter) { $(ts).jqGrid("footerData","set",ts.p.userData,true); }
+			if(locdata) {
+				ts.p.records = gl;
+				ts.p.lastpage = Math.ceil(gl/ rn);
+			}
+			if (!more) { ts.updatepager(false,true); }
+			if(locdata) {
+				while (ir<gl) {
+					xmlr = gxml[ir];
+					rid = getId(xmlr,ir+br);
+					rid  = ts.p.idPrefix + rid;
+					if(xmlRd.repeatitems){
+						if (!F) { F=orderedCols(gi+si+ni); }
+						var cells2 = $.jgrid.getXmlData( xmlr, xmlRd.cell, true);
+						$.each(F, function (k) {
+							var cell = cells2[this];
+							if (!cell) { return false; }
+							v = cell.textContent || cell.text;
+							rd[ts.p.colModel[k+gi+si+ni].name] = v;
+						});
+					} else {
+						for(i = 0; i < f.length;i++) {
+							v = $.jgrid.getXmlData( xmlr, f[i]);
+							rd[ts.p.colModel[i+gi+si+ni].name] = v;
+						}
+					}
+					rd[xmlid] = rid;
+					ts.p.data.push(rd);
+					ts.p._index[rid] = ts.p.data.length-1;
+					rd = {};
+					ir++;
+				}
+			}
+		},
+		addJSONData = function(data,t, rcnt, more, adjust) {
+			var startReq = new Date();
+			if(data) {
+				if(ts.p.treeANode === -1 && !ts.p.scroll) {
+					emptyRows.call(ts, false, true);
+					rcnt=1;
+				} else { rcnt = rcnt > 1 ? rcnt :1; }
+			} else { return; }
+
+			var dReader, locid = "_id_", frd,
+			locdata = (ts.p.datatype != "local" && ts.p.loadonce) || ts.p.datatype == "jsonstring";
+			if(locdata) { ts.p.data = []; ts.p._index = {}; ts.p.localReader.id = locid;}
+			ts.p.reccount = 0;
+			if(ts.p.datatype == "local") {
+				dReader =  ts.p.localReader;
+				frd= 'local';
+			} else {
+				dReader =  ts.p.jsonReader;
+				frd='json';
+			}
+			var ir=0,v,i,j,f=[],F,cur,gi=ts.p.multiselect?1:0,si=ts.p.subGrid?1:0,ni=ts.p.rownumbers===true?1:0,len,drows,idn,rd={}, fpos, idr,rowData=[],cn=(ts.p.altRows === true) ? " "+ts.p.altclass:"",cn1,lp;
+			ts.p.page = $.jgrid.getAccessor(data,dReader.page) || 0;
+			lp = $.jgrid.getAccessor(data,dReader.total);
+			ts.p.lastpage = lp === undefined ? 1 : lp;
+			ts.p.records = $.jgrid.getAccessor(data,dReader.records) || 0;
+			ts.p.userData = $.jgrid.getAccessor(data,dReader.userdata) || {};
+			if(!dReader.repeatitems) {
+				F = f = reader(frd);
+			}
+			if( ts.p.keyIndex===false ) {
+				idn = $.isFunction(dReader.id) ? dReader.id.call(ts, data) : dReader.id; 
+			} else {
+				idn = ts.p.keyIndex;
+			}
+			if(f.length>0 && !isNaN(idn)) {
+				if (ts.p.remapColumns && ts.p.remapColumns.length) {
+					idn = $.inArray(idn, ts.p.remapColumns);
+				}
+				idn=f[idn];
+			}
+			drows = $.jgrid.getAccessor(data,dReader.root);
+			if (!drows) { drows = []; }
+			len = drows.length; i=0;
+			if (len > 0 && ts.p.page <= 0) { ts.p.page = 1; }
+			var rn = parseInt(ts.p.rowNum,10),br=ts.p.scroll?$.jgrid.randId():1, altr;
+			if (adjust) { rn *= adjust+1; }
+			var afterInsRow = $.isFunction(ts.p.afterInsertRow), grpdata=[], hiderow=ts.p.grouping && ts.p.groupingView.groupCollapse === true;
+			while (i<len) {
+				cur = drows[i];
+				idr = $.jgrid.getAccessor(cur,idn);
+				if(idr === undefined) {
+					idr = br+i;
+					if(f.length===0){
+						if(dReader.cell){
+							var ccur = $.jgrid.getAccessor(cur,dReader.cell);
+							idr = ccur !== undefined ? ccur[idn] || idr : idr;
+							ccur=null;
+						}
+					}
+				}
+				idr  = ts.p.idPrefix + idr;
+				altr = rcnt === 1 ? 0 : rcnt;
+				cn1 = (altr+i)%2 == 1 ? cn : '';
+				var iStartTrTag = rowData.length;
+				rowData.push("");
+				if( ni ) {
+					rowData.push( addRowNum(0,i,ts.p.page,ts.p.rowNum) );
+				}
+				if( gi ){
+					rowData.push( addMulti(idr,ni,i) );
+				}
+				if( si ) {
+					rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,i+rcnt) );
+				}
+				if (dReader.repeatitems) {
+					if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell);}
+					if (!F) { F=orderedCols(gi+si+ni); }
+				}
+				for (j=0;j<F.length;j++) {
+					v = $.jgrid.getAccessor(cur,F[j]);
+					rowData.push( addCell(idr,v,j+gi+si+ni,i+rcnt,cur) );
+					rd[ts.p.colModel[j+gi+si+ni].name] = v;
+				}
+				rowData[iStartTrTag] = constructTr(idr, hiderow, cn1, rd, cur);
+				rowData.push( "</tr>" );
+				if(ts.p.grouping) {
+					grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, i);
+					rowData = [];
+				}
+				if(locdata || ts.p.treeGrid===true) {
+					rd[locid] = idr;
+					ts.p.data.push(rd);
+					ts.p._index[idr] = ts.p.data.length-1;
+				}
+				if(ts.p.gridview === false ) {
+					$("#"+$.jgrid.jqID(ts.p.id)+" tbody:first").append(rowData.join(''));
+					$(ts).triggerHandler("jqGridAfterInsertRow", [idr, rd, cur]);
+					if(afterInsRow) {ts.p.afterInsertRow.call(ts,idr,rd,cur);}
+					rowData=[];//ari=0;
+				}
+				rd={};
+				ir++;
+				i++;
+				if(ir==rn) { break; }
+			}
+			if(ts.p.gridview === true ) {
+				fpos = ts.p.treeANode > -1 ? ts.p.treeANode: 0;
+				if(ts.p.grouping) {
+					$(ts).jqGrid('groupingRender',grpdata,ts.p.colModel.length);
+					grpdata = null;
+				} else if(ts.p.treeGrid === true && fpos > 0) {
+					$(ts.rows[fpos]).after(rowData.join(''));
+				} else {
+					$("#"+$.jgrid.jqID(ts.p.id)+" tbody:first").append(rowData.join(''));
+				}
+			}
+			if(ts.p.subGrid === true ) {
+				try { $(ts).jqGrid("addSubGrid",gi+ni);} catch (_){}
+			}
+			ts.p.totaltime = new Date() - startReq;
+			if(ir>0) {
+				if(ts.p.records===0) { ts.p.records=len; }
+			}
+			rowData = null;
+			if( ts.p.treeGrid === true) {
+				try {$(ts).jqGrid("setTreeNode", fpos+1, ir+fpos+1);} catch (e) {}
+			}
+			if(!ts.p.treeGrid && !ts.p.scroll) {ts.grid.bDiv.scrollTop = 0;}
+			ts.p.reccount=ir;
+			ts.p.treeANode = -1;
+			if(ts.p.userDataOnFooter) { $(ts).jqGrid("footerData","set",ts.p.userData,true); }
+			if(locdata) {
+				ts.p.records = len;
+				ts.p.lastpage = Math.ceil(len/ rn);
+			}
+			if (!more) { ts.updatepager(false,true); }
+			if(locdata) {
+				while (ir<len && drows[ir]) {
+					cur = drows[ir];
+					idr = $.jgrid.getAccessor(cur,idn);
+					if(idr === undefined) {
+						idr = br+ir;
+						if(f.length===0){
+							if(dReader.cell){
+								var ccur2 = $.jgrid.getAccessor(cur,dReader.cell);
+								idr = ccur2[idn] || idr;
+								ccur2=null;
+							}
+						}
+					}
+					if(cur) {
+						idr  = ts.p.idPrefix + idr;
+						if (dReader.repeatitems) {
+							if(dReader.cell) {cur = $.jgrid.getAccessor(cur,dReader.cell);}
+							if (!F) { F=orderedCols(gi+si+ni); }
+						}
+
+						for (j=0;j<F.length;j++) {
+							v = $.jgrid.getAccessor(cur,F[j]);
+							rd[ts.p.colModel[j+gi+si+ni].name] = v;
+						}
+						rd[locid] = idr;
+						ts.p.data.push(rd);
+						ts.p._index[idr] = ts.p.data.length-1;
+						rd = {};
+					}
+					ir++;
+				}
+			}
+		},
+		addLocalData = function() {
+			var st, fndsort=false, cmtypes={}, grtypes=[], grindexes=[], srcformat, sorttype, newformat;
+			if(!$.isArray(ts.p.data)) {
+				return;
+			}
+			var grpview = ts.p.grouping ? ts.p.groupingView : false, lengrp, gin;
+			$.each(ts.p.colModel,function(){
+				sorttype = this.sorttype || "text";
+				if(sorttype == "date" || sorttype == "datetime") {
+					if(this.formatter && typeof(this.formatter) === 'string' && this.formatter == 'date') {
+						if(this.formatoptions && this.formatoptions.srcformat) {
+							srcformat = this.formatoptions.srcformat;
+						} else {
+							srcformat = $.jgrid.formatter.date.srcformat;
+						}
+						if(this.formatoptions && this.formatoptions.newformat) {
+							newformat = this.formatoptions.newformat;
+						} else {
+							newformat = $.jgrid.formatter.date.newformat;
+						}
+					} else {
+						srcformat = newformat = this.datefmt || "Y-m-d";
+					}
+					cmtypes[this.name] = {"stype": sorttype, "srcfmt": srcformat,"newfmt":newformat};
+				} else {
+					cmtypes[this.name] = {"stype": sorttype, "srcfmt":'',"newfmt":''};
+				}
+				if(ts.p.grouping ) {
+					for(gin =0, lengrp = grpview.groupField.length; gin< lengrp; gin++) {
+						if( this.name == grpview.groupField[gin]) {
+							var grindex = this.name;
+							if (typeof this.index != 'undefined') {
+								grindex = this.index;
+							}
+							grtypes[gin] = cmtypes[grindex];
+							grindexes[gin]= grindex;
+						}
+					}
+				}
+				if(!fndsort && (this.index == ts.p.sortname || this.name == ts.p.sortname)){
+					st = this.name; // ???
+					fndsort = true;
+				}
+			});
+			if(ts.p.treeGrid) {
+				$(ts).jqGrid("SortTree", st, ts.p.sortorder, cmtypes[st].stype, cmtypes[st].srcfmt);
+				return;
+			}
+			var compareFnMap = {
+				'eq':function(queryObj) {return queryObj.equals;},
+				'ne':function(queryObj) {return queryObj.notEquals;},
+				'lt':function(queryObj) {return queryObj.less;},
+				'le':function(queryObj) {return queryObj.lessOrEquals;},
+				'gt':function(queryObj) {return queryObj.greater;},
+				'ge':function(queryObj) {return queryObj.greaterOrEquals;},
+				'cn':function(queryObj) {return queryObj.contains;},
+				'nc':function(queryObj,op) {return op === "OR" ? queryObj.orNot().contains : queryObj.andNot().contains;},
+				'bw':function(queryObj) {return queryObj.startsWith;},
+				'bn':function(queryObj,op) {return op === "OR" ? queryObj.orNot().startsWith : queryObj.andNot().startsWith;},
+				'en':function(queryObj,op) {return op === "OR" ? queryObj.orNot().endsWith : queryObj.andNot().endsWith;},
+				'ew':function(queryObj) {return queryObj.endsWith;},
+				'ni':function(queryObj,op) {return op === "OR" ? queryObj.orNot().equals : queryObj.andNot().equals;},
+				'in':function(queryObj) {return queryObj.equals;},
+				'nu':function(queryObj) {return queryObj.isNull;},
+				'nn':function(queryObj,op) {return op === "OR" ? queryObj.orNot().isNull : queryObj.andNot().isNull;}
+
+			},
+			query = $.jgrid.from(ts.p.data);
+			if (ts.p.ignoreCase) { query = query.ignoreCase(); }
+			function tojLinq ( group ) {
+				var s = 0, index, gor, ror, opr, rule;
+				if (group.groups !== undefined) {
+					gor = group.groups.length && group.groupOp.toString().toUpperCase() === "OR";
+					if (gor) {
+						query.orBegin();
+					}
+					for (index = 0; index < group.groups.length; index++) {
+						if (s > 0 && gor) {
+							query.or();
+						}
+						try {
+							tojLinq(group.groups[index]);
+						} catch (e) {alert(e);}
+						s++;
+					}
+					if (gor) {
+						query.orEnd();
+					}
+				}
+				if (group.rules !== undefined) {
+					if(s>0) {
+						var result = query.select();
+						query = $.jgrid.from( result);
+						if (ts.p.ignoreCase) { query = query.ignoreCase(); } 
+					}
+					try{
+						ror = group.rules.length && group.groupOp.toString().toUpperCase() === "OR";
+						if (ror) {
+							query.orBegin();
+						}
+						for (index = 0; index < group.rules.length; index++) {
+							rule = group.rules[index];
+							opr = group.groupOp.toString().toUpperCase();
+							if (compareFnMap[rule.op] && rule.field ) {
+								if(s > 0 && opr && opr === "OR") {
+									query = query.or();
+								}
+								query = compareFnMap[rule.op](query, opr)(rule.field, rule.data, cmtypes[rule.field]);
+							}
+							s++;
+						}
+						if (ror) {
+							query.orEnd();
+						}
+					} catch (g) {alert(g);}
+				}
+			}
+
+			if (ts.p.search === true) {
+				var srules = ts.p.postData.filters;
+				if(srules) {
+					if(typeof srules == "string") { srules = $.jgrid.parse(srules);}
+					tojLinq( srules );
+				} else {
+					try {
+						query = compareFnMap[ts.p.postData.searchOper](query)(ts.p.postData.searchField, ts.p.postData.searchString,cmtypes[ts.p.postData.searchField]);
+					} catch (se){}
+				}
+			}
+			if(ts.p.grouping) {
+				for(gin=0; gin<lengrp;gin++) {
+					query.orderBy(grindexes[gin],grpview.groupOrder[gin],grtypes[gin].stype, grtypes[gin].srcfmt);
+				}
+			}
+			if (st && ts.p.sortorder && fndsort) {
+				if(ts.p.sortorder.toUpperCase() == "DESC") {
+					query.orderBy(ts.p.sortname, "d", cmtypes[st].stype, cmtypes[st].srcfmt);
+				} else {
+					query.orderBy(ts.p.sortname, "a", cmtypes[st].stype, cmtypes[st].srcfmt);
+				}
+			}
+			var queryResults = query.select(),
+			recordsperpage = parseInt(ts.p.rowNum,10),
+			total = queryResults.length,
+			page = parseInt(ts.p.page,10),
+			totalpages = Math.ceil(total / recordsperpage),
+			retresult = {};
+			queryResults = queryResults.slice( (page-1)*recordsperpage , page*recordsperpage );
+			query = null;
+			cmtypes = null;
+			retresult[ts.p.localReader.total] = totalpages;
+			retresult[ts.p.localReader.page] = page;
+			retresult[ts.p.localReader.records] = total;
+			retresult[ts.p.localReader.root] = queryResults;
+			retresult[ts.p.localReader.userdata] = ts.p.userData;
+			queryResults = null;
+			return  retresult;
+		},
+		updatepager = function(rn, dnd) {
+			var cp, last, base, from,to,tot,fmt, pgboxes = "", sppg,
+			tspg = ts.p.pager ? "_"+$.jgrid.jqID(ts.p.pager.substr(1)) : "",
+			tspg_t = ts.p.toppager ? "_"+ts.p.toppager.substr(1) : "";
+			base = parseInt(ts.p.page,10)-1;
+			if(base < 0) { base = 0; }
+			base = base*parseInt(ts.p.rowNum,10);
+			to = base + ts.p.reccount;
+			if (ts.p.scroll) {
+				var rows = $("tbody:first > tr:gt(0)", ts.grid.bDiv);
+				base = to - rows.length;
+				ts.p.reccount = rows.length;
+				var rh = rows.outerHeight() || ts.grid.prevRowHeight;
+				if (rh) {
+					var top = base * rh;
+					var height = parseInt(ts.p.records,10) * rh;
+					$(">div:first",ts.grid.bDiv).css({height : height}).children("div:first").css({height:top,display:top?"":"none"});
+				}
+				ts.grid.bDiv.scrollLeft = ts.grid.hDiv.scrollLeft;
+			}
+			pgboxes = ts.p.pager ? ts.p.pager : "";
+			pgboxes += ts.p.toppager ?  (pgboxes ? "," + ts.p.toppager : ts.p.toppager) : "";
+			if(pgboxes) {
+				fmt = $.jgrid.formatter.integer || {};
+				cp = intNum(ts.p.page);
+				last = intNum(ts.p.lastpage);
+				$(".selbox",pgboxes)[ this.p.useProp ? 'prop' : 'attr' ]("disabled",false);
+				if(ts.p.pginput===true) {
+					$('.ui-pg-input',pgboxes).val(ts.p.page);
+					sppg = ts.p.toppager ? '#sp_1'+tspg+",#sp_1"+tspg_t : '#sp_1'+tspg;
+					$(sppg).html($.fmatter ? $.fmatter.util.NumberFormat(ts.p.lastpage,fmt):ts.p.lastpage);
+
+				}
+				if (ts.p.viewrecords){
+					if(ts.p.reccount === 0) {
+						$(".ui-paging-info",pgboxes).html(ts.p.emptyrecords);
+					} else {
+						from = base+1;
+						tot=ts.p.records;
+						if($.fmatter) {
+							from = $.fmatter.util.NumberFormat(from,fmt);
+							to = $.fmatter.util.NumberFormat(to,fmt);
+							tot = $.fmatter.util.NumberFormat(tot,fmt);
+						}
+						$(".ui-paging-info",pgboxes).html($.jgrid.format(ts.p.recordtext,from,to,tot));
+					}
+				}
+				if(ts.p.pgbuttons===true) {
+					if(cp<=0) {cp = last = 0;}
+					if(cp==1 || cp === 0) {
+						$("#first"+tspg+", #prev"+tspg).addClass('ui-state-disabled').removeClass('ui-state-hover');
+						if(ts.p.toppager) { $("#first_t"+tspg_t+", #prev_t"+tspg_t).addClass('ui-state-disabled').removeClass('ui-state-hover'); }
+					} else {
+						$("#first"+tspg+", #prev"+tspg).removeClass('ui-state-disabled');
+						if(ts.p.toppager) { $("#first_t"+tspg_t+", #prev_t"+tspg_t).removeClass('ui-state-disabled'); }
+					}
+					if(cp==last || cp === 0) {
+						$("#next"+tspg+", #last"+tspg).addClass('ui-state-disabled').removeClass('ui-state-hover');
+						if(ts.p.toppager) { $("#next_t"+tspg_t+", #last_t"+tspg_t).addClass('ui-state-disabled').removeClass('ui-state-hover'); }
+					} else {
+						$("#next"+tspg+", #last"+tspg).removeClass('ui-state-disabled');
+						if(ts.p.toppager) { $("#next_t"+tspg_t+", #last_t"+tspg_t).removeClass('ui-state-disabled'); }
+					}
+				}
+			}
+			if(rn===true && ts.p.rownumbers === true) {
+				$("td.jqgrid-rownum",ts.rows).each(function(i){
+					$(this).html(base+1+i);
+				});
+			}
+			if(dnd && ts.p.jqgdnd) { $(ts).jqGrid('gridDnD','updateDnD');}
+			$(ts).triggerHandler("jqGridGridComplete");
+			if($.isFunction(ts.p.gridComplete)) {ts.p.gridComplete.call(ts);}
+			$(ts).triggerHandler("jqGridAfterGridComplete");
+		},
+		beginReq = function() {
+			ts.grid.hDiv.loading = true;
+			if(ts.p.hiddengrid) { return;}
+			switch(ts.p.loadui) {
+				case "disable":
+					break;
+				case "enable":
+					$("#load_"+$.jgrid.jqID(ts.p.id)).show();
+					break;
+				case "block":
+					$("#lui_"+$.jgrid.jqID(ts.p.id)).show();
+					$("#load_"+$.jgrid.jqID(ts.p.id)).show();
+					break;
+			}
+		},
+		endReq = function() {
+			ts.grid.hDiv.loading = false;
+			switch(ts.p.loadui) {
+				case "disable":
+					break;
+				case "enable":
+					$("#load_"+$.jgrid.jqID(ts.p.id)).hide();
+					break;
+				case "block":
+					$("#lui_"+$.jgrid.jqID(ts.p.id)).hide();
+					$("#load_"+$.jgrid.jqID(ts.p.id)).hide();
+					break;
+			}
+		},
+		populate = function (npage) {
+			if(!ts.grid.hDiv.loading) {
+				var pvis = ts.p.scroll && npage === false,
+				prm = {}, dt, dstr, pN=ts.p.prmNames;
+				if(ts.p.page <=0) { ts.p.page = 1; }
+				if(pN.search !== null) {prm[pN.search] = ts.p.search;} if(pN.nd !== null) {prm[pN.nd] = new Date().getTime();}
+				if(pN.rows !== null) {prm[pN.rows]= ts.p.rowNum;} if(pN.page !== null) {prm[pN.page]= ts.p.page;}
+				if(pN.sort !== null) {prm[pN.sort]= ts.p.sortname;} if(pN.order !== null) {prm[pN.order]= ts.p.sortorder;}
+				if(ts.p.rowTotal !== null && pN.totalrows !== null) { prm[pN.totalrows]= ts.p.rowTotal; }
+				var lcf = $.isFunction(ts.p.loadComplete), lc = lcf ? ts.p.loadComplete : null;
+				var adjust = 0;
+				npage = npage || 1;
+				if (npage > 1) {
+					if(pN.npage !== null) {
+						prm[pN.npage] = npage;
+						adjust = npage - 1;
+						npage = 1;
+					} else {
+						lc = function(req) {
+							ts.p.page++;
+							ts.grid.hDiv.loading = false;
+							if (lcf) {
+								ts.p.loadComplete.call(ts,req);
+							}
+							populate(npage-1);
+						};
+					}
+				} else if (pN.npage !== null) {
+					delete ts.p.postData[pN.npage];
+				}
+				if(ts.p.grouping) {
+					$(ts).jqGrid('groupingSetup');
+					var grp = ts.p.groupingView, gi, gs="";
+					for(gi=0;gi<grp.groupField.length;gi++) {
+						gs += grp.groupField[gi]+" "+grp.groupOrder[gi]+", ";
+					}
+					prm[pN.sort] = gs + prm[pN.sort];
+				}
+				$.extend(ts.p.postData,prm);
+				var rcnt = !ts.p.scroll ? 1 : ts.rows.length-1;
+				var bfr = $(ts).triggerHandler("jqGridBeforeRequest");
+				if (bfr === false || bfr === 'stop') { return; }
+				if ($.isFunction(ts.p.datatype)) { ts.p.datatype.call(ts,ts.p.postData,"load_"+ts.p.id); return;}
+				else if($.isFunction(ts.p.beforeRequest)) {
+					bfr = ts.p.beforeRequest.call(ts);
+					if(bfr === undefined) { bfr = true; }
+					if ( bfr === false ) { return; }
+				}
+				dt = ts.p.datatype.toLowerCase();
+				switch(dt)
+				{
+				case "json":
+				case "jsonp":
+				case "xml":
+				case "script":
+					$.ajax($.extend({
+						url:ts.p.url,
+						type:ts.p.mtype,
+						dataType: dt ,
+						data: $.isFunction(ts.p.serializeGridData)? ts.p.serializeGridData.call(ts,ts.p.postData) : ts.p.postData,
+						success:function(data,st, xhr) {
+							if ($.isFunction(ts.p.beforeProcessing)) {
+								if (ts.p.beforeProcessing.call(ts, data, st, xhr) === false) {
+									endReq();
+									return;
+								}
+							}
+							if(dt === "xml") { addXmlData(data,ts.grid.bDiv,rcnt,npage>1,adjust); }
+							else { addJSONData(data,ts.grid.bDiv,rcnt,npage>1,adjust); }
+							$(ts).triggerHandler("jqGridLoadComplete", [data]);
+							if(lc) { lc.call(ts,data); }
+							$(ts).triggerHandler("jqGridAfterLoadComplete", [data]);
+							if (pvis) { ts.grid.populateVisible(); }
+							if( ts.p.loadonce || ts.p.treeGrid) {ts.p.datatype = "local";}
+							data=null;
+							if (npage === 1) { endReq(); }
+						},
+						error:function(xhr,st,err){
+							if($.isFunction(ts.p.loadError)) { ts.p.loadError.call(ts,xhr,st,err); }
+							if (npage === 1) { endReq(); }
+							xhr=null;
+						},
+						beforeSend: function(xhr, settings ){
+							var gotoreq = true;
+							if($.isFunction(ts.p.loadBeforeSend)) {
+								gotoreq = ts.p.loadBeforeSend.call(ts,xhr, settings); 
+							}
+							if(gotoreq === undefined) { gotoreq = true; }
+							if(gotoreq === false) {
+								return false;
+							} else {
+								beginReq();
+							}
+						}
+					},$.jgrid.ajaxOptions, ts.p.ajaxGridOptions));
+				break;
+				case "xmlstring":
+					beginReq();
+					dstr = $.jgrid.stringToDoc(ts.p.datastr);
+					addXmlData(dstr,ts.grid.bDiv);
+					$(ts).triggerHandler("jqGridLoadComplete", [dstr]);
+					if(lcf) {ts.p.loadComplete.call(ts,dstr);}
+					$(ts).triggerHandler("jqGridAfterLoadComplete", [dstr]);
+					ts.p.datatype = "local";
+					ts.p.datastr = null;
+					endReq();
+				break;
+				case "jsonstring":
+					beginReq();
+					if(typeof ts.p.datastr == 'string') { dstr = $.jgrid.parse(ts.p.datastr); }
+					else { dstr = ts.p.datastr; }
+					addJSONData(dstr,ts.grid.bDiv);
+					$(ts).triggerHandler("jqGridLoadComplete", [dstr]);
+					if(lcf) {ts.p.loadComplete.call(ts,dstr);}
+					$(ts).triggerHandler("jqGridAfterLoadComplete", [dstr]);
+					ts.p.datatype = "local";
+					ts.p.datastr = null;
+					endReq();
+				break;
+				case "local":
+				case "clientside":
+					beginReq();
+					ts.p.datatype = "local";
+					var req = addLocalData();
+					addJSONData(req,ts.grid.bDiv,rcnt,npage>1,adjust);
+					$(ts).triggerHandler("jqGridLoadComplete", [req]);
+					if(lc) { lc.call(ts,req); }
+					$(ts).triggerHandler("jqGridAfterLoadComplete", [req]);
+					if (pvis) { ts.grid.populateVisible(); }
+					endReq();
+				break;
+				}
+			}
+		},
+		setHeadCheckBox = function ( checked ) {
+			$('#cb_'+$.jgrid.jqID(ts.p.id),ts.grid.hDiv)[ts.p.useProp ? 'prop': 'attr']("checked", checked);
+			var fid = ts.p.frozenColumns ? ts.p.id+"_frozen" : "";
+			if(fid) {
+				$('#cb_'+$.jgrid.jqID(ts.p.id),ts.grid.fhDiv)[ts.p.useProp ? 'prop': 'attr']("checked", checked);
+			}
+		},
+		setPager = function (pgid, tp){
+			// TBD - consider escaping pgid with pgid = $.jgrid.jqID(pgid);
+			var sep = "<td class='ui-pg-button ui-state-disabled' style='width:4px;'><span class='ui-separator'></span></td>",
+			pginp = "",
+			pgl="<table cellspacing='0' cellpadding='0' border='0' style='table-layout:auto;' class='ui-pg-table'><tbody><tr>",
+			str="", pgcnt, lft, cent, rgt, twd, tdw, i,
+			clearVals = function(onpaging){
+				var ret;
+				if ($.isFunction(ts.p.onPaging) ) { ret = ts.p.onPaging.call(ts,onpaging); }
+				ts.p.selrow = null;
+				if(ts.p.multiselect) {ts.p.selarrrow =[]; setHeadCheckBox( false );}
+				ts.p.savedRow = [];
+				if(ret=='stop') {return false;}
+				return true;
+			};
+			pgid = pgid.substr(1);
+			tp += "_" + pgid;
+			pgcnt = "pg_"+pgid;
+			lft = pgid+"_left"; cent = pgid+"_center"; rgt = pgid+"_right";
+			$("#"+$.jgrid.jqID(pgid) )
+			.append("<div id='"+pgcnt+"' class='ui-pager-control' role='group'><table cellspacing='0' cellpadding='0' border='0' class='ui-pg-table' style='width:100%;table-layout:fixed;height:100%;' role='row'><tbody><tr><td id='"+lft+"' align='left'></td><td id='"+cent+"' align='center' style='white-space:pre;'></td><td id='"+rgt+"' align='right'></td></tr></tbody></table></div>")
+			.attr("dir","ltr"); //explicit setting
+			if(ts.p.rowList.length >0){
+				str = "<td dir='"+dir+"'>";
+				str +="<select class='ui-pg-selbox' role='listbox'>";
+				for(i=0;i<ts.p.rowList.length;i++){
+					str +="<option role=\"option\" value=\""+ts.p.rowList[i]+"\""+((ts.p.rowNum == ts.p.rowList[i])?" selected=\"selected\"":"")+">"+ts.p.rowList[i]+"</option>";
+				}
+				str +="</select></td>";
+			}
+			if(dir=="rtl") { pgl += str; }
+			if(ts.p.pginput===true) { pginp= "<td dir='"+dir+"'>"+$.jgrid.format(ts.p.pgtext || "","<input class='ui-pg-input' type='text' size='2' maxlength='7' value='0' role='textbox'/>","<span id='sp_1_"+$.jgrid.jqID(pgid)+"'></span>")+"</td>";}
+			if(ts.p.pgbuttons===true) {
+				var po=["first"+tp,"prev"+tp, "next"+tp,"last"+tp]; if(dir=="rtl") { po.reverse(); }
+				pgl += "<td id='"+po[0]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-first'></span></td>";
+				pgl += "<td id='"+po[1]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-prev'></span></td>";
+				pgl += pginp !== "" ? sep+pginp+sep:"";
+				pgl += "<td id='"+po[2]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-next'></span></td>";
+				pgl += "<td id='"+po[3]+"' class='ui-pg-button ui-corner-all'><span class='ui-icon ui-icon-seek-end'></span></td>";
+			} else if (pginp !== "") { pgl += pginp; }
+			if(dir=="ltr") { pgl += str; }
+			pgl += "</tr></tbody></table>";
+			if(ts.p.viewrecords===true) {$("td#"+pgid+"_"+ts.p.recordpos,"#"+pgcnt).append("<div dir='"+dir+"' style='text-align:"+ts.p.recordpos+"' class='ui-paging-info'></div>");}
+			$("td#"+pgid+"_"+ts.p.pagerpos,"#"+pgcnt).append(pgl);
+			tdw = $(".ui-jqgrid").css("font-size") || "11px";
+			$(document.body).append("<div id='testpg' class='ui-jqgrid ui-widget ui-widget-content' style='font-size:"+tdw+";visibility:hidden;' ></div>");
+			twd = $(pgl).clone().appendTo("#testpg").width();
+			$("#testpg").remove();
+			if(twd > 0) {
+				if(pginp !== "") { twd += 50; } //should be param
+				$("td#"+pgid+"_"+ts.p.pagerpos,"#"+pgcnt).width(twd);
+			}
+			ts.p._nvtd = [];
+			ts.p._nvtd[0] = twd ? Math.floor((ts.p.width - twd)/2) : Math.floor(ts.p.width/3);
+			ts.p._nvtd[1] = 0;
+			pgl=null;
+			$('.ui-pg-selbox',"#"+pgcnt).bind('change',function() {
+				ts.p.page = Math.round(ts.p.rowNum*(ts.p.page-1)/this.value-0.5)+1;
+				ts.p.rowNum = this.value;
+				if(ts.p.pager) { $('.ui-pg-selbox',ts.p.pager).val(this.value); }
+				if(ts.p.toppager) { $('.ui-pg-selbox',ts.p.toppager).val(this.value); }
+				if(!clearVals('records')) { return false; }
+				populate();
+				return false;
+			});
+			if(ts.p.pgbuttons===true) {
+			$(".ui-pg-button","#"+pgcnt).hover(function(){
+				if($(this).hasClass('ui-state-disabled')) {
+					this.style.cursor='default';
+				} else {
+					$(this).addClass('ui-state-hover');
+					this.style.cursor='pointer';
+				}
+			},function() {
+				if(!$(this).hasClass('ui-state-disabled')) {
+					$(this).removeClass('ui-state-hover');
+					this.style.cursor= "default";
+				}
+			});
+			$("#first"+$.jgrid.jqID(tp)+", #prev"+$.jgrid.jqID(tp)+", #next"+$.jgrid.jqID(tp)+", #last"+$.jgrid.jqID(tp)).click( function() {
+				var cp = intNum(ts.p.page,1),
+				last = intNum(ts.p.lastpage,1), selclick = false,
+				fp=true, pp=true, np=true,lp=true;
+				if(last ===0 || last===1) {fp=false;pp=false;np=false;lp=false; }
+				else if( last>1 && cp >=1) {
+					if( cp === 1) { fp=false; pp=false; }
+					//else if( cp>1 && cp <last){ }
+					else if( cp===last){ np=false;lp=false; }
+				} else if( last>1 && cp===0 ) { np=false;lp=false; cp=last-1;}
+				if( this.id === 'first'+tp && fp ) { ts.p.page=1; selclick=true;}
+				if( this.id === 'prev'+tp && pp) { ts.p.page=(cp-1); selclick=true;}
+				if( this.id === 'next'+tp && np) { ts.p.page=(cp+1); selclick=true;}
+				if( this.id === 'last'+tp && lp) { ts.p.page=last; selclick=true;}
+				if(selclick) {
+					if(!clearVals(this.id)) { return false; }
+					populate();
+				}
+				return false;
+			});
+			}
+			if(ts.p.pginput===true) {
+			$('input.ui-pg-input',"#"+pgcnt).keypress( function(e) {
+				var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
+				if(key == 13) {
+					ts.p.page = ($(this).val()>0) ? $(this).val():ts.p.page;
+					if(!clearVals('user')) { return false; }
+					populate();
+					return false;
+				}
+				return this;
+			});
+			}
+		},
+		sortData = function (index, idxcol,reload,sor){
+			if(!ts.p.colModel[idxcol].sortable) { return; }
+			var so;
+			if(ts.p.savedRow.length > 0) {return;}
+			if(!reload) {
+				if( ts.p.lastsort == idxcol ) {
+					if( ts.p.sortorder == 'asc') {
+						ts.p.sortorder = 'desc';
+					} else if(ts.p.sortorder == 'desc') { ts.p.sortorder = 'asc';}
+				} else { ts.p.sortorder = ts.p.colModel[idxcol].firstsortorder || 'asc'; }
+				ts.p.page = 1;
+			}
+			if(sor) {
+				if(ts.p.lastsort == idxcol && ts.p.sortorder == sor && !reload) { return; }
+				else { ts.p.sortorder = sor; }
+			}
+			var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el, newSelectedTh = ts.grid.headers[idxcol].el;
+
+			$("span.ui-grid-ico-sort",previousSelectedTh).addClass('ui-state-disabled');
+			$(previousSelectedTh).attr("aria-selected","false");
+			$("span.ui-icon-"+ts.p.sortorder,newSelectedTh).removeClass('ui-state-disabled');
+			$(newSelectedTh).attr("aria-selected","true");
+			if(!ts.p.viewsortcols[0]) {
+				if(ts.p.lastsort != idxcol) {
+					$("span.s-ico",previousSelectedTh).hide();
+					$("span.s-ico",newSelectedTh).show();
+				}
+			}
+			index = index.substring(5 + ts.p.id.length + 1); // bad to be changed!?!
+			ts.p.sortname = ts.p.colModel[idxcol].index || index;
+			so = ts.p.sortorder;
+			if ($(ts).triggerHandler("jqGridSortCol", [index, idxcol, so]) === 'stop') {
+				ts.p.lastsort = idxcol;
+				return;
+			}
+			if($.isFunction(ts.p.onSortCol)) {if (ts.p.onSortCol.call(ts,index,idxcol,so)=='stop') {ts.p.lastsort = idxcol; return;}}
+			if(ts.p.datatype == "local") {
+				if(ts.p.deselectAfterSort) {$(ts).jqGrid("resetSelection");}
+			} else {
+				ts.p.selrow = null;
+				if(ts.p.multiselect){setHeadCheckBox( false );}
+				ts.p.selarrrow =[];
+				ts.p.savedRow =[];
+			}
+			if(ts.p.scroll) {
+				var sscroll = ts.grid.bDiv.scrollLeft;
+				emptyRows.call(ts, true, false);
+				ts.grid.hDiv.scrollLeft = sscroll;
+			}
+			if(ts.p.subGrid && ts.p.datatype=='local') {
+				$("td.sgexpanded","#"+$.jgrid.jqID(ts.p.id)).each(function(){
+					$(this).trigger("click");
+				});
+			}
+			populate();
+			ts.p.lastsort = idxcol;
+			if(ts.p.sortname != index && idxcol) {ts.p.lastsort = idxcol;}
+		},
+		setColWidth = function () {
+			var initwidth = 0, brd=$.jgrid.cellWidth()? 0: intNum(ts.p.cellLayout,0), vc=0, lvc, scw=intNum(ts.p.scrollOffset,0),cw,hs=false,aw,gw=0,
+			cl = 0, cr;
+			$.each(ts.p.colModel, function() {
+				if(typeof this.hidden === 'undefined') {this.hidden=false;}
+				this.widthOrg = cw = intNum(this.width,0);
+				if(this.hidden===false){
+					initwidth += cw+brd;
+					if(this.fixed) {
+						gw += cw+brd;
+					} else {
+						vc++;
+					}
+					cl++;
+				}
+			});
+			if(isNaN(ts.p.width)) {
+				ts.p.width  = initwidth + ((ts.p.shrinkToFit ===false && !isNaN(ts.p.height)) ? scw : 0);
+			}
+			grid.width = ts.p.width;
+			ts.p.tblwidth = initwidth;
+			if(ts.p.shrinkToFit ===false && ts.p.forceFit === true) {ts.p.forceFit=false;}
+			if(ts.p.shrinkToFit===true && vc > 0) {
+				aw = grid.width-brd*vc-gw;
+				if(!isNaN(ts.p.height)) {
+					aw -= scw;
+					hs = true;
+				}
+				initwidth =0;
+				$.each(ts.p.colModel, function(i) {
+					if(this.hidden === false && !this.fixed){
+						cw = Math.round(aw*this.width/(ts.p.tblwidth-brd*vc-gw));
+						this.width =cw;
+						initwidth += cw;
+						lvc = i;
+					}
+				});
+				cr =0;
+				if (hs) {
+					if(grid.width-gw-(initwidth+brd*vc) !== scw){
+						cr = grid.width-gw-(initwidth+brd*vc)-scw;
+					}
+				} else if(!hs && Math.abs(grid.width-gw-(initwidth+brd*vc)) !== 1) {
+					cr = grid.width-gw-(initwidth+brd*vc);
+				}
+				ts.p.colModel[lvc].width += cr;
+				ts.p.tblwidth = initwidth+cr+brd*vc+gw;
+				if(ts.p.tblwidth > ts.p.width) {
+					ts.p.colModel[lvc].width -= (ts.p.tblwidth - parseInt(ts.p.width,10));
+					ts.p.tblwidth = ts.p.width;
+				}
+			}
+		},
+		nextVisible= function(iCol) {
+			var ret = iCol, j=iCol, i;
+			for (i = iCol+1;i<ts.p.colModel.length;i++){
+				if(ts.p.colModel[i].hidden !== true ) {
+					j=i; break;
+				}
+			}
+			return j-ret;
+		},
+		getOffset = function (iCol) {
+			var i, ret = {}, brd1 = $.jgrid.cellWidth() ? 0 : ts.p.cellLayout;
+			ret[0] =  ret[1] = ret[2] = 0;
+			for(i=0;i<=iCol;i++){
+				if(ts.p.colModel[i].hidden === false ) {
+					ret[0] += ts.p.colModel[i].width+brd1;
+				}
+			}
+			if(ts.p.direction=="rtl") { ret[0] = ts.p.width - ret[0]; }
+			ret[0] = ret[0] - ts.grid.bDiv.scrollLeft;
+			if($(ts.grid.cDiv).is(":visible")) {ret[1] += $(ts.grid.cDiv).height() +parseInt($(ts.grid.cDiv).css("padding-top"),10)+parseInt($(ts.grid.cDiv).css("padding-bottom"),10);}
+			if(ts.p.toolbar[0]===true && (ts.p.toolbar[1]=='top' || ts.p.toolbar[1]=='both')) {ret[1] += $(ts.grid.uDiv).height()+parseInt($(ts.grid.uDiv).css("border-top-width"),10)+parseInt($(ts.grid.uDiv).css("border-bottom-width"),10);}
+			if(ts.p.toppager) {ret[1] += $(ts.grid.topDiv).height()+parseInt($(ts.grid.topDiv).css("border-bottom-width"),10);}
+			ret[2] += $(ts.grid.bDiv).height() + $(ts.grid.hDiv).height();
+			return ret;
+		},
+		getColumnHeaderIndex = function (th) {
+			var i, headers = ts.grid.headers, ci = $.jgrid.getCellIndex(th);
+			for (i = 0; i < headers.length; i++) {
+				if (th === headers[i].el) {
+					ci = i;
+					break;
+				}
+			}
+			return ci;
+		};
+		this.p.id = this.id;
+		if ($.inArray(ts.p.multikey,sortkeys) == -1 ) {ts.p.multikey = false;}
+		ts.p.keyIndex=false;
+		for (i=0; i<ts.p.colModel.length;i++) {
+			ts.p.colModel[i] = $.extend(true, {}, ts.p.cmTemplate, ts.p.colModel[i].template || {}, ts.p.colModel[i]);
+			if (ts.p.keyIndex === false && ts.p.colModel[i].key===true) {
+				ts.p.keyIndex = i;
+			}
+		}
+		ts.p.sortorder = ts.p.sortorder.toLowerCase();
+		if(ts.p.grouping===true) {
+			ts.p.scroll = false;
+			ts.p.rownumbers = false;
+			//ts.p.subGrid = false; expiremental
+			ts.p.treeGrid = false;
+			ts.p.gridview = true;
+		}
+		if(this.p.treeGrid === true) {
+			try { $(this).jqGrid("setTreeGrid");} catch (_) {}
+			if(ts.p.datatype != "local") { ts.p.localReader = {id: "_id_"};	}
+		}
+		if(this.p.subGrid) {
+			try { $(ts).jqGrid("setSubGrid");} catch (s){}
+		}
+		if(this.p.multiselect) {
+			this.p.colNames.unshift("<input role='checkbox' id='cb_"+this.p.id+"' class='cbox' type='checkbox'/>");
+			this.p.colModel.unshift({name:'cb',width:$.jgrid.cellWidth() ? ts.p.multiselectWidth+ts.p.cellLayout : ts.p.multiselectWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:'center',fixed:true});
+		}
+		if(this.p.rownumbers) {
+			this.p.colNames.unshift("");
+			this.p.colModel.unshift({name:'rn',width:ts.p.rownumWidth,sortable:false,resizable:false,hidedlg:true,search:false,align:'center',fixed:true});
+		}
+		ts.p.xmlReader = $.extend(true,{
+			root: "rows",
+			row: "row",
+			page: "rows>page",
+			total: "rows>total",
+			records : "rows>records",
+			repeatitems: true,
+			cell: "cell",
+			id: "[id]",
+			userdata: "userdata",
+			subgrid: {root:"rows", row: "row", repeatitems: true, cell:"cell"}
+		}, ts.p.xmlReader);
+		ts.p.jsonReader = $.extend(true,{
+			root: "rows",
+			page: "page",
+			total: "total",
+			records: "records",
+			repeatitems: true,
+			cell: "cell",
+			id: "id",
+			userdata: "userdata",
+			subgrid: {root:"rows", repeatitems: true, cell:"cell"}
+		},ts.p.jsonReader);
+		ts.p.localReader = $.extend(true,{
+			root: "rows",
+			page: "page",
+			total: "total",
+			records: "records",
+			repeatitems: false,
+			cell: "cell",
+			id: "id",
+			userdata: "userdata",
+			subgrid: {root:"rows", repeatitems: true, cell:"cell"}
+		},ts.p.localReader);
+		if(ts.p.scroll){
+			ts.p.pgbuttons = false; ts.p.pginput=false; ts.p.rowList=[];
+		}
+		if(ts.p.data.length) { refreshIndex(); }
+		var thead = "<thead><tr class='ui-jqgrid-labels' role='rowheader'>",
+		tdc, idn, w, res, sort,
+		td, ptr, tbody, imgs,iac="",idc="";
+		if(ts.p.shrinkToFit===true && ts.p.forceFit===true) {
+			for (i=ts.p.colModel.length-1;i>=0;i--){
+				if(!ts.p.colModel[i].hidden) {
+					ts.p.colModel[i].resizable=false;
+					break;
+				}
+			}
+		}
+		if(ts.p.viewsortcols[1] == 'horizontal') {iac=" ui-i-asc";idc=" ui-i-desc";}
+		tdc = isMSIE ?  "class='ui-th-div-ie'" :"";
+		imgs = "<span class='s-ico' style='display:none'><span sort='asc' class='ui-grid-ico-sort ui-icon-asc"+iac+" ui-state-disabled ui-icon ui-icon-triangle-1-n ui-sort-"+dir+"'></span>";
+		imgs += "<span sort='desc' class='ui-grid-ico-sort ui-icon-desc"+idc+" ui-state-disabled ui-icon ui-icon-triangle-1-s ui-sort-"+dir+"'></span></span>";
+		for(i=0;i<this.p.colNames.length;i++){
+			var tooltip = ts.p.headertitles ? (" title=\""+$.jgrid.stripHtml(ts.p.colNames[i])+"\"") :"";
+			thead += "<th id='"+ts.p.id+"_"+ts.p.colModel[i].name+"' role='columnheader' class='ui-state-default ui-th-column ui-th-"+dir+"'"+ tooltip+">";
+			idn = ts.p.colModel[i].index || ts.p.colModel[i].name;
+			thead += "<div id='jqgh_"+ts.p.id+"_"+ts.p.colModel[i].name+"' "+tdc+">"+ts.p.colNames[i];
+			if(!ts.p.colModel[i].width)  { ts.p.colModel[i].width = 150; }
+			else { ts.p.colModel[i].width = parseInt(ts.p.colModel[i].width,10); }
+			if(typeof(ts.p.colModel[i].title) !== "boolean") { ts.p.colModel[i].title = true; }
+			if (idn == ts.p.sortname) {
+				ts.p.lastsort = i;
+			}
+			thead += imgs+"</div></th>";
+		}
+		thead += "</tr></thead>";
+		imgs = null;
+		$(this).append(thead);
+		$("thead tr:first th",this).hover(function(){$(this).addClass('ui-state-hover');},function(){$(this).removeClass('ui-state-hover');});
+		if(this.p.multiselect) {
+			var emp=[], chk;
+			$('#cb_'+$.jgrid.jqID(ts.p.id),this).bind('click',function(){
+				ts.p.selarrrow = [];
+				var froz = ts.p.frozenColumns === true ? ts.p.id + "_frozen" : "";
+				if (this.checked) {
+					$(ts.rows).each(function(i) {
+						if (i>0) {
+							if(!$(this).hasClass("ui-subgrid") && !$(this).hasClass("jqgroup") && !$(this).hasClass('ui-state-disabled')){
+								$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id) )[ts.p.useProp ? 'prop': 'attr']("checked",true);
+								$(this).addClass("ui-state-highlight").attr("aria-selected","true");  
+								ts.p.selarrrow.push(this.id);
+								ts.p.selrow = this.id;
+								if(froz) {
+									$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id), ts.grid.fbDiv )[ts.p.useProp ? 'prop': 'attr']("checked",true);
+									$("#"+$.jgrid.jqID(this.id), ts.grid.fbDiv).addClass("ui-state-highlight");
+								}
+							}
+						}
+					});
+					chk=true;
+					emp=[];
+				}
+				else {
+					$(ts.rows).each(function(i) {
+						if(i>0) {
+							if(!$(this).hasClass("ui-subgrid") && !$(this).hasClass('ui-state-disabled')){
+								$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id) )[ts.p.useProp ? 'prop': 'attr']("checked", false);
+								$(this).removeClass("ui-state-highlight").attr("aria-selected","false");
+								emp.push(this.id);
+								if(froz) {
+									$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(this.id), ts.grid.fbDiv )[ts.p.useProp ? 'prop': 'attr']("checked",false);
+									$("#"+$.jgrid.jqID(this.id), ts.grid.fbDiv).removeClass("ui-state-highlight");
+								}
+							}
+						}
+					});
+					ts.p.selrow = null;
+					chk=false;
+				}
+				$(ts).triggerHandler("jqGridSelectAll", [chk ? ts.p.selarrrow : emp, chk]);
+				if($.isFunction(ts.p.onSelectAll)) {ts.p.onSelectAll.call(ts, chk ? ts.p.selarrrow : emp,chk);}
+			});
+		}
+
+		if(ts.p.autowidth===true) {
+			var pw = $(eg).innerWidth();
+			ts.p.width = pw > 0?  pw: 'nw';
+		}
+		setColWidth();
+		$(eg).css("width",grid.width+"px").append("<div class='ui-jqgrid-resize-mark' id='rs_m"+ts.p.id+"'>&#160;</div>");
+		$(gv).css("width",grid.width+"px");
+		thead = $("thead:first",ts).get(0);
+		var	tfoot = "";
+		if(ts.p.footerrow) { tfoot += "<table role='grid' style='width:"+ts.p.tblwidth+"px' class='ui-jqgrid-ftable' cellspacing='0' cellpadding='0' border='0'><tbody><tr role='row' class='ui-widget-content footrow footrow-"+dir+"'>"; }
+		var thr = $("tr:first",thead),
+		firstr = "<tr class='jqgfirstrow' role='row' style='height:auto'>";
+		ts.p.disableClick=false;
+		$("th",thr).each(function ( j ) {
+			w = ts.p.colModel[j].width;
+			if(typeof ts.p.colModel[j].resizable === 'undefined') {ts.p.colModel[j].resizable = true;}
+			if(ts.p.colModel[j].resizable){
+				res = document.createElement("span");
+				$(res).html("&#160;").addClass('ui-jqgrid-resize ui-jqgrid-resize-'+dir);
+				if(!$.browser.opera) { $(res).css("cursor","col-resize"); }
+				$(this).addClass(ts.p.resizeclass);
+			} else {
+				res = "";
+			}
+			$(this).css("width",w+"px").prepend(res);
+			var hdcol = "";
+			if( ts.p.colModel[j].hidden ) {
+				$(this).css("display","none");
+				hdcol = "display:none;";
+			}
+			firstr += "<td role='gridcell' style='height:0px;width:"+w+"px;"+hdcol+"'></td>";
+			grid.headers[j] = { width: w, el: this };
+			sort = ts.p.colModel[j].sortable;
+			if( typeof sort !== 'boolean') {ts.p.colModel[j].sortable =  true; sort=true;}
+			var nm = ts.p.colModel[j].name;
+			if( !(nm == 'cb' || nm=='subgrid' || nm=='rn') ) {
+				if(ts.p.viewsortcols[2]){
+					$(">div",this).addClass('ui-jqgrid-sortable');
+				}
+			}
+			if(sort) {
+				if(ts.p.viewsortcols[0]) {$("div span.s-ico",this).show(); if(j==ts.p.lastsort){ $("div span.ui-icon-"+ts.p.sortorder,this).removeClass("ui-state-disabled");}}
+				else if( j == ts.p.lastsort) {$("div span.s-ico",this).show();$("div span.ui-icon-"+ts.p.sortorder,this).removeClass("ui-state-disabled");}
+			}
+			if(ts.p.footerrow) { tfoot += "<td role='gridcell' "+formatCol(j,0,'', null, '', false)+">&#160;</td>"; }
+		}).mousedown(function(e) {
+			if ($(e.target).closest("th>span.ui-jqgrid-resize").length != 1) { return; }
+			var ci = getColumnHeaderIndex(this);
+			if(ts.p.forceFit===true) {ts.p.nv= nextVisible(ci);}
+			grid.dragStart(ci, e, getOffset(ci));
+			return false;
+		}).click(function(e) {
+			if (ts.p.disableClick) {
+				ts.p.disableClick = false;
+				return false;
+			}
+			var s = "th>div.ui-jqgrid-sortable",r,d;
+			if (!ts.p.viewsortcols[2]) { s = "th>div>span>span.ui-grid-ico-sort"; }
+			var t = $(e.target).closest(s);
+			if (t.length != 1) { return; }
+			var ci = getColumnHeaderIndex(this);
+			if (!ts.p.viewsortcols[2]) { r=true;d=t.attr("sort"); }
+			sortData( $('div',this)[0].id, ci, r, d);
+			return false;
+		});
+		if (ts.p.sortable && $.fn.sortable) {
+			try {
+				$(ts).jqGrid("sortableColumns", thr);
+			} catch (e){}
+		}
+		if(ts.p.footerrow) { tfoot += "</tr></tbody></table>"; }
+		firstr += "</tr>";
+		tbody = document.createElement("tbody");
+		this.appendChild(tbody);
+		$(this).addClass('ui-jqgrid-btable').append(firstr);
+		firstr = null;
+		var hTable = $("<table class='ui-jqgrid-htable' style='width:"+ts.p.tblwidth+"px' role='grid' aria-labelledby='gbox_"+this.id+"' cellspacing='0' cellpadding='0' border='0'></table>").append(thead),
+		hg = (ts.p.caption && ts.p.hiddengrid===true) ? true : false,
+		hb = $("<div class='ui-jqgrid-hbox" + (dir=="rtl" ? "-rtl" : "" )+"'></div>");
+		thead = null;
+		grid.hDiv = document.createElement("div");
+		$(grid.hDiv)
+			.css({ width: grid.width+"px"})
+			.addClass("ui-state-default ui-jqgrid-hdiv")
+			.append(hb);
+		$(hb).append(hTable);
+		hTable = null;
+		if(hg) { $(grid.hDiv).hide(); }
+		if(ts.p.pager){
+			// TBD -- escape ts.p.pager here?
+			if(typeof ts.p.pager == "string") {if(ts.p.pager.substr(0,1) !="#") { ts.p.pager = "#"+ts.p.pager;} }
+			else { ts.p.pager = "#"+ $(ts.p.pager).attr("id");}
+			$(ts.p.pager).css({width: grid.width+"px"}).appendTo(eg).addClass('ui-state-default ui-jqgrid-pager ui-corner-bottom');
+			if(hg) {$(ts.p.pager).hide();}
+			setPager(ts.p.pager,'');
+		}
+		if( ts.p.cellEdit === false && ts.p.hoverrows === true) {
+		$(ts).bind('mouseover',function(e) {
+			ptr = $(e.target).closest("tr.jqgrow");
+			if($(ptr).attr("class") !== "ui-subgrid") {
+				$(ptr).addClass("ui-state-hover");
+			}
+		}).bind('mouseout',function(e) {
+			ptr = $(e.target).closest("tr.jqgrow");
+			$(ptr).removeClass("ui-state-hover");
+		});
+		}
+		var ri,ci, tdHtml;
+		$(ts).before(grid.hDiv).click(function(e) {
+			td = e.target;
+			ptr = $(td,ts.rows).closest("tr.jqgrow");
+			if($(ptr).length === 0 || ptr[0].className.indexOf( 'ui-state-disabled' ) > -1 || ($(td,ts).closest("table.ui-jqgrid-btable").attr('id') || '').replace("_frozen","") !== ts.id ) {
+				return this;
+			}
+			var scb = $(td).hasClass("cbox"),
+			cSel = $(ts).triggerHandler("jqGridBeforeSelectRow", [ptr[0].id, e]);
+			cSel = (cSel === false || cSel === 'stop') ? false : true;
+			if(cSel && $.isFunction(ts.p.beforeSelectRow)) { cSel = ts.p.beforeSelectRow.call(ts,ptr[0].id, e); }
+			if (td.tagName == 'A' || ((td.tagName == 'INPUT' || td.tagName == 'TEXTAREA' || td.tagName == 'OPTION' || td.tagName == 'SELECT' ) && !scb) ) { return; }
+			if(cSel === true) {
+				ri = ptr[0].id;
+				ci = $.jgrid.getCellIndex(td);
+				tdHtml = $(td).closest("td,th").html();
+				$(ts).triggerHandler("jqGridCellSelect", [ri,ci,tdHtml,e]);
+				if($.isFunction(ts.p.onCellSelect)) {
+					ts.p.onCellSelect.call(ts,ri,ci,tdHtml,e);
+				}
+				if(ts.p.cellEdit === true) {
+					if(ts.p.multiselect && scb){
+						$(ts).jqGrid("setSelection", ri ,true,e);
+					} else {
+						ri = ptr[0].rowIndex;
+						try {$(ts).jqGrid("editCell",ri,ci,true);} catch (_) {}
+					}
+				} else if ( !ts.p.multikey ) {
+					if(ts.p.multiselect && ts.p.multiboxonly) {
+						if(scb){$(ts).jqGrid("setSelection",ri,true,e);}
+						else {
+							var frz = ts.p.frozenColumns ? ts.p.id+"_frozen" : "";
+							$(ts.p.selarrrow).each(function(i,n){
+								var ind = ts.rows.namedItem(n);
+								$(ind).removeClass("ui-state-highlight");
+								$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(n))[ts.p.useProp ? 'prop': 'attr']("checked", false);
+								if(frz) {
+									$("#"+$.jgrid.jqID(n), "#"+$.jgrid.jqID(frz)).removeClass("ui-state-highlight");
+									$("#jqg_"+$.jgrid.jqID(ts.p.id)+"_"+$.jgrid.jqID(n), "#"+$.jgrid.jqID(frz))[ts.p.useProp ? 'prop': 'attr']("checked", false);
+								}
+							});
+							ts.p.selarrrow = [];
+							$(ts).jqGrid("setSelection",ri,true,e);
+						}
+					} else {
+						$(ts).jqGrid("setSelection",ri,true,e);
+					}
+				} else {
+					if(e[ts.p.multikey]) {
+						$(ts).jqGrid("setSelection",ri,true,e);
+					} else if(ts.p.multiselect && scb) {
+			

<TRUNCATED>

[43/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
new file mode 100644
index 0000000..d79438b
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/Cluster.java
@@ -0,0 +1,3802 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.ConnectException;
+import java.net.URL;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Random;
+import java.util.Iterator;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.TimeZone;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.commons.collections.buffer.CircularFifoBuffer;
+
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+
+/**
+ * Class Cluster This class is the Data Model for the data used for the Pulse
+ * Web UI.
+ *
+ * @author Anand Hariharan
+ * @since version 7.0.Beta 2012-09-23
+ */
+public class Cluster extends Thread {
+  private static final int POLL_INTERVAL = 5000;
+  public static final int MAX_SAMPLE_SIZE = 180;
+  public static final int ALERTS_MAX_SIZE = 1000;
+  public static final int PAGE_ALERTS_MAX_SIZE = 100;
+
+  private final PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  private final ResourceBundle resourceBundle = Repository.get()
+      .getResourceBundle();
+
+  private String jmxUserName;
+  private String jmxUserPassword;
+  private String serverName;
+  private String port;
+  private int stale = 0;
+  private float loadPerSec;
+
+  // start: fields defined in System MBean
+  private IClusterUpdater updater = null;
+  private DataBrowser dataBrowser = null;
+  private int memberCount;
+  private long clientConnectionCount;
+  private int locatorCount;
+  private int totalRegionCount;
+  private Long totalHeapSize = 0L;
+  private Long totalRegionEntryCount;
+  private int currentQueryCount;
+  private Long totalBytesOnDisk;
+  private float diskReadsRate;
+  private float diskWritesRate;
+  private float writePerSec;
+  private float readPerSec;
+  private float queriesPerSec;
+  private int avgDiskStorage;
+  private int avgDiskWritesRate;
+  private int runningFunctionCount;
+  private Long registeredCQCount;
+  private int subscriptionCount;
+  private int serverCount;
+  private int txnCommittedCount;
+  private int txnRollbackCount;
+  private Long usedHeapSize = 0L;
+  private Long garbageCollectionCount = 0L;
+  private int clusterId;
+  private int notificationPageNumber = 1;
+  private boolean connectedFlag;
+  private String connectionErrorMsg = "";
+
+  private Set<String> deletedMembers = new HashSet<String>();
+
+  private Map<String, List<Cluster.Member>> physicalToMember = new HashMap<String, List<Cluster.Member>>();
+
+  private Map<String, Cluster.Member> membersHMap = new HashMap<String, Cluster.Member>();
+
+  private Set<String> deletedRegions = new HashSet<String>();
+
+  private Map<String, Cluster.Region> clusterRegionMap = new ConcurrentHashMap<String, Cluster.Region>();
+  private List<Cluster.Alert> alertsList = new ArrayList<Cluster.Alert>();
+
+  private CircularFifoBuffer totalBytesOnDiskTrend = new CircularFifoBuffer(
+      MAX_SAMPLE_SIZE);
+  private CircularFifoBuffer throughoutWritesTrend = new CircularFifoBuffer(
+      MAX_SAMPLE_SIZE);
+  private CircularFifoBuffer throughoutReadsTrend = new CircularFifoBuffer(
+      MAX_SAMPLE_SIZE);
+  private CircularFifoBuffer writePerSecTrend = new CircularFifoBuffer(
+      MAX_SAMPLE_SIZE);
+  private CircularFifoBuffer readPerSecTrend = new CircularFifoBuffer(
+      MAX_SAMPLE_SIZE);
+  private CircularFifoBuffer queriesPerSecTrend = new CircularFifoBuffer(
+      MAX_SAMPLE_SIZE);
+  private CircularFifoBuffer memoryUsageTrend = new CircularFifoBuffer(
+      MAX_SAMPLE_SIZE);
+  private CircularFifoBuffer garbageCollectionTrend = new CircularFifoBuffer(
+      MAX_SAMPLE_SIZE);
+  private Long previousJVMPauseCount = 0L;
+
+  private HashMap<String, Boolean> wanInformation = new HashMap<String, Boolean>();
+  private Map<String, Cluster.Statement> clusterStatementMap = new ConcurrentHashMap<String, Cluster.Statement>();
+
+  public static final int CLUSTER_STAT_TOTAL_BYTES_ON_DISK = 0;
+  public static final int CLUSTER_STAT_THROUGHPUT_WRITES = 1;
+  public static final int CLUSTER_STAT_THROUGHPUT_READS = 2;
+  public static final int CLUSTER_STAT_WRITES_PER_SECOND = 3;
+  public static final int CLUSTER_STAT_READ_PER_SECOND = 4;
+  public static final int CLUSTER_STAT_QUERIES_PER_SECOND = 5;
+  public static final int CLUSTER_STAT_MEMORY_USAGE = 6;
+  public static final int CLUSTER_STAT_GARBAGE_COLLECTION = 7;
+
+  // end: fields defined in System MBean
+
+  // used for updating member's client data
+  public static long LAST_UPDATE_TIME = 0;
+
+  public int getStaleStatus() {
+    return this.stale;
+  }
+
+  private boolean stopUpdates = false;
+
+  private static final int MAX_HOSTS = 40;
+  private final List<String> hostNames = new ArrayList<String>();
+
+  public Object[] getStatisticTrend(int trendId) {
+
+    Object[] returnArray = null;
+    switch (trendId) {
+    case CLUSTER_STAT_TOTAL_BYTES_ON_DISK:
+      synchronized (this.totalBytesOnDiskTrend) {
+        returnArray = this.totalBytesOnDiskTrend.toArray();
+      }
+
+      break;
+
+    case CLUSTER_STAT_THROUGHPUT_READS:
+      synchronized (this.throughoutReadsTrend) {
+        returnArray = this.throughoutReadsTrend.toArray();
+      }
+      break;
+
+    case CLUSTER_STAT_THROUGHPUT_WRITES:
+      synchronized (this.throughoutWritesTrend) {
+        returnArray = this.throughoutWritesTrend.toArray();
+      }
+      break;
+
+    case CLUSTER_STAT_WRITES_PER_SECOND:
+      synchronized (this.writePerSecTrend) {
+        returnArray = this.writePerSecTrend.toArray();
+      }
+      break;
+
+    case CLUSTER_STAT_READ_PER_SECOND:
+      synchronized (this.readPerSecTrend) {
+        returnArray = this.readPerSecTrend.toArray();
+      }
+      break;
+
+    case CLUSTER_STAT_QUERIES_PER_SECOND:
+      synchronized (this.queriesPerSecTrend) {
+        returnArray = this.queriesPerSecTrend.toArray();
+      }
+      break;
+
+    case CLUSTER_STAT_MEMORY_USAGE:
+      synchronized (this.memoryUsageTrend) {
+        returnArray = this.memoryUsageTrend.toArray();
+      }
+      break;
+
+    case CLUSTER_STAT_GARBAGE_COLLECTION:
+      synchronized (this.garbageCollectionTrend) {
+        returnArray = this.garbageCollectionTrend.toArray();
+      }
+      break;
+
+    }
+
+    return returnArray;
+  }
+
+  /**
+   * Member Inner Class
+   *
+   * @author Anand Hariharan
+   *
+   */
+  public static class Member {
+
+    // start: fields defined in MBean
+    private String gemfireVersion;
+    private boolean manager;
+    private int totalRegionCount;
+    private String host;
+    private long currentHeapSize;
+    private long maxHeapSize;
+    private int avgHeapUsage;
+    private long OffHeapFreeSize;
+    private long OffHeapUsedSize;
+    private long totalBytesOnDisk;
+    private String memberPort;
+
+    private Float cpuUsage = 0.0f;
+    private Float hostCpuUsage = 0.0f;
+    private Long uptime;
+    private String name;
+    private float getsRate;
+    private float putsRate;
+    private boolean isCache;
+    private boolean isGateway;
+    private boolean isLocator;
+    private boolean isServer;
+    private Double loadAverage;
+    private int numThreads;
+    private Long totalFileDescriptorOpen;
+    private Long garbageCollectionCount = 0L;
+    private float throughputWrites;
+    private float throughputReads;
+    private long totalDiskUsage;
+    private String queueBacklog;
+    private String id;
+    private long numSqlfireClients = 0;
+
+    private List<String> serverGroups = new ArrayList<String>();
+    private List<String> redundancyZones = new ArrayList<String>();
+
+    private CircularFifoBuffer cpuUsageSamples = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer heapUsageSamples = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private HashMap<String, Cluster.Region> memberRegions = new HashMap<String, Cluster.Region>();
+    private HashMap<String, Cluster.Client> memberClientsHMap = new HashMap<String, Cluster.Client>();
+    private CircularFifoBuffer totalBytesOnDiskSamples = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer getsPerSecond = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer putsPerSecond = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer throughputWritesTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer throughputReadsTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer garbageCollectionSamples = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private Long previousJVMPauseCount = 0L;
+
+    private Cluster.GatewayReceiver gatewayReceiver = null;
+    private List<Cluster.GatewaySender> gatewaySenderList = new ArrayList<Cluster.GatewaySender>();
+    private List<Cluster.AsyncEventQueue> asyncEventQueueList = new ArrayList<Cluster.AsyncEventQueue>();
+    // end: fields defined in MBean
+
+    public static final int MEMBER_STAT_GARBAGE_COLLECTION = 0;
+    public static final int MEMBER_STAT_HEAP_USAGE_SAMPLE = 1;
+    public static final int MEMBER_STAT_CPU_USAGE_SAMPLE = 2;
+    public static final int MEMBER_STAT_GETS_PER_SECOND = 3;
+    public static final int MEMBER_STAT_PUTS_PER_SECOND = 4;
+    public static final int MEMBER_STAT_THROUGHPUT_WRITES = 5;
+    public static final int MEMBER_STAT_THROUGHPUT_READS = 6;
+
+    public Cluster.Region[] getMemberRegionsList() {
+      Cluster.Region[] memberReg = null;
+      synchronized (memberRegions) {
+        memberReg = new Cluster.Region[memberRegions.size()];
+        memberReg = memberRegions.values().toArray(memberReg);
+      }
+
+      return memberReg;
+    }
+
+    public Cluster.Client[] getMemberClients() {
+      Cluster.Client[] memberClients = null;
+      synchronized (memberClientsHMap) {
+        memberClients = new Cluster.Client[memberClientsHMap.size()];
+        memberClients = memberClientsHMap.values().toArray(memberClients);
+      }
+
+      return memberClients;
+    }
+
+    public Cluster.GatewaySender[] getMemberGatewaySenders() {
+      Cluster.GatewaySender[] memberGWS = null;
+      synchronized (gatewaySenderList) {
+        memberGWS = new Cluster.GatewaySender[gatewaySenderList.size()];
+        memberGWS = gatewaySenderList.toArray(memberGWS);
+      }
+      return memberGWS;
+    }
+
+    public Cluster.AsyncEventQueue[] getMemberAsyncEventQueueList() {
+      Cluster.AsyncEventQueue[] memberAEQ = null;
+      synchronized (asyncEventQueueList) {
+        memberAEQ = new Cluster.AsyncEventQueue[asyncEventQueueList.size()];
+        memberAEQ = asyncEventQueueList.toArray(memberAEQ);
+      }
+      return memberAEQ;
+    }
+
+    public Object[] getMemberStatisticTrend(int trendId) {
+      Object[] returnArray = null;
+      switch (trendId) {
+      case MEMBER_STAT_GARBAGE_COLLECTION:
+        synchronized (this.garbageCollectionSamples) {
+          returnArray = this.garbageCollectionSamples.toArray();
+        }
+
+        break;
+
+      case MEMBER_STAT_HEAP_USAGE_SAMPLE:
+        synchronized (this.heapUsageSamples) {
+          returnArray = this.heapUsageSamples.toArray();
+        }
+        break;
+
+      case MEMBER_STAT_CPU_USAGE_SAMPLE:
+        synchronized (this.cpuUsageSamples) {
+          returnArray = this.cpuUsageSamples.toArray();
+        }
+        break;
+
+      case MEMBER_STAT_GETS_PER_SECOND:
+        synchronized (this.getsPerSecond) {
+          returnArray = this.getsPerSecond.toArray();
+        }
+        break;
+
+      case MEMBER_STAT_PUTS_PER_SECOND:
+        synchronized (this.putsPerSecond) {
+          returnArray = this.putsPerSecond.toArray();
+        }
+        break;
+
+      case MEMBER_STAT_THROUGHPUT_WRITES:
+        synchronized (this.throughputWritesTrend) {
+          returnArray = this.throughputWritesTrend.toArray();
+        }
+        break;
+
+      case MEMBER_STAT_THROUGHPUT_READS:
+        synchronized (this.throughputReadsTrend) {
+          returnArray = this.throughputReadsTrend.toArray();
+        }
+        break;
+      }
+
+      return returnArray;
+    }
+
+    public String getGemfireVersion() {
+      return gemfireVersion;
+    }
+
+    public void setGemfireVersion(String gemfireVersion) {
+      this.gemfireVersion = gemfireVersion;
+    }
+
+    public String getMemberPort() {
+      return this.memberPort;
+    }
+
+    public void setMemberPort(String memberPort) {
+      this.memberPort = memberPort;
+    }
+
+    public float getThroughputWrites() {
+      return this.throughputWrites;
+    }
+
+    public void setThroughputWrites(float throughputWrites) {
+      this.throughputWrites = throughputWrites;
+    }
+
+    public float getThroughputReads() {
+      return this.throughputReads;
+    }
+
+    public void setThroughputReads(float throughputReads) {
+      this.throughputReads = throughputReads;
+    }
+
+    public long getTotalDiskUsage() {
+      return this.totalDiskUsage;
+    }
+
+    public void setTotalDiskUsage(long totalDiskUsage) {
+      this.totalDiskUsage = totalDiskUsage;
+    }
+
+    public String getId() {
+      return this.id;
+    }
+
+    public String getName() {
+      return this.name;
+    }
+
+    public Double getLoadAverage() {
+      return this.loadAverage;
+    }
+
+    public void setLoadAverage(Double loadAverage) {
+      this.loadAverage = loadAverage;
+    }
+
+    public String getHost() {
+      return this.host;
+    }
+
+    public Long getUptime() {
+      return this.uptime;
+    }
+
+    public String getQueueBacklog() {
+      return this.queueBacklog;
+    }
+
+    public HashMap<String, Cluster.Region> getMemberRegions() {
+      return this.memberRegions;
+    }
+
+    public void setMemberRegions(HashMap<String, Cluster.Region> memberRegions) {
+      this.memberRegions = memberRegions;
+    }
+
+    public long getCurrentHeapSize() {
+      return this.currentHeapSize;
+    }
+
+    public void setCurrentHeapSize(long currentHeapSize) {
+      this.currentHeapSize = currentHeapSize;
+    }
+
+    public long getMaxHeapSize() {
+      return this.maxHeapSize;
+    }
+
+    public void setMaxHeapSize(long maxHeapSize) {
+      this.maxHeapSize = maxHeapSize;
+    }
+
+    public boolean isManager() {
+      return this.manager;
+    }
+
+    public void setManager(boolean manager) {
+      this.manager = manager;
+    }
+
+    public int getAvgHeapUsage() {
+      return this.avgHeapUsage;
+    }
+
+    public void setAvgHeapUsage(int avgHeapUsage) {
+      this.avgHeapUsage = avgHeapUsage;
+    }
+
+    public long getOffHeapFreeSize() {
+      return OffHeapFreeSize;
+    }
+
+    public void setOffHeapFreeSize(long offHeapFreeSize) {
+      this.OffHeapFreeSize = offHeapFreeSize;
+    }
+
+    public long getOffHeapUsedSize() {
+      return OffHeapUsedSize;
+    }
+
+    public void setOffHeapUsedSize(long offHeapUsedSize) {
+      this.OffHeapUsedSize = offHeapUsedSize;
+    }
+
+    public void setId(String id) {
+      this.id = id;
+    }
+
+    public void setName(String name) {
+      this.name = name;
+    }
+
+    public void setHost(String host) {
+      this.host = host;
+    }
+
+    public void setUptime(Long uptime) {
+      this.uptime = uptime;
+    }
+
+    public void setQueueBacklog(String queueBacklog) {
+      this.queueBacklog = queueBacklog;
+    }
+
+    public int getTotalRegionCount() {
+      return this.totalRegionCount;
+    }
+
+    public void setTotalRegionCount(int totalRegionCount) {
+      this.totalRegionCount = totalRegionCount;
+    }
+
+    public long getTotalBytesOnDisk() {
+      return this.totalBytesOnDisk;
+    }
+
+    public void setTotalBytesOnDisk(long totalBytesOnDisk) {
+      this.totalBytesOnDisk = totalBytesOnDisk;
+    }
+
+    public Float getCpuUsage() {
+      return this.cpuUsage;
+    }
+
+    public void setCpuUsage(Float cpuUsage) {
+      this.cpuUsage = cpuUsage;
+    }
+
+    public Float getHostCpuUsage() {
+      return this.hostCpuUsage;
+    }
+
+    public void setHostCpuUsage(Float hostCpuUsage) {
+      this.hostCpuUsage = hostCpuUsage;
+    }
+
+    public float getGetsRate() {
+      return this.getsRate;
+    }
+
+    public void setGetsRate(float getsRate) {
+      this.getsRate = getsRate;
+    }
+
+    public float getPutsRate() {
+      return this.putsRate;
+    }
+
+    public void setPutsRate(float putsRate) {
+      this.putsRate = putsRate;
+    }
+
+    public HashMap<String, Cluster.Client> getMemberClientsHMap() {
+      return this.memberClientsHMap;
+    }
+
+    public void setMemberClientsHMap(
+        HashMap<String, Cluster.Client> memberClientsHMap) {
+      this.memberClientsHMap = memberClientsHMap;
+    }
+
+    public boolean isCache() {
+      return this.isCache;
+    }
+
+    public void setCache(boolean isCache) {
+      this.isCache = isCache;
+    }
+
+    public boolean isGateway() {
+      return this.isGateway;
+    }
+
+    public void setGateway(boolean isGateway) {
+      this.isGateway = isGateway;
+    }
+
+    public int getNumThreads() {
+      return this.numThreads;
+    }
+
+    public void setNumThreads(int numThreads) {
+      this.numThreads = numThreads;
+    }
+
+    public Long getTotalFileDescriptorOpen() {
+      return this.totalFileDescriptorOpen;
+    }
+
+    public void setTotalFileDescriptorOpen(Long totalFileDescriptorOpen) {
+      this.totalFileDescriptorOpen = totalFileDescriptorOpen;
+    }
+
+    public Long getGarbageCollectionCount() {
+      return this.garbageCollectionCount;
+    }
+
+    public void setGarbageCollectionCount(Long garbageCollectionCount) {
+      this.garbageCollectionCount = garbageCollectionCount;
+    }
+
+    public boolean isLocator() {
+      return this.isLocator;
+    }
+
+    public void setLocator(boolean isLocator) {
+      this.isLocator = isLocator;
+    }
+
+    public Cluster.GatewayReceiver getGatewayReceiver() {
+      return this.gatewayReceiver;
+    }
+
+    public void setGatewayReceiver(Cluster.GatewayReceiver gatewayReceiver) {
+      this.gatewayReceiver = gatewayReceiver;
+    }
+
+    public List<Cluster.GatewaySender> getGatewaySenderList() {
+      return this.gatewaySenderList;
+    }
+
+    public void setGatewaySenderList(
+        List<Cluster.GatewaySender> gatewaySenderList) {
+      this.gatewaySenderList = gatewaySenderList;
+    }
+
+    public List<Cluster.AsyncEventQueue> getAsyncEventQueueList() {
+      return this.asyncEventQueueList;
+    }
+
+    public void setAsyncEventQueueList(
+        List<Cluster.AsyncEventQueue> asyncEventQueueList) {
+      this.asyncEventQueueList = asyncEventQueueList;
+    }
+
+    public boolean isServer() {
+      return this.isServer;
+    }
+
+    public void setServer(boolean isServer) {
+      this.isServer = isServer;
+    }
+
+    public List<String> getServerGroups() {
+      return this.serverGroups;
+    }
+
+    public void setServerGroups(List<String> serverGroups) {
+      this.serverGroups = serverGroups;
+    }
+
+    public List<String> getRedundancyZones() {
+      return this.redundancyZones;
+    }
+
+    public void setRedundancyZones(List<String> redundancyZones) {
+      this.redundancyZones = redundancyZones;
+    }
+
+    public CircularFifoBuffer getCpuUsageSamples() {
+      return this.cpuUsageSamples;
+    }
+
+    public void setCpuUsageSamples(CircularFifoBuffer cpuUsageSamples) {
+      this.cpuUsageSamples = cpuUsageSamples;
+    }
+
+    public CircularFifoBuffer getHeapUsageSamples() {
+      return this.heapUsageSamples;
+    }
+
+    public void setHeapUsageSamples(CircularFifoBuffer heapUsageSamples) {
+      this.heapUsageSamples = heapUsageSamples;
+    }
+
+    public CircularFifoBuffer getTotalBytesOnDiskSamples() {
+      return this.totalBytesOnDiskSamples;
+    }
+
+    public void setTotalBytesOnDiskSamples(
+        CircularFifoBuffer totalBytesOnDiskSamples) {
+      this.totalBytesOnDiskSamples = totalBytesOnDiskSamples;
+    }
+
+    public CircularFifoBuffer getGetsPerSecond() {
+      return this.getsPerSecond;
+    }
+
+    public void setGetsPerSecond(CircularFifoBuffer getsPerSecond) {
+      this.getsPerSecond = getsPerSecond;
+    }
+
+    public CircularFifoBuffer getPutsPerSecond() {
+      return this.putsPerSecond;
+    }
+
+    public void setPutsPerSecond(CircularFifoBuffer putsPerSecond) {
+      this.putsPerSecond = putsPerSecond;
+    }
+
+    public CircularFifoBuffer getThroughputWritesTrend() {
+      return this.throughputWritesTrend;
+    }
+
+    public void setThroughputWritesTrend(
+        CircularFifoBuffer throughputWritesTrend) {
+      this.throughputWritesTrend = throughputWritesTrend;
+    }
+
+    public CircularFifoBuffer getThroughputReadsTrend() {
+      return this.throughputReadsTrend;
+    }
+
+    public void setThroughputReadsTrend(CircularFifoBuffer throughputReadsTrend) {
+      this.throughputReadsTrend = throughputReadsTrend;
+    }
+
+    public CircularFifoBuffer getGarbageCollectionSamples() {
+      return this.garbageCollectionSamples;
+    }
+
+    public void setGarbageCollectionSamples(
+        CircularFifoBuffer garbageCollectionSamples) {
+      this.garbageCollectionSamples = garbageCollectionSamples;
+    }
+
+    public Long getPreviousJVMPauseCount() {
+      return this.previousJVMPauseCount;
+    }
+
+    public void setPreviousJVMPauseCount(Long previousJVMPauseCount) {
+      this.previousJVMPauseCount = previousJVMPauseCount;
+    }
+
+    public long getNumSqlfireClients() {
+      return numSqlfireClients;
+    }
+
+    public void setNumSqlfireClients(long numSqlfireClients) {
+      this.numSqlfireClients = numSqlfireClients;
+    }
+
+    public void updateMemberClientsHMap(
+        HashMap<String, Cluster.Client> memberClientsHM) {
+
+      if (Cluster.LAST_UPDATE_TIME == 0) {
+        Cluster.LAST_UPDATE_TIME = System.nanoTime();
+      }
+
+      long systemNanoTime = System.nanoTime();
+
+      for (Map.Entry<String, Cluster.Client> entry : memberClientsHM.entrySet()) {
+        String clientId = entry.getKey();
+        Cluster.Client client = entry.getValue();
+
+        if (memberClientsHMap.get(clientId) != null) {
+          Client existingClient = memberClientsHMap.get(clientId);
+          Client updatedClient = memberClientsHM.get(clientId);
+
+          existingClient.setConnected(updatedClient.isConnected());
+          existingClient.setGets(updatedClient.getGets());
+          existingClient.setPuts(updatedClient.getPuts());
+          existingClient.setCpus(updatedClient.getCpus());
+          existingClient.setQueueSize(updatedClient.getQueueSize());
+          existingClient.setStatus(updatedClient.getStatus());
+          existingClient.setThreads(updatedClient.getThreads());
+          existingClient.setClientCQCount(updatedClient.getClientCQCount()); 
+       	  existingClient.setSubscriptionEnabled(updatedClient.isSubscriptionEnabled()); 
+          long elapsedTime = updatedClient.getUptime()
+              - existingClient.getUptime();
+          existingClient.setUptime(updatedClient.getUptime());
+
+          // set cpu usage
+          long lastCPUTime = 0;
+          lastCPUTime = existingClient.getProcessCpuTime();
+          long currCPUTime = 0;
+          currCPUTime = updatedClient.getProcessCpuTime();
+
+          float newCPUTime = (float) (currCPUTime - lastCPUTime)
+              / (elapsedTime * 1000000000);
+
+          float newCPUUsage = 0;
+          int availableCpus = updatedClient.getCpus();
+          if (availableCpus > 0) {
+            newCPUUsage = newCPUTime / availableCpus;
+          }
+
+          existingClient.setCpuUsage(newCPUUsage);
+          existingClient.setProcessCpuTime(currCPUTime);
+
+        } else {
+          // Add client to clients list
+          memberClientsHMap.put(clientId, client);
+        }
+
+      }
+
+      // Remove unwanted entries from clients list
+      HashMap<String, Cluster.Client> memberClientsHMapNew = new HashMap<String, Cluster.Client>();
+      for (Map.Entry<String, Cluster.Client> entry : memberClientsHMap
+          .entrySet()) {
+        String clientId = entry.getKey();
+        if (memberClientsHM.get(clientId) != null) {
+          memberClientsHMapNew.put(clientId, memberClientsHMap.get(clientId));
+        }
+      }
+      // replace existing memberClientsHMap by memberClientsHMapNew
+      this.setMemberClientsHMap(memberClientsHMapNew);
+
+      // update last update time
+      Cluster.LAST_UPDATE_TIME = systemNanoTime;
+
+    }
+
+  }
+
+  /**
+   * Member Inner Class
+   *
+   * @author Riya Bhandekar
+   *
+   */
+  public static class Statement {
+
+    private String queryDefn;
+    private long numTimesCompiled;
+    private long numExecution;
+    private long numExecutionsInProgress;
+    private long numTimesGlobalIndexLookup;
+    private long numRowsModified;
+    private long parseTime;
+    private long bindTime;
+    private long optimizeTime;
+    private long routingInfoTime;
+    private long generateTime;
+    private long totalCompilationTime;
+    private long executionTime;
+    private long projectionTime;
+    private long totalExecutionTime;
+    private long rowsModificationTime;
+    private long qNNumRowsSeen;
+    private long qNMsgSendTime;
+    private long qNMsgSerTime;
+    private long qNRespDeSerTime;
+
+    public static String[] getGridColumnNames() {
+      String[] colNames = new String[] {
+          PulseConstants.MBEAN_COLNAME_QUERYDEFINITION,
+          PulseConstants.MBEAN_COLNAME_NUMEXECUTION,
+          PulseConstants.MBEAN_COLNAME_TOTALEXECUTIONTIME,
+          PulseConstants.MBEAN_COLNAME_NUMEXECUTIONSINPROGRESS,
+          PulseConstants.MBEAN_COLNAME_NUMTIMESCOMPILED,
+          PulseConstants.MBEAN_COLNAME_NUMTIMESGLOBALINDEXLOOKUP,
+          PulseConstants.MBEAN_COLNAME_NUMROWSMODIFIED,
+          PulseConstants.MBEAN_COLNAME_PARSETIME,
+          PulseConstants.MBEAN_COLNAME_BINDTIME,
+          PulseConstants.MBEAN_COLNAME_OPTIMIZETIME,
+          PulseConstants.MBEAN_COLNAME_ROUTINGINFOTIME,
+          PulseConstants.MBEAN_COLNAME_GENERATETIME,
+          PulseConstants.MBEAN_COLNAME_TOTALCOMPILATIONTIME,
+          PulseConstants.MBEAN_COLNAME_EXECUTIONTIME,
+          PulseConstants.MBEAN_COLNAME_PROJECTIONTIME,
+          PulseConstants.MBEAN_COLNAME_ROWSMODIFICATIONTIME,
+          PulseConstants.MBEAN_COLNAME_QNNUMROWSSEEN,
+          PulseConstants.MBEAN_COLNAME_QNMSGSENDTIME,
+          PulseConstants.MBEAN_COLNAME_QNMSGSERTIME,
+          PulseConstants.MBEAN_COLNAME_QNRESPDESERTIME };
+      return colNames;
+    }
+
+    public static String[] getGridColumnAttributes() {
+      String[] colAttributes = new String[] {
+          PulseConstants.MBEAN_ATTRIBUTE_QUERYDEFINITION,
+          PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTION,
+          PulseConstants.MBEAN_ATTRIBUTE_TOTALEXECUTIONTIME,
+          PulseConstants.MBEAN_ATTRIBUTE_NUMEXECUTIONSINPROGRESS,
+          PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESCOMPILED,
+          PulseConstants.MBEAN_ATTRIBUTE_NUMTIMESGLOBALINDEXLOOKUP,
+          PulseConstants.MBEAN_ATTRIBUTE_NUMROWSMODIFIED,
+          PulseConstants.MBEAN_ATTRIBUTE_PARSETIME,
+          PulseConstants.MBEAN_ATTRIBUTE_BINDTIME,
+          PulseConstants.MBEAN_ATTRIBUTE_OPTIMIZETIME,
+          PulseConstants.MBEAN_ATTRIBUTE_ROUTINGINFOTIME,
+          PulseConstants.MBEAN_ATTRIBUTE_GENERATETIME,
+          PulseConstants.MBEAN_ATTRIBUTE_TOTALCOMPILATIONTIME,
+          PulseConstants.MBEAN_ATTRIBUTE_EXECUTIONTIME,
+          PulseConstants.MBEAN_ATTRIBUTE_PROJECTIONTIME,
+
+          PulseConstants.MBEAN_ATTRIBUTE_ROWSMODIFICATIONTIME,
+          PulseConstants.MBEAN_ATTRIBUTE_QNNUMROWSSEEN,
+          PulseConstants.MBEAN_ATTRIBUTE_QNMSGSENDTIME,
+          PulseConstants.MBEAN_ATTRIBUTE_QNMSGSERTIME,
+          PulseConstants.MBEAN_ATTRIBUTE_QNRESPDESERTIME };
+      return colAttributes;
+    }
+
+    public static int[] getGridColumnWidths() {
+      int[] colWidths = new int[] { 300, 150, 160, 180, 150, 200, 150, 130, 130,
+          160, 140, 180, 170, 160, 130,  190, 170, 170, 170, 200 };
+      return colWidths;
+    }
+
+    /**
+     * @return the numTimesCompiled
+     */
+    public String getQueryDefinition() {
+      return queryDefn;
+    }
+
+    /**
+     * @param numTimesCompiled
+     *          the numTimesCompiled to set
+     */
+    public void setQueryDefinition(String queryDefn) {
+      this.queryDefn = queryDefn;
+    }
+
+    /**
+     * @return the numTimesCompiled
+     */
+    public long getNumTimesCompiled() {
+      return numTimesCompiled;
+    }
+
+    /**
+     * @param numTimesCompiled
+     *          the numTimesCompiled to set
+     */
+    public void setNumTimesCompiled(long numTimesCompiled) {
+      this.numTimesCompiled = numTimesCompiled;
+    }
+
+    /**
+     * @return the numExecution
+     */
+    public long getNumExecution() {
+      return numExecution;
+    }
+
+    /**
+     * @param numExecution
+     *          the numExecution to set
+     */
+    public void setNumExecution(long numExecution) {
+      this.numExecution = numExecution;
+    }
+
+    /**
+     * @return the numExecutionsInProgress
+     */
+    public long getNumExecutionsInProgress() {
+      return numExecutionsInProgress;
+    }
+
+    /**
+     * @param numExecutionsInProgress
+     *          the numExecutionsInProgress to set
+     */
+    public void setNumExecutionsInProgress(long numExecutionsInProgress) {
+      this.numExecutionsInProgress = numExecutionsInProgress;
+    }
+
+    /**
+     * @return the numTimesGlobalIndexLookup
+     */
+    public long getNumTimesGlobalIndexLookup() {
+      return numTimesGlobalIndexLookup;
+    }
+
+    /**
+     * @param numTimesGlobalIndexLookup
+     *          the numTimesGlobalIndexLookup to set
+     */
+    public void setNumTimesGlobalIndexLookup(long numTimesGlobalIndexLookup) {
+      this.numTimesGlobalIndexLookup = numTimesGlobalIndexLookup;
+    }
+
+    /**
+     * @return the numRowsModified
+     */
+    public long getNumRowsModified() {
+      return numRowsModified;
+    }
+
+    /**
+     * @param numRowsModified
+     *          the numRowsModified to set
+     */
+    public void setNumRowsModified(long numRowsModified) {
+      this.numRowsModified = numRowsModified;
+    }
+
+    /**
+     * @return the parseTime
+     */
+    public long getParseTime() {
+      return parseTime;
+    }
+
+    /**
+     * @param parseTime
+     *          the parseTime to set
+     */
+    public void setParseTime(long parseTime) {
+      this.parseTime = parseTime;
+    }
+
+    /**
+     * @return the bindTime
+     */
+    public long getBindTime() {
+      return bindTime;
+    }
+
+    /**
+     * @param bindTime
+     *          the bindTime to set
+     */
+    public void setBindTime(long bindTime) {
+      this.bindTime = bindTime;
+    }
+
+    /**
+     * @return the optimizeTime
+     */
+    public long getOptimizeTime() {
+      return optimizeTime;
+    }
+
+    /**
+     * @param optimizeTime
+     *          the optimizeTime to set
+     */
+    public void setOptimizeTime(long optimizeTime) {
+      this.optimizeTime = optimizeTime;
+    }
+
+    /**
+     * @return the routingInfoTime
+     */
+    public long getRoutingInfoTime() {
+      return routingInfoTime;
+    }
+
+    /**
+     * @param routingInfoTime
+     *          the routingInfoTime to set
+     */
+    public void setRoutingInfoTime(long routingInfoTime) {
+      this.routingInfoTime = routingInfoTime;
+    }
+
+    /**
+     * @return the generateTime
+     */
+    public long getGenerateTime() {
+      return generateTime;
+    }
+
+    /**
+     * @param generateTime
+     *          the generateTime to set
+     */
+    public void setGenerateTime(long generateTime) {
+      this.generateTime = generateTime;
+    }
+
+    /**
+     * @return the totalCompilationTime
+     */
+    public long getTotalCompilationTime() {
+      return totalCompilationTime;
+    }
+
+    /**
+     * @param totalCompilationTime
+     *          the totalCompilationTime to set
+     */
+    public void setTotalCompilationTime(long totalCompilationTime) {
+      this.totalCompilationTime = totalCompilationTime;
+    }
+
+    /**
+     * @return the executionTime
+     */
+    public long getExecutionTime() {
+      return executionTime;
+    }
+
+    /**
+     * @param executionTime
+     *          the executionTime to set
+     */
+    public void setExecutionTime(long executionTime) {
+      this.executionTime = executionTime;
+    }
+
+    /**
+     * @return the projectionTime
+     */
+    public long getProjectionTime() {
+      return projectionTime;
+    }
+
+    /**
+     * @param projectionTime
+     *          the projectionTime to set
+     */
+    public void setProjectionTime(long projectionTime) {
+      this.projectionTime = projectionTime;
+    }
+
+    /**
+     * @return the totalExecutionTime
+     */
+    public long getTotalExecutionTime() {
+      return totalExecutionTime;
+    }
+
+    /**
+     * @param totalExecutionTime
+     *          the totalExecutionTime to set
+     */
+    public void setTotalExecutionTime(long totalExecutionTime) {
+      this.totalExecutionTime = totalExecutionTime;
+    }
+
+    /**
+     * @return the rowsModificationTime
+     */
+    public long getRowsModificationTime() {
+      return rowsModificationTime;
+    }
+
+    /**
+     * @param rowsModificationTime
+     *          the rowsModificationTime to set
+     */
+    public void setRowsModificationTime(long rowsModificationTime) {
+      this.rowsModificationTime = rowsModificationTime;
+    }
+
+    /**
+     * @return the qNNumRowsSeen
+     */
+    public long getqNNumRowsSeen() {
+      return qNNumRowsSeen;
+    }
+
+    /**
+     * @param qNNumRowsSeen
+     *          the qNNumRowsSeen to set
+     */
+    public void setqNNumRowsSeen(long qNNumRowsSeen) {
+      this.qNNumRowsSeen = qNNumRowsSeen;
+    }
+
+    /**
+     * @return the qNMsgSendTime
+     */
+    public long getqNMsgSendTime() {
+      return qNMsgSendTime;
+    }
+
+    /**
+     * @param qNMsgSendTime
+     *          the qNMsgSendTime to set
+     */
+    public void setqNMsgSendTime(long qNMsgSendTime) {
+      this.qNMsgSendTime = qNMsgSendTime;
+    }
+
+    /**
+     * @return the qNMsgSerTime
+     */
+    public long getqNMsgSerTime() {
+      return qNMsgSerTime;
+    }
+
+    /**
+     * @param qNMsgSerTime
+     *          the qNMsgSerTime to set
+     */
+    public void setqNMsgSerTime(long qNMsgSerTime) {
+      this.qNMsgSerTime = qNMsgSerTime;
+    }
+
+    /**
+     * @return the qNRespDeSerTime
+     */
+    public long getqNRespDeSerTime() {
+      return qNRespDeSerTime;
+    }
+
+    /**
+     * @param qNRespDeSerTime
+     *          the qNRespDeSerTime to set
+     */
+    public void setqNRespDeSerTime(long qNRespDeSerTime) {
+      this.qNRespDeSerTime = qNRespDeSerTime;
+    }
+  }
+
+  public static class RegionOnMember {
+
+    public static final int REGION_ON_MEMBER_STAT_GETS_PER_SEC_TREND = 0;
+    public static final int REGION_ON_MEMBER_STAT_PUTS_PER_SEC_TREND = 1;
+    public static final int REGION_ON_MEMBER_STAT_DISK_READS_PER_SEC_TREND = 3;
+    public static final int REGION_ON_MEMBER_STAT_DISK_WRITES_PER_SEC_TREND = 4;
+
+    private String regionFullPath;
+    private String memberName;
+    private long entrySize;
+    private long entryCount;
+    private float getsRate;
+    private float putsRate;
+    private float diskGetsRate;
+    private float diskPutsRate;
+    private int localMaxMemory;
+
+    private CircularFifoBuffer getsPerSecTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer putsPerSecTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer diskReadsPerSecTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer diskWritesPerSecTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+
+    /**
+     * @return the entrySize
+     */
+    public long getEntrySize() {
+      return entrySize;
+    }
+
+    /**
+     * @param entrySize the entrySize to set
+     */
+    public void setEntrySize(long entrySize) {
+      this.entrySize = entrySize;
+    }
+
+    /**
+     * @return the entryCount
+     */
+    public long getEntryCount() {
+      return entryCount;
+    }
+
+    /**
+     * @param entryCount the entryCount to set
+     */
+    public void setEntryCount(long entryCount) {
+      this.entryCount = entryCount;
+    }
+
+    /**
+     * @return the putsRate
+     */
+    public float getPutsRate() {
+      return putsRate;
+    }
+
+    /**
+     * @param putsRate the putsRate to set
+     */
+    public void setPutsRate(float putsRate) {
+      this.putsRate = putsRate;
+    }
+
+    /**
+     * @return the getsRate
+     */
+    public float getGetsRate() {
+      return getsRate;
+    }
+
+    /**
+     * @param getsRate the getsRate to set
+     */
+    public void setGetsRate(float getsRate) {
+      this.getsRate = getsRate;
+    }
+
+    /**
+     * @return the diskGetsRate
+     */
+    public float getDiskGetsRate() {
+      return diskGetsRate;
+    }
+
+    /**
+     * @param diskGetsRate the diskGetsRate to set
+     */
+    public void setDiskGetsRate(float diskGetsRate) {
+      this.diskGetsRate = diskGetsRate;
+    }
+
+    /**
+     * @return the diskPutsRate
+     */
+    public float getDiskPutsRate() {
+      return diskPutsRate;
+    }
+
+    /**
+     * @param diskPutsRate the diskPutsRate to set
+     */
+    public void setDiskPutsRate(float diskPutsRate) {
+      this.diskPutsRate = diskPutsRate;
+    }
+
+    /**
+     * @return
+     */
+    public int getLocalMaxMemory() {
+      return this.localMaxMemory;
+    }
+
+    /**
+     * @param localMaxMemory
+     */
+    public void setLocalMaxMemory(int localMaxMemory) {
+      this.localMaxMemory = localMaxMemory;
+    }
+
+    /**
+     * @return the getsPerSecTrend
+     */
+    public CircularFifoBuffer getGetsPerSecTrend() {
+      return getsPerSecTrend;
+    }
+
+    /**
+     * @param getsPerSecTrend the getsPerSecTrend to set
+     */
+    public void setGetsPerSecTrend(CircularFifoBuffer getsPerSecTrend) {
+      this.getsPerSecTrend = getsPerSecTrend;
+    }
+
+    /**
+     * @return the putsPerSecTrend
+     */
+    public CircularFifoBuffer getPutsPerSecTrend() {
+      return putsPerSecTrend;
+    }
+
+    /**
+     * @param putsPerSecTrend the putsPerSecTrend to set
+     */
+    public void setPutsPerSecTrend(CircularFifoBuffer putsPerSecTrend) {
+      this.putsPerSecTrend = putsPerSecTrend;
+    }
+
+    /**
+     * @return the diskReadsPerSecTrend
+     */
+    public CircularFifoBuffer getDiskReadsPerSecTrend() {
+      return diskReadsPerSecTrend;
+    }
+
+    /**
+     * @param diskReadsPerSecTrend the diskReadsPerSecTrend to set
+     */
+    public void setDiskReadsPerSecTrend(CircularFifoBuffer diskReadsPerSecTrend) {
+      this.diskReadsPerSecTrend = diskReadsPerSecTrend;
+    }
+
+    /**
+     * @return the diskWritesPerSecTrend
+     */
+    public CircularFifoBuffer getDiskWritesPerSecTrend() {
+      return diskWritesPerSecTrend;
+    }
+
+    /**
+     * @param diskWritesPerSecTrend the diskWritesPerSecTrend to set
+     */
+    public void setDiskWritesPerSecTrend(CircularFifoBuffer diskWritesPerSecTrend) {
+      this.diskWritesPerSecTrend = diskWritesPerSecTrend;
+    }
+
+    public Object[] getRegionOnMemberStatisticTrend(int trendId) {
+
+      Object[] returnArray = null;
+      switch (trendId) {
+      case REGION_ON_MEMBER_STAT_GETS_PER_SEC_TREND:
+        synchronized (this.getsPerSecTrend) {
+          returnArray = this.getsPerSecTrend.toArray();
+        }
+        break;
+
+      case REGION_ON_MEMBER_STAT_PUTS_PER_SEC_TREND:
+        synchronized (this.putsPerSecTrend) {
+          returnArray = this.putsPerSecTrend.toArray();
+        }
+        break;
+
+      case REGION_ON_MEMBER_STAT_DISK_READS_PER_SEC_TREND:
+        synchronized (this.diskReadsPerSecTrend) {
+          returnArray = this.diskReadsPerSecTrend.toArray();
+        }
+        break;
+
+      case REGION_ON_MEMBER_STAT_DISK_WRITES_PER_SEC_TREND:
+        synchronized (this.diskWritesPerSecTrend) {
+          returnArray = this.diskWritesPerSecTrend.toArray();
+        }
+        break;
+      }
+
+      return returnArray;
+    }
+
+    /**
+     * @return the regionFullPath
+     */
+    public String getRegionFullPath() {
+      return regionFullPath;
+    }
+
+    /**
+     * @param regionFullPath the regionFullPath to set
+     */
+    public void setRegionFullPath(String regionFullPath) {
+      this.regionFullPath = regionFullPath;
+    }
+
+    /**
+     * @return the memberName
+     */
+    public String getMemberName() {
+      return memberName;
+    }
+
+    /**
+     * @param memberName the memberName to set
+     */
+    public void setMemberName(String memberName) {
+      this.memberName = memberName;
+    }
+  }
+
+  /**
+   * Region Inner Class
+   *
+   * @author Anchal
+   *
+   */
+  public static class Region {
+    // start: fields defined in MBean
+    private String fullPath;
+    private float diskReadsRate;
+    private float diskWritesRate;
+    private float getsRate;
+    private float putsRate;
+    private float lruEvictionRate;
+    private String regionType;
+    private long systemRegionEntryCount;
+    private int memberCount;
+    private String name;
+    private boolean persistentEnabled;
+    private long entrySize;
+    private boolean wanEnabled;
+    private int emptyNode;
+    private long diskUsage;
+    private String scope;
+    private String diskStoreName;
+    private boolean diskSynchronous;
+    private boolean enableOffHeapMemory;
+    private String compressionCodec = "";
+    private boolean hdfsWriteOnly;
+
+    private List<String> memberName = new ArrayList<String>();
+    private List<RegionOnMember> regionOnMembers  = new ArrayList<RegionOnMember>();
+    private CircularFifoBuffer getsPerSecTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer putsPerSecTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer diskReadsPerSecTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+    private CircularFifoBuffer diskWritesPerSecTrend = new CircularFifoBuffer(
+        MAX_SAMPLE_SIZE);
+
+    public static final int REGION_STAT_GETS_PER_SEC_TREND = 0;
+    public static final int REGION_STAT_PUTS_PER_SEC_TREND = 1;
+    public static final int REGION_STAT_DISK_READS_PER_SEC_TREND = 3;
+    public static final int REGION_STAT_DISK_WRITES_PER_SEC_TREND = 4;
+
+    // end: fields defined in MBean
+
+    public Object[] getRegionStatisticTrend(int trendId) {
+
+      Object[] returnArray = null;
+      switch (trendId) {
+      case REGION_STAT_GETS_PER_SEC_TREND:
+        synchronized (this.getsPerSecTrend) {
+          returnArray = this.getsPerSecTrend.toArray();
+        }
+        break;
+
+      case REGION_STAT_PUTS_PER_SEC_TREND:
+        synchronized (this.putsPerSecTrend) {
+          returnArray = this.putsPerSecTrend.toArray();
+        }
+        break;
+
+      case REGION_STAT_DISK_READS_PER_SEC_TREND:
+        synchronized (this.diskReadsPerSecTrend) {
+          returnArray = this.diskReadsPerSecTrend.toArray();
+        }
+        break;
+
+      case REGION_STAT_DISK_WRITES_PER_SEC_TREND:
+        synchronized (this.diskWritesPerSecTrend) {
+          returnArray = this.diskWritesPerSecTrend.toArray();
+        }
+        break;
+      }
+
+      return returnArray;
+    }
+
+    public boolean isDiskSynchronous() {
+      return this.diskSynchronous;
+    }
+
+    public void setDiskSynchronous(boolean diskSynchronous) {
+      this.diskSynchronous = diskSynchronous;
+    }
+
+    public String getDiskStoreName() {
+      return this.diskStoreName;
+    }
+
+    public void setDiskStoreName(String diskStoreName) {
+      this.diskStoreName = diskStoreName;
+    }
+
+    public String getScope() {
+      return this.scope;
+    }
+
+    public void setScope(String scope) {
+      this.scope = scope;
+    }
+
+    public int getEmptyNode() {
+      return this.emptyNode;
+    }
+
+    public void setEmptyNode(int emptyNode) {
+      this.emptyNode = emptyNode;
+    }
+
+    public long getDiskUsage() {
+      return this.diskUsage;
+    }
+
+    public void setDiskUsage(long diskUsage) {
+      this.diskUsage = diskUsage;
+    }
+
+    public void setEntrySize(long entrySize) {
+      this.entrySize = entrySize;
+    }
+
+    public boolean getWanEnabled() {
+      return this.wanEnabled;
+    }
+
+    public void setWanEnabled(boolean wanEnabled) {
+      this.wanEnabled = wanEnabled;
+    }
+
+    public boolean getPersistentEnabled() {
+      return this.persistentEnabled;
+    }
+
+    public void setPersistentEnabled(boolean persistentEnabled) {
+      this.persistentEnabled = persistentEnabled;
+    }
+
+    public String getName() {
+      return this.name;
+    }
+
+    public void setName(String name) {
+      this.name = name;
+    }
+
+    public long getEntrySize() {
+      return this.entrySize;
+    }
+
+    public List<String> getMemberName() {
+      return this.memberName;
+    }
+
+    public void setMemberName(List<String> memberName) {
+      this.memberName = memberName;
+    }
+
+    public String getFullPath() {
+      return this.fullPath;
+    }
+
+    public void setFullPath(String fullPath) {
+      this.fullPath = fullPath;
+    }
+
+    public float getDiskReadsRate() {
+      return this.diskReadsRate;
+    }
+
+    public void setDiskReadsRate(float diskReadsRate) {
+      this.diskReadsRate = diskReadsRate;
+    }
+
+    public float getDiskWritesRate() {
+      return this.diskWritesRate;
+    }
+
+    public void setDiskWritesRate(float diskWritesRate) {
+      this.diskWritesRate = diskWritesRate;
+    }
+
+    public CircularFifoBuffer getDiskReadsPerSecTrend() {
+      return this.diskReadsPerSecTrend;
+    }
+
+    public void setDiskReadsPerSecTrend(CircularFifoBuffer diskReadsPerSecTrend) {
+      this.diskReadsPerSecTrend = diskReadsPerSecTrend;
+    }
+
+    public CircularFifoBuffer getDiskWritesPerSecTrend() {
+      return this.diskWritesPerSecTrend;
+    }
+
+    public void setDiskWritesPerSecTrend(
+        CircularFifoBuffer diskWritesPerSecTrend) {
+      this.diskWritesPerSecTrend = diskWritesPerSecTrend;
+    }
+
+    public float getGetsRate() {
+      return this.getsRate;
+    }
+
+    public void setGetsRate(float getsRate) {
+      this.getsRate = getsRate;
+    }
+
+    public float getLruEvictionRate() {
+      return this.lruEvictionRate;
+    }
+
+    public void setLruEvictionRate(float lruEvictionRate) {
+      this.lruEvictionRate = lruEvictionRate;
+    }
+
+    public String getRegionType() {
+      return this.regionType;
+    }
+
+    public void setRegionType(String regionType) {
+      this.regionType = regionType;
+    }
+
+    public long getSystemRegionEntryCount() {
+      return this.systemRegionEntryCount;
+    }
+
+    public void setSystemRegionEntryCount(long systemRegionEntryCount) {
+      this.systemRegionEntryCount = systemRegionEntryCount;
+    }
+
+    public int getMemberCount() {
+      return this.memberCount;
+    }
+
+    public void setMemberCount(int memberCount) {
+      this.memberCount = memberCount;
+    }
+
+    public float getPutsRate() {
+      return this.putsRate;
+    }
+
+    public void setPutsRate(float putsRate) {
+      this.putsRate = putsRate;
+    }
+
+    public CircularFifoBuffer getGetsPerSecTrend() {
+      return this.getsPerSecTrend;
+    }
+
+    public void setGetsPerSecTrend(CircularFifoBuffer getsPerSecTrend) {
+      this.getsPerSecTrend = getsPerSecTrend;
+    }
+
+    public CircularFifoBuffer getPutsPerSecTrend() {
+      return this.putsPerSecTrend;
+    }
+
+    public void setPutsPerSecTrend(CircularFifoBuffer putsPerSecTrend) {
+      this.putsPerSecTrend = putsPerSecTrend;
+    }
+
+    public boolean isEnableOffHeapMemory() {
+      return this.enableOffHeapMemory;
+    }
+
+    public void setEnableOffHeapMemory(boolean enableOffHeapMemory) {
+      this.enableOffHeapMemory = enableOffHeapMemory;
+    }
+
+    public String getCompressionCodec() {
+      return this.compressionCodec;
+    }
+
+    public void setCompressionCodec(String compressionCodec) {
+      this.compressionCodec = compressionCodec;
+    }
+
+    public boolean isHdfsWriteOnly() {
+      return hdfsWriteOnly;
+    }
+
+    public void setHdfsWriteOnly(boolean hdfsWriteOnly) {
+      this.hdfsWriteOnly = hdfsWriteOnly;
+    }
+
+    public Cluster.RegionOnMember[] getRegionOnMembers() {
+      Cluster.RegionOnMember[] regionOnMembers = null;
+      synchronized (this.regionOnMembers) {
+        regionOnMembers = new Cluster.RegionOnMember[this.regionOnMembers.size()];
+        regionOnMembers = this.regionOnMembers.toArray(regionOnMembers);
+      }
+
+      return regionOnMembers;
+    }
+
+    /**
+     * @param regionOnMembers the regionOnMembers to set
+     */
+    public void setRegionOnMembers(List<RegionOnMember> regionOnMembers) {
+      this.regionOnMembers = regionOnMembers;
+    }
+  }
+
+  /**
+   * Alert Inner Class
+   *
+   * @author Anchal
+   *
+   */
+  public static class Alert {
+    public static final int SEVERE = 0;
+    public static final int ERROR = 1;
+    public static final int WARNING = 2;
+    public static final int INFO = 3;
+
+    public static AtomicInteger ALERT_ID_CTR = new AtomicInteger();
+
+    private int id;
+    private Date timestamp;
+    private int severity;
+    private String memberName;
+    private String description;
+    private boolean isAcknowledged;
+    private String iso8601Ts;
+
+    public String getIso8601Ts() {
+      return iso8601Ts;
+    }
+
+    public void setIso8601Ts(String iso8601Ts) {
+      this.iso8601Ts = iso8601Ts;
+    }
+
+    public boolean isAcknowledged() {
+      return this.isAcknowledged;
+    }
+
+    public void setAcknowledged(boolean isAcknowledged) {
+      this.isAcknowledged = isAcknowledged;
+    }
+
+    public Date getTimestamp() {
+      return this.timestamp;
+    }
+
+    public void setTimestamp(Date timestamp) {
+      this.timestamp = timestamp;
+      this.iso8601Ts = formatToISOTimestamp(timestamp);
+    }
+
+    public int getSeverity() {
+      return this.severity;
+    }
+
+    public void setSeverity(int severity) {
+      this.severity = severity;
+    }
+
+    public String getMemberName() {
+      return this.memberName;
+    }
+
+    public void setMemberName(String memberName) {
+      this.memberName = memberName;
+    }
+
+    public String getDescription() {
+      return this.description;
+    }
+
+    public void setDescription(String description) {
+      this.description = description;
+    }
+
+    public int getId() {
+      return this.id;
+    }
+
+    public void setId(int id) {
+      this.id = id;
+    }
+
+    public static int nextID() {
+      /*
+       * int id = -1; synchronized (Alert.class) { ALERT_ID_CTR = ALERT_ID_CTR +
+       * 1; id = ALERT_ID_CTR; }
+       */
+      return ALERT_ID_CTR.incrementAndGet();
+    }
+
+    private static DateFormat df = new SimpleDateFormat(PulseConstants.PULSE_NOTIFICATION_ALERT_DATE_PATTERN);
+
+    public static String formatToISOTimestamp(Date date) {
+      TimeZone tz = TimeZone.getTimeZone("UTC");
+      df.setTimeZone(tz);
+      return df.format(date);
+    }
+
+  }
+
+  /**
+   * Client Inner Class
+   *
+   * @author Anchal
+   *
+   */
+  public static class Client {
+
+    private String id;
+    private String name;
+    private String host;
+    private int queueSize;
+    private float cpuUsage;
+    private long uptime;
+    private int threads;
+    private int gets;
+    private int puts;
+    private int cpus;
+    private int clientCQCount; 
+    private long processCpuTime;
+    private String status;
+    private boolean isConnected = false;
+    private boolean isSubscriptionEnabled = false; 
+
+    public String getId() {
+      return this.id;
+    }
+
+    public int getGets() {
+      return this.gets;
+    }
+
+    public int getPuts() {
+      return this.puts;
+    }
+
+	public int getClientCQCount() {
+	  return clientCQCount;
+	}
+
+	public void setClientCQCount(int clientCQCount) {
+	  this.clientCQCount = clientCQCount;
+	}
+     
+	public boolean isSubscriptionEnabled() { 
+	  return isSubscriptionEnabled; 
+	} 
+	 		 
+	public void setSubscriptionEnabled(boolean isSubscriptionEnabled) { 
+	  this.isSubscriptionEnabled = isSubscriptionEnabled; 
+	} 
+
+    public void setId(String id) {
+      this.id = id;
+    }
+
+    public String getName() {
+      return this.name;
+    }
+
+    public void setName(String name) {
+      this.name = name;
+    }
+
+    public String getHost() {
+      return this.host;
+    }
+
+    public void setHost(String host) {
+      this.host = host;
+    }
+
+    public int getQueueSize() {
+      return this.queueSize;
+    }
+
+    public void setQueueSize(int queueSize) {
+      this.queueSize = queueSize;
+    }
+
+    public float getCpuUsage() {
+      return this.cpuUsage;
+    }
+
+    public void setCpuUsage(float cpuUsage) {
+      this.cpuUsage = cpuUsage;
+    }
+
+    public void setGets(int gets) {
+      this.gets = gets;
+    }
+
+    public void setPuts(int puts) {
+      this.puts = puts;
+    }
+
+    public long getUptime() {
+      return this.uptime;
+    }
+
+    public void setUptime(long uptime) {
+      this.uptime = uptime;
+    }
+
+    public int getThreads() {
+      return this.threads;
+    }
+
+    public void setThreads(int threads) {
+      this.threads = threads;
+    }
+
+    public String getStatus() {
+      return this.status;
+    }
+
+    public void setStatus(String status) {
+      this.status = status;
+    }
+
+    public int getCpus() {
+      return this.cpus;
+    }
+
+    public void setCpus(int cpus) {
+      this.cpus = cpus;
+    }
+
+    public long getProcessCpuTime() {
+      return this.processCpuTime;
+    }
+
+    public void setProcessCpuTime(long processCpuTime) {
+      this.processCpuTime = processCpuTime;
+    }
+
+    public boolean isConnected() {
+      return isConnected;
+    }
+
+    public void setConnected(boolean isConnected) {
+      this.isConnected = isConnected;
+    }
+
+  }
+
+  /**
+   * Gateway Receiver Inner Class
+   *
+   * @author Anchal
+   *
+   */
+  public static class GatewayReceiver {
+
+    private int listeningPort;
+    private Float linkThroughput;
+    private Long avgBatchProcessingTime;
+    private String id;
+    private int queueSize;
+    private Boolean status;
+    private int batchSize;
+
+    public int getListeningPort() {
+      return this.listeningPort;
+    }
+
+    public void setListeningPort(int listeningPort) {
+      this.listeningPort = listeningPort;
+    }
+
+    public Float getLinkThroughput() {
+      return this.linkThroughput;
+    }
+
+    public void setLinkThroughput(Float linkThroughput) {
+      this.linkThroughput = linkThroughput;
+    }
+
+    public Long getAvgBatchProcessingTime() {
+      return this.avgBatchProcessingTime;
+    }
+
+    public void setAvgBatchProcessingTime(Long avgBatchProcessingTime) {
+      this.avgBatchProcessingTime = avgBatchProcessingTime;
+    }
+
+    public String getId() {
+      return this.id;
+    }
+
+    public void setId(String id) {
+      this.id = id;
+    }
+
+    public int getQueueSize() {
+      return this.queueSize;
+    }
+
+    public void setQueueSize(int queueSize) {
+      this.queueSize = queueSize;
+    }
+
+    public Boolean getStatus() {
+      return this.status;
+    }
+
+    public void setStatus(Boolean status) {
+      this.status = status;
+    }
+
+    public int getBatchSize() {
+      return this.batchSize;
+    }
+
+    public void setBatchSize(int batchSize) {
+      this.batchSize = batchSize;
+    }
+  }
+
+  /**
+   * Gateway Sender Inner class
+   *
+   * @author Anchal
+   *
+   */
+  public static class GatewaySender {
+
+    private Float linkThroughput;
+    private String id;
+    private int queueSize;
+    private Boolean status;
+    private boolean primary;
+    private boolean senderType;
+    private int batchSize;
+    private boolean persistenceEnabled;
+    private int remoteDSId;
+    private int eventsExceedingAlertThreshold;
+
+    public Float getLinkThroughput() {
+      return this.linkThroughput;
+    }
+
+    public void setLinkThroughput(Float linkThroughput) {
+      this.linkThroughput = linkThroughput;
+    }
+
+    public String getId() {
+      return this.id;
+    }
+
+    public void setId(String id) {
+      this.id = id;
+    }
+
+    public int getQueueSize() {
+      return this.queueSize;
+    }
+
+    public void setQueueSize(int queueSize) {
+      this.queueSize = queueSize;
+    }
+
+    public Boolean getStatus() {
+      return this.status;
+    }
+
+    public void setStatus(Boolean status) {
+      this.status = status;
+    }
+
+    public boolean getPrimary() {
+      return this.primary;
+    }
+
+    public void setPrimary(boolean primary) {
+      this.primary = primary;
+    }
+
+    public boolean getSenderType() {
+      return this.senderType;
+    }
+
+    public void setSenderType(boolean senderType) {
+      this.senderType = senderType;
+    }
+
+    public int getBatchSize() {
+      return this.batchSize;
+    }
+
+    public void setBatchSize(int batchSize) {
+      this.batchSize = batchSize;
+    }
+
+    public boolean getPersistenceEnabled() {
+      return this.persistenceEnabled;
+    }
+
+    public void setPersistenceEnabled(boolean persistenceEnabled) {
+      this.persistenceEnabled = persistenceEnabled;
+    }
+
+    /**
+     * @return the remoteDSId
+     */
+    public int getRemoteDSId() {
+      return remoteDSId;
+    }
+
+    /**
+     * @param remoteDSId the remoteDSId to set
+     */
+    public void setRemoteDSId(int remoteDSId) {
+      this.remoteDSId = remoteDSId;
+    }
+
+    /**
+     * @return the eventsExceedingAlertThreshold
+     */
+    public int getEventsExceedingAlertThreshold() {
+      return eventsExceedingAlertThreshold;
+    }
+
+    /**
+     * @param eventsExceedingAlertThreshold the eventsExceedingAlertThreshold to set
+     */
+    public void setEventsExceedingAlertThreshold(int eventsExceedingAlertThreshold) {
+      this.eventsExceedingAlertThreshold = eventsExceedingAlertThreshold;
+    }
+  }
+
+  /**
+   * Async Event Queue Inner class
+   *
+   * @author rbhandekar
+   *
+   */
+  public static class AsyncEventQueue {
+
+    private String id;
+    private boolean primary;
+    private boolean parallel;
+    private int batchSize;
+    private long batchTimeInterval;
+    private boolean batchConflationEnabled;
+    private String asyncEventListener;
+    private int eventQueueSize;
+
+    public String getId() {
+      return this.id;
+    }
+
+    public void setId(String id) {
+      this.id = id;
+    }
+
+    public boolean getPrimary() {
+      return this.primary;
+    }
+
+    public void setPrimary(boolean primary) {
+      this.primary = primary;
+    }
+
+    /**
+     * @return the parallel
+     */
+    public boolean isParallel() {
+      return parallel;
+    }
+
+    /**
+     * @param parallel the parallel to set
+     */
+    public void setParallel(boolean parallel) {
+      this.parallel = parallel;
+    }
+
+    public int getBatchSize() {
+      return this.batchSize;
+    }
+
+    public void setBatchSize(int batchSize) {
+      this.batchSize = batchSize;
+    }
+
+    /**
+     * @return the batchTimeInterval
+     */
+    public long getBatchTimeInterval() {
+      return batchTimeInterval;
+    }
+
+    /**
+     * @param batchTimeInterval the batchTimeInterval to set
+     */
+    public void setBatchTimeInterval(long batchTimeInterval) {
+      this.batchTimeInterval = batchTimeInterval;
+    }
+
+    /**
+     * @return the batchConflationEnabled
+     */
+    public boolean isBatchConflationEnabled() {
+      return batchConflationEnabled;
+    }
+
+    /**
+     * @param batchConflationEnabled the batchConflationEnabled to set
+     */
+    public void setBatchConflationEnabled(boolean batchConflationEnabled) {
+      this.batchConflationEnabled = batchConflationEnabled;
+    }
+
+    /**
+     * @return the asyncEventListener
+     */
+    public String getAsyncEventListener() {
+      return asyncEventListener;
+    }
+
+    /**
+     * @param asyncEventListener the asyncEventListener to set
+     */
+    public void setAsyncEventListener(String asyncEventListener) {
+      this.asyncEventListener = asyncEventListener;
+    }
+
+    /**
+     * @return the eventQueueSize
+     */
+    public int getEventQueueSize() {
+      return eventQueueSize;
+    }
+
+    /**
+     * @param eventQueueSize the eventQueueSize to set
+     */
+    public void setEventQueueSize(int eventQueueSize) {
+      this.eventQueueSize = eventQueueSize;
+    }
+  }
+
+
+  /**
+   * This function is used for calling getUpdator function of ClusterDataFactory
+   * and starting the thread for updating the Cluster details.
+   *
+   * @param host
+   *          host name
+   * @param port
+   *          port
+   * @param userName
+   *          pulse user name
+   * @param userPassword
+   *          pulse user password
+   * @throws ConnectException
+   */
+  public Cluster(String host, String port, String userName, String userPassword)
+      throws ConnectException {
+    this.serverName = host;
+    this.port = port;
+    this.jmxUserName = userName;
+    this.jmxUserPassword = userPassword;
+
+    this.updater = ClusterDataFactory.getUpdater(this, host, port);
+    // start();
+  }
+
+  /**
+   * thread run method for updating the cluster data
+   */
+  @Override
+  public void run() {
+    while (!this.stopUpdates) {
+      try {
+        if (!this.updateData()) {
+          this.stale++;
+        } else {
+          this.stale = 0;
+        }
+      } catch (Exception e) {
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info("Exception Occured while updating cluster data : " + e.getMessage());
+        }
+      }
+
+      try {
+        Thread.sleep(POLL_INTERVAL);
+      } catch (InterruptedException e) {
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info("InterruptedException Occured : " + e.getMessage());
+        }
+      }
+    }
+
+    if (LOGGER.infoEnabled()) {
+      LOGGER.info(resourceBundle.getString("LOG_MSG_STOP_THREAD_UPDATES")
+          + " :: " + this.serverName + ":" + this.port);
+    }
+  }
+
+  /**
+   * calling updateData
+   *
+   * @return true if update was successful. false if it failed.
+   */
+  private boolean updateData() {
+    // This will eventually call JMX. Currently we will update this with
+    // some dummy data.
+    // Connect if required or hold a connection. If unable to connect,
+    // return false
+    if (LOGGER.finerEnabled()) {
+      LOGGER.finer(resourceBundle.getString("LOG_MSG_CLUSTER_DATA_IS_UPDATING")
+          + "::" + this.serverName + ":" + this.port);
+    }
+    return this.updater.updateData();
+  }
+
+  /**
+   * for stopping the update thread
+   */
+  public void stopThread() {
+    this.stopUpdates = true;
+
+    try {
+      join();
+    } catch (InterruptedException e) {
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info("InterruptedException occured while stoping cluster thread : " + e.getMessage());
+      }
+    }
+  }
+
+  public Map<String, Cluster.Member> getMembersHMap() {
+    return this.membersHMap;
+  }
+
+  public void setMembersHMap(HashMap<String, Cluster.Member> membersHMap) {
+    this.membersHMap = membersHMap;
+  }
+
+  public Map<String, Boolean> getWanInformation() {
+    Map<String, Boolean> wanMap = null;
+    synchronized (this.wanInformation) {
+      wanMap = (Map<String, Boolean>) this.wanInformation.clone();
+    }
+
+    return wanMap;
+  }
+
+  // Returns actual wanInformation object reference
+  public Map<String, Boolean> getWanInformationObject() {
+    return this.wanInformation;
+  }
+
+  public void setWanInformation(HashMap<String, Boolean> wanInformation) {
+    this.wanInformation = wanInformation;
+  }
+
+  public String getJmxUserName() {
+    return this.jmxUserName;
+  }
+
+  public void setJmxUserName(String jmxUserName) {
+    this.jmxUserName = jmxUserName;
+  }
+
+  public String getJmxUserPassword() {
+    return this.jmxUserPassword;
+  }
+
+  public void setJmxUserPassword(String jmxUserPassword) {
+    this.jmxUserPassword = jmxUserPassword;
+  }
+
+  public String getConnectionErrorMsg() {
+    return this.connectionErrorMsg;
+  }
+
+  public void setConnectionErrorMsg(String connectionErrorMsg) {
+    this.connectionErrorMsg = connectionErrorMsg;
+  }
+
+  public String getServerName() {
+    return this.serverName;
+  }
+
+  public boolean isConnectedFlag() {
+    return this.connectedFlag;
+  }
+
+  public void setConnectedFlag(boolean connectedFlag) {
+    this.connectedFlag = connectedFlag;
+  }
+
+  public String getPort() {
+    return this.port;
+  }
+
+  public int getStale() {
+    return this.stale;
+  }
+
+  public float getWritePerSec() {
+    return this.writePerSec;
+  }
+
+  public void setWritePerSec(float writePerSec) {
+    this.writePerSec = writePerSec;
+  }
+
+  public float getReadPerSec() {
+    return this.readPerSec;
+  }
+
+  public void setReadPerSec(float readPerSec) {
+    this.readPerSec = readPerSec;
+  }
+
+  public float getQueriesPerSec() {
+    return this.queriesPerSec;
+  }
+
+  public void setQueriesPerSec(float queriesPerSec) {
+    this.queriesPerSec = queriesPerSec;
+  }
+
+  public float getLoadPerSec() {
+    return this.loadPerSec;
+  }
+
+  public void setLoadPerSec(float loadPerSec) {
+    this.loadPerSec = loadPerSec;
+  }
+
+  public int getNotificationPageNumber() {
+    return this.notificationPageNumber;
+  }
+
+  public void setNotificationPageNumber(int notificationPageNumber) {
+    this.notificationPageNumber = notificationPageNumber;
+  }
+
+  public void setStale(int stale) {
+    this.stale = stale;
+  }
+
+  public boolean isStopUpdates() {
+    return this.stopUpdates;
+  }
+
+  public void setStopUpdates(boolean stopUpdates) {
+    this.stopUpdates = stopUpdates;
+  }
+
+  public Long getUsedHeapSize() {
+    return this.usedHeapSize;
+  }
+
+  public void setUsedHeapSize(Long usedHeapSize) {
+    this.usedHeapSize = usedHeapSize;
+  }
+
+  public int getServerCount() {
+    return this.serverCount;
+  }
+
+  public void setServerCount(int serverCount) {
+    this.serverCount = serverCount;
+  }
+
+  public int getTxnCommittedCount() {
+    return txnCommittedCount;
+  }
+
+  public void setTxnCommittedCount(int txnCommittedCount) {
+    this.txnCommittedCount = txnCommittedCount;
+  }
+
+  public int getTxnRollbackCount() {
+    return txnRollbackCount;
+  }
+
+  public void setTxnRollbackCount(int txnRollbackCount) {
+    this.txnRollbackCount = txnRollbackCount;
+  }
+
+  public int getRunningFunctionCount() {
+    return this.runningFunctionCount;
+  }
+
+  public Long getRegisteredCQCount() {
+    return this.registeredCQCount;
+  }
+
+  public int getSubscriptionCount() {
+    return this.subscriptionCount;
+  }
+
+  public void setSubscriptionCount(int subscriptionCount) {
+    this.subscriptionCount = subscriptionCount;
+  }
+
+  public void setRegisteredCQCount(Long registeredCQCount) {
+    this.registeredCQCount = registeredCQCount;
+  }
+
+  public void setRunningFunctionCount(int runningFunctionCount) {
+    this.runningFunctionCount = runningFunctionCount;
+  }
+
+  public Map<String, Cluster.Region> getClusterRegions() {
+    return this.clusterRegionMap;
+  }
+
+  public Cluster.Region getClusterRegion(String regionFullPath) {
+    return this.clusterRegionMap.get(regionFullPath);
+  }
+
+  public void setClusterRegions(Map<String, Region> clusterRegionMap) {
+    this.clusterRegionMap = clusterRegionMap;
+  }
+
+  public Map<String, Cluster.Statement> getClusterStatements() {
+    return this.clusterStatementMap;
+  }
+
+  public void setClusterStatements(Map<String, Statement> clusterStatementMap) {
+    this.clusterStatementMap = clusterStatementMap;
+  }
+
+  public Alert[] getAlertsList() {
+    Alert[] list = null;
+    synchronized (this.alertsList) {
+      list = new Alert[this.alertsList.size()];
+      list = this.alertsList.toArray(list);
+    }
+
+    return list;
+  }
+
+  public void setAlertsList(List<Alert> alertsList) {
+    this.alertsList = alertsList;
+  }
+
+  public void setServerName(String serverName) {
+    this.serverName = serverName;
+  }
+
+  public void setPort(String port) {
+    this.port = port;
+  }
+
+  public Set<String> getDeletedMembers() {
+    return this.deletedMembers;
+  }
+
+  public void setDeletedMembers(Set<String> deletedMembers) {
+    this.deletedMembers = deletedMembers;
+  }
+
+  public Set<String> getDeletedRegions() {
+    return this.deletedRegions;
+  }
+
+  public void setDeletedRegions(Set<String> deletedRegions) {
+    this.deletedRegions = deletedRegions;
+  }
+
+  public Map<String, List<Member>> getPhysicalToMember() {
+    Map<String, List<Member>> ptom = null;
+    // synchronized (physicalToMember) {
+    ptom = this.physicalToMember;
+    // }
+    return ptom;
+  }
+
+  public void setPhysicalToMember(HashMap<String, List<Member>> physicalToMember) {
+    // synchronized (this.physicalToMember) {
+    this.physicalToMember = physicalToMember;
+    // }
+  }
+
+  public int getMemberCount() {
+    return this.memberCount;
+  }
+
+  public void setMemberCount(int memberCount) {
+    this.memberCount = memberCount;
+  }
+
+  public long getClientConnectionCount() {
+    return this.clientConnectionCount;
+  }
+
+  public void setClientConnectionCount(long clientConnectionCount) {
+    this.clientConnectionCount = clientConnectionCount;
+  }
+
+  public int getClusterId() {
+    return this.clusterId;
+  }
+
+  public void setClusterId(int clusterId) {
+    this.clusterId = clusterId;
+  }
+
+  public int getLocatorCount() {
+    return this.locatorCount;
+  }
+
+  public void setLocatorCount(int locatorCount) {
+    this.locatorCount = locatorCount;
+  }
+
+  public int getTotalRegionCount() {
+    return this.totalRegionCount;
+  }
+
+  public void setTotalRegionCount(int totalRegionCount) {
+    this.totalRegionCount = totalRegionCount;
+  }
+
+  public Long getTotalHeapSize() {
+    return this.totalHeapSize;
+  }
+
+  public void setTotalHeapSize(Long totalHeapSize) {
+    this.totalHeapSize = totalHeapSize;
+  }
+
+  public Long getTotalRegionEntryCount() {
+    return this.totalRegionEntryCount;
+  }
+
+  public void setTotalRegionEntryCount(Long totalRegionEntryCount) {
+    this.totalRegionEntryCount = totalRegionEntryCount;
+  }
+
+  public int getCurrentQueryCount() {
+    return this.currentQueryCount;
+  }
+
+  public void setCurrentQueryCount(int currentQueryCount) {
+    this.currentQueryCount = currentQueryCount;
+  }
+
+  public Long getTotalBytesOnDisk() {
+    return this.totalBytesOnDisk;
+  }
+
+  public void setTotalBytesOnDisk(Long totalBytesOnDisk) {
+    this.totalBytesOnDisk = totalBytesOnDisk;
+  }
+
+  public float getDiskReadsRate() {
+    return this.diskReadsRate;
+  }
+
+  public void setDiskReadsRate(float diskReadsRate) {
+    this.diskReadsRate = diskReadsRate;
+  }
+
+  public float getDiskWritesRate() {
+    return this.diskWritesRate;
+  }
+
+  public void setDiskWritesRate(float diskWritesRate) {
+    this.diskWritesRate = diskWritesRate;
+  }
+
+  public int getAvgDiskStorage() {
+    return this.avgDiskStorage;
+  }
+
+  public void setAvgDiskStorage(int avgDiskStorage) {
+    this.avgDiskStorage = avgDiskStorage;
+  }
+
+  public int getAvgDiskWritesRate() {
+    return this.avgDiskWritesRate;
+  }
+
+  public void setAvgDiskWritesRate(int avgDiskWritesRate) {
+    this.avgDiskWritesRate = avgDiskWritesRate;
+  }
+
+  public CircularFifoBuffer getWritePerSecTrend() {
+    return this.writePerSecTrend;
+  }
+
+  public void setWritePerSecTrend(CircularFifoBuffer writePerSecTrend) {
+    this.writePerSecTrend = writePerSecTrend;
+  }
+
+  public Long getGarbageCollectionCount() {
+    return this.garbageCollectionCount;
+  }
+
+  public void setGarbageCollectionCount(Long garbageCollectionCount) {
+    this.garbageCollectionCount = garbageCollectionCount;
+  }
+
+  public CircularFifoBuffer getTotalBytesOnDiskTrend() {
+    return this.totalBytesOnDiskTrend;
+  }
+
+  public void setTotalBytesOnDiskTrend(CircularFifoBuffer totalBytesOnDiskTrend) {
+    this.totalBytesOnDiskTrend = totalBytesOnDiskTrend;
+  }
+
+  public CircularFifoBuffer getThroughoutWritesTrend() {
+    return this.throughoutWritesTrend;
+  }
+
+  public void setThroughoutWritesTrend(CircularFifoBuffer throughoutWritesTrend) {
+    this.throughoutWritesTrend = throughoutWritesTrend;
+  }
+
+  public CircularFifoBuffer getThroughoutReadsTrend() {
+    return this.throughoutReadsTrend;
+  }
+
+  public void setThroughoutReadsTrend(CircularFifoBuffer throughoutReadsTrend) {
+    this.throughoutReadsTrend = throughoutReadsTrend;
+  }
+
+  public CircularFifoBuffer getReadPerSecTrend() {
+    return this.readPerSecTrend;
+  }
+
+  public void setReadPerSecTrend(CircularFifoBuffer readPerSecTrend) {
+    this.readPerSecTrend = readPerSecTrend;
+  }
+
+  public CircularFifoBuffer getQueriesPerSecTrend() {
+    return this.queriesPerSecTrend;
+  }
+
+  public void setQueriesPerSecTrend(CircularFifoBuffer queriesPerSecTrend) {
+    this.queriesPerSecTrend = queriesPerSecTrend;
+  }
+
+  public CircularFifoBuffer getMemoryUsageTrend() {
+    return this.memoryUsageTrend;
+  }
+
+  public void setMemoryUsageTrend(CircularFifoBuffer memoryUsageTrend) {
+    this.memoryUsageTrend = memoryUsageTrend;
+  }
+
+  public CircularFifoBuffer getGarbageCollectionTrend() {
+    return this.garbageCollectionTrend;
+  }
+
+  public void setGarbageCollectionTrend(
+      CircularFifoBuffer garbageCollectionSamples) {
+    this.garbageCollectionTrend = garbageCollectionSamples;
+  }
+
+  public Long getPreviousJVMPauseCount() {
+    return this.previousJVMPauseCount;
+  }
+
+  public void setPreviousJVMPauseCount(Long previousJVMPauseCount) {
+    this.previousJVMPauseCount = previousJVMPauseCount;
+  }
+
+  public DataBrowser getDataBrowser() {
+    // Initialize dataBrowser if null
+    if (this.dataBrowser == null) {
+      this.dataBrowser = new DataBrowser();
+    }
+    return this.dataBrowser;
+  }
+
+  public void setDataBrowser(DataBrowser dataBrowser) {
+    this.dataBrowser = dataBrowser;
+  }
+
+  public JSONObject executeQuery(String queryText, String members, int limit)
+      throws JSONException {
+    // Execute data browser query
+    return this.updater.executeQuery(queryText, members, limit);
+  }
+
+  public JSONArray getQueryHistoryByUserId(String userId) throws JSONException {
+    return this.getDataBrowser().getQueryHistoryByUserId(userId);
+  }
+
+  public boolean addQueryInHistory(String queryText, String userName) {
+    return this.getDataBrowser().addQueryInHistory(queryText, userName);
+  }
+
+  public boolean deleteQueryById(String userId, String queryId) {
+    return this.getDataBrowser().deleteQueryById(userId, queryId);
+  }
+
+  /**
+   * inner class for creating Mock Data
+   *
+   * @author Anand Hariharan
+   *
+   */
+  public class MockDataUpdater implements IClusterUpdater {
+    public MockDataUpdater() {
+    }
+
+    /**
+     * function used for updating Cluster data for Mock
+     */
+    @Override
+    public boolean updateData() {
+      setConnectedFlag(true);
+      Random r = new Random(System.currentTimeMillis());
+      totalHeapSize = (long) Math.abs(r.nextInt(3200 - 2048) + 2048);
+      usedHeapSize = (long) Math.abs(r.nextInt(2048));
+      writePerSec = Math.abs(r.nextInt(100));
+      subscriptionCount = Math.abs(r.nextInt(100));
+      registeredCQCount = (long) Math.abs(r.nextInt(100));
+      txnCommittedCount = Math.abs(r.nextInt(100));
+      txnRollbackCount = Math.abs(r.nextInt(100));
+      runningFunctionCount = Math.abs(r.nextInt(100));
+      clusterId = Math.abs(r.nextInt(100));
+      writePerSecTrend.add(writePerSec);
+      diskWritesRate = writePerSec;
+      garbageCollectionCount = (long) Math.abs(r.nextInt(100));
+      garbageCollectionTrend.add(garbageCollectionCount);
+
+      readPerSec = Math.abs(r.nextInt(100));
+      readPerSecTrend.add(readPerSec);
+
+      diskReadsRate = readPerSec;
+      queriesPerSec = Math.abs(r.nextInt(100));
+      queriesPerSecTrend.add(queriesPerSec);
+
+      loadPerSec = Math.abs(r.nextInt(100));
+      totalHeapSize = (long) totalHeapSize;
+      totalBytesOnDisk = (long) totalHeapSize;
+
+      totalBytesOnDiskTrend.add(totalBytesOnDisk);
+
+      memoryUsageTrend.add((long) usedHeapSize);
+      throughoutWritesTrend.add(writePerSec);
+      throughoutReadsTrend.add(readPerSec);
+
+      memberCount = 0;
+
+      // Create 3 members first time around
+      if (membersHMap.size() == 0) {
+
+        membersHMap.put(
+            "pnq-visitor1",
+            initializeMember(
+                "pnq-visitor1(Launcher_Manager-1099-13-40-24-5368)-24357",
+                "pnq-visitor1", true, true, true, true));
+
+        for (int i = 2; i <= 8; i++) {
+          if ((i % 2) == 0) {
+            membersHMap.put(
+                "pnq-visitor" + i,
+                initializeMember("pnq-visitor" + i
+                    + "(Launcher_Server-1099-13-40-24-5368)-24357",
+                    "pnq-visitor" + i, false, false, true, false));
+          } else {
+            if ((i % 3) == 0) {
+              membersHMap.put(
+                  "pnq-visitor" + i,
+                  initializeMember("pnq-visitor" + i
+                      + "(Launcher_Server-1099-13-40-24-5368)-24357",
+                      "pnq-visitor" + i, false, false, false, false));
+            } else {
+              membersHMap.put(
+                  "pnq-visitor" + i,
+                  initializeMember("pnq-visitor" + i
+                      + "(Launcher_Server-1099-13-40-24-5368)-24357",
+                      "pnq-visitor" + i, false, true, true, true));
+            }
+          }
+        }
+
+        for (Entry<String, Member> memberSet : membersHMap.entrySet()) {
+          HashMap<String, Cluster.Region> memberRegions = new HashMap<String, Cluster.Region>();
+          HashMap<String, Cluster.Client> memberClientsHM = new HashMap<String, Cluster.Client>();
+
+          Random randomGenerator = new Random();
+          int randomInt = (randomGenerator.nextInt(15)) + 10;
+          int regionExists = 0;
+          for (int y = 0; y < randomInt; y++) {
+            Region region = initMemberRegion(y, memberSet.getValue().getName());
+            if (clusterRegionMap.entrySet().size() > 0) {
+              for (Region clusterRegion : clusterRegionMap.values()) {
+                if ((region.name).equals(clusterRegion.name)) {
+                  clusterRegion.memberName.add(memberSet.getValue().getName());
+                  clusterRegion.memberCount = clusterRegion.memberCount + 1;
+                  regionExists = 1;
+                  break;
+                }
+              }
+              if (regionExists == 0) {
+                addClusterRegion(region.getFullPath(), region);
+              }
+            } else {
+              addClusterRegion(region.getFullPath(), region);
+            }
+            memberRegions.put(region.getFullPath(), region);
+            totalRegionCount = clusterRegionMap.values().size();
+          }
+          membersHMap.get(memberSet.getKey()).setMemberRegions(memberRegions);
+
+          if (memberSet.getValue().isCache) {
+            Client client = initMemberClient(0, memberSet.getValue().getHost());
+            memberClientsHM.put(client.getId(), client);
+            randomInt = randomGenerator.nextInt(10);
+            for (int y = 1; y < randomInt; y++) {
+              Client newClient = initMemberClient(y, memberSet.getValue()
+                  .getHost());
+              memberClientsHM.put(newClient.getId(), newClient);
+            }
+            membersHMap.get(memberSet.getKey()).updateMemberClientsHMap(
+                memberClientsHM);
+            clientConnectionCount = clientConnectionCount
+                + membersHMap.get(memberSet.getKey()).getMemberClientsHMap()
+                    .size();
+          }
+
+        }
+      }
+
+		// add additional regions to members
+      for (Entry<String, Member> memberSet : membersHMap.entrySet()) {
+        HashMap<String, Cluster.Region> memberRegions = new HashMap<String, Cluster.Region>();
+
+        Random randomGenerator = new Random();
+        int randomInt = (randomGenerator.nextInt(5)) + 5;
+        int regionExists = 0;
+        for (int y = 0; y < randomInt; y++) {
+          Region region = initMemberRegion(y, memberSet.getValue().getName());
+          if (clusterRegionMap.entrySet().size() > 0) {
+            for (Region clusterRegion : clusterRegionMap.values()) {
+              if ((region.name).equals(clusterRegion.name)) {
+                clusterRegion.memberName.add(memberSet.getValue().getName());
+                clusterRegion.memberCount = clusterRegion.memberCount + 1;
+                regionExists = 1;
+                break;
+              }
+            }
+            if (regionExists == 0) {
+              addClusterRegion(region.getFullPath(), region);
+            }
+          } else {
+            addClusterRegion(region.getFullPath(), region);
+          }
+          memberRegions.put(region.getFullPath(), region);
+          totalRegionCount = clusterRegionMap.values().size();
+        }
+        membersHMap.get(memberSet.getKey()).setMemberRegions(memberRegions);
+
+      }
+
+      wanInformation.clear();
+      int wanInfoSize = Math.abs(r.nextInt(10));
+      wanInfoSize++;
+      for (int i = 0; i < wanInfoSize; i++) {
+        String name = "Mock Cluster" + i;
+        Boolean value = false;
+        if (i % 2 == 0) {
+          value = true;
+        }
+        wanInformation.put(name, value);
+      }
+      memberCount = membersHMap.size();
+
+      totalHeapSize = (long) 0;
+      for (Entry<String, Member> memberSet : membersHMap.entrySet()) {
+        refresh(membersHMap.get(memberSet.getKey()));
+        Member member = membersHMap.get(memberSet.getKey());
+        totalHeapSize += member.currentHeapSize;
+      }
+
+      for (Region region : clusterRegionMap.values()) {
+        // Memory reads and writes
+        region.getsRate = (Math.abs(r.nextInt(100))) + 1;
+        region.putsRate = (Math.abs(r.nextInt(100))) + 1;
+        region.getsPerSecTrend.add(region.getsRate);
+        region.putsPerSecTrend.add(region.putsRate);
+
+        // Disk reads and writes
+        region.diskReadsRate = (Math.abs(r.nextInt(100))) + 1;
+        region.diskWritesRate = (Math.abs(r.nextInt(100))) + 1;
+        region.diskReadsPerSecTrend.add(region.diskReadsRate);
+        region.diskWritesPerSecTrend.add(region.diskWritesRate);
+      }
+
+      if(clusterStatementMap.size() < 500){
+        for(int i = 1; i <= 500; ++i) {
+          if (LOGGER.infoEnabled()) {
+            LOGGER.info("Adding statement = " + i);
+          }
+
+          updateClusterStatement(i);
+        }
+      } else if(clusterStatementMap.size() == 510){
+        for(Iterator itSt = clusterStatementMap.values().iterator(); itSt.hasNext(); ){
+          Cluster.Statement statement = (Cluster.Statement)itSt.next();
+          statement.setNumTimesCompiled((statement.getNumTimesCompiled()+5));
+          statement.setNumExecution((statement.getNumExecution()+5));
+          statement.setNumExecutionsInProgress((statement.getNumExecutionsInProgress()+5));
+          statement.setNumTimesGlobalIndexLookup((statement.getNumTimesGlobalIndexLookup()+5));
+          statement.setNumRowsModified((statement.getNumRowsModified()+5));
+        }
+      } else if(clusterStatementMap.size() < 510){
+        Cluster.Statement statement = new Cluster.Statement();
+        Random randomGenerator = new Random();
+        String statementDefinition = "select * from member where member_name = member-510"
+ 

<TRUNCATED>

[13/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.ztree.excheck-3.5.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.ztree.excheck-3.5.js b/pulse/src/main/webapp/scripts/lib/jquery.ztree.excheck-3.5.js
new file mode 100644
index 0000000..af198ca
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.ztree.excheck-3.5.js
@@ -0,0 +1,624 @@
+/*
+ * JQuery zTree excheck 3.5.02
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-01-28
+ */
+(function($){
+	//default consts of excheck
+	var _consts = {
+		event: {
+			CHECK: "ztree_check"
+		},
+		id: {
+			CHECK: "_check"
+		},
+		checkbox: {
+			STYLE: "checkbox",
+			DEFAULT: "chk",
+			DISABLED: "disable",
+			FALSE: "false",
+			TRUE: "true",
+			FULL: "full",
+			PART: "part",
+			FOCUS: "focus"
+		},
+		radio: {
+			STYLE: "radio",
+			TYPE_ALL: "all",
+			TYPE_LEVEL: "level"
+		}
+	},
+	//default setting of excheck
+	_setting = {
+		check: {
+			enable: false,
+			autoCheckTrigger: false,
+			chkStyle: _consts.checkbox.STYLE,
+			nocheckInherit: false,
+			chkDisabledInherit: false,
+			radioType: _consts.radio.TYPE_LEVEL,
+			chkboxType: {
+				"Y": "ps",
+				"N": "ps"
+			}
+		},
+		data: {
+			key: {
+				checked: "checked"
+			}
+		},
+		callback: {
+			beforeCheck:null,
+			onCheck:null
+		}
+	},
+	//default root of excheck
+	_initRoot = function (setting) {
+		var r = data.getRoot(setting);
+		r.radioCheckedList = [];
+	},
+	//default cache of excheck
+	_initCache = function(treeId) {},
+	//default bind event of excheck
+	_bindEvent = function(setting) {
+		var o = setting.treeObj,
+		c = consts.event;
+		o.bind(c.CHECK, function (event, srcEvent, treeId, node) {
+			tools.apply(setting.callback.onCheck, [!!srcEvent?srcEvent : event, treeId, node]);
+		});
+	},
+	_unbindEvent = function(setting) {
+		var o = setting.treeObj,
+		c = consts.event;
+		o.unbind(c.CHECK);
+	},
+	//default event proxy of excheck
+	_eventProxy = function(e) {
+		var target = e.target,
+		setting = data.getSetting(e.data.treeId),
+		tId = "", node = null,
+		nodeEventType = "", treeEventType = "",
+		nodeEventCallback = null, treeEventCallback = null;
+
+		if (tools.eqs(e.type, "mouseover")) {
+			if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+				tId = target.parentNode.id;
+				nodeEventType = "mouseoverCheck";
+			}
+		} else if (tools.eqs(e.type, "mouseout")) {
+			if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+				tId = target.parentNode.id;
+				nodeEventType = "mouseoutCheck";
+			}
+		} else if (tools.eqs(e.type, "click")) {
+			if (setting.check.enable && tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.CHECK) !== null) {
+				tId = target.parentNode.id;
+				nodeEventType = "checkNode";
+			}
+		}
+		if (tId.length>0) {
+			node = data.getNodeCache(setting, tId);
+			switch (nodeEventType) {
+				case "checkNode" :
+					nodeEventCallback = _handler.onCheckNode;
+					break;
+				case "mouseoverCheck" :
+					nodeEventCallback = _handler.onMouseoverCheck;
+					break;
+				case "mouseoutCheck" :
+					nodeEventCallback = _handler.onMouseoutCheck;
+					break;
+			}
+		}
+		var proxyResult = {
+			stop: false,
+			node: node,
+			nodeEventType: nodeEventType,
+			nodeEventCallback: nodeEventCallback,
+			treeEventType: treeEventType,
+			treeEventCallback: treeEventCallback
+		};
+		return proxyResult
+	},
+	//default init node of excheck
+	_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+		if (!n) return;
+		var checkedKey = setting.data.key.checked;
+		if (typeof n[checkedKey] == "string") n[checkedKey] = tools.eqs(n[checkedKey], "true");
+		n[checkedKey] = !!n[checkedKey];
+		n.checkedOld = n[checkedKey];
+		if (typeof n.nocheck == "string") n.nocheck = tools.eqs(n.nocheck, "true");
+		n.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);
+		if (typeof n.chkDisabled == "string") n.chkDisabled = tools.eqs(n.chkDisabled, "true");
+		n.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);
+		if (typeof n.halfCheck == "string") n.halfCheck = tools.eqs(n.halfCheck, "true");
+		n.halfCheck = !!n.halfCheck;
+		n.check_Child_State = -1;
+		n.check_Focus = false;
+		n.getCheckStatus = function() {return data.getCheckStatus(setting, n);};
+	},
+	//add dom for check
+	_afterA = function(setting, node, html) {
+		var checkedKey = setting.data.key.checked;
+		if (setting.check.enable) {
+			data.makeChkFlag(setting, node);
+			if (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && node[checkedKey] ) {
+				var r = data.getRoot(setting);
+				r.radioCheckedList.push(node);
+			}
+			html.push("<span ID='", node.tId, consts.id.CHECK, "' class='", view.makeChkClass(setting, node), "' treeNode", consts.id.CHECK, (node.nocheck === true?" style='display:none;'":""),"></span>");
+		}
+	},
+	//update zTreeObj, add method of check
+	_zTreeTools = function(setting, zTreeTools) {
+		zTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {
+			var checkedKey = this.setting.data.key.checked;
+			if (node.chkDisabled === true) return;
+			if (checked !== true && checked !== false) {
+				checked = !node[checkedKey];
+			}
+			callbackFlag = !!callbackFlag;
+			
+			if (node[checkedKey] === checked && !checkTypeFlag) {
+				return;
+			} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {
+				return;
+			}
+			if (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {
+				node[checkedKey] = checked;
+				var checkObj = $("#" + node.tId + consts.id.CHECK);
+				if (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+				view.setChkClass(this.setting, checkObj, node);
+				view.repairParentChkClassWithSelf(this.setting, node);
+				if (callbackFlag) {
+					setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+				}
+			}
+		}
+
+		zTreeTools.checkAllNodes = function(checked) {
+			view.repairAllChk(this.setting, !!checked);
+		}
+
+		zTreeTools.getCheckedNodes = function(checked) {
+			var childKey = this.setting.data.key.children;
+			checked = (checked !== false);
+			return data.getTreeCheckedNodes(this.setting, data.getRoot(setting)[childKey], checked);
+		}
+
+		zTreeTools.getChangeCheckedNodes = function() {
+			var childKey = this.setting.data.key.children;
+			return data.getTreeChangeCheckedNodes(this.setting, data.getRoot(setting)[childKey]);
+		}
+
+		zTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {
+			disabled = !!disabled;
+			inheritParent = !!inheritParent;
+			inheritChildren = !!inheritChildren;
+			view.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);
+			view.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);
+		}
+
+		var _updateNode = zTreeTools.updateNode;
+		zTreeTools.updateNode = function(node, checkTypeFlag) {
+			if (_updateNode) _updateNode.apply(zTreeTools, arguments);
+			if (!node || !this.setting.check.enable) return;
+			var nObj = $("#" + node.tId);
+			if (nObj.get(0) && tools.uCanDo(this.setting)) {
+				var checkObj = $("#" + node.tId + consts.id.CHECK);
+				if (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);
+				view.setChkClass(this.setting, checkObj, node);
+				view.repairParentChkClassWithSelf(this.setting, node);
+			}
+		}
+	},
+	//method of operate data
+	_data = {
+		getRadioCheckedList: function(setting) {
+			var checkedList = data.getRoot(setting).radioCheckedList;
+			for (var i=0, j=checkedList.length; i<j; i++) {
+				if(!data.getNodeCache(setting, checkedList[i].tId)) {
+					checkedList.splice(i, 1);
+					i--; j--;
+				}
+			}
+			return checkedList;
+		},
+		getCheckStatus: function(setting, node) {
+			if (!setting.check.enable || node.nocheck || node.chkDisabled) return null;
+			var checkedKey = setting.data.key.checked,
+			r = {
+				checked: node[checkedKey],
+				half: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))
+			};
+			return r;
+		},
+		getTreeCheckedNodes: function(setting, nodes, checked, results) {
+			if (!nodes) return [];
+			var childKey = setting.data.key.children,
+			checkedKey = setting.data.key.checked,
+			onlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);
+			results = !results ? [] : results;
+			for (var i = 0, l = nodes.length; i < l; i++) {
+				if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {
+					results.push(nodes[i]);
+					if(onlyOne) {
+						break;
+					}
+				}
+				data.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);
+				if(onlyOne && results.length > 0) {
+					break;
+				}
+			}
+			return results;
+		},
+		getTreeChangeCheckedNodes: function(setting, nodes, results) {
+			if (!nodes) return [];
+			var childKey = setting.data.key.children,
+			checkedKey = setting.data.key.checked;
+			results = !results ? [] : results;
+			for (var i = 0, l = nodes.length; i < l; i++) {
+				if (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {
+					results.push(nodes[i]);
+				}
+				data.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);
+			}
+			return results;
+		},
+		makeChkFlag: function(setting, node) {
+			if (!node) return;
+			var childKey = setting.data.key.children,
+			checkedKey = setting.data.key.checked,
+			chkFlag = -1;
+			if (node[childKey]) {
+				for (var i = 0, l = node[childKey].length; i < l; i++) {
+					var cNode = node[childKey][i];
+					var tmp = -1;
+					if (setting.check.chkStyle == consts.radio.STYLE) {
+						if (cNode.nocheck === true || cNode.chkDisabled === true) {
+							tmp = cNode.check_Child_State;
+						} else if (cNode.halfCheck === true) {
+							tmp = 2;
+						} else if (cNode[checkedKey]) {
+							tmp = 2;
+						} else {
+							tmp = cNode.check_Child_State > 0 ? 2:0;
+						}
+						if (tmp == 2) {
+							chkFlag = 2; break;
+						} else if (tmp == 0){
+							chkFlag = 0;
+						}
+					} else if (setting.check.chkStyle == consts.checkbox.STYLE) {
+						if (cNode.nocheck === true || cNode.chkDisabled === true) {
+							tmp = cNode.check_Child_State;
+						} else if (cNode.halfCheck === true) {
+							tmp = 1;
+						} else if (cNode[checkedKey] ) {
+							tmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;
+						} else {
+							tmp = (cNode.check_Child_State > 0) ? 1 : 0;
+						}
+						if (tmp === 1) {
+							chkFlag = 1; break;
+						} else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {
+							chkFlag = 1; break;
+						} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {
+							chkFlag = 1; break;
+						} else if (tmp > -1) {
+							chkFlag = tmp;
+						}
+					}
+				}
+			}
+			node.check_Child_State = chkFlag;
+		}
+	},
+	//method of event proxy
+	_event = {
+
+	},
+	//method of event handler
+	_handler = {
+		onCheckNode: function (event, node) {
+			if (node.chkDisabled === true) return false;
+			var setting = data.getSetting(event.data.treeId),
+			checkedKey = setting.data.key.checked;
+			if (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;
+			node[checkedKey] = !node[checkedKey];
+			view.checkNodeRelation(setting, node);
+			var checkObj = $("#" + node.tId + consts.id.CHECK);
+			view.setChkClass(setting, checkObj, node);
+			view.repairParentChkClassWithSelf(setting, node);
+			setting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);
+			return true;
+		},
+		onMouseoverCheck: function(event, node) {
+			if (node.chkDisabled === true) return false;
+			var setting = data.getSetting(event.data.treeId),
+			checkObj = $("#" + node.tId + consts.id.CHECK);
+			node.check_Focus = true;
+			view.setChkClass(setting, checkObj, node);
+			return true;
+		},
+		onMouseoutCheck: function(event, node) {
+			if (node.chkDisabled === true) return false;
+			var setting = data.getSetting(event.data.treeId),
+			checkObj = $("#" + node.tId + consts.id.CHECK);
+			node.check_Focus = false;
+			view.setChkClass(setting, checkObj, node);
+			return true;
+		}
+	},
+	//method of tools for zTree
+	_tools = {
+
+	},
+	//method of operate ztree dom
+	_view = {
+		checkNodeRelation: function(setting, node) {
+			var pNode, i, l,
+			childKey = setting.data.key.children,
+			checkedKey = setting.data.key.checked,
+			r = consts.radio;
+			if (setting.check.chkStyle == r.STYLE) {
+				var checkedList = data.getRadioCheckedList(setting);
+				if (node[checkedKey]) {
+					if (setting.check.radioType == r.TYPE_ALL) {
+						for (i = checkedList.length-1; i >= 0; i--) {
+							pNode = checkedList[i];
+							pNode[checkedKey] = false;
+							checkedList.splice(i, 1);
+
+							view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
+							if (pNode.parentTId != node.parentTId) {
+								view.repairParentChkClassWithSelf(setting, pNode);
+							}
+						}
+						checkedList.push(node);
+					} else {
+						var parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);
+						for (i = 0, l = parentNode[childKey].length; i < l; i++) {
+							pNode = parentNode[childKey][i];
+							if (pNode[checkedKey] && pNode != node) {
+								pNode[checkedKey] = false;
+								view.setChkClass(setting, $("#" + pNode.tId + consts.id.CHECK), pNode);
+							}
+						}
+					}
+				} else if (setting.check.radioType == r.TYPE_ALL) {
+					for (i = 0, l = checkedList.length; i < l; i++) {
+						if (node == checkedList[i]) {
+							checkedList.splice(i, 1);
+							break;
+						}
+					}
+				}
+
+			} else {
+				if (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf("s") > -1)) {
+					view.setSonNodeCheckBox(setting, node, true);
+				}
+				if (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf("s") > -1)) {
+					view.setSonNodeCheckBox(setting, node, false);
+				}
+				if (node[checkedKey] && setting.check.chkboxType.Y.indexOf("p") > -1) {
+					view.setParentNodeCheckBox(setting, node, true);
+				}
+				if (!node[checkedKey] && setting.check.chkboxType.N.indexOf("p") > -1) {
+					view.setParentNodeCheckBox(setting, node, false);
+				}
+			}
+		},
+		makeChkClass: function(setting, node) {
+			var checkedKey = setting.data.key.checked,
+			c = consts.checkbox, r = consts.radio,
+			fullStyle = "";
+			if (node.chkDisabled === true) {
+				fullStyle = c.DISABLED;
+			} else if (node.halfCheck) {
+				fullStyle = c.PART;
+			} else if (setting.check.chkStyle == r.STYLE) {
+				fullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;
+			} else {
+				fullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) ? c.FULL:c.PART) : ((node.check_Child_State < 1)? c.FULL:c.PART);
+			}
+			var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle;
+			chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName;
+			return "bttn " + c.DEFAULT + " " + chkName;
+		},
+		repairAllChk: function(setting, checked) {
+			if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {
+				var checkedKey = setting.data.key.checked,
+				childKey = setting.data.key.children,
+				root = data.getRoot(setting);
+				for (var i = 0, l = root[childKey].length; i<l ; i++) {
+					var node = root[childKey][i];
+					if (node.nocheck !== true && node.chkDisabled !== true) {
+						node[checkedKey] = checked;
+					}
+					view.setSonNodeCheckBox(setting, node, checked);
+				}
+			}
+		},
+		repairChkClass: function(setting, node) {
+			if (!node) return;
+			data.makeChkFlag(setting, node);
+			if (node.nocheck !== true) {
+				var checkObj = $("#" + node.tId + consts.id.CHECK);
+				view.setChkClass(setting, checkObj, node);
+			}
+		},
+		repairParentChkClass: function(setting, node) {
+			if (!node || !node.parentTId) return;
+			var pNode = node.getParentNode();
+			view.repairChkClass(setting, pNode);
+			view.repairParentChkClass(setting, pNode);
+		},
+		repairParentChkClassWithSelf: function(setting, node) {
+			if (!node) return;
+			var childKey = setting.data.key.children;
+			if (node[childKey] && node[childKey].length > 0) {
+				view.repairParentChkClass(setting, node[childKey][0]);
+			} else {
+				view.repairParentChkClass(setting, node);
+			}
+		},
+		repairSonChkDisabled: function(setting, node, chkDisabled, inherit) {
+			if (!node) return;
+			var childKey = setting.data.key.children;
+			if (node.chkDisabled != chkDisabled) {
+				node.chkDisabled = chkDisabled;
+			}
+			view.repairChkClass(setting, node);
+			if (node[childKey] && inherit) {
+				for (var i = 0, l = node[childKey].length; i < l; i++) {
+					var sNode = node[childKey][i];
+					view.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);
+				}
+			}
+		},
+		repairParentChkDisabled: function(setting, node, chkDisabled, inherit) {
+			if (!node) return;
+			if (node.chkDisabled != chkDisabled && inherit) {
+				node.chkDisabled = chkDisabled;
+			}
+			view.repairChkClass(setting, node);
+			view.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);
+		},
+		setChkClass: function(setting, obj, node) {
+			if (!obj) return;
+			if (node.nocheck === true) {
+				obj.hide();
+			} else {
+				obj.show();
+			}
+			obj.removeClass();
+			obj.addClass(view.makeChkClass(setting, node));
+		},
+		setParentNodeCheckBox: function(setting, node, value, srcNode) {
+			var childKey = setting.data.key.children,
+			checkedKey = setting.data.key.checked,
+			checkObj = $("#" + node.tId + consts.id.CHECK);
+			if (!srcNode) srcNode = node;
+			data.makeChkFlag(setting, node);
+			if (node.nocheck !== true && node.chkDisabled !== true) {
+				node[checkedKey] = value;
+				view.setChkClass(setting, checkObj, node);
+				if (setting.check.autoCheckTrigger && node != srcNode) {
+					setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+				}
+			}
+			if (node.parentTId) {
+				var pSign = true;
+				if (!value) {
+					var pNodes = node.getParentNode()[childKey];
+					for (var i = 0, l = pNodes.length; i < l; i++) {
+						if ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])
+						|| ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {
+							pSign = false;
+							break;
+						}
+					}
+				}
+				if (pSign) {
+					view.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);
+				}
+			}
+		},
+		setSonNodeCheckBox: function(setting, node, value, srcNode) {
+			if (!node) return;
+			var childKey = setting.data.key.children,
+			checkedKey = setting.data.key.checked,
+			checkObj = $("#" + node.tId + consts.id.CHECK);
+			if (!srcNode) srcNode = node;
+
+			var hasDisable = false;
+			if (node[childKey]) {
+				for (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {
+					var sNode = node[childKey][i];
+					view.setSonNodeCheckBox(setting, sNode, value, srcNode);
+					if (sNode.chkDisabled === true) hasDisable = true;
+				}
+			}
+			
+			if (node != data.getRoot(setting) && node.chkDisabled !== true) {
+				if (hasDisable && node.nocheck !== true) {
+					data.makeChkFlag(setting, node);
+				}
+				if (node.nocheck !== true && node.chkDisabled !== true) {
+					node[checkedKey] = value;
+					if (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;
+				} else {
+					node.check_Child_State = -1;
+				}
+				view.setChkClass(setting, checkObj, node);
+				if (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {
+					setting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);
+				}
+			}
+
+		}
+	},
+
+	_z = {
+		tools: _tools,
+		view: _view,
+		event: _event,
+		data: _data
+	};
+	$.extend(true, $.fn.zTree.consts, _consts);
+	$.extend(true, $.fn.zTree._z, _z);
+
+	var zt = $.fn.zTree,
+	tools = zt._z.tools,
+	consts = zt.consts,
+	view = zt._z.view,
+	data = zt._z.data,
+	event = zt._z.event;
+
+	data.exSetting(_setting);
+	data.addInitBind(_bindEvent);
+	data.addInitUnBind(_unbindEvent);
+	data.addInitCache(_initCache);
+	data.addInitNode(_initNode);
+	data.addInitProxy(_eventProxy);
+	data.addInitRoot(_initRoot);
+	data.addAfterA(_afterA);
+	data.addZTreeTools(_zTreeTools);
+
+	var _createNodes = view.createNodes;
+	view.createNodes = function(setting, level, nodes, parentNode) {
+		if (_createNodes) _createNodes.apply(view, arguments);
+		if (!nodes) return;
+		view.repairParentChkClassWithSelf(setting, parentNode);
+	}
+	var _removeNode = view.removeNode;
+	view.removeNode = function(setting, node) {
+		var parentNode = node.getParentNode();
+		if (_removeNode) _removeNode.apply(view, arguments);
+		if (!node || !parentNode) return;
+		view.repairChkClass(setting, parentNode);
+		view.repairParentChkClass(setting, parentNode);
+	}
+
+	var _appendNodes = view.appendNodes;
+	view.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {
+		var html = "";
+		if (_appendNodes) {
+			html = _appendNodes.apply(view, arguments);
+		}
+		if (parentNode) {
+			data.makeChkFlag(setting, parentNode);
+		}
+		return html;
+	}
+})(jQuery);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/tooltip.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/tooltip.js b/pulse/src/main/webapp/scripts/lib/tooltip.js
new file mode 100644
index 0000000..de1df3e
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/tooltip.js
@@ -0,0 +1,357 @@
+/**
+ * @license 
+ * jQuery Tools v1.2.6. Tooltip - UI essentials
+ * 
+ * NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
+ * 
+ * http://flowplayer.org/tools/tooltip/
+ *
+ * Since: November 2008
+ */
+(function($) { 	
+	// static constructs
+	$.tools = $.tools || {version: 'v1.2.6.'};
+	
+	$.tools.tooltip = {
+		
+		conf: { 
+			
+			// default effect variables
+			effect: 'toggle',			
+			fadeOutSpeed: "fast",
+			predelay: 0,
+			delay: 30,
+			opacity: 1,			
+			tip: 0,
+            fadeIE: false, // enables fade effect in IE
+			
+			// 'top', 'bottom', 'right', 'left', 'center'
+			position: ['top', 'center'], 
+			offset: [0, 0],
+			relative: false,
+			cancelDefault: true,
+			
+			// type to event mapping 
+			events: {
+				def: 			"mouseenter,mouseleave",
+				input: 		"focus,blur",
+				widget:		"focus mouseenter,blur mouseleave",
+				tooltip:		"mouseenter,mouseleave"
+			},
+			
+			// 1.2
+			layout: '<div/>',
+			tipClass: 'tooltip'
+		},
+		
+		addEffect: function(name, loadFn, hideFn) {
+			effects[name] = [loadFn, hideFn];	
+		} 
+	};
+	
+	
+	var effects = { 
+		toggle: [ 
+			function(done) { 
+				var conf = this.getConf(), tip = this.getTip(), o = conf.opacity;
+				if (o < 1) { tip.css({opacity: o}); }
+				tip.show();
+				done.call();
+			},
+			
+			function(done) { 
+				this.getTip().hide();
+				done.call();
+			} 
+		],
+		
+		fade: [
+			function(done) {
+				var conf = this.getConf();
+				if (!$.browser.msie || conf.fadeIE) {
+					this.getTip().fadeTo(conf.fadeInSpeed, conf.opacity, done);
+				}
+				else {
+					this.getTip().show();
+					done();
+				}
+			},
+			function(done) {
+				var conf = this.getConf();
+				if (!$.browser.msie || conf.fadeIE) {
+					this.getTip().fadeOut(conf.fadeOutSpeed, done);
+				}
+				else {
+					this.getTip().hide();
+					done();
+				}
+			}
+		]		
+	};   
+
+		
+	/* calculate tip position relative to the trigger */  	
+	function getPosition(trigger, tip, conf) {	
+
+		
+		// get origin top/left position 
+		var top = conf.relative ? trigger.position().top : trigger.offset().top, 
+			 left = conf.relative ? trigger.position().left : trigger.offset().left,
+			 pos = conf.position[0];
+
+		top  -= tip.outerHeight() - conf.offset[0];
+		left += trigger.outerWidth() + conf.offset[1];
+		
+		// iPad position fix
+		if (/iPad/i.test(navigator.userAgent)) {
+			top -= $(window).scrollTop();
+		}
+		
+		// adjust Y		
+		var height = tip.outerHeight() + trigger.outerHeight();
+		if (pos == 'center') 	{ top += height / 2; }
+		if (pos == 'bottom') 	{ top += height; }
+		
+		
+		// adjust X
+		pos = conf.position[1]; 	
+		var width = tip.outerWidth() + trigger.outerWidth();
+		if (pos == 'center') 	{ left -= width / 2; }
+		if (pos == 'left')   	{ left -= width; }	 
+		
+		return {top: top, left: left};
+	}		
+
+	
+	
+	function Tooltip(trigger, conf) {
+
+		var self = this, 
+			 fire = trigger.add(self),
+			 tip,
+			 timer = 0,
+			 pretimer = 0, 
+			 title = trigger.attr("title"),
+			 tipAttr = trigger.attr("data-tooltip"),
+			 effect = effects[conf.effect],
+			 shown,
+				 
+			 // get show/hide configuration
+			 isInput = trigger.is(":input"), 
+			 isWidget = isInput && trigger.is(":checkbox, :radio, select, :button, :submit"),			
+			 type = trigger.attr("type"),
+			 evt = conf.events[type] || conf.events[isInput ? (isWidget ? 'widget' : 'input') : 'def']; 
+		
+		
+		// check that configuration is sane
+		if (!effect) { throw "Nonexistent effect \"" + conf.effect + "\""; }					
+		
+		evt = evt.split(/,\s*/); 
+		if (evt.length != 2) { throw "Tooltip: bad events configuration for " + type; } 
+		
+		
+		// trigger --> show  
+		trigger.on(evt[0], function(e) {
+
+			clearTimeout(timer);
+			if (conf.predelay) {
+				pretimer = setTimeout(function() { self.show(e); }, conf.predelay);	
+				
+			} else {
+				self.show(e);	
+			}
+			
+		// trigger --> hide
+		}).on(evt[1], function(e)  {
+			clearTimeout(pretimer);
+			if (conf.delay)  {
+				timer = setTimeout(function() { self.hide(e); }, conf.delay);	
+				
+			} else {
+				self.hide(e);		
+			}
+			
+		}); 
+		
+		
+		// remove default title
+		if (title && conf.cancelDefault) { 
+			trigger.removeAttr("title");
+			trigger.data("title", title);			
+		}		
+		
+		$.extend(self, {
+				
+			show: function(e) {  
+
+				// tip not initialized yet
+				if (!tip) {
+					
+					// data-tooltip 
+					if (tipAttr) {
+						tip = $(tipAttr);
+
+					// single tip element for all
+					} else if (conf.tip) { 
+						tip = $(conf.tip).eq(0);
+						
+					// autogenerated tooltip
+					} else if (title) { 
+						tip = $(conf.layout).addClass(conf.tipClass).appendTo(document.body)
+							.hide().append(title);
+
+					// manual tooltip
+					} else {	
+						tip = trigger.next();  
+						if (!tip.length) { tip = trigger.parent().next(); } 	 
+					}
+					
+					if (!tip.length) { throw "Cannot find tooltip for " + trigger;	}
+				} 
+			 	
+			 	if (self.isShown()) { return self; }  
+				
+			 	// stop previous animation
+			 	tip.stop(true, true); 			 	
+			 	
+				// get position
+				var pos = getPosition(trigger, tip, conf);			
+		
+				// restore title for single tooltip element
+				if (conf.tip) {
+					tip.html(trigger.data("title"));
+				}
+
+				// onBeforeShow
+				e = $.Event();
+				e.type = "onBeforeShow";
+				fire.trigger(e, [pos]);				
+				if (e.isDefaultPrevented()) { return self; }
+		
+				
+				// onBeforeShow may have altered the configuration
+				pos = getPosition(trigger, tip, conf);
+				
+				// set position
+				tip.css({position:'absolute', top: pos.top, left: pos.left});					
+				
+				shown = true;
+				
+				// invoke effect 
+				effect[0].call(self, function() {
+					e.type = "onShow";
+					shown = 'full';
+					fire.trigger(e);		 
+				});					
+
+	 	
+				// tooltip events       
+				var event = conf.events.tooltip.split(/,\s*/);
+
+				if (!tip.data("__set")) {
+					
+					tip.off(event[0]).on(event[0], function() { 
+						clearTimeout(timer);
+						clearTimeout(pretimer);
+					});
+					
+					if (event[1] && !trigger.is("input:not(:checkbox, :radio), textarea")) { 					
+						tip.off(event[1]).on(event[1], function(e) {
+	
+							// being moved to the trigger element
+							if (e.relatedTarget != trigger[0]) {
+								trigger.trigger(evt[1].split(" ")[0]);
+							}
+						}); 
+					} 
+					
+					// bind agein for if same tip element
+					if (!conf.tip) tip.data("__set", true);
+				}
+				
+				return self;
+			},
+			
+			hide: function(e) {
+
+				if (!tip || !self.isShown()) { return self; }
+			
+				// onBeforeHide
+				e = $.Event();
+				e.type = "onBeforeHide";
+				fire.trigger(e);				
+				if (e.isDefaultPrevented()) { return; }
+	
+				shown = false;
+				
+				effects[conf.effect][1].call(self, function() {
+					e.type = "onHide";
+					fire.trigger(e);		 
+				});
+				
+				return self;
+			},
+			
+			isShown: function(fully) {
+				return fully ? shown == 'full' : shown;	
+			},
+				
+			getConf: function() {
+				return conf;	
+			},
+				
+			getTip: function() {
+				return tip;	
+			},
+			
+			getTrigger: function() {
+				return trigger;	
+			}		
+
+		});		
+
+		// callbacks	
+		$.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function(i, name) {
+				
+			// configuration
+			if ($.isFunction(conf[name])) { 
+				$(self).on(name, conf[name]); 
+			}
+
+			// API
+			self[name] = function(fn) {
+				if (fn) { $(self).on(name, fn); }
+				return self;
+			};
+		});
+		
+	}
+		
+	
+	// jQuery plugin implementation
+	$.fn.tooltip = function(conf) {
+		
+		// return existing instance
+		var api = this.data("tooltip");
+		if (api) { return api; }
+
+		conf = $.extend(true, {}, $.tools.tooltip.conf, conf);
+		
+		// position can also be given as string
+		if (typeof conf.position == 'string') {
+			conf.position = conf.position.split(/,?\s/);	
+		}
+		
+		// install tooltip for each entry in jQuery object
+		this.each(function() {
+			api = new Tooltip($(this), conf); 
+			$(this).data("tooltip", api); 
+		});
+		
+		return conf.api ? api: this;		 
+	};
+		
+}) (jQuery);
+
+		
+


[68/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
GEODE-287: Remove old gfsh code

This commit is just file deletes except for one unit test
that had an unused import of one of the deleted classes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/67085172
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/67085172
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/67085172

Branch: refs/heads/feature/GEODE-17
Commit: 670851721899a49e8f95f239606a74c111ef8ebb
Parents: a0b6aae
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Aug 26 11:39:14 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:52:44 2015 +0530

----------------------------------------------------------------------
 .../gfsh/aggregator/AggregateFunction.java      |   67 -
 .../tools/gfsh/aggregator/AggregateResults.java |  126 --
 .../aggregator/AggregatorPartitionFunction.java |   54 -
 .../tools/gfsh/app/CommandExecutable.java       |    8 -
 .../gemfire/internal/tools/gfsh/app/Gfsh.java   | 2027 ------------------
 .../internal/tools/gfsh/app/GfshVersion.java    |  455 ----
 .../internal/tools/gfsh/app/Nextable.java       |    8 -
 .../tools/gfsh/app/ServerExecutable.java        |   11 -
 .../app/aggregator/AggregateFunctionTask.java   |   62 -
 .../tools/gfsh/app/aggregator/Aggregator.java   |  549 -----
 .../app/aggregator/AggregatorException.java     |   50 -
 .../gfsh/app/aggregator/AggregatorPeer.java     |  254 ---
 .../functions/util/LocalRegionInfoFunction.java |  235 --
 .../functions/util/RegionCreateFunction.java    |   81 -
 .../functions/util/RegionDestroyFunction.java   |   86 -
 .../tools/gfsh/app/cache/CacheBase.java         |  178 --
 .../gfsh/app/cache/InstantiatorClassLoader.java |  101 -
 .../tools/gfsh/app/cache/data/GenericMap.java   |  196 --
 .../gfsh/app/cache/data/GenericMessage.java     |  807 -------
 .../app/cache/data/InvalidTypeException.java    |   28 -
 .../tools/gfsh/app/cache/data/ListMap.java      |  197 --
 .../gfsh/app/cache/data/ListMapMessage.java     |  615 ------
 .../tools/gfsh/app/cache/data/ListMessage.java  |  594 -----
 .../tools/gfsh/app/cache/data/Listable.java     |   45 -
 .../tools/gfsh/app/cache/data/MapMessage.java   |  629 ------
 .../tools/gfsh/app/cache/data/Mappable.java     |   50 -
 .../tools/gfsh/app/cache/index/EntryMap.java    |   80 -
 .../tools/gfsh/app/cache/index/IndexInfo.java   |   52 -
 .../tools/gfsh/app/cache/index/Indexer.java     |   13 -
 .../gfsh/app/cache/index/IndexerManager.java    |   32 -
 .../gfsh/app/cache/index/LookupService.java     |  352 ---
 .../app/cache/index/LookupServiceException.java |   64 -
 .../gfsh/app/cache/index/task/ForceGCTask.java  |   32 -
 .../app/cache/index/task/IndexInfoTask.java     |  131 --
 .../app/cache/index/task/QuerySizeTask.java     |  134 --
 .../gfsh/app/cache/index/task/QueryTask.java    |  323 ---
 .../tools/gfsh/app/command/CommandClient.java   |  417 ----
 .../gfsh/app/command/CommandException.java      |   31 -
 .../app/command/CommandResultsListener.java     |   15 -
 .../tools/gfsh/app/command/task/EchoTask.java   |   63 -
 .../task/PartitionedRegionAttributeTask.java    |  205 --
 .../gfsh/app/command/task/QueryResults.java     |  123 --
 .../tools/gfsh/app/command/task/QueryTask.java  |  522 -----
 .../task/RefreshAggregatorRegionTask.java       |   53 -
 .../gfsh/app/command/task/RegionClearTask.java  |   85 -
 .../gfsh/app/command/task/RegionCreateTask.java |  162 --
 .../app/command/task/RegionDestroyTask.java     |   97 -
 .../gfsh/app/command/task/RegionPathTask.java   |  156 --
 .../gfsh/app/command/task/RegionSizeTask.java   |   70 -
 .../gfsh/app/command/task/data/MemberInfo.java  |   79 -
 .../task/data/PartitionAttributeInfo.java       |  124 --
 .../command/task/data/RegionAttributeInfo.java  |  286 ---
 .../internal/tools/gfsh/app/commands/bcp.java   |  527 -----
 .../internal/tools/gfsh/app/commands/cd.java    |   79 -
 .../tools/gfsh/app/commands/classloader.java    |  323 ---
 .../internal/tools/gfsh/app/commands/clear.java |  197 --
 .../tools/gfsh/app/commands/connect.java        |  124 --
 .../internal/tools/gfsh/app/commands/db.java    |  312 ---
 .../internal/tools/gfsh/app/commands/debug.java |   48 -
 .../tools/gfsh/app/commands/deploy.java         |  271 ---
 .../internal/tools/gfsh/app/commands/echo.java  |   59 -
 .../internal/tools/gfsh/app/commands/fetch.java |   48 -
 .../internal/tools/gfsh/app/commands/gc.java    |   93 -
 .../internal/tools/gfsh/app/commands/get.java   |  143 --
 .../internal/tools/gfsh/app/commands/help.java  |   40 -
 .../internal/tools/gfsh/app/commands/index.java |  395 ----
 .../internal/tools/gfsh/app/commands/key.java   |   67 -
 .../internal/tools/gfsh/app/commands/local.java |  101 -
 .../internal/tools/gfsh/app/commands/ls.java    |  584 -----
 .../internal/tools/gfsh/app/commands/mkdir.java |  253 ---
 .../internal/tools/gfsh/app/commands/next.java  |   63 -
 .../tools/gfsh/app/commands/optional/look.java  |  166 --
 .../tools/gfsh/app/commands/optional/perf.java  |  150 --
 .../internal/tools/gfsh/app/commands/pr.java    |  209 --
 .../tools/gfsh/app/commands/property.java       |   85 -
 .../internal/tools/gfsh/app/commands/put.java   |  490 -----
 .../internal/tools/gfsh/app/commands/pwd.java   |   37 -
 .../tools/gfsh/app/commands/rebalance.java      |  186 --
 .../tools/gfsh/app/commands/refresh.java        |   67 -
 .../internal/tools/gfsh/app/commands/rm.java    |  175 --
 .../internal/tools/gfsh/app/commands/rmdir.java |  249 ---
 .../tools/gfsh/app/commands/select.java         |  139 --
 .../internal/tools/gfsh/app/commands/show.java  |  240 ---
 .../internal/tools/gfsh/app/commands/size.java  |  281 ---
 .../internal/tools/gfsh/app/commands/value.java |   48 -
 .../internal/tools/gfsh/app/commands/which.java |  189 --
 .../internal/tools/gfsh/app/commands/zone.java  |   49 -
 .../tools/gfsh/app/function/GfshData.java       |   86 -
 .../tools/gfsh/app/function/GfshFunction.java   |  149 --
 .../tools/gfsh/app/function/command/clear.java  |   95 -
 .../tools/gfsh/app/function/command/deploy.java |  111 -
 .../tools/gfsh/app/function/command/gc.java     |   49 -
 .../tools/gfsh/app/function/command/index.java  |  199 --
 .../tools/gfsh/app/function/command/ls.java     |   80 -
 .../tools/gfsh/app/function/command/pr.java     |  118 -
 .../gfsh/app/function/command/rebalance.java    |  129 --
 .../tools/gfsh/app/function/command/rm.java     |   43 -
 .../tools/gfsh/app/function/command/which.java  |  159 --
 .../tools/gfsh/app/misc/util/ClassFinder.java   |  209 --
 .../gfsh/app/misc/util/DataSerializerEx.java    |   98 -
 .../app/misc/util/QueueDispatcherListener.java  |   11 -
 .../app/misc/util/QueueDispatcherThread.java    |   87 -
 .../gfsh/app/misc/util/ReflectionUtil.java      |  303 ---
 .../tools/gfsh/app/misc/util/StringUtil.java    |  142 --
 .../app/misc/util/SystemClassPathManager.java   |  171 --
 .../gfsh/app/pogo/InvalidKeyException.java      |   34 -
 .../internal/tools/gfsh/app/pogo/KeyType.java   |   96 -
 .../tools/gfsh/app/pogo/KeyTypeManager.java     |  199 --
 .../internal/tools/gfsh/app/pogo/MapLite.java   | 1136 ----------
 .../tools/gfsh/app/pogo/MapLiteSerializer.java  |  338 ---
 .../internal/tools/gfsh/app/util/DBUtil.java    | 1094 ----------
 .../tools/gfsh/app/util/DBUtilException.java    |   48 -
 .../tools/gfsh/app/util/GfshResultsBag.java     |  600 ------
 .../tools/gfsh/app/util/ObjectUtil.java         |  164 --
 .../tools/gfsh/app/util/OutputUtil.java         |  255 ---
 .../internal/tools/gfsh/app/util/PrintUtil.java | 1683 ---------------
 .../tools/gfsh/app/util/SimplePrintUtil.java    | 1366 ------------
 .../tools/gfsh/command/AbstractCommandTask.java |  136 --
 .../tools/gfsh/command/CommandResults.java      |  119 -
 .../tools/gfsh/command/CommandTask.java         |   23 -
 .../internal/tools/gfsh/util/RegionUtil.java    |  829 -------
 .../cache/ClientServerGetAllDUnitTest.java      |    1 -
 122 files changed, 28061 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregateFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregateFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregateFunction.java
deleted file mode 100644
index 95c2028..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregateFunction.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.aggregator;
-
-import java.io.Serializable;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-
-/**
- * All aggregate functions must implement AggregateFunction and use
- * Aggregator.aggregate() to execute them. The client application
- * submit a AggregateFunction via Aggregator.aggregate(), which in
- * turn sends it to the server(s) to be executed.
- * 
- * @author dpark
- *
- */
-public interface AggregateFunction extends Serializable
-{
-	/**
-	 * This is the first method invoked by each partition that has
-	 * the required data to execute the function. Use 
-	 * PartitionFunctionExecutionContext.getPartition() to get
-	 * the partitioned region that contains the data that the function
-	 * needs to execute on. The region can be iterated or queried to 
-	 * get the results. The results must be Serializable and returned 
-	 * in AggregateResults. Use AggregateResults.setDataObject
-	 * (Object dataObject) to set the results. Any errors and exceptions
-	 * can be set using AggregateResults.
-	 *  
-	 * @param context The ParitionFunction execution context.
-	 * @return The results from this particular partition.
-	 */
-	AggregateResults run(FunctionContext context);
-	
-	/**
-	 * Once all of the participating partitions returns AggregateResults, i.e.,
-	 * the run(PartitionFunctionExecutionContext context) method is invoked
-	 * in all participating partitions, this method is invoked with a list of
-	 * AggregateResults objects. This method should iterate thru the list to
-	 * perform a final aggregation. Each AggregateResults contains data 
-	 * object generated from the run(PartitionFunctionExecutionContext context)
-	 * method.
-	 * 
-	 * @param list The list of AggregateResults objects collected from all participating
-	 *             partitions.
-	 * @return The aggregated data. The return type is determined by each function.
-	 *         As such, each function must document the return type.
-	 */
-	Object aggregate(List list);
-	
-	/**
-	 * This method is invoked when an Aggregator has one or more aggregators
-	 * in addition to itself, i.e., Aggregator.addAggregator() is invoked.
-	 * It should iterate thru the passed-in results to perform a final aggregation.
-	 * Each object in the results array represents the object returned by
-	 * the aggregate(List list) method. 
-	 *  
-	 * @param results The array of AggregateResults objects collected from
-	 *                the participating partitions.
-	 * @return The final aggregated results representing the multiple distributed
-	 *         systems.
-	 */
-	Object aggregateDistributedSystems(Object results[]);
-}
-
-
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregateResults.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregateResults.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregateResults.java
deleted file mode 100644
index d89dba9..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregateResults.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.aggregator;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-
-/**
- * AggregateResults contains a data object set by AggregateFunction.run().
- * 
- * @author dpark
- */
-public class AggregateResults implements DataSerializable
-{
-
-	private static final long serialVersionUID = 1L;
-	
-	public static final byte CODE_NORMAL = 0;
-	public final static byte CODE_ERROR = -1;
-
-	private byte code = CODE_NORMAL;
-	private Object dataObject;
-	private String codeMessage;
-	private Throwable exception;
-	
-	/**
-	 * Creates an empty AggregateResults object.
-	 */
-	public AggregateResults()
-	{
-	}
-	
-	/**
-     * Creates a new AggregatedResults object with the data object
-     * contains results.
-     * @param dataObject The data object that contains the task results.
-     */
-    public AggregateResults(Object dataObject)
-    {
-    	this.dataObject = dataObject;
-    }
-    
-    /**
-     * Returns the data object set by AggregateFunction.
-     */
-    public Object getDataObject() {
-		return dataObject;
-	}
-    
-    /**
-     * Sets the data object.
-     * @param dataObject The data object representing the aggregated
-     *                   results from one partition.
-     */
-    public void setDataObject(Object dataObject) 
-    {
-		this.dataObject = dataObject;
-	}
-	
-	/**
-     * Returns the code set by the AggregateFunction. It is typically
-     * used for sending error code. The default value is 0.
-     * @return code
-     */
-    public byte getCode() {
-		return code;
-	}
-
-    /**
-     * Sets code. 
-     * @param code
-     */
-	public void setCode(byte code) {
-		this.code = code;
-	}
-
-	/**
-	 * Returns the message associated with the code. The default
-	 * value is null.
-	 */
-	public String getCodeMessage() {
-		return codeMessage;
-	}
-
-	/**
-	 * Sets the code message.
-	 * @param codeMessage
-	 */
-	public void setCodeMessage(String codeMessage) {
-		this.codeMessage = codeMessage;
-	}
-	
-	/**
-	 * Returns the partition exception if any.
-	 */
-	public Throwable getException() {
-		return exception;
-	}
-
-	/**
-	 * Sets the partition exception.
-	 * @param exception The exception caught in AggregateFunction.run().
-	 */
-	public void setException(Throwable exception) {
-		this.exception = exception;
-	}
-	
-	public void toData(DataOutput out) throws IOException
-    {
-    	out.writeByte(code);
-    	DataSerializer.writeString(codeMessage, out);
-        DataSerializer.writeObject(exception, out);
-        DataSerializer.writeObject(dataObject, out);
-    }
-
-    public void fromData(DataInput in) throws IOException, ClassNotFoundException
-    {
-    	code = in.readByte();
-    	codeMessage = DataSerializer.readString(in);
-        exception = (Throwable)DataSerializer.readObject(in);
-        dataObject = DataSerializer.readObject(in);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregatorPartitionFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregatorPartitionFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregatorPartitionFunction.java
deleted file mode 100644
index 833869f..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/aggregator/AggregatorPartitionFunction.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *========================================================================
- */
-package com.gemstone.gemfire.internal.tools.gfsh.aggregator;
-
-import java.util.Properties;
-
-//import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.internal.InternalEntity;
-import com.gemstone.gemfire.internal.tools.gfsh.aggregator.AggregateFunction;
-
-/**
- * The Aggregator partition function. Used internally.
- * 
- * @author dpark
- */
-public class AggregatorPartitionFunction implements /*Declarable, */Function, InternalEntity {
-  private static final long serialVersionUID = 1L;
-
-  public final static String ID = "__gfsh_aggregator";
-
-  public AggregatorPartitionFunction() {
-  }
-
-  public String getId() {
-    return ID;
-  }
-
-  public void execute(FunctionContext context) {
-    AggregateFunction aggregator = (AggregateFunction) context.getArguments();
-    context.getResultSender().lastResult(aggregator.run(context));
-  }
-
-  public void init(Properties p) {
-  }
-
-  public boolean hasResult() {
-    return true;
-  }
-
-  public boolean optimizeForWrite() {
-    return true;
-  }
-
-  public boolean isHA() {
-    return false;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/CommandExecutable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/CommandExecutable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/CommandExecutable.java
deleted file mode 100644
index 9285d94..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/CommandExecutable.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app;
-
-public interface CommandExecutable
-{
-	void execute(String command) throws Exception;
-	
-	void help();
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/Gfsh.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/Gfsh.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/Gfsh.java
deleted file mode 100644
index b893ffc..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/Gfsh.java
+++ /dev/null
@@ -1,2027 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.LineNumberReader;
-import java.io.PrintStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Stack;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import jline.ArgumentCompletor;
-import jline.ConsoleReader;
-import jline.History;
-import jline.SimpleCompletor;
-
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.Instantiator;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.types.CollectionType;
-import com.gemstone.gemfire.cache.query.types.ObjectType;
-import com.gemstone.gemfire.cache.query.types.StructType;
-import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.internal.tools.gfsh.app.aggregator.Aggregator;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.CacheBase;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.InstantiatorClassLoader;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.GenericMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.ListMap;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.ListMapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.ListMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.MapMessage;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.EntryMap;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.IndexInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.LookupService;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task.ForceGCTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task.IndexInfoTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task.QuerySizeTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.index.task.QueryTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.CommandClient;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.EchoTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.PartitionedRegionAttributeTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RefreshAggregatorRegionTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionClearTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionCreateTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionDestroyTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionPathTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.RegionSizeTask;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.MemberInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.PartitionAttributeInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.command.task.data.RegionAttributeInfo;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ClassFinder;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.ReflectionUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.StringUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.pogo.MapLite;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.ObjectUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.PrintUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.app.util.SimplePrintUtil;
-import com.gemstone.gemfire.internal.tools.gfsh.command.CommandResults;
-
-public class Gfsh extends CacheBase
-{
-
-	public final static String PROPERTY_GFSH_INIT_FILE = "gfshInitFile";
-	public final static String PROPERTY_DEFAULT_DATA_SERIALIZABLES_FILE = "gfsh.dataSerialiables.file";
-	public final static String PROPERTY_COMMAND_JAR_PATH = "gfsh.command.jar.path";
-	public final static String PROPERTY_COMMAND_OPT_JAR_PATH = "gfsh.command.opt.jar.path";
-	public final static String PROPERTY_USER_COMMAND_JAR_PATHS = "gfsh.user.command.jar.paths";
-	public final static String PROPERTY_USER_COMMAND_PACKAGES = "gfsh.user.command.packages";
-	public final static String PROPERTY_PLUGIN_JARS = "gfsh.plugin.jars";
-    private final static String PROMPT = "gfsh:";
-    private final static Set<String> DISABLED_COMMANDS = new HashSet<String>();
-	
-	private boolean debug = Boolean.getBoolean("gfsh.debug");
-	
-	private String startupDir = System.getProperty("gfsh.pwd"); 
-	
-	// User specified arguments. These override .gfshrc.
-	private String locators;
-	private String servers;
-	private String inputFilePath;
-	private String dataSerializableClassNames;
-	private String dataSerializablesFilePath;
-	private String jarDirectoryPath;
-	private String jarPaths;
-	private TreeSet<String> enumCommandSet = new TreeSet<String>();
-	private boolean isAdvancedMode;
-	private static final String[] advancedCommands = new String[] {"bcp", "class", "db", "deploy", "gc", "rebalance"/*, "zone"*/};
-
-	// Contains all of the supported commands (commandName, CommandExecutable)
-	private HashMap commandMap = new HashMap();
-
-	// All fields are initialized in postInit().
-	private boolean echo = false;
-	private long zoneDifference = 0;
-	private boolean showTime = true;
-	private boolean showResults;
-	private String queryKeyClassName;
-	private Class<?> queryKeyClass;
-	private String valueClassName;
-	private Class<?> valueClass;
-	private LookupService lookupService;
-	private String endpoints = "localhost:40401";
-	private int readTimeout = 300000; // 300 sec or 5 min
-	private boolean isLocator = false;
-	private String serverGroup = null;
-	private Pool pool;
-	
-	private Properties envProperties = new Properties();
-
-	private CommandClient commandClient;
-	private String commandRegionPath = "/__command";
-	private String aggregateRegionPath = commandRegionPath + "/pr";
-	private Aggregator aggregator;
-	private String currentPath = "/";
-	private Region<?, ?> currentRegion;
-	private List<?> lsKeyList;
-	private int selectLimit;
-	private int fetchSize = 100;
-	private boolean tableFormat = false;
-	private boolean printType = true;
-	private int collectionEntryPrintCount;
-
-	private SimpleDateFormat dateFormat = new SimpleDateFormat();
-
-	// jline reader
-	private ConsoleReader consoleReader;
-	
-	private BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
-
-	private String[] commands;
-	
-	static {
-	  DISABLED_COMMANDS.add("look");
-	  DISABLED_COMMANDS.add("perf");
-	  DISABLED_COMMANDS.add("zone");
-	}
-
-  public Gfsh(String args[]) throws Exception {
-    // parse user provide args
-    parseArgs(args);
-    
-    println();
-    
-    initCommands();
-    initJline();
-
-    initializeLogStatsResources();
-    // Initialize the cache
-    initializeCache();
-
-    setEcho(false);
-    setShowResults(true);
-    setShowTime(true);
-
-    postInit(args);
-    
-    println();
-    
-    if (isConnected() == false) {
-      println("Warning: not connected. Use the 'connect' command to connect to");
-      println("         locator(s) or cache server(s).");
-      println();
-    }
-  }
-	
-	protected void initializeCache() throws CacheException, IOException
-	{
-		// Load the default DataSerializable objects required by the utility packages.
-		try {
-      // gfaddon-util package - The base id is 200      
-      // gfcommand package - The base id is 300      
-      // MapLite registration
-      Class.forName("com.gemstone.gemfire.internal.tools.gfsh.app.DataSerializablesInitializer");
-			
-		} catch (ClassNotFoundException ex) {
-			println("Error: ClassNotFoundException. Unable to load the utility classes - " + ex.getMessage());
-			if (isDebug()) {
-				ex.printStackTrace();
-			}
-		}
-		
-		// Load the default DataSerializable file
-		try {
-			String defaultDataSerializablesFilePath = System.getProperty(PROPERTY_DEFAULT_DATA_SERIALIZABLES_FILE, "etc/DataSerializables.txt");
-			InstantiatorClassLoader.loadDataSerializables(defaultDataSerializablesFilePath);
-		} catch (IOException e) {
-			// ignore
-		} catch (ClassNotFoundException ex) {
-			println("Error: ClassNotFoundException. Unabled to load class - " + ex.getMessage());
-			if (isDebug()) {
-				ex.printStackTrace();
-			}
-		}
-	}
-	
-	private boolean isImplement(Class cls, Class interf)
-	{
-		Class interfaces[] = cls.getInterfaces();
-		for (int i = 0; i < interfaces.length; i++) {
-			if (interfaces[i] == interf) {
-				return true;
-			}
-		}
-		return false;
-	}
-	
-	private void loadCommands(String packageName, String commandPackageName, HashSet<Class> classSet) throws Exception
-	{
-		Class classes[] = ClassFinder.getClasses(commandPackageName);
-		if (classes.length == 0) {
-			String jarPath = System.getProperty(packageName);
-			classes = ClassFinder.getClasses(jarPath, commandPackageName);
-		}
-		
-		List<String> commands = Arrays.asList(advancedCommands);
-		
-		for (int i = 0; i < classes.length; i++) {
-			if (isImplement(classes[i], CommandExecutable.class)) { 
-			  String commandName = classes[i].getSimpleName();
-			  if ( !(!isAdvancedMode && commands.contains(commandName)) 
-					  && !DISABLED_COMMANDS.contains(commandName) ) {
-			    classSet.add(classes[i]);
-              }
-			}
-		}
-	}
-	
-	private void loadPlugins()
-	{
-		String pluginJars = System.getProperty(PROPERTY_PLUGIN_JARS);
-		if (pluginJars == null) {
-			return;
-		}
-		pluginJars = pluginJars.trim();
-		if (pluginJars.length() == 0) {
-			return;
-		}
-		
-		String pathSeparator = System.getProperty("path.separator");
-		String split[] = pluginJars.split(pathSeparator);
-		for (int i = 0; i < split.length; i++) {
-			try {
-				ClassFinder.getAllClasses(split[i]);
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-		}
-	}
-	
-	private void initCommands() throws Exception
-	{
-		// Read all core command classes found in the package
-		// com.gemstone.gemfire.internal.tools.gfsh.commands
-		HashSet<Class> classSet = new HashSet<Class>();
-		loadCommands(PROPERTY_COMMAND_JAR_PATH, "com.gemstone.gemfire.internal.tools.gfsh.app.commands", classSet);
-		
-		// Read all optional command classes found in the package
-		// com.gemstone.gemfire.internal.tools.gfsh.commands.optional
-//		boolean optEnabled = Boolean.getBoolean("gfsh.opt.command.enabled");
-//		if (optEnabled) {
-//			loadCommands(PROPERTY_COMMAND_OPT_JAR_PATH, "com.gemstone.gemfire.internal.tools.gfsh.app.commands.optional", classSet);
-//		}
-		
-		// Read user specified command classes
-		String userPackageNames = System.getProperty(PROPERTY_USER_COMMAND_PACKAGES);
-		if (userPackageNames != null) {
-			userPackageNames = userPackageNames.trim();
-			String packageSplit[] = null;
-			if (userPackageNames.length() > 0) {
-				packageSplit = userPackageNames.split(",");
-				for (int i = 0; i < packageSplit.length; i++) {
-					Class[] classes2 = ClassFinder.getClasses(packageSplit[i]);			
-					for (int j = 0; j < classes2.length; j++) {
-						if (isImplement(classes2[j], CommandExecutable.class)) { 
-							classSet.add(classes2[j]);
-						}
-					}
-				}
-			}
-
-			String jarPaths = System.getProperty(PROPERTY_USER_COMMAND_JAR_PATHS);
-			if (jarPaths != null && packageSplit != null) {
-				jarPaths = jarPaths.trim();
-				if (jarPaths.length() > 0) {
-					String split[] = jarPaths.split(",");
-					for (int i = 0; i < split.length; i++) {
-						for (int k = 0; k < packageSplit.length; k++) {
-							Class[] classes2 = ClassFinder.getClasses(split[i], packageSplit[k]);
-							for (int j = 0; j < classes2.length; j++) {
-								if (isImplement(classes2[j], CommandExecutable.class)) { 
-									classSet.add(classes2[j]);
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		ArrayList<String> commandList = new ArrayList();
-		for (Class class1 : classSet) {
-			commandList.add(getCommandName(class1));
-		}
-		Collections.sort(commandList);
-		commands = commandList.toArray(new String[0]);
-
-		for (Class commandClass : classSet) {
-			Constructor constructor = commandClass.getConstructor(this.getClass());
-			Object commandObject = constructor.newInstance(this);
-			commandMap.put(getCommandName(commandObject.getClass()), commandObject);
-		}
-	}
-	
-	private String getCommandName(Class class1)
-	{
-		String name = class1.getSimpleName();
-		if (name.equals("classloader")) {
-			name = "class";
-		}
-		return name;
-	}
-
-	private void initFile(String relativeFilePath) throws IOException
-	{
-		// Load data classes
-		if (dataSerializableClassNames != null) {
-			String split[] = dataSerializableClassNames.split(",");
-			for (int i = 0; i < split.length; i++) {
-				try {
-					Class clazz = Class.forName(split[i]);
-					println("Loaded " + clazz.getName());
-				} catch (ClassNotFoundException e) {
-					println(split[i] + " - " + e.getClass().getSimpleName() + ": " + e.getMessage());
-					if (isDebug()) {
-						e.printStackTrace();
-					}
-				}
-			}
-		}
-		
-		// Load data classes listed in DataSerializables.txt
-		File dataSerializablesFile = null;
-		if (dataSerializablesFilePath != null) {
-			if (dataSerializablesFilePath.startsWith("/") || dataSerializablesFilePath.indexOf(':') >= 0) {
-				// absolute path
-				dataSerializablesFile = new File(dataSerializablesFilePath);
-			} else {
-				// relative path
-				if (startupDir != null) {
-					dataSerializablesFile = new File(startupDir, dataSerializablesFilePath);
-				} else {
-					dataSerializablesFile = new File(dataSerializablesFilePath);
-				}
-			}
-		}
-		
-		if (dataSerializablesFile != null) {
-			if (dataSerializablesFile.exists() == false) {
-				println();
-				println("Error: specified file does not exist: " + dataSerializablesFile.getAbsolutePath());
-				println();
-				System.exit(-1);
-			}
-			
-			execute("class -d " + dataSerializablesFile.getAbsolutePath());
-		}
-		
-		
-		// Load jars in directory
-		if (jarDirectoryPath != null) {
-			File file = new File(jarDirectoryPath);
-			if (file.exists() == false) {
-				println();
-				println("Error: specified file does not exist: " + jarDirectoryPath);
-				println();
-				System.exit(-1);
-			}
-			execute("class -dir " + jarDirectoryPath);
-		}
-		
-		// Load jars
-		if (jarPaths != null) {
-			execute("class -jar " + jarPaths);
-		}
-		
-		// Load all plugins - DataSerializables.txt not needed if 
-		// the data class jar files are placed in the addons/plugins
-		// directory. Note that loadPlugins() loads all classes
-		// in that directory including subdirectories.
-		loadPlugins();
-
-		
-		// Get .gfshrc file
-		File gfshrcFile = null;
-		if (inputFilePath != null) {
-			if (inputFilePath.startsWith("/") || inputFilePath.indexOf(':') >= 0) {
-				// absolute path
-				gfshrcFile = new File(inputFilePath);
-			} else {
-				// relative path
-				if (startupDir != null) {
-					gfshrcFile = new File(startupDir, inputFilePath);
-				} else {
-					gfshrcFile = new File(inputFilePath);
-				}
-			}
-		}
-		
-		String userHomeDir = System.getProperty("user.home");
-		
-		// if the input file is valid
-		if (gfshrcFile != null) {
-			if (gfshrcFile.exists() == false || gfshrcFile.isFile() == false) {
-				println();
-				println("Error: invalid input file - " + inputFilePath);
-				println();
-				System.exit(-1);
-			} 
-		} else {
-			gfshrcFile = new File(userHomeDir, relativeFilePath);
-			if (gfshrcFile.exists() == false) {
-				gfshrcFile = new File(userHomeDir, ".gfshrc");
-				if (gfshrcFile.exists() == false) {
-					gfshrcFile.createNewFile();
-				}
-			}
-		}
-		
-		File gfshDir = new File(userHomeDir, ".gemfire");
-		if (gfshDir.exists() == false) {
-			gfshDir.mkdir();
-		}
-		
-		File etcDir = new File(gfshDir, "etc");
-		if (etcDir.exists() == false) {
-			etcDir.mkdir();
-		}
-//		File logDir = new File(gfshDir, "log");
-//		if (logDir.exists() == false) {
-//			logDir.mkdir();
-//		}
-//		File statsDir = new File(gfshDir, "stats");
-//		if (statsDir.exists() == false) {
-//			statsDir.mkdir();
-//		}
-
-		LineNumberReader reader = new LineNumberReader(new FileReader(gfshrcFile));
-		String line = reader.readLine();
-		String command;
-		ArrayList<String> commandList = new ArrayList();
-		StringBuffer buffer = new StringBuffer();
-		while (line != null) {
-			command = line.trim();
-			if (command.length() > 0 && command.startsWith("#") == false) {
-				if (command.endsWith("\\")) {
-					buffer.append(command.substring(0, command.length() - 1));
-				} else {
-					buffer.append(command);
-					commandList.add(buffer.toString().trim());
-					buffer = new StringBuffer();
-				}
-			}
-			line = reader.readLine();
-		}
-		reader.close();
-
-		// Connect first if locators or servers are specified
-		command = null;
-		if (locators != null) {
-			command = "connect -l " + locators;
-		} else if (servers != null) {
-			command = "connect -s " + servers;
-		} else {
-		  command = "connect -s localhost:"+CacheServer.DEFAULT_PORT;
-		  println("Connecting using defaults: -s localhost:"+CacheServer.DEFAULT_PORT);
-		}
-		if (command != null) {
-			execute(command);
-		}
-		
-		// Execute commands
-		String commandName = null;
-		for (int i = 0; i < commandList.size(); i++) {
-			command = commandList.get(i);
-			command = expandProperties(command);
-			
-			if (isEcho()) {
-				println(command);
-			}
-			
-			// if locators or servers are specified then override
-			// the connect command.
-//			if (locators != null || servers != null) {
-//				if (command.startsWith("connect") && 
-//						(command.indexOf("-l") >= 0 || command.indexOf("-s") >= 0)) 
-//				{
-//					String newCommand = "connect";
-//					
-//					// keep non-connection options
-//					ArrayList<String> list = new ArrayList();
-//					parseCommand(command, list);
-//					for (int j = 1; j < list.size(); j++) {
-//						String token = list.get(i);
-//						if (token.equals("-s")) {
-//							j++;
-//						} else if (token.equals("-l")) {
-//							j++;
-//						} else if (token.equals("-r")) {
-//							j++;
-//							newCommand = newCommand + " -r " + list.get(j);
-//						}
-//					}
-//					
-//					if (newCommand.length() > "connect".length()) {
-//						execute(newCommand);
-//					}
-//				}
-//			} else {
-				execute(command);
-//			}
-		}
-	}
-	
-	public void setDebug(boolean debug)
-	{
-		this.debug = debug;
-	}
-	
-	public boolean isDebug()
-	{
-		return debug;
-	}
-	
-	public void execute(String command)
-	{
-		String commandName = null;
-		if (command != null) {
-			command = command.trim();
-			String[] split = command.split(" ");
-			commandName = split[0];
-		}
-
-		if (command == null /* EOF */|| command.startsWith("exit") || command.startsWith("quit")) {
-			close();
-			System.exit(0);
-		}
-
-		CommandExecutable executable = getCommand(commandName);
-		if (executable == null) {
-			println("Error: undefined command: " + commandName);
-		} else {
-			try {
-				executable.execute(command);
-			} catch (Exception ex) {
-        getCache().getLogger().error("While executing '"+command+"'", ex);
-				println("Error: " + command + " -- " + getCauseMessage(ex));
-			}
-		}
-	}
-
-	public CommandExecutable getCommand(String commandName)
-	{
-		if (commandName.equals("n")) {
-			commandName = "next";
-		} else if (commandName.equals("class")) {
-			
-		}
-		return (CommandExecutable) commandMap.get(commandName);
-	}
-	
-	public String getEnumCommands()
-	{
-		return enumCommandSet.toString();
-	}
-
-	public void addEnumCommand(String command)
-	{
-		enumCommandSet.add(command);
-	}
-	
-	private void postInit(String args[])
-	{
-		String iniFilePath = System.getProperty(PROPERTY_GFSH_INIT_FILE, ".gfshrc");
-		
-		zoneDifference = 0;
-		endpoints = null;
-		queryKeyClassName = null;
-		fetchSize = 100;
-		showResults = true;
-		showTime = true;
-		setCollectionEntryPrintCount(5);
-		setPrintType(true);
-		setTableFormat(true);
-
-		try {
-			initFile(iniFilePath);
-		} catch (IOException ex) {
-			println("Error: reading file " + iniFilePath + " -- " + getCauseMessage(ex));
-			if (isDebug()) {
-				ex.printStackTrace();
-			}
-		}
-		
-		// If the initialization did not create the cache then create it.
-		// No connection to the server but only local cache.
-		if (cache == null) {
-			try {
-				open();
-			} catch (IOException ex) {
-				println("Error: unable to create cache - " + ex.getMessage());
-				if (isDebug()) {
-					ex.printStackTrace();
-				}
-			}
-		}
-	}
-	
-	public String getLine(String prompt) throws IOException
-	{
-    if (prompt == null) {
-      prompt = PROMPT + currentPath + ">";
-    }
-
-		StringBuffer cmdBuffer = null;
-		boolean keepGoing;
-		String nextLine;
-		do {
-			keepGoing = false;
-      if (consoleReader == null) {
-        print(prompt);
-        nextLine = bufferedReader.readLine();
-      } else {
-        nextLine = consoleReader.readLine(prompt);
-      }
-
-			// if nextLine is null then we encountered EOF.
-			// In that case, leave cmdBuffer null if it is still null
-
-			if (this.isEcho()) {
-				if (nextLine == null) {
-					println("EOF");
-				} else if (nextLine.length() != 0) {
-//        println(nextLine); //FIXME: echo here not required? it echoes twice
-				}
-			}
-
-			if (nextLine == null) {
-				break;
-			} else if (cmdBuffer == null) {
-				cmdBuffer = new StringBuffer();
-			}
-
-			// if last character is a backward slash, replace backward slash
-			// with LF and continue to next line
-			if (nextLine.endsWith("\\")) {
-				nextLine = nextLine.substring(0, nextLine.length() - 1);
-				keepGoing = true;
-			}
-			cmdBuffer.append(nextLine);
-//			if (keepGoing) {
-//				cmdBuffer.append('\n');
-//			}
-		} while (keepGoing);
-
-//		if (this.isEcho())
-//			println();
-
-		return cmdBuffer == null ? null : cmdBuffer.toString();
-	}
-
-//FindBugs - private method never called
-//	private String getLine(BufferedReader bin) throws IOException
-//	{
-//		String prompt = currentPath;
-//
-//		StringBuffer cmdBuffer = null;
-//		boolean keepGoing;
-//		String nextLine;
-//		do {
-//			keepGoing = false;
-//			if (consoleReader == null) {
-//				print(prompt + "> ");
-//				nextLine = bin.readLine();
-//			} else {
-//				nextLine = consoleReader.readLine(prompt + "> ");
-//			}
-//
-//			// if nextLine is null then we encountered EOF.
-//			// In that case, leave cmdBuffer null if it is still null
-//
-//			if (this.echo) {
-//				if (nextLine == null) {
-//					println("EOF");
-//				} else if (nextLine.length() != 0) {
-//					println(nextLine);
-//				}
-//			}
-//
-//			if (nextLine == null) {
-//				break;
-//			} else if (cmdBuffer == null) {
-//				cmdBuffer = new StringBuffer();
-//			}
-//
-//			// if last character is a backward slash, replace backward slash
-//			// with
-//			// LF and continue to next line
-//			if (nextLine.endsWith("\\")) {
-//				nextLine = nextLine.substring(0, nextLine.length() - 1);
-//				keepGoing = true;
-//			}
-//			cmdBuffer.append(nextLine);
-//			if (keepGoing) {
-//				cmdBuffer.append('\n');
-//			}
-//		} while (keepGoing);
-//
-//		if (this.echo)
-//			println();
-//
-//		return cmdBuffer == null ? null : cmdBuffer.toString();
-//	}
-
-	/**
-	 * Returns a data object for the specified function call
-	 * @param value The data function of the formant "to_date('date', 'simple date formant')"
-	 * @throws ParseException
-	 */
-	public Date getDate(String value) throws ParseException
-	{
-		Date date = null;
-
-		// to_date('10/10/2008', 'MM/dd/yyyy')
-		String lowercase = value.toLowerCase();
-		boolean error = false;
-		if (lowercase.startsWith("to_date") == false) {
-			error = true;
-		} else {
-			int index = value.indexOf('(');
-			if (index == -1) {
-				error = true;
-			}
-			value = value.substring(index + 1);
-			String split2[] = value.split(",");
-			if (split2.length != 2) {
-				error = true;
-			} else {
-				for (int j = 0; j < split2.length; j++) {
-					split2[j] = split2[j].trim();
-				}
-				String dateStr = StringUtil.trim(split2[0], '\'');
-				String format = StringUtil.trim(StringUtil.trimRight(split2[1], ')'), '\'');
-				dateFormat.applyPattern(format);
-				date = dateFormat.parse(dateStr);
-			}
-		}
-		if (error) {
-			println("   Invalid date macro. Must use to_date('<date>', '<format>'). Ex, to_date('10/10/08', 'MM/dd/yy')");
-		}
-		return date;
-	}
-
-	public void println(Object obj)
-	{
-		System.out.println(obj);
-	}
-
-	public void println()
-	{
-		System.out.println();
-	}
-
-	public void print(String s)
-	{
-		System.out.print(s);
-	}
-
-	/**
-	 * Prints information on how this program should be used.
-	 */
-	public void showHelp()
-	{
-		PrintStream out = System.out;
-		out.println();
-		out.println("Commands:");
-		out.println();
-
-		for (int i = 0; i < commands.length; i++) {
-			CommandExecutable exe = getCommand(commands[i]);
-			exe.help();
-		}
-
-		out.println("exit or quit");
-		out.println("     Close the current cache and exits");
-		out.println();
-
-	}
-	
-	 public void showHelp(String command)
-	  {
-	    PrintStream out = System.out;
-      CommandExecutable exe = getCommand(command);
-      if (exe != null) {
-        exe.help();
-      } else {
-        out.println("Could not find command: "+command);
-      }
-	    out.println();
-	  }
-	
-	private TreeMap<String, Mappable> memberMap = new TreeMap<String, Mappable>();
-	
-	public List<Mappable> setMemberList(List<Mappable> memberMapList)
-	{
-		memberMap.clear();
-		for (Mappable mappable : memberMapList) {
-			String memberId;
-			try {
-				memberId = mappable.getString("MemberId");
-				memberMap.put(memberId, mappable);
-			} catch (Exception ex) {
-				// ignore
-			}
-		}
-		ArrayList<Mappable> sortedList = new ArrayList(memberMap.values());
-		return sortedList;
-	}
-	
-	public String getMemberId(int memberNumber)
-	{
-		Set<String> set = memberMap.keySet();
-		int index = memberNumber - 1;
-		if (set.size() > index) {
-			int i = 0;
-			for (String memberId : set) {
-				if (index == i) {
-					return memberId;
-				}
-			}
-		}
-		return null;
-	}
-
-	private void initJline() throws Exception
-	{
-//		String osName = System.getProperty("os.name");
-//		if (osName.startsWith("Windows")) {
-//			return;
-//		}
-
-		consoleReader = new ConsoleReader();
-		consoleReader.setBellEnabled(false);
-//		consoleReader.setDebug(new java.io.PrintWriter("jline-debug.txt"));
-		History history = consoleReader.getHistory();
-		if (history == null) {
-		  history = new History();
-		  consoleReader.setHistory(history);
-		}
-		File historyFile = new File(System.getProperty("user.home"), ".gfshhistory");
-		history.setHistoryFile(historyFile);
-//		reader.setDebug(new PrintWriter(new FileWriter("writer.debug", true)));
-
-		List completors = new LinkedList();
-		completors.add(new SimpleCompletor(commands));
-		consoleReader.addCompletor(new ArgumentCompletor(completors));
-	}
-
-	/**
-	 * Prompts the user for input and executes the command accordingly.
-	 */
-	void go()
-	{
-		println();
-		println("Enter 'help' or '?' for help at the command prompt.");
-		println("");
-//		BufferedReader bin = new BufferedReader(new InputStreamReader(System.in));
-		String[] split;
-		String commandName = null;
-
-		while (true) {
-			try {
-				println();
-				String command = getLine((String)null);
-				println();
-				if (command != null) {
-					command = command.trim();
-					command = expandProperties(command);
-					if (isEcho()) {
-						println(command);
-					}
-					split = command.split(" ");
-					commandName = split[0];
-				}
-
-				if (command == null /* EOF */|| command.startsWith("exit") || command.startsWith("quit")) {
-					close();
-					System.exit(0);
-				}
-
-				// Execute the command found in the map
-				CommandExecutable executable = getCommand(commandName);
-				if (executable != null) {
-					executable.execute(command);
-					continue;
-				}
-
-				// Some command name exceptions...
-				if (command.matches("\\(.*select.*")) {
-					executable = getCommand("select");
-				} else if (command.startsWith("?")) {
-					executable = getCommand("help");
-				}
-				if (executable != null) {
-					executable.execute(command);
-					continue;
-				}
-
-				// the specified command not supported
-				if (command.length() != 0) {
-					println("Unrecognized command. Enter 'help' or '?' to get a list of commands.");
-				}
-
-			} catch (Exception ex) {
-				println("Error: " + getCauseMessage(ex));
-//				cache.getLogger().info(ex);
-				if (debug) {
-					ex.printStackTrace();
-				}
-			}
-		}
-	}
-
-	public String getCauseMessage(Throwable ex)
-	{
-		Throwable cause = ex.getCause();
-		String causeMessage = null;
-		if (cause != null) {
-			causeMessage = getCauseMessage(cause);
-		} else {
-			causeMessage = ex.getClass().getSimpleName();
-			causeMessage += " -- " + ex.getMessage();
-		}
-		return causeMessage;
-	}
-
-	/**
-	 * Parses a <code>command</code> and places each of its tokens in a
-	 * <code>List</code>. Tokens are separated by whitespace, or can be wrapped
-	 * with double-quotes
-	 */
-	public static boolean parseCommand(String command, List list)
-	{
-		Reader in = new StringReader(command);
-		StringBuffer currToken = new StringBuffer();
-		String delim = " \t\n\r\f";
-		int c;
-		boolean inQuotes = false;
-		do {
-			try {
-				c = in.read();
-			} catch (IOException e) {
-				throw new Error("unexpected exception", e);
-			}
-
-			if (c < 0)
-				break;
-
-			if (c == '"') {
-				if (inQuotes) {
-					inQuotes = false;
-					list.add(currToken.toString().trim());
-					currToken = new StringBuffer();
-				} else {
-					inQuotes = true;
-				}
-				continue;
-			}
-
-			if (inQuotes) {
-				currToken.append((char) c);
-				continue;
-			}
-
-			if (delim.indexOf((char) c) >= 0) {
-				// whitespace
-				if (currToken.length() > 0) {
-					list.add(currToken.toString().trim());
-					currToken = new StringBuffer();
-				}
-				continue;
-			}
-
-			currToken.append((char) c);
-		} while (true);
-
-		if (currToken.length() > 0) {
-			list.add(currToken.toString().trim());
-		}
-		return true;
-	}
-	
-	public Object getKeyFromKeyList(int keyNum)
-	{
-		int index = keyNum - 1;
-		if (getLsKeyList() == null || getLsKeyList().size() <= index) {
-			return null;
-		}
-		return getLsKeyList().get(index);
-	}
-	
-	public Map getKeyMap(List list, int startIndex)
-	{
-		HashMap keyMap = new HashMap();
-		for (int i = startIndex; i < list.size(); i++) {
-			String val = (String)list.get(i);
-			String split[] = val.split("-"); 
-			if (split.length == 2) {
-				int startI = Integer.parseInt(split[0]);
-				int endIndex = Integer.parseInt(split[1]);
-				if (endIndex > getLsKeyList().size()) {
-					if (getLsKeyList().size() == 0) {
-						println("Error: Key list empty.");
-					} else {
-						println("Error: Out of range. Valid range: 1-" + getLsKeyList().size());
-					}
-					return keyMap;
-				}
-				for (int j = startI; j <= endIndex; j++) {
-					Object key = getLsKeyList().get(j-1);
-					keyMap.put(j, key);
-				}	
-			} else {
-				int index = Integer.parseInt(split[0]);
-				Object key = getLsKeyList().get(index-1);
-				keyMap.put(index, key);
-			}
-		}
-		return keyMap;
-	}
-
-	public Object getQueryKey(List list, int startIndex) throws Exception
-	{
-		// See if key is a primitive
-		String input = (String) list.get(startIndex);
-		Object key = null;
-		if (input.startsWith("'")) {
-			int lastIndex = -1;
-			if (input.endsWith("'") == false) {
-				lastIndex = input.length();
-			} else {
-				lastIndex = input.lastIndexOf("'");
-			}
-			if (lastIndex <= 1) {
-				println("Error: Invalid key. Empty string not allowed.");
-				return null;
-			}
-			key = input.subSequence(1, lastIndex); // lastIndex exclusive
-		} else {
-			key = ObjectUtil.getPrimitive(this, input, false);
-		}
-		if (key != null) {
-			return key;
-		}
-		
-		
-		// Key is an object
-		
-		// query key class must be defined
-		if (queryKeyClass == null) {
-			println("Error: key undefined. Use the key command to specify the key class.");
-			return null;
-		}
-		
-		// f1=v1 and f2='v2' and f3=v3
-
-		// Build the query predicate from the argument list
-		String queryPredicate = "";
-		for (int i = startIndex; i < list.size(); i++) {
-			queryPredicate += list.get(i) + " ";
-		}
-		String[] split = queryPredicate.split("and");
-
-		// Create the query key by invoking setters for each
-		// parameter listed in the queryPredicate
-		Object queryKey = queryKeyClass.newInstance();
-		Map<String, Method> setterMap = ReflectionUtil.getAllSettersMap(queryKey.getClass());
-		for (int i = 0; i < split.length; i++) {
-			String token = split[i];
-			String[] tokenSplit = token.split("=");
-			if (tokenSplit.length < 2) {
-				println("Error: Invalid query: " + token);
-				return null;
-			}
-			String field = tokenSplit[0].trim();
-			String value = tokenSplit[1].trim();
-			String setterMethodName = "set" + field;
-
-			Method setterMethod = setterMap.get(setterMethodName);
-			if (setterMethod == null) {
-				println("Error: " + setterMethodName + " undefined in " + queryKeyClass.getName());
-				return null;
-			}
-			Class types[] = setterMethod.getParameterTypes();
-			Class arg = types[0];
-			if (arg == byte.class || arg == Byte.class) {
-				setterMethod.invoke(queryKey, Byte.parseByte(value));
-			} else if (arg == char.class || arg == Character.class) {
-				setterMethod.invoke(queryKey, value.charAt(0));
-			} else if (arg == short.class || arg == Short.class) {
-				setterMethod.invoke(queryKey, Short.parseShort(value));
-			} else if (arg == int.class || arg == Integer.class) {
-				setterMethod.invoke(queryKey, Integer.parseInt(value));
-			} else if (arg == long.class || arg == Long.class) {
-				setterMethod.invoke(queryKey, Long.parseLong(value));
-			} else if (arg == float.class || arg == Float.class) {
-				setterMethod.invoke(queryKey, Float.parseFloat(value));
-			} else if (arg == double.class || arg == Double.class) {
-				setterMethod.invoke(queryKey, Double.parseDouble(value));
-			} else if (arg == Date.class) {
-				Date date = getDate(value);
-				if (date == null) {
-					println("Error: Unable to parse date.");
-					return null;
-				} else {
-					setterMethod.invoke(queryKey, date);
-				}
-			} else if (arg == String.class) {
-				if (value.startsWith("'")) {
-					value = value.substring(1);
-					if (value.endsWith("'")) {
-						value = value.substring(0, value.length() - 1);
-					}
-				}
-				setterMethod.invoke(queryKey, value);
-			} else {
-				println("Error: Unsupported type: " + setterMethod.getName() + "(" + arg.getName() + ")");
-				return null;
-			}
-		}
-
-		return queryKey;
-	}
-
-	public int printSelectResults(SelectResults sr, int rowCount)
-	{
-		if (sr == null) {
-			println("Error: SelectResults is null");
-			return 0;
-		}
-
-		StringBuffer sb = new StringBuffer();
-		CollectionType type = sr.getCollectionType();
-		sb.append(sr.size());
-		sb.append(" results in a collection of type ");
-		sb.append(type);
-		sb.append("\n");
-
-		ObjectType elementType = type.getElementType();
-		int row = 1;
-		if (rowCount == -1) {
-			rowCount = Integer.MAX_VALUE;
-		}
-		for (Iterator iter = sr.iterator(); iter.hasNext() && row <= rowCount;) {
-			Object element = iter.next();
-			if (elementType.isStructType()) {
-				StructType structType = (StructType) elementType;
-				Struct struct = (Struct) element;
-				ObjectType[] fieldTypes = structType.getFieldTypes();
-				String[] fieldNames = structType.getFieldNames();
-				Object[] fieldValues = struct.getFieldValues();
-
-				sb.append("  Struct with ");
-				sb.append(fieldTypes.length);
-				sb.append(" fields\n");
-
-				for (int i = 0; i < fieldTypes.length; i++) {
-					ObjectType fieldType = fieldTypes[i];
-					String fieldName = fieldNames[i];
-					Object fieldValue = fieldValues[i];
-
-					sb.append("    ");
-					sb.append(fieldValue.getClass().getName());
-					sb.append(" ");
-					if (/*fieldName instanceof String || */element.getClass().isPrimitive()) { //FindBugs - instanceof not needed here
-						sb.append(fieldName);
-					} else {
-						sb.append(ReflectionUtil.toStringGettersAnd(fieldName));
-					}
-					sb.append(" = ");
-					if (fieldValue instanceof String || element.getClass().isPrimitive()) {
-						sb.append(fieldValue);
-					} else {
-						sb.append(ReflectionUtil.toStringGettersAnd(fieldValue));
-					}
-					sb.append("\n");
-				}
-
-			} else {
-				sb.append("  ");
-				sb.append(row);
-				sb.append(". ");
-				if (element instanceof String || element.getClass().isPrimitive()) {
-					sb.append(element);
-				} else {
-					sb.append(ReflectionUtil.toStringGettersAnd(element));
-				}
-			}
-
-			sb.append("\n");
-			row++;
-		}
-
-		println(sb);
-		return row - 1;
-	}
-	
-	public void refreshAggregatorRegion()
-	{
-		commandClient.execute(new RefreshAggregatorRegionTask());
-	}
-
-	public void printEntry(Object key, Object value)
-	{
-		if (key instanceof String || key.getClass().isPrimitive()) {
-			System.out.print(key);
-		} else {
-			System.out.print(ReflectionUtil.toStringGettersAnd(key));
-		}
-		System.out.print(" ==> ");
-		if (value instanceof String || value.getClass().isPrimitive()) {
-			System.out.print(value);
-		} else {
-			System.out.print(ReflectionUtil.toStringGettersAnd(value));
-		}
-	}
-
-	/**
-	 * Returns the full path. Supports '..'.
-	 * 
-	 * @param newPath
-	 *            The new path to be evaluated
-	 * @param currentPath
-	 *            The current path
-	 * @return Returns null if the new path is invalid.
-	 */
-	public String getFullPath(String newPath, String currentPath)
-	{
-		if (newPath == null) {
-			return null;
-		}
-		if (newPath.startsWith("/")) {
-			return newPath;
-		}
-		
-		if (currentPath == null) {
-			currentPath = "/";
-		}
-
-		String path = currentPath;
-		String[] split = currentPath.split("/");
-		Stack pathStack = new Stack<String>();
-		for (int i = 0; i < split.length; i++) {
-			if (split[i].length() == 0) {
-				continue;
-			}
-			pathStack.add(split[i]);
-		}
-		split = newPath.split("/");
-		boolean invalidPath = false;
-		for (int i = 0; i < split.length; i++) {
-			if (split[i].length() == 0) {
-				continue;
-			}
-			String dirName = split[i];
-			if (dirName.equals("..")) {
-				if (pathStack.size() == 0) {
-					invalidPath = true;
-					break;
-				}
-				pathStack.pop();
-			} else if (dirName.equals(".")) {
-				continue;
-			} else {
-				pathStack.add(dirName);
-			}
-		}
-
-		if (invalidPath) {
-			return null;
-		}
-
-		String fullPath = "";
-		while (pathStack.size() > 0) {
-			fullPath = "/" + pathStack.pop() + fullPath;
-		}
-		if (fullPath.length() == 0) {
-			fullPath = "/";
-		}
-		return fullPath;
-	}
-	
-	public void reconnect() throws Exception
-	{
-		if (commandClient != null) {
-			try {
-				commandClient.close();
-			} catch (Exception ex) {
-				// ignore
-			}
-		}
-		if (lookupService != null) {
-			try {
-				lookupService.close();
-			} catch (Exception ex) {
-				// ignore
-			}
-		}
-		if (aggregator != null) {
-			try {
-				aggregator.close();
-			} catch (Exception ex) {
-				// ignore
-			}
-		}
-		
-		// close and reopen the cache
-		close();
-		open();
-		
-		PoolFactory factory = PoolManager.createFactory();
-		factory.setReadTimeout(readTimeout);
-		String split[] = endpoints.split(",");
-		for (int i = 0; i < split.length; i++) {
-			String locator = split[i];
-			String sp2[] = locator.split(":");
-			String host = sp2[0];
-			int port = Integer.parseInt(sp2[1]);
-			if (isLocator) {
-				factory.addLocator(host, port);	
-			} else {
-				factory.addServer(host, port);
-			}
-			if (serverGroup != null) {
-				factory.setServerGroup(serverGroup);
-			}
-		}
-		pool = factory.create("connectionPool");
-		commandClient = new CommandClient(commandRegionPath, pool);
-		
-		lookupService = new LookupService(commandClient);
-		aggregator = new Aggregator(commandClient);
-    if (logger != null && logger.configEnabled()) {
-      logger.config("Available Commands : "+Arrays.toString(commands));
-    }
-	}
-	
-	public Pool getPool()
-	{
-		return pool;
-	}
-
-	public boolean isConnected()
-	{
-		try {
-			CommandResults results = commandClient.execute(new EchoTask("hello, world"));
-			return true;
-		} catch (Exception ex) {
-			return false;
-		}
-
-	}
-
-	public void close()
-	{
-		if (cache != null && cache.isClosed() == false) {
-			cache.close();
-		}
-	}
-
-	public boolean isShowResults()
-	{
-		return showResults;
-	}
-
-	public void setShowResults(boolean showResults)
-	{
-		this.showResults = showResults;
-	}
-
-	public String getCurrentPath()
-	{
-		return currentPath;
-	}
-
-	public void setCurrentPath(String regionPath)
-	{
-		this.currentPath = regionPath;
-	}
-
-	public Region getCurrentRegion()
-	{
-		return currentRegion;
-	}
-
-	public void setCurrentRegion(Region region)
-	{
-		currentRegion = region;
-	}
-
-	public boolean isEcho()
-	{
-		return echo;
-	}
-
-	public void setEcho(boolean echo)
-	{
-		this.echo = echo;
-	}
-
-	public long getZoneDifference()
-	{
-		return zoneDifference;
-	}
-
-	public void setZoneDifference(long zoneDifference)
-	{
-		this.zoneDifference = zoneDifference;
-	}
-
-	public String getQueryKeyClassName()
-	{
-		return queryKeyClassName;
-	}
-
-	public void setQueryKeyClassName(String queryKeyClassName)
-	{
-		this.queryKeyClassName = queryKeyClassName;
-	}
-
-	public Class getQueryKeyClass()
-	{
-		return queryKeyClass;
-	}
-
-	public void setQueryKeyClass(Class queryKeyClass)
-	{
-		this.queryKeyClass = queryKeyClass;
-	}
-	
-	public void setKeyClass(String queryKeyClassName)
-	{
-		try {
-			queryKeyClass = Class.forName(queryKeyClassName);
-			this.queryKeyClassName = queryKeyClassName;
-		} catch (ClassNotFoundException e) {
-			println(e.getMessage());
-		}
-	}
-	
-	public String getValueClassName()
-	{
-		return valueClassName;
-	}
-
-	public void setValueClassName(String valueClassName)
-	{
-		this.valueClassName = valueClassName;
-	}
-	
-	public Class getValueClass()
-	{
-		return valueClass;
-	}
-
-	public void setValueClass(Class valueClass)
-	{
-		this.valueClass = valueClass;
-	}
-	
-	public void setValueClass(String valueClassName)
-	{
-		try {
-			valueClass = Class.forName(valueClassName);
-			this.valueClassName = valueClassName;
-		} catch (ClassNotFoundException e) {
-			println(e.getMessage());
-		}
-	}
-
-	public String getEndpoints()
-	{
-		return endpoints;
-	}
-
-	public void setEndpoints(String endpoints, boolean isLocator, String serverGroup, int readTimeout)
-	{
-		this.endpoints = endpoints;
-		this.isLocator = isLocator;
-		this.serverGroup = serverGroup;
-		this.readTimeout = readTimeout;
-	}
-	
-	public String getServerGroup()
-	{
-		return serverGroup;
-	}
-	
-	public int getReadTimeout()
-	{
-		return readTimeout;
-	}
-	
-	public String getCommandRegionPath()
-	{
-		return commandRegionPath;
-	}
-
-	public void setCommandRegionPath(String commandRegionPath)
-	{
-		this.commandRegionPath = commandRegionPath;
-		setAggregateRegionPath(commandRegionPath + "/pr");
-	}
-
-	public String getAggregateRegionPath()
-	{
-		return aggregateRegionPath;
-	}
-
-	public void setAggregateRegionPath(String aggregateRegionPath)
-	{
-		this.aggregateRegionPath = aggregateRegionPath;
-	}
-
-	public Aggregator getAggregator()
-	{
-		return aggregator;
-	}
-
-	public void setAggregator(Aggregator aggregator)
-	{
-		this.aggregator = aggregator;
-	}
-	
-	public int getSelectLimit()
-	{
-		return selectLimit;
-	}
-	
-	public void setSelectLimit(int selectLimit)
-	{
-		this.selectLimit = selectLimit;
-	}
-	
-	public int getFetchSize()
-	{
-		return fetchSize;
-	}
-
-	public void setFetchSize(int fetchSize)
-	{
-		this.fetchSize = fetchSize;
-	}
-	
-	public boolean isTableFormat()
-	{
-		return tableFormat;
-	}
-	
-	public void setTableFormat(boolean tableFormat)
-	{
-		this.tableFormat = tableFormat;
-		PrintUtil.setTableFormat(tableFormat);
-	}
-	
-	public boolean isPrintType()
-	{
-		return printType;
-	}
-
-	public void setPrintType(boolean printType)
-	{
-		this.printType = printType;
-		SimplePrintUtil.setPrintType(printType);
-	}
-
-	public int getCollectionEntryPrintCount()
-	{
-		return collectionEntryPrintCount;
-	}
-
-	public void setCollectionEntryPrintCount(int collectionEntryPrintCount)
-	{
-		this.collectionEntryPrintCount = collectionEntryPrintCount;
-		SimplePrintUtil.setCollectionEntryPrintCount(collectionEntryPrintCount);
-	}
-
-	public LookupService getLookupService()
-	{
-		return lookupService;
-	}
-
-	public CommandClient getCommandClient()
-	{
-		return commandClient;
-	}
-
-	public boolean isShowTime()
-	{
-		return showTime;
-	}
-
-	public void setShowTime(boolean showTime)
-	{
-		this.showTime = showTime;
-	}
-
-	public List getLsKeyList()
-	{
-		return lsKeyList;
-	}
-
-	public void setLsKeyList(List list)
-	{
-		this.lsKeyList = list;
-	}
-	
-	public boolean isLocator()
-	{
-		return isLocator;
-	}
-	
-	
-	public String expandProperties(String value)
-	{
-		value = value.trim();
-		
-		// Find properties and place them in list.
-		String split[] = value.split("\\$\\{");
-		ArrayList<String> list = new ArrayList<String>();
-		for (int i = 0; i < split.length; i++) {
-			int index = split[i].indexOf('}');
-			if (index != -1) {
-				list.add(split[i].substring(0, index));
-			}
-		}
-		
-		// appply each property (key) in the list
-		for (String key : list) {
-			String val = getProperty(key);
-			if (val == null) {
-				value = value.replaceAll("\\$\\{" + key + "\\}", "");
-			} else {
-				value = value.replaceAll("\\$\\{" + key + "\\}", val);
-			}
-		}
-		return value;
-	}
-	
-	public String getProperty(String key)
-	{
-		return envProperties.getProperty(key);
-	}
-	
-	public void setProperty(String key, String value)
-	{
-		if (value == null || value.length() == 0) {
-			envProperties.remove(key);
-		} else {
-			envProperties.setProperty(key, value);
-		}
-	}
-	
-	public void printProperties()
-	{
-		ArrayList<String> list = new ArrayList(envProperties.keySet());
-		Collections.sort(list);
-		for (String key : list) {
-			String value = getProperty(key);
-			println(key + "=" + value);
-		}
-	}
-
-	private void parseArgs(String args[])
-	{
-		String arg;
-		
-		for (int i = 0; i < args.length; i++) {
-			arg = args[i];
-
-			if (arg.equalsIgnoreCase("-?")) {
-				usage();
-			} else if (arg.equalsIgnoreCase("-c")) {
-				i++;
-				if (i < args.length) {
-					dataSerializableClassNames = args[i];
-				}
-			} else if (arg.equalsIgnoreCase("-d")) {
-				i++;
-				if (i < args.length) {
-					dataSerializablesFilePath = args[i];
-				}
-			} else if (arg.equalsIgnoreCase("-dir")) {
-				i++;
-				if (i < args.length) {
-					jarDirectoryPath = args[i];
-				}
-			} else if (arg.equalsIgnoreCase("-i")) {
-				i++;
-				if (i < args.length) {
-					inputFilePath = args[i];
-				}
-			} else if (arg.equalsIgnoreCase("-jar")) {
-				i++;
-				if (i < args.length) {
-					jarPaths = args[i];
-				}
-			} else if (arg.equalsIgnoreCase("-l")) {
-				i++;
-				if (i < args.length) {
-					locators = args[i];
-				}
-			} else if (arg.equalsIgnoreCase("-s")) {
-				i++;
-				if (i < args.length) {
-					servers = args[i];
-				}
-			} else if (arg.equalsIgnoreCase("-advanced")) {
-        isAdvancedMode = true;
-      } else {
-        System.out.println("Unknown option: '"+arg+"'");
-        usage();
-      }
-		}
-	}
-	
-	private static void usage()
-	{
-		String homeDir = System.getProperty("user.home");
-		String fileSeparator = System.getProperty("file.separator");
-		System.out.println();
-		System.out.println("Usage:");
-		System.out.println("   gfsh [-c <comma separated fully-qualified class names>]");
-		System.out.println("        [-d <DataSerializables.txt file>]");
-		System.out.println("        [-dir <directory>]");
-		System.out.println("        [-i <.gfshrc file>]");
-		System.out.println("        [-jar <jar paths>]");
-		System.out.println("        [-l <host:port>|-s <host:port>]");
-    System.out.println("        [-advanced]");
-    System.out.println("        [-? | -h[elp]]");
-		System.out.println();
-		System.out.println("   -c <comma separated fully-qualified class names>] - specifies");
-		System.out.println("        the names of classes to load. These classes typically");
-		System.out.println("        contain static blocks that register GemFire data class");
-		System.out.println("        ids via Instantiator.");
-		System.out.println();
-		System.out.println("   -d <DataSerializables.txt file>] - specifies the file path of");
-		System.out.println("        DataSerializables.txt that overrides ");
-		System.out.println("        " + homeDir + fileSeparator + ".gemfire" + fileSeparator + "etc" + fileSeparator + "DataSerializables.txt.");
-		System.out.println("        This option is equivalent to 'class -d <DataSerializables.txt>.");
-		System.out.println("        The file path can be relative or absolute.");
-		System.out.println();
-		System.out.println("   -dir <directory> - specifies the directory in which the jar files");
-		System.out.println("        that contain data files are located. Gfsh loads all of the classes");
-		System.out.println("        in the jar files including the jar files in the subdirectories.");
-		System.out.println("        The directory can be relative or absolute. This options is");
-		System.out.println("        equivalent to 'class -dir <directory>'.");
-		System.out.println();
-		System.out.println("   -i <.gfshrc path> - specifies the input file that overrides the default");
-		System.out.println("        .gfshrc file in " + homeDir + ".");
-		System.out.println("        The file path can be relative or absolute.");
-		System.out.println();
-		System.out.println("   -jar <jar paths> - specifies the jar paths separated by ',', ';',");
-		System.out.println("        or ':'. Gfsh loads all the the classes in the jar files. The");
-		System.out.println("        jar files can be relative or absolute. This options is equivalent");
-		System.out.println("        to 'class -jar <jar paths>'.");
-    System.out.println();
-    System.out.println("   -advanced - enables these advanced commands : " + Arrays.toString(advancedCommands));
-		System.out.println();
-		System.out.println("   -l <host:port> - specifies locators.");
-		System.out.println();
-		System.out.println("   -s <host:port> - specifies cache servers.");
-    System.out.println();
-    System.out.println("   -version - shows gfsh version.");
-    System.out.println();
-    System.out.println("   -?  OR -help - displays this help message.");    
-		System.out.println();
-		System.out.println("Example 1: Start gfsh using a relative path");
-		System.out.println("   cd /home/foo/app");
-		System.out.println("   export GEMFIRE_APP_CLASSPATH=classes");
-		System.out.println("   gfsh -l localhost:37000 -jar lib/foo.jar,lib/yong.jar");
-		System.out.println();
-		System.out.println("Example 2: Start gfsh using an app specific .gfshrc");
-		System.out.println("   export GEMFIRE_APP_JAR_DIR=/home/foo/app/lib");
-		System.out.println("   gfsh -l localhost:37000 -i /home/foo/app/.gfshrc");
-		System.out.println();
-		System.out.println("By default, during startup, gfsh sequentially executes the commands listed");
-		System.out.println("in the .gfshrc file found in your home directory. The gfsh options");
-		System.out.println("specified in the command line override the commands listed in .gfshrc.");
-		System.out.println();
-		System.exit(0);
-	}
-
-	public static void main(String args[]) throws Exception
-	{
-    if (args.length > 0) {
-      if (args[0].equals("-h") || args[0].equals("-help") || args[0].equals("-?")) {
-        usage();//System.exit is called from within usage()
-      } else if (args[0].equals("version") || args[0].equals("-version")) {
-        boolean fullVersion = (args.length > 1) && "FULL".equals(args[1].trim());
-        System.out.println(GfshVersion.asString(fullVersion));
-        return;
-      }
-    }
-
-		Gfsh gfsh = new Gfsh(args);
-		gfsh.go();
-	}
-}
-
-/*
- * FIXME: We can simply add a loadXXX() method in this class and move the code
- * from static block to that method. This would not require us to load this 
- * class in Gfsh.initializeCache() 
- */
-class DataSerializablesInitializer {
-
-  private final static int POGO_CLASS_ID_BASE = Integer.getInteger("pogo.classId.base", 0).intValue();
-  private final static int UTIL_CLASS_ID_BASE = Integer.getInteger("util.classId.base", POGO_CLASS_ID_BASE + 200).intValue();
-  private final static int COMMAND_CLASS_ID_BASE = Integer.getInteger("command.classId.base", 300);
-  
-  //code from com/gemstone/gemfire/internal/tools/gfsh/app/command/DataSerializables.java
-  static {
-
-    // Allow the deprecated command.classId.base base if defined
-    // else use util.cassId.base as the standard base. As of GemFire 6.5,
-    // all add-on libraries are tied to a single base id, util.cassId.base.
-    // POGO reserves class Ids less than 1000, i.e, 1-999, inclusive.
-
-    String oldCommandBaseId = System.getProperty("command.classId.base");
-    int classId;
-    if (oldCommandBaseId != null) {
-      classId = COMMAND_CLASS_ID_BASE;
-    } else {
-      classId = Integer.getInteger("util.classId.base", 200) + 100;
-    }
-
-    Instantiator.register(new Instantiator(CommandResults.class, classId++) {
-      public DataSerializable newInstance() {
-        return new CommandResults();
-      }
-    });
-
-    Instantiator.register(new Instantiator(RegionCreateTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new RegionCreateTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(RegionDestroyTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new RegionDestroyTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(RegionPathTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new RegionPathTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(ForceGCTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new ForceGCTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(IndexInfoTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new IndexInfoTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(QuerySizeTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new QuerySizeTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(QueryTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new QueryTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(IndexInfo.class, classId++) {
-      public DataSerializable newInstance() {
-        return new IndexInfo();
-      }
-    });
-
-    Instantiator.register(new Instantiator(EntryMap.class, classId++) {
-      public DataSerializable newInstance() {
-        return new EntryMap();
-      }
-    });
-
-    Instantiator.register(new Instantiator(
-        PartitionedRegionAttributeTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new PartitionedRegionAttributeTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(MemberInfo.class, classId++) {
-      public DataSerializable newInstance() {
-        return new MemberInfo();
-      }
-    });
-
-    Instantiator.register(new Instantiator(RegionAttributeInfo.class, classId++) {
-      public DataSerializable newInstance() {
-        return new RegionAttributeInfo();
-      }
-    });
-
-    Instantiator.register(new Instantiator(EchoTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new EchoTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(RegionSizeTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new RegionSizeTask();
-      }
-    });
-
-    Instantiator.register(new Instantiator(PartitionAttributeInfo.class,
-        classId++) {
-      public DataSerializable newInstance() {
-        return new PartitionAttributeInfo();
-      }
-    });
-
-    Instantiator.register(new Instantiator(RegionClearTask.class, classId++) {
-      public DataSerializable newInstance() {
-        return new RegionClearTask();
-      }
-    });
-  } //static 1
-
-  //code from com/gemstone/gemfire/internal/tools/gfsh/app/misc/util/DataSerializables.java 
-  static {
-    int classId = UTIL_CLASS_ID_BASE;
-
-    // default: 200
-    Instantiator.register(new Instantiator(GenericMessage.class, classId++) {
-      public DataSerializable newInstance() {
-        return new GenericMessage();
-      }
-    });
-
-    // default: 201
-    Instantiator.register(new Instantiator(ListMap.class, classId++) {
-      public DataSerializable newInstance() {
-        return new ListMap();
-      }
-    });
-
-    // default: 202
-    Instantiator.register(new Instantiator(ListMapMessage.class, classId++) {
-      public DataSerializable newInstance() {
-        return new ListMapMessage();
-      }
-    });
-
-    // default: 203
-    Instantiator.register(new Instantiator(ListMessage.class, classId++) {
-      public DataSerializable newInstance() {
-        return new ListMessage();
-      }
-    });
-
-    // default: 204
-    Instantiator.register(new Instantiator(MapMessage.class, classId++) {
-      public DataSerializable newInstance() {
-        return new MapMessage();
-      }
-    });
-
-    // default: 205
-    Instantiator.register(new Instantiator(MapLite.class, classId++) {
-      public DataSerializable newInstance() {
-        return new MapLite();
-      }
-    });
-  } //static 2
-  
-}
-


[45/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/release/3rdparty_licenses/open_source_licenses-vFabric_GemFire_Pulse_7.0.Beta.txt
----------------------------------------------------------------------
diff --git a/pulse/release/3rdparty_licenses/open_source_licenses-vFabric_GemFire_Pulse_7.0.Beta.txt b/pulse/release/3rdparty_licenses/open_source_licenses-vFabric_GemFire_Pulse_7.0.Beta.txt
new file mode 100755
index 0000000..3eac2f0
--- /dev/null
+++ b/pulse/release/3rdparty_licenses/open_source_licenses-vFabric_GemFire_Pulse_7.0.Beta.txt
@@ -0,0 +1,1019 @@
+open_source_license.txt
+
+VMware vFabric GemFire Pulse 7.0 Beta
+
+
+===========================================================================
+
+The following copyright statements and licenses apply to various open
+source software components (or portions thereof) that are distributed with
+this VMware software products.
+
+The VMware Product may also include other VMware components, which may contain additional open 
+source software packages. One or more such open_source_licenses.txt files may therefore 
+accompany this VMware Product. 
+
+The VMware product that includes this file does not necessarily use all the
+open source software components referred to below and may also only use
+portions of a given component.
+
+
+=============== TABLE OF CONTENTS =============================
+
+
+The following is a listing of the open source components detailed in this
+document.  This list is provided for your convenience; please read further if
+you wish to review the copyright notice(s) and the full text of the license
+associated with each component.
+
+
+
+
+
+SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
+
+   >>> flot-0.7
+   >>> infovistoolkit-2.0.1
+   >>> jqgrid-4.4.0
+   >>> jquery-1.7.2
+   >>> jquery-sparklines-2.0
+   >>> jquery-ui-1.8.23
+   >>> json-none
+
+
+
+APPENDIX. Standard License Files
+
+   >>> Apache License, V2.0
+
+   >>> GNU Lesser General Public License, V2.1
+
+
+
+--------------- SECTION 1:  BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ----------
+
+BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s).
+
+
+>>> flot-0.7
+
+Copyright (c) 2007-2012 IOLA and Ole Laursen
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+
+> Apache 2.0
+
+Downloads\flot-flot-v0.7-114-g7a22921.zip\flot-flot-7a22921\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> infovistoolkit-2.0.1
+
+Copyright (c) 2011 Sencha Inc. - Author: Nicolas Garcia Belmonte (http://philogb.github.com/)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> Apache 2.0
+
+Jit-2.0.1.zip\Jit\Extras\excanvas.js
+
+Copyright 2006 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+>>> jqgrid-4.4.0
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+Changes from Tony Tomov tony@trirand.com
+Dual licensed under the MIT and GPL licenses:
+http://www.opensource.org/licenses/mit-license.php
+http://www.gnu.org/licenses/gpl-2.0.html
+
+The MIT License (MIT)
+Copyright (c) <year> <copyright holders>
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+ADDITIONAL LICENSE INFORMATION:
+
+> LGPL 2.1
+
+jquery.jqGrid-4.4.1.zip\src\JsonXml.js
+
+The below work is licensed under Creative Commons GNU LGPL License.
+
+Original work:
+
+License:     http://creativecommons.org/licenses/LGPL/2.1/
+Author:      Stefan Goessner/2006
+Web:         http://goessner.net/
+
+Modifications made:
+
+Version:     0.9-p5
+Description: Restructured code, JSLint validated (no strict whitespaces),
+added handling of empty arrays, empty strings, and int/floats values.
+Author:      Michael Schler/2008-01-29
+Web:         http://michael.hinnerup.net/blog/2008/01/26/converting-json-to-xml-and-xml-to-json/
+
+Description: json2xml added support to convert functions as CDATA
+so it will be easy to write characters that cause some problems when convert
+Author:      Tony Tomov
+
+
+>>> jquery-1.7.2
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.]
+
+Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+
+Dual licensed under the MIT and GPL licenses:
+
+http://www.opensource.org/licenses/mit-license.php
+
+http://www.gnu.org/licenses/gpl.html
+
+The MIT License (MIT)
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> jquery-sparklines-2.0
+
+Copyright (c) 2012, Splunk Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice,
+this list of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of Splunk Inc nor the names of its contributors may
+be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+>>> jquery-ui-1.8.23
+
+[PLEASE NOTE:  VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE.PLEASE SEE BELOW FOR THE FULL TEXT OF THE MIT LICENSE.THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] 
+
+
+Copyright 2011, John Resig
+Dual licensed under the MIT or GPL Version 2 licenses.
+http://jquery.org/license
+
+Includes Sizzle.js
+http://sizzlejs.com/
+Copyright 2011, The Dojo Foundation
+Released under the MIT, BSD, and GPL Licenses.
+
+Date: Wed Mar 21 12:46:34 2012 -0700
+
+
+Copyright (c) 2012 Paul Bakaus, http://jqueryui.com/
+
+This software consists of voluntary contributions made by many
+individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
+contribution history, see the revision history and logs, available
+at http://jquery-ui.googlecode.com/svn/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+>>> json-none
+
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+
+
+=============== APPENDIX. Standard License Files ============== 
+
+
+--------------- SECTION 1: Apache License, V2.0 --------------
+
+Apache License 
+
+Version 2.0, January 2004 
+http://www.apache.org/licenses/ 
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.  
+
+"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control
+with that entity. For the purposes of this definition, "control" means
+(i) the power, direct or indirect, to cause the direction or management
+of such entity, whether by contract or otherwise, or (ii) ownership
+of fifty percent (50%) or more of the outstanding shares, or (iii)
+beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.  
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media
+types.  
+
+"Work" shall mean the work of authorship, whether in Source or
+Object form, made available under the License, as indicated by a copyright
+notice that is included in or attached to the work (an example is provided
+in the Appendix below).  
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this
+License, Derivative Works shall not include works that remain separable
+from, or merely link (or bind by name) to the interfaces of, the Work
+and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the
+original version of the Work and any modifications or additions to
+that Work or Derivative Works thereof, that is intentionally submitted
+to Licensor for inclusion in the Work by the copyright owner or by an
+individual or Legal Entity authorized to submit on behalf of the copyright
+owner. For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems
+that are managed by, or on behalf of, the Licensor for the purpose of
+discussing and improving the Work, but excluding communication that is
+conspicuously marked or otherwise designated in writing by the copyright
+owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty-free, irrevocable copyright license to reproduce, prepare
+Derivative Works of, publicly display, publicly perform, sublicense, and
+distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+Subject to the terms and conditions of this License, each Contributor
+hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+royalty- free, irrevocable (except as stated in this section) patent
+license to make, have made, use, offer to sell, sell, import, and
+otherwise transfer the Work, where such license applies only to those
+patent claims licensable by such Contributor that are necessarily
+infringed by their Contribution(s) alone or by combination of
+their Contribution(s) with the Work to which such Contribution(s)
+was submitted. If You institute patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Work or a Contribution incorporated within the Work constitutes direct
+or contributory patent infringement, then any patent licenses granted
+to You under this License for that Work shall terminate as of the date
+such litigation is filed.
+
+4. Redistribution.
+You may reproduce and distribute copies of the Work or Derivative Works
+thereof in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  a. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+
+  b. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+
+  c. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+
+  d. If the Work includes a "NOTICE" text file as part of its
+     distribution, then any Derivative Works that You distribute must
+     include a readable copy of the attribution notices contained
+     within such NOTICE file, excluding those notices that do not
+     pertain to any part of the Derivative Works, in at least one of
+     the following places: within a NOTICE text file distributed as part
+     of the Derivative Works; within the Source form or documentation,
+     if provided along with the Derivative Works; or, within a display
+     generated by the Derivative Works, if and wherever such third-party
+     notices normally appear. The contents of the NOTICE file are for
+     informational purposes only and do not modify the License. You
+     may add Your own attribution notices within Derivative Works that
+     You distribute, alongside or as an addendum to the NOTICE text
+     from the Work, provided that such additional attribution notices
+     cannot be construed as modifying the License.  You may add Your own
+     copyright statement to Your modifications and may provide additional
+     or different license terms and conditions for use, reproduction, or
+     distribution of Your modifications, or for any such Derivative Works
+     as a whole, provided Your use, reproduction, and distribution of the
+     Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+Unless You explicitly state otherwise, any Contribution intentionally
+submitted for inclusion in the Work by You to the Licensor shall be
+under the terms and conditions of this License, without any additional
+terms or conditions.  Notwithstanding the above, nothing herein shall
+supersede or modify the terms of any separate license agreement you may
+have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+This License does not grant permission to use the trade names, trademarks,
+service marks, or product names of the Licensor, except as required for
+reasonable and customary use in describing the origin of the Work and
+reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+Unless required by applicable law or agreed to in writing, Licensor
+provides the Work (and each Contributor provides its Contributions) on
+an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+express or implied, including, without limitation, any warranties or
+conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR
+A PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any risks
+associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+In no event and under no legal theory, whether in tort (including
+negligence), contract, or otherwise, unless required by applicable law
+(such as deliberate and grossly negligent acts) or agreed to in writing,
+shall any Contributor be liable to You for damages, including any direct,
+indirect, special, incidental, or consequential damages of any character
+arising as a result of this License or out of the use or inability to
+use the Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all other
+commercial damages or losses), even if such Contributor has been advised
+of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+While redistributing the Work or Derivative Works thereof, You may
+choose to offer, and charge a fee for, acceptance of support, warranty,
+indemnity, or other liability obligations and/or rights consistent with
+this License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf of
+any other Contributor, and only if You agree to indemnify, defend, and
+hold each Contributor harmless for any liability incurred by, or claims
+asserted against, such Contributor by reason of your accepting any such
+warranty or additional liability.
+
+END OF TERMS AND CONDITIONS 
+
+
+
+--------------- SECTION 2: GNU Lesser General Public License, V2.1 -----------
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
+
+
+===========================================================================
+
+To the extent any open source components are licensed under the
+GPL and/or LGPL, or other similar licenses that require the
+source code and/or modifications to source code to be made
+available (as would be noted above), you may obtain a copy of
+the source code corresponding to the binaries for such open
+source components and modifications thereto, if any, (the
+"Source Files"), by downloading the Source Files from VMware's website at
+http://www.vmware.com/download/open_source.html, or by sending a request, with
+your name and address to: VMware, Inc., 3401 Hillview Avenue,
+Palo Alto, CA 94304,United States of America. All such
+requests should clearly specify: OPEN SOURCE FILES REQUEST,
+Attention General Counsel. VMware shall mail a copy of the
+Source Files to you on a CD or equivalent physical medium. This
+offer to obtain a copy of the Source Files is valid for three
+years from the date you acquired this Software product. Alternatively,
+the Source Files may accompany the VMware product.
+
+
+[GFPULSE70BKD100512]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/release/docfiles/ReleaseNotes.txt
----------------------------------------------------------------------
diff --git a/pulse/release/docfiles/ReleaseNotes.txt b/pulse/release/docfiles/ReleaseNotes.txt
new file mode 100644
index 0000000..71d729a
--- /dev/null
+++ b/pulse/release/docfiles/ReleaseNotes.txt
@@ -0,0 +1,2 @@
+
+Pivotal GemFire Pulse Release Notes

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java
new file mode 100644
index 0000000..a063a32
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/PulseAppListener.java
@@ -0,0 +1,693 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.ResourceBundle;
+import java.util.Set;
+import java.util.Map.Entry;
+import java.util.logging.Level;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import com.vmware.gemfire.tools.pulse.internal.controllers.PulseController;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConfig;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * This class is used for checking the application running mode i.e. Embedded or
+ * not
+ * 
+ * @author Anand Hariharan
+ * @since version 7.0.Beta 2012-09-23
+ * 
+ */
+// @WebListener
+public class PulseAppListener implements ServletContextListener {
+  private PulseLogWriter LOGGER;
+  private final ResourceBundle resourceBundle = Repository.get()
+      .getResourceBundle();
+
+  // String object to store all messages which needs to be logged into the log
+  // file before logger gets initialized
+  private String messagesToBeLogged = "";
+
+  private Properties pulseProperties;
+  private Properties pulseSecurityProperties;
+  private Boolean sysPulseUseLocator;
+  private String sysPulseHost;
+  private String sysPulsePort;
+  private String jmxUserName;
+  private String jmxUserPassword;
+  
+  private boolean sysPulseUseSSLLocator;
+  private boolean sysPulseUseSSLManager;
+
+  @Override
+  public void contextDestroyed(ServletContextEvent event) {
+
+    // Stop all running threads those are created in Pulse
+    // Stop cluster threads
+    Repository.get().removeAllClusters();
+
+    if (LOGGER.infoEnabled()) {
+      LOGGER.info(resourceBundle.getString("LOG_MSG_CONTEXT_DESTROYED")
+          + event.getServletContext().getContextPath());
+    }
+  }
+
+  @Override
+  public void contextInitialized(ServletContextEvent event) {
+
+    messagesToBeLogged = messagesToBeLogged
+        .concat(formatLogString(resourceBundle
+            .getString("LOG_MSG_CONTEXT_INITIALIZED")));
+
+    // Load Pulse version details
+    loadPulseVersionDetails();
+
+    // Load Pulse Properties
+    pulseProperties = loadProperties(PulseConstants.PULSE_PROPERTIES_FILE);
+
+    if (pulseProperties.isEmpty()) {
+      messagesToBeLogged = messagesToBeLogged
+          .concat(formatLogString(resourceBundle
+              .getString("LOG_MSG_PROPERTIES_NOT_FOUND")));
+    } else {
+      messagesToBeLogged = messagesToBeLogged
+          .concat(formatLogString(resourceBundle
+              .getString("LOG_MSG_PROPERTIES_FOUND")));
+
+      // set Pulse product support into the Pulse controller for access from
+      // client side
+      // to display the appropriate ui depending on which product is supported
+      // in present deployment
+      String pulseProduct = pulseProperties.getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_PRODUCTSUPPORT);
+      // default is gemfire
+
+      if ((pulseProduct != null) && (pulseProduct.trim().equalsIgnoreCase(PulseConstants.PRODUCT_NAME_SQLFIRE))) {
+        PulseController.setPulseProductSupport(PulseConstants.PRODUCT_NAME_SQLFIRE);
+      }
+    }
+    
+    pulseSecurityProperties = loadProperties(PulseConstants.PULSE_SECURITY_PROPERTIES_FILE);
+
+    // Initialize logger
+    initializeLogger();
+
+    // Reference to repository
+    Repository repository = Repository.get();
+
+    if (LOGGER.infoEnabled()) {
+      LOGGER.info(resourceBundle.getString("LOG_MSG_CHECK_APP_RUNNING_MODE"));
+    }
+
+    boolean sysIsEmbedded = Boolean
+        .getBoolean(PulseConstants.SYSTEM_PROPERTY_PULSE_EMBEDDED);
+
+    if (sysIsEmbedded) {
+      // Application Pulse is running in Embedded Mode
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(resourceBundle
+            .getString("LOG_MSG_APP_RUNNING_EMBEDDED_MODE"));
+      }
+      repository.setIsEmbeddedMode(true);
+
+      sysPulseUseLocator = Boolean.FALSE;
+	  try{
+				// Get host name of machine running pulse in embedded mode
+		   sysPulseHost = InetAddress.getLocalHost().getCanonicalHostName();
+		} catch (UnknownHostException e) {
+			if (LOGGER.fineEnabled()) {
+				LOGGER.fine(resourceBundle
+							.getString("LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST")
+							+ e.getMessage());
+		    }
+				// Set default host name
+		    sysPulseHost = PulseConstants.GEMFIRE_DEFAULT_HOST;
+		} catch (Exception e) {
+			if (LOGGER.fineEnabled()) {
+					LOGGER.fine(resourceBundle
+							.getString("LOG_MSG_JMX_CONNECTION_UNKNOWN_HOST")
+							+ e.getMessage());
+			}
+				// Set default host name
+			sysPulseHost = PulseConstants.GEMFIRE_DEFAULT_HOST;
+		}
+      sysPulsePort = PulseConstants.GEMFIRE_DEFAULT_PORT;
+      
+      boolean pulseEmbededSqlf = Boolean.getBoolean(PulseConstants.SYSTEM_PROPERTY_PULSE_EMBEDDED_SQLF);
+      if(pulseEmbededSqlf){
+        PulseController.setPulseProductSupport(PulseConstants.PRODUCT_NAME_SQLFIRE);
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info(resourceBundle
+              .getString("LOG_MSG_APP_RUNNING_EMBEDDED_SQLF_MODE"));
+        }
+      }
+
+    } else {
+      // Application Pulse is running in Non-Embedded Mode
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(resourceBundle
+            .getString("LOG_MSG_APP_RUNNING_NONEMBEDDED_MODE"));
+      }
+      repository.setIsEmbeddedMode(false);
+
+      // Load JMX User Details
+      loadJMXUserDetails();
+      // Load locator and/or manager details
+      loadLocatorManagerDetails();
+
+    }
+
+    // Set user details in repository
+    repository.setJmxUserName(jmxUserName);
+    repository.setJmxUserPassword(jmxUserPassword);
+
+    // Set locator/Manager details in repository
+    repository.setJmxUseLocator(sysPulseUseLocator);
+    repository.setJmxHost(sysPulseHost);
+    repository.setJmxPort(sysPulsePort);
+    
+    //set SSL info
+    initializeSSL();
+    repository.setUseSSLLocator(sysPulseUseSSLLocator);
+    repository.setUseSSLManager(sysPulseUseSSLManager);
+
+  }
+
+  // Function to load pulse version details from properties file
+  private void loadPulseVersionDetails() {
+
+    // Read version details from version property file
+    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+    InputStream inputStream = classLoader
+        .getResourceAsStream(PulseConstants.PULSE_VERSION_PROPERTIES_FILE);
+
+    if (inputStream != null) {
+      Properties properties = new Properties();
+      try {
+        properties.load(inputStream);
+      } catch (IOException e) {
+        messagesToBeLogged = messagesToBeLogged
+            .concat(formatLogString(resourceBundle
+                .getString("LOG_MSG_EXCEPTION_LOADING_PROPERTIES_FILE")));
+      } finally {
+        try {
+          inputStream.close();
+        } catch (IOException e) {
+          messagesToBeLogged = messagesToBeLogged
+              .concat(formatLogString(resourceBundle
+                  .getString("LOG_MSG_EXCEPTION_CLOSING_INPUT_STREAM")));
+        }
+      }
+      // Set pulse version details in common object
+      PulseController.pulseVersion.setPulseVersion(properties.getProperty(
+          PulseConstants.PROPERTY_PULSE_VERSION, ""));
+      PulseController.pulseVersion.setPulseBuildId(properties.getProperty(
+          PulseConstants.PROPERTY_BUILD_ID, ""));
+      PulseController.pulseVersion.setPulseBuildDate(properties.getProperty(
+          PulseConstants.PROPERTY_BUILD_DATE, ""));
+      PulseController.pulseVersion.setPulseSourceDate(properties.getProperty(
+          PulseConstants.PROPERTY_SOURCE_DATE, ""));
+      PulseController.pulseVersion.setPulseSourceRevision(properties
+          .getProperty(PulseConstants.PROPERTY_SOURCE_REVISION, ""));
+      PulseController.pulseVersion.setPulseSourceRepository(properties
+          .getProperty(PulseConstants.PROPERTY_SOURCE_REPOSITORY, ""));
+    }
+
+    // Log Pulse Version details into log file
+    messagesToBeLogged = messagesToBeLogged
+        .concat(formatLogString(PulseController.pulseVersion
+            .getPulseVersionLogMessage()));
+  }
+
+  private void initializeLogger() {
+
+    // Override default log configuration by properties which are provided in
+    // properties file.
+    loadLogDetailsFromPropertyFile();
+
+    // Override log configuration by properties which are provided in
+    // through system properties.
+    loadLogDetailsFromSystemProperties();
+
+    // Initialize logger object
+    LOGGER = PulseLogWriter.getLogger();
+
+    // Log messages stored in messagesToBeLogged
+    if (LOGGER.infoEnabled()) {
+      LOGGER.info(messagesToBeLogged);
+      messagesToBeLogged = "";
+    }
+  }
+
+  // Function to load pulse properties from pulse.properties file
+  private Properties loadProperties(String propertyFile) {
+
+    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+    InputStream inputStream = classLoader.getResourceAsStream(propertyFile);
+    Properties properties = new Properties();
+
+    if (inputStream != null) {
+      messagesToBeLogged = messagesToBeLogged.concat(formatLogString(propertyFile + " "
+          + resourceBundle.getString("LOG_MSG_FILE_FOUND")));
+
+      try {
+        // Load properties from input stream
+        properties.load(inputStream);
+      } catch (IOException e1) {
+        messagesToBeLogged = messagesToBeLogged.concat(formatLogString(resourceBundle
+            .getString("LOG_MSG_EXCEPTION_LOADING_PROPERTIES_FILE")
+            + " " + propertyFile));
+      } finally {
+        // Close input stream
+        try {
+          inputStream.close();
+        } catch (IOException e) {
+          messagesToBeLogged = messagesToBeLogged.concat(formatLogString(resourceBundle
+              .getString("LOG_MSG_EXCEPTION_CLOSING_INPUT_STREAM")
+              + " " + propertyFile));
+        }
+      }
+
+    } else {
+      messagesToBeLogged = messagesToBeLogged.concat(formatLogString(resourceBundle
+          .getString("LOG_MSG_COULD_NOT_READ_FILE")
+          + " " + propertyFile));
+    }
+    return properties;
+  }
+
+  // Function to load Logging details from properties file
+  private void loadLogDetailsFromPropertyFile() {
+
+    // return, if Pulse Properties are not provided
+    if (pulseProperties.size() == 0) {
+      return;
+    }
+
+    messagesToBeLogged = messagesToBeLogged
+        .concat(formatLogString(resourceBundle
+            .getString("LOG_MSG_CHECK_LOG_PROPERTIES_IN_FILE")));
+
+    HashMap<String, String> logPropertiesHM = new HashMap<String, String>();
+
+    logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILENAME,
+        pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILENAME, ""));
+
+    logPropertiesHM.put(
+        PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILELOCATION,
+        pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILELOCATION, ""));
+
+    logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILESIZE,
+        pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILESIZE, ""));
+
+    logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILECOUNT,
+        pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILECOUNT, ""));
+
+    logPropertiesHM.put(
+        PulseConstants.APPLICATION_PROPERTY_PULSE_LOGDATEPATTERN,
+        pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_LOGDATEPATTERN, ""));
+
+    logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL,
+        pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL, ""));
+
+    logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGAPPEND,
+        pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_LOGAPPEND, ""));
+
+    if (logPropertiesHM.size() == 0) {
+      messagesToBeLogged = messagesToBeLogged
+          .concat(formatLogString(resourceBundle
+              .getString("LOG_MSG_LOG_PROPERTIES_NOT_FOUND_IN_FILE")));
+    } else {
+      messagesToBeLogged = messagesToBeLogged
+          .concat(formatLogString(resourceBundle
+              .getString("LOG_MSG_LOG_PROPERTIES_FOUND_IN_FILE")));
+    }
+
+    setLogConfigurations(logPropertiesHM);
+  }
+
+  // Function to load Logging details from system properties
+  private void loadLogDetailsFromSystemProperties() {
+
+    messagesToBeLogged = messagesToBeLogged
+        .concat(formatLogString(resourceBundle
+            .getString("LOG_MSG_CHECK_LOG_PROPERTIES_IN_SYSTEM_PROPERTIES")));
+
+    HashMap<String, String> logPropertiesHM = new HashMap<String, String>();
+
+    String sysLogFileName = System
+        .getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILENAME);
+    String sysLogFileLocation = System
+        .getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILELOCATION);
+    String sysLogFileSize = System
+        .getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILESIZE);
+    String sysLogFileCount = System
+        .getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILECOUNT);
+    String sysLogDatePattern = System
+        .getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGDATEPATTERN);
+    String sysLogLevel = System
+        .getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL);
+    String sysLogAppend = System
+        .getProperty(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGAPPEND);
+
+    if (sysLogFileName == null || sysLogFileName.isEmpty()) {
+      logPropertiesHM.put(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILENAME, "");
+    } else {
+      logPropertiesHM
+          .put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILENAME,
+              sysLogFileName);
+    }
+
+    if (sysLogFileLocation == null || sysLogFileLocation.isEmpty()) {
+      logPropertiesHM.put(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILELOCATION, "");
+    } else {
+      logPropertiesHM.put(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILELOCATION,
+          sysLogFileLocation);
+    }
+
+    if (sysLogFileSize == null || sysLogFileSize.isEmpty()) {
+      logPropertiesHM.put(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILESIZE, "");
+    } else {
+      logPropertiesHM
+          .put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILESIZE,
+              sysLogFileSize);
+    }
+
+    if (sysLogFileCount == null || sysLogFileCount.isEmpty()) {
+      logPropertiesHM.put(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILECOUNT, "");
+    } else {
+      logPropertiesHM.put(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILECOUNT,
+          sysLogFileCount);
+    }
+
+    if (sysLogDatePattern == null || sysLogDatePattern.isEmpty()) {
+      logPropertiesHM.put(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGDATEPATTERN, "");
+    } else {
+      logPropertiesHM.put(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGDATEPATTERN,
+          sysLogDatePattern);
+    }
+
+    if (sysLogLevel == null || sysLogLevel.isEmpty()) {
+      logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL,
+          "");
+    } else {
+      logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL,
+          sysLogLevel);
+    }
+
+    if (sysLogAppend == null || sysLogAppend.isEmpty()) {
+      logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGAPPEND,
+          "");
+    } else {
+      logPropertiesHM.put(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGAPPEND,
+          sysLogAppend);
+    }
+
+    if (logPropertiesHM.size() == 0) {
+      messagesToBeLogged = messagesToBeLogged
+          .concat(formatLogString(resourceBundle
+              .getString("LOG_MSG_LOG_PROPERTIES_NOT_FOUND_IN_SYSTEM_PROPERTIES")));
+    } else {
+      messagesToBeLogged = messagesToBeLogged
+          .concat(formatLogString(resourceBundle
+              .getString("LOG_MSG_LOG_PROPERTIES_FOUND_IN_SYSTEM_PROPERTIES")));
+    }
+
+    setLogConfigurations(logPropertiesHM);
+  }
+
+  private void setLogConfigurations(HashMap<String, String> logPropertiesHM) {
+
+    PulseConfig pulseConfig = Repository.get().getPulseConfig();
+
+    // log file name
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(logPropertiesHM
+        .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILENAME))) {
+      pulseConfig.setLogFileName(logPropertiesHM
+          .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILENAME));
+    }
+
+    // log file location
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(logPropertiesHM
+        .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILELOCATION))) {
+      pulseConfig.setLogFileLocation(logPropertiesHM
+          .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILELOCATION));
+    }
+
+    // log file size
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(logPropertiesHM
+        .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILESIZE))) {
+      pulseConfig.setLogFileSize(Integer.parseInt(logPropertiesHM
+          .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILESIZE)));
+    }
+
+    // log file count
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(logPropertiesHM
+        .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILECOUNT))) {
+      pulseConfig.setLogFileCount(Integer.parseInt(logPropertiesHM
+          .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGFILECOUNT)));
+    }
+
+    // log message date pattern
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(logPropertiesHM
+        .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGDATEPATTERN))) {
+      pulseConfig.setLogDatePattern(logPropertiesHM
+          .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGDATEPATTERN));
+    }
+
+    // log level
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(logPropertiesHM
+        .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL))) {
+      pulseConfig.setLogLevel(Level.parse(logPropertiesHM.get(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_LOGLEVEL).toUpperCase()));
+    }
+
+    // log append
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(logPropertiesHM
+        .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGAPPEND))) {
+      pulseConfig.setLogAppend(Boolean.valueOf(logPropertiesHM
+          .get(PulseConstants.APPLICATION_PROPERTY_PULSE_LOGAPPEND)));
+    }
+
+  }
+
+  // Function to load JMX User details from properties
+  private void loadJMXUserDetails() {
+
+    if (LOGGER.infoEnabled()) {
+      LOGGER.info(resourceBundle.getString("LOG_MSG_GET_JMX_USER_DETAILS"));
+    }
+
+    if (pulseProperties.isEmpty()) {
+      if (LOGGER.infoEnabled()) {
+        LOGGER
+            .info(resourceBundle
+                .getString("LOG_MSG_JMX_USER_DETAILS_NOT_FOUND")
+                + resourceBundle
+                    .getString("LOG_MSG_REASON_USER_DETAILS_NOT_FOUND"));
+      }
+    } else {
+      jmxUserName = pulseProperties.getProperty(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_JMXUSERNAME, "");
+      jmxUserPassword = pulseProperties.getProperty(
+          PulseConstants.APPLICATION_PROPERTY_PULSE_JMXPASSWORD, "");
+
+      if (jmxUserName.isEmpty() || jmxUserPassword.isEmpty()) {
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info(resourceBundle
+              .getString("LOG_MSG_JMX_USER_DETAILS_NOT_FOUND")
+              + resourceBundle
+                  .getString("LOG_MSG_REASON_USER_DETAILS_NOT_FOUND"));
+        }
+      } else {
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info(resourceBundle
+              .getString("LOG_MSG_JMX_USER_DETAILS_FOUND"));
+        }
+      }
+    }
+  }
+  
+//Function to set SSL VM arguments
+  private void initializeSSL() {
+    if (LOGGER.infoEnabled()) {
+      LOGGER.info(resourceBundle.getString("LOG_MSG_GET_SSL_DETAILS"));
+    }
+
+     
+    this.sysPulseUseSSLLocator = Boolean.valueOf(pulseProperties.getProperty(
+        PulseConstants.SYSTEM_PROPERTY_PULSE_USESSL_LOCATOR, "false"));
+
+    this.sysPulseUseSSLManager = Boolean.valueOf(pulseProperties.getProperty(
+        PulseConstants.SYSTEM_PROPERTY_PULSE_USESSL_MANAGER, "false"));
+
+
+    if ((sysPulseUseSSLLocator || sysPulseUseSSLManager)) {
+      Properties sslProperties = new Properties();
+      if (!pulseSecurityProperties.isEmpty()) {
+        Set entrySet = pulseSecurityProperties.entrySet();
+        for (Iterator it = entrySet.iterator(); it.hasNext();) {
+          Entry<String, String> entry = (Entry<String, String>) it.next();
+          String key = entry.getKey();
+          if (key.startsWith("javax.net.ssl.")) {
+
+            String val = entry.getValue();
+            System.setProperty(key, val);
+            sslProperties.setProperty(key, val);
+          }
+        }
+      }
+      if (sslProperties.isEmpty()) {
+        if (LOGGER.warningEnabled()) {
+          LOGGER.warning(resourceBundle.getString("LOG_MSG_SSL_NOT_SET"));
+        }
+      }
+    }
+
+  }
+
+  // Function to load locator and/or manager details
+  private void loadLocatorManagerDetails() {
+
+    // Get locator details through System Properties
+    if (LOGGER.infoEnabled()) {
+      LOGGER.info(resourceBundle.getString("LOG_MSG_GET_LOCATOR_DETAILS_1"));
+    }
+
+    // Required System properties are
+    // -Dpulse.embedded="false" -Dpulse.useLocator="false"
+    // -Dpulse.host="192.168.2.11" -Dpulse.port="2099"
+    sysPulseUseLocator = Boolean
+        .getBoolean(PulseConstants.SYSTEM_PROPERTY_PULSE_USELOCATOR);
+    sysPulseHost = System
+        .getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_HOST);
+    sysPulsePort = System
+        .getProperty(PulseConstants.SYSTEM_PROPERTY_PULSE_PORT);
+
+    if (sysPulseHost == null || sysPulseHost.isEmpty() || sysPulsePort == null
+        || sysPulsePort.isEmpty()) {
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(resourceBundle
+            .getString("LOG_MSG_LOCATOR_DETAILS_NOT_FOUND")
+            + resourceBundle
+                .getString("LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_1"));
+        LOGGER.info(resourceBundle.getString("LOG_MSG_GET_LOCATOR_DETAILS_2"));
+      }
+
+      if (pulseProperties.isEmpty()) {
+        if (LOGGER.infoEnabled()) {
+          LOGGER.info(resourceBundle
+              .getString("LOG_MSG_LOCATOR_DETAILS_NOT_FOUND")
+              + resourceBundle
+                  .getString("LOG_MSG_REASON_LOCATOR_DETAILS_NOT_FOUND_2"));
+        }
+
+        sysPulseHost = "";
+        sysPulsePort = "";
+      } else {
+        if (LOGGER.infoEnabled()) {
+          LOGGER
+              .info(resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_FOUND"));
+        }
+
+        sysPulseUseLocator = Boolean.valueOf(pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_USELOCATOR, ""));
+        sysPulseHost = pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_HOST, "");
+        sysPulsePort = pulseProperties.getProperty(
+            PulseConstants.APPLICATION_PROPERTY_PULSE_PORT, "");
+      }
+    } else {
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(resourceBundle.getString("LOG_MSG_LOCATOR_DETAILS_FOUND"));
+      }
+    }
+  }
+
+  private String formatLogString(String logMessage) {
+
+    DateFormat df = new SimpleDateFormat(
+        PulseConstants.LOG_MESSAGE_DATE_PATTERN);
+    // DateFormat df = new
+    // SimpleDateFormat(Repository.get().getPulseConfig().getLogDatePattern());
+    StringWriter sw = new StringWriter();
+    PrintWriter pw = new PrintWriter(sw);
+
+    pw.println();
+    pw.print("[");
+    pw.print("INFO");
+    pw.print(" ");
+    pw.print(df.format(new Date(System.currentTimeMillis())));
+    String threadName = Thread.currentThread().getName();
+    if (threadName != null) {
+      pw.print(" ");
+      pw.print(threadName);
+    }
+    pw.print(" tid=0x");
+    pw.print(Long.toHexString(Thread.currentThread().getId()));
+    pw.print("] ");
+    pw.print("(msgTID=");
+    pw.print("");
+
+    pw.print(" msgSN=");
+    pw.print("");
+
+    pw.print(") ");
+
+    pw.println("[" + PulseConstants.APP_NAME + "]");
+
+    pw.println(PulseLogWriter.class.getName());
+
+    pw.println(logMessage);
+
+    pw.close();
+    try {
+      sw.close();
+    } catch (IOException ignore) {
+    }
+    String result = sw.toString();
+    return result;
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java
new file mode 100644
index 0000000..cdc68d9
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/controllers/ExceptionHandlingAdvice.java
@@ -0,0 +1,42 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.controllers;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseStatus;
+
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+
+/**
+ * For handling IO exception in our controllers
+ * 
+ * @author Riya Bhandekar
+ * 
+ */
+@ControllerAdvice
+public class ExceptionHandlingAdvice {
+
+  @ExceptionHandler(IOException.class)
+  @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+  public void handleExc(IOException ext) {
+    PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+    // write errors
+    StringWriter swBuffer = new StringWriter();
+    PrintWriter prtWriter = new PrintWriter(swBuffer);
+    ext.printStackTrace(prtWriter);
+    LOGGER.severe("IOException Details : " + swBuffer.toString() + "\n");
+  }
+}


[54/79] incubator-geode git commit: GEODE-222 Allow redis adapter to handle live entry objects

Posted by tu...@apache.org.
GEODE-222 Allow redis adapter to handle live entry objects

Previously encoding a response would not be able to handle the case
where an entry was concurrently destroyed. The fix is to catch the
EntryDestroyedException gracefully


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/a0b6aae5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a0b6aae5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a0b6aae5

Branch: refs/heads/feature/GEODE-17
Commit: a0b6aae5bbdb815fa9bef608a084fb15c20dae6e
Parents: 73be563
Author: Vito Gavrilov <vg...@pivotal.io>
Authored: Thu Aug 27 10:54:44 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:52:43 2015 +0530

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/redis/Coder.java  | 194 +++++++++++--------
 1 file changed, 109 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a0b6aae5/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java
index 9415cd3..0c35c93 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/redis/Coder.java
@@ -11,6 +11,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import com.gemstone.gemfire.cache.EntryDestroyedException;
 import com.gemstone.gemfire.cache.query.Struct;
 
 /**
@@ -168,29 +169,38 @@ public class Coder {
     Iterator<Map.Entry<ByteArrayWrapper,ByteArrayWrapper>> it = items.iterator();
     ByteBuf response = alloc.buffer();
     response.writeByte(ARRAY_ID);
-    response.writeBytes(intToBytes(items.size() * 2));
-    response.writeBytes(CRLFar);
 
-    try {
-      while(it.hasNext()) {
-        Map.Entry<ByteArrayWrapper,ByteArrayWrapper> next = it.next();
-        byte[] key = next.getKey().toBytes();
-        byte[] nextByteArray = next.getValue().toBytes();
-        response.writeByte(BULK_STRING_ID); // Add key
-        response.writeBytes(intToBytes(key.length));
-        response.writeBytes(CRLFar);
-        response.writeBytes(key);
-        response.writeBytes(CRLFar);
-        response.writeByte(BULK_STRING_ID); // Add value
-        response.writeBytes(intToBytes(nextByteArray.length));
-        response.writeBytes(CRLFar);
-        response.writeBytes(nextByteArray);
-        response.writeBytes(CRLFar);
+    int size = 0;
+    ByteBuf tmp = alloc.buffer();
+    while(it.hasNext()) {
+      Map.Entry<ByteArrayWrapper,ByteArrayWrapper> next = it.next();
+      byte[] key;
+      byte[] nextByteArray;
+      try {
+        key = next.getKey().toBytes();
+        nextByteArray = next.getValue().toBytes();
+      } catch (EntryDestroyedException e) {
+        continue;
       }
-    } catch(Exception e) {
-      return null;
+      tmp.writeByte(BULK_STRING_ID); // Add key
+      tmp.writeBytes(intToBytes(key.length));
+      tmp.writeBytes(CRLFar);
+      tmp.writeBytes(key);
+      tmp.writeBytes(CRLFar);
+      tmp.writeByte(BULK_STRING_ID); // Add value
+      tmp.writeBytes(intToBytes(nextByteArray.length));
+      tmp.writeBytes(CRLFar);
+      tmp.writeBytes(nextByteArray);
+      tmp.writeBytes(CRLFar);
+      size++;
     }
 
+    response.writeBytes(intToBytes(size*2));
+    response.writeBytes(CRLFar);
+    response.writeBytes(tmp);
+
+    tmp.release();
+
     return response;
   }
 
@@ -211,27 +221,23 @@ public class Coder {
     response.writeBytes(intToBytes(items.size()));
     response.writeBytes(CRLFar);
 
-    try {
-      while(it.hasNext()) {
-        Object nextObject = it.next();
-        if (nextObject instanceof String) {
-          String next = (String) nextObject;
-          response.writeByte(BULK_STRING_ID);
-          response.writeBytes(intToBytes(next.length()));
-          response.writeBytes(CRLFar);
-          response.writeBytes(stringToBytes(next));
-          response.writeBytes(CRLFar);
-        } else if (nextObject instanceof ByteArrayWrapper) {
-          byte[] next = ((ByteArrayWrapper) nextObject).toBytes();
-          response.writeByte(BULK_STRING_ID);
-          response.writeBytes(intToBytes(next.length));
-          response.writeBytes(CRLFar);
-          response.writeBytes(next);
-          response.writeBytes(CRLFar);
-        }
+    while(it.hasNext()) {
+      Object nextObject = it.next();
+      if (nextObject instanceof String) {
+        String next = (String) nextObject;
+        response.writeByte(BULK_STRING_ID);
+        response.writeBytes(intToBytes(next.length()));
+        response.writeBytes(CRLFar);
+        response.writeBytes(stringToBytes(next));
+        response.writeBytes(CRLFar);
+      } else if (nextObject instanceof ByteArrayWrapper) {
+        byte[] next = ((ByteArrayWrapper) nextObject).toBytes();
+        response.writeByte(BULK_STRING_ID);
+        response.writeBytes(intToBytes(next.length));
+        response.writeBytes(CRLFar);
+        response.writeBytes(next);
+        response.writeBytes(CRLFar);
       }
-    } catch (Exception e) {
-      return null;
     }
     return response;
   }
@@ -260,7 +266,7 @@ public class Coder {
     response.writeBytes(CRLFar);
     return response;
   }
-  
+
   public static final ByteBuf getNoAuthResponse(ByteBufAllocator alloc, String error) {
     byte[] errorAr = stringToBytes(error);
     ByteBuf response = alloc.buffer(errorAr.length + 25);
@@ -306,26 +312,38 @@ public class Coder {
     Iterator<?> it = items.iterator();
     ByteBuf response = alloc.buffer();
     response.writeByte(Coder.ARRAY_ID);
-    response.writeBytes(intToBytes(items.size()));
-    response.writeBytes(Coder.CRLFar);
-
+    ByteBuf tmp = alloc.buffer();
+    int size = 0;
     while(it.hasNext()) {
       Object next = it.next();
       ByteArrayWrapper nextWrapper = null;
-      if (next instanceof Entry)
-        nextWrapper = (ByteArrayWrapper) ((Entry<?, ?>) next).getValue();
-      else if (next instanceof Struct)
+      if (next instanceof Entry) {
+        try {
+          nextWrapper = (ByteArrayWrapper) ((Entry<?, ?>) next).getValue();
+        } catch (EntryDestroyedException e) {
+          continue;
+        }
+      } else if (next instanceof Struct) {
         nextWrapper = (ByteArrayWrapper) ((Struct) next).getFieldValues()[1];
+      }
       if (nextWrapper != null) {
-        response.writeByte(Coder.BULK_STRING_ID);
-        response.writeBytes(intToBytes(nextWrapper.length()));
-        response.writeBytes(Coder.CRLFar);
-        response.writeBytes(nextWrapper.toBytes());
-        response.writeBytes(Coder.CRLFar);
+        tmp.writeByte(Coder.BULK_STRING_ID);
+        tmp.writeBytes(intToBytes(nextWrapper.length()));
+        tmp.writeBytes(Coder.CRLFar);
+        tmp.writeBytes(nextWrapper.toBytes());
+        tmp.writeBytes(Coder.CRLFar);
       } else {
-        response.writeBytes(Coder.bNIL);
+        tmp.writeBytes(Coder.bNIL);
       }
+      size++;
     }
+
+    response.writeBytes(intToBytes(size));
+    response.writeBytes(Coder.CRLFar);
+    response.writeBytes(tmp);
+
+    tmp.release();
+
     return response;
   }
 
@@ -335,43 +353,49 @@ public class Coder {
 
     ByteBuf buffer = alloc.buffer();
     buffer.writeByte(Coder.ARRAY_ID);
-    if (!withScores)
-      buffer.writeBytes(intToBytes(list.size()));
-    else
-      buffer.writeBytes(intToBytes(2 * list.size()));
-    buffer.writeBytes(Coder.CRLFar);
-
-    try {
-      for(Object entry: list) {
-        ByteArrayWrapper key;
-        DoubleWrapper score;
-        if (entry instanceof Entry) {
+    ByteBuf tmp = alloc.buffer();
+    int size = 0;
+
+    for(Object entry: list) {
+      ByteArrayWrapper key;
+      DoubleWrapper score;
+      if (entry instanceof Entry) {
+        try {
           key = (ByteArrayWrapper) ((Entry<?, ?>) entry).getKey();
-          score = (DoubleWrapper) ((Entry<?, ?>) entry).getValue();;
-        } else {
-          Object[] fieldVals = ((Struct) entry).getFieldValues();
-          key = (ByteArrayWrapper) fieldVals[0];
-          score = (DoubleWrapper) fieldVals[1];
-        }
-        byte[] byteAr = key.toBytes();
-        buffer.writeByte(Coder.BULK_STRING_ID);
-        buffer.writeBytes(intToBytes(byteAr.length));
-        buffer.writeBytes(Coder.CRLFar);
-        buffer.writeBytes(byteAr);
-        buffer.writeBytes(Coder.CRLFar);
-        if (withScores) {
-          String scoreString = score.toString();
-          byte[] scoreAr = stringToBytes(scoreString);
-          buffer.writeByte(Coder.BULK_STRING_ID);
-          buffer.writeBytes(intToBytes(scoreString.length()));
-          buffer.writeBytes(Coder.CRLFar);
-          buffer.writeBytes(scoreAr);
-          buffer.writeBytes(Coder.CRLFar);
+          score = (DoubleWrapper) ((Entry<?, ?>) entry).getValue();
+        } catch (EntryDestroyedException e) {
+          continue;
         }
+      } else {
+        Object[] fieldVals = ((Struct) entry).getFieldValues();
+        key = (ByteArrayWrapper) fieldVals[0];
+        score = (DoubleWrapper) fieldVals[1];
+      }
+      byte[] byteAr = key.toBytes();
+      tmp.writeByte(Coder.BULK_STRING_ID);
+      tmp.writeBytes(intToBytes(byteAr.length));
+      tmp.writeBytes(Coder.CRLFar);
+      tmp.writeBytes(byteAr);
+      tmp.writeBytes(Coder.CRLFar);
+      size++;
+      if (withScores) {
+        String scoreString = score.toString();
+        byte[] scoreAr = stringToBytes(scoreString);
+        tmp.writeByte(Coder.BULK_STRING_ID);
+        tmp.writeBytes(intToBytes(scoreString.length()));
+        tmp.writeBytes(Coder.CRLFar);
+        tmp.writeBytes(scoreAr);
+        tmp.writeBytes(Coder.CRLFar);
+        size++;
       }
-    } catch(Exception e) {
-      return null;
     }
+
+    buffer.writeBytes(intToBytes(size));
+    buffer.writeBytes(Coder.CRLFar);
+    buffer.writeBytes(tmp);
+
+    tmp.release();
+
     return buffer;
   }
 


[11/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/multiselect/jquery.multiselect.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/multiselect/jquery.multiselect.js b/pulse/src/main/webapp/scripts/multiselect/jquery.multiselect.js
new file mode 100644
index 0000000..3451c66
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/multiselect/jquery.multiselect.js
@@ -0,0 +1,816 @@
+/* jshint forin:true, noarg:true, noempty:true, eqeqeq:true, boss:true, undef:true, curly:true, browser:true, jquery:true */
+/*
+ * jQuery MultiSelect UI Widget 1.14pre
+ * Copyright (c) 2012 Eric Hynds
+ *
+ * http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
+ *
+ * Depends:
+ * - jQuery 1.4.2+
+ * - jQuery UI 1.8 widget factory
+ *
+ * Optional:
+ * - jQuery UI effects
+ * - jQuery UI position utility
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+(function($, undefined) {
+
+  var multiselectID = 0;
+  var $doc = $(document);
+
+  $
+      .widget(
+          "ech.multiselect",
+          {
+
+            // default options
+            options : {
+              header : true,
+              height : 175,
+              minWidth : 225,
+              classes : '',
+              checkAllText : 'Hide all',
+              uncheckAllText : 'Show all',
+              noneSelectedText : 'Select columns to hide',
+              selectedText : '# columns hidden',
+              selectedList : 0,
+              show : null,
+              hide : null,
+              autoOpen : false,
+              multiple : true,
+              position : {},
+              appendTo : "body"
+            },
+
+            _create : function() {
+              var el = this.element.hide();
+              var o = this.options;
+
+              this.speed = $.fx.speeds._default; // default speed for effects
+              this._isOpen = false; // assume no
+
+              // create a unique namespace for events that the widget
+              // factory cannot unbind automatically. Use eventNamespace if on
+              // jQuery UI 1.9+, and otherwise fallback to a custom string.
+              this._namespaceID = this.eventNamespace
+                  || ('multiselect' + multiselectID);
+
+              var button = (this.button = $('<button type="button"><img src="images/hide_ico.png"/>&nbsp;<span class="ui-icon ui-icon-triangle-1-s"></span></button>'))
+                  .addClass(
+                      'ui-multiselect ui-widgetSelect ui-state-defaultSelect ui-corner-allSelect')
+                  .addClass(o.classes).attr({
+                    'title' : el.attr('title'),
+                    'aria-haspopup' : true,
+                    'tabIndex' : el.attr('tabIndex')
+                  }).insertAfter(el),
+
+              buttonlabel = (this.buttonlabel = $('<span />')).html(
+                  o.noneSelectedText).appendTo(button),
+
+              menu = (this.menu = $('<div />'))
+                  .addClass(
+                      'ui-multiselect-menu ui-widgetSelect ui-widget-contentSelect ui-corner-allSelect')
+                  .addClass(o.classes).appendTo($(o.appendTo)),
+
+              header = (this.header = $('<div />'))
+                  .addClass(
+                      'ui-widget-headerSelect ui-corner-allSelect ui-multiselect-header ui-helper-clearfixSelect')
+                  .appendTo(menu),
+
+              headerLinkContainer = (this.headerLinkContainer = $('<ul />'))
+                  .addClass('ui-helper-resetSelect')
+                  .html(
+                      function() {
+                        if (o.header === true) {
+                          return '<li><a class="ui-multiselect-all" href="#"><img src="images/hide_ico.png"/>&nbsp;<span class="ui-multiselect-spanlink">'
+                              + o.checkAllText
+                              + '</span></a></li><li><a class="ui-multiselect-none" href="#"><img src="images/show_ico.png"/>&nbsp;<span class="ui-multiselect-spanlink">'
+                              + o.uncheckAllText + '</span></a></li>';
+                        } else if (typeof o.header === "string") {
+                          return '<li>' + o.header + '</li>';
+                        } else {
+                          return '';
+                        }
+                      })
+                  .append(
+                      '<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><img src="images/cross.png"/><span class="ui-icon ui-icon-circle-close"></span></a></li>')
+                  .appendTo(header),
+
+              checkboxContainer = (this.checkboxContainer = $('<ul />'))
+                  .addClass('ui-multiselect-checkboxes ui-helper-resetSelect')
+                  .appendTo(menu);
+
+              // perform event bindings
+              this._bindEvents();
+
+              // build menu
+              this.refresh(true);
+
+              // some addl. logic for single selects
+              if (!o.multiple) {
+                menu.addClass('ui-multiselect-single');
+              }
+
+              // bump unique ID
+              multiselectID++;
+            },
+
+            _init : function() {
+              if (this.options.header === false) {
+                this.header.hide();
+              }
+              if (!this.options.multiple) {
+                this.headerLinkContainer.find(
+                    '.ui-multiselect-all, .ui-multiselect-none').hide();
+              }
+              if (this.options.autoOpen) {
+                this.open();
+              }
+              if (this.element.is(':disabled')) {
+                this.disable();
+              }
+            },
+
+            refresh : function(init) {
+              var el = this.element;
+              var o = this.options;
+              var menu = this.menu;
+              var checkboxContainer = this.checkboxContainer;
+              var optgroups = [];
+              var html = "";
+              var id = el.attr('id') || multiselectID++; // unique ID for the
+                                                          // label & option tags
+
+              // build items
+              el.find('option').each(
+                  function(i) {
+                    var $this = $(this);
+                    var parent = this.parentNode;
+                    var description = this.innerHTML;
+                    var title = this.title;
+                    var value = this.value;
+                    var inputID = 'ui-multiselect-'
+                        + (this.id || id + '-option-' + i);
+                    var isDisabled = this.disabled;
+                    var isSelected = this.selected;
+                    var labelClasses = [ 'ui-corner-allSelect' ];
+                    var liClasses = (isDisabled ? 'ui-multiselect-disabled '
+                        : ' ')
+                        + this.className;
+                    var optLabel;
+
+                    // is this an optgroup?
+                    if (parent.tagName === 'OPTGROUP') {
+                      optLabel = parent.getAttribute('label');
+
+                      // has this optgroup been added already?
+                      if ($.inArray(optLabel, optgroups) === -1) {
+                        html += '<li class="ui-multiselect-optgroup-label '
+                            + parent.className + '"><a href="#">' + optLabel
+                            + '</a></li>';
+                        optgroups.push(optLabel);
+                      }
+                    }
+
+                    if (isDisabled) {
+                      labelClasses.push('ui-state-disabledSelect');
+                    }
+
+                    // browsers automatically select the first option
+                    // by default with single selects
+                    if (isSelected && !o.multiple) {
+                      labelClasses.push('ui-state-activeSelect');
+                    }
+
+                    html += '<li class="' + liClasses + '">';
+
+                    // create the label
+                    html += '<label for="' + inputID + '" title="' + title
+                        + '" class="' + labelClasses.join(' ') + '">';
+                    if (!isDisabled) {
+                      html += '<input id="' + inputID + '" name="multiselect_'
+                          + id + '" type="'
+                          + (o.multiple ? "checkbox" : "radio") + '" value="'
+                          + value + '" title="' + title + '" class="styled"';
+                    }
+                    // pre-selected?
+                    if (isSelected) {
+                      html += ' checked="checked"';
+                      html += ' aria-selected="true"';
+                    }
+
+                    // disabled?
+                    /*
+                     * if(isDisabled) { html += ' disabled="disabled"'; html += '
+                     * aria-disabled="true"'; }
+                     */
+
+                    // add the title and close everything off
+                    if (!isDisabled) {
+                      html += ' />';
+                    }
+                    html += '<span style="color: #83939A;">' + description
+                        + '</span></label></li>'; // #cfdced
+                  });
+
+              // insert into the DOM
+              checkboxContainer.html(html);
+
+              // cache some moar useful elements
+              this.labels = menu.find('label');
+              this.inputs = this.labels.children('input');
+
+              // set widths
+              this._setButtonWidth();
+              this._setMenuWidth();
+
+              // remember default value
+              this.button[0].defaultValue = this.update();
+
+              // broadcast refresh event; useful for widgets
+              if (!init) {
+                this._trigger('refresh');
+              }
+            },
+
+            // updates the button text. call refresh() to rebuild
+            update : function() {
+              var o = this.options;
+              var $inputs = this.inputs;
+              var $checked = $inputs.filter(':checked');
+              var numChecked = $checked.length;
+              var value;
+
+              if (numChecked === 0) {
+                value = o.noneSelectedText;
+              } else {
+                if ($.isFunction(o.selectedText)) {
+                  value = o.selectedText.call(this, numChecked, $inputs.length,
+                      $checked.get());
+                } else if (/\d/.test(o.selectedList) && o.selectedList > 0
+                    && numChecked <= o.selectedList) {
+                  value = $checked.map(function() {
+                    return $(this).next().html();
+                  }).get().join(', ');
+                } else {
+                  value = o.selectedText.replace('#', numChecked).replace('#',
+                      $inputs.length);
+                }
+              }
+
+              this._setButtonValue(value);
+
+              return value;
+            },
+
+            // this exists as a separate method so that the developer
+            // can easily override it.
+            _setButtonValue : function(value) {
+              this.buttonlabel.text(value);
+            },
+
+            // binds events
+            _bindEvents : function() {
+              var self = this;
+              var button = this.button;
+
+              function clickHandler() {
+                self[self._isOpen ? 'close' : 'open']();
+                $("span[class='checkbox']").prop('onmouseup','');
+                return false;
+              }
+
+              // webkit doesn't like it when you click on the span :(
+              button.find('span').bind('click.multiselect', clickHandler);
+
+              // button events
+              button.bind({
+                click : clickHandler,
+                keypress : function(e) {
+                  switch (e.which) {
+                  case 27: // esc
+                  case 38: // up
+                  case 37: // left
+                    self.close();
+                    break;
+                  case 39: // right
+                  case 40: // down
+                    self.open();
+                    break;
+                  }
+                },
+                mouseenter : function() {
+                  if (!button.hasClass('ui-state-disabledSelect')) {
+                    $(this).addClass('ui-state-hoverSelect');
+                  }
+                },
+                mouseleave : function() {
+                  $(this).removeClass('ui-state-hoverSelect');
+                },
+                focus : function() {
+                  if (!button.hasClass('ui-state-disabledSelect')) {
+                    $(this).addClass('ui-state-focusSelect');
+                  }
+                },
+                blur : function() {
+                  $(this).removeClass('ui-state-focusSelect');
+                }
+              });
+
+              // header links
+              this.header.delegate('a', 'click.multiselect', function(e) {
+                // close link
+                if ($(this).hasClass('ui-multiselect-close')) {
+                  self.close();
+
+                  // check all / uncheck all
+                } else {
+                  self[$(this).hasClass('ui-multiselect-all') ? 'checkAll'
+                      : 'uncheckAll']();
+                }
+
+                e.preventDefault();
+              });
+
+              // optgroup label toggle support
+              this.menu.delegate(
+                  'li.ui-multiselect-optgroup-label a',
+                  'click.multiselect',
+                  function(e) {
+                    e.preventDefault();
+
+                    var $this = $(this);
+                    var $inputs = $this.parent().nextUntil(
+                        'li.ui-multiselect-optgroup-label').find(
+                        'input:visible:not(:disabled)');
+                    var nodes = $inputs.get();
+                    var label = $this.parent().text();
+
+                    // trigger event and bail if the return is false
+                    if (self._trigger('beforeoptgrouptoggle', e, {
+                      inputs : nodes,
+                      label : label
+                    }) === false) {
+                      return;
+                    }
+
+                    // toggle inputs
+                    self._toggleChecked(
+                        $inputs.filter(':checked').length !== $inputs.length,
+                        $inputs);
+
+                    self._trigger('optgrouptoggle', e, {
+                      inputs : nodes,
+                      label : label,
+                      checked : nodes[0].checked
+                    });
+                  }).delegate(
+                  'label',
+                  'mouseenter.multiselect',
+                  function() {
+                    if (!$(this).hasClass('ui-state-disabledSelect')) {
+                      self.labels.removeClass('ui-state-hoverSelect');
+                      $(this).addClass('ui-state-hoverSelect').find('input')
+                          .focus();
+                    }
+                  }).delegate('label', 'keydown.multiselect', function(e) {
+                e.preventDefault();
+
+                switch (e.which) {
+                case 9: // tab
+                case 27: // esc
+                  self.close();
+                  break;
+                case 38: // up
+                case 40: // down
+                case 37: // left
+                case 39: // right
+                  self._traverse(e.which, this);
+                  break;
+                case 13: // enter
+                  $(this).find('input')[0].click();
+                  break;
+                }
+              }).delegate(
+                  'input[type="checkbox"], input[type="radio"]',
+                  'click.multiselect',
+                  function(e) {
+                    var $this = $(this);
+                    var val = this.value;
+                    var checked = this.checked;
+                    var tags = self.element.find('option');
+
+                    // bail if this input is disabled or the event is cancelled
+                    if (this.disabled || self._trigger('click', e, {
+                      value : val,
+                      text : this.title,
+                      checked : checked
+                    }) === false) {
+                      e.preventDefault();
+                      return;
+                    }
+
+                    // make sure the input has focus. otherwise, the esc key
+                    // won't close the menu after clicking an item.
+                    $this.focus();
+
+                    // toggle aria state
+                    $this.attr('aria-selected', checked);
+
+                    // change state on the original option tags
+                    tags.each(function() {
+                      if (this.value === val) {
+                        this.selected = checked;
+                      } else if (!self.options.multiple) {
+                        this.selected = false;
+                      }
+                    });
+
+                    // some additional single select-specific logic
+                    if (!self.options.multiple) {
+                      self.labels.removeClass('ui-state-activeSelect');
+                      $this.closest('label').toggleClass(
+                          'ui-state-activeSelect', checked);
+
+                      // close menu
+                      self.close();
+                    }
+
+                    // fire change on the select box
+                    self.element.trigger("change");
+
+                    // setTimeout is to fix multiselect issue #14 and #47.
+                    // caused by jQuery issue #3827
+                    // http://bugs.jquery.com/ticket/3827
+                    setTimeout($.proxy(self.update, self), 10);
+                  });
+
+              // close each widget when clicking on any other element/anywhere
+              // else on the page
+              $doc.bind('mousedown.' + this._namespaceID, function(event) {
+                var target = event.target;
+
+                if (self._isOpen && target !== self.button[0]
+                    && target !== self.menu[0]
+                    && !$.contains(self.menu[0], target)
+                    && !$.contains(self.button[0], target)) {
+                  self.close();
+                }
+              });
+
+              // deal with form resets. the problem here is that buttons aren't
+              // restored to their defaultValue prop on form reset, and the
+              // reset
+              // handler fires before the form is actually reset. delaying it a
+              // bit
+              // gives the form inputs time to clear.
+              $(this.element[0].form).bind('reset.multiselect', function() {
+                setTimeout($.proxy(self.refresh, self), 10);
+              });
+            },
+
+            // set button width
+            _setButtonWidth : function() {
+              var width = this.element.outerWidth();
+              var o = this.options;
+
+              if (/\d/.test(o.minWidth) && width < o.minWidth) {
+                width = o.minWidth;
+              }
+
+              // set widths
+              this.button.outerWidth(width);
+            },
+
+            // set menu width
+            _setMenuWidth : function() {
+              var m = this.menu;
+              m.outerWidth(this.button.outerWidth());
+            },
+
+            // move up or down within the menu
+            _traverse : function(which, start) {
+              var $start = $(start);
+              var moveToLast = which === 38 || which === 37;
+
+              // select the first li that isn't an optgroup label / disabled
+              var $next = $start.parent()[moveToLast ? 'prevAll' : 'nextAll']
+                  (
+                      'li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup-label)')
+                  .first();
+
+              // if at the first/last element
+              if (!$next.length) {
+                var $container = this.menu.find('ul').last();
+
+                // move to the first/last
+                this.menu.find('label')[moveToLast ? 'last' : 'first']()
+                    .trigger('mouseover');
+
+                // set scroll position
+                $container.scrollTop(moveToLast ? $container.height() : 0);
+
+              } else {
+                $next.find('label').trigger('mouseover');
+              }
+            },
+
+            // This is an internal function to toggle the checked property and
+            // other related attributes of a checkbox.
+            //
+            // The context of this function should be a checkbox; do not proxy
+            // it.
+            _toggleState : function(prop, flag) {
+              return function() {
+
+                if (!this.disabled) {
+                  this[prop] = flag;
+                }
+
+                if (flag) {
+                  this.setAttribute('aria-selected', true);
+                  // for each span show checked style
+                  this.previousSibling.style.backgroundPosition = "0 -"
+                      + checkboxHeight * 2 + "px";
+                  // this.previousSibling.style.backgroundPositionX = "0" ;
+                  // this.previousSibling.style.backgroundPositionY = "-" +
+                  // checkboxHeight*2 + "px";
+                } else {
+                  this.removeAttribute('aria-selected');
+                  // for each span remove checked style
+                  this.previousSibling.style.backgroundPosition = "0 0";
+                }
+              };
+            },
+
+            _toggleChecked : function(flag, group) {
+              var $inputs = (group && group.length) ? group : this.inputs;
+              var self = this;
+
+              // toggle state on inputs
+              $inputs.each(this._toggleState('checked', flag));
+
+              // give the first input focus
+              $inputs.eq(0).focus();
+
+              // update button text
+              this.update();
+
+              // gather an array of the values that actually changed
+              var values = $inputs.map(function() {
+                return this.value;
+              }).get();
+
+              // riya -- toggle state on original option tags ---- as we are
+              // using our own checkboxes - this is erroring and seems not
+              // required
+              /*
+               * this.element .find('option') .each(function() {
+               * if(!this.disabled && $.inArray(this.value, values) > -1) {
+               * self._toggleState('selected', flag).call(this); } });
+               */
+
+              // trigger the change event on the select
+              if ($inputs.length) {
+                this.element.trigger("change");
+              }
+            },
+
+            _toggleDisabled : function(flag) {
+              this.button.attr({
+                'disabled' : flag,
+                'aria-disabled' : flag
+              })[flag ? 'addClass' : 'removeClass']('ui-state-disabledSelect');
+
+              var inputs = this.menu.find('input');
+              var key = "ech-multiselect-disabled";
+
+              if (flag) {
+                // remember which elements this widget disabled (not
+                // pre-disabled)
+                // elements, so that they can be restored if the widget is
+                // re-enabled.
+                inputs = inputs.filter(':enabled').data(key, true)
+              } else {
+                inputs = inputs.filter(function() {
+                  return $.data(this, key) === true;
+                }).removeData(key);
+              }
+
+              inputs.attr({
+                'disabled' : flag,
+                'arial-disabled' : flag
+              }).parent()[flag ? 'addClass' : 'removeClass']
+                  ('ui-state-disabledSelect');
+
+              this.element.attr({
+                'disabled' : flag,
+                'aria-disabled' : flag
+              });
+            },
+
+            // open the menu
+            open : function(e) {
+              var self = this;
+              var button = this.button;
+              var menu = this.menu;
+              var speed = this.speed;
+              var o = this.options;
+              var args = [];
+
+              // bail if the multiselectopen event returns false, this widget is
+              // disabled, or is already open
+              if (this._trigger('beforeopen') === false
+                  || button.hasClass('ui-state-disabledSelect') || this._isOpen) {
+                return;
+              }
+
+              var $container = menu.find('ul').last();
+              var effect = o.show;
+
+              // figure out opening effects/speeds
+              if ($.isArray(o.show)) {
+                effect = o.show[0];
+                speed = o.show[1] || self.speed;
+              }
+
+              // if there's an effect, assume jQuery UI is in use
+              // build the arguments to pass to show()
+              if (effect) {
+                args = [ effect, speed ];
+              }
+
+              // set the scroll of the checkbox container
+              $container.scrollTop(0).height(o.height);
+
+              // positon
+              this.position();
+
+              // show the menu, maybe with a speed/effect combo
+              $.fn.show.apply(menu, args);
+
+              // select the first not disabled option
+              // triggering both mouseover and mouseover because 1.4.2+ has a
+              // bug where triggering mouseover
+              // will actually trigger mouseenter. the mouseenter trigger is
+              // there for when it's eventually fixed
+              this.labels.filter(':not(.ui-state-disabledSelect)').eq(0)
+                  .trigger('mouseover').trigger('mouseenter').find('input')
+                  .trigger('focus');
+
+              button.addClass('ui-state-activeSelect');
+              this._isOpen = true;
+              this._trigger('open');
+            },
+
+            // close the menu
+            close : function() {
+              if (this._trigger('beforeclose') === false) {
+                return;
+              }
+
+              var o = this.options;
+              var effect = o.hide;
+              var speed = this.speed;
+              var args = [];
+
+              // figure out opening effects/speeds
+              if ($.isArray(o.hide)) {
+                effect = o.hide[0];
+                speed = o.hide[1] || this.speed;
+              }
+
+              if (effect) {
+                args = [ effect, speed ];
+              }
+
+              $.fn.hide.apply(this.menu, args);
+              this.button.removeClass('ui-state-activeSelect').trigger('blur')
+                  .trigger('mouseleave');
+              this._isOpen = false;
+              this._trigger('close');
+            },
+
+            enable : function() {
+              this._toggleDisabled(false);
+            },
+
+            disable : function() {
+              this._toggleDisabled(true);
+            },
+
+            checkAll : function(e) {
+              this._toggleChecked(true);
+              this._trigger('checkAll');
+            },
+
+            uncheckAll : function() {
+              this._toggleChecked(false);
+              this._trigger('uncheckAll');
+            },
+
+            getChecked : function() {
+              return this.menu.find('input').filter(':checked');
+            },
+
+            destroy : function() {
+              // remove classes + data
+              $.Widget.prototype.destroy.call(this);
+
+              // unbind events
+              $doc.unbind(this._namespaceID);
+
+              this.button.remove();
+              this.menu.remove();
+              this.element.show();
+
+              return this;
+            },
+
+            isOpen : function() {
+              return this._isOpen;
+            },
+
+            widget : function() {
+              return this.menu;
+            },
+
+            getButton : function() {
+              return this.button;
+            },
+
+            position : function() {
+              var o = this.options;
+
+              // use the position utility if it exists and options are
+              // specifified
+              if ($.ui.position && !$.isEmptyObject(o.position)) {
+                o.position.of = o.position.of || this.button;
+
+                this.menu.show().position(o.position).hide();
+
+                // otherwise fallback to custom positioning
+              } else {
+                var pos = this.button.offset();
+
+                this.menu.css({
+                  top : pos.top + this.button.outerHeight(),
+                  left : pos.left
+                });
+              }
+            },
+
+            // react to option changes after initialization
+            _setOption : function(key, value) {
+              var menu = this.menu;
+
+              switch (key) {
+              case 'header':
+                menu.find('div.ui-multiselect-header')[value ? 'show' : 'hide']
+                    ();
+                break;
+              case 'checkAllText':
+                menu.find('a.ui-multiselect-all span').eq(-1).text(value);
+                break;
+              case 'uncheckAllText':
+                menu.find('a.ui-multiselect-none span').eq(-1).text(value);
+                break;
+              case 'height':
+                menu.find('ul').last().height(parseInt(value, 10));
+                break;
+              case 'minWidth':
+                this.options[key] = parseInt(value, 10);
+                this._setButtonWidth();
+                this._setMenuWidth();
+                break;
+              case 'selectedText':
+              case 'selectedList':
+              case 'noneSelectedText':
+                this.options[key] = value; // these all needs to update
+                                            // immediately for the update() call
+                this.update();
+                break;
+              case 'classes':
+                menu.add(this.button).removeClass(this.options.classes)
+                    .addClass(value);
+                break;
+              case 'multiple':
+                menu.toggleClass('ui-multiselect-single', !value);
+                this.options.multiple = value;
+                this.element[0].multiple = value;
+                this.refresh();
+                break;
+              case 'position':
+                this.position();
+              }
+
+              $.Widget.prototype._setOption.apply(this, arguments);
+            }
+          });
+
+})(jQuery);
\ No newline at end of file


[04/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowserQuery.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowserQuery.js b/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowserQuery.js
new file mode 100644
index 0000000..d463edd
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowserQuery.js
@@ -0,0 +1,953 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+// DataBrowserQuery.js
+
+var responseResult = null;
+
+// This function activates Execute button
+function enableExecuteBtn(flagEnable) {
+  if (flagEnable) {
+    $('#btnExecuteQuery').prop("disabled", false);
+    if ($('#btnExecuteQuery').hasClass("grey")) {
+      $('#btnExecuteQuery').addClass("blue");
+      $('#btnExecuteQuery').removeClass("grey");
+    }
+  } else {
+    $('#btnExecuteQuery').prop("disabled", true);
+    if ($('#btnExecuteQuery').hasClass("blue")) {
+      $('#btnExecuteQuery').addClass("grey");
+      $('#btnExecuteQuery').removeClass("blue");
+    }
+  }
+}
+
+// This function is called when query editor content changes
+function onQueryTextChange() {
+  var queryString = $('#dataBrowserQueryText').val();
+  if (!isEmpty(queryString)) {
+    enableExecuteBtn(true);
+  } else {
+    enableExecuteBtn(false);
+  }
+}
+
+// This function clears query editor 
+function clearDBQuery(){
+  $('#dataBrowserQueryText').val('');
+  onQueryTextChange();
+}
+
+// This function executes query written in query editor and displays results
+function executeDBQuery(){
+  // Disable Execute button
+  enableExecuteBtn(false);
+
+  var queryText = $('#dataBrowserQueryText').val();
+  var selectedMemberNames = "";
+  
+  if(isEmpty(queryText)){
+    alert("Please enter query to execute..");
+    return;
+  }
+  
+  // Determine selected members query to be execute on 
+  if($("#membersList").html() != ""){
+    var selectedMembers = $( "input[type=checkbox][name=Member]:checked" );
+    for(var i=0; i< selectedMembers.length; i++){
+      if(selectedMemberNames == ""){
+        selectedMemberNames = selectedMembers[i].value;
+      }else{
+        selectedMemberNames += ","+selectedMembers[i].value;
+      }
+    }
+  }
+  
+  // TODO 
+  // As of now, member names are creating problem due to ':' character in 
+  // member names. hence query based upon member names are not supported.
+  // following line of code should be removed when solution to this problem is 
+  // in place.
+  //selectedMemberNames = "";
+  
+  requestData = {
+        query:queryText,
+        members:selectedMemberNames,
+        limit:0
+      };
+
+  // Display Loading/Busy symbol
+  $("#loadingSymbol").show();
+
+  // Delete previous query result, if exists.
+  if(!isEmpty($('#memberAccordion').html())){
+    deleteExistingResultGrids();
+    $('#memberAccordion').html('');
+  }
+
+  $.getJSON("pulse/dataBrowserQuery", requestData, function(data) {
+    
+    if(data != undefined && data != null){
+      if(data.error != undefined && data.error != null){
+        
+        // Delete previous query result, if exists.
+        /*if(!isEmpty($('#memberAccordion').html())){
+          deleteExistingResultGrids();
+          $('#memberAccordion').html('');
+        }*/
+        
+        var errorText = data.error;
+        errorText = encodeMemberName(errorText);
+        
+        $('#memberAccordion').append("<span>"+errorText+"</span>");
+
+      }else if(data.message != undefined && data.message != null){
+
+        // Delete previous query result, if exists.
+        /*if(!isEmpty($('#memberAccordion').html())){
+          deleteExistingResultGrids();
+          $('#memberAccordion').html('');
+        }*/
+
+        var messageText = data.message;
+        messageText = encodeMemberName(messageText);
+
+        $('#memberAccordion').append("<span>"+messageText+"</span>");
+
+      }else{
+        //console.log("data.result.length"+data.result.length);
+        // Convert received data into expected format
+        responseResult = convertRawResponseToExpectedFormat(data);
+        
+        // Delete previous query result, if exists.
+        /*if(!isEmpty($('#memberAccordion').html())){
+          deleteExistingResultGrids();
+          $('#memberAccordion').html('');
+        }*/
+        
+        // Create html for newly executed query
+        createHtmlForQueryResults();
+        
+        // Apply accordion Behavior 
+        accordion();
+        accordionNested();
+        /*custom scroll bar*/
+        $('.ScrollPaneBlock').jScrollPane();
+        
+        // Populate result grids
+        if(!isEmpty($('#memberAccordion').html())){
+          populateResultGrids();
+        }
+        // Update queries list in history panel
+        updateQueryHistory("view","");
+        //$('.queryHistoryScroll-pane').jScrollPane();/*Custome scroll*/
+        
+      }
+    }
+    
+    // Hide Loading/Busy symbol
+    $("#loadingSymbol").hide();
+
+    // enable Execute button
+    enableExecuteBtn(true);
+
+  }).error(resErrHandler);
+  
+  return;
+}
+
+// This function displays error if occurred 
+function resErrHandler(data){
+  // Check for unauthorized access
+  if (data.status == 401) {
+    // redirect user on Login Page
+    window.location.href = "Login.html?error=UNAUTH_ACCESS";
+  }else{
+    console.log(data);
+  }
+};
+
+// This function creates complete result panel html
+function createHtmlForQueryResults(){
+  var memberResults = responseResult.result;
+
+  if(memberResults.length > 0){
+
+    if(memberResults[0].member != undefined || memberResults[0].member != null){
+      //console.log("member wise results found..");      
+      for(var i=0; i<memberResults.length; i++){
+        //console.log(memberResults[i].member);
+        $('#memberAccordion').append(createHtmlForMember(memberResults[i]));
+      }
+    }else{
+      //console.log("cluster level results found..");
+      var accordionContentHtml = "";
+      accordionContentHtml = createClusterAccordionContentHtml(memberResults);
+      var resultHtml = "<div class=\"accordion-content2\">"+ accordionContentHtml +"</div>";
+      $('#memberAccordion').append(resultHtml);
+    }
+  }else{
+    $('#memberAccordion').append("<span> No Results Found...</span>");
+  }
+}
+
+// This function create/generate single member's html
+function createHtmlForMember(memberData){
+  
+  var accordionContentHtml = "";
+  accordionContentHtml = createMemberAccordionContentHtml(memberData);
+  // Convert angular brackets ('<', '>') using HTML character codes 
+  var memberTitle = memberData.member[1].replace(/\<+/g, '&#60').replace(/\>+/g, '&#62');
+  var memberHtml = 
+            "<div class=\"listing\">" +
+              "<div class=\"heading\">" +
+                "<span class=\"title\">"+ memberTitle + "</span>" +
+              "</div>" +
+              "<div class=\"accordion-content\">"+ accordionContentHtml +
+              "</div>" +
+            "</div>";
+  
+  return memberHtml;
+}
+
+// This function creates/generates member's accordion content html
+function createMemberAccordionContentHtml(memberData){
+  
+  var memName = encodeMemberName(memberData.member[1]);
+  var requiredHeight = determineAccordionContentHeight(memberData.result);
+  var memberAccordionContentHtml = "";
+  memberAccordionContentHtml += 
+                "<div class=\"ScrollPaneBlock\" style=\"height: "+requiredHeight+"px;\">" +
+                  "<div id=\"memberDetails_"+memName+"\" class=\"accordionNested\">";
+  
+  var memberResults = memberData.result;
+  for(var i=0; i<memberResults.length; i++){
+    var htmlTableId = generateTableIdForObjectsTable(memberData.member[1], memberResults[i].objectType);
+    var ScrollPaneBlockHeight = 40;
+    var resultsLength = memberResults[i].objectResults.length;
+    if(resultsLength > 0 && resultsLength < 6){
+      ScrollPaneBlockHeight += resultsLength * 30;
+    }else{
+      ScrollPaneBlockHeight = 200;
+    }
+    memberAccordionContentHtml += 
+                    "<div class=\"n-listing\">" +
+                      "<div class=\"n-heading\">" +
+                        "<span class=\"n-title\">"+memberResults[i].objectType+"</span>" +
+                      "</div>" +
+                      "<div class=\"n-accordion-content\">" +
+                        "<div class=\"widthfull-100per\">" +
+                            "<table id=\""+ htmlTableId +"\"></table>" +
+                        "</div>" +
+                      "</div>" +
+                    "</div>";
+  }
+  
+  memberAccordionContentHtml += 
+                  "</div>" +
+                "</div>";
+  
+  return memberAccordionContentHtml ;
+  
+}
+
+//This function creates/generates cluster's accordion content html
+function createClusterAccordionContentHtml(clusterResults){
+  var requiredHeight = determineAccordionContentHeight(clusterResults);
+  var memberAccordionContentHtml = "";
+  memberAccordionContentHtml += 
+             "<div class=\"ScrollPaneBlock\" style=\"height: "+requiredHeight+"px;\">" +
+               "<div id=\"clusterDetails\" class=\"accordionNested\">";
+
+  for(var i=0; i<clusterResults.length; i++){
+    var htmlTableId = generateTableIdForObjectsTable("", clusterResults[i].objectType);
+    var ScrollPaneBlockHeight = 40;
+    var resultsLength = clusterResults[i].objectResults.length;
+    if(resultsLength > 0 && resultsLength < 6){
+      ScrollPaneBlockHeight += resultsLength * 30;
+    }else{
+      ScrollPaneBlockHeight = 200;
+    }
+    memberAccordionContentHtml += 
+                 "<div class=\"n-listing\">" +
+                   "<div class=\"n-heading\">" +
+                     "<span class=\"n-title\">"+clusterResults[i].objectType+"</span>" +
+                   "</div>" +
+                   "<div class=\"n-accordion-content\">" +
+                     "<div class=\"widthfull-100per\">" +
+                         "<table id=\""+ htmlTableId +"\"></table>" +
+                     "</div>" +
+                   "</div>" +
+                 "</div>";
+  }
+
+  memberAccordionContentHtml += 
+               "</div>" +
+             "</div>";
+
+  return memberAccordionContentHtml ;
+
+}
+
+// Function to find/determine the required height of accordion container
+function determineAccordionContentHeight(result){
+  var numObjects = result.length;
+  // determine height of single grid/table
+  var height = 0;
+  for(var i=0; i<numObjects; i++){
+    var numObjectEntries = result[i].objectResults.length;
+    if(numObjectEntries > 0 
+        && numObjectEntries < 6){
+      if(height < 210){
+        height = 60 + numObjectEntries * 30;
+      }
+    }else{
+      height = 210;
+    }
+  }
+
+  // Add additional height required for accordin headers
+  height += numObjects * 30;
+  return height;
+
+}
+
+// Function to generates id of html table in which results grid is contained
+function generateTableIdForObjectsTable(memberName, objectName){
+  // Remove all dots (.) in the string and also replace "[]" by "BxBr"
+  var objName = objectName.replace(/\.+/g, '').replace("[]", 'BxBr');
+  var memName = encodeMemberName(memberName);
+  // form html table id
+  var tableId = "table-"+memName+"-"+objName;
+  
+  return tableId;
+}
+
+// Function to generates encoded member name
+function encodeMemberName(memberName){
+  var memName = memberName.replace(/\.+/g, '');
+  memName = memName.replace(/\(+/g, '-');
+  memName = memName.replace(/\)+/g, '-');
+  memName = memName.replace(/\<+/g, '-');
+  memName = memName.replace(/\>+/g, '-');
+  memName = memName.replace(/\:+/g, '-');
+  
+  return memName;
+}
+
+// This function populates query results into jqgrid tables 
+function populateResultGrids(){
+  
+  var memberResults = responseResult.result;
+
+  if(memberResults.length == 0){
+    return;
+  }
+
+  if(memberResults[0].member != undefined || memberResults[0].member != null){
+    for(var i=0; i<memberResults.length; i++){
+      
+      var memberResult = memberResults[i].result;
+      var memberName = memberResults[i].member[1];
+      for(var j=0; j<memberResult.length; j++){
+        var htmlTableId = generateTableIdForObjectsTable(memberName, memberResult[j].objectType);
+        
+        if($('#'+htmlTableId)){
+          createResultGrid(memberName, memberResult[j]);
+        }else{
+          console.log("Not Found : "+htmlTableId);
+        }
+      }
+    }
+  }else{
+      
+      var memberResult = memberResults;
+      var memberName = "";
+      for(var j=0; j<memberResult.length; j++){
+        var htmlTableId = generateTableIdForObjectsTable(memberName, memberResult[j].objectType);
+        
+        if($('#'+htmlTableId)){
+          createResultGrid(memberName, memberResult[j]);
+        }else{
+          console.log("Not Found : "+htmlTableId);
+        }
+      }
+  }
+}
+
+// Function to delete previous queries results from UI
+function deleteExistingResultGrids(){
+  if(responseResult == undefined || responseResult == null){
+    return;
+  }
+  
+  var memberResults = responseResult.result;
+
+  if(memberResults.length == 0){
+    return;
+  }
+
+  if(memberResults[0].member != undefined || memberResults[0].member != null){
+    for(var i=0; i<memberResults.length; i++){
+      
+      var memberResult = memberResults[i].result;
+      var memberName = memberResults[i].member[1];
+      for(var j=0; j<memberResult.length; j++){
+        var htmlTableId = generateTableIdForObjectsTable(memberName, memberResult[j].objectType);
+        
+        if($('#'+htmlTableId)){
+          $('#'+htmlTableId).jqGrid('GridDestroy');
+        }else{
+          console.log("Not Found : "+htmlTableId);
+        }
+      }
+    }
+  }else{
+    var memberResult = memberResults;
+    var memberName = "";
+    for(var j=0; j<memberResult.length; j++){
+      var htmlTableId = generateTableIdForObjectsTable(memberName, memberResult[j].objectType);
+      
+      if($('#'+htmlTableId)){
+        $('#'+htmlTableId).jqGrid('GridDestroy');
+      }else{
+        console.log("Not Found : "+htmlTableId);
+      }
+    }
+  }
+}
+
+// Function to create single results grid
+function createResultGrid(member, memberResultObject){
+  var objectType = memberResultObject.objectType;
+  // make a copy of memberResultObject.objectResults
+  var objectResults = jQuery.extend(true, [], memberResultObject.objectResults);
+  var htmlTableId = generateTableIdForObjectsTable(member, objectType);
+  
+  // TODO Following code section should be removed once to string representation 
+  // is finalized in same scenario 
+  // If results set is java primitive collection of HashMap then following 
+  // custom representation is needed
+  /*var customObjectResults = new Array();
+  if(objectType.indexOf("java.util.HashMap") != -1){
+    // generate customized objectResults
+    for(var cnt=0; cnt<objectResults.length; cnt++){
+      var uid = objectResults[cnt].uid;
+      delete objectResults[cnt].uid;
+      var newEntry = {"uid":uid, "result":["java.util.HashMap",objectResults[cnt]]};
+      customObjectResults.push(newEntry);
+    }
+    // replace existing objectResults by new customObjectResults
+    objectResults = customObjectResults;
+  }*/
+  
+  // Determine table columns
+  var columnName = new Array();
+  var columnModel = new Array();
+  for(var cnt=0; cnt<objectResults.length; cnt++){
+    for(key in objectResults[cnt]){
+      if(-1 == columnName.indexOf(key)){
+        // add column and column model only if not present
+        columnName.push(key);
+        columnModel.push({name:key, index:key, width:150});
+      }
+    }
+  }
+  
+  // set custom column widths if less columns
+  if(columnModel.length == 2){
+    for(var c=0; c<columnModel.length; c++){
+      columnModel[c].width = 660;
+    }
+  }else if(columnModel.length == 3){
+    for(var c=0; c<columnModel.length; c++){
+      columnModel[c].width = 330;
+    }
+  }else if(columnModel.length == 4){
+    for(var c=0; c<columnModel.length; c++){
+      columnModel[c].width = 220;
+    }
+  }
+  
+  // Delete jqgrid if already exists
+  $("#"+htmlTableId).jqGrid('GridDestroy');
+  
+  // Determine Grid's Height
+  var gridheight = 30;
+  if(objectResults.length > 0 && objectResults.length < 6){
+    gridheight += objectResults.length * 26;
+  }else{
+    gridheight = 160;
+  }
+  
+  // Create jqgrid 
+  jQuery("#"+htmlTableId).jqGrid({
+                  datatype: "local",
+                  width : 668,
+                  height: gridheight,
+                  shrinkToFit : false,
+                  colNames:columnName,
+                  colModel:columnModel,
+                  ondblClickRow:displayPopUpObjectExplorer,
+                  gridComplete : function() {
+                    $(".jqgrow").css({
+                      cursor : 'default'
+                    });
+
+                    var gridList = $('#gview_'+htmlTableId);
+                    var gridListChild = gridList.children('.ui-jqgrid-bdiv');
+
+                    gridListChild.unbind('jsp-scroll-x');
+                    gridListChild.bind('jsp-scroll-x', function(event,
+                        scrollPositionX, isAtLeft, isAtRight) {
+                      var mRList = $('#gview_'+htmlTableId);
+                      var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                          '.ui-jqgrid-hbox');
+                      mRLC.css("position", "relative");
+                      mRLC.css('right', scrollPositionX);
+                    });
+                  },
+                  resizeStop : function(width, index) {
+
+                    var gridList = $('#gview_'+htmlTableId);
+                    var gridListChild = gridList.children('.ui-jqgrid-bdiv');
+                    var api = gridListChild.data('jsp');
+                    api.reinitialise();
+
+                    gridList = $('#gview_'+htmlTableId);
+                    gridListChild = gridList.children('.ui-jqgrid-bdiv');
+                    gridListChild.unbind('jsp-scroll-x');
+                    gridListChild.bind('jsp-scroll-x', function(event,
+                        scrollPositionX, isAtLeft, isAtRight) {
+                      var mRList = $('#gview_'+htmlTableId);
+                      var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                          '.ui-jqgrid-hbox');
+                      mRLC.css("position", "relative");
+                      mRLC.css('right', scrollPositionX);
+                    });
+                  }
+          });
+  
+  // Hide "uid" column as it contains program generated unique id of row
+  $("#"+htmlTableId).jqGrid('hideCol',columnName[columnName.indexOf("uid")]);
+  
+  // Remove type details from values
+  for(var i=0; i<objectResults.length; i++){
+    for(key in objectResults[i]){
+      var arrVals = objectResults[i][key];
+      if(arrVals != null && arrVals != undefined){
+        if($.isArray(arrVals)){
+          if(arrVals.length == 2){
+            if(typeof (arrVals[1]) == "object"){ // if object, display its type as value
+              objectResults[i][key] = arrVals[0];
+            }else{ // else display its value
+              objectResults[i][key] = arrVals[1];
+            }
+          }else{ // if ArrayList object, display its type as value
+            objectResults[i][key] = arrVals[0];
+          }
+        }
+      } 
+    }
+  }
+
+  // Clear grid before populating rows into it
+  $("#"+htmlTableId).jqGrid('clearGridData');
+  $("#"+htmlTableId).jqGrid('addRowData',columnName[columnName.indexOf("uid")],objectResults);
+}
+
+// Function that displays object explorer in pop up
+function displayPopUpObjectExplorer(rowId, rowIndex, columnIndex, event){
+  //console.log("Row clicked: "+rowId+" "+rowIndex+" "+columnIndex+" "+event);
+  
+  var rowIdSplits = rowId.split('*');
+  var selMember = null
+  var selMemObject = null;
+  var selMemObjectRow = null;
+  var selectedRowData = null;
+  
+  if(rowIdSplits.length == 2){
+    selMemObject = rowIdSplits[0];
+    selMemObjectRow = rowIdSplits[1];
+  }else if(rowIdSplits.length == 3){
+    selMember = rowIdSplits[0];
+    selMemObject = rowIdSplits[1];
+    selMemObjectRow = rowIdSplits[2];
+  }else{
+    console.log("Incomplete inputs ");
+    return;
+  }
+  
+  var resResults = responseResult.result;
+  var memberResults = null;
+  var memberObjectResults = null;
+  
+  if(rowIdSplits.length == 2){
+    memberResults = resResults;
+  }else if(rowIdSplits.length == 3){
+    for(var i=0; i< resResults.length; i++){
+      if(resResults[i].member[1] == selMember){
+        memberResults = resResults[i].result;
+        break;
+      }
+    }
+  }
+  
+  for(var i=0; i< memberResults.length; i++){
+    // replace "[]" by "BxBr"
+    var objType = memberResults[i].objectType.replace("[]", 'BxBr');
+    if(objType == selMemObject){
+      memberObjectResults = memberResults[i].objectResults;
+      break;
+    }
+  }
+  
+  for(var i=0; i< memberObjectResults.length; i++){
+    /*if(memberObjectResults[i].ID[1] == selMemObjectRow){
+      selectedRowData = memberObjectResults[i];
+      break;
+    }*/
+    if(memberObjectResults[i].uid == rowId){
+      selectedRowData = memberObjectResults[i];
+      break;
+    }
+  }
+  
+  var popUpData = formDataForPopUpGrid(selectedRowData);
+  
+  // clear pop grid data
+  gridElement.jqGrid('clearGridData');
+  // add pop grid new data
+  gridElement[0].addJSONData({
+    total : 1,
+    page : 1,
+    records : popUpData.length,
+    rows : popUpData
+  });
+  
+  // Display pop up grid
+  $('#gridPopup').show();
+  $('.ui-jqgrid-bdiv').jScrollPane();
+
+  // Attaching handler to each row in object explorer to update vertical
+  // scrollbar when user expands/collapse tree grid row
+  $('div.tree-plus').click(function() {
+    $('.ui-jqgrid-bdiv').jScrollPane();
+  });
+                  
+  // Get the screen height and width
+  var maskHeight = $(document).height();
+  var maskWidth = $(window).width();
+
+  //Set heigth and width to mask to fill up the whole screen
+  $('#mask').css({'width':maskWidth,'height':maskHeight});
+  
+  //transition effect             
+  $('#mask').fadeIn(1000);        
+  $('#mask').fadeTo("fast",0.8);  
+
+  //Get the window height and width
+  var winH = $(window).height();
+  var winW = $(window).width();
+
+  //Set the popup window to center
+  $('#gridPopup').css('top',  winH/2-$('#gridPopup').height()/2);
+  $('#gridPopup').css('left', winW/2-$('#gridPopup').width()/2);
+
+}
+
+// Creates pop grid
+function createPopUpObjectExplorer(){
+  gridElement = $("#popUpExplorer");
+  gridElement.jqGrid({
+      datatype: "local",
+      colNames:["Id","Key","Value","Type"],
+      colModel:[
+          {name:'id', index:'id', width:1, hidden:true, key:true},
+          {name:'key', index:'key', width:220},
+          {name:'value', index:'value', width:220},
+          {name:'type', index:'type', width:230}
+      ],
+      cmTemplate: {sortable:false},
+      height: '220',
+      gridview: true,
+      rowNum: 10000,
+      sortname: 'id',
+      treeGrid: true,
+      treeGridModel: 'adjacency',
+      treedatatype: "local",
+      ExpandColumn: 'key',
+  });
+  
+  gridElement.jqGrid('clearGridData');
+  
+}
+
+// Function to prepare data for pop up object explorer
+function formDataForPopUpGrid(data){
+  
+  var newArray = [];
+  var idCounter = 1;
+
+  function traverse(object, level, parentId) {
+      for (var prop in object) {
+          if (typeof(object[prop]) == "object") {
+            if($.isArray(object[prop])){
+              
+              var arrObj = object[prop];
+              if(arrObj.length == 2){
+                
+                if (typeof(arrObj[1]) == "object") {
+                  //newArray.push({'key':prop, 'value':arrObj[1], 'type':arrObj[0]});
+                  newArray.push({
+                    'id':idCounter++,
+                    'key':prop, 
+                    'type':arrObj[0],
+                    'value':"", // ignore value for composite data
+                    'level':level,
+                    'parent':parentId,
+                    'isLeaf':false,
+                    'expanded':false,
+                    'loaded':true
+                    });
+                
+                  //going on step down in the object tree!!
+                  traverse(arrObj[1], level+1, idCounter-1);
+                }else{
+                  //newArray.push({'key':prop, 'value':arrObj[1], 'type':arrObj[0]});
+                  newArray.push({
+                    'id':idCounter++,
+                    'key':prop, 
+                    'type':arrObj[0],
+                    'value':arrObj[1],
+                    'level':level,
+                    'parent':parentId,
+                    'isLeaf':false,
+                    'expanded':false,
+                    'loaded':true
+                    });
+                }
+              }else{
+                //newArray.push({'key':prop, 'value':object[prop], 'type':typeof(object[prop])});
+                newArray.push({
+                  'id':idCounter++,
+                  'key':prop, 
+                  'type':typeof(object[prop]),
+                  'value':object[prop],
+                  'level':level,
+                  'parent':parentId,
+                  'isLeaf':false,
+                  'expanded':false,
+                  'loaded':true
+                  });
+                
+                // todo : multiple value traversing in array
+              }
+            }else{
+              newArray.push({
+                'id':idCounter++,
+                'key':prop, 
+                'type':"object",
+                'value':"", // ignore value for composite data
+                'level':level,
+                'parent':parentId,
+                'isLeaf':false,
+                'expanded':false,
+                'loaded':true
+                });
+              //going on step down in the object tree!!
+              traverse(object[prop], level+1, idCounter-1);
+            }
+              
+          }else{
+            //console.log(prop + " : "+object[prop]);
+            if(prop != "uid"){
+              newArray.push({
+                  'id':idCounter++,
+                  'key':prop, 
+                  'type':typeof(object[prop]),
+                  'value':object[prop],
+                  'level':level,
+                  'parent':parentId,
+                  'isLeaf':false,
+                  'expanded':false,
+                  'loaded':true
+                  });
+            }
+          }
+      }
+  }
+
+  // start traversing into data object 
+  traverse(data, 0, 0);
+  
+  return newArray;
+}
+
+//Function for converting raw response into expected format
+function convertRawResponseToExpectedFormat(rawResponeData){
+  
+  if(rawResponeData == null || rawResponeData == undefined){
+    return;
+  }
+  
+  var finalResponseData = {};
+  var finalResponseResults = new Array();
+  
+  if(rawResponeData.result != null || rawResponeData.result != undefined){
+    var rawResponeDataResult = rawResponeData.result;
+    
+    for(var i=0; i<rawResponeDataResult.length; i++){
+      if(rawResponeDataResult[i] != null){
+        if(typeof(rawResponeDataResult[i]) == "object"){
+          if($.isArray(rawResponeDataResult[i])){
+            // Cluster level result set
+            finalResponseResults = convertToExpectedObjectsFormat(rawResponeDataResult, "");
+            break;
+            
+          }else if(rawResponeDataResult[i].member != null && rawResponeDataResult[i].member != undefined){
+            
+            var responseForMember = {};
+            responseForMember.member = rawResponeDataResult[i].member[0];
+            responseForMember.result = convertToExpectedObjectsFormat(rawResponeDataResult[i].result, rawResponeDataResult[i].member[0][1]);
+            
+            // add into final results
+            finalResponseResults.push(responseForMember);
+          }
+        }
+      }
+    }
+  }
+  
+  finalResponseData.result = finalResponseResults;
+  //responseResult = finalResponseData;
+  return finalResponseData;
+}
+
+// Function for converting raw response into expected object wise results format
+function convertToExpectedObjectsFormat(rawResponseResult, prefixForId){
+  
+  var expResponseResult = new Array();
+  
+  if(rawResponseResult != null && rawResponseResult != undefined ){
+    
+    for(var i=0; i< rawResponseResult.length; i++){
+      if(rawResponseResult[i] != null){
+        
+        if(expResponseResult.length > 0){
+          // search expected object type in expResponseResult
+          var flagObjectFound = false;
+          for(var j=0 ; j < expResponseResult.length ; j++){
+            if(expResponseResult[j].objectType == rawResponseResult[i][0]){
+              // required object found
+              flagObjectFound = true;
+              var objectResults = expResponseResult[j].objectResults;
+              var type = rawResponseResult[i][0];
+              var entry = rawResponseResult[i][1];
+
+              // if entry is not object then convert it into object
+              if(typeof(entry) != "object" ){
+                var entryObj = {};
+                entryObj[type] = rawResponseResult[i][1];
+                entry = entryObj;
+              }
+
+              // add unique id for new entry
+              entry.uid = generateEntryUID(prefixForId, expResponseResult[j].objectType, objectResults.length);
+              
+              objectResults.push(entry);
+              break;
+            }
+          }
+          
+          if(!flagObjectFound){  // required object not found in expResponseResult 
+            
+            var objectResults = new Array();
+            var type = rawResponseResult[i][0];
+            var entry = rawResponseResult[i][1];
+
+            // if entry is not object then convert it into object
+            if(typeof(entry) != "object" ){
+              var entryObj = {};
+              entryObj[type] = rawResponseResult[i][1];
+              entry = entryObj;
+            }
+
+            // add unique id for new entry
+            entry.uid = generateEntryUID(prefixForId, type, objectResults.length);
+            
+            objectResults.push(entry);
+            
+            var newResultObject = {};
+            newResultObject.objectType = type;
+            newResultObject.objectResults = objectResults;
+            
+            expResponseResult.push(newResultObject);
+          }
+          
+        }else{  // expResponseResult is empty
+          
+          var objectResults = new Array();
+          var type = rawResponseResult[i][0];
+          var entry = rawResponseResult[i][1];
+
+          // if entry is not object then convert it into object
+          if(typeof(entry) != "object" ){
+            var entryObj = {};
+            entryObj[type] = rawResponseResult[i][1];
+            entry = entryObj;
+          }
+
+          // add unique id for new entry
+          entry.uid = generateEntryUID(prefixForId, type, objectResults.length);
+          
+          objectResults.push(entry);
+          
+          var newResultObject = {};
+          newResultObject.objectType = type;
+          newResultObject.objectResults = objectResults;
+          
+          expResponseResult.push(newResultObject);
+        }
+        
+      }
+    }
+  }
+  
+  return expResponseResult;
+}
+
+// Function to generate unique idetifier for entry
+function generateEntryUID(prefixForId, type, len) {
+
+  var uid = "";
+
+  if(type.indexOf("[]") != -1){
+    type = type.replace("[]","BxBr");
+  }
+
+  if (prefixForId != "") {
+    uid = prefixForId + "*" + type + "*" + len;
+  } else {
+    uid = type + "*" + len;
+  }
+
+  return uid;
+}
+
+// Function that posts the query result response received to backend in order
+// export it into file
+function exportResult() {
+  if(responseResult != undefined && responseResult !== null){
+    $.generateFile({
+      filename : 'export.json',
+      content : JSON.stringify(responseResult),
+      script : 'pulse/dataBrowserExport'
+    });
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowserQueryHistory.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowserQueryHistory.js b/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowserQueryHistory.js
new file mode 100644
index 0000000..a48aaff
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/pages/DataBrowserQueryHistory.js
@@ -0,0 +1,84 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+// DataBrowserQueryHistory.js
+// updateQueryHistory()
+function updateQueryHistory(action,queryId) {
+  
+  requestData = {
+    action:action,
+    queryId:queryId
+  };
+
+  $.getJSON("pulse/dataBrowserQueryHistory", requestData, function(data) {
+    
+    var queries = new Array();
+    if(data.queryHistory != undefined && data.queryHistory != null){
+      queries = data.queryHistory;
+    }
+    var refHistoryConatiner = $("#detailsHistoryList");
+    var queryListHTML = "";
+    if(queries.length == 0){
+      // no queries found
+      queryListHTML = "No Query Found";
+    }else{
+      queries.sort(dynamicSort("queryId", "desc"));
+      for(var i=0; i<queries.length && i<20; i++){
+        // add query item
+        queryListHTML += "" +
+          "<div class=\"container\">" +
+            "<div class=\"wrap\">" +
+              "<div class=\"read-more\">" +
+                "<a href=\"#\" class=\"remore_plus\">&nbsp;</a>" +
+              "</div>" +
+              "<div class=\"remove\">" +
+                "<a href=\"#\" onclick=\"updateQueryHistory('delete','"+ queries[i].queryId +"');\">&nbsp;</a>" +
+              "</div>" +
+              "<div class=\"wrapHistoryContent\"  ondblclick=\"queryHistoryItemClicked(this);\">" + queries[i].queryText +
+              "</div>" +
+              "<div class=\"dateTimeHistory\">" + queries[i].queryDateTime +
+              "</div>" +
+            "</div>" +
+          "</div>";
+      }
+    }
+    
+    refHistoryConatiner.html(queryListHTML);
+    //$('.queryHistoryScroll-pane').jScrollPane();/*Custome scroll*/    
+
+    // Set eventsAdded = false as list is refreshed and slide events 
+    // (for expanding and collapsing) are removed
+    eventsAdded = false;
+    
+  }).error(resErrHandler);
+   
+}
+
+// This function displays error if occurred 
+function resErrHandler(data){
+  // Check for unauthorized access
+  if (data.status == 401) {
+    // redirect user on Login Page
+    window.location.href = "Login.html?error=UNAUTH_ACCESS";
+  }else{
+    console.log(data);
+  }
+};
+
+// This function is called when any query from history list is double clicked 
+function queryHistoryItemClicked(divElement){
+  // Set selected query text into Query Editor
+  $('#dataBrowserQueryText').val(unescapeHTML(divElement.innerHTML));
+  //Enable Execute button
+  onQueryTextChange();
+  // fire a click event on document to hide history panel
+  $(document).click();
+  
+  
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/pages/Login.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/pages/Login.js b/pulse/src/main/webapp/scripts/pulsescript/pages/Login.js
new file mode 100644
index 0000000..b825f0d
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/pages/Login.js
@@ -0,0 +1,159 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+$(document).ready(function() {
+  
+  // determine pulse back end product
+  $.ajax({
+    url : 'pulse/pulseProductSupport',
+    type : 'GET',
+    dataType : 'json',
+    async : true,
+    success : function(data) {
+      // Set product name in cookie
+      setCookie('productname', data.product, 1);
+
+      // modify UI text as per requirement
+      customizeUI();
+      
+    },
+    error: function(jqXHR, textStatus, errorThrown){
+
+      $('#user_name').prop('disabled', true);
+      $('#user_password').prop('disabled', true);
+      $('input[type="submit"]').prop('disabled', true);
+      $("#errorText").html("Unable to determine backend product [Gemfire / SQLfire]<br>"+textStatus);
+      $("#errorMasterBlock").show();
+    }
+  });
+  
+});
+
+// this function is called when login page loads
+function pageOnLoad(){
+  // get Pulse Version Details
+  getPulseVersion();
+  
+  $.getJSON("pulse/authenticateUser", function(data) {
+    
+    // return isUserLoggedIn
+    if(data.isUserLoggedIn){
+      // redirect user on Login Page 
+      window.location.href = "clusterDetail.html";
+    }else{
+      
+      // check if host and port available
+      /*
+      var cookieHost = getCookie('host');
+      var cookiePort = getCookie('port');
+      
+      if(cookieHost != null && cookieHost != undefined && cookieHost != '' ){
+        $("#locator_host").val(cookieHost);
+        $("#locator_host").hide();
+      }
+      
+      if(cookiePort != null && cookiePort != undefined && cookiePort != '' ){
+        $("#locator_port").val(cookiePort);
+        $("#locator_port").hide();
+      }*/
+      
+      var errorId = GetParam('error');
+      if(errorId != ''){
+        //$("#errorText").html('<span>'+errorText+'</span>');
+        displayErrorMessage(errorId);
+      }
+    }
+
+  }).error(function(data){
+    // Display Error
+    var errorId = GetParam('error');
+    if(errorId != ''){
+      //$("#errorText").html('<span>'+errorText+'</span>');
+      displayErrorMessage(errorId);
+    }
+  });
+  
+}
+
+function displayErrorMessage(errorId){
+  var errorText = getErrorMessage(errorId);
+  if(errorText != ""){
+    errorText = "<span>"+errorText+"<span>";
+    $("#errorText").html(errorText);
+    $("#errorMasterBlock").show();
+  }
+}
+function getErrorMessage(errorId){
+  var errorText = "";
+  switch(errorId){
+    case 'AUTH_FAILED' : 
+      errorText = "Authentication Failed";
+      break;
+      
+    case 'BAD_CREDS' : 
+      errorText = "Incorrect Username or password";
+      break;
+      
+    case 'CRED_EXP' : 
+      errorText = "Your Account is expired";
+      break;
+      
+    case 'ACC_LOCKED' : 
+      errorText = "Your account is locked";
+      break;
+      
+    case 'ACC_DISABLED' : 
+      errorText = "Your account is disabled";
+      break;
+      
+    case 'UNAUTH_ACCESS' : 
+      errorText = "HTTP Error 401 : Unauthorized Access";
+      break;
+      
+    default : 
+      errorText = "";
+  }
+  
+  return errorText;
+}
+
+// function to validate the user inputs
+function validate(){
+  var valid = true;
+  var errorText = "";
+  /*
+  //validation logic here , change valid to false if fail
+  if($("#user_name").val() == undefined || $("#user_name").val() == null || $("#user_name").val() == ''){
+    valid = false;
+    errorText += '<span>Please enter User Name</span>';
+  }
+  
+  if($("#user_password").val() == undefined || $("#user_password").val() == null || $("#user_password").val() == ''){
+    valid = false;
+    errorText += '<span>Please enter Password</span>';
+  }
+  
+  // optional fields
+  if($("#locator_host").val() == undefined || $("#locator_host").val() == null || $("#locator_host").val() == ''){
+    valid = false;
+    errorText += '<span>Please enter Locator Host</span>';
+  }
+  
+  if($("#locator_port").val() == undefined || $("#locator_port").val() == null || $("#locator_port").val() == ''){
+    valid = false;
+    errorText += '<span>Please enter Locator Port</span>';
+  }*/
+  
+  if(!valid){
+    $("#errorText").html(errorText);
+    $("#errorMasterBlock").show();
+  }else{
+    $("#errorMasterBlock").hide();
+  }
+  return valid;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/pages/index.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/pages/index.js b/pulse/src/main/webapp/scripts/pulsescript/pages/index.js
new file mode 100644
index 0000000..51f368f
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/pages/index.js
@@ -0,0 +1,15 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+/**
+ * This JS File is used as home page of the application
+ * 
+ */
+$(document).ready(function() {
+  changeLocale('', 'index');
+});

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/queryStatistics.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/queryStatistics.js b/pulse/src/main/webapp/scripts/pulsescript/queryStatistics.js
new file mode 100644
index 0000000..2033fa7
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/queryStatistics.js
@@ -0,0 +1,304 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+/**
+ * This JS File is used for Cluster Details screen
+ * 
+ */
+var grid = null;
+var gridFilterReset = true;
+
+$(document).ready(function() {
+
+  // Load Notification HTML  
+  generateNotificationsPanel();
+
+  // modify UI text as per requirement
+  customizeUI();
+
+  if (CONST_BACKEND_PRODUCT_SQLFIRE == productname.toLowerCase()) {
+    // Do nothing
+  } else {
+    // Redirect to Cluster details page
+    openClusterDetail();
+  }
+  scanPageForWidgets();
+
+  // creating blank query statistics grid
+  createQueryStatisticsGrid();
+
+  // setup the options with check boxes and show hide functionality using
+  // library
+  setupColumnSelection();
+
+  $.ajaxSetup({
+    cache : false
+  });
+});
+
+/*
+ * Function to sort integer column which will show text NA
+ */
+var customSortFunction = function(cell, rowObject) {
+  if (cell == 'NA') {
+    return -1;
+  } else {
+    return parseInt(cell);
+  }
+};
+
+function createQueryStatisticsGrid() {
+
+  $.ajax({
+    url : 'pulse/getQueryStatisticsGridModel',
+    type : 'GET',
+    dataType : 'json',
+    async : false,
+    success : function(data) {
+
+      // set cluster name in tab
+      $('#clusterName').html(data.clusterName);
+      $('#userName').html(data.userName);
+
+      // add column selection options
+      for ( var i = 1; i < data.columnNames.length; ++i) {
+        $('#columnsSelect').append(
+            '<option value = "' + data.columnModels[i].name + '">'
+                + data.columnNames[i] + '</option>');
+      }
+
+      // one-time setup for column sorting for integer columns here
+      for ( var i = 0; i < data.columnModels.length; ++i) {
+        if (data.columnModels[i].sorttype == 'integer') {
+          data.columnModels[i].sorttype = customSortFunction;
+        }
+      }
+
+      grid = $("#queryStatisticsList");
+      grid.jqGrid({
+        datatype : "local",
+        height : 710,
+        width : 1000,
+        rowNum : 50,
+        sortname : data.columnModels[1].name,
+        sortorder: "desc",
+        shrinkToFit : false,
+        ignoreCase: true,
+        colNames : data.columnNames,
+        colModel : data.columnModels,
+        userData : {
+          "sortOrder" : "desc",
+          "sortColName" : data.columnModels[1].name
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#queryStatisticsList").getGridParam(
+              'userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+          
+          jQuery("#queryStatisticsList").trigger("reloadGrid");
+          var queryStatisticsList = $('#gview_queryStatisticsList');
+          var queryStatisticsListChild = queryStatisticsList
+              .children('.ui-jqgrid-bdiv');
+          var api = queryStatisticsListChild.data('jsp');
+          api.reinitialise();
+
+          $('#queryStatisticsList').toggle();
+          refreshTheGrid($('#queryStatisticsList'));
+        },
+        resizeStop : function(width, index) {
+          var queryStatisticsList = $('#gview_queryStatisticsList');
+          var queryStatisticsListChild = queryStatisticsList
+              .children('.ui-jqgrid-bdiv');
+          var api = queryStatisticsListChild.data('jsp');
+          api.reinitialise();
+
+          $('#queryStatisticsList').toggle();
+          refreshTheGrid($('#queryStatisticsList'));
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+          
+          // wrap contents of query statistics table cells only - not other grids
+          $(".jqgrow td").css('word-wrap', 'break-word');
+          $(".jqgrow td").css('white-space', 'pre-wrap');
+          $(".jqgrow td").css('white-space', '-pre-wrap');
+          $(".jqgrow td").css('white-space', '-o-pre-wrap');
+          $(".jqgrow td").css('white-space', 'normal !important');
+          $(".jqgrow td").css('height', 'auto');
+          $(".jqgrow td").css('vertical-align', 'text-top');
+          $(".jqgrow td").css('padding-top', '2px');
+          $(".jqgrow td").css('padding-bottom', '3px');
+
+          var queryStatisticsList = $('#gview_queryStatisticsList');
+          var queryStatisticsListChild = queryStatisticsList
+              .children('.ui-jqgrid-bdiv');
+
+          queryStatisticsListChild.unbind('jsp-scroll-x');
+          queryStatisticsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var qsList = $('#gview_queryStatisticsList');
+            var qsLC = qsList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            qsLC.css("position", "relative");
+            qsLC.css('right', scrollPositionX);
+          });
+        }
+      });
+
+      $('.ui-jqgrid-bdiv').each(function(index) {
+        var tempName = $(this).parent().attr('id');
+        if (tempName == 'gview_queryStatisticsList') {
+          $(this).jScrollPane();
+        }
+      });
+    }
+  });
+}
+
+function setupColumnSelection() {
+
+  $("select").multiselect(
+      {
+        click : function(event, ui) {
+          // hide selected column
+          if (ui.checked) {
+            grid.jqGrid('hideCol', ui.value);
+          } else {
+            grid.jqGrid('showCol', ui.value);
+          }
+
+          grid.trigger("reloadGrid", [ {
+            page : 1
+          } ]);
+          destroyScrollPane('gview_queryStatisticsList');
+          $('.ui-jqgrid-bdiv').each(function(index) {
+            var tempName = $(this).parent().attr('id');
+            if (tempName == 'gview_queryStatisticsList') {
+              $(this).jScrollPane();
+            }
+          });
+        },
+        checkAll : function() {
+          // hide all columns
+          var colModels = grid.jqGrid('getGridParam', 'colModel');
+          for ( var i = 1; i < colModels.length; i++) {
+            grid.jqGrid('hideCol', colModels[i].name);
+          }
+
+          grid.trigger("reloadGrid", [ {
+            page : 1
+          } ]);
+          destroyScrollPane('gview_queryStatisticsList');
+          $('.ui-jqgrid-bdiv').each(function(index) {
+            var tempName = $(this).parent().attr('id');
+            if (tempName == 'gview_queryStatisticsList') {
+              $(this).jScrollPane();
+            }
+          });  
+        },
+        uncheckAll : function() {
+          // show all columns
+          var colModels = grid.jqGrid('getGridParam', 'colModel');
+          for ( var i = 1; i < colModels.length; i++) {
+            grid.jqGrid('showCol', colModels[i].name);
+          }
+          grid.trigger("reloadGrid", [ {
+            page : 1
+          } ]);
+
+          destroyScrollPane('gview_queryStatisticsList');
+          $('.ui-jqgrid-bdiv').each(function(index) {
+            var tempName = $(this).parent().attr('id');
+            if (tempName == 'gview_queryStatisticsList') {
+              $(this).jScrollPane();
+            }
+          });
+        }
+      });
+}
+
+var applyFilterOnQueryStatistics = function() {
+  
+  var searchKeyword = $('#filterQueryStatisticsBox').val();
+  if(searchKeyword.length < 4){
+    
+    if(! gridFilterReset){
+      gridFilterReset = true; // do not filter grid till reset
+
+      ///filter only after string length 4 else reset filter
+      grid[0].p.search = false;
+      grid.trigger("reloadGrid", [ {
+        page : 1
+      } ]);
+     
+      // trigger check for scroll pane to see if scroll bars need to be shown
+      var queryStatisticsList = $('#gview_queryStatisticsList');
+      var queryStatisticsListChild = queryStatisticsList
+          .children('.ui-jqgrid-bdiv');
+      var api = queryStatisticsListChild.data('jsp');
+      api.reinitialise();
+  
+      // scroll to top of grid to ensure all records are displayed in the view port
+      api.scrollToY(0, false);
+  
+      $('#queryStatisticsList').toggle();
+      refreshTheGrid($('#queryStatisticsList'));
+    }
+    
+    return;
+  }
+  
+  gridFilterReset = false; // set to start filtering grid
+  if ((searchKeyword != "Search") && (searchKeyword != "")) {
+    var myfilter = {
+      groupOp : "AND",
+      rules : [ {
+        field : "Query",
+        op : "cn",
+        data : searchKeyword
+      } ]
+    };
+
+    grid[0].p.search = myfilter.rules.length > 0;
+    $.extend(grid[0].p.postData, {
+      filters : JSON.stringify(myfilter)
+    });
+  } else {
+    grid[0].p.search = false;
+  }
+
+  grid.trigger("reloadGrid", [ {
+    page : 1
+  } ]);
+ 
+  // trigger check for scroll pane to see if scroll bars need to be shown
+  var queryStatisticsList = $('#gview_queryStatisticsList');
+  var queryStatisticsListChild = queryStatisticsList
+      .children('.ui-jqgrid-bdiv');
+  var api = queryStatisticsListChild.data('jsp');
+  api.reinitialise();
+
+  // scroll to top of grid to ensure all records are displayed in the view port
+  api.scrollToY(0, false);
+
+  $('#queryStatisticsList').toggle();
+  refreshTheGrid($('#queryStatisticsList'));
+};
+
+function showQueryStatistics(data) {
+  getQueryStatisticsBack(data.QueryStatistics);
+}
+
+function refreshTheGrid(gridDiv) {
+  setTimeout(function(){gridDiv.toggle();}, 500);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/regionView.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/regionView.js b/pulse/src/main/webapp/scripts/pulsescript/regionView.js
new file mode 100644
index 0000000..a22f2c6
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/regionView.js
@@ -0,0 +1,746 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+/* Region Details javascript with pop-up with spark-lines opening from each tree-map cell showing member level region information.
+ * This page opens from Data view on cluster page and links to member details page by clicking on tree map cell.
+ *
+ * @author Riya Bhandekar
+ * @since version 7.5 Cedar 2014-03-01
+ *
+ */
+
+
+// required global variables
+var regionMemberTreeMap;
+var tipObj = null;
+var theTooltip = null;
+var memberList = null;
+var memberOnRegionJson = null;
+var clusterDataViewRegions;
+var regionMembers = null;
+
+/**
+ * This JS File is used for Cluster Details screen
+ * 
+ */
+$(document).ready(function() {
+
+  // Load Notification HTML  
+  generateNotificationsPanel();
+
+  if (CONST_BACKEND_PRODUCT_SQLFIRE == productname.toLowerCase()) {
+    alterHtmlContainer(CONST_BACKEND_PRODUCT_SQLFIRE);
+  } else {
+    alterHtmlContainer(CONST_BACKEND_PRODUCT_GEMFIRE);
+  }
+
+  createMemberTreeMap();
+  
+  createMemberGrid();
+  
+	// scan page for widgets
+  scanPageForWidgets();
+
+  $.ajaxSetup({
+    cache : false
+  });
+});
+
+/*
+ * Function to show and hide html elements/components based upon whether product
+ * is sqlfire or gemfire 
+ */
+function alterHtmlContainer(prodname){
+  if(CONST_BACKEND_PRODUCT_SQLFIRE == prodname.toLowerCase()){
+    // Show HTML for following
+    $('#subTabQueryStatistics').show();
+  }else{
+    // Hide HTML for following
+    $('#subTabQueryStatistics').hide();
+  }  
+}
+
+//function used for applying filter of member names in data view screen
+var applyFilterOnMembersList = function() {
+  var searchKeyword = extractFilterTextFrom('filterMembersListBox');
+  var htmlMemberListWithFilter = '';
+  if (searchKeyword != "") {
+    for ( var i = 0; i < memberList.length; i++) {
+      // filtered list
+      if (memberList[i].name.toLowerCase().indexOf(searchKeyword) !== -1) {
+        var divId = memberList[i].memberId + "&" + memberList[i].name;
+        htmlMemberListWithFilter += "<div class='pointDetailsPadding' title='"
+            + memberList[i].name + "' id='" + divId
+            + "' onClick = 'javascript:openMemberDetails(this.id)'>"
+            + memberList[i].name + "</div>";
+      }
+    }
+  } else {
+    for ( var i = 0; i < memberList.length; i++) {
+      // non filtered list
+      var divId = memberList[i].memberId + "&" + memberList[i].name;
+      htmlMemberListWithFilter += "<div class='pointDetailsPadding' title='"
+          + memberList[i].name + "' id='" + divId
+          + "' onClick = 'javascript:openMemberDetails(this.id)'>"
+          + memberList[i].name + "</div>";
+    }
+  }
+  document.getElementById("memberNames").innerHTML = htmlMemberListWithFilter;
+  $('.regionMembersSearchBlock').jScrollPane();
+};
+
+
+//function used for applying filter of region's members treemap and grid
+var applyFilterOnRegionMembers = function() {
+  //console.log("applyFilterOnRegionMembers called");
+  var searchKeyword = extractFilterTextFrom("filterRegionMembersBox");
+
+  if (searchKeyword != "") {
+    var filteredRegionMembers = {};
+    for (var regMemKey in regionMembers) {
+      var regionMember = regionMembers[regMemKey];
+      // filtered list
+      if (regionMember.memberName.toLowerCase().indexOf(searchKeyword) !== -1) {
+        filteredRegionMembers[regionMember.memberName] = regionMember;
+      }
+    }
+    updateClusterSelectedRegionMembers(filteredRegionMembers);
+  } else {
+    updateClusterSelectedRegionMembers(regionMembers);
+  }
+};
+
+
+function initializeSparklinesToZero(spo){
+  var arrZero = [0,0,0,0,0,0,0];
+  tipObj.find('#memberMemoryReadsTrend').sparkline(arrZero,spo);
+  tipObj.find('#memberDiskReadsTrend').sparkline(arrZero,spo);
+  spo.lineColor = '#2e84bb';
+  tipObj.find('#memberMemoryWritesTrend').sparkline(arrZero,spo);
+  tipObj.find('#memberDiskWritesTrend').sparkline(arrZero,spo);
+}
+
+
+function displaySelectedRegionDetails(regionName, data){
+  
+  $('#regionPath').html(data.selectedRegion.path);
+  $('#regionType').html(data.selectedRegion.type);
+  $('#regionMembersText').html(data.selectedRegion.memberCount);
+  $('#regionNameText').html(data.selectedRegion.name);
+  $('#regionEntryCountText').html(data.selectedRegion.entryCount);
+  $('#regionEntrySizeText').html(data.selectedRegion.entrySize);
+  
+  $('#regionPersistence').html(data.selectedRegion.persistence);
+  $('#regionDiskUsage').html(data.selectedRegion.dataUsage);
+  //$('#regionIsEnableOffHeapMemory').html(data.selectedRegion.isEnableOffHeapMemory);
+  //$('#regionIsHdfsWriteOnly').html(data.selectedRegion.isHDFSWriteOnly);
+  $('#regionEmptyNodes').html(data.selectedRegion.emptyNodes);
+  
+  //memberList = data.selectedRegion.members;
+  //applyFilterOnMembersList();
+  
+  var memoryUsagePer = (data.selectedRegion.memoryUsage / data.selectedRegion.totalMemory) * 100;
+  memoryUsagePer = isNaN(memoryUsagePer) ? 0 : memoryUsagePer;
+  var memPer = memoryUsagePer + "%";
+  document.getElementById("memoryUsage").style.width = memPer;
+
+  memoryUsagePer = parseFloat(memoryUsagePer);
+  $('#memoryUsageVal').html(memoryUsagePer.toFixed(4));
+
+  if (data.selectedRegion.memoryUsage == 0) {
+    document.getElementById("memoryUsed").innerHTML = "-";
+    document.getElementById("memoryUsedMBSpan").innerHTML = "";
+  } else
+    document.getElementById("memoryUsed").innerHTML = data.selectedRegion.memoryUsage;
+  document.getElementById("totalMemory").innerHTML = data.selectedRegion.totalMemory;
+
+  //theTooltip
+  if(theTooltip != null){
+    if(theTooltip.isShown(false)){
+      theTooltip.hide();
+      $('#region_tooltip').css('display','none');
+    }
+  }
+  
+  // delete tooltips here
+  $('#region_tooltip').remove();
+  
+  var sparklineOptions = {
+      width : '217px',
+      height : '72px',
+      lineColor : '#FAB948',
+      fillColor : false,
+      spotRadius : 2.5,
+      labelPosition : 'left',
+      spotColor : false,
+      minSpotColor : false,
+      maxSpotColor : false,
+      lineWidth : 2
+  };
+  
+  var reads = data.selectedRegion.memoryReadsTrend;
+  var diskReads = data.selectedRegion.diskReadsTrend;
+  var writes = data.selectedRegion.memoryWritesTrend;
+  var diskWrites = data.selectedRegion.diskWritesTrend;
+  
+  // Reads trends  
+  $('#readsPerSecTrend').sparkline(reads, sparklineOptions);
+  $('#diskReadsPerSecTrend').sparkline(diskReads, sparklineOptions);
+  
+  // Writes trends
+  sparklineOptions.lineColor = '#2e84bb';
+  $('#writesPerSecTrend').sparkline(writes, sparklineOptions);
+  $('#diskWritesPerSecTrend').sparkline(diskWrites, sparklineOptions);
+
+  var sumReads = 0;
+  var avgReads = 0;
+  if (reads.length > 0) {
+    for ( var i = 0; i < reads.length; i++) {
+      sumReads += parseFloat(reads[i]);
+    }
+    avgReads = sumReads / reads.length;
+  }
+  $('#currentReadsPerSec').html(applyNotApplicableCheck(avgReads.toFixed(2)));  
+
+  var sumDiskReads = 0;
+  var avgDiskReads = 0;
+  if (diskReads.length > 0) {
+    for ( var i = 0; i < diskReads.length; i++) {
+      sumDiskReads += parseFloat(diskReads[i]);
+    }
+    avgDiskReads = sumDiskReads / diskReads.length;
+  }
+  $('#currentDiskReadsPerSec').html(
+      applyNotApplicableCheck(avgDiskReads.toFixed(2)));
+  
+  var sumWrites = 0;
+  var avgWrites = 0;
+  if (writes.length > 0) {
+    for ( var i = 0; i < writes.length; i++) {
+      sumWrites += parseFloat(writes[i]);
+    }
+    avgWrites = sumWrites / writes.length;
+  }
+  $('#currentWritesPerSec').html(applyNotApplicableCheck(avgWrites.toFixed(2)));
+
+  
+  var sumDiskWrites = 0;
+  var avgDiskWrites = 0;
+  if (diskWrites.length > 0) {
+    for ( var i = 0; i < diskWrites.length; i++) {
+      sumDiskWrites += parseFloat(diskWrites[i]);
+    }
+    avgDiskWrites = sumDiskWrites / diskWrites.length;
+  }
+  $('#currentDiskWritesPerSec').html(
+      applyNotApplicableCheck(avgDiskWrites.toFixed(2)));
+  
+  var popupDiv = $('#popupDiv').html();
+  $(".node").attr('title',popupDiv);
+  $(".node").tooltip({
+    
+    onBeforeShow: function() {
+      if(theTooltip != null){
+        if(theTooltip.isShown(false)){
+          theTooltip.hide();
+        }
+      }
+    },
+    onShow: function() {
+      tipObj = this.getTip(); //global store
+      theTooltip = this;
+
+      var nodeId = this.getTrigger().attr('id');
+      var memberName = nodeId;
+      var spo = {
+          width : '110px',
+          height : '50px',
+          lineColor : '#FAB948',
+          fillColor : '#0F1C25',
+          spotRadius : 2.5,
+          labelPosition : 'left',
+          spotColor : false,
+          minSpotColor : false,
+          maxSpotColor : false,
+          lineWidth : 2
+      };
+      
+      initializeSparklinesToZero(spo); 
+      spo.lineColor='#FAB948';
+      $.sparkline_display_visible();
+    
+      //region member specific statistics 
+      tipObj.find('#idMemberName').html(memberName);
+      
+      var key = 'memberOnRegionJson.' + memberName + '.entryCount';
+      tipObj.find('#regionMemberEntryCount').html(eval(key));
+      key = 'memberOnRegionJson.' + memberName + '.entrySize';
+      tipObj.find('#regionMemberEntrySize').html(eval(key));
+      key = 'memberOnRegionJson.' + memberName + '.accessor';
+      //tipObj.find('#regionMemberAccessor').html('False');
+      tipObj.find('#regionMemberAccessor').html(eval(key));
+      
+      key = 'memberOnRegionJson.' + memberName + '.memoryReadsTrend';
+      tipObj.find('#memberMemoryReadsTrend').sparkline(eval(key),spo);
+      var reads = eval(key); // store
+      key = 'memberOnRegionJson.' + memberName + '.diskReadsTrend';
+      tipObj.find('#memberDiskReadsTrend').sparkline(eval(key),spo);
+      var diskReads = eval(key); // store
+      
+      // Writes trends
+      spo.lineColor = '#2e84bb';
+      key = 'memberOnRegionJson.' + memberName + '.memoryWritesTrend';
+      tipObj.find('#memberMemoryWritesTrend').sparkline(eval(key),spo);
+      var writes = eval(key); // store
+      key = 'memberOnRegionJson.' + memberName + '.diskWritesTrend';
+      tipObj.find('#memberDiskWritesTrend').sparkline(eval(key),spo);
+      var diskWrites = eval(key); // store
+            
+      $.sparkline_display_visible();
+      
+      var sumReads = 0;
+      var avgReads = 0;
+      if (reads.length > 0) {
+        for ( var i = 0; i < reads.length; i++) {
+          sumReads += parseFloat(reads[i]);
+        }
+        avgReads = sumReads / reads.length;
+      }
+      $('#memberMemoryReadsThroughput').html(applyNotApplicableCheck(avgReads.toFixed(2)));  
+
+      var sumDiskReads = 0;
+      var avgDiskReads = 0;
+      if (diskReads.length > 0) {
+        for ( var i = 0; i < diskReads.length; i++) {
+          sumDiskReads += parseFloat(diskReads[i]);
+        }
+        avgDiskReads = sumDiskReads / diskReads.length;
+      }
+      $('#memberDiskReadsThroughput').html(
+          applyNotApplicableCheck(avgDiskReads.toFixed(2)));
+      
+      var sumWrites = 0;
+      var avgWrites = 0;
+      if (writes.length > 0) {
+        for ( var i = 0; i < writes.length; i++) {
+          sumWrites += parseFloat(writes[i]);
+        }
+        avgWrites = sumWrites / writes.length;
+      }
+      $('#memberMemoryWritesThroughput').html(applyNotApplicableCheck(avgWrites.toFixed(2)));
+
+      
+      var sumDiskWrites = 0;
+      var avgDiskWrites = 0;
+      if (diskWrites.length > 0) {
+        for ( var i = 0; i < diskWrites.length; i++) {
+          sumDiskWrites += parseFloat(diskWrites[i]);
+        }
+        avgDiskWrites = sumDiskWrites / diskWrites.length;
+      }
+      $('#memberDiskWritesThroughput').html(applyNotApplicableCheck(avgDiskWrites.toFixed(2)));
+    },
+    onHide: function(){
+      $('#region_tooltip').css('display','none');
+      tipObj = null; // reset
+
+      theTooltip = null;
+    },
+     // custom positioning
+    position: 'bottom right',
+    
+    relative: false,
+      
+    // move tooltip a little bit to the right
+    offset: [-350, 10]});
+}
+
+function updateSelectedRegionMembersGrid(regMembers){
+
+  // loads grid
+  $('#memberList').jqGrid('clearGridData');
+
+  // Add memebers in grid
+  for (var key in regMembers){
+    var regMemData = regMembers[key];
+    $('#memberList').jqGrid('addRowData',
+        regMemData.memberId + "&" + regMemData.memberName, regMemData);
+  }
+
+  var gridUserData = jQuery("#memberList").getGridParam('userData');
+
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#memberList").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  // Reload jqgrid
+  jQuery("#memberList").trigger("reloadGrid");
+
+  // apply scroll if grid container block is not minimized
+  if ($("#LargeBlock_1").css("display") != "none") {
+    $('.ui-jqgrid-bdiv').each(function(index) {
+      var tempName = $(this).parent().attr('id');
+      if (tempName == 'gview_memberList') {
+        $(this).jScrollPane({maintainPosition : true, stickToRight : true});
+      }
+    });
+
+    var memberRegionsList = $('#gview_memberList');
+    memberRegionsListChild = memberRegionsList
+           .children('.ui-jqgrid-bdiv');
+    memberRegionsListChild.unbind('jsp-scroll-x');
+    memberRegionsListChild.bind('jsp-scroll-x', function(event,
+           scrollPositionX, isAtLeft, isAtRight) {
+
+        var mRList = $('#gview_memberList');
+        var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+             '.ui-jqgrid-hbox');
+        mRLC.css("position", "relative");
+        mRLC.css('right', scrollPositionX);
+    });
+  }
+}
+
+//function used for creating blank TreeMap for member's on Cluster Details
+//Screen
+function createMemberTreeMap() {
+    
+    var dataVal = {
+      "$area" : 1,
+      "initial" : true
+    };
+    var json = {
+      "children" : {},
+      "data" : dataVal,
+      "id" : "root",
+      "name" : "Members"
+    };
+    
+    regionMemberTreeMap = new $jit.TM.Squarified(
+        {
+
+          injectInto : 'GraphTreeMap',
+          levelsToShow : 1,
+          titleHeight : 0,
+          background : '#a0c44a',
+          offset : 2,
+          Label : {
+            type : 'HTML',
+            size : 1
+          },
+          Node : {
+            CanvasStyles : {
+              shadowBlur : 0
+            }
+          },
+          Events : {
+            enable : true,
+            onMouseEnter : function(node, eventInfo) {
+              if (node) {
+                node.setCanvasStyle('shadowBlur', 7);
+                node.setData('border', '#ffffff');
+
+                regionMemberTreeMap.fx.plotNode(node,
+                    regionMemberTreeMap.canvas);
+                regionMemberTreeMap.labels.plotLabel(
+                    regionMemberTreeMap.canvas, node);
+              }
+            },
+            onMouseLeave : function(node) {
+              if (node) {
+                node.removeData('border', '#ffffff');
+                node.removeCanvasStyle('shadowBlur');
+                regionMemberTreeMap.plot();
+              }
+            },
+            onClick : function(node) {
+              if (node.id != "root") {
+                location.href ='MemberDetails.html?member=' + node.id + "&memberName=" + node.name;
+              }
+            }
+          },
+
+          Tips : {
+            enable : false,
+            offsetX : 5,
+            offsetY : 5,
+            onShow : function(tip, node, isLeaf, domElement) {
+              var html = "<div class=\"tip-title\"><div><div class='popupHeading'>This region does not exist.</div>";
+              tip.innerHTML = html;
+            }
+          },
+          onCreateLabel : function(domElement, node) {
+            domElement.style.opacity = 0.01;
+
+          }
+        });
+    regionMemberTreeMap.loadJSON(json);
+    regionMemberTreeMap.refresh();
+    $(".node").attr('title',"<div class=\"tip-title\"><div><div class='popupHeading'>This region does not exist.</div></div></div>");
+    $(".node").tooltip({
+      
+      data : $(this).tagName,
+      onShow: function() {
+        tipObj = this.getTip(); //global store 
+      },
+      onHide: function(){
+        tipObj = null; // reset
+      },
+       // custom positioning
+      position: 'bottom right',
+      
+      relative: false,
+        
+      // move tooltip a little bit to the right
+      offset: [-350, 10]});
+}
+
+/* builds and returns json from given members details sent by server */
+function buildMemberTreeMap(members) {
+
+  var childerensVal = [];
+  var indexOfChild = 0;
+  for(var memKey in members){
+
+    var regMember = members[memKey];
+
+    var color = "#a0c44a";
+    // setting node color according to the status of member
+    // like if member has severe notification then the node color will be
+    // '#ebbf0f'
+    for ( var j = 0; j < warningAlerts.length; j++) {
+      if (regMember.memberName == warningAlerts[j].memberName) {
+        color = '#ebbf0f';
+        break;
+      }
+    }
+    // if member has severe notification then the node color will be
+    // '#de5a25'
+    for ( var j = 0; j < errorAlerts.length; j++) {
+      if (regMember.memberName == errorAlerts[j].memberName) {
+        color = '#de5a25';
+        break;
+      }
+    }
+    // if member has severe notification then the node color will be
+    // '#b82811'
+    for ( var j = 0; j < severAlerts.length; j++) {
+      if (regMember.memberName == severAlerts[j].memberName) {
+        color = '#b82811';
+        break;
+      }
+    }
+    
+    var areaSize = regMember.entryCount;
+    if (areaSize == 0)
+      areaSize = 1;
+    var name = "";
+    name = regMember.memberName;
+    var id = "";
+    id = regMember.memberName;
+    // passing all the required information of member to tooltip
+    var dataVal = {
+      "name" : name,
+      "id" : id,
+      "$color" : color,
+      "$area" : areaSize,
+      "entryCount" : regMember.entryCount,
+      "entrySize" : regMember.entrySize,
+      "accessor" : regMember.accessor,
+      "initial" : false
+    };
+    var childrenVal = {
+      "children" : [],
+      "data" : dataVal,
+      "id" : id,
+      "name" : name
+    };
+    childerensVal[indexOfChild++] = childrenVal;
+  }
+  
+  var localjson = {
+    "children" : childerensVal,
+    "data" : {},
+    "id" : "root",
+    "name" : "Members"
+  };
+  return localjson;
+}
+
+function tabClusterGrid() {
+  flagActiveTab = "MEM_GRID"; // MEM_TREE_MAP, MEM_GRID
+  
+  $('#btngridIcon').addClass('gridIconActive');
+  $('#btngridIcon').removeClass('gridIcon');
+
+  $('#btnchartIcon').addClass('chartIcon');
+  $('#btnchartIcon').removeClass('chartIconActive');
+
+  $('#chartBlocks_Panel').hide();
+  destroyScrollPane('gview_memberList');
+  $('.ui-jqgrid-bdiv').each(function(index) {
+      var tempName = $(this).parent().attr('id');
+      if (tempName == 'gview_memberList') {
+        $(this).jScrollPane({maintainPosition : true, stickToRight : true});
+      }
+  });
+  $('#gridBlocks_Panel').show();
+  jQuery("#memberList").trigger("reloadGrid");
+}
+
+function tabTreeMap() {
+  flagActiveTab = "MEM_TREE_MAP"; // MEM_TREE_MAP, MEM_GRID
+
+  $('#gridBlocks_Panel').hide();
+  $('#chartBlocks_Panel').show();
+
+  $('#btngridIcon').addClass('gridIcon');
+  $('#btngridIcon').removeClass('gridIconActive');
+
+  $('#btnchartIcon').addClass('chartIconActive');
+  $('#btnchartIcon').removeClass('chartIcon');
+
+  regionMemberTreeMap.loadJSON(globalJson);
+  regionMemberTreeMap.refresh();
+}
+
+//function used for creating blank grids for member list for Cluster Details
+//Screen
+function createMemberGrid() {
+jQuery("#memberList").jqGrid(
+ {
+   datatype : "local",
+   height : 560,
+   width : 410,
+   rowNum : 200,
+   shrinkToFit : false,
+   colNames : [ 'Member', 'Entry Count', 'Entry Size', 'Accessor'],
+   colModel : [
+       {
+         name : 'memberName',
+         index : 'memberName',
+         width : 120,
+         cellattr : function(rowId, val, rawObject, cm, rdata) {
+           return 'title="Member: ' + rawObject.memberName + ' , Entry Count: '
+               + rawObject.entryCount + ' , Entry Size: '
+               + rawObject.entrySize + ' , Accessor: '
+               + rawObject.accessor + '"';
+         },
+         sortable : true,
+         sorttype : "string"
+       },
+       {
+         name : 'entryCount',
+         index : 'entryCount',
+         width : 90,
+         align : 'right',
+         cellattr : function(rowId, val, rawObject, cm, rdata) {
+           return 'title="Member: ' + rawObject.memberName + ' , Entry Count: '
+           + rawObject.entryCount + ' , Entry Size: '
+           + rawObject.entrySize + ' , Accessor: '
+           + rawObject.accessor + '"';
+         },
+         sortable : true,
+         sorttype : "string"
+       },
+       {
+         name : 'entrySize',
+         index : 'entrySize',
+         width : 90,
+         align : 'right',
+         cellattr : function(rowId, val, rawObject, cm, rdata) {
+           return 'title="Member: ' + rawObject.memberName + ' , Entry Count: '
+           + rawObject.entryCount + ' , Entry Size: '
+           + rawObject.entrySize + ' , Accessor: '
+           + rawObject.accessor + '"';
+         },
+         sortable : true,
+         sorttype : "float"
+       },
+       {
+         name : 'accessor',
+         index : 'accessor',
+         width : 90,
+         align : 'center',
+         cellattr : function(rowId, val, rawObject, cm, rdata) {
+           return 'title="Member: ' + rawObject.memberName + ' , Entry Count: '
+           + rawObject.entryCount + ' , Entry Size: '
+           + rawObject.entrySize + ' , Accessor: '
+           + rawObject.accessor + '"';
+         },
+         sortable : true,
+         sorttype : "boolean"
+       } ],
+   userData : {
+     "sortOrder" : "desc",
+     "sortColName" : "entryCount"
+   },
+   onSortCol : function(columnName, columnIndex, sortorder) {
+     // Set sort order and sort column in user variables so that
+     // periodical updates can maintain the same
+     var gridUserData = jQuery("#memberList").getGridParam('userData');
+     gridUserData.sortColName = columnName;
+     gridUserData.sortOrder = sortorder;
+   },
+   onSelectRow : function(rowid) {
+     var member = rowid.split("&");
+     location.href = 'MemberDetails.html?member=' + member[0]
+     + '&memberName=' + member[1];
+   },
+   resizeStop : function(width, index) {
+     
+     var memberRegionsList = $('#gview_memberList');
+     var memberRegionsListChild = memberRegionsList
+         .children('.ui-jqgrid-bdiv');
+     var api = memberRegionsListChild.data('jsp');
+     api.reinitialise();
+     
+     memberRegionsList = $('#gview_memberList');
+     var memberRegionsListChild = memberRegionsList
+         .children('.ui-jqgrid-bdiv');
+
+     memberRegionsListChild.unbind('jsp-scroll-x');
+     memberRegionsListChild.bind('jsp-scroll-x', function(event,
+         scrollPositionX, isAtLeft, isAtRight) {
+       var mRList = $('#gview_memberList');
+       var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+           '.ui-jqgrid-hbox');
+       mRLC.css("position", "relative");
+       mRLC.css('right', scrollPositionX);
+     });
+     
+     this.gridComplete();
+     $('#btngridIcon').click();
+     refreshTheGrid($('#btngridIcon'));
+   },
+   gridComplete : function() {
+     $(".jqgrow").css({
+       cursor : 'default'
+     });
+
+     var memberRegionsList = $('#gview_memberList');
+     var memberRegionsListChild = memberRegionsList
+         .children('.ui-jqgrid-bdiv');
+
+     memberRegionsListChild.unbind('jsp-scroll-x');
+     memberRegionsListChild.bind('jsp-scroll-x', function(event,
+         scrollPositionX, isAtLeft, isAtRight) {
+       var mRList = $('#gview_memberList');
+       var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+           '.ui-jqgrid-hbox');
+       mRLC.css("position", "relative");
+       mRLC.css('right', scrollPositionX);
+     });       
+   }
+ });
+}
+
+function refreshTheGrid(gridDiv) {
+  setTimeout(function(){gridDiv.click();}, 300);
+}


[32/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResult1000.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResult1000.txt b/pulse/src/main/resources/testQueryResult1000.txt
new file mode 100644
index 0000000..d299c49
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResult1000.txt
@@ -0,0 +1,1023 @@
+{"result":[
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean","true"],"pk":["java.lang.String","0"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sh
 aresOutstanding":["double",2000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean","false"],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"s
 haresOutstanding":["double",6000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",2],"active":["boolean","true"],"pk":["java.lang.String","2"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",9],"secId":["java.lang.String","DELL"],"mktValue":["double",10],"s
 haresOutstanding":["double",9000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",8],"secId":["java.lang.String","SAP"],"mktValue":["double",9],"sharesOutstanding":["double",8000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",7],"secId":["java.lang.String","ORCL"],"mktValue":["double",8],"sharesOutstanding":["double",7000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",3],"active":["boolean","false"],"pk":["java.lang.String","3"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",12],"secId":["java.lang.String","HP"],"mktValue":["double",13],"sha
 resOutstanding":["double",12000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",13],"secId":["java.lang.String","SUN"],"mktValue":["double",14],"sharesOutstanding":["double",13000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",10],"secId":["java.lang.String","RHAT"],"mktValue":["double",11],"sharesOutstanding":["double",10000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",11],"secId":["java.lang.String","NOVL"],"mktValue":["double",12],"sharesOutstanding":["double",11000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]
 }],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",4],"active":["boolean","true"],"pk":["java.lang.String","4"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",15],"secId":["java.lang.String","YHOO"],"mktValue":["double",16],"
 sharesOutstanding":["double",15000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",16],"secId":["java.lang.String","GOOG"],"mktValue":["double",17],"sharesOutstanding":["double",16000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",14],"secId":["java.lang.String","IBM"],"mktValue":["double",15],"sharesOutstanding":["double",14000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean","false"],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],
 "sharesOutstanding":["double",19000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E
 -324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",6],"active":["boolean","true"],"pk":["java.lang.String","6"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",22],"secId":["java.lang.String","DELL"],"mktValue":["double",23],"
 sharesOutstanding":["double",22000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",23],"secId":["java.lang.String","RHAT"],"mktValue":["double",24],"sharesOutstanding":["double",23000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",21],"secId":["java.lang.String","SAP"],"mktValue":["double",22],"sharesOutstanding":["double",21000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",7],"active":["boolean","false"],"pk":["java.lang.String","7"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",27],"secId":["java.lang.String","IBM"],"mktValue":["double",28],"s
 haresOutstanding":["double",27000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",26],"secId":["java.lang.String","SUN"],"mktValue":["double",27],"sharesOutstanding":["double",26000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",24],"secId":["java.lang.String","NOVL"],"mktValue":["double",25],"sharesOutstanding":["double",24000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",25],"secId":["java.lang.String","HP"],"mktValue":["double",26],"sharesOutstanding":["double",25000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]
 }],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",8],"active":["boolean","true"],"pk":["java.lang.String","8"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"MSFT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",30],"secId":["java.lang.String","MSFT"],"mktValue":["double",31],"
 sharesOutstanding":["double",30000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",29],"secId":["java.lang.String","GOOG"],"mktValue":["double",30],"sharesOutstanding":["double",29000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",28],"secId":["java.lang.String","YHOO"],"mktValue":["double",29],"sharesOutstanding":["double",28000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",9],"active":["boolean","false"],"pk":["java.lang.String","9"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",33],"secId":["java.lang.String","ORCL"],"mktValue":["double",34],
 "sharesOutstanding":["double",33000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",34],"secId":["java.lang.String","SAP"],"mktValue":["double",35],"sharesOutstanding":["double",34000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",31],"secId":["java.lang.String","AOL"],"mktValue":["double",32],"sharesOutstanding":["double",31000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",32],"secId":["java.lang.String","APPL"],"mktValue":["double",33],"sharesOutstanding":["double",32000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-3
 24]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",10],"active":["boolean","true"],"pk":["java.lang.String","10"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",37],"secId":["java.lang.String","NOVL"],"mktValue":["double",38]
 ,"sharesOutstanding":["double",37000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",36],"secId":["java.lang.String","RHAT"],"mktValue":["double",37],"sharesOutstanding":["double",36000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",35],"secId":["java.lang.String","DELL"],"mktValue":["double",36],"sharesOutstanding":["double",35000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",11],"active":["boolean","false"],"pk":["java.lang.String","11"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",41],"secId":["java.lang.String","YHOO"],"mktValue":["double",42
 ],"sharesOutstanding":["double",41000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",40],"secId":["java.lang.String","IBM"],"mktValue":["double",41],"sharesOutstanding":["double",40000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",38],"secId":["java.lang.String","HP"],"mktValue":["double",39],"sharesOutstanding":["double",38000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",39],"secId":["java.lang.String","SUN"],"mktValue":["double",40],"sharesOutstanding":["double",39000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-3
 24]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",12],"active":["boolean","true"],"pk":["java.lang.String","12"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"MSFT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",43],"secId":["java.lang.String","MSFT"],"mktValue":["double",44]
 ,"sharesOutstanding":["double",43000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",44],"secId":["java.lang.String","AOL"],"mktValue":["double",45],"sharesOutstanding":["double",44000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",42],"secId":["java.lang.String","GOOG"],"mktValue":["double",43],"sharesOutstanding":["double",42000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",13],"active":["boolean","false"],"pk":["java.lang.String","13"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",48],"secId":["java.lang.String","DELL"],"mktValue":["double",49
 ],"sharesOutstanding":["double",48000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",47],"secId":["java.lang.String","SAP"],"mktValue":["double",48],"sharesOutstanding":["double",47000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",45],"secId":["java.lang.String","APPL"],"mktValue":["double",46],"sharesOutstanding":["double",45000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",46],"secId":["java.lang.String","ORCL"],"mktValue":["double",47],"sharesOutstanding":["double",46000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9
 E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",14],"active":["boolean","true"],"pk":["java.lang.String","14"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",50],"secId":["java.lang.String","NOVL"],"mktValue":["double",51]
 ,"sharesOutstanding":["double",50000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",51],"secId":["java.lang.String","HP"],"mktValue":["double",52],"sharesOutstanding":["double",51000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",49],"secId":["java.lang.String","RHAT"],"mktValue":["double",50],"sharesOutstanding":["double",49000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",15],"active":["boolean","false"],"pk":["java.lang.String","15"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",54],"secId":["java.lang.String","YHOO"],"mktValue":["double",55
 ],"sharesOutstanding":["double",54000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",55],"secId":["java.lang.String","GOOG"],"mktValue":["double",56],"sharesOutstanding":["double",55000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",52],"secId":["java.lang.String","SUN"],"mktValue":["double",53],"sharesOutstanding":["double",52000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",53],"secId":["java.lang.String","IBM"],"mktValue":["double",54],"sharesOutstanding":["double",53000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9
 E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",17],"active":["boolean","false"],"pk":["java.lang.String","17"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",61],"secId":["java.lang.String","DELL"],"mktValue":["double",62
 ],"sharesOutstanding":["double",61000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",62],"secId":["java.lang.String","RHAT"],"mktValue":["double",63],"sharesOutstanding":["double",62000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",59],"secId":["java.lang.String","ORCL"],"mktValue":["double",60],"sharesOutstanding":["double",59000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",60],"secId":["java.lang.String","SAP"],"mktValue":["double",61],"sharesOutstanding":["double",60000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.
 9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",16],"active":["boolean","true"],"pk":["java.lang.String","16"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",58],"secId":["java.lang.String","APPL"],"mktValue":["double",59]
 ,"sharesOutstanding":["double",58000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",57],"secId":["java.lang.String","AOL"],"mktValue":["double",58],"sharesOutstanding":["double",57000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",56],"secId":["java.lang.String","MSFT"],"mktValue":["double",57],"sharesOutstanding":["double",56000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",19],"active":["boolean","false"],"pk":["java.lang.String","19"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"MSFT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",69],"secId":["java.lang.String","MSFT"],"mktValue":["double",70
 ],"sharesOutstanding":["double",69000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",68],"secId":["java.lang.String","GOOG"],"mktValue":["double",69],"sharesOutstanding":["double",68000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",66],"secId":["java.lang.String","IBM"],"mktValue":["double",67],"sharesOutstanding":["double",66000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",67],"secId":["java.lang.String","YHOO"],"mktValue":["double",68],"sharesOutstanding":["double",67000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.
 9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",18],"active":["boolean","true"],"pk":["java.lang.String","18"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",64],"secId":["java.lang.String","HP"],"mktValue":["double",65],"sh
 aresOutstanding":["double",64000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",65],"secId":["java.lang.String","SUN"],"mktValue":["double",66],"sharesOutstanding":["double",65000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",63],"secId":["java.lang.String","NOVL"],"mktValue":["double",64],"sharesOutstanding":["double",63000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",21],"active":["boolean","false"],"pk":["java.lang.String","21"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",76],"secId":["java.lang.String","NOVL"],"mktValue":["double",77
 ],"sharesOutstanding":["double",76000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",75],"secId":["java.lang.String","RHAT"],"mktValue":["double",76],"sharesOutstanding":["double",75000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",73],"secId":["java.lang.String","SAP"],"mktValue":["double",74],"sharesOutstanding":["double",73000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",74],"secId":["java.lang.String","DELL"],"mktValue":["double",75],"sharesOutstanding":["double",74000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.
 9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",20],"active":["boolean","true"],"pk":["java.lang.String","20"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",71],"secId":["java.lang.String","APPL"],"mktValue":["double",72]
 ,"sharesOutstanding":["double",71000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",72],"secId":["java.lang.String","ORCL"],"mktValue":["double",73],"sharesOutstanding":["double",72000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",70],"secId":["java.lang.String","AOL"],"mktValue":["double",71],"sharesOutstanding":["double",70000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",23],"active":["boolean","false"],"pk":["java.lang.String","23"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"MSFT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",82],"secId":["java.lang.String","MSFT"],"mktValue":["double",83
 ],"sharesOutstanding":["double",82000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",83],"secId":["java.lang.String","AOL"],"mktValue":["double",84],"sharesOutstanding":["double",83000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",80],"secId":["java.lang.String","YHOO"],"mktValue":["double",81],"sharesOutstanding":["double",80000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",81],"secId":["java.lang.String","GOOG"],"mktValue":["double",82],"sharesOutstanding":["double",81000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9
 E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",22],"active":["boolean","true"],"pk":["java.lang.String","22"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",79],"secId":["java.lang.String","IBM"],"mktValue":["double",80],"
 sharesOutstanding":["double",79000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",78],"secId":["java.lang.String","SUN"],"mktValue":["double",79],"sharesOutstanding":["double",78000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",77],"secId":["java.lang.String","HP"],"mktValue":["double",78],"sharesOutstanding":["double",77000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",25],"active":["boolean","false"],"pk":["java.lang.String","25"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",89],"secId":["java.lang.String","NOVL"],"mktValue":["double",90
 ],"sharesOutstanding":["double",89000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",90],"secId":["java.lang.String","HP"],"mktValue":["double",91],"sharesOutstanding":["double",90000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",87],"secId":["java.lang.String","DELL"],"mktValue":["double",88],"sharesOutstanding":["double",87000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",88],"secId":["java.lang.String","RHAT"],"mktValue":["double",89],"sharesOutstanding":["double",88000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-
 324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",24],"active":["boolean","true"],"pk":["java.lang.String","24"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",85],"secId":["java.lang.String","ORCL"],"mktValue":["double",86]
 ,"sharesOutstanding":["double",85000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",86],"secId":["java.lang.String","SAP"],"mktValue":["double",87],"sharesOutstanding":["double",86000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",84],"secId":["java.lang.String","APPL"],"mktValue":["double",85],"sharesOutstanding":["double",84000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",27],"active":["boolean","false"],"pk":["java.lang.String","27"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",97],"secId":["java.lang.String","APPL"],"mktValue":["double",98
 ],"sharesOutstanding":["double",97000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",96],"secId":["java.lang.String","AOL"],"mktValue":["double",97],"sharesOutstanding":["double",96000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",94],"secId":["java.lang.String","GOOG"],"mktValue":["double",95],"sharesOutstanding":["double",94000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",95],"secId":["java.lang.String","MSFT"],"mktValue":["double",96],"sharesOutstanding":["double",95000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9
 E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",26],"active":["boolean","true"],"pk":["java.lang.String","26"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",93],"secId":["java.lang.String","YHOO"],"mktValue":["double",94]
 ,"sharesOutstanding":["double",93000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",92],"secId":["java.lang.String","IBM"],"mktValue":["double",93],"sharesOutstanding":["double",92000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",91],"secId":["java.lang.String","SUN"],"mktValue":["double",92],"sharesOutstanding":["double",91000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",29],"active":["boolean","false"],"pk":["java.lang.String","29"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",103],"secId":["java.lang.String","HP"],"mktValue":["double",104],
 "sharesOutstanding":["double",103000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",104],"secId":["java.lang.String","SUN"],"mktValue":["double",105],"sharesOutstanding":["double",104000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",101],"secId":["java.lang.String","RHAT"],"mktValue":["double",102],"sharesOutstanding":["double",101000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",102],"secId":["java.lang.String","NOVL"],"mktValue":["double",103],"sharesOutstanding":["double",102000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["dou
 ble",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",28],"active":["boolean","true"],"pk":["java.lang.String","28"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",100],"secId":["java.lang.String","DELL"],"mktValue":["double",10
 1],"sharesOutstanding":["double",100000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",99],"secId":["java.lang.String","SAP"],"mktValue":["double",100],"sharesOutstanding":["double",99000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",98],"secId":["java.lang.String","ORCL"],"mktValue":["double",99],"sharesOutstanding":["double",98000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean","true"],"pk":["java.lang.String","0"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sh
 aresOutstanding":["double",2000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean","false"],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"s
 haresOutstanding":["double",6000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",2],"active":["boolean","true"],"pk":["java.lang.String","2"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",9],"secId":["java.lang.String","DELL"],"mktValue":["double",10],"s
 haresOutstanding":["double",9000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",8],"secId":["java.lang.String","SAP"],"mktValue":["double",9],"sharesOutstanding":["double",8000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",7],"secId":["java.lang.String","ORCL"],"mktValue":["double",8],"sharesOutstanding":["double",7000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",3],"active":["boolean","false"],"pk":["java.lang.String","3"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",12],"secId":["java.lang.String","HP"],"mktValue":["double",13],"sha
 resOutstanding":["double",12000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",13],"secId":["java.lang.String","SUN"],"mktValue":["double",14],"sharesOutstanding":["double",13000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",10],"secId":["java.lang.String","RHAT"],"mktValue":["double",11],"sharesOutstanding":["double",10000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",11],"secId":["java.lang.String","NOVL"],"mktValue":["double",12],"sharesOutstanding":["double",11000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]
 }],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",4],"active":["boolean","true"],"pk":["java.lang.String","4"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",15],"secId":["java.lang.String","YHOO"],"mktValue":["double",16],"
 sharesOutstanding":["double",15000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",16],"secId":["java.lang.String","GOOG"],"mktValue":["double",17],"sharesOutstanding":["double",16000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",14],"secId":["java.lang.String","IBM"],"mktValue":["double",15],"sharesOutstanding":["double",14000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean","false"],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],
 "sharesOutstanding":["double",19000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E
 -324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",6],"active":["boolean","true"],"pk":["java.lang.String","6"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",22],"secId":["java.lang.String","DELL"],"mktValue":["double",23],"
 sharesOutstanding":["double",22000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",23],"secId":["java.lang.String","RHAT"],"mktValue":["double",24],"sharesOutstanding":["double",23000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",21],"secId":["java.lang.String","SAP"],"mktValue":["double",22],"sharesOutstanding":["double",21000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",7],"active":["boolean","false"],"pk":["java.lang.String","7"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",27],"secId":["java.lang.String","IBM"],"mktValue":["double",28],"s
 haresOutstanding":["double",27000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",26],"secId":["java.lang.String","SUN"],"mktValue":["double",27],"sharesOutstanding":["double",26000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",24],"secId":["java.lang.String","NOVL"],"mktValue":["double",25],"sharesOutstanding":["double",24000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",25],"secId":["java.lang.String","HP"],"mktValue":["double",26],"sharesOutstanding":["double",25000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]
 }],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",8],"active":["boolean","true"],"pk":["java.lang.String","8"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"MSFT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",30],"secId":["java.lang.String","MSFT"],"mktValue":["double",31],"
 sharesOutstanding":["double",30000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",29],"secId":["java.lang.String","GOOG"],"mktValue":["double",30],"sharesOutstanding":["double",29000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",28],"secId":["java.lang.String","YHOO"],"mktValue":["double",29],"sharesOutstanding":["double",28000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",9],"active":["boolean","false"],"pk":["java.lang.String","9"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",33],"secId":["java.lang.String","ORCL"],"mktValue":["double",34],
 "sharesOutstanding":["double",33000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",34],"secId":["java.lang.String","SAP"],"mktValue":["double",35],"sharesOutstanding":["double",34000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",31],"secId":["java.lang.String","AOL"],"mktValue":["double",32],"sharesOutstanding":["double",31000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",32],"secId":["java.lang.String","APPL"],"mktValue":["double",33],"sharesOutstanding":["double",32000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-3
 24]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",10],"active":["boolean","true"],"pk":["java.lang.String","10"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",37],"secId":["java.lang.String","NOVL"],"mktValue":["double",38]
 ,"sharesOutstanding":["double",37000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",36],"secId":["java.lang.String","RHAT"],"mktValue":["double",37],"sharesOutstanding":["double",36000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",35],"secId":["java.lang.String","DELL"],"mktValue":["double",36],"sharesOutstanding":["double",35000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",11],"active":["boolean","false"],"pk":["java.lang.String","11"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",41],"secId":["java.lang.String","YHOO"],"mktValue":["double",42
 ],"sharesOutstanding":["double",41000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",40],"secId":["java.lang.String","IBM"],"mktValue":["double",41],"sharesOutstanding":["double",40000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",38],"secId":["java.lang.String","HP"],"mktValue":["double",39],"sharesOutstanding":["double",38000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",39],"secId":["java.lang.String","SUN"],"mktValue":["double",40],"sharesOutstanding":["double",39000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-3
 24]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",12],"active":["boolean","true"],"pk":["java.lang.String","12"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"MSFT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",43],"secId":["java.lang.String","MSFT"],"mktValue":["double",44]
 ,"sharesOutstanding":["double",43000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",44],"secId":["java.lang.String","AOL"],"mktValue":["double",45],"sharesOutstanding":["double",44000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",42],"secId":["java.lang.String","GOOG"],"mktValue":["double",43],"sharesOutstanding":["double",42000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",13],"active":["boolean","false"],"pk":["java.lang.String","13"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",48],"secId":["java.lang.String","DELL"],"mktValue":["double",49
 ],"sharesOutstanding":["double",48000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",47],"secId":["java.lang.String","SAP"],"mktValue":["double",48],"sharesOutstanding":["double",47000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",45],"secId":["java.lang.String","APPL"],"mktValue":["double",46],"sharesOutstanding":["double",45000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",46],"secId":["java.lang.String","ORCL"],"mktValue":["double",47],"sharesOutstanding":["double",46000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9
 E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",14],"active":["boolean","true"],"pk":["java.lang.String","14"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",50],"secId":["java.lang.String","NOVL"],"mktValue":["double",51]
 ,"sharesOutstanding":["double",50000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",51],"secId":["java.lang.String","HP"],"mktValue":["double",52],"sharesOutstanding":["double",51000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",49],"secId":["java.lang.String","RHAT"],"mktValue":["double",50],"sharesOutstanding":["double",49000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",15],"active":["boolean","false"],"pk":["java.lang.String","15"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",54],"secId":["java.lang.String","YHOO"],"mktValue":["double",55
 ],"sharesOutstanding":["double",54000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",55],"secId":["java.lang.String","GOOG"],"mktValue":["double",56],"sharesOutstanding":["double",55000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",52],"secId":["java.lang.String","SUN"],"mktValue":["double",53],"sharesOutstanding":["double",52000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",53],"secId":["java.lang.String","IBM"],"mktValue":["double",54],"sharesOutstanding":["double",53000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9
 E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",17],"active":["boolean","false"],"pk":["java.lang.String","17"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",61],"secId":["java.lang.String","DELL"],"mktValue":["double",62
 ],"sharesOutstanding":["double",61000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",62],"secId":["java.lang.String","RHAT"],"mktValue":["double",63],"sharesOutstanding":["double",62000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",59],"secId":["java.lang.String","ORCL"],"mktValue":["double",60],"sharesOutstanding":["double",59000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",60],"secId":["java.lang.String","SAP"],"mktValue":["double",61],"sharesOutstanding":["double",60000],"col":["java.util.Set",{"0":["java.lang.String","1"],"1":["java.lang.String","0"]}]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.
 9E-324]}],
+["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",16],"active":["boolean","true"],"pk":["java.lang.String","16"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.Col

<TRUNCATED>


[33/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResult.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResult.txt b/pulse/src/main/resources/testQueryResult.txt
new file mode 100644
index 0000000..cbdc463
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResult.txt
@@ -0,0 +1,198 @@
+{"result":[
+  {"member":[["java.lang.String","pc68(7930)<v9>:30319"]],
+   "result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["java.ut
 il.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.uti
 l.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",2],"active":["boolean",true],"pk":["java.lang.String","2"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",8],"secId":["java.lang.String","SAP"],"mktValue":["double",9],"sharesOutstanding":["double",8000],"col":["java.util
 .HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",9],"secId":["java.lang.String","DELL"],"mktValue":["double",10],"sharesOutstanding":["double",9000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",7],"secId":["java.lang.String","ORCL"],"mktValue":["double",8],"sharesOutstanding":["double",7000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",3],"active":["boolean",false],"pk":["java.lang.String","3"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",12],"secId":["java.lang.String","HP"],"mktValue":["double",13],"sharesOutstanding":["double",12000],"col":["java.ut
 il.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",13],"secId":["java.lang.String","SUN"],"mktValue":["double",14],"sharesOutstanding":["double",13000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",10],"secId":["java.lang.String","RHAT"],"mktValue":["double",11],"sharesOutstanding":["double",10000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",11],"secId":["java.lang.String","NOVL"],"mktValue":["double",12],"sharesOutstanding":["double",11000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type1"],"ID":["int",4],"active":["boolean",true],"pk":["java.lang.String","4"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",15],"secId":["java.lang.String","YHOO"],"mktValue":["double",16],"sharesOutstanding":["double",15000],"col":["java
 .util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",16],"secId":["java.lang.String","GOOG"],"mktValue":["double",17],"sharesOutstanding":["double",16000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",14],"secId":["java.lang.String","IBM"],"mktValue":["double",15],"sharesOutstanding":["double",14000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]   
+    ]
+  },
+  {"member":[["java.lang.String","pc68(7940)<v10>:30286"]],
+   "result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["j
 ava.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.PortfolioNew",
+     {"type":["java.lang.String","type2"],"ID":["int",2],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.PortfolioNew",
+     {"type":["java.lang.String","type2"],"ID":["int",3],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":["int",6],"active":["boolean",true],"pk":["java.lang.String","6"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",22],"secId":["java.lang.String","DELL"],"mktValue":["double",23],"sharesOutstanding":["double",22000],"col":["java
 .util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",23],"secId":["java.lang.String","RHAT"],"mktValue":["double",24],"sharesOutstanding":["double",23000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",21],"secId":["java.lang.String","SAP"],"mktValue":["double",22],"sharesOutstanding":["double",21000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]
+    ]
+  },
+  {"member":[["java.lang.String","pc68(7950)<v10>:30573"]],
+   "result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["j
 ava.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",6],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",7],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",8],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",9],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",10],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":["int",11],"active":["boolean",true],"pk":["java.lang.String","6"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",22],"secId":["java.lang.String","DELL"],"mktValue":["double",23],"sharesOutstanding":["double",22000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",23],"secId":["java.lang.String","RHAT"],"mktValue":["double",24],"sharesOutstanding":["double",23000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",21],"secId":["java.lang.String","SAP"],"mktValue":["double",22],"sharesOutstanding":["double",21000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]
+    ]
+  },
+  {"member":[["java.lang.String","pc68(7960)<v10>:30642"]],
+   "result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["j
 ava.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",6],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",7],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",8],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",9],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",10],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":["int",11],"active":["boolean",true],"pk":["java.lang.String","6"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",22],"secId":["java.lang.String","DELL"],"mktValue":["double",23],"sharesOutstanding":["double",22000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",23],"secId":["java.lang.String","RHAT"],"mktValue":["double",24],"sharesOutstanding":["double",23000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",21],"secId":["java.lang.String","SAP"],"mktValue":["double",22],"sharesOutstanding":["double",21000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]
+    ]
+  },
+  {"member":[["java.lang.String","pc68(7970)<v10>:30731"]],
+   "result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["j
 ava.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",6],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",7],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",8],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",9],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",10],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":["int",11],"active":["boolean",true],"pk":["java.lang.String","6"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",22],"secId":["java.lang.String","DELL"],"mktValue":["double",23],"sharesOutstanding":["double",22000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",23],"secId":["java.lang.String","RHAT"],"mktValue":["double",24],"sharesOutstanding":["double",23000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",21],"secId":["java.lang.String","SAP"],"mktValue":["double",22],"sharesOutstanding":["double",21000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]
+    ]
+  },
+  {"member":[["java.lang.String","pc68(7980)<v10>:30644"]],
+   "result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["j
 ava.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",6],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",7],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",8],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"

<TRUNCATED>


[74/79] incubator-geode git commit: GEODE-311: make pdx logging info level

Posted by tu...@apache.org.
GEODE-311: make pdx logging info level


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9525e692
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9525e692
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9525e692

Branch: refs/heads/feature/GEODE-17
Commit: 9525e692e026f973cab0f59f53890623c9b1a838
Parents: fc7fcf9
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Fri Sep 4 13:47:42 2015 -0700
Committer: tushark <tu...@apache.org>
Committed: Tue Nov 3 16:54:35 2015 +0530

----------------------------------------------------------------------
 .../gemstone/gemfire/pdx/internal/TypeRegistry.java  | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9525e692/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java b/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java
index 4ca1a90..c0bb19c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java
@@ -122,6 +122,9 @@ public class TypeRegistry {
       if(pdxType != null) {
         this.idToType.put(typeId, pdxType);
         this.typeToId.put(pdxType, typeId);
+        if (logger.isInfoEnabled()) {
+          logger.info("Adding: {}", pdxType.toFormattedString());
+        }
         if (logger.isDebugEnabled()) {
           logger.debug("Adding entry into pdx type registry, typeId: {}  {}", typeId, pdxType);
         }
@@ -186,8 +189,8 @@ public class TypeRegistry {
     if(oldType == null) {
       this.idToType.put(id, newType);
       this.typeToId.put(newType, id);
-      if (logger.isDebugEnabled()) {
-        logger.debug("Defining: {}", newType.toFormattedString());
+      if (logger.isInfoEnabled()) {
+        logger.info("Defining: {}", newType.toFormattedString());
       }
     } else {
       //TODO - this might be overkill, but type definition should be rare enough.
@@ -205,8 +208,8 @@ public class TypeRegistry {
       this.distributedTypeRegistry.addRemoteType(typeId, newType);
       this.idToType.put(typeId, newType);
       this.typeToId.put(newType, typeId);
-      if (logger.isDebugEnabled()) {
-        logger.debug("Adding, from remote WAN: {}", newType.toFormattedString());
+      if (logger.isInfoEnabled()) {
+        logger.info("Adding, from remote WAN: {}", newType.toFormattedString());
       }
     } else {
     //TODO - this might be overkill, but type definition should be rare enough.
@@ -483,8 +486,8 @@ public class TypeRegistry {
     this.distributedTypeRegistry.addImportedType(typeId, importedType);
     this.idToType.put(typeId, importedType);
     this.typeToId.put(importedType, typeId);
-    if (logger.isDebugEnabled()) {
-      logger.debug("Importing type: {}", importedType.toFormattedString());
+    if (logger.isInfoEnabled()) {
+      logger.info("Importing type: {}", importedType.toFormattedString());
     }
   }
 


[02/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AggregateStatement.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AggregateStatement.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AggregateStatement.java
new file mode 100644
index 0000000..0d7fa46
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AggregateStatement.java
@@ -0,0 +1,206 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+public class AggregateStatement extends JMXBaseBean implements AggregateStatementMBean {
+  private String name = null;
+
+  public AggregateStatement(String name) {
+    this.name = name;
+  }
+
+  protected String getKey(String propName) {
+    return "aggregatestatement." + name + "." + propName;
+  }
+  
+  /**
+   * Query definition
+   * 
+   * @return
+   */
+  public String getQueryDefinition(){
+    return getString("queryDefinition");
+  }
+
+  /**
+   * Number of times this statement is compiled (including re compilations)
+   * 
+   * @return
+   */
+  @Override
+  public long getNumTimesCompiled(){
+    return getLong("numTimesCompiled");
+  }
+
+  /**
+   * Number of times this statement is executed
+   * 
+   * @return
+   */
+  @Override
+  public long getNumExecution(){
+    return getLong("numExecution");
+  }
+
+  /**
+   * Statements that are actively being processed during the statistics snapshot
+   * 
+   * @return
+   */
+  public long getNumExecutionsInProgress(){
+    return getLong("numExecutionsInProgress");
+  }
+
+  /**
+   * Number of times global index lookup message exchanges occurred
+   * 
+   * @return
+   */
+  public long getNumTimesGlobalIndexLookup(){
+    return getLong("numTimesGlobalIndexLookup");
+  }
+
+  /**
+   * Number of rows modified by DML operation of insert/delete/update
+   * 
+   * @return
+   */
+  public long getNumRowsModified(){
+    return getLong("numRowsModified");
+  }
+
+  /**
+   * Time spent(in milliseconds) in parsing the query string
+   * 
+   * @return
+   */
+  public long getParseTime(){
+    return getLong("parseTime");
+  }
+
+  /**
+   * Time spent (in milliseconds) mapping this statement with database object's metadata (bind)
+   * 
+   * @return
+   */
+  public long getBindTime(){
+    return getLong("bindTime");
+  }
+
+  /**
+   * Time spent (in milliseconds) determining the best execution path for this statement
+   * (optimize)
+   * 
+   * @return
+   */
+  public long getOptimizeTime(){
+    return getLong("optimizeTime");
+  }
+
+  /**
+   * Time spent (in milliseconds) compiling details about routing information of query strings to
+   * data node(s) (processQueryInfo)
+   * 
+   * @return
+   */
+  public long getRoutingInfoTime(){
+    return getLong("routingInfoTime");
+  }
+
+  /**
+   * Time spent (in milliseconds) to generate query execution plan definition (activation class)
+   * 
+   * @return
+   */
+  public long getGenerateTime(){
+    return getLong("generateTime");
+  }
+
+  /**
+   * Total compilation time (in milliseconds) of the statement on this node (prepMinion)
+   * 
+   * @return
+   */
+  public long getTotalCompilationTime(){
+    return getLong("totalCompilationTime");
+  }
+
+  /**
+   * Time spent (in nanoseconds) in creation of all the layers of query processing (ac.execute)
+   * 
+   * @return
+   */
+  public long getExecutionTime(){
+    return getLong("executionTime");
+  }
+
+  /**
+   * Time to apply (in nanoseconds) the projection and additional filters. (projectrestrict)
+   * 
+   * @return
+   */
+  public long getProjectionTime(){
+    return getLong("projectionTime");
+  }
+
+  /**
+   * Total execution time (in nanoseconds) taken to process the statement on this node
+   * (execute/open/next/close)
+   * 
+   * @return
+   */
+  public long getTotalExecutionTime(){
+    return getLong("totalExecutionTime");
+  }
+
+  /**
+   * Time taken (in nanoseconds) to modify rows by DML operation of insert/delete/update
+   * 
+   * @return
+   */
+  public long getRowsModificationTime(){
+    return getLong("rowsModificationTime");
+  }
+
+  /**
+   * Number of rows returned from remote nodes (ResultHolder/Get convertibles)
+   * 
+   * @return
+   */
+  public long getQNNumRowsSeen(){
+    return getLong("qnNumRowsSeen");
+  }
+
+  /**
+   * TCP send time (in nanoseconds) of all the messages including serialization time and queue
+   * wait time
+   * 
+   * @return
+   */
+  public long getQNMsgSendTime(){
+    return getLong("qnMsgSendTime");
+  }
+
+  /**
+   * Serialization time (in nanoseconds) for all the messages while sending to remote node(s)
+   * 
+   * @return
+   */
+  public long getQNMsgSerTime(){
+    return getLong("qnMsgSerTime");
+  }
+  
+  /**
+   * 
+   * 
+   * @return
+   */
+  public long getQNRespDeSerTime(){
+    return getLong("qnRespDeSerTime");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AggregateStatementMBean.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AggregateStatementMBean.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AggregateStatementMBean.java
new file mode 100644
index 0000000..1758d1e
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/AggregateStatementMBean.java
@@ -0,0 +1,157 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+public interface AggregateStatementMBean {
+  public static final String OBJECT_NAME = "GemFireXD:service=Statement,type=Aggregate";
+
+  /**
+   * Query definition
+   *
+   * @return
+   */
+  public String getQueryDefinition();
+
+  /**
+   * Number of times this statement is compiled (including re compilations)
+   *
+   * @return
+   */
+  public long getNumTimesCompiled();
+
+  /**
+   * Number of times this statement is executed
+   *
+   * @return
+   */
+  public long getNumExecution();
+
+  /**
+   * Statements that are actively being processed during the statistics snapshot
+   *
+   * @return
+   */
+  public long getNumExecutionsInProgress();
+
+  /**
+   * Number of times global index lookup message exchanges occurred
+   *
+   * @return
+   */
+  public long getNumTimesGlobalIndexLookup();
+
+  /**
+   * Number of rows modified by DML operation of insert/delete/update
+   *
+   * @return
+   */
+  public long getNumRowsModified();
+
+  /**
+   * Time spent(in milliseconds) in parsing the query string
+   *
+   * @return
+   */
+  public long getParseTime();
+
+  /**
+   * Time spent (in milliseconds) mapping this statement with database object's metadata (bind)
+   *
+   * @return
+   */
+  public long getBindTime();
+
+  /**
+   * Time spent (in milliseconds) determining the best execution path for this statement
+   * (optimize)
+   *
+   * @return
+   */
+  public long getOptimizeTime();
+
+  /**
+   * Time spent (in milliseconds) compiling details about routing information of query strings to
+   * data node(s) (processQueryInfo)
+   *
+   * @return
+   */
+  public long getRoutingInfoTime();
+
+  /**
+   * Time spent (in milliseconds) to generate query execution plan definition (activation class)
+   *
+   * @return
+   */
+  public long getGenerateTime();
+
+  /**
+   * Total compilation time (in milliseconds) of the statement on this node (prepMinion)
+   *
+   * @return
+   */
+  public long getTotalCompilationTime();
+
+  /**
+   * Time spent (in nanoseconds) in creation of all the layers of query processing (ac.execute)
+   *
+   * @return
+   */
+  public long getExecutionTime();
+
+  /**
+   * Time to apply (in nanoseconds) the projection and additional filters. (projectrestrict)
+   *
+   * @return
+   */
+  public long getProjectionTime();
+
+  /**
+   * Total execution time (in nanoseconds) taken to process the statement on this node
+   * (execute/open/next/close)
+   *
+   * @return
+   */
+  public long getTotalExecutionTime();
+
+  /**
+   * Time taken (in nanoseconds) to modify rows by DML operation of insert/delete/update
+   *
+   * @return
+   */
+  public long getRowsModificationTime();
+
+  /**
+   * Number of rows returned from remote nodes (ResultHolder/Get convertibles)
+   *
+   * @return
+   */
+  public long getQNNumRowsSeen();
+
+  /**
+   * TCP send time (in nanoseconds) of all the messages including serialization time and queue
+   * wait time
+   *
+   * @return
+   */
+  public long getQNMsgSendTime();
+
+  /**
+   * Serialization time (in nanoseconds) for all the messages while sending to remote node(s)
+   *
+   * @return
+   */
+  public long getQNMsgSerTime();
+
+  /**
+   *
+   *
+   * @return
+   */
+  public long getQNRespDeSerTime();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java
new file mode 100644
index 0000000..93560a0
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/DataBrowserResultLoader.java
@@ -0,0 +1,73 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+public class DataBrowserResultLoader {
+  private static DataBrowserResultLoader dbResultLoader = new DataBrowserResultLoader();
+
+  public static DataBrowserResultLoader getInstance() {
+    return dbResultLoader;
+  }
+
+  public String load(String queryString) throws IOException {
+
+    URL url = null;
+    InputStream inputStream = null;
+    BufferedReader streamReader = null;
+    String inputStr = null;
+    StringBuilder sampleQueryResultResponseStrBuilder = null;
+
+    try {
+      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+
+      if (queryString.equals(PulseTests.QUERY_TYPE_ONE)) {
+        url = classLoader.getResource("testQueryResultClusterSmall.txt");
+      } else if (queryString.equals(PulseTests.QUERY_TYPE_TWO)) {
+        url = classLoader.getResource("testQueryResultSmall.txt");
+      } else if (queryString.equals(PulseTests.QUERY_TYPE_THREE)) {
+        url = classLoader.getResource("testQueryResult.txt");
+      } else if (queryString.equals(PulseTests.QUERY_TYPE_FOUR)) {
+        url = classLoader.getResource("testQueryResultWithStructSmall.txt");
+      } else if (queryString.equals(PulseTests.QUERY_TYPE_FIVE)) {
+        url = classLoader.getResource("testQueryResultClusterWithStruct.txt");
+      } else if (queryString.equals(PulseTests.QUERY_TYPE_SIX)) {
+        url = classLoader.getResource("testQueryResultHashMapSmall.txt");
+      } else if (queryString.equals(PulseTests.QUERY_TYPE_SEVENE)) {
+        url = classLoader.getResource("testQueryResult1000.txt");
+      } else {
+        url = classLoader.getResource("testQueryResult.txt");
+      }
+
+      File sampleQueryResultFile = new File(url.getPath());
+      inputStream = new FileInputStream(sampleQueryResultFile);
+      streamReader = new BufferedReader(new InputStreamReader(inputStream,
+          "UTF-8"));
+      sampleQueryResultResponseStrBuilder = new StringBuilder();
+
+      while ((inputStr = streamReader.readLine()) != null) {
+        sampleQueryResultResponseStrBuilder.append(inputStr);
+      }
+
+      // close stream reader
+      streamReader.close();
+
+    } catch (IOException ex) {
+      ex.printStackTrace();
+    }
+
+    return sampleQueryResultResponseStrBuilder.toString();
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDAggregateTable.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDAggregateTable.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDAggregateTable.java
new file mode 100644
index 0000000..50f4f9e
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDAggregateTable.java
@@ -0,0 +1,35 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import javax.management.NotificationBroadcasterSupport;
+
+public class GemFireXDAggregateTable extends NotificationBroadcasterSupport
+    implements GemFireXDAggregateTableMBean {
+  private String name = null;
+
+  public GemFireXDAggregateTable(String name) {
+    this.name = name;
+  }
+
+  private String getKey(String propName) {
+    return "table." + name + "." + propName;
+  }
+
+  @Override
+  public long getEntrySize() {
+    return Long.parseLong(JMXProperties.getInstance().getProperty(
+        getKey("EntrySize")));
+  }
+
+  @Override
+  public int getNumberOfRows() {
+    return Integer.parseInt(JMXProperties.getInstance().getProperty(
+        getKey("NumberOfRows")));
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDAggregateTableMBean.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDAggregateTableMBean.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDAggregateTableMBean.java
new file mode 100644
index 0000000..1cb2ce4
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDAggregateTableMBean.java
@@ -0,0 +1,17 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+public interface GemFireXDAggregateTableMBean {
+  public static final String OBJECT_NAME = "GemFireXD:service=Table,type=Aggregate,table=";
+  
+  public long getEntrySize();
+
+  public int getNumberOfRows();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDCluster.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDCluster.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDCluster.java
new file mode 100644
index 0000000..fbc7a06
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDCluster.java
@@ -0,0 +1,84 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import javax.management.NotificationBroadcasterSupport;
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeDataSupport;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
+
+public class GemFireXDCluster extends NotificationBroadcasterSupport implements
+    GemFireXDClusterMBean {
+  private String name = null;
+
+  private static String[] itemNames = { "connectionsAttempted",
+      "connectionsActive", "connectionsClosed", "connectionsFailed" };;
+  private static String[] itemDescriptions = { "connectionsAttempted",
+      "connectionsActive", "connectionsClosed", "connectionsFailed" };
+  private static OpenType[] itemTypes = { SimpleType.LONG, SimpleType.LONG,
+      SimpleType.LONG, SimpleType.LONG };
+  private static CompositeType networkServerClientConnectionStats = null;
+
+  static {
+    try {
+      networkServerClientConnectionStats = new CompositeType(
+          "NetworkServerClientConnectionStats",
+          "Network Server Client Connection Stats Information", itemNames,
+          itemDescriptions, itemTypes);
+
+    } catch (OpenDataException e) {
+      e.printStackTrace();
+    }
+  }
+
+  public GemFireXDCluster(String name) {
+    this.name = name;
+  }
+
+  private String getKey(String propName) {
+    return "gemfirexd." + name + "." + propName;
+  }
+
+  @Override
+  public int getProcedureCallsCompleted() {
+    return Integer.parseInt(JMXProperties.getInstance().getProperty(
+        getKey("ProcedureCallsCompleted")));
+  }
+
+  @Override
+  public int getProcedureCallsInProgress() {
+    return Integer.parseInt(JMXProperties.getInstance().getProperty(
+        getKey("ProcedureCallsInProgress")));
+  }
+
+  @Override
+  public CompositeData getNetworkServerClientConnectionStats() {
+    String value = JMXProperties.getInstance().getProperty(
+        getKey("NetworkServerClientConnectionStats"), "");
+    String[] values = value.split(",");
+    Long[] itemValues = new Long[values.length];
+    for (int i = 0; i < values.length; i++) {
+      itemValues[i] = Long.parseLong(values[i]);
+    }
+
+    CompositeData nscCompData;
+    try {
+      nscCompData = new CompositeDataSupport(
+          networkServerClientConnectionStats, itemNames, itemValues);
+    } catch (OpenDataException e) {
+      e.printStackTrace();
+      nscCompData = null;
+    }
+    return nscCompData;
+
+  }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDClusterMBean.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDClusterMBean.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDClusterMBean.java
new file mode 100644
index 0000000..9536ae2
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDClusterMBean.java
@@ -0,0 +1,21 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import javax.management.openmbean.CompositeData;
+
+public interface GemFireXDClusterMBean {
+  public static final String OBJECT_NAME = "GemFireXD:service=Cluster";
+
+  public int getProcedureCallsCompleted();
+
+  public int getProcedureCallsInProgress();
+
+  public CompositeData getNetworkServerClientConnectionStats();
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDMember.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDMember.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDMember.java
new file mode 100644
index 0000000..0a317d0
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDMember.java
@@ -0,0 +1,69 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeDataSupport;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
+
+public class GemFireXDMember extends JMXBaseBean implements
+    GemFireXDMemberMBean {
+  private String name = null;
+
+  private static String[] itemNames = { "connectionsAttempted",
+      "connectionsActive", "connectionsClosed", "connectionsFailed" };;
+  private static String[] itemDescriptions = { "connectionsAttempted",
+      "connectionsActive", "connectionsClosed", "connectionsFailed" };
+  private static OpenType[] itemTypes = { SimpleType.LONG, SimpleType.LONG,
+      SimpleType.LONG, SimpleType.LONG };
+  private static CompositeType networkServerClientConnectionStats = null;
+
+  static {
+    try {
+      networkServerClientConnectionStats = new CompositeType(
+          "NetworkServerClientConnectionStats",
+          "Network Server Client Connection Stats Information", itemNames,
+          itemDescriptions, itemTypes);
+
+    } catch (OpenDataException e) {
+      e.printStackTrace();
+    }
+  }
+
+  public GemFireXDMember(String name) {
+    this.name = name;
+  }
+
+  @Override
+  protected String getKey(String propName) {
+    return "gemfirexdmember." + name + "." + propName;
+  }
+
+  @Override
+  public boolean getDataStore() {
+    return getBoolean("DataStore");
+  }
+
+  @Override
+  public CompositeData getNetworkServerClientConnectionStats() {
+    Long[] itemValues = getLongArray("NetworkServerClientConnectionStats");
+    CompositeData nscCompData;
+    try {
+      nscCompData = new CompositeDataSupport(
+          networkServerClientConnectionStats, itemNames, itemValues);
+    } catch (OpenDataException e) {
+      e.printStackTrace();
+      nscCompData = null;
+    }
+    return nscCompData;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDMemberMBean.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDMemberMBean.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDMemberMBean.java
new file mode 100644
index 0000000..f49bdcf
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/GemFireXDMemberMBean.java
@@ -0,0 +1,20 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import javax.management.openmbean.CompositeData;
+
+public interface GemFireXDMemberMBean {
+
+  public static final String OBJECT_NAME = "GemFireXD:group=DEFAULT,type=Member";
+
+  public boolean getDataStore();
+
+  public CompositeData getNetworkServerClientConnectionStats();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/JMXBaseBean.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/JMXBaseBean.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/JMXBaseBean.java
new file mode 100644
index 0000000..5f31b22
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/JMXBaseBean.java
@@ -0,0 +1,56 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+public abstract class JMXBaseBean {
+
+  protected abstract String getKey(String propName);
+
+  protected String getString(String key) {
+    return JMXProperties.getInstance().getProperty(getKey(key));
+  }
+
+  protected String[] getStringArray(String key) {
+    return JMXProperties.getInstance().getProperty(getKey(key), "").split(" ");
+  }
+
+  protected boolean getBoolean(String key) {
+    return Boolean.parseBoolean(JMXProperties.getInstance().getProperty(
+        getKey(key)));
+  }
+
+  protected int getInt(String key) {
+    return Integer.parseInt(JMXProperties.getInstance()
+        .getProperty(getKey(key)));
+  }
+
+  protected long getLong(String key) {
+    return Long.parseLong(JMXProperties.getInstance().getProperty(getKey(key)));
+  }
+
+  protected Long[] getLongArray(String key) {
+    String value = JMXProperties.getInstance().getProperty(getKey(key), "");
+    String[] values = value.split(",");
+    Long[] longValues = new Long[values.length];
+    for (int i = 0; i < values.length; i++) {
+      longValues[i] = Long.parseLong(values[i]);
+    }
+    return longValues;
+  }
+
+  protected double getDouble(String key) {
+    return Double.parseDouble(JMXProperties.getInstance().getProperty(
+        getKey(key)));
+  }
+
+  protected float getFloat(String key) {
+    return Float.parseFloat(JMXProperties.getInstance()
+        .getProperty(getKey(key)));
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/JMXProperties.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/JMXProperties.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/JMXProperties.java
new file mode 100644
index 0000000..cb83613
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/JMXProperties.java
@@ -0,0 +1,36 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+public class JMXProperties extends Properties {
+  private static final long serialVersionUID = -6210901350494570026L;
+
+  private static JMXProperties props = new JMXProperties();
+
+  public static JMXProperties getInstance() {
+    return props;
+  }
+
+  public void load(String propFile) throws IOException {
+    if (propFile != null) {
+      FileInputStream fin;
+      fin = new FileInputStream(new File(propFile));
+      if (fin != null) {
+        clear();
+        load(fin);
+      }
+
+      fin.close();
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Member.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Member.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Member.java
new file mode 100644
index 0000000..812e055
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Member.java
@@ -0,0 +1,178 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+public class Member extends JMXBaseBean implements MemberMBean {
+  private String name = null;
+
+  public Member(String name) {
+    this.name = name;
+  }
+
+  protected String getKey(String propName) {
+    return "member." + name + "." + propName;
+  }
+
+  @Override
+  public boolean getManager() {
+    return getBoolean("manager");
+  }
+
+  @Override
+  public int getTotalRegionCount() {
+    return getInt("totalRegionCount");
+  }
+
+  @Override
+  public boolean getLocator() {
+    return getBoolean("locator");
+  }
+
+  @Override
+  public long getTotalDiskUsage() {
+    return getLong("totalDiskUsage");
+  }
+
+  @Override
+  public boolean getServer() {
+    return getBoolean("sever");
+  }
+
+  @Override
+  public String[] getGroups() {
+    return getStringArray("Groups");
+  }
+
+  @Override
+  /*public String[] getRedundancyZone() {
+    return getStringArray("RedundancyZone");
+  }*/
+  public String getRedundancyZone() {
+    return getString("RedundancyZone");
+  }
+
+  @Override
+  public long getTotalFileDescriptorOpen() {
+    return getLong("totalFileDescriptorOpen");
+  }
+
+  @Override
+  public double getLoadAverage() {
+    return getDouble("loadAverage");
+  }
+
+  @Override
+  public float getDiskWritesRate() {
+    return getFloat("diskWritesRate");
+  }
+
+  @Override
+  public long getJVMPauses() {
+    return getLong("JVMPauses");
+  }
+
+  @Override
+  public long getCurrentHeapSize() {
+    return getLong("currentHeapSize");
+  }
+
+  @Override
+  public long getMaximumHeapSize() {
+    return getLong("maximumHeapSize");
+  }
+
+  @Override
+  public long getUsedMemory() {
+    return getLong("UsedMemory");
+  }
+
+  @Override
+  public long getMaxMemory() {
+    return getLong("MaxMemory");
+  }
+
+  @Override
+  public int getNumThreads() {
+    return getInt("numThreads");
+  }
+
+  @Override
+  public long getMemberUpTime() {
+    return getLong("memberUpTime");
+  }
+
+  @Override
+  public String getHost() {
+    return getString("host");
+  }
+
+  @Override
+  public long getTotalBytesOnDisk() {
+    return getLong("totalBytesOnDisk");
+  }
+
+  @Override
+  public float getCpuUsage() {
+    return getFloat("cpuUsage");
+  }
+
+  @Override
+  public String getMember() {
+    return getString("member");
+  }
+
+  @Override
+  public String getId() {
+    return getString("id");
+  }
+
+  @Override
+  public float getAverageReads() {
+    return getFloat("averageReads");
+  }
+
+  @Override
+  public float getAverageWrites() {
+    return getFloat("averageWrites");
+  }
+
+  @Override
+  public int getPort() {
+    return getInt("port");
+  }
+
+  @Override
+  public long getFoo() {
+    return getLong("foo");
+  }
+
+  @Override
+  public long getOffHeapFreeSize() {
+    return getLong("OffHeapFreeSize");
+  }
+
+  @Override
+  public long getOffHeapUsedSize() {
+    return getLong("OffHeapUsedSize");
+  }
+
+  @Override
+  public long getOffHeapFreeMemory() {
+    return getLong("OffHeapFreeMemory");
+  }
+
+  @Override
+  public long getOffHeapUsedMemory() {
+    return getLong("OffHeapUsedMemory");
+  }
+
+  @Override
+  public String getVersion() {
+    return getString("Version");
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/MemberMBean.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/MemberMBean.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/MemberMBean.java
new file mode 100644
index 0000000..bc849ba
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/MemberMBean.java
@@ -0,0 +1,75 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.tests;
+
+public interface MemberMBean {
+  public static final String OBJECT_NAME = "GemFire:type=Member";
+
+  public boolean getManager();
+
+  public int getTotalRegionCount();
+
+  public boolean getLocator();
+
+  public long getTotalDiskUsage();
+
+  public boolean getServer();
+
+  public String[] getGroups();
+
+  //public String[] getRedundancyZone();
+  public String getRedundancyZone();
+
+  public long getTotalFileDescriptorOpen();
+
+  public double getLoadAverage();
+
+  public float getDiskWritesRate();
+
+  public long getJVMPauses();
+
+  public long getCurrentHeapSize();
+
+  public long getMaximumHeapSize();
+
+  public long getUsedMemory();
+
+  public long getMaxMemory();
+
+  public int getNumThreads();
+
+  public long getMemberUpTime();
+
+  public String getHost();
+
+  public long getTotalBytesOnDisk();
+
+  public float getCpuUsage();
+
+  public String getMember();
+
+  public String getId();
+
+  public float getAverageReads();
+
+  public float getAverageWrites();
+
+  public int getPort();
+
+  public long getFoo();
+
+  public long getOffHeapFreeSize();
+
+  public long getOffHeapUsedSize();
+
+  public long getOffHeapFreeMemory();
+
+  public long getOffHeapUsedMemory();
+
+  public String getVersion();
+}


[31/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultArrayAndArrayList.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultArrayAndArrayList.txt b/pulse/src/main/resources/testQueryResultArrayAndArrayList.txt
new file mode 100644
index 0000000..5048bdf
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultArrayAndArrayList.txt
@@ -0,0 +1,8 @@
+{"result":[
+["int[]",[4,4,5]],
+["int[]",[1,1,2]],
+["java.util.ArrayList",{"0":["java.lang.String","value-18"],"1":["java.lang.String","value-28"]}],
+["java.util.ArrayList",{"0":["java.lang.String","value-17"],"1":["java.lang.String","value-27"]}],
+["java.util.ArrayList",{"0":["java.lang.String","value-16"],"1":["java.lang.String","value-26"]}],
+["java.util.ArrayList",{"0":["java.lang.String","value-15"],"1":["java.lang.String","value-25"]}]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultArrayList.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultArrayList.txt b/pulse/src/main/resources/testQueryResultArrayList.txt
new file mode 100644
index 0000000..0aa81ee
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultArrayList.txt
@@ -0,0 +1,6 @@
+{"result":[
+["java.util.ArrayList",{"0":["java.lang.String","value-11"],"1":["java.lang.String","value-21"],"2":["java.lang.String","value-31"]}],
+["java.util.ArrayList",{"0":["java.lang.String","value-12"],"1":["java.lang.String","value-22"]}],
+["java.util.ArrayList",{"0":["java.lang.String","value-13"],"1":["java.lang.String","value-23"]}],
+["java.util.ArrayList",{"0":["java.lang.String","value-14"],"1":["java.lang.String","value-24"]}]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultArrayOfList.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultArrayOfList.txt b/pulse/src/main/resources/testQueryResultArrayOfList.txt
new file mode 100644
index 0000000..f977431
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultArrayOfList.txt
@@ -0,0 +1,15 @@
+{"result":[
+ ["java.util.List[]",[
+                        ["java.util.List",{"0":["java.lang.String","value-10"],"1":["java.lang.String","value-20"]}],
+                        ["java.util.List",{"0":["java.lang.String","value-11"],"1":["java.lang.String","value-21"]}],
+                        ["java.util.List",{"0":["java.lang.String","value-12"],"1":["java.lang.String","value-22"]}],
+                        ["java.util.List",{"0":["java.lang.String","value-13"],"1":["java.lang.String","value-23"]}]
+                     ]],
+
+ ["java.util.List[]",[
+                        ["java.util.List",{"0":["java.lang.String","value-10"],"1":["java.lang.String","value-20"]}],
+                        ["java.util.List",{"0":["java.lang.String","value-11"],"1":["java.lang.String","value-21"]}],
+                        ["java.util.List",{"0":["java.lang.String","value-12"],"1":["java.lang.String","value-22"]}],
+                        ["java.util.List",{"0":["java.lang.String","value-13"],"1":["java.lang.String","value-23"]}]
+                     ]]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultClusterSmall.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultClusterSmall.txt b/pulse/src/main/resources/testQueryResultClusterSmall.txt
new file mode 100644
index 0000000..25beaba
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultClusterSmall.txt
@@ -0,0 +1,23 @@
+{"result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["ja
 va.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["java.ut
 il.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.uti
 l.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",2],"active":["boolean",true],"pk":["java.lang.String","2"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",8],"secId":["java.lang.String","SAP"],"mktValue":["double",9],"sharesOutstanding":["double",8000],"col":["java.util
 .HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",9],"secId":["java.lang.String","DELL"],"mktValue":["double",10],"sharesOutstanding":["double",9000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",7],"secId":["java.lang.String","ORCL"],"mktValue":["double",8],"sharesOutstanding":["double",7000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type0"],"ID":["int",3],"active":["boolean",false],"pk":["java.lang.String","3"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",12],"secId":["java.lang.String","HP"],"mktValue":["double",13],"sharesOutstanding":["double",12000],"col":["java.ut
 il.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",13],"secId":["java.lang.String","SUN"],"mktValue":["double",14],"sharesOutstanding":["double",13000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",10],"secId":["java.lang.String","RHAT"],"mktValue":["double",11],"sharesOutstanding":["double",10000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",11],"secId":["java.lang.String","NOVL"],"mktValue":["double",12],"sharesOutstanding":["double",11000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type1"],"ID":["int",4],"active":["boolean",true],"pk":["java.lang.String","4"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",15],"secId":["java.lang.String","YHOO"],"mktValue":["double",16],"sharesOutstanding":["double",15000],"col":["java
 .util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",16],"secId":["java.lang.String","GOOG"],"mktValue":["double",17],"sharesOutstanding":["double",16000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",14],"secId":["java.lang.String","IBM"],"mktValue":["double",15],"sharesOutstanding":["double",14000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+    
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type2"],"ID":["int",5],"active":["boolean",false],"pk":["java.lang.String","5"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",19],"secId":["java.lang.String","APPL"],"mktValue":["double",20],"sharesOutstanding":["double",19000],"col":["jav
 a.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",20],"secId":["java.lang.String","ORCL"],"mktValue":["double",21],"sharesOutstanding":["double",20000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",17],"secId":["java.lang.String","MSFT"],"mktValue":["double",18],"sharesOutstanding":["double",17000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",18],"secId":["java.lang.String","AOL"],"mktValue":["double",19],"sharesOutstanding":["double",18000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]   
+    ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultClusterWithStruct.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultClusterWithStruct.txt b/pulse/src/main/resources/testQueryResultClusterWithStruct.txt
new file mode 100644
index 0000000..2261286
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultClusterWithStruct.txt
@@ -0,0 +1,10 @@
+{
+    "result":[
+            ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",24],"active":["boolean",true],"pk":["java.lang.String","24"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["
 int",85],"secId":["java.lang.String","ORCL"],"mktValue":["double",86],"sharesOutstanding":["double",85000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",86],"secId":["java.lang.String","SAP"],"mktValue":["double",87],"sharesOutstanding":["double",86000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",84],"secId":["java.lang.String","APPL"],"mktValue":["double",85],"sharesOutstanding":["double",84000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",24],"active":["boolean",true],"pk":["java.lang.String","24"],"collectionHolderMap":["j
 ava.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",85],"secId":["java.lang.String","ORCL"],"mktValue":["double",86],"sharesOutstanding":["double",85000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int"
 ,86],"secId":["java.lang.String","SAP"],"mktValue":["double",87],"sharesOutstanding":["double",86000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",84],"secId":["java.lang.String","APPL"],"mktValue":["double",85],"sharesOutstanding":["double",84000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]}],
+            ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",15],"active":["boolean",false],"pk":["java.lang.String","15"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":[
 "int",54],"secId":["java.lang.String","YHOO"],"mktValue":["double",55],"sharesOutstanding":["double",54000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",55],"secId":["java.lang.String","GOOG"],"mktValue":["double",56],"sharesOutstanding":["double",55000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",52],"secId":["java.lang.String","SUN"],"mktValue":["double",53],"sharesOutstanding":["double",52000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",53],"secId":["java.lang.String","IBM"],"mktValue":["double",54],"sharesOutstanding":["double",53000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":
 ["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",15],"active":["boolean",false],"pk":["java.lang.String","15"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int
 ",54],"secId":["java.lang.String","YHOO"],"mktValue":["double",55],"sharesOutstanding":["double",54000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",55],"secId":["java.lang.String","GOOG"],"mktValue":["double",56],"sharesOutstanding":["double",55000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",52],"secId":["java.lang.String","SUN"],"mktValue":["double",53],"sharesOutstanding":["double",52000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",53],"secId":["java.lang.String","IBM"],"mktValue":["double",54],"sharesOutstanding":["double",53000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["fl
 oat",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]}],
+            ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",7],"active":["boolean",false],"pk":["java.lang.String","7"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["in
 t",27],"secId":["java.lang.String","IBM"],"mktValue":["double",28],"sharesOutstanding":["double",27000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",26],"secId":["java.lang.String","SUN"],"mktValue":["double",27],"sharesOutstanding":["double",26000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",24],"secId":["java.lang.String","NOVL"],"mktValue":["double",25],"sharesOutstanding":["double",24000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",25],"secId":["java.lang.String","HP"],"mktValue":["double",26],"sharesOutstanding":["double",25000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["floa
 t",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",7],"active":["boolean",false],"pk":["java.lang.String","7"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",27],"se
 cId":["java.lang.String","IBM"],"mktValue":["double",28],"sharesOutstanding":["double",27000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",26],"secId":["java.lang.String","SUN"],"mktValue":["double",27],"sharesOutstanding":["double",26000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",24],"secId":["java.lang.String","NOVL"],"mktValue":["double",25],"sharesOutstanding":["double",24000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",25],"secId":["java.lang.String","HP"],"mktValue":["double",26],"sharesOutstanding":["double",25000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.2233
 72E18],"doubleMinValue":["double",4.9E-324]}]}],
+            ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",14],"active":["boolean",true],"pk":["java.lang.String","14"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["
 int",50],"secId":["java.lang.String","NOVL"],"mktValue":["double",51],"sharesOutstanding":["double",50000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",51],"secId":["java.lang.String","HP"],"mktValue":["double",52],"sharesOutstanding":["double",51000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",49],"secId":["java.lang.String","RHAT"],"mktValue":["double",50],"sharesOutstanding":["double",49000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",14],"active":["boolean",true],"pk":["java.lang.String","14"],"collectionHolderMap":["jav
 a.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",50],"secId":["java.lang.String","NOVL"],"mktValue":["double",51],"sharesOutstanding":["double",50000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",51
 ],"secId":["java.lang.String","HP"],"mktValue":["double",52],"sharesOutstanding":["double",51000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",49],"secId":["java.lang.String","RHAT"],"mktValue":["double",50],"sharesOutstanding":["double",49000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]}],
+            ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["i
 nt",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.22
 3372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId":["j
 ava.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMi
 nValue":["double",4.9E-324]}]}],
+            ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",21],"active":["boolean",false],"pk":["java.lang.String","21"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":[
 "int",76],"secId":["java.lang.String","NOVL"],"mktValue":["double",77],"sharesOutstanding":["double",76000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",75],"secId":["java.lang.String","RHAT"],"mktValue":["double",76],"sharesOutstanding":["double",75000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",73],"secId":["java.lang.String","SAP"],"mktValue":["double",74],"sharesOutstanding":["double",73000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",74],"secId":["java.lang.String","DELL"],"mktValue":["double",75],"sharesOutstanding":["double",74000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue"
 :["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",21],"active":["boolean",false],"pk":["java.lang.String","21"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["in
 t",76],"secId":["java.lang.String","NOVL"],"mktValue":["double",77],"sharesOutstanding":["double",76000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",75],"secId":["java.lang.String","RHAT"],"mktValue":["double",76],"sharesOutstanding":["double",75000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",73],"secId":["java.lang.String","SAP"],"mktValue":["double",74],"sharesOutstanding":["double",73000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",74],"secId":["java.lang.String","DELL"],"mktValue":["double",75],"sharesOutstanding":["double",74000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["
 float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]}]
+          ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultHashMap.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultHashMap.txt b/pulse/src/main/resources/testQueryResultHashMap.txt
new file mode 100644
index 0000000..16471b5
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultHashMap.txt
@@ -0,0 +1,8 @@
+{"result":[
+  ["java.util.HashMap",{
+    "3":["java.lang.String","THREE"],
+	"2":["java.lang.String","TWO"],
+	"1":["java.lang.String","ONE"],
+	"4":["java.lang.String","FOUR"]
+  }]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultHashMapSmall.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultHashMapSmall.txt b/pulse/src/main/resources/testQueryResultHashMapSmall.txt
new file mode 100644
index 0000000..9f0b208
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultHashMapSmall.txt
@@ -0,0 +1,12 @@
+{"result":[
+["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","YHOO"],"id":["int",54],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",55],"sharesOutstanding":["double",54000]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","GOOG"],"id":["int",55],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",56],"sharesOutstanding":["double",55000]}]}],
+["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","YHOO"],"id":["int",54],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",55],"sharesOutstanding":["double",54000]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","GOOG"],"id":["int",55],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",56],"sharesOutstanding":["double",55000]}]}],
+["java.util.HashMap",{"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","SAP"],"id":["int",47],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",48],"sharesOutstanding":["double",47000]}],"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","DELL"],"id":["int",48],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",49],"sharesOutstanding":["double",48000]}]}],
+["java.util.HashMap",{"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","SAP"],"id":["int",47],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",48],"sharesOutstanding":["double",47000]}],"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","DELL"],"id":["int",48],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",49],"sharesOutstanding":["double",48000]}]}],
+["java.util.HashMap",{"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","SAP"],"id":["int",47],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",48],"sharesOutstanding":["double",47000]}],"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","DELL"],"id":["int",48],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",49],"sharesOutstanding":["double",48000]}]}],
+["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","YHOO"],"id":["int",93],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",94],"sharesOutstanding":["double",93000]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","IBM"],"id":["int",92],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",93],"sharesOutstanding":["double",92000]}]}],
+["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","YHOO"],"id":["int",93],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",94],"sharesOutstanding":["double",93000]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","IBM"],"id":["int",92],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",93],"sharesOutstanding":["double",92000]}]}],
+["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","YHOO"],"id":["int",93],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",94],"sharesOutstanding":["double",93000]}],"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","IBM"],"id":["int",92],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",93],"sharesOutstanding":["double",92000]}]}],
+["java.util.HashMap",{"DELL":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","DELL"],"id":["int",22],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",23],"sharesOutstanding":["double",22000]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","RHAT"],"id":["int",23],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",24],"sharesOutstanding":["double",23000]}]}],
+["java.util.HashMap",{"MSFT":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","MSFT"],"id":["int",69],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",70],"sharesOutstanding":["double",69000]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"secId":["java.lang.String","GOOG"],"id":["int",68],"col":["java.util.Set",{"1":["java.lang.String","0"],"0":["java.lang.String","1"]}],"mktValue":["double",69],"sharesOutstanding":["double",68000]}]}]
+]}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultSmall.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultSmall.txt b/pulse/src/main/resources/testQueryResultSmall.txt
new file mode 100644
index 0000000..13ab5bf
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultSmall.txt
@@ -0,0 +1,12 @@
+{"result":[
+  {"member":[["java.lang.String","pc68(7930)<v9>:30319"]],
+   "result":[
+    ["com.gemstone.gemfire.cache.query.data.PortfolioDummy",
+     {"type":["java.lang.String","type0"],"ID":["int",0],"active":["boolean",true],"pk":["java.lang.String","0"],"collectionHolderMapDummy":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["10","11","12","13","14"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["20","21","22","23","24"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["30","31","32","33","34"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO"],"mktValue":["double",3],"sharesOutstanding":["double",2000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"IBM":["com.gemstone.gemfire.cache.query.data
 .Position",{"id":["int",1],"secId":["java.lang.String","IBM"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],
+     
+    ["com.gemstone.gemfire.cache.query.data.Portfolio",
+     {"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",true],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN1","IBM1","YHOO1","GOOG1","MSFT1"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN2","IBM2","YHOO2","GOOG2","MSFT2"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["SUN3","IBM3","YHOO3","GOOG3","MSFT3"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",2],"secId":["java.lang.String","YHOO1"],"mktValue":["double",3],"sharesOutstanding":["double",2001],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]
 ]}],"IBM1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",1],"secId":["java.lang.String","IBM1"],"mktValue":["double",2],"sharesOutstanding":["double",1000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",0],"secId":["java.lang.String","SUN"],"mktValue":["double",1],"sharesOutstanding":["double",0],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":null,"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]
+   ]
+  }
+  ]
+}
\ No newline at end of file


[42/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/DataBrowser.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/DataBrowser.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/DataBrowser.java
new file mode 100644
index 0000000..ff715f4
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/DataBrowser.java
@@ -0,0 +1,274 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.Iterator;
+import java.util.ResourceBundle;
+import java.util.Scanner;
+
+import com.vmware.gemfire.tools.pulse.internal.json.JSONArray;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.internal.util.StringUtils;
+
+/**
+ * Class DataBrowser This class contains Data browser functionalities for
+ * managing queries and histories.
+ * 
+ * @author Sachin K
+ * @since version 7.5.Beta 2013-03-25
+ */
+public class DataBrowser {
+
+  private final PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  private final ResourceBundle resourceBundle = Repository.get()
+      .getResourceBundle();
+
+  private final String queryHistoryFile = PulseConstants.PULSE_QUERY_HISTORY_FILE_LOCATION
+      + System.getProperty("file.separator")
+      + PulseConstants.PULSE_QUERY_HISTORY_FILE_NAME;
+
+  private SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
+      PulseConstants.PULSE_QUERY_HISTORY_DATE_PATTERN);
+
+  /**
+   * addQueryInHistory method adds user's query into query history file
+   * 
+   * @param userId
+   *          Logged in User's Id
+   * @param queryText
+   *          Query text to execute
+   */
+  public boolean addQueryInHistory(String queryText, String userId) {
+
+    boolean operationStatus = false;
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(queryText)
+        && StringUtils.isNotNullNotEmptyNotWhiteSpace(userId)) {
+
+      // Fetch all queries from query log file
+      JSONObject queries = fetchAllQueriesFromFile();
+
+      // Get user's query history list
+      JSONObject userQueries = null;
+      try {
+        userQueries = queries.getJSONObject(userId);
+      } catch (JSONException e) {
+        userQueries = new JSONObject();
+      }
+
+      // Add query in user's query history list
+      try {
+        userQueries.put(Long.toString(System.currentTimeMillis()), queryText);
+        queries.put(userId, userQueries);
+      } catch (JSONException e) {
+        if (LOGGER.fineEnabled()) {
+          LOGGER.fine("JSONException Occured while adding user's query : " + e.getMessage());
+        }
+      }
+
+      // Store queries in file back
+      operationStatus = storeQueriesInFile(queries);
+
+    }
+
+    return operationStatus;
+  }
+
+  /**
+   * deleteQueryById method deletes query from query history file
+   * 
+   * @param userId
+   *          Logged in user's Unique Id
+   * @param queryId
+   *          Unique Id of Query to be deleted
+   * @return boolean
+   */
+  public boolean deleteQueryById(String userId, String queryId) {
+
+    boolean operationStatus = false;
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(queryId)
+        && StringUtils.isNotNullNotEmptyNotWhiteSpace(userId)) {
+
+      // Fetch all queries from query log file
+      JSONObject queries = fetchAllQueriesFromFile();
+
+      // Get user's query history list
+      JSONObject userQueries = null;
+      try {
+        userQueries = queries.getJSONObject(userId);
+      } catch (JSONException e) {
+        userQueries = new JSONObject();
+      }
+
+      // Remove user's query
+      try {
+        userQueries.remove(queryId);
+        queries.put(userId, userQueries);
+      } catch (JSONException e) {
+        if (LOGGER.fineEnabled()) {
+          LOGGER.fine("JSONException Occured while deleting user's query : " + e.getMessage());
+        }
+      }
+
+      // Store queries in file back
+      operationStatus = storeQueriesInFile(queries);
+
+    }
+    
+    return operationStatus;
+  }
+
+  /**
+   * getQueryHistoryByUserId method reads and lists out the queries from history
+   * file
+   * 
+   * @param userId
+   *          Logged in User's Id
+   * @throws JSONException
+   */
+  public JSONArray getQueryHistoryByUserId(String userId) {
+
+    JSONArray queryList = new JSONArray();
+
+    if (StringUtils.isNotNullNotEmptyNotWhiteSpace(userId)) {
+
+      // Fetch all queries from query log file
+      JSONObject queries = fetchAllQueriesFromFile();
+      
+      // Get user's query history list
+      JSONObject userQueries = null;
+      try {
+        userQueries = queries.getJSONObject(userId);
+      } catch (JSONException e) {
+        userQueries = new JSONObject();
+      }
+
+      try {
+        Iterator<?> it = userQueries.keys();
+        while (it.hasNext()) {
+          String key = (String) it.next();
+          JSONObject queryItem = new JSONObject();
+          queryItem.put("queryId", key);
+          queryItem.put("queryText", userQueries.get(key).toString());
+          queryItem.put("queryDateTime",
+              simpleDateFormat.format(Long.valueOf(key)));
+          queryList.put(queryItem);
+        }
+      } catch (JSONException e) {
+        if (LOGGER.fineEnabled()) {
+          LOGGER.fine("JSONException Occured: " + e.getMessage());
+        }
+      }
+    }
+
+    return queryList;
+  }
+
+  /**
+   * generateQueryKey method fetches queries from query history file
+   * 
+   * @return Properties A collection queries in form of key and values
+   */
+  private JSONObject fetchAllQueriesFromFile() {
+    InputStream inputStream = null;
+    JSONObject queriesJSON = new JSONObject();
+
+    try {
+      inputStream = new FileInputStream(queryHistoryFile);
+      String inputStreamString = new Scanner(inputStream, "UTF-8")
+          .useDelimiter("\\A").next();
+      queriesJSON = new JSONObject(inputStreamString);
+    } catch (FileNotFoundException e) {
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine(resourceBundle
+            .getString("LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_NOT_FOUND")
+            + " : " + e.getMessage());
+      }
+    } catch (Exception e) {
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(e.getMessage());
+      }
+    } finally {
+      // Close input stream
+      if (inputStream != null) {
+        try {
+          inputStream.close();
+        } catch (IOException e) {
+          if (LOGGER.infoEnabled()) {
+            LOGGER.info(e.getMessage());
+          }
+        }
+      }
+    }
+
+    return queriesJSON;
+  }
+
+  /**
+   * generateQueryKey method stores queries in query history file.
+   * 
+   * @return Boolean true is operation is successful, false otherwise
+   * @param properties
+   *          a collection queries in form of key and values
+   */
+  private boolean storeQueriesInFile(JSONObject queries) {
+    boolean operationStatus = false;
+    FileOutputStream fileOut = null;
+
+    File file = new File(queryHistoryFile);
+    try {
+      fileOut = new FileOutputStream(file);
+
+      // if file does not exists, then create it
+      if (!file.exists()) {
+        file.createNewFile();
+      }
+
+      // get the content in bytes
+      byte[] contentInBytes = queries.toString().getBytes();
+
+      fileOut.write(contentInBytes);
+      fileOut.flush();
+
+      operationStatus = true;
+    } catch (FileNotFoundException e) {
+
+      if (LOGGER.fineEnabled()) {
+        LOGGER.fine(resourceBundle
+            .getString("LOG_MSG_DATA_BROWSER_QUERY_HISTORY_FILE_NOT_FOUND")
+            + " : " + e.getMessage());
+      }
+    } catch (IOException e) {
+      if (LOGGER.infoEnabled()) {
+        LOGGER.info(e.getMessage());
+      }
+    } finally {
+      if (fileOut != null) {
+        try {
+          fileOut.close();
+        } catch (IOException e) {
+          if (LOGGER.infoEnabled()) {
+            LOGGER.info(e.getMessage());
+          }
+        }
+      }
+    }
+    return operationStatus;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/IClusterUpdater.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/IClusterUpdater.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/IClusterUpdater.java
new file mode 100644
index 0000000..cbbaedc
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/data/IClusterUpdater.java
@@ -0,0 +1,27 @@
+/*
+ * =========================================================================
+ *  Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ *  This product is protected by U.S. and international copyright
+ *  and intellectual property laws. Pivotal products are covered by
+ *  more patents listed at http://www.pivotal.io/patents.
+ * ========================================================================
+ */
+
+package com.vmware.gemfire.tools.pulse.internal.data;
+
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+
+/**
+ * Interface having updateData() function which is getting Override by both
+ * MockDataUpdater and JMXDataUpdater
+ * 
+ * @author Anand Hariharan
+ * @since  version 7.0.Beta 2012-09-23 
+ * 
+ */
+public interface IClusterUpdater {
+  public boolean updateData();
+
+  public JSONObject executeQuery(String queryText, String members, int limit) throws JSONException;
+}


[14/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.tablednd.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.tablednd.js b/pulse/src/main/webapp/scripts/lib/jquery.tablednd.js
new file mode 100644
index 0000000..8e86f2f
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.tablednd.js
@@ -0,0 +1,383 @@
+/**
+ * TableDnD plug-in for JQuery, allows you to drag and drop table rows
+ * You can set up various options to control how the system will work
+ * Copyright (c) Denis Howlett <de...@isocra.com>
+ * Licensed like jQuery, see http://docs.jquery.com/License.
+ *
+ * Configuration options:
+ * 
+ * onDragStyle
+ *     This is the style that is assigned to the row during drag. There are limitations to the styles that can be
+ *     associated with a row (such as you can't assign a border--well you can, but it won't be
+ *     displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as
+ *     a map (as used in the jQuery css(...) function).
+ * onDropStyle
+ *     This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations
+ *     to what you can do. Also this replaces the original style, so again consider using onDragClass which
+ *     is simply added and then removed on drop.
+ * onDragClass
+ *     This class is added for the duration of the drag and then removed when the row is dropped. It is more
+ *     flexible than using onDragStyle since it can be inherited by the row cells and other content. The default
+ *     is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your
+ *     stylesheet.
+ * onDrop
+ *     Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table
+ *     and the row that was dropped. You can work out the new order of the rows by using
+ *     table.rows.
+ * onDragStart
+ *     Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the
+ *     table and the row which the user has started to drag.
+ * onAllowDrop
+ *     Pass a function that will be called as a row is over another row. If the function returns true, allow 
+ *     dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under
+ *     the cursor. It returns a boolean: true allows the drop, false doesn't allow it.
+ * scrollAmount
+ *     This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the
+ *     window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2,
+ *     FF3 beta
+ * dragHandle
+ *     This is the name of a class that you assign to one or more cells in each row that is draggable. If you
+ *     specify this class, then you are responsible for setting cursor: move in the CSS and only these cells
+ *     will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where
+ *     the whole row is draggable.
+ * 
+ * Other ways to control behaviour:
+ *
+ * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows
+ * that you don't want to be draggable.
+ *
+ * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form
+ * <tableID>[]=<rowID1>&<tableID>[]=<rowID2> so that you can send this back to the server. The table must have
+ * an ID as must all the rows.
+ *
+ * Other methods:
+ *
+ * $("...").tableDnDUpdate() 
+ * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells).
+ * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again.
+ * The table maintains the original configuration (so you don't have to specify it again).
+ *
+ * $("...").tableDnDSerialize()
+ * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be
+ * called from anywhere and isn't dependent on the currentTable being set up correctly before calling
+ *
+ * Known problems:
+ * - Auto-scoll has some problems with IE7  (it scrolls even when it shouldn't), work-around: set scrollAmount to 0
+ * 
+ * Version 0.2: 2008-02-20 First public version
+ * Version 0.3: 2008-02-07 Added onDragStart option
+ *                         Made the scroll amount configurable (default is 5 as before)
+ * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes
+ *                         Added onAllowDrop to control dropping
+ *                         Fixed a bug which meant that you couldn't set the scroll amount in both directions
+ *                         Added serialize method
+ * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row
+ *                         draggable
+ *                         Improved the serialize method to use a default (and settable) regular expression.
+ *                         Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table
+ */
+jQuery.tableDnD = {
+    /** Keep hold of the current table being dragged */
+    currentTable : null,
+    /** Keep hold of the current drag object if any */
+    dragObject: null,
+    /** The current mouse offset */
+    mouseOffset: null,
+    /** Remember the old value of Y so that we don't do too much processing */
+    oldY: 0,
+
+    /** Actually build the structure */
+    build: function(options) {
+        // Set up the defaults if any
+
+        this.each(function() {
+            // This is bound to each matching table, set up the defaults and override with user options
+            this.tableDnDConfig = jQuery.extend({
+                onDragStyle: null,
+                onDropStyle: null,
+				// Add in the default class for whileDragging
+				onDragClass: "tDnD_whileDrag",
+                onDrop: null,
+                onDragStart: null,
+                scrollAmount: 5,
+				serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs
+				serializeParamName: null, // If you want to specify another parameter name instead of the table ID
+                dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable
+            }, options || {});
+            // Now make the rows draggable
+            jQuery.tableDnD.makeDraggable(this);
+        });
+
+        // Now we need to capture the mouse up and mouse move event
+        // We can use bind so that we don't interfere with other event handlers
+        jQuery(document)
+            .bind('mousemove', jQuery.tableDnD.mousemove)
+            .bind('mouseup', jQuery.tableDnD.mouseup);
+
+        // Don't break the chain
+        return this;
+    },
+
+    /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */
+    makeDraggable: function(table) {
+        var config = table.tableDnDConfig;
+		if (table.tableDnDConfig.dragHandle) {
+			// We only need to add the event to the specified cells
+			var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table);
+			cells.each(function() {
+				// The cell is bound to "this"
+                jQuery(this).mousedown(function(ev) {
+                    jQuery.tableDnD.dragObject = this.parentNode;
+                    jQuery.tableDnD.currentTable = table;
+                    jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
+                    if (config.onDragStart) {
+                        // Call the onDrop method if there is one
+                        config.onDragStart(table, this);
+                    }
+                    return false;
+                });
+			})
+		} else {
+			// For backwards compatibility, we add the event to the whole row
+	        var rows = jQuery("tr", table); // get all the rows as a wrapped set
+	        rows.each(function() {
+				// Iterate through each row, the row is bound to "this"
+				var row = jQuery(this);
+				if (! row.hasClass("nodrag")) {
+	                row.mousedown(function(ev) {
+	                    if (ev.target.tagName == "TD") {
+	                        jQuery.tableDnD.dragObject = this;
+	                        jQuery.tableDnD.currentTable = table;
+	                        jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev);
+	                        if (config.onDragStart) {
+	                            // Call the onDrop method if there is one
+	                            config.onDragStart(table, this);
+	                        }
+	                        return false;
+	                    }
+	                }).css("cursor", "move"); // Store the tableDnD object
+				}
+			});
+		}
+	},
+
+	updateTables: function() {
+		this.each(function() {
+			// this is now bound to each matching table
+			if (this.tableDnDConfig) {
+				jQuery.tableDnD.makeDraggable(this);
+			}
+		})
+	},
+
+    /** Get the mouse coordinates from the event (allowing for browser differences) */
+    mouseCoords: function(ev){
+        if(ev.pageX || ev.pageY){
+            return {x:ev.pageX, y:ev.pageY};
+        }
+        return {
+            x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
+            y:ev.clientY + document.body.scrollTop  - document.body.clientTop
+        };
+    },
+
+    /** Given a target element and a mouse event, get the mouse offset from that element.
+        To do this we need the element's position and the mouse position */
+    getMouseOffset: function(target, ev) {
+        ev = ev || window.event;
+
+        var docPos    = this.getPosition(target);
+        var mousePos  = this.mouseCoords(ev);
+        return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y};
+    },
+
+    /** Get the position of an element by going up the DOM tree and adding up all the offsets */
+    getPosition: function(e){
+        var left = 0;
+        var top  = 0;
+        /** Safari fix -- thanks to Luis Chato for this! */
+        if (e.offsetHeight == 0) {
+            /** Safari 2 doesn't correctly grab the offsetTop of a table row
+            this is detailed here:
+            http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/
+            the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild.
+            note that firefox will return a text node as a first child, so designing a more thorough
+            solution may need to take that into account, for now this seems to work in firefox, safari, ie */
+            e = e.firstChild; // a table cell
+        }
+		if (e && e.offsetParent) {
+        	while (e.offsetParent){
+            	left += e.offsetLeft;
+            	top  += e.offsetTop;
+            	e     = e.offsetParent;
+        	}
+
+        	left += e.offsetLeft;
+        	top  += e.offsetTop;
+        }
+
+        return {x:left, y:top};
+    },
+
+    mousemove: function(ev) {
+        if (jQuery.tableDnD.dragObject == null) {
+            return;
+        }
+
+        var dragObj = jQuery(jQuery.tableDnD.dragObject);
+        var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+        var mousePos = jQuery.tableDnD.mouseCoords(ev);
+        var y = mousePos.y - jQuery.tableDnD.mouseOffset.y;
+        //auto scroll the window
+	    var yOffset = window.pageYOffset;
+	 	if (document.all) {
+	        // Windows version
+	        //yOffset=document.body.scrollTop;
+	        if (typeof document.compatMode != 'undefined' &&
+	             document.compatMode != 'BackCompat') {
+	           yOffset = document.documentElement.scrollTop;
+	        }
+	        else if (typeof document.body != 'undefined') {
+	           yOffset=document.body.scrollTop;
+	        }
+
+	    }
+		    
+		if (mousePos.y-yOffset < config.scrollAmount) {
+	    	window.scrollBy(0, -config.scrollAmount);
+	    } else {
+            var windowHeight = window.innerHeight ? window.innerHeight
+                    : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight;
+            if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) {
+                window.scrollBy(0, config.scrollAmount);
+            }
+        }
+
+
+        if (y != jQuery.tableDnD.oldY) {
+            // work out if we're going up or down...
+            var movingDown = y > jQuery.tableDnD.oldY;
+            // update the old value
+            jQuery.tableDnD.oldY = y;
+            // update the style to show we're dragging
+			if (config.onDragClass) {
+				dragObj.addClass(config.onDragClass);
+			} else {
+	            dragObj.css(config.onDragStyle);
+			}
+            // If we're over a row then move the dragged row to there so that the user sees the
+            // effect dynamically
+            var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y);
+            if (currentRow) {
+                // TODO worry about what happens when there are multiple TBODIES
+                if (movingDown && jQuery.tableDnD.dragObject != currentRow) {
+                    jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling);
+                } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) {
+                    jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow);
+                }
+            }
+        }
+
+        return false;
+    },
+
+    /** We're only worried about the y position really, because we can only move rows up and down */
+    findDropTargetRow: function(draggedRow, y) {
+        var rows = jQuery.tableDnD.currentTable.rows;
+        for (var i=0; i<rows.length; i++) {
+            var row = rows[i];
+            var rowY    = this.getPosition(row).y;
+            var rowHeight = parseInt(row.offsetHeight)/2;
+            if (row.offsetHeight == 0) {
+                rowY = this.getPosition(row.firstChild).y;
+                rowHeight = parseInt(row.firstChild.offsetHeight)/2;
+            }
+            // Because we always have to insert before, we need to offset the height a bit
+            if ((y > rowY - rowHeight) && (y < (rowY + rowHeight))) {
+                // that's the row we're over
+				// If it's the same as the current row, ignore it
+				if (row == draggedRow) {return null;}
+                var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+                if (config.onAllowDrop) {
+                    if (config.onAllowDrop(draggedRow, row)) {
+                        return row;
+                    } else {
+                        return null;
+                    }
+                } else {
+					// If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic)
+                    var nodrop = jQuery(row).hasClass("nodrop");
+                    if (! nodrop) {
+                        return row;
+                    } else {
+                        return null;
+                    }
+                }
+                return row;
+            }
+        }
+        return null;
+    },
+
+    mouseup: function(e) {
+        if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) {
+            var droppedRow = jQuery.tableDnD.dragObject;
+            var config = jQuery.tableDnD.currentTable.tableDnDConfig;
+            // If we have a dragObject, then we need to release it,
+            // The row will already have been moved to the right place so we just reset stuff
+			if (config.onDragClass) {
+	            jQuery(droppedRow).removeClass(config.onDragClass);
+			} else {
+	            jQuery(droppedRow).css(config.onDropStyle);
+			}
+            jQuery.tableDnD.dragObject   = null;
+            if (config.onDrop) {
+                // Call the onDrop method if there is one
+                config.onDrop(jQuery.tableDnD.currentTable, droppedRow);
+            }
+            jQuery.tableDnD.currentTable = null; // let go of the table too
+        }
+    },
+
+    serialize: function() {
+        if (jQuery.tableDnD.currentTable) {
+            return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable);
+        } else {
+            return "Error: No Table id set, you need to set an id on your table and every row";
+        }
+    },
+
+	serializeTable: function(table) {
+        var result = "";
+        var tableId = table.id;
+        var rows = table.rows;
+        for (var i=0; i<rows.length; i++) {
+            if (result.length > 0) result += "&";
+            var rowId = rows[i].id;
+            if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) {
+                rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
+            }
+
+            result += tableId + '[]=' + rowId;
+        }
+        return result;
+	},
+
+	serializeTables: function() {
+        var result = "";
+        this.each(function() {
+			// this is now bound to each matching table
+			result += jQuery.tableDnD.serializeTable(this);
+		});
+        return result;
+    }
+
+}
+
+jQuery.fn.extend(
+	{
+		tableDnD : jQuery.tableDnD.build,
+		tableDnDUpdate : jQuery.tableDnD.updateTables,
+		tableDnDSerialize: jQuery.tableDnD.serializeTables
+	}
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.timeago.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.timeago.js b/pulse/src/main/webapp/scripts/lib/jquery.timeago.js
new file mode 100644
index 0000000..4d58026
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.timeago.js
@@ -0,0 +1,193 @@
+/**
+ * Timeago is a jQuery plugin that makes it easy to support automatically
+ * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
+ *
+ * @name timeago
+ * @version 1.3.0
+ * @requires jQuery v1.2.3+
+ * @author Ryan McGeary
+ * @license MIT License - http://www.opensource.org/licenses/mit-license.php
+ *
+ * For usage and examples, visit:
+ * http://timeago.yarp.com/
+ *
+ * Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
+ */
+
+(function (factory) {
+  if (typeof define === 'function' && define.amd) {
+    // AMD. Register as an anonymous module.
+    define(['jquery'], factory);
+  } else {
+    // Browser globals
+    factory(jQuery);
+  }
+}(function ($) {
+  $.timeago = function(timestamp) {
+    if (timestamp instanceof Date) {
+      return inWords(timestamp);
+    } else if (typeof timestamp === "string") {
+      return inWords($.timeago.parse(timestamp));
+    } else if (typeof timestamp === "number") {
+      return inWords(new Date(timestamp));
+    } else {
+      return inWords($.timeago.datetime(timestamp));
+    }
+  };
+  var $t = $.timeago;
+
+  $.extend($.timeago, {
+    settings: {
+      refreshMillis: 60000,
+      allowFuture: false,
+      localeTitle: false,
+      cutoff: 0,
+      strings: {
+        prefixAgo: null,
+        prefixFromNow: null,
+        suffixAgo: "ago",
+        suffixFromNow: "from now",
+        seconds: "less than a minute",
+        minute: "about a minute",
+        minutes: "%d minutes",
+        hour: "about an hour",
+        hours: "about %d hours",
+        day: "a day",
+        days: "%d days",
+        month: "about a month",
+        months: "%d months",
+        year: "about a year",
+        years: "%d years",
+        wordSeparator: " ",
+        numbers: []
+      }
+    },
+    inWords: function(distanceMillis) {
+      var $l = this.settings.strings;
+      var prefix = $l.prefixAgo;
+      var suffix = $l.suffixAgo;
+      if (this.settings.allowFuture) {
+        if (distanceMillis < 0) {
+          prefix = $l.prefixFromNow;
+          suffix = $l.suffixFromNow;
+        }
+      }
+
+      var seconds = Math.abs(distanceMillis) / 1000;
+      var minutes = seconds / 60;
+      var hours = minutes / 60;
+      var days = hours / 24;
+      var years = days / 365;
+
+      function substitute(stringOrFunction, number) {
+        var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction;
+        var value = ($l.numbers && $l.numbers[number]) || number;
+        return string.replace(/%d/i, value);
+      }
+
+      var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
+        seconds < 90 && substitute($l.minute, 1) ||
+        minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
+        minutes < 90 && substitute($l.hour, 1) ||
+        hours < 24 && substitute($l.hours, Math.round(hours)) ||
+        hours < 42 && substitute($l.day, 1) ||
+        days < 30 && substitute($l.days, Math.round(days)) ||
+        days < 45 && substitute($l.month, 1) ||
+        days < 365 && substitute($l.months, Math.round(days / 30)) ||
+        years < 1.5 && substitute($l.year, 1) ||
+        substitute($l.years, Math.round(years));
+
+      var separator = $l.wordSeparator || "";
+      if ($l.wordSeparator === undefined) { separator = " "; }
+      return $.trim([prefix, words, suffix].join(separator));
+    },
+    parse: function(iso8601) {
+      var s = $.trim(iso8601);
+      s = s.replace(/\.\d+/,""); // remove milliseconds
+      s = s.replace(/-/,"/").replace(/-/,"/");
+      s = s.replace(/T/," ").replace(/Z/," UTC");
+      s = s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"); // -04:00 -> -0400
+      return new Date(s);
+    },
+    datetime: function(elem) {
+      var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title");
+      return $t.parse(iso8601);
+    },
+    isTime: function(elem) {
+      // jQuery's `is()` doesn't play well with HTML5 in IE
+      return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time");
+    }
+  });
+
+  // functions that can be called via $(el).timeago('action')
+  // init is default when no action is given
+  // functions are called with context of a single element
+  var functions = {
+    init: function(){
+      var refresh_el = $.proxy(refresh, this);
+      refresh_el();
+      var $s = $t.settings;
+      if ($s.refreshMillis > 0) {
+        setInterval(refresh_el, $s.refreshMillis);
+      }
+    },
+    update: function(time){
+      $(this).data('timeago', { datetime: $t.parse(time) });
+      refresh.apply(this);
+    },
+    updateFromDOM: function(){
+      $(this).data('timeago', { datetime: $t.parse( $t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title") ) });
+      refresh.apply(this);
+    }
+  };
+
+  $.fn.timeago = function(action, options) {
+    var fn = action ? functions[action] : functions.init;
+    if(!fn){
+      throw new Error("Unknown function name '"+ action +"' for timeago");
+    }
+    // each over objects here and call the requested function
+    this.each(function(){
+      fn.call(this, options);
+    });
+    return this;
+  };
+
+  function refresh() {
+    var data = prepareData(this);
+    var $s = $t.settings;
+
+    if (!isNaN(data.datetime)) {
+      if ( $s.cutoff == 0 || distance(data.datetime) < $s.cutoff) {
+        $(this).text(inWords(data.datetime));
+      }
+    }
+    return this;
+  }
+
+  function prepareData(element) {
+    element = $(element);
+    if (!element.data("timeago")) {
+      element.data("timeago", { datetime: $t.datetime(element) });
+      var text = $.trim(element.text());
+      if ($t.settings.localeTitle) {
+        element.attr("title", element.data('timeago').datetime.toLocaleString());
+      } else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
+        element.attr("title", text);
+      }
+    }
+    return element.data("timeago");
+  }
+
+  function inWords(date) {
+    return $t.inWords(distance(date));
+  }
+
+  function distance(date) {
+    return (new Date().getTime() - date.getTime());
+  }
+
+  // fix for IE6 suckage
+  document.createElement("abbr");
+  document.createElement("time");
+}));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/jquery.ztree.core-3.5.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/jquery.ztree.core-3.5.js b/pulse/src/main/webapp/scripts/lib/jquery.ztree.core-3.5.js
new file mode 100644
index 0000000..493d173
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/jquery.ztree.core-3.5.js
@@ -0,0 +1,1650 @@
+/*
+ * JQuery zTree core 3.5.02
+ * http://zTree.me/
+ *
+ * Copyright (c) 2010 Hunter.z
+ *
+ * Licensed same as jquery - MIT License
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * email: hunter.z@263.net
+ * Date: 2013-01-28
+ */
+(function($){
+	var settings = {}, roots = {}, caches = {},
+	//default consts of core
+	_consts = {
+		event: {
+			NODECREATED: "ztree_nodeCreated",
+			CLICK: "ztree_click",
+			EXPAND: "ztree_expand",
+			COLLAPSE: "ztree_collapse",
+			ASYNC_SUCCESS: "ztree_async_success",
+			ASYNC_ERROR: "ztree_async_error"
+		},
+		id: {
+			A: "_a",
+			ICON: "_ico",
+			SPAN: "_span",
+			SWITCH: "_switch",
+			UL: "_ul"
+		},
+		line: {
+			ROOT: "root",
+			ROOTS: "roots",
+			CENTER: "center",
+			BOTTOM: "bottom",
+			NOLINE: "noline",
+			LINE: "line"
+		},
+		folder: {
+			OPEN: "open",
+			CLOSE: "close",
+			DOCU: "docu"
+		},
+		node: {
+			CURSELECTED: ""
+		}
+	},
+	//default setting of core
+	_setting = {
+		treeId: "",
+		treeObj: null,
+		view: {
+			addDiyDom: null,
+			autoCancelSelected: true,
+			dblClickExpand: true,
+			expandSpeed: "fast",
+			fontCss: {},
+			nameIsHTML: false,
+			selectedMulti: true,
+			showIcon: true,
+			showLine: true,
+			showTitle: true
+		},
+		data: {
+			key: {
+				children: "children",
+				name: "name",
+				title: "",
+				url: "url"
+			},
+			simpleData: {
+				enable: false,
+				idKey: "id",
+				pIdKey: "pId",
+				rootPId: null
+			},
+			keep: {
+				parent: false,
+				leaf: false
+			}
+		},
+		async: {
+			enable: false,
+			contentType: "application/x-www-form-urlencoded",
+			type: "post",
+			dataType: "text",
+			url: "",
+			autoParam: [],
+			otherParam: [],
+			dataFilter: null
+		},
+		callback: {
+			beforeAsync:null,
+			beforeClick:null,
+			beforeDblClick:null,
+			beforeRightClick:null,
+			beforeMouseDown:null,
+			beforeMouseUp:null,
+			beforeExpand:null,
+			beforeCollapse:null,
+			beforeRemove:null,
+
+			onAsyncError:null,
+			onAsyncSuccess:null,
+			onNodeCreated:null,
+			onClick:null,
+			onDblClick:null,
+			onRightClick:null,
+			onMouseDown:null,
+			onMouseUp:null,
+			onExpand:null,
+			onCollapse:null,
+			onRemove:null
+		}
+	},
+	//default root of core
+	//zTree use root to save full data
+	_initRoot = function (setting) {
+		var r = data.getRoot(setting);
+		if (!r) {
+			r = {};
+			data.setRoot(setting, r);
+		}
+		r[setting.data.key.children] = [];
+		r.expandTriggerFlag = false;
+		r.curSelectedList = [];
+		r.noSelection = true;
+		r.createdNodes = [];
+		r.zId = 0;
+		r._ver = (new Date()).getTime();
+	},
+	//default cache of core
+	_initCache = function(setting) {
+		var c = data.getCache(setting);
+		if (!c) {
+			c = {};
+			data.setCache(setting, c);
+		}
+		c.nodes = [];
+		c.doms = [];
+	},
+	//default bindEvent of core
+	_bindEvent = function(setting) {
+		var o = setting.treeObj,
+		c = consts.event;
+		o.bind(c.NODECREATED, function (event, treeId, node) {
+			tools.apply(setting.callback.onNodeCreated, [event, treeId, node]);
+		});
+
+		o.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {
+			tools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);
+		});
+
+		o.bind(c.EXPAND, function (event, treeId, node) {
+			tools.apply(setting.callback.onExpand, [event, treeId, node]);
+		});
+
+		o.bind(c.COLLAPSE, function (event, treeId, node) {
+			tools.apply(setting.callback.onCollapse, [event, treeId, node]);
+		});
+
+		o.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {
+			tools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);
+		});
+
+		o.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {
+			tools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+		});
+	},
+	_unbindEvent = function(setting) {
+		var o = setting.treeObj,
+		c = consts.event;
+		o.unbind(c.NODECREATED)
+		.unbind(c.CLICK)
+		.unbind(c.EXPAND)
+		.unbind(c.COLLAPSE)
+		.unbind(c.ASYNC_SUCCESS)
+		.unbind(c.ASYNC_ERROR);
+	},	
+	//default event proxy of core
+	_eventProxy = function(event) {
+		var target = event.target,
+		setting = data.getSetting(event.data.treeId),
+		tId = "", node = null,
+		nodeEventType = "", treeEventType = "",
+		nodeEventCallback = null, treeEventCallback = null,
+		tmp = null;
+
+		if (tools.eqs(event.type, "mousedown")) {
+			treeEventType = "mousedown";
+		} else if (tools.eqs(event.type, "mouseup")) {
+			treeEventType = "mouseup";
+		} else if (tools.eqs(event.type, "contextmenu")) {
+			treeEventType = "contextmenu";
+		} else if (tools.eqs(event.type, "click")) {
+			if (tools.eqs(target.tagName, "span") && target.getAttribute("treeNode"+ consts.id.SWITCH) !== null) {
+				tId = ($(target).parent("li").get(0) || $(target).parentsUntil("li").parent().get(0)).id;
+				nodeEventType = "switchNode";
+			} else {
+				tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+				if (tmp) {
+					tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;
+					nodeEventType = "clickNode";
+				}
+			}
+		} else if (tools.eqs(event.type, "dblclick")) {
+			treeEventType = "dblclick";
+			tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+			if (tmp) {
+				tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;
+				nodeEventType = "switchNode";
+			}
+		}
+		if (treeEventType.length > 0 && tId.length == 0) {
+			tmp = tools.getMDom(setting, target, [{tagName:"a", attrName:"treeNode"+consts.id.A}]);
+			if (tmp) {tId = ($(tmp).parent("li").get(0) || $(tmp).parentsUntil("li").parent().get(0)).id;}
+		}
+		// event to node
+		if (tId.length>0) {
+			node = data.getNodeCache(setting, tId);
+			switch (nodeEventType) {
+				case "switchNode" :
+					if (!node.isParent) {
+						nodeEventType = "";
+					} else if (tools.eqs(event.type, "click") 
+						|| (tools.eqs(event.type, "dblclick") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {
+						nodeEventCallback = handler.onSwitchNode;
+					} else {
+						nodeEventType = "";
+					}
+					break;
+				case "clickNode" :
+					nodeEventCallback = handler.onClickNode;
+					break;
+			}
+		}
+		// event to zTree
+		switch (treeEventType) {
+			case "mousedown" :
+				treeEventCallback = handler.onZTreeMousedown;
+				break;
+			case "mouseup" :
+				treeEventCallback = handler.onZTreeMouseup;
+				break;
+			case "dblclick" :
+				treeEventCallback = handler.onZTreeDblclick;
+				break;
+			case "contextmenu" :
+				treeEventCallback = handler.onZTreeContextmenu;
+				break;
+		}
+		var proxyResult = {
+			stop: false,
+			node: node,
+			nodeEventType: nodeEventType,
+			nodeEventCallback: nodeEventCallback,
+			treeEventType: treeEventType,
+			treeEventCallback: treeEventCallback
+		};
+		return proxyResult
+	},
+	//default init node of core
+	_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {
+		if (!n) return;
+		var r = data.getRoot(setting),
+		childKey = setting.data.key.children;
+		n.level = level;
+		n.tId = setting.treeId + "_" + (++r.zId);
+		n.parentTId = parentNode ? parentNode.tId : null;
+		if (n[childKey] && n[childKey].length > 0) {
+			if (typeof n.open == "string") n.open = tools.eqs(n.open, "true");
+			n.open = !!n.open;
+			n.isParent = true;
+			n.zAsync = true;
+		} else {
+			n.open = false;
+			if (typeof n.isParent == "string") n.isParent = tools.eqs(n.isParent, "true");
+			n.isParent = !!n.isParent;
+			n.zAsync = !n.isParent;
+		}
+		n.isFirstNode = isFirstNode;
+		n.isLastNode = isLastNode;
+		n.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};
+		n.getPreNode = function() {return data.getPreNode(setting, n);};
+		n.getNextNode = function() {return data.getNextNode(setting, n);};
+		n.isAjaxing = false;
+		data.fixPIdKeyValue(setting, n);
+	},
+	_init = {
+		bind: [_bindEvent],
+		unbind: [_unbindEvent],
+		caches: [_initCache],
+		nodes: [_initNode],
+		proxys: [_eventProxy],
+		roots: [_initRoot],
+		beforeA: [],
+		afterA: [],
+		innerBeforeA: [],
+		innerAfterA: [],
+		zTreeTools: []
+	},
+	//method of operate data
+	data = {
+		addNodeCache: function(setting, node) {
+			data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node;
+		},
+		getNodeCacheId: function(tId) {
+			return tId.substring(tId.lastIndexOf("_")+1);
+		},
+		addAfterA: function(afterA) {
+			_init.afterA.push(afterA);
+		},
+		addBeforeA: function(beforeA) {
+			_init.beforeA.push(beforeA);
+		},
+		addInnerAfterA: function(innerAfterA) {
+			_init.innerAfterA.push(innerAfterA);
+		},
+		addInnerBeforeA: function(innerBeforeA) {
+			_init.innerBeforeA.push(innerBeforeA);
+		},
+		addInitBind: function(bindEvent) {
+			_init.bind.push(bindEvent);
+		},
+		addInitUnBind: function(unbindEvent) {
+			_init.unbind.push(unbindEvent);
+		},
+		addInitCache: function(initCache) {
+			_init.caches.push(initCache);
+		},
+		addInitNode: function(initNode) {
+			_init.nodes.push(initNode);
+		},
+		addInitProxy: function(initProxy) {
+			_init.proxys.push(initProxy);
+		},
+		addInitRoot: function(initRoot) {
+			_init.roots.push(initRoot);
+		},
+		addNodesData: function(setting, parentNode, nodes) {
+			var childKey = setting.data.key.children;
+			if (!parentNode[childKey]) parentNode[childKey] = [];
+			if (parentNode[childKey].length > 0) {
+				parentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;
+				view.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);
+			}
+			parentNode.isParent = true;
+			parentNode[childKey] = parentNode[childKey].concat(nodes);
+		},
+		addSelectedNode: function(setting, node) {
+			var root = data.getRoot(setting);
+			if (!data.isSelectedNode(setting, node)) {
+				root.curSelectedList.push(node);
+			}
+		},
+		addCreatedNode: function(setting, node) {
+			if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+				var root = data.getRoot(setting);
+				root.createdNodes.push(node);
+			}
+		},
+		addZTreeTools: function(zTreeTools) {
+			_init.zTreeTools.push(zTreeTools);
+		},
+		exSetting: function(s) {
+			$.extend(true, _setting, s);
+		},
+		fixPIdKeyValue: function(setting, node) {
+			if (setting.data.simpleData.enable) {
+				node[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;
+			}
+		},
+		getAfterA: function(setting, node, array) {
+			for (var i=0, j=_init.afterA.length; i<j; i++) {
+				_init.afterA[i].apply(this, arguments);
+			}
+		},
+		getBeforeA: function(setting, node, array) {
+			for (var i=0, j=_init.beforeA.length; i<j; i++) {
+				_init.beforeA[i].apply(this, arguments);
+			}
+		},
+		getInnerAfterA: function(setting, node, array) {
+			for (var i=0, j=_init.innerAfterA.length; i<j; i++) {
+				_init.innerAfterA[i].apply(this, arguments);
+			}
+		},
+		getInnerBeforeA: function(setting, node, array) {
+			for (var i=0, j=_init.innerBeforeA.length; i<j; i++) {
+				_init.innerBeforeA[i].apply(this, arguments);
+			}
+		},
+		getCache: function(setting) {
+			return caches[setting.treeId];
+		},
+		getNextNode: function(setting, node) {
+			if (!node) return null;
+			var childKey = setting.data.key.children,
+			p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
+			for (var i=0, l=p[childKey].length-1; i<=l; i++) {
+				if (p[childKey][i] === node) {
+					return (i==l ? null : p[childKey][i+1]);
+				}
+			}
+			return null;
+		},
+		getNodeByParam: function(setting, nodes, key, value) {
+			if (!nodes || !key) return null;
+			var childKey = setting.data.key.children;
+			for (var i = 0, l = nodes.length; i < l; i++) {
+				if (nodes[i][key] == value) {
+					return nodes[i];
+				}
+				var tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);
+				if (tmp) return tmp;
+			}
+			return null;
+		},
+		getNodeCache: function(setting, tId) {
+			if (!tId) return null;
+			var n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)];
+			return n ? n : null;
+		},
+		getNodeName: function(setting, node) {
+			var nameKey = setting.data.key.name;
+			return "" + node[nameKey];
+		},
+		getNodeTitle: function(setting, node) {
+			var t = setting.data.key.title === "" ? setting.data.key.name : setting.data.key.title;
+			return "" + node[t];
+		},
+		getNodes: function(setting) {
+			return data.getRoot(setting)[setting.data.key.children];
+		},
+		getNodesByParam: function(setting, nodes, key, value) {
+			if (!nodes || !key) return [];
+			var childKey = setting.data.key.children,
+			result = [];
+			for (var i = 0, l = nodes.length; i < l; i++) {
+				if (nodes[i][key] == value) {
+					result.push(nodes[i]);
+				}
+				result = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));
+			}
+			return result;
+		},
+		getNodesByParamFuzzy: function(setting, nodes, key, value) {
+			if (!nodes || !key) return [];
+			var childKey = setting.data.key.children,
+			result = [];
+			for (var i = 0, l = nodes.length; i < l; i++) {
+				if (typeof nodes[i][key] == "string" && nodes[i][key].indexOf(value)>-1) {
+					result.push(nodes[i]);
+				}
+				result = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));
+			}
+			return result;
+		},
+		getNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) {
+			if (!nodes) return (isSingle ? null : []);
+			var childKey = setting.data.key.children,
+			result = isSingle ? null : [];
+			for (var i = 0, l = nodes.length; i < l; i++) {
+				if (tools.apply(filter, [nodes[i], invokeParam], false)) {
+					if (isSingle) {return nodes[i];}
+					result.push(nodes[i]);
+				}
+				var tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam);
+				if (isSingle && !!tmpResult) {return tmpResult;}
+				result = isSingle ? tmpResult : result.concat(tmpResult);
+			}
+			return result;
+		},
+		getPreNode: function(setting, node) {
+			if (!node) return null;
+			var childKey = setting.data.key.children,
+			p = node.parentTId ? node.getParentNode() : data.getRoot(setting);
+			for (var i=0, l=p[childKey].length; i<l; i++) {
+				if (p[childKey][i] === node) {
+					return (i==0 ? null : p[childKey][i-1]);
+				}
+			}
+			return null;
+		},
+		getRoot: function(setting) {
+			return setting ? roots[setting.treeId] : null;
+		},
+		getSetting: function(treeId) {
+			return settings[treeId];
+		},
+		getSettings: function() {
+			return settings;
+		},
+		getZTreeTools: function(treeId) {
+			var r = this.getRoot(this.getSetting(treeId));
+			return r ? r.treeTools : null;
+		},
+		initCache: function(setting) {
+			for (var i=0, j=_init.caches.length; i<j; i++) {
+				_init.caches[i].apply(this, arguments);
+			}
+		},
+		initNode: function(setting, level, node, parentNode, preNode, nextNode) {
+			for (var i=0, j=_init.nodes.length; i<j; i++) {
+				_init.nodes[i].apply(this, arguments);
+			}
+		},
+		initRoot: function(setting) {
+			for (var i=0, j=_init.roots.length; i<j; i++) {
+				_init.roots[i].apply(this, arguments);
+			}
+		},
+		isSelectedNode: function(setting, node) {
+			var root = data.getRoot(setting);
+			for (var i=0, j=root.curSelectedList.length; i<j; i++) {
+				if(node === root.curSelectedList[i]) return true;
+			}
+			return false;
+		},
+		removeNodeCache: function(setting, node) {
+			var childKey = setting.data.key.children;
+			if (node[childKey]) {
+				for (var i=0, l=node[childKey].length; i<l; i++) {
+					arguments.callee(setting, node[childKey][i]);
+				}
+			}
+			data.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null;
+		},
+		removeSelectedNode: function(setting, node) {
+			var root = data.getRoot(setting);
+			for (var i=0, j=root.curSelectedList.length; i<j; i++) {
+				if(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {
+					root.curSelectedList.splice(i, 1);
+					i--;j--;
+				}
+			}
+		},
+		setCache: function(setting, cache) {
+			caches[setting.treeId] = cache;
+		},
+		setRoot: function(setting, root) {
+			roots[setting.treeId] = root;
+		},
+		setZTreeTools: function(setting, zTreeTools) {
+			for (var i=0, j=_init.zTreeTools.length; i<j; i++) {
+				_init.zTreeTools[i].apply(this, arguments);
+			}
+		},
+		transformToArrayFormat: function (setting, nodes) {
+			if (!nodes) return [];
+			var childKey = setting.data.key.children,
+			r = [];
+			if (tools.isArray(nodes)) {
+				for (var i=0, l=nodes.length; i<l; i++) {
+					r.push(nodes[i]);
+					if (nodes[i][childKey])
+						r = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));
+				}
+			} else {
+				r.push(nodes);
+				if (nodes[childKey])
+					r = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));
+			}
+			return r;
+		},
+		transformTozTreeFormat: function(setting, sNodes) {
+			var i,l,
+			key = setting.data.simpleData.idKey,
+			parentKey = setting.data.simpleData.pIdKey,
+			childKey = setting.data.key.children;
+			if (!key || key=="" || !sNodes) return [];
+
+			if (tools.isArray(sNodes)) {
+				var r = [];
+				var tmpMap = [];
+				for (i=0, l=sNodes.length; i<l; i++) {
+					tmpMap[sNodes[i][key]] = sNodes[i];
+				}
+				for (i=0, l=sNodes.length; i<l; i++) {
+					if (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {
+						if (!tmpMap[sNodes[i][parentKey]][childKey])
+							tmpMap[sNodes[i][parentKey]][childKey] = [];
+						tmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);
+					} else {
+						r.push(sNodes[i]);
+					}
+				}
+				return r;
+			}else {
+				return [sNodes];
+			}
+		}
+	},
+	//method of event proxy
+	event = {
+		bindEvent: function(setting) {
+			for (var i=0, j=_init.bind.length; i<j; i++) {
+				_init.bind[i].apply(this, arguments);
+			}
+		},
+		unbindEvent: function(setting) {
+			for (var i=0, j=_init.unbind.length; i<j; i++) {
+				_init.unbind[i].apply(this, arguments);
+			}
+		},
+		bindTree: function(setting) {
+			var eventParam = {
+				treeId: setting.treeId
+			},
+			o = setting.treeObj;
+			// for can't select text
+			o.bind('selectstart', function(e){
+					var n = e.srcElement.nodeName.toLowerCase();
+					return (n === "input" || n === "textarea" );
+				}
+			).css({
+				"-moz-user-select":"-moz-none"
+			});
+			o.bind('click', eventParam, event.proxy);
+			o.bind('dblclick', eventParam, event.proxy);
+			o.bind('mouseover', eventParam, event.proxy);
+			o.bind('mouseout', eventParam, event.proxy);
+			o.bind('mousedown', eventParam, event.proxy);
+			o.bind('mouseup', eventParam, event.proxy);
+			o.bind('contextmenu', eventParam, event.proxy);
+		},
+		unbindTree: function(setting) {
+			var o = setting.treeObj;
+			o.unbind('click', event.proxy)
+			.unbind('dblclick', event.proxy)
+			.unbind('mouseover', event.proxy)
+			.unbind('mouseout', event.proxy)
+			.unbind('mousedown', event.proxy)
+			.unbind('mouseup', event.proxy)
+			.unbind('contextmenu', event.proxy);
+		},
+		doProxy: function(e) {
+			var results = [];
+			for (var i=0, j=_init.proxys.length; i<j; i++) {
+				var proxyResult = _init.proxys[i].apply(this, arguments);
+				results.push(proxyResult);
+				if (proxyResult.stop) {
+					break;
+				}
+			}
+			return results;
+		},
+		proxy: function(e) {
+			var setting = data.getSetting(e.data.treeId);
+			if (!tools.uCanDo(setting, e)) return true;
+			var results = event.doProxy(e),
+			r = true, x = false;
+			for (var i=0, l=results.length; i<l; i++) {
+				var proxyResult = results[i];
+				if (proxyResult.nodeEventCallback) {
+					x = true;
+					r = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
+				}
+				if (proxyResult.treeEventCallback) {
+					x = true;
+					r = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;
+				}
+			}
+			return r;
+		}
+	},
+	//method of event handler
+	handler = {
+		onSwitchNode: function (event, node) {
+			var setting = data.getSetting(event.data.treeId);
+			if (node.open) {
+				if (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;
+				data.getRoot(setting).expandTriggerFlag = true;
+				view.switchNode(setting, node);
+			} else {
+				if (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;
+				data.getRoot(setting).expandTriggerFlag = true;
+				view.switchNode(setting, node);
+			}
+			return true;
+		},
+		onClickNode: function (event, node) {
+			var setting = data.getSetting(event.data.treeId),
+			clickFlag = ( (setting.view.autoCancelSelected && event.ctrlKey) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && event.ctrlKey && setting.view.selectedMulti) ? 2 : 1;
+			if (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;
+			if (clickFlag === 0) {
+				view.cancelPreSelectedNode(setting, node);
+			} else {
+				view.selectNode(setting, node, clickFlag === 2);
+			}
+			setting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);
+			return true;
+		},
+		onZTreeMousedown: function(event, node) {
+			var setting = data.getSetting(event.data.treeId);
+			if (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {
+				tools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);
+			}
+			return true;
+		},
+		onZTreeMouseup: function(event, node) {
+			var setting = data.getSetting(event.data.treeId);
+			if (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {
+				tools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);
+			}
+			return true;
+		},
+		onZTreeDblclick: function(event, node) {
+			var setting = data.getSetting(event.data.treeId);
+			if (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {
+				tools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);
+			}
+			return true;
+		},
+		onZTreeContextmenu: function(event, node) {
+			var setting = data.getSetting(event.data.treeId);
+			if (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {
+				tools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);
+			}
+			return (typeof setting.callback.onRightClick) != "function";
+		}
+	},
+	//method of tools for zTree
+	tools = {
+		apply: function(fun, param, defaultValue) {
+			if ((typeof fun) == "function") {
+				return fun.apply(zt, param?param:[]);
+			}
+			return defaultValue;
+		},
+		canAsync: function(setting, node) {
+			var childKey = setting.data.key.children;
+			return (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));
+		},
+		clone: function (obj){
+			if (obj === null) return null;
+			var o = obj.constructor === Array ? [] : {};
+			for(var i in obj){
+				o[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === "object" ? arguments.callee(obj[i]) : obj[i]);
+			}
+			return o;
+		},
+		eqs: function(str1, str2) {
+			return str1.toLowerCase() === str2.toLowerCase();
+		},
+		isArray: function(arr) {
+			return Object.prototype.toString.apply(arr) === "[object Array]";
+		},
+		getMDom: function (setting, curDom, targetExpr) {
+			if (!curDom) return null;
+			while (curDom && curDom.id !== setting.treeId) {
+				for (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {
+					if (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {
+						return curDom;
+					}
+				}
+				curDom = curDom.parentNode;
+			}
+			return null;
+		},
+		uCanDo: function(setting, e) {
+			return true;
+		}
+	},
+	//method of operate ztree dom
+	view = {
+		addNodes: function(setting, parentNode, newNodes, isSilent) {
+			if (setting.data.keep.leaf && parentNode && !parentNode.isParent) {
+				return;
+			}
+			if (!tools.isArray(newNodes)) {
+				newNodes = [newNodes];
+			}
+			if (setting.data.simpleData.enable) {
+				newNodes = data.transformTozTreeFormat(setting, newNodes);
+			}
+			if (parentNode) {
+				var target_switchObj = $("#" + parentNode.tId + consts.id.SWITCH),
+				target_icoObj = $("#" + parentNode.tId + consts.id.ICON),
+				target_ulObj = $("#" + parentNode.tId + consts.id.UL);
+
+				if (!parentNode.open) {
+					view.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);
+					view.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);
+					parentNode.open = false;
+					target_ulObj.css({
+						"display": "none"
+					});
+				}
+
+				data.addNodesData(setting, parentNode, newNodes);
+				view.createNodes(setting, parentNode.level + 1, newNodes, parentNode);
+				if (!isSilent) {
+					view.expandCollapseParentNode(setting, parentNode, true);
+				}
+			} else {
+				data.addNodesData(setting, data.getRoot(setting), newNodes);
+				view.createNodes(setting, 0, newNodes, null);
+			}
+		},
+		appendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {
+			if (!nodes) return [];
+			var html = [],
+			childKey = setting.data.key.children;
+			for (var i = 0, l = nodes.length; i < l; i++) {
+				var node = nodes[i];
+				if (initFlag) {
+					var tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),
+					tmpPChild = tmpPNode[childKey],
+					isFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),
+					isLastNode = (i == (nodes.length - 1));
+					data.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);
+					data.addNodeCache(setting, node);
+				}
+
+				var childHtml = [];
+				if (node[childKey] && node[childKey].length > 0) {
+					//make child html first, because checkType
+					childHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);
+				}
+				if (openFlag) {
+					
+					view.makeDOMNodeMainBefore(html, setting, node);
+					view.makeDOMNodeLine(html, setting, node);
+					data.getBeforeA(setting, node, html);
+					view.makeDOMNodeNameBefore(html, setting, node);
+					data.getInnerBeforeA(setting, node, html);
+					view.makeDOMNodeIcon(html, setting, node);
+					data.getInnerAfterA(setting, node, html);
+					view.makeDOMNodeNameAfter(html, setting, node);
+					data.getAfterA(setting, node, html);
+					if (node.isParent && node.open) {
+						view.makeUlHtml(setting, node, html, childHtml.join(''));
+					}
+					view.makeDOMNodeMainAfter(html, setting, node);
+					data.addCreatedNode(setting, node);
+				}
+			}
+			return html;
+		},
+		appendParentULDom: function(setting, node) {
+			var html = [],
+			nObj = $("#" + node.tId),
+			ulObj = $("#" + node.tId + consts.id.UL),
+			childKey = setting.data.key.children,
+			childHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);
+			view.makeUlHtml(setting, node, html, childHtml.join(''));
+			if (!nObj.get(0) && !!node.parentTId) {
+				view.appendParentULDom(setting, node.getParentNode());
+				nObj = $("#" + node.tId);
+			}
+			if (ulObj.get(0)) {
+				ulObj.remove();
+			}
+			nObj.append(html.join(''));
+		},
+		asyncNode: function(setting, node, isSilent, callback) {
+			var i, l;
+			if (node && !node.isParent) {
+				tools.apply(callback);
+				return false;
+			} else if (node && node.isAjaxing) {
+				return false;
+			} else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {
+				tools.apply(callback);
+				return false;
+			}
+			if (node) {
+				node.isAjaxing = true;
+				var icoObj = $("#" + node.tId + consts.id.ICON);
+				icoObj.attr({"style":"", "class":"bttn ico_loading"});
+			}
+
+			var tmpParam = {};
+			for (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {
+				var pKey = setting.async.autoParam[i].split("="), spKey = pKey;
+				if (pKey.length>1) {
+					spKey = pKey[1];
+					pKey = pKey[0];
+				}
+				tmpParam[spKey] = node[pKey];
+			}
+			if (tools.isArray(setting.async.otherParam)) {
+				for (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {
+					tmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1];
+				}
+			} else {
+				for (var p in setting.async.otherParam) {
+					tmpParam[p] = setting.async.otherParam[p];
+				}
+			}
+
+			var _tmpV = data.getRoot(setting)._ver;
+			$.ajax({
+				contentType: setting.async.contentType,
+				type: setting.async.type,
+				url: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),
+				data: tmpParam,
+				dataType: setting.async.dataType,
+				success: function(msg) {
+					if (_tmpV != data.getRoot(setting)._ver) {
+						return;
+					}
+					var newNodes = [];
+					try {
+						if (!msg || msg.length == 0) {
+							newNodes = [];
+						} else if (typeof msg == "string") {
+							newNodes = eval("(" + msg + ")");
+						} else {
+							newNodes = msg;
+						}
+					} catch(err) {
+						newNodes = msg;
+					}
+
+					if (node) {
+						node.isAjaxing = null;
+						node.zAsync = true;
+					}
+					view.setNodeLineIcos(setting, node);
+					if (newNodes && newNodes !== "") {
+						newNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);
+						view.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);
+					} else {
+						view.addNodes(setting, node, [], !!isSilent);
+					}
+					setting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);
+					tools.apply(callback);
+				},
+				error: function(XMLHttpRequest, textStatus, errorThrown) {
+					if (_tmpV != data.getRoot(setting)._ver) {
+						return;
+					}
+					if (node) node.isAjaxing = null;
+					view.setNodeLineIcos(setting, node);
+					setting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);
+				}
+			});
+			return true;
+		},
+		cancelPreSelectedNode: function (setting, node) {
+			var list = data.getRoot(setting).curSelectedList;
+			for (var i=0, j=list.length-1; j>=i; j--) {
+				if (!node || node === list[j]) {
+					$("#" + list[j].tId + consts.id.A).removeClass(consts.node.CURSELECTED);
+					if (node) {
+						data.removeSelectedNode(setting, node);
+						break;
+					}
+				}
+			}
+			if (!node) data.getRoot(setting).curSelectedList = [];
+		},
+		createNodeCallback: function(setting) {
+			if (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {
+				var root = data.getRoot(setting);
+				while (root.createdNodes.length>0) {
+					var node = root.createdNodes.shift();
+					tools.apply(setting.view.addDiyDom, [setting.treeId, node]);
+					if (!!setting.callback.onNodeCreated) {
+						setting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);
+					}
+				}
+			}
+		},
+		createNodes: function(setting, level, nodes, parentNode) {
+			if (!nodes || nodes.length == 0) return;
+			var root = data.getRoot(setting),
+			childKey = setting.data.key.children,
+			openFlag = !parentNode || parentNode.open || !!$("#" + parentNode[childKey][0].tId).get(0);
+			root.createdNodes = [];
+			var zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);
+			if (!parentNode) {
+				setting.treeObj.append(zTreeHtml.join(''));
+			} else {
+				var ulObj = $("#" + parentNode.tId + consts.id.UL);
+				if (ulObj.get(0)) {
+					ulObj.append(zTreeHtml.join(''));
+				}
+			}
+			view.createNodeCallback(setting);
+		},
+		destroy: function(setting) {
+			if (!setting) return;
+			data.initCache(setting);
+			data.initRoot(setting);
+			event.unbindTree(setting);
+			event.unbindEvent(setting);
+			setting.treeObj.empty();
+		},
+		expandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {
+			var root = data.getRoot(setting),
+			childKey = setting.data.key.children;
+			if (!node) {
+				tools.apply(callback, []);
+				return;
+			}
+			if (root.expandTriggerFlag) {
+				var _callback = callback;
+				callback = function(){
+					if (_callback) _callback();
+					if (node.open) {
+						setting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);
+					} else {
+						setting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);
+					}
+				};
+				root.expandTriggerFlag = false;
+			}
+			if (!node.open && node.isParent && ((!$("#" + node.tId + consts.id.UL).get(0)) || (node[childKey] && node[childKey].length>0 && !$("#" + node[childKey][0].tId).get(0)))) {
+				view.appendParentULDom(setting, node);
+				view.createNodeCallback(setting);
+			}
+			if (node.open == expandFlag) {
+				tools.apply(callback, []);
+				return;
+			}
+			var ulObj = $("#" + node.tId + consts.id.UL),
+			switchObj = $("#" + node.tId + consts.id.SWITCH),
+			icoObj = $("#" + node.tId + consts.id.ICON);
+
+			if (node.isParent) {
+				node.open = !node.open;
+				if (node.iconOpen && node.iconClose) {
+					icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+				}
+
+				if (node.open) {
+					view.replaceSwitchClass(node, switchObj, consts.folder.OPEN);
+					view.replaceIcoClass(node, icoObj, consts.folder.OPEN);
+					if (animateFlag == false || setting.view.expandSpeed == "") {
+						ulObj.show();
+						tools.apply(callback, []);
+					} else {
+						if (node[childKey] && node[childKey].length > 0) {
+							ulObj.slideDown(setting.view.expandSpeed, callback);
+						} else {
+							ulObj.show();
+							tools.apply(callback, []);
+						}
+					}
+				} else {
+					view.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);
+					view.replaceIcoClass(node, icoObj, consts.folder.CLOSE);
+					if (animateFlag == false || setting.view.expandSpeed == "" || !(node[childKey] && node[childKey].length > 0)) {
+						ulObj.hide();
+						tools.apply(callback, []);
+					} else {
+						ulObj.slideUp(setting.view.expandSpeed, callback);
+					}
+				}
+			} else {
+				tools.apply(callback, []);
+			}
+		},
+		expandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {
+			if (!node) return;
+			if (!node.parentTId) {
+				view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);
+				return;
+			} else {
+				view.expandCollapseNode(setting, node, expandFlag, animateFlag);
+			}
+			if (node.parentTId) {
+				view.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);
+			}
+		},
+		expandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {
+			var root = data.getRoot(setting),
+			childKey = setting.data.key.children,
+			treeNodes = (node) ? node[childKey]: root[childKey],
+			selfAnimateSign = (node) ? false : animateFlag,
+			expandTriggerFlag = data.getRoot(setting).expandTriggerFlag;
+			data.getRoot(setting).expandTriggerFlag = false;
+			if (treeNodes) {
+				for (var i = 0, l = treeNodes.length; i < l; i++) {
+					if (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);
+				}
+			}
+			data.getRoot(setting).expandTriggerFlag = expandTriggerFlag;
+			view.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );
+		},
+		makeDOMNodeIcon: function(html, setting, node) {
+			var nameStr = data.getNodeName(setting, node),
+			name = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+			html.push("<span id='", node.tId, consts.id.ICON,
+				"' title='' treeNode", consts.id.ICON," class='", view.makeNodeIcoClass(setting, node),
+				"' style='", view.makeNodeIcoStyle(setting, node), "'></span><span id='", node.tId, consts.id.SPAN,
+				"'>",name,"</span>");
+		},
+		makeDOMNodeLine: function(html, setting, node) {
+			html.push("<span id='", node.tId, consts.id.SWITCH,	"' title='' class='", view.makeNodeLineClass(setting, node), "' treeNode", consts.id.SWITCH,"></span>");
+		},
+		makeDOMNodeMainAfter: function(html, setting, node) {
+			if(node.isPartition){
+				html.push("<span class='iconRegionPartition'></span><br class='clrBoth' />");
+				html.push("</li>");
+			}else{
+				html.push("<span class='iconRegionReplicate'></span><br class='clrBoth' />");
+				html.push("</li>");
+			}
+		},
+		makeDOMNodeMainBefore: function(html, setting, node) {
+			html.push("<li id='", node.tId, "' class='level", node.level,"' tabindex='0' hidefocus='true' treenode>");
+		},
+		makeDOMNodeNameAfter: function(html, setting, node) {
+			html.push("</a>");
+		},
+		makeDOMNodeNameBefore: function(html, setting, node) {
+			var title = data.getNodeTitle(setting, node),
+			url = view.makeNodeUrl(setting, node),
+			fontcss = view.makeNodeFontCss(setting, node),
+			fontStyle = [];
+			for (var f in fontcss) {
+				fontStyle.push(f, ":", fontcss[f], ";");
+			}
+			html.push("<a id='", node.tId, consts.id.A, "' class='level", node.level,"' treeNode", consts.id.A," onclick=\"", (node.click || ''),
+				"\" ", ((url != null && url.length > 0) ? "href='" + url + "'" : ""), " target='",view.makeNodeTarget(node),"' style='", fontStyle.join(''),
+				"'");
+			if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push("title='", title.replace(/'/g,"&#39;").replace(/</g,'&lt;').replace(/>/g,'&gt;'),"'");}
+			html.push(">");
+		},
+		makeNodeFontCss: function(setting, node) {
+			var fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);
+			return (fontCss && ((typeof fontCss) != "function")) ? fontCss : {};
+		},
+		makeNodeIcoClass: function(setting, node) {
+			var icoCss = ["ico"];
+			if (!node.isAjaxing) {
+				icoCss[0] = (node.iconSkin ? node.iconSkin + "_" : "") + icoCss[0];
+				if (node.isParent) {
+					icoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+				} else {
+					icoCss.push(consts.folder.DOCU);
+				}
+			}
+			return "bttn " + icoCss.join('_');
+		},
+		makeNodeIcoStyle: function(setting, node) {
+			var icoStyle = [];
+			if (!node.isAjaxing) {
+				var icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;
+				if (icon) icoStyle.push("background:url(", icon, ") 0 0 no-repeat;");
+				if (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {
+					icoStyle.push("width:0px;height:0px;");
+				}
+			}
+			return icoStyle.join('');
+		},
+		makeNodeLineClass: function(setting, node) {
+			var lineClass = [];
+			if (setting.view.showLine) {
+				if (node.level == 0 && node.isFirstNode && node.isLastNode) {
+					lineClass.push(consts.line.ROOT);
+				} else if (node.level == 0 && node.isFirstNode) {
+					lineClass.push(consts.line.ROOTS);
+				} else if (node.isLastNode) {
+					lineClass.push(consts.line.BOTTOM);
+				} else {
+					lineClass.push(consts.line.CENTER);
+				}
+			} else {
+				lineClass.push(consts.line.NOLINE);
+			}
+			if (node.isParent) {
+				lineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);
+			} else {
+				lineClass.push(consts.folder.DOCU);
+			}
+			return view.makeNodeLineClassEx(node) + lineClass.join('_');
+		},
+		makeNodeLineClassEx: function(node) {
+			return "bttn level" + node.level + " switch ";
+		},
+		makeNodeTarget: function(node) {
+			return (node.target || "_blank");
+		},
+		makeNodeUrl: function(setting, node) {
+			var urlKey = setting.data.key.url;
+			return node[urlKey] ? node[urlKey] : null;
+		},
+		makeUlHtml: function(setting, node, html, content) {
+			html.push("<ul id='", node.tId, consts.id.UL, "' class='level", node.level, " ", view.makeUlLineClass(setting, node), "' style='display:", (node.open ? "block": "none"),"'>");
+			html.push(content);
+			html.push("</ul>");
+		},
+		makeUlLineClass: function(setting, node) {
+			return ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : "");
+		},
+		removeChildNodes: function(setting, node) {
+			if (!node) return;
+			var childKey = setting.data.key.children,
+			nodes = node[childKey];
+			if (!nodes) return;
+
+			for (var i = 0, l = nodes.length; i < l; i++) {
+				data.removeNodeCache(setting, nodes[i]);
+			}
+			data.removeSelectedNode(setting);
+			delete node[childKey];
+
+			if (!setting.data.keep.parent) {
+				node.isParent = false;
+				node.open = false;
+				var tmp_switchObj = $("#" + node.tId + consts.id.SWITCH),
+				tmp_icoObj = $("#" + node.tId + consts.id.ICON);
+				view.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);
+				view.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);
+				$("#" + node.tId + consts.id.UL).remove();
+			} else {
+				$("#" + node.tId + consts.id.UL).empty();
+			}
+		},
+		setFirstNode: function(setting, parentNode) {
+			var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+			if ( childLength > 0) {
+				parentNode[childKey][0].isFirstNode = true;
+			}
+		},
+		setLastNode: function(setting, parentNode) {
+			var childKey = setting.data.key.children, childLength = parentNode[childKey].length;
+			if ( childLength > 0) {
+				parentNode[childKey][childLength - 1].isLastNode = true;
+			}
+		},
+		removeNode: function(setting, node) {
+			var root = data.getRoot(setting),
+			childKey = setting.data.key.children,
+			parentNode = (node.parentTId) ? node.getParentNode() : root;
+
+			node.isFirstNode = false;
+			node.isLastNode = false;
+			node.getPreNode = function() {return null;};
+			node.getNextNode = function() {return null;};
+
+			if (!data.getNodeCache(setting, node.tId)) {
+				return;
+			}
+                        
+			$("#" + node.tId).remove();
+			data.removeNodeCache(setting, node);
+			data.removeSelectedNode(setting, node);
+
+			for (var i = 0, l = parentNode[childKey].length; i < l; i++) {
+				if (parentNode[childKey][i].tId == node.tId) {
+					parentNode[childKey].splice(i, 1);
+					break;
+				}
+			}
+			view.setFirstNode(setting, parentNode);
+			view.setLastNode(setting, parentNode);
+                                                
+			var tmp_ulObj,tmp_switchObj,tmp_icoObj,
+			childLength = parentNode[childKey].length;
+
+			//repair nodes old parent
+			if (!setting.data.keep.parent && childLength == 0) {
+				//old parentNode has no child nodes
+				parentNode.isParent = false;
+				parentNode.open = false;
+				tmp_ulObj = $("#" + parentNode.tId + consts.id.UL);
+				tmp_switchObj = $("#" + parentNode.tId + consts.id.SWITCH);
+				tmp_icoObj = $("#" + parentNode.tId + consts.id.ICON);
+				view.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);
+				view.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);
+				tmp_ulObj.css("display", "none");
+
+			} else if (setting.view.showLine && childLength > 0) {
+				//old parentNode has child nodes
+				var newLast = parentNode[childKey][childLength - 1];
+				tmp_ulObj = $("#" + newLast.tId + consts.id.UL);
+				tmp_switchObj = $("#" + newLast.tId + consts.id.SWITCH);
+				tmp_icoObj = $("#" + newLast.tId + consts.id.ICON);
+				if (parentNode == root) {
+					if (parentNode[childKey].length == 1) {
+						//node was root, and ztree has only one root after move node
+						view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);
+					} else {
+						var tmp_first_switchObj = $("#" + parentNode[childKey][0].tId + consts.id.SWITCH);
+						view.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);
+						view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+					}
+				} else {
+					view.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);
+				}
+				tmp_ulObj.removeClass(consts.line.LINE);
+			}
+		},
+		replaceIcoClass: function(node, obj, newName) {
+			if (!obj || node.isAjaxing) return;
+			var tmpName = obj.attr("class");
+			if (tmpName == undefined) return;
+			var tmpList = tmpName.split("_");
+			switch (newName) {
+				case consts.folder.OPEN:
+				case consts.folder.CLOSE:
+				case consts.folder.DOCU:
+					tmpList[tmpList.length-1] = newName;
+					break;
+			}
+			obj.attr("class", tmpList.join("_"));
+		},
+		replaceSwitchClass: function(node, obj, newName) {
+			if (!obj) return;
+			var tmpName = obj.attr("class");
+			if (tmpName == undefined) return;
+			var tmpList = tmpName.split("_");
+			switch (newName) {
+				case consts.line.ROOT:
+				case consts.line.ROOTS:
+				case consts.line.CENTER:
+				case consts.line.BOTTOM:
+				case consts.line.NOLINE:
+					tmpList[0] = view.makeNodeLineClassEx(node) + newName;
+					break;
+				case consts.folder.OPEN:
+				case consts.folder.CLOSE:
+				case consts.folder.DOCU:
+					tmpList[1] = newName;
+					break;
+			}
+			obj.attr("class", tmpList.join("_"));
+			if (newName !== consts.folder.DOCU) {
+				obj.removeAttr("disabled");
+			} else {
+				obj.attr("disabled", "disabled");
+			}
+		},
+		selectNode: function(setting, node, addFlag) {
+			if (!addFlag) {
+				view.cancelPreSelectedNode(setting);
+			}
+			$("#" + node.tId + consts.id.A).addClass(consts.node.CURSELECTED);
+			data.addSelectedNode(setting, node);
+		},
+		setNodeFontCss: function(setting, treeNode) {
+			var aObj = $("#" + treeNode.tId + consts.id.A),
+			fontCss = view.makeNodeFontCss(setting, treeNode);
+			if (fontCss) {
+				aObj.css(fontCss);
+			}
+		},
+		setNodeLineIcos: function(setting, node) {
+			if (!node) return;
+			var switchObj = $("#" + node.tId + consts.id.SWITCH),
+			ulObj = $("#" + node.tId + consts.id.UL),
+			icoObj = $("#" + node.tId + consts.id.ICON),
+			ulLine = view.makeUlLineClass(setting, node);
+			if (ulLine.length==0) {
+				ulObj.removeClass(consts.line.LINE);
+			} else {
+				ulObj.addClass(ulLine);
+			}
+			switchObj.attr("class", view.makeNodeLineClass(setting, node));
+			if (node.isParent) {
+				switchObj.removeAttr("disabled");
+			} else {
+				switchObj.attr("disabled", "disabled");
+			}
+			icoObj.removeAttr("style");
+			icoObj.attr("style", view.makeNodeIcoStyle(setting, node));
+			icoObj.attr("class", view.makeNodeIcoClass(setting, node));
+		},
+		setNodeName: function(setting, node) {
+			var title = data.getNodeTitle(setting, node),
+			nObj = $("#" + node.tId + consts.id.SPAN);
+			nObj.empty();
+			if (setting.view.nameIsHTML) {
+				nObj.html(data.getNodeName(setting, node));
+			} else {
+				nObj.text(data.getNodeName(setting, node));
+			}
+			if (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) {
+				var aObj = $("#" + node.tId + consts.id.A);
+				aObj.attr("title", !title ? "" : title);
+			}
+		},
+		setNodeTarget: function(node) {
+			var aObj = $("#" + node.tId + consts.id.A);
+			aObj.attr("target", view.makeNodeTarget(node));
+		},
+		setNodeUrl: function(setting, node) {
+			var aObj = $("#" + node.tId + consts.id.A),
+			url = view.makeNodeUrl(setting, node);
+			if (url == null || url.length == 0) {
+				aObj.removeAttr("href");
+			} else {
+				aObj.attr("href", url);
+			}
+		},
+		switchNode: function(setting, node) {
+			if (node.open || !tools.canAsync(setting, node)) {
+				view.expandCollapseNode(setting, node, !node.open);
+			} else if (setting.async.enable) {
+				if (!view.asyncNode(setting, node)) {
+					view.expandCollapseNode(setting, node, !node.open);
+					return;
+				}
+			} else if (node) {
+				view.expandCollapseNode(setting, node, !node.open);
+			}
+		}
+	};
+	// zTree defind
+	$.fn.zTree = {
+		consts : _consts,
+		_z : {
+			tools: tools,
+			view: view,
+			event: event,
+			data: data
+		},
+		getZTreeObj: function(treeId) {
+			var o = data.getZTreeTools(treeId);
+			return o ? o : null;
+		},
+		destroy: function(treeId) {
+			if (!!treeId && treeId.length > 0) {
+				view.destroy(data.getSetting(treeId));
+			} else {
+				for(var s in settings) {
+					view.destroy(settings[s]);
+				}
+			}
+		},
+		init: function(obj, zSetting, zNodes) {
+			var setting = tools.clone(_setting);
+			$.extend(true, setting, zSetting);
+			setting.treeId = obj.attr("id");
+			setting.treeObj = obj;
+			setting.treeObj.empty();
+			settings[setting.treeId] = setting;
+			//For some older browser,(e.g., ie6)
+			if(typeof document.body.style.maxHeight === "undefined") {
+				setting.view.expandSpeed = "";
+			}
+			data.initRoot(setting);
+			var root = data.getRoot(setting),
+			childKey = setting.data.key.children;
+			zNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];
+			if (setting.data.simpleData.enable) {
+				root[childKey] = data.transformTozTreeFormat(setting, zNodes);
+			} else {
+				root[childKey] = zNodes;
+			}
+
+			data.initCache(setting);
+			event.unbindTree(setting);
+			event.bindTree(setting);
+			event.unbindEvent(setting);
+			event.bindEvent(setting);
+			
+			var zTreeTools = {
+				setting : setting,
+				addNodes : function(parentNode, newNodes, isSilent) {
+					if (!newNodes) return null;
+					if (!parentNode) parentNode = null;
+					if (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;
+					var xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);
+					function addCallback() {
+						view.addNodes(setting, parentNode, xNewNodes, (isSilent==true));
+					}
+
+					if (tools.canAsync(setting, parentNode)) {
+						view.asyncNode(setting, parentNode, isSilent, addCallback);
+					} else {
+						addCallback();
+					}
+					return xNewNodes;
+				},
+				cancelSelectedNode : function(node) {
+					view.cancelPreSelectedNode(this.setting, node);
+				},
+				destroy : function() {
+					view.destroy(this.setting);
+				},
+				expandAll : function(expandFlag) {
+					expandFlag = !!expandFlag;
+					view.expandCollapseSonNode(this.setting, null, expandFlag, true);
+					return expandFlag;
+				},
+				expandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {
+					if (!node || !node.isParent) return null;
+					if (expandFlag !== true && expandFlag !== false) {
+						expandFlag = !node.open;
+					}
+					callbackFlag = !!callbackFlag;
+
+					if (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {
+						return null;
+					} else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {
+						return null;
+					}
+					if (expandFlag && node.parentTId) {
+						view.expandCollapseParentNode(this.setting, node.getParentNode(), expandFlag, false);
+					}
+					if (expandFlag === node.open && !sonSign) {
+						return null;
+					}
+					
+					data.getRoot(setting).expandTriggerFlag = callbackFlag;
+					if (sonSign) {
+						view.expandCollapseSonNode(this.setting, node, expandFlag, true, function() {
+							if (focus !== false) {try{$("#" + node.tId).focus().blur();}catch(e){}}
+						});
+					} else {
+						node.open = !expandFlag;
+						view.switchNode(this.setting, node);
+						if (focus !== false) {try{$("#" + node.tId).focus().blur();}catch(e){}}
+					}
+					return expandFlag;
+				},
+				getNodes : function() {
+					return data.getNodes(this.setting);
+				},
+				getNodeByParam : function(key, value, parentNode) {
+					if (!key) return null;
+					return data.getNodeByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+				},
+				getNodeByTId : function(tId) {
+					return data.getNodeCache(this.setting, tId);
+				},
+				getNodesByParam : function(key, value, parentNode) {
+					if (!key) return null;
+					return data.getNodesByParam(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+				},
+				getNodesByParamFuzzy : function(key, value, parentNode) {
+					if (!key) return null;
+					return data.getNodesByParamFuzzy(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), key, value);
+				},
+				getNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {
+					isSingle = !!isSingle;
+					if (!filter || (typeof filter != "function")) return (isSingle ? null : []);
+					return data.getNodesByFilter(this.setting, parentNode?parentNode[this.setting.data.key.children]:data.getNodes(this.setting), filter, isSingle, invokeParam);
+				},
+				getNodeIndex : function(node) {
+					if (!node) return null;
+					var childKey = setting.data.key.children,
+					parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(this.setting);
+					for (var i=0, l = parentNode[childKey].length; i < l; i++) {
+						if (parentNode[childKey][i] == node) return i;
+					}
+					return -1;
+				},
+				getSelectedNodes : function() {
+					var r = [], list = data.getRoot(this.setting).curSelectedList;
+					for (var i=0, l=list.length; i<l; i++) {
+						r.push(list[i]);
+					}
+					return r;
+				},
+				isSelectedNode : function(node) {
+					return data.isSelectedNode(this.setting, node);
+				},
+				reAsyncChildNodes : function(parentNode, reloadType, isSilent) {
+					if (!this.setting.async.enable) return;
+					var isRoot = !parentNode;
+					if (isRoot) {
+						parentNode = data.getRoot(this.setting);
+					}
+					if (reloadType=="refresh") {
+						var childKey = this.setting.data.key.children;
+						for (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) {
+							data.removeNodeCache(setting, parentNode[childKey][i]);
+						}
+						data.removeSelectedNode(setting);
+						parentNode[childKey] = [];
+						if (isRoot) {
+							this.setting.treeObj.empty();
+						} else {
+							var ulObj = $("#" + parentNode.tId + consts.id.UL);
+							ulObj.empty();
+						}
+					}
+					view.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);
+				},
+				refresh : function() {
+					this.setting.treeObj.empty();
+					var root = data.getRoot(this.setting),
+					nodes = root[this.setting.data.key.children]
+					data.initRoot(this.setting);
+					root[this.setting.data.key.children] = nodes
+					data.initCache(this.setting);
+					view.createNodes(this.setting, 0, root[this.setting.data.key.children]);
+				},
+				removeChildNodes : function(node) {
+					if (!node) return null;
+					var childKey = setting.data.key.children,
+					nodes = node[childKey];
+					view.removeChildNodes(setting, node);
+					return nodes ? nodes : null;
+				},
+				removeNode : function(node, callbackFlag) {
+					if (!node) return;
+					callbackFlag = !!callbackFlag;
+					if (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;
+					view.removeNode(setting, node);
+					if (callbackFlag) {
+						this.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);
+					}
+				},
+				selectNode : function(node, addFlag) {
+					if (!node) return;
+					if (tools.uCanDo(this.setting)) {
+						addFlag = setting.view.selectedMulti && addFlag;
+						if (node.parentTId) {
+							view.expandCollapseParentNode(this.setting, node.getParentNode(), true, false, function() {
+								try{$("#" + node.tId).focus().blur();}catch(e){}
+							});
+						} else {
+							try{$("#" + node.tId).focus().blur();}catch(e){}
+						}
+						view.selectNode(this.setting, node, addFlag);
+					}
+				},
+				transformTozTreeNodes : function(simpleNodes) {
+					return data.transformTozTreeFormat(this.setting, simpleNodes);
+				},
+				transformToArray : function(nodes) {
+					return data.transformToArrayFormat(this.setting, nodes);
+				},
+				updateNode : function(node, checkTypeFlag) {
+					if (!node) return;
+					var nObj = $("#" + node.tId);
+					if (nObj.get(0) && tools.uCanDo(this.setting)) {
+						view.setNodeName(this.setting, node);
+						view.setNodeTarget(node);
+						view.setNodeUrl(this.setting, node);
+						view.setNodeLineIcos(this.setting, node);
+						view.setNodeFontCss(this.setting, node);
+					}
+				}
+			}
+			root.treeTools = zTreeTools;
+			data.setZTreeTools(setting, zTreeTools);
+
+			if (root[childKey] && root[childKey].length > 0) {
+				view.createNodes(setting, 0, root[childKey]);
+			} else if (setting.async.enable && setting.async.url && setting.async.url !== '') {
+				view.asyncNode(setting);
+			}
+			return zTreeTools;
+		}
+	};
+
+	var zt = $.fn.zTree,
+	consts = zt.consts;
+})(jQuery);
\ No newline at end of file


[28/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/WEB-INF/mvc-dispatcher-servlet.xml
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/WEB-INF/mvc-dispatcher-servlet.xml b/pulse/src/main/webapp/WEB-INF/mvc-dispatcher-servlet.xml
new file mode 100644
index 0000000..5778970
--- /dev/null
+++ b/pulse/src/main/webapp/WEB-INF/mvc-dispatcher-servlet.xml
@@ -0,0 +1,18 @@
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:mvc="http://www.springframework.org/schema/mvc"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans     
+        http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+        http://www.springframework.org/schema/context 
+        http://www.springframework.org/schema/context/spring-context-3.2.xsd
+        http://www.springframework.org/schema/mvc
+        http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
+ 
+    
+    <context:component-scan base-package="com.vmware.gemfire.tools.pulse.internal" />
+
+    <mvc:annotation-driven />
+     
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/WEB-INF/spring-security.xml
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/WEB-INF/spring-security.xml b/pulse/src/main/webapp/WEB-INF/spring-security.xml
new file mode 100644
index 0000000..4264566
--- /dev/null
+++ b/pulse/src/main/webapp/WEB-INF/spring-security.xml
@@ -0,0 +1,66 @@
+<beans:beans xmlns="http://www.springframework.org/schema/security"
+	xmlns:beans="http://www.springframework.org/schema/beans"
+	xmlns:context="http://www.springframework.org/schema/context"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+	http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+	http://www.springframework.org/schema/security
+	http://www.springframework.org/schema/security/spring-security-3.1.xsd
+	http://www.springframework.org/schema/context
+	http://www.springframework.org/schema/context/spring-context-3.2.xsd">
+
+	<http auto-config="true">
+
+		<!-- Can be invoked w/o auth -->
+		<intercept-url pattern="/Login.html" access="IS_AUTHENTICATED_ANONYMOUSLY" />
+		<intercept-url pattern="/pulse/pulseVersion" access="IS_AUTHENTICATED_ANONYMOUSLY" />
+		<intercept-url pattern="/pulse/authenticateUser" access="IS_AUTHENTICATED_ANONYMOUSLY" />
+		<intercept-url pattern="/pulse/pulseProductSupport" access="IS_AUTHENTICATED_ANONYMOUSLY" />
+		<!-- Can be invoked w/o auth -->
+
+		<!-- Restricted urls -->
+		<!-- Hide Data Browser tab for Pulse-Cheetah Release -->
+		<!-- <intercept-url pattern="/DataBrowser.html" access="ROLE_RESTRICTED" /> -->
+		<!-- Restricted urls -->
+
+		<!-- Can be invoked only with auth -->
+		<intercept-url pattern="/*.html" access="ROLE_USER,ROLE_GEMFIRETESTING,ROLE_PULSEUSER" />
+		<intercept-url pattern="/pulse/*" access="ROLE_USER,ROLE_GEMFIRETESTING,ROLE_PULSEUSER" />
+		<!-- Can be invoked only with auth -->
+
+		<form-login login-page="/Login.html"
+			authentication-failure-handler-ref="authenticationFailureHandler"
+			default-target-url="/clusterDetail.html" />
+
+		<logout logout-url="/pulse/clusterLogout" logout-success-url="/Login.html" />
+	</http>
+
+	<beans:bean id="authenticationFailureHandler"
+		class="org.springframework.security.web.authentication.ExceptionMappingAuthenticationFailureHandler">
+		<beans:property name="exceptionMappings">
+			<beans:props>
+				<beans:prop key="org.springframework.security.authentication.BadCredentialsException">/Login.html?error=BAD_CREDS</beans:prop>
+				<beans:prop key="org.springframework.security.authentication.CredentialsExpiredException">/Login.html?error=CRED_EXP</beans:prop>
+				<beans:prop key="org.springframework.security.authentication.LockedException">/Login.html?error=ACC_LOCKED</beans:prop>
+				<beans:prop key="org.springframework.security.authentication.DisabledException">/Login.html?error=ACC_DISABLED</beans:prop>
+			</beans:props>
+		</beans:property>
+	</beans:bean>
+
+	<!-- Default user authentication based on in-memory user service -->
+	<beans:beans profile="pulse.authentication.default">
+		<authentication-manager>
+			<authentication-provider>
+				<user-service>
+					<user name="admin" password="admin" authorities="ROLE_USER" />
+				</user-service>
+			</authentication-provider>
+		</authentication-manager>
+	</beans:beans>
+
+	<!-- Custom user authentication specified externally -->
+	<beans:beans profile="pulse.authentication.custom">
+		<beans:import resource="classpath:pulse-authentication-custom.xml" />
+	</beans:beans>
+
+</beans:beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/WEB-INF/web.xml b/pulse/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..ed6cfa5
--- /dev/null
+++ b/pulse/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+  <display-name>Pulse</display-name>
+  <welcome-file-list>
+    <welcome-file>index.html</welcome-file>
+  </welcome-file-list>
+  <mime-mapping>
+        <extension>properties</extension>
+        <mime-type>text/x-java-properties</mime-type>
+  </mime-mapping>
+  <servlet>
+    <servlet-name>mvc-dispatcher</servlet-name>
+    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+    <load-on-startup>1</load-on-startup>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>mvc-dispatcher</servlet-name>
+    <url-pattern>/pulse/*</url-pattern>
+  </servlet-mapping>
+  <listener>
+    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+  </listener>
+  <context-param>
+    <param-name>contextConfigLocation</param-name>
+    <param-value>
+			/WEB-INF/mvc-dispatcher-servlet.xml,
+			/WEB-INF/spring-security.xml
+		</param-value>
+  </context-param>
+  <context-param>
+    <param-name>spring.profiles.default</param-name>
+    <param-value>pulse.authentication.default</param-value>
+  </context-param>
+  <filter>
+    <filter-name>springSecurityFilterChain</filter-name>
+    <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+  </filter>
+  <filter-mapping>
+    <filter-name>springSecurityFilterChain</filter-name>
+    <url-pattern>/*</url-pattern>
+  </filter-mapping>
+  <listener>
+    <listener-class>com.vmware.gemfire.tools.pulse.internal.PulseAppListener</listener-class>
+  </listener>
+</web-app>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/clusterDetail.html
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/clusterDetail.html b/pulse/src/main/webapp/clusterDetail.html
new file mode 100644
index 0000000..4190843
--- /dev/null
+++ b/pulse/src/main/webapp/clusterDetail.html
@@ -0,0 +1,659 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta http-equiv="CACHE-CONTROL" content="NO-CACHE,NO-STORE" />
+<meta http-equiv="PRAGMA" content="NO-CACHE" />
+<meta http-equiv="EXPIRES" content="-1">
+<title>Pulse</title>
+<link href="css/common.css" rel="stylesheet" type="text/css" />
+<link href="css/style.css" rel="stylesheet" type="text/css" />
+
+<!-- fix IE Ui issues-->
+<!--[if IE 7]>
+ 	<link href="css/ie/ie7.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 8]>
+ 	<link href="css/ie/ie8.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 9]>
+ 	<link href="css/ie/ie9.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!-- IE Fix for HTML5 Tags -->
+<!--[if lt IE 9]>
+<script src='scripts/lib/html5.js'></script>
+<script type="text/javascript" src="scripts/lib/excanvas.js"></script>
+<script type="text/javascript"> if (!window.console) console = {log: function() {}}; </script>
+	<![endif]-->
+
+<script type="text/javascript" src='scripts/lib/jquery-1.7.2.js'></script>
+<script type="text/javascript" src='scripts/lib/common.js'></script>
+<script type="text/javascript" src="scripts/lib/jquery.i18n.properties.js"></script>
+<!--Custom Scroll Bar-->
+<!-- styles needed by jScrollPane - include in your own sites -->
+<link type="text/css" href="css/jquery.jscrollpane.css" rel="stylesheet"
+	media="all" />
+<!-- the mousewheel plugin -->
+<script type="text/javascript" src="scripts/lib/jquery.mousewheel.js"></script>
+<!-- the jScrollPane script -->
+<script type="text/javascript" src="scripts/lib/jquery.jscrollpane.js"></script>
+<!-- Rgraph and TreeMap-->
+<link type="text/css" href="css/base.css" rel="stylesheet" />
+<link type="text/css" href="css/Treemap.css" rel="stylesheet" />
+<script type="text/javascript" src="scripts/lib/jit.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.sparkline.js"></script>
+
+<!-- Grid view CSS and js-->
+<link rel="stylesheet" type="text/css" media="screen" href="css/grid/ui.jqgrid.css" />
+<script src="scripts/lib/grid.locale-en.js" type="text/javascript"></script>
+<script src="scripts/lib/jquery.jqGrid.src.js" type="text/javascript"></script>
+<script src="scripts/lib/jquery.tablednd.js" type="text/javascript"></script>
+<!-- -->
+<!-- jQuery plugin to support automatically updating fuzzy timestamps 
+(e.g. "4 minutes ago" or "about 1 day ago") -->
+<script type="text/javascript" src="scripts/lib/jquery.timeago.js"></script>
+
+<!-- start:Cluster widget based js files -->
+<script type="text/javascript" src="scripts/pulsescript/PulseCallbacks.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/PulseFunctions.js"></script>
+<script type="text/javascript" src='scripts/pulsescript/common.js'></script>
+<script type="text/javascript" src='scripts/pulsescript/clusterRGraphMembers.js'></script>
+<script type="text/javascript" src='scripts/pulsescript/clusterDetail.js'></script>
+
+</head>
+
+
+<body onload="return checkMedia();">
+<!-- Connection lost-->
+<div class="connectionLostMasterBlock hide" id="connectionStatusDiv" >
+<div class="connectionLostInnerBlock">
+    <label id="lblConnectionErrorMsgDiv" class="left">Connecting ...</label>
+    <div class="clear"></div>
+    <div id="connectionErrorMsgDiv" class="right"></div>
+</div>
+</div>
+	<div id="canvasWidth">
+	<!--Top Links-->
+  <div class="headerTopLinksMaster">
+    <div class="right">
+      <div class="left position-relative"><a href="#."class="left headerTopLinks aboutClicked-Off">About</a> 
+        <!-- About Dropdown-->
+        <div id="detailsAbout" class="aboutBlock display-none">
+          <div class="aboutDetailsBlock">
+            <div class="left widthfull-100per marginBottom30">
+              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about.png">
+                <div>
+                  <div class="aboutVersionBlock left" id="pulseVersion"></div>
+                  <div class="left termsBlock">&nbsp;<a id="pulseVersionDetailsLink" href="#dialog1" class="display-none" >Version Details</a></div>
+                </div>
+              </div>
+              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
+            </div>
+							<div class="left widthfull-100per">
+								<div class="left copyright">
+									Copyright &#0169; 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+									This product is protected by U.S. and international copyright 
+									and intellectual property laws. Pivotal products are covered by
+									one or more patents listed at <a href="http://www.pivotal.io/patents"
+									target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
+								</div>
+								
+								<div class="left copyright">Pivotal is a registered
+									trademark or trademark of Pivotal Software, Inc. in the United States and
+									other jurisdictions. All other marks and names mentioned herein
+									may be trademarks of their respective companies.</div>
+								
+								<div class="left termsBlock">
+									<a href="oslicenses.txt" target="_blank">Open Source
+										Licenses</a>
+								</div>
+								<!-- <div class="right termsBlock">
+									Pulse <a href="#.">Terms of Service</a>
+								</div>-->
+							</div>
+						</div>
+        </div>
+      </div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left"><a data-prod-custom="pulse-help-custom" target="_blank" href="http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html" class="left headerTopLinks" class="left headerTopLinks">Help</a></div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left headerTopLinks welcomeLabelPRZero">Welcome</div>
+      <div class="left headerTopLinks textbold font-size12" id="userName"></div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left"><a href="pulse/clusterLogout" class="left headerTopLinks">Sign Out</a></div>
+    </div>
+  </div>
+		<!-- Header block-->
+		<header>
+			<div class="left">
+				<a href="#." onclick="openClusterDetail();" class="left textbold HeaderLink HeaderLinkActive"
+					id="clusterName" ></a>
+			</div>
+			<div class="textbold right logoBlock">
+				<a href="#.">[LOGO]</a>
+			</div>
+		</header>
+		<div class="clear"></div>
+		<div class="subHeader">
+			<ul>
+				<li><a href="#." class="active" onclick="openClusterDetail();">Cluster View</a></li>
+				<!-- Hide Data Browser tab for gemfirexd (Pulse-Cheetah Release) -->
+				<li><a href="#."  onclick="openDataBrowser();">Data Browser</a></li>
+				<!-- Hide Query Statistics tab for gemfire -->
+				<li id="subTabQueryStatistics"><a href="#." onclick="openQueryStatistics();">Query Statistics</a></li>
+			</ul>
+		<div class="clear"></div>
+		</div>
+		<!-- Middle block-->
+		<div class="left widthfull-100per">
+			<!--Top Right Block 1-->
+			<div class="right widthfull-100per marginTB10">
+                            
+				<!-- Tab-->
+				<div id="notificationsPanel" class="right marginL10 TabTopPanel position-relative" 
+				data-role="widget" data-widgetid="CluserAlertNotification" data-active ="yes" data-timeline="5000">
+				</div>
+				<!-- <div class="right marginL10">
+					<a href="#." class="left linkButton" onclick="openDataView();">Data View</a>
+				</div> -->
+			<!-- </div> -->
+			<!--Middle Block 1-->
+			<div class="left leftBlockCanvas">
+				<!-- Status Block-->
+				<div class="statusmasterBlock left" data-role="widget" data-widgetid="CluserBasicDetails" data-active ="yes" data-timeline="5000">
+					<!--Status Block Normal-->
+					<div class="statusFirstBlock left">
+						<div class="statusMasterBlock" id="clusterStatusIcon">
+							<div class="textbold" id="clusterStatusText"></div>
+							<div class="labeltext">Cluster Status</div>
+						</div>
+					</div>
+					<!-- Deails B1-->
+					<div class="borderRightDarkBlue detailsBlock">
+						<div class="color-d2d5d7 font-size23">
+							<span id="clusterTotalHeap"></span><span
+								class="font-size17 paddingL5">GB</span>
+						</div>
+						<span class="labeltext" >Total Heap</span>
+					</div>
+					<!-- Deails B2-->
+					<div class=" detailsBlock">
+						<div class="color-d2d5d7 font-size23" id="clusterTotalMembersText"></div>
+						<span class="labeltext" >Members</span>
+					</div>
+					<!-- Deails B3-->
+					<div class="detailsBlock">
+						<div class="color-d2d5d7 font-size23" id="clusterServersText"></div>
+						<span class="labeltext" >Servers</span>
+					</div>
+					<!-- Deails B4-->
+					<div class="detailsBlock">
+						<div class="color-d2d5d7 font-size23" id="clusterClientsText"></div>
+						<span class="labeltext" >Clients</span>
+					</div>
+					<!-- Deails B5-->
+					<div class="detailsBlock">
+						<div class="color-d2d5d7 font-size23" id="clusterLocatorsText"></div>
+						<span class="labeltext" >Locators</span>
+					</div>
+					<!-- Deails B6-->
+					<div class="detailsBlock">
+						<div class="color-d2d5d7 font-size23" id="clusterTotalRegionsText"></div>
+						<span data-prod-custom="pulse-regionstableCaps-custom" class="labeltext" >Regions</span>
+					</div>
+					<!-- Deails B7-->
+					<div class="detailsBlock">
+						<div class="color-d2d5d7 font-size23" id="clusterFunctions"></div>
+						<span data-prod-custom="pulse-functionprocedureCaps-custom" class="labeltext" >Functions</span>
+					</div>
+					<!-- Deails B8-->
+					<div class="detailsBlock" id="clusterUniqueCQsContainer">
+						<div class="color-d2d5d7 font-size23" id="clusterUniqueCQs"></div>
+						<span class="labeltext" >Unique CQs</span>
+					</div>
+					<!-- Deails B9-->
+					<div class="detailsBlock" id="SubscriptionsContainer">
+						<div class="color-d2d5d7 font-size23"
+							id="clusterSubscriptionsText"></div>
+						<span class="labeltext" >Subscriptions</span>
+					</div>
+					<!-- Deails B10-->
+					<div class="detailsBlock" id="TxnCommittedContainer">
+					  <div class="color-d2d5d7 font-size23"
+					    id="clusterTxnCommittedText"></div>
+					  <span class="labeltext" >Txn. Committed</span>
+					</div>
+					<!-- Deails B11-->
+					<div class="detailsBlock" id="TxnRollbackContainer">
+					  <div class="color-d2d5d7 font-size23"
+					    id="clusterTxnRollbackText"></div>
+					  <span class="labeltext" >Txn. Rollback</span>
+					</div>
+				</div>
+				<div class="clear"></div>
+				<div>
+					<div class="middleTopologyBlock">
+						<!-- Large Block-->
+						<div class="canvasBlockLarge loaderParent marginBR10-11 left">
+							<div class="left widthfull-100per canvasBlockInnerBlock">
+								<!-- Drop Down list -->
+								<div class="left members_data" onClick="">
+									<ul class="inactive">
+										<li class="selected" id="members_data1">
+										  <a href="javascript:onChangeClusterPerspective(1);">Members</a>
+										</li>
+										<li id="members_data2">
+										  <a href="javascript:onChangeClusterPerspective(2);">Data</a>
+										</li>
+									</ul>
+								</div>
+								<!-- Expand/Collapse button -->
+								<a id="btnLargeBlock_1" class="minusIcon borderLeftToggleBlock"
+									onclick="toggleDiv(&#39;LargeBlock_1&#39;);"></a>
+								<!-- Visualization Icons -->
+								<div class="icons">
+									<!-- Members Topology default buttons -->
+									<div id="icons_member_view_option_default" style="display: block;">
+										<a id="default_grid_button" class="gridIcon"
+											onclick="openViewPanel('member', 'default','grid');"
+											data-perspective="member" data-view="default"
+											data-viewoption="grid"></a>
+										<a id="default_treemap_button" class="chartIcon" 
+										  onclick="openViewPanel('member', 'default','treemap');"
+											data-perspective="member" data-view="default"
+											data-viewoption="treemap"></a>
+										<a id="default_rgraph_button" class="graphIcon active"
+											onclick="openViewPanel('member', 'default','rgraph');"
+											data-perspective="member" data-view="default"
+											data-viewoption="rgraph"></a>
+									</div>
+									<!-- Members Server Group buttons -->
+									<div id="icons_member_view_option_servergroups" style="display: none;">
+										<a id="servergroups_grid_button" class="gridIcon"
+											onclick="openViewPanel('member', 'servergroups','grid');" 
+											data-perspective="member" data-view="servergroups" data-viewoption="grid"></a>
+										<a id="servergroups_treemap_button" class="chartIcon active"
+											onclick="openViewPanel('member', 'servergroups','treemap');"
+											data-perspective="member" data-view="servergroups" data-viewoption="treemap"></a>
+									</div>
+									<!-- Members Redundancy Zones buttons -->
+									<div id="icons_member_view_option_redundancyzones" style="display: none;">
+										<a id="redundancyzones_grid_button" class="gridIcon"
+											onclick="openViewPanel('member', 'redundancyzones','grid');"
+											data-perspective="member" data-view="redundancyzones" data-viewoption="grid"></a>
+										<a id="redundancyzones_treemap_button" class="chartIcon active"
+											onclick="openViewPanel('member', 'redundancyzones','treemap');"
+											data-perspective="member" data-view="redundancyzones" data-viewoption="treemap"></a>
+									</div>
+									<!-- Data buttons -->
+									<div id="icons_data_view" style="display: none;">
+										<a id="data_grid_button" class="gridIcon"
+											onclick="openViewPanel('data','data','grid');"
+											data-perspective="data" data-view="data" data-viewoption="grid"></a>
+										<a id="data_treemap_button" class="chartIcon active"
+											onclick="openViewPanel('data','data','treemap');"
+											data-perspective="data" data-view="data" data-viewoption="treemap"></a>
+									</div>
+								</div>
+							</div>
+							<div id="loadingSymbol" class="loader"></div>
+							<div class="left canvasInnerBlock canvasBlockLargeContent" id="LargeBlock_1">
+								<div id="member_view_options" class="left members_view" style="display: block;">
+									<ul>
+										<li id="member_view_option_default" class="selected">
+										  <LABEL class="label_radio r_on" for="radio-default">
+										    <INPUT name="radio-group" id="radio-default" value="1"
+												type="radio">Topology</LABEL>
+										</li>
+										<li id="member_view_option_servergroups">
+										  <LABEL class="label_radio" for="radio-servergroups">
+										    <INPUT name="radio-group" id="radio-servergroups" value="2"
+												type="radio">Server Groups</LABEL>
+										</li>
+										<li id="member_view_option_redundancyzones">
+										  <LABEL class="label_radio" for="radio-redundancyzones">
+										    <INPUT name="radio-group" id="radio-redundancyzones" value="3"
+												  type="radio">Redundancy Zones</LABEL>
+										</li>
+									</ul>
+								</div>
+								<!-- Hot Spot Drop down -->
+								<div id="hotspotParentContainer" class="right marginBottom10 marginR10 displayNone">
+								  <div class="left position-relative hotspotNameTopMargin">
+								    <a href="#." class="hotspotClicked-Off" id="userLink">
+								      <span id="currentHotSpot" class="hotspot_txt">Current Hot Spot</span>
+								    </a>
+								    <!-- Setting Dropdown-->
+								    <div id="hotspotSetting" class="settingBlock" style="display: none">
+								      <div id="hotspotListContainer" class="jsonSuggestScrollFilter">
+								        <div id="hotspotList"></div>
+								      </div>
+								    </div>
+								  </div>
+								</div>
+								<div data-role="widget" data-widgetid="ClusterMembers"
+									data-active="yes" data-timeline="5000">
+									<!-- Topology R-graph Block - Member - Default view -->
+									<div class="graphBlocksPanel left display-block"
+										id="default_rgraph_block" data-role="widget"
+										data-widgetid="ClusterMembersRGraph" data-active="yes"
+										data-timeline="5000">
+										<!-- R-graph -->
+										<div class="left widthfull-100per marginB10" id="rGraphDiv">
+											<div class="topologyGraph">
+												<div id="container">
+													<div id="center-container">
+														<div id="infovis" style="width: 100%;"></div>
+													</div>
+												</div>
+											</div>
+										</div>
+										<!-- R-graph legends -->
+										<div class="marginB11 left widthfull-100per" id="rGraphLegends">
+											<div class="left marginL10">
+												<span class="left colorCodeBlock managerCode"></span>
+												<span class="left marginL10 ">Managers</span>
+											</div>
+											<div class="left marginL10">
+												<span class="left colorCodeBlock locatorsCode"></span>
+												<span class="left marginL10 ">Locators</span>
+											</div>
+											<div class="left marginL10">
+												<span class="left colorCodeBlock severeCode"></span>
+												<span class="left marginL10 ">Server</span>
+											</div>
+										</div>
+									</div>
+
+									<!--Treemap Block - Member - Default view -->
+									<div class="chartBlocksPanel left" id="default_treemap_block">
+										<div class="left widthfull-100per">
+											<div class="treeViewGraphClusterView">
+												<div id="GraphTreeMap" style="height: 415px; width: 720px;"></div>
+											</div>
+										</div>
+									</div>
+
+									<!--Grid Block - Member - Default view -->
+									<div class="gridBlocksPanel left display-none" id="default_grid_block">
+										<div class="left widthfull-100per">
+											<table id="memberList"></table>
+										</div>
+									</div>
+
+									<!--Treemap Block - Member - Server Group view -->
+									<div class="chartBlocksPanel left" id="servergroups_treemap_block">
+										<div class="left widthfull-100per">
+											<div class="treeViewGraphClusterView">
+												<div id="GraphTreeMapSG" style="height: 415px; width: 720px;"></div>
+											</div>
+										</div>
+									</div>
+
+									<!--Grid Block - Member - Server Group view -->
+									<div class="chartBlocksPanel left display-none" id="servergroups_grid_block">
+										<div class="left widthfull-100per">
+											<div class="treeViewGraphClusterView">
+											  <table id="memberListSG"></table>
+											</div>
+										</div>
+									</div>
+
+									<!--Treemap Block - Member - Redundancy Zones view -->
+									<div class="chartBlocksPanel left" id="redundancyzones_treemap_block">
+										<div class="left widthfull-100per">
+											<div class="treeViewGraphClusterView">
+												<div id="GraphTreeMapRZ" style="height: 415px; width: 720px;"></div>
+											</div>
+										</div>
+									</div>
+
+									<!--Grid Block - Member - Redundancy Zones view -->
+									<div class="chartBlocksPanel left display-none" id="redundancyzones_grid_block">
+										<div class="left widthfull-100per">
+											<div class="treeViewGraphClusterView">
+												<table id="memberListRZ"></table>
+											</div>
+										</div>
+									</div>
+
+									<!--Treemap Block - Data -->
+									<div data-role="widget" data-widgetid="ClusterRegions"
+                  data-active="yes" data-timeline="5000" 
+                  class="chartBlocksPanel left" id="data_treemap_block">
+										<div class="left widthfull-100per">
+											<div class="treeViewGraphClusterView">
+												<div id="GraphTreeMapClusterData" style="height: 415px; width: 720px;"></div>
+											</div>
+										</div>
+									</div>
+
+									<!--Grid Block - Data -->
+									<div class="chartBlocksPanel left display-none" id="data_grid_block">
+										<div class="left widthfull-100per">
+											<div class="treeViewGraphClusterView">
+												<table id="regionsList"></table>
+											</div>
+										</div>
+									</div>
+								</div>
+
+							</div>
+						</div>
+						<!-- Block 4-->
+						<div class="canvasBlockKeyStats marginBR10-11 left" data-role="widget" data-widgetid="ClusterKeyStatistics" data-active ="yes" data-timeline="5000">
+							<div class="left width495 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading" >Key Statistics</span><a
+									id="btnSmallBlock_4" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_4');" ></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlockKeyStats"
+								id="SmallBlock_4">
+								<div class="graphBlocksContent left">
+									<span class="marginB11 left widthfull-100per" >Last 15
+										Minutes</span>
+									<!--Line 1-->
+									<div class="left widthfull-100per marginB10">
+										<span class="left lineGraphKeyStats" id="writePerSecSparkLine"></span><span
+											class="color-d2d5d7 font-size23" id="writePerSec"></span><span data-prod-custom="pulse-writeputpersec-custom"
+											class="paddingL5" >Write/Sec</span>
+									</div>
+									<!--Line 2-->
+									<div class="left widthfull-100per marginB10">
+										<span class="left lineGraphKeyStats" id="readPerSecSparkLine"></span><span
+											class="color-d2d5d7 font-size23" id="readPerSec"></span><span data-prod-custom="pulse-readgetpersec-custom"
+											class="paddingL5" >Read/Sec</span>
+									</div>
+									<!--Line 3-->
+									<div class="left widthfull-100per marginB10" id="queriesPerSecContainer">
+										<span class="left lineGraphKeyStats" id="queriesPerSecSparkLine"></span><span
+											class="color-d2d5d7 font-size23" id="queriesPerSec"></span><span
+											class="paddingL5" >Queries/Sec</span>
+									</div>
+								</div>
+							</div>
+						</div>
+						<!-- Block 5-->
+						
+						<!-- Block 6-->
+						<div class="canvasBlock marginBR10-11 left" data-role="widget" data-widgetid="ClusterJVMPAuses" data-active ="yes" data-timeline="5000">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading" >No. of JVM
+									Pauses</span><a id="btnSmallBlock_6" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_6');" ></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_6">
+								<div class="graphBlocksContent">
+									<div class="color-d2d5d7 font-size40">
+										<span id="currentGCPauses"></span><span
+											class="font-size23 paddingL5"></span>
+									</div>
+									<span >Last 15 Minutes</span>
+								</div>
+								<div class="left graphChart">
+									<span class="left lineGraph" id="gcPauses"></span>
+								</div>
+							</div>
+						</div>
+					</div>
+					<!-- Right Block-->
+					<div class="rightBlockCanvas">
+						<!-- Block 1-->
+						<div class="canvasBlock marginB10 left" id="wanInfoWidget" data-role="widget" data-widgetid="ClusterWanInformation" data-active ="yes" data-timeline="5000">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading">WAN
+									Information</span><a id="btnSmallBlock_1" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_1');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_1">
+								<div class="scroll-pane_1">
+									<div id="wanInfoList"></div>
+								</div>
+							</div>
+						</div>
+						<div class="clear"></div>
+						<!-- Block 5-->
+						<div class="canvasBlock marginBR10-11 left" data-role="widget" data-widgetid="ClusterMemoryUsage" data-active ="yes" data-timeline="5000">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading" >Memory Usage</span><a
+									id="btnSmallBlock_5" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_5');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_5">
+								<div class="graphBlocksContent">
+									<div class="color-d2d5d7 font-size40">
+										<span id="currentMemoryUsage"></span><span
+											class="font-size23 paddingL5" id="memoryUsageMB" >MB</span>
+									</div>
+									<span >Last 15 Minutes</span>
+								</div>
+								<div class="left graphChart">
+									<span class="left lineGraph" id="memoryUsage"></span>
+								</div>
+							</div>
+						</div>
+						<!-- Block 2-->
+					<!-- 	<div class="canvasBlock marginB10 left">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading">Disk Storage
+									Used</span><a id="btnSmallBlock_2" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_2');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_2">
+								<div class="graphBlocksContent">
+									<div class="color-d2d5d7 font-size40">
+										<span id="currentDiskStorage"></span><span
+											class="font-size23 paddingL5" id="diskStorageMBGB">MB</span>
+									</div>
+									<span>Last 15 Minutes</span>
+								</div>
+								<div class="left graphChart">
+								  <span class="left lineGraph" id="diskStorageGraph"></span>
+								</div>
+							</div>
+						</div>
+						<div class="clear"></div> -->
+						<!-- Block 3-->
+						<div class="canvasBlock marginB10 left" data-role="widget" data-widgetid="ClusterDiskThroughput" data-active="yes" data-timeline="5000">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading">Disk Throughput</span>
+								<a id="btnSmallBlock_3" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_3');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_3">
+								<div class="graphBlocksContent marginB11 ">
+									<div class="left">
+										<span class="left">Last 15 Minutes</span>
+									</div>
+									<div class="right marginL10">
+										<span data-prod-custom="pulse-reads-custom" class="left">Reads</span>
+										<span class="left marginL10 colorCodeBlock diskReadsCode"></span>
+									</div>
+									<div class="right marginL10">
+										<span data-prod-custom="pulse-writes-custom" class="left">Writes</span>
+										<span class="left marginL10 colorCodeBlock diskWritesCode"></span>
+									</div>
+								</div>
+								<div class="graphBlocksContent width91Per left">
+									<div class="color-d2d5d7 font-size20">
+										<span id="diskReadsThroughput"></span>
+									</div>
+									<div class="width100Per left">
+										<span class="left">Reads</span> <span class="right"
+											id="currentDiskReadsThroughput"></span>
+									</div>
+								</div>
+								<div class="left graphChart marginB11">
+									<span class="left lineGraph" id="diskReadsThroughputTrend"></span>
+								</div>
+								<div class="graphBlocksContent width91Per left">
+									<div class="color-d2d5d7 font-size20">
+										<span id="diskWritesThroughput"></span>
+									</div>
+									<div class="width100Per left">
+										<span class="left">Writes</span> <span class="right"
+											id="currentDiskWritesThroughput"></span>
+									</div>
+								</div>
+								<div class="left graphChart">
+									<span class="left lineGraph" id="diskWritesThroughputTrend"></span>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+      </div>
+		</div>
+	</div>
+	<!--Popups Block-->
+<div id="boxes"> 
+  <!-- Version Details popup-->
+  <div id="dialog1" class="window width345"  data-role="widget" data-widgetid="PulseVersionDetails" data-active ="yes" data-timeline="5000">
+    <div class="popup_heading"><span>Version Details</span><a href="#" class="closePopup">&nbsp;</a></div>
+    <div class="popup_contentBlock">
+      <div class="popup-innerblock">
+        <ul class="widthfull-100per left"  >
+          <li class="left widthfull-100per"  >
+            <label class="width-40 display-inline-block"  >Pulse Version:</label>
+            <label class="width-58 display-inline-block" id="pulseVer"></label>
+          </li>
+          <li class="left widthfull-100per"  >
+            <label class="width-40 display-inline-block"  >Build Id:</label>
+            <label class="width-58 display-inline-block" id="buildId"></label>
+          </li>
+          <li class="left widthfull-100per"  >
+            <label class="width-40 display-inline-block"  >Build Date:</label>
+            <label class="width-58 display-inline-block" id="buildDate"></label>
+          </li>
+          <li class="left widthfull-100per"  >
+            <label class="width-40 display-inline-block"  >Source Date:</label>
+            <label class="width-58 display-inline-block" id="sourceDate"></label>
+          </li>
+          <li class="left widthfull-100per"  >
+            <label class="width-40 display-inline-block"  >Source Revision:</label>
+            <label class="width-58 display-inline-block" id="sourceRevision"></label>
+          </li>
+          <li class="left widthfull-100per"  >
+            <label class="width-40 display-inline-block"  >Source Repository:</label>
+            <label class="width-58 display-inline-block" id="sourceRepository"></label>
+          </li>
+        </ul>
+        <div class="clear"></div>
+      </div>
+    </div>
+  </div>
+  <!-- Mask to cover the whole screen -->
+  <div id="mask"></div>
+</div>
+<div id="tooltip" class="tooltip"></div>
+</body>
+
+
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/ForceDirected.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/ForceDirected.css b/pulse/src/main/webapp/css/ForceDirected.css
new file mode 100644
index 0000000..fd2cbb5
--- /dev/null
+++ b/pulse/src/main/webapp/css/ForceDirected.css
@@ -0,0 +1,27 @@
+#inner-details {
+  font-size:12px;
+}
+
+span.close {
+	color:#FF5555;
+	cursor:pointer;
+	font-weight:bold;
+	margin-left:3px;
+}
+
+span.name {
+  cursor: pointer;
+}
+
+/*TOOLTIPS*/
+.tip {
+   text-align: left;
+   width:auto;
+   max-width:500px;
+}
+
+.tip-title {
+  font-size: 11px;
+  text-align:center;
+  margin-bottom:2px;
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/RGraph.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/RGraph.css b/pulse/src/main/webapp/css/RGraph.css
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/Treemap.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/Treemap.css b/pulse/src/main/webapp/css/Treemap.css
new file mode 100644
index 0000000..1683edd
--- /dev/null
+++ b/pulse/src/main/webapp/css/Treemap.css
@@ -0,0 +1,115 @@
+
+#center-containerTree {
+  width:730px;
+  position:absolute;
+  left:0px;
+  top:34px;
+  height:350px;
+  background:#132634;
+}
+
+#TreeMap {
+    position:relative;
+    height:350px;
+    margin:auto;
+    overflow:hidden;
+  width:730px;
+}
+
+.node {
+  color:#fff;
+  font-size:9px;
+  overflow:hidden;
+  cursor:pointer;
+/*  
+  text-shadow:2px 2px 5px #000;
+  -o-text-shadow:2px 2px 5px #000;
+  -webkit-text-shadow:2px 2px 5px #000;
+  -moz-text-shadow:2px 2px 5px #000;
+*/
+}
+
+/*TOOLTIPS*/
+.tip {
+    color: #fff;
+    width: 200px;
+    background-color:#283649 !important;
+    border:1px solid #889eb9;
+    -moz-box-shadow:#555 2px 2px 8px;
+    -webkit-box-shadow:#555 2px 2px 8px;
+    -o-box-shadow:#555 2px 2px 8px;
+    box-shadow:#555 2px 2px 8px;
+    font-size:13px;
+  }
+
+.album {
+    width:100px;
+    margin:3px;
+}
+
+#id-list {
+  background-color:#EEEEEE;
+  border:1px solid #CCCCCC;
+  margin:10px 20px 0 20px;
+  padding:5px;
+  text-align:left;
+  text-indent:2px;
+}
+
+#id-list table {
+  margin-top:2px;
+}
+
+#back {
+  margin:10px 40px;
+}
+
+.button {
+  display: inline-block;
+  outline: none;
+  cursor: pointer;
+  text-align: center;
+  text-decoration: none;
+  padding: 0.5em 1em 0.55em;
+  text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3);
+  -webkit-border-radius: 0.5em;
+  -moz-border-radius: 0.5em;
+  border-radius: 0.5em;
+  -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
+  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
+}
+
+.button:hover {
+  text-decoration: none;
+}
+
+.button:active {
+  position: relative;
+  top: 1px;
+}
+
+/* white */
+.white {
+  color: #606060;
+  border: solid 1px #b7b7b7;
+  background: #fff;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed));
+  background: -moz-linear-gradient(top,  #fff,  #ededed);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed');
+}
+
+.white:hover {
+  background: #ededed;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#dcdcdc));
+  background: -moz-linear-gradient(top,  #fff,  #dcdcdc);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#dcdcdc');
+}
+
+.white:active {
+  color: #999;
+  background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#fff));
+  background: -moz-linear-gradient(top,  #ededed,  #fff);
+  filter:  progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#ffffff');
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/autocomplete/jsonSuggest.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/autocomplete/jsonSuggest.css b/pulse/src/main/webapp/css/autocomplete/jsonSuggest.css
new file mode 100644
index 0000000..6f260ad
--- /dev/null
+++ b/pulse/src/main/webapp/css/autocomplete/jsonSuggest.css
@@ -0,0 +1,72 @@
+
+div.jsonSuggestResults {
+	position:absolute;
+	border:1px solid #546579;
+	border-bottom:0px;
+	padding:0px;
+	margin:0px 0px;
+	z-index:1;
+	width:193px !important;
+	left:-1px !important;
+	top:45px !important;
+	/*max-height:125px !important;*/
+	overflow-y:auto;
+	overflow-x:hidden;
+	display:block !important;
+}
+
+div.jsonSuggestResults div.resultItem {
+	margin:0px;
+	padding:5px;
+	position:relative;
+	height:auto;
+	cursor:pointer;
+	background:#283649 !important;
+	border-bottom:1px solid #4e6277;
+	color:#868d98;
+
+}
+
+div.jsonSuggestResults div.resultItem.odd {
+	/*background-color:#d4e8f3; */
+	background:#283649 !important;
+}
+div.jsonSuggestResults div.resultItem.odd:hover{
+	color:#fff;
+	}
+
+div.jsonSuggestResults div.resultItem.even {
+	background:#283649 !important;
+}
+div.jsonSuggestResults div.resultItem.even:hover {
+	color:#fff;
+}
+div.jsonSuggestResults div.resultItem.hover {
+	background:#283649 !important;
+	color:#fff !important;
+}
+
+div.jsonSuggestResults div.resultItem img {
+	float:left;
+	margin-right:10px;
+}
+
+div.jsonSuggestResults div.resultItem p {
+	margin:0px;
+	padding:0px;
+}
+
+div.jsonSuggestResults div.resultItem p strong {
+	font-weight:bold;
+	text-decoration:underline;
+}
+
+div.jsonSuggestResults div.resultItem p.extra {
+	font-size: x-small !important;
+	position:absolute;
+	top:0px;
+	left: 0px;
+	width:190px;
+	height:24px;
+}
+div.jsonSuggestResults div.resultItem p.extra a{display:block;height:24px;}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/base.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/base.css b/pulse/src/main/webapp/css/base.css
new file mode 100644
index 0000000..895bf5d
--- /dev/null
+++ b/pulse/src/main/webapp/css/base.css
@@ -0,0 +1,55 @@
+
+input, select {
+    font-size:0.9em;
+}
+
+#container {
+  
+    margin:0 auto;
+    position:relative;
+}
+
+#center-container {
+    /*height:600px;*/
+    position:absolute;
+    top:0;
+}
+
+
+#center-container {
+    color: #CCCCCC;
+    /*left: 379px;*/
+    /*margin: 75px 0 0;*/
+   /* padding: 10px 0px 0;*/
+    /*width: 722px;
+    height: 461px;*/
+    position: relative;
+}
+
+#inner-details {
+    font-size:0.8em;
+    list-style:none;
+    margin:7px;
+}
+
+
+
+#infovis {
+    height: 410px;
+    overflow: hidden;
+    position: relative;
+    /*width: 660px;*/
+}
+
+/*TOOLTIPS*/
+.tip {
+    color: #fff;
+    width: 200px;
+    background-color:#283649 !important;
+    border:1px solid #889eb9;
+    -moz-box-shadow:#555 2px 2px 8px;
+    -webkit-box-shadow:#555 2px 2px 8px;
+    -o-box-shadow:#555 2px 2px 8px;
+    box-shadow:#555 2px 2px 8px;
+    font-size:13px;
+  }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/common.css
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/common.css b/pulse/src/main/webapp/css/common.css
new file mode 100644
index 0000000..32b366e
--- /dev/null
+++ b/pulse/src/main/webapp/css/common.css
@@ -0,0 +1,221 @@
+@charset "utf-8";
+/**********************************************************************************************
+
+	CSS3
+	Title: vmware
+	Date:  September 2012
+
+***********************************************************************************************
+
+	1. BASE
+			1.1 Reset & Standards
+			1.2 Links
+			1.3 Lists
+			1.4 Tables
+			1.5 Misc
+			1.6 Typography
+			1.7 Block Width
+			1.8 Font Size
+			1.9 Font Color
+			1.10 Line Height
+			1.11 Input
+			1.12 Margin & Padding
+			
+***********************************************************************************************/
+/*	--------------------------------------------------
+	1.BASE
+	-------------------------------------------------- */
+
+/*	--------------------------------------------------
+	1.1 Global Reset & Standards
+	-------------------------------------------------- */
+	html, body, div, span, applet, object, iframe,  h1, h2, h3, h4, h5, h6, p, blockquote, pre,  a, abbr, acronym, address, big, cite, code,  del, dfn, em, img, ins, kbd, q, s, samp,  small, strike, strong, sub, sup, tt, var,  b, u, i, center,  dl, dt, dd, ol, ul, li,  fieldset, form, label, legend,  table, caption, tbody, tfoot, thead, tr, th, td,  article, aside, canvas, details, embed,  figure, figcaption, footer, header, hgroup,  menu, nav, output, ruby, section, summary,  time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; outline:none }
+	body { min-width:1000px};
+	html, body { margin: 0; padding: 0; height: 100%; }
+	html { /*overflow-y:auto;*/ overflow-y:scroll;}
+	sub { vertical-align: sub; }
+	sup { vertical-align: super; }
+	textarea { resize:none; }
+	ol, ul { list-style: none; }
+	blockquote, q { quotes: none; }
+	blockquote:before, blockquote:after,  q:before, q:after { content: ''; content: none; }
+	/*table { border-collapse: collapse; border-spacing: 0; border:0px }*/
+/*	--------------------------------------------------
+	1.2 Links
+	-------------------------------------------------- */
+	a { color: #414141; text-decoration: none; line-height: inherit; cursor:pointer; outline:0/* set dotted border zero for IE8 & IE9*/ }
+	a:hover { color: #0363a0; }
+	p a, p a:visited { line-height: inherit; }
+/*	--------------------------------------------------
+	1.3 Lists
+	-------------------------------------------------- */
+	ul, ol { margin: 0px; }
+	ul { list-style: none outside; }
+	ol { list-style: none outside none }
+	ol, ul.square, ul.circle, ul.disc { margin:0px; padding:0px }
+	ul.square { list-style: square outside; }
+	ul.circle { list-style: circle outside; }
+	ul.disc { list-style: disc outside; }
+	li { margin: 0px; }
+	ul.large li { line-height: 21px; }
+/*	--------------------------------------------------
+	1.4 Tables
+	-------------------------------------------------- */
+	table { margin: 0 0 0 0px; }
+	table thead, table tfoot { background: #f5f5f5; }
+	table thead tr th,  table tfoot tr th,  table tbody tr td,  table tr td,  table tfoot tr td { font-size: 0.9em; line-height: 18px; text-align: left; }
+	table thead tr th,  table tfoot tr td { padding: 8px 10px 9px; font-size: 14px; font-weight: bold; color: #222; }
+	table tbody tr.even,  table tbody tr.alt { background: #f9f9f9; }
+	table tbody tr td { color: #414141; padding: 0px; vertical-align: top; border: none; }
+
+/* -------------------------------------------------- 
+	1.5 Misc
+---------------------------------------------------*/
+	.left { float: left; }
+	.right { float: right; }
+	.text-left { text-align: left; }
+	.text-right { text-align: right; }
+	.text-center { text-align: center; }
+	.postical-absolute { position:absolute }
+	.position-relative { position:relative }
+	.hide { display: none; }
+	.show { display:block }
+	.clear { clear:both; height:0; font-size:0px; line-height:0; }
+	.widthfull-100per { width:100%; }
+	.display-inline-block { display:inline-block }
+	.display-block { display:block }
+	.display-none { display:none }
+	.clearfix { height: 1%; overflow: visible; }
+	.verticalTop { vertical-align:top !important }
+	.verticalMiddle { vertical-align:middle !important }
+/*	--------------------------------------------------
+    1.6 Typography
+	-------------------------------------------------- */
+	h1, h2, h3, h4, h5, h6 { color: #181818; font-weight: bold; line-height: 1.25 }
+	h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; }
+	p { margin: 0 0 0 0; }
+	p img { margin: 0; }
+/*	--------------------------------------------------
+    1.7 Block width
+	-------------------------------------------------- */
+	/* multi of 5*/
+	.width-5 { width:5% }
+	.width-10 { width:10% }
+	.width-15 { width:15% }
+	.width-20 { width:20% }
+	.width-25 { width:25% }
+	.width-30 { width:30% }
+	.width-35 { width:35% }
+	.width-40 { width:40% }
+	.width-45 { width:45% }
+	.width-50 { width:50% }
+	.width-55 { width:55% }
+	.width-60 { width:60% }
+	.width-65 { width:65% }
+	.width-70 { width:70% }
+	.width-75 { width:75% }
+	.width-80 { width:80% }
+	.width-85 { width:85% }
+	.width-90 { width:90% }
+	.width-95 { width:95% }
+/*even*/
+	.width-4 { width:4% }
+	.width-6 { width:6% }
+	.width-8 { width:8% }
+	.width-12 { width:12% }
+	.width-14 { width:14% }
+	.width-16 { width:16% }
+	.width-28 { width:28% }
+	.width-46 { width:46% }
+	.width-76 { width:76% }
+	.width-94 { width:94% }
+/*odd*/
+	.width-11 { width:11% }
+	.width-13 { width:13% }
+	.width-7 { width:7% }
+	.width-39 { width:39% }
+	.width-49 { width:49% }
+	.width-77 { width:77% }
+	.width-83 { width:83% }
+	.width-87 { width:87% }
+	.width-53 { width:53% }
+	.width-27 { width:27% }
+	.width-47 { width:47% }
+/*	--------------------------------------------------
+	1.8 Font Size
+	-------------------------------------------------- */
+	.font-size20{font-size:20px;}
+	.font-size23{font-size:23px;}
+	.font-size14{font-size:14px;}
+	.font-size15{font-size:15px;}
+	.font-size40{font-size:40px;}
+	.font-size17{font-size:17px;}
+	.font-size13{font-size:13px;}
+
+/*	--------------------------------------------------
+	1.9 Font Color
+	-------------------------------------------------- */
+	.color-fff { color:#ffffff }
+	.color-d2d5d7{color:#d2d5d7}
+	
+
+/*	--------------------------------------------------
+	1.10 Line Height
+	-------------------------------------------------- */
+	.line-height-22 { line-height:22px }
+/*Height*/
+	.height16 { height:16px !important; vertical-align:top }
+	.height18 { height:18px !important; vertical-align:top !important; }
+	.height40 { height:40px; }
+	.height80 { height:80px; }
+	.height87 { height:87px; }
+	.height30 { height:30px; }
+	.height36 { height:36px; line-height:20px }
+	.height60 { height:65px; width:inherit }
+	.height20 { height:20px !important; line-height:20px !important; font-size:11px !important; }
+	.height71 { height:71px; }
+/*	--------------------------------------------------
+	1.11 Input
+	-------------------------------------------------- */
+	
+	input[type="text"] { border: 1px solid #afafaf; border-radius: 2px 2px 2px 2px; color: #414141; font-family: Arial; font-size: 12px; padding: 5px 8px; outline:none }	
+	textarea {border:0px; border-bottom:1px solid #27333b; !important; border-radius: 2px 2px 2px 2px; color: #878e92; font-family: Arial; font-size: 12px; padding: 5px 8px; outline:none; background:#0f1c25}
+	select { border:1px #b1b1b1 solid; border-radius:3px 3px 3px 3px; padding:3px 3px !important; color:#414141; outline: none; line-height:20px; }
+/*	--------------------------------------------------
+	1.12 Margin & Padding
+	-------------------------------------------------- */
+.marginTB10{margin:10px 0px}
+.marginLR10{margin:0px 10px}
+.marginL10{margin-left:10px}
+.marginR10{margin-right:10px}
+.marginB5{margin-bottom:5px;}
+.marginB10{margin-bottom:10px;}
+.marginB11{margin-bottom:11px;}
+.marginBR10-11{margin-bottom:10px; margin-right:11px;}
+.paddingTop0{padding-top:0px !important}
+.margin5All{margin:5px}
+
+/*padding*/
+.paddingL5{padding-left:5px;}
+/*cursor types*/
+.pointerCursor{cursor: pointer;}
+.defaultCursor{cursor: default;}
+
+/* background:transparent url(../images/RegionView_Popup.png); */
+ /* .tooltip {
+    display:none;
+    background:repeat #202b39;
+    background: url("../images/PopupImage.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
+    font-size:12px;
+    height:317px;
+    width:350px;
+    padding:5px;
+    color:#eee;
+  } */
+  
+  .regionTipHeaderEnhancement {
+  	font-size:12px; 
+  	padding:5px 0px; 
+  	color: #ababab;
+  }
+  
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.eot
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.eot b/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.eot
new file mode 100644
index 0000000..1691466
Binary files /dev/null and b/pulse/src/main/webapp/css/fonts/DroidSans-Bold-webfont.eot differ


[39/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONArray.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONArray.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONArray.java
new file mode 100644
index 0000000..db1211d
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONArray.java
@@ -0,0 +1,906 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2002 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * A JSONArray is an ordered sequence of values. Its external text form is a
+ * string wrapped in square brackets with commas separating the values. The
+ * internal form is an object having <code>get</code> and <code>opt</code>
+ * methods for accessing the values by index, and <code>put</code> methods for
+ * adding or replacing values. The values can be any of these types:
+ * <code>Boolean</code>, <code>JSONArray</code>, <code>JSONObject</code>,
+ * <code>Number</code>, <code>String</code>, or the
+ * <code>JSONObject.NULL object</code>.
+ * <p>
+ * The constructor can convert a JSON text into a Java object. The
+ * <code>toString</code> method converts to JSON text.
+ * <p>
+ * A <code>get</code> method returns a value if one can be found, and throws an
+ * exception if one cannot be found. An <code>opt</code> method returns a
+ * default value instead of throwing an exception, and so is useful for
+ * obtaining optional values.
+ * <p>
+ * The generic <code>get()</code> and <code>opt()</code> methods return an
+ * object which you can cast or query for type. There are also typed
+ * <code>get</code> and <code>opt</code> methods that do type checking and type
+ * coercion for you.
+ * <p>
+ * The texts produced by the <code>toString</code> methods strictly conform to
+ * JSON syntax rules. The constructors are more forgiving in the texts they will
+ * accept:
+ * <ul>
+ * <li>An extra <code>,</code>&nbsp;<small>(comma)</small> may appear just
+ * before the closing bracket.</li>
+ * <li>The <code>null</code> value will be inserted when there is <code>,</code>
+ * &nbsp;<small>(comma)</small> elision.</li>
+ * <li>Strings may be quoted with <code>'</code>&nbsp;<small>(single
+ * quote)</small>.</li>
+ * <li>Strings do not need to be quoted at all if they do not begin with a quote
+ * or single quote, and if they do not contain leading or trailing spaces, and
+ * if they do not contain any of these characters:
+ * <code>{ } [ ] / \ : , = ; #</code> and if they do not look like numbers and
+ * if they are not the reserved words <code>true</code>, <code>false</code>, or
+ * <code>null</code>.</li>
+ * <li>Values can be separated by <code>;</code> <small>(semicolon)</small> as
+ * well as by <code>,</code> <small>(comma)</small>.</li>
+ * </ul>
+ *
+ * @author JSON.org
+ * @version 2012-04-20
+ */
+public class JSONArray {
+
+
+    /**
+     * The arrayList where the JSONArray's properties are kept.
+     */
+    private final ArrayList myArrayList;
+
+
+    /**
+     * Construct an empty JSONArray.
+     */
+    public JSONArray() {
+        this.myArrayList = new ArrayList();
+    }
+
+    /**
+     * Construct a JSONArray from a JSONTokener.
+     * @param x A JSONTokener
+     * @throws JSONException If there is a syntax error.
+     */
+    public JSONArray(JSONTokener x) throws JSONException {
+        this();
+        if (x.nextClean() != '[') {
+            throw x.syntaxError("A JSONArray text must start with '['");
+        }
+        if (x.nextClean() != ']') {
+            x.back();
+            for (;;) {
+                if (x.nextClean() == ',') {
+                    x.back();
+                    this.myArrayList.add(JSONObject.NULL);
+                } else {
+                    x.back();
+                    this.myArrayList.add(x.nextValue());
+                }
+                switch (x.nextClean()) {
+                case ';':
+                case ',':
+                    if (x.nextClean() == ']') {
+                        return;
+                    }
+                    x.back();
+                    break;
+                case ']':
+                    return;
+                default:
+                    throw x.syntaxError("Expected a ',' or ']'");
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Construct a JSONArray from a source JSON text.
+     * @param source     A string that begins with
+     * <code>[</code>&nbsp;<small>(left bracket)</small>
+     *  and ends with <code>]</code>&nbsp;<small>(right bracket)</small>.
+     *  @throws JSONException If there is a syntax error.
+     */
+    public JSONArray(String source) throws JSONException {
+        this(new JSONTokener(source));
+    }
+
+
+    /**
+     * Construct a JSONArray from a Collection.
+     * @param collection     A Collection.
+     */
+    public JSONArray(Collection collection) {
+        this.myArrayList = new ArrayList();
+        if (collection != null) {
+            Iterator iter = collection.iterator();
+            while (iter.hasNext()) {
+                this.myArrayList.add(JSONObject.wrap(iter.next()));
+            }
+        }
+    }
+
+
+    /**
+     * Construct a JSONArray from an array
+     * @throws JSONException If not an array.
+     */
+    public JSONArray(Object array) throws JSONException {
+        this();
+        if (array.getClass().isArray()) {
+            int length = Array.getLength(array);
+            for (int i = 0; i < length; i += 1) {
+                this.put(JSONObject.wrap(Array.get(array, i)));
+            }
+        } else {
+            throw new JSONException(
+"JSONArray initial value should be a string or collection or array.");
+        }
+    }
+
+
+    /**
+     * Get the object value associated with an index.
+     * @param index
+     *  The index must be between 0 and length() - 1.
+     * @return An object value.
+     * @throws JSONException If there is no value for the index.
+     */
+    public Object get(int index) throws JSONException {
+        Object object = this.opt(index);
+        if (object == null) {
+            throw new JSONException("JSONArray[" + index + "] not found.");
+        }
+        return object;
+    }
+
+
+    /**
+     * Get the boolean value associated with an index.
+     * The string values "true" and "false" are converted to boolean.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      The truth.
+     * @throws JSONException If there is no value for the index or if the
+     *  value is not convertible to boolean.
+     */
+    public boolean getBoolean(int index) throws JSONException {
+        Object object = this.get(index);
+        if (object.equals(Boolean.FALSE) ||
+                (object instanceof String &&
+                ((String)object).equalsIgnoreCase("false"))) {
+            return false;
+        } else if (object.equals(Boolean.TRUE) ||
+                (object instanceof String &&
+                ((String)object).equalsIgnoreCase("true"))) {
+            return true;
+        }
+        throw new JSONException("JSONArray[" + index + "] is not a boolean.");
+    }
+
+
+    /**
+     * Get the double value associated with an index.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      The value.
+     * @throws   JSONException If the key is not found or if the value cannot
+     *  be converted to a number.
+     */
+    public double getDouble(int index) throws JSONException {
+        Object object = this.get(index);
+        try {
+            return object instanceof Number
+                ? ((Number)object).doubleValue()
+                : Double.parseDouble((String)object);
+        } catch (Exception e) {
+            throw new JSONException("JSONArray[" + index +
+                "] is not a number.");
+        }
+    }
+
+
+    /**
+     * Get the int value associated with an index.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      The value.
+     * @throws   JSONException If the key is not found or if the value is not a number.
+     */
+    public int getInt(int index) throws JSONException {
+        Object object = this.get(index);
+        try {
+            return object instanceof Number
+                ? ((Number)object).intValue()
+                : Integer.parseInt((String)object);
+        } catch (Exception e) {
+            throw new JSONException("JSONArray[" + index +
+                "] is not a number.");
+        }
+    }
+
+
+    /**
+     * Get the JSONArray associated with an index.
+     * @param index The index must be between 0 and length() - 1.
+     * @return      A JSONArray value.
+     * @throws JSONException If there is no value for the index. or if the
+     * value is not a JSONArray
+     */
+    public JSONArray getJSONArray(int index) throws JSONException {
+        Object object = this.get(index);
+        if (object instanceof JSONArray) {
+            return (JSONArray)object;
+        }
+        throw new JSONException("JSONArray[" + index +
+                "] is not a JSONArray.");
+    }
+
+
+    /**
+     * Get the JSONObject associated with an index.
+     * @param index subscript
+     * @return      A JSONObject value.
+     * @throws JSONException If there is no value for the index or if the
+     * value is not a JSONObject
+     */
+    public JSONObject getJSONObject(int index) throws JSONException {
+        Object object = this.get(index);
+        if (object instanceof JSONObject) {
+            return (JSONObject)object;
+        }
+        throw new JSONException("JSONArray[" + index +
+            "] is not a JSONObject.");
+    }
+
+
+    /**
+     * Get the long value associated with an index.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      The value.
+     * @throws   JSONException If the key is not found or if the value cannot
+     *  be converted to a number.
+     */
+    public long getLong(int index) throws JSONException {
+        Object object = this.get(index);
+        try {
+            return object instanceof Number
+                ? ((Number)object).longValue()
+                : Long.parseLong((String)object);
+        } catch (Exception e) {
+            throw new JSONException("JSONArray[" + index +
+                "] is not a number.");
+        }
+    }
+
+
+    /**
+     * Get the string associated with an index.
+     * @param index The index must be between 0 and length() - 1.
+     * @return      A string value.
+     * @throws JSONException If there is no string value for the index.
+     */
+    public String getString(int index) throws JSONException {
+        Object object = this.get(index);
+        if (object instanceof String) {
+            return (String)object;
+        }
+        throw new JSONException("JSONArray[" + index + "] not a string.");
+    }
+
+
+    /**
+     * Determine if the value is null.
+     * @param index The index must be between 0 and length() - 1.
+     * @return true if the value at the index is null, or if there is no value.
+     */
+    public boolean isNull(int index) {
+        return JSONObject.NULL.equals(this.opt(index));
+    }
+
+
+    /**
+     * Make a string from the contents of this JSONArray. The
+     * <code>separator</code> string is inserted between each element.
+     * Warning: This method assumes that the data structure is acyclical.
+     * @param separator A string that will be inserted between the elements.
+     * @return a string.
+     * @throws JSONException If the array contains an invalid number.
+     */
+    public String join(String separator) throws JSONException {
+        int len = this.length();
+        StringBuffer sb = new StringBuffer();
+
+        for (int i = 0; i < len; i += 1) {
+            if (i > 0) {
+                sb.append(separator);
+            }
+            sb.append(JSONObject.valueToString(this.myArrayList.get(i)));
+        }
+        return sb.toString();
+    }
+
+
+    /**
+     * Get the number of elements in the JSONArray, included nulls.
+     *
+     * @return The length (or size).
+     */
+    public int length() {
+        return this.myArrayList.size();
+    }
+
+
+    /**
+     * Get the optional object value associated with an index.
+     * @param index The index must be between 0 and length() - 1.
+     * @return      An object value, or null if there is no
+     *              object at that index.
+     */
+    public Object opt(int index) {
+        return (index < 0 || index >= this.length())
+            ? null
+            : this.myArrayList.get(index);
+    }
+
+
+    /**
+     * Get the optional boolean value associated with an index.
+     * It returns false if there is no value at that index,
+     * or if the value is not Boolean.TRUE or the String "true".
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      The truth.
+     */
+    public boolean optBoolean(int index)  {
+        return this.optBoolean(index, false);
+    }
+
+
+    /**
+     * Get the optional boolean value associated with an index.
+     * It returns the defaultValue if there is no value at that index or if
+     * it is not a Boolean or the String "true" or "false" (case insensitive).
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @param defaultValue     A boolean default.
+     * @return      The truth.
+     */
+    public boolean optBoolean(int index, boolean defaultValue)  {
+        try {
+            return this.getBoolean(index);
+        } catch (Exception e) {
+            return defaultValue;
+        }
+    }
+
+
+    /**
+     * Get the optional double value associated with an index.
+     * NaN is returned if there is no value for the index,
+     * or if the value is not a number and cannot be converted to a number.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      The value.
+     */
+    public double optDouble(int index) {
+        return this.optDouble(index, Double.NaN);
+    }
+
+
+    /**
+     * Get the optional double value associated with an index.
+     * The defaultValue is returned if there is no value for the index,
+     * or if the value is not a number and cannot be converted to a number.
+     *
+     * @param index subscript
+     * @param defaultValue     The default value.
+     * @return      The value.
+     */
+    public double optDouble(int index, double defaultValue) {
+        try {
+            return this.getDouble(index);
+        } catch (Exception e) {
+            return defaultValue;
+        }
+    }
+
+
+    /**
+     * Get the optional int value associated with an index.
+     * Zero is returned if there is no value for the index,
+     * or if the value is not a number and cannot be converted to a number.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      The value.
+     */
+    public int optInt(int index) {
+        return this.optInt(index, 0);
+    }
+
+
+    /**
+     * Get the optional int value associated with an index.
+     * The defaultValue is returned if there is no value for the index,
+     * or if the value is not a number and cannot be converted to a number.
+     * @param index The index must be between 0 and length() - 1.
+     * @param defaultValue     The default value.
+     * @return      The value.
+     */
+    public int optInt(int index, int defaultValue) {
+        try {
+            return this.getInt(index);
+        } catch (Exception e) {
+            return defaultValue;
+        }
+    }
+
+
+    /**
+     * Get the optional JSONArray associated with an index.
+     * @param index subscript
+     * @return      A JSONArray value, or null if the index has no value,
+     * or if the value is not a JSONArray.
+     */
+    public JSONArray optJSONArray(int index) {
+        Object o = this.opt(index);
+        return o instanceof JSONArray ? (JSONArray)o : null;
+    }
+
+
+    /**
+     * Get the optional JSONObject associated with an index.
+     * Null is returned if the key is not found, or null if the index has
+     * no value, or if the value is not a JSONObject.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      A JSONObject value.
+     */
+    public JSONObject optJSONObject(int index) {
+        Object o = this.opt(index);
+        return o instanceof JSONObject ? (JSONObject)o : null;
+    }
+
+
+    /**
+     * Get the optional long value associated with an index.
+     * Zero is returned if there is no value for the index,
+     * or if the value is not a number and cannot be converted to a number.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      The value.
+     */
+    public long optLong(int index) {
+        return this.optLong(index, 0);
+    }
+
+
+    /**
+     * Get the optional long value associated with an index.
+     * The defaultValue is returned if there is no value for the index,
+     * or if the value is not a number and cannot be converted to a number.
+     * @param index The index must be between 0 and length() - 1.
+     * @param defaultValue     The default value.
+     * @return      The value.
+     */
+    public long optLong(int index, long defaultValue) {
+        try {
+            return this.getLong(index);
+        } catch (Exception e) {
+            return defaultValue;
+        }
+    }
+
+
+    /**
+     * Get the optional string value associated with an index. It returns an
+     * empty string if there is no value at that index. If the value
+     * is not a string and is not null, then it is coverted to a string.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @return      A String value.
+     */
+    public String optString(int index) {
+        return this.optString(index, "");
+    }
+
+
+    /**
+     * Get the optional string associated with an index.
+     * The defaultValue is returned if the key is not found.
+     *
+     * @param index The index must be between 0 and length() - 1.
+     * @param defaultValue     The default value.
+     * @return      A String value.
+     */
+    public String optString(int index, String defaultValue) {
+        Object object = this.opt(index);
+        return JSONObject.NULL.equals(object)
+ ? defaultValue : object
+                .toString();
+    }
+
+
+    /**
+     * Append a boolean value. This increases the array's length by one.
+     *
+     * @param value A boolean value.
+     * @return this.
+     */
+    public JSONArray put(boolean value) {
+        this.put(value ? Boolean.TRUE : Boolean.FALSE);
+        return this;
+    }
+
+
+    /**
+     * Put a value in the JSONArray, where the value will be a
+     * JSONArray which is produced from a Collection.
+     * @param value A Collection value.
+     * @return      this.
+     */
+    public JSONArray put(Collection value) {
+        this.put(new JSONArray(value));
+        return this;
+    }
+
+
+    /**
+     * Append a double value. This increases the array's length by one.
+     *
+     * @param value A double value.
+     * @throws JSONException if the value is not finite.
+     * @return this.
+     */
+    public JSONArray put(double value) throws JSONException {
+        Double d = new Double(value);
+        JSONObject.testValidity(d);
+        this.put(d);
+        return this;
+    }
+
+
+    /**
+     * Append an int value. This increases the array's length by one.
+     *
+     * @param value An int value.
+     * @return this.
+     */
+    public JSONArray put(int value) {
+        this.put(new Integer(value));
+        return this;
+    }
+
+
+    /**
+     * Append an long value. This increases the array's length by one.
+     *
+     * @param value A long value.
+     * @return this.
+     */
+    public JSONArray put(long value) {
+        this.put(new Long(value));
+        return this;
+    }
+
+
+    /**
+     * Put a value in the JSONArray, where the value will be a
+     * JSONObject which is produced from a Map.
+     * @param value A Map value.
+     * @return      this.
+     */
+    public JSONArray put(Map value) {
+        this.put(new JSONObject(value));
+        return this;
+    }
+
+
+    /**
+     * Append an object value. This increases the array's length by one.
+     * @param value An object value.  The value should be a
+     *  Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the
+     *  JSONObject.NULL object.
+     * @return this.
+     */
+    public JSONArray put(Object value) {
+        this.myArrayList.add(value);
+        return this;
+    }
+
+
+    /**
+     * Put or replace a boolean value in the JSONArray. If the index is greater
+     * than the length of the JSONArray, then null elements will be added as
+     * necessary to pad it out.
+     * @param index The subscript.
+     * @param value A boolean value.
+     * @return this.
+     * @throws JSONException If the index is negative.
+     */
+    public JSONArray put(int index, boolean value) throws JSONException {
+        this.put(index, value ? Boolean.TRUE : Boolean.FALSE);
+        return this;
+    }
+
+
+    /**
+     * Put a value in the JSONArray, where the value will be a
+     * JSONArray which is produced from a Collection.
+     * @param index The subscript.
+     * @param value A Collection value.
+     * @return      this.
+     * @throws JSONException If the index is negative or if the value is
+     * not finite.
+     */
+    public JSONArray put(int index, Collection value) throws JSONException {
+        this.put(index, new JSONArray(value));
+        return this;
+    }
+
+
+    /**
+     * Put or replace a double value. If the index is greater than the length of
+     *  the JSONArray, then null elements will be added as necessary to pad
+     *  it out.
+     * @param index The subscript.
+     * @param value A double value.
+     * @return this.
+     * @throws JSONException If the index is negative or if the value is
+     * not finite.
+     */
+    public JSONArray put(int index, double value) throws JSONException {
+        this.put(index, new Double(value));
+        return this;
+    }
+
+
+    /**
+     * Put or replace an int value. If the index is greater than the length of
+     *  the JSONArray, then null elements will be added as necessary to pad
+     *  it out.
+     * @param index The subscript.
+     * @param value An int value.
+     * @return this.
+     * @throws JSONException If the index is negative.
+     */
+    public JSONArray put(int index, int value) throws JSONException {
+        this.put(index, new Integer(value));
+        return this;
+    }
+
+
+    /**
+     * Put or replace a long value. If the index is greater than the length of
+     *  the JSONArray, then null elements will be added as necessary to pad
+     *  it out.
+     * @param index The subscript.
+     * @param value A long value.
+     * @return this.
+     * @throws JSONException If the index is negative.
+     */
+    public JSONArray put(int index, long value) throws JSONException {
+        this.put(index, new Long(value));
+        return this;
+    }
+
+
+    /**
+     * Put a value in the JSONArray, where the value will be a
+     * JSONObject that is produced from a Map.
+     * @param index The subscript.
+     * @param value The Map value.
+     * @return      this.
+     * @throws JSONException If the index is negative or if the the value is
+     *  an invalid number.
+     */
+    public JSONArray put(int index, Map value) throws JSONException {
+        this.put(index, new JSONObject(value));
+        return this;
+    }
+
+
+    /**
+     * Put or replace an object value in the JSONArray. If the index is greater
+     *  than the length of the JSONArray, then null elements will be added as
+     *  necessary to pad it out.
+     * @param index The subscript.
+     * @param value The value to put into the array. The value should be a
+     *  Boolean, Double, Integer, JSONArray, JSONObject, Long, or String, or the
+     *  JSONObject.NULL object.
+     * @return this.
+     * @throws JSONException If the index is negative or if the the value is
+     *  an invalid number.
+     */
+    public JSONArray put(int index, Object value) throws JSONException {
+        JSONObject.testValidity(value);
+        if (index < 0) {
+            throw new JSONException("JSONArray[" + index + "] not found.");
+        }
+        if (index < this.length()) {
+            this.myArrayList.set(index, value);
+        } else {
+            while (index != this.length()) {
+                this.put(JSONObject.NULL);
+            }
+            this.put(value);
+        }
+        return this;
+    }
+
+
+    /**
+     * Remove an index and close the hole.
+     * @param index The index of the element to be removed.
+     * @return The value that was associated with the index,
+     * or null if there was no value.
+     */
+    public Object remove(int index) {
+        Object o = this.opt(index);
+        this.myArrayList.remove(index);
+        return o;
+    }
+
+
+    /**
+     * Produce a JSONObject by combining a JSONArray of names with the values
+     * of this JSONArray.
+     * @param names A JSONArray containing a list of key strings. These will be
+     * paired with the values.
+     * @return A JSONObject, or null if there are no names or if this JSONArray
+     * has no values.
+     * @throws JSONException If any of the names are null.
+     */
+    public JSONObject toJSONObject(JSONArray names) throws JSONException {
+        if (names == null || names.length() == 0 || this.length() == 0) {
+            return null;
+        }
+        JSONObject jo = new JSONObject();
+        for (int i = 0; i < names.length(); i += 1) {
+            jo.put(names.getString(i), this.opt(i));
+        }
+        return jo;
+    }
+
+
+    /**
+     * Make a JSON text of this JSONArray. For compactness, no
+     * unnecessary whitespace is added. If it is not possible to produce a
+     * syntactically correct JSON text then null will be returned instead. This
+     * could occur if the array contains an invalid number.
+     * <p>
+     * Warning: This method assumes that the data structure is acyclical.
+     *
+     * @return a printable, displayable, transmittable
+     *  representation of the array.
+     */
+    public String toString() {
+        try {
+            return '[' + this.join(",") + ']';
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
+
+    /**
+     * Make a prettyprinted JSON text of this JSONArray.
+     * Warning: This method assumes that the data structure is acyclical.
+     * @param indentFactor The number of spaces to add to each level of
+     *  indentation.
+     * @return a printable, displayable, transmittable
+     *  representation of the object, beginning
+     *  with <code>[</code>&nbsp;<small>(left bracket)</small> and ending
+     *  with <code>]</code>&nbsp;<small>(right bracket)</small>.
+     * @throws JSONException
+     */
+    public String toString(int indentFactor) throws JSONException {
+        StringWriter sw = new StringWriter();
+        synchronized (sw.getBuffer()) {
+            return this.write(sw, indentFactor, 0).toString();
+        }
+    }
+
+    /**
+     * Write the contents of the JSONArray as JSON text to a writer. For
+     * compactness, no whitespace is added.
+     * <p>
+     * Warning: This method assumes that the data structure is acyclical.
+     *
+     * @return The writer.
+     * @throws JSONException
+     */
+    public Writer write(Writer writer) throws JSONException {
+        return this.write(writer, 0, 0);
+    }
+
+    /**
+     * Write the contents of the JSONArray as JSON text to a writer. For
+     * compactness, no whitespace is added.
+     * <p>
+     * Warning: This method assumes that the data structure is acyclical.
+     *
+     * @param indentFactor
+     *            The number of spaces to add to each level of indentation.
+     * @param indent
+     *            The indention of the top level.
+     * @return The writer.
+     * @throws JSONException
+     */
+    Writer write(Writer writer, int indentFactor, int indent)
+            throws JSONException {
+        try {
+            boolean commanate = false;
+            int length = this.length();
+            writer.write('[');
+
+            if (length == 1) {
+                JSONObject.writeValue(writer, this.myArrayList.get(0),
+                        indentFactor, indent);
+            } else if (length != 0) {
+                final int newindent = indent + indentFactor;
+
+                for (int i = 0; i < length; i += 1) {
+                    if (commanate) {
+                        writer.write(',');
+                    }
+                    if (indentFactor > 0) {
+                        writer.write('\n');
+                    }
+                    JSONObject.indent(writer, newindent);
+                    JSONObject.writeValue(writer, this.myArrayList.get(i),
+                            indentFactor, newindent);
+                    commanate = true;
+                }
+                if (indentFactor > 0) {
+                    writer.write('\n');
+                }
+                JSONObject.indent(writer, indent);
+            }
+            writer.write(']');
+            return writer;
+        } catch (IOException e) {
+           throw new JSONException(e);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONException.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONException.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONException.java
new file mode 100644
index 0000000..2695b39
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONException.java
@@ -0,0 +1,28 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/**
+ * The JSONException is thrown by the JSON.org classes when things are amiss.
+ * @author JSON.org
+ * @version 2010-12-24
+ */
+public class JSONException extends Exception {
+    private static final long serialVersionUID = 0;
+    private Throwable cause;
+
+    /**
+     * Constructs a JSONException with an explanatory message.
+     * @param message Detail about the reason for the exception.
+     */
+    public JSONException(String message) {
+        super(message);
+    }
+
+    public JSONException(Throwable cause) {
+        super(cause.getMessage());
+        this.cause = cause;
+    }
+
+    public Throwable getCause() {
+        return this.cause;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONML.java
----------------------------------------------------------------------
diff --git a/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONML.java b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONML.java
new file mode 100644
index 0000000..0ae24ff
--- /dev/null
+++ b/pulse/src/main/java/com/vmware/gemfire/tools/pulse/internal/json/JSONML.java
@@ -0,0 +1,467 @@
+package com.vmware.gemfire.tools.pulse.internal.json;
+
+/*
+Copyright (c) 2008 JSON.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+The Software shall be used for Good, not Evil.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+import java.util.Iterator;
+
+
+/**
+ * This provides static methods to convert an XML text into a JSONArray or
+ * JSONObject, and to covert a JSONArray or JSONObject into an XML text using
+ * the JsonML transform.
+ * 
+ * @author JSON.org
+ * @version 2012-03-28
+ */
+public class JSONML {
+
+    /**
+     * Parse XML values and store them in a JSONArray.
+     * @param x       The XMLTokener containing the source string.
+     * @param arrayForm true if array form, false if object form.
+     * @param ja      The JSONArray that is containing the current tag or null
+     *     if we are at the outermost level.
+     * @return A JSONArray if the value is the outermost tag, otherwise null.
+     * @throws JSONException
+     */
+    private static Object parse(
+        XMLTokener x,
+        boolean    arrayForm,
+        JSONArray  ja
+    ) throws JSONException {
+        String     attribute;
+        char       c;
+        String       closeTag = null;
+        int        i;
+        JSONArray  newja = null;
+        JSONObject newjo = null;
+        Object     token;
+        String       tagName = null;
+
+// Test for and skip past these forms:
+//      <!-- ... -->
+//      <![  ... ]]>
+//      <!   ...   >
+//      <?   ...  ?>
+
+        while (true) {
+            if (!x.more()) {
+                throw x.syntaxError("Bad XML");
+            }
+            token = x.nextContent();
+            if (token == XML.LT) {
+                token = x.nextToken();
+                if (token instanceof Character) {
+                    if (token == XML.SLASH) {
+
+// Close tag </
+
+                        token = x.nextToken();
+                        if (!(token instanceof String)) {
+                            throw new JSONException(
+                                    "Expected a closing name instead of '" +
+                                    token + "'.");
+                        }
+                        if (x.nextToken() != XML.GT) {
+                            throw x.syntaxError("Misshaped close tag");
+                        }
+                        return token;
+                    } else if (token == XML.BANG) {
+
+// <!
+
+                        c = x.next();
+                        if (c == '-') {
+                            if (x.next() == '-') {
+                                x.skipPast("-->");
+                            } else {
+                                x.back();
+                            }
+                        } else if (c == '[') {
+                            token = x.nextToken();
+                            if (token.equals("CDATA") && x.next() == '[') {
+                                if (ja != null) {
+                                    ja.put(x.nextCDATA());
+                                }
+                            } else {
+                                throw x.syntaxError("Expected 'CDATA['");
+                            }
+                        } else {
+                            i = 1;
+                            do {
+                                token = x.nextMeta();
+                                if (token == null) {
+                                    throw x.syntaxError("Missing '>' after '<!'.");
+                                } else if (token == XML.LT) {
+                                    i += 1;
+                                } else if (token == XML.GT) {
+                                    i -= 1;
+                                }
+                            } while (i > 0);
+                        }
+                    } else if (token == XML.QUEST) {
+
+// <?
+
+                        x.skipPast("?>");
+                    } else {
+                        throw x.syntaxError("Misshaped tag");
+                    }
+
+// Open tag <
+
+                } else {
+                    if (!(token instanceof String)) {
+                        throw x.syntaxError("Bad tagName '" + token + "'.");
+                    }
+                    tagName = (String)token;
+                    newja = new JSONArray();
+                    newjo = new JSONObject();
+                    if (arrayForm) {
+                        newja.put(tagName);
+                        if (ja != null) {
+                            ja.put(newja);
+                        }
+                    } else {
+                        newjo.put("tagName", tagName);
+                        if (ja != null) {
+                            ja.put(newjo);
+                        }
+                    }
+                    token = null;
+                    for (;;) {
+                        if (token == null) {
+                            token = x.nextToken();
+                        }
+                        if (token == null) {
+                            throw x.syntaxError("Misshaped tag");
+                        }
+                        if (!(token instanceof String)) {
+                            break;
+                        }
+
+// attribute = value
+
+                        attribute = (String)token;
+                        if (!arrayForm && ("tagName".equals(attribute) || "childNode".equals(attribute))) {
+                            throw x.syntaxError("Reserved attribute.");
+                        }
+                        token = x.nextToken();
+                        if (token == XML.EQ) {
+                            token = x.nextToken();
+                            if (!(token instanceof String)) {
+                                throw x.syntaxError("Missing value");
+                            }
+                            newjo.accumulate(attribute, XML.stringToValue((String)token));
+                            token = null;
+                        } else {
+                            newjo.accumulate(attribute, "");
+                        }
+                    }
+                    if (arrayForm && newjo.length() > 0) {
+                        newja.put(newjo);
+                    }
+
+// Empty tag <.../>
+
+                    if (token == XML.SLASH) {
+                        if (x.nextToken() != XML.GT) {
+                            throw x.syntaxError("Misshaped tag");
+                        }
+                        if (ja == null) {
+                            if (arrayForm) {
+                                return newja;
+                            } else {
+                                return newjo;
+                            }
+                        }
+
+// Content, between <...> and </...>
+
+                    } else {
+                        if (token != XML.GT) {
+                            throw x.syntaxError("Misshaped tag");
+                        }
+                        closeTag = (String)parse(x, arrayForm, newja);
+                        if (closeTag != null) {
+                            if (!closeTag.equals(tagName)) {
+                                throw x.syntaxError("Mismatched '" + tagName +
+                                        "' and '" + closeTag + "'");
+                            }
+                            tagName = null;
+                            if (!arrayForm && newja.length() > 0) {
+                                newjo.put("childNodes", newja);
+                            }
+                            if (ja == null) {
+                                if (arrayForm) {
+                                    return newja;
+                                } else {
+                                    return newjo;
+                                }
+                            }
+                        }
+                    }
+                }
+            } else {
+                if (ja != null) {
+                    ja.put(token instanceof String
+                        ? XML.stringToValue((String)token)
+                        : token);
+                }
+            }
+        }
+    }
+
+
+    /**
+     * Convert a well-formed (but not necessarily valid) XML string into a
+     * JSONArray using the JsonML transform. Each XML tag is represented as
+     * a JSONArray in which the first element is the tag name. If the tag has
+     * attributes, then the second element will be JSONObject containing the
+     * name/value pairs. If the tag contains children, then strings and
+     * JSONArrays will represent the child tags.
+     * Comments, prologs, DTDs, and <code>&lt;[ [ ]]></code> are ignored.
+     * @param string The source string.
+     * @return A JSONArray containing the structured data from the XML string.
+     * @throws JSONException
+     */
+    public static JSONArray toJSONArray(String string) throws JSONException {
+        return toJSONArray(new XMLTokener(string));
+    }
+
+
+    /**
+     * Convert a well-formed (but not necessarily valid) XML string into a
+     * JSONArray using the JsonML transform. Each XML tag is represented as
+     * a JSONArray in which the first element is the tag name. If the tag has
+     * attributes, then the second element will be JSONObject containing the
+     * name/value pairs. If the tag contains children, then strings and
+     * JSONArrays will represent the child content and tags.
+     * Comments, prologs, DTDs, and <code>&lt;[ [ ]]></code> are ignored.
+     * @param x An XMLTokener.
+     * @return A JSONArray containing the structured data from the XML string.
+     * @throws JSONException
+     */
+    public static JSONArray toJSONArray(XMLTokener x) throws JSONException {
+        return (JSONArray)parse(x, true, null);
+    }
+
+
+    /**
+     * Convert a well-formed (but not necessarily valid) XML string into a
+     * JSONObject using the JsonML transform. Each XML tag is represented as
+     * a JSONObject with a "tagName" property. If the tag has attributes, then
+     * the attributes will be in the JSONObject as properties. If the tag
+     * contains children, the object will have a "childNodes" property which
+     * will be an array of strings and JsonML JSONObjects.
+
+     * Comments, prologs, DTDs, and <code>&lt;[ [ ]]></code> are ignored.
+     * @param x An XMLTokener of the XML source text.
+     * @return A JSONObject containing the structured data from the XML string.
+     * @throws JSONException
+     */
+    public static JSONObject toJSONObject(XMLTokener x) throws JSONException {
+           return (JSONObject)parse(x, false, null);
+    }
+
+
+    /**
+     * Convert a well-formed (but not necessarily valid) XML string into a
+     * JSONObject using the JsonML transform. Each XML tag is represented as
+     * a JSONObject with a "tagName" property. If the tag has attributes, then
+     * the attributes will be in the JSONObject as properties. If the tag
+     * contains children, the object will have a "childNodes" property which
+     * will be an array of strings and JsonML JSONObjects.
+
+     * Comments, prologs, DTDs, and <code>&lt;[ [ ]]></code> are ignored.
+     * @param string The XML source text.
+     * @return A JSONObject containing the structured data from the XML string.
+     * @throws JSONException
+     */
+    public static JSONObject toJSONObject(String string) throws JSONException {
+        return toJSONObject(new XMLTokener(string));
+    }
+
+
+    /**
+     * Reverse the JSONML transformation, making an XML text from a JSONArray.
+     * @param ja A JSONArray.
+     * @return An XML string.
+     * @throws JSONException
+     */
+    public static String toString(JSONArray ja) throws JSONException {
+        int             i;
+        JSONObject   jo;
+        String       key;
+        Iterator     keys;
+        int             length;
+        Object         object;
+        StringBuffer sb = new StringBuffer();
+        String       tagName;
+        String       value;
+
+// Emit <tagName
+
+        tagName = ja.getString(0);
+        XML.noSpace(tagName);
+        tagName = XML.escape(tagName);
+        sb.append('<');
+        sb.append(tagName);
+
+        object = ja.opt(1);
+        if (object instanceof JSONObject) {
+            i = 2;
+            jo = (JSONObject)object;
+
+// Emit the attributes
+
+            keys = jo.keys();
+            while (keys.hasNext()) {
+                key = keys.next().toString();
+                XML.noSpace(key);
+                value = jo.optString(key);
+                if (value != null) {
+                    sb.append(' ');
+                    sb.append(XML.escape(key));
+                    sb.append('=');
+                    sb.append('"');
+                    sb.append(XML.escape(value));
+                    sb.append('"');
+                }
+            }
+        } else {
+            i = 1;
+        }
+
+//Emit content in body
+
+        length = ja.length();
+        if (i >= length) {
+            sb.append('/');
+            sb.append('>');
+        } else {
+            sb.append('>');
+            do {
+                object = ja.get(i);
+                i += 1;
+                if (object != null) {
+                    if (object instanceof String) {
+                        sb.append(XML.escape(object.toString()));
+                    } else if (object instanceof JSONObject) {
+                        sb.append(toString((JSONObject)object));
+                    } else if (object instanceof JSONArray) {
+                        sb.append(toString((JSONArray)object));
+                    }
+                }
+            } while (i < length);
+            sb.append('<');
+            sb.append('/');
+            sb.append(tagName);
+            sb.append('>');
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Reverse the JSONML transformation, making an XML text from a JSONObject.
+     * The JSONObject must contain a "tagName" property. If it has children,
+     * then it must have a "childNodes" property containing an array of objects.
+     * The other properties are attributes with string values.
+     * @param jo A JSONObject.
+     * @return An XML string.
+     * @throws JSONException
+     */
+    public static String toString(JSONObject jo) throws JSONException {
+        StringBuffer sb = new StringBuffer();
+        int          i;
+        JSONArray    ja;
+        String       key;
+        Iterator     keys;
+        int          length;
+        Object         object;
+        String       tagName;
+        String       value;
+
+//Emit <tagName
+
+        tagName = jo.optString("tagName");
+        if (tagName == null) {
+            return XML.escape(jo.toString());
+        }
+        XML.noSpace(tagName);
+        tagName = XML.escape(tagName);
+        sb.append('<');
+        sb.append(tagName);
+
+//Emit the attributes
+
+        keys = jo.keys();
+        while (keys.hasNext()) {
+            key = keys.next().toString();
+            if (!"tagName".equals(key) && !"childNodes".equals(key)) {
+                XML.noSpace(key);
+                value = jo.optString(key);
+                if (value != null) {
+                    sb.append(' ');
+                    sb.append(XML.escape(key));
+                    sb.append('=');
+                    sb.append('"');
+                    sb.append(XML.escape(value));
+                    sb.append('"');
+                }
+            }
+        }
+
+//Emit content in body
+
+        ja = jo.optJSONArray("childNodes");
+        if (ja == null) {
+            sb.append('/');
+            sb.append('>');
+        } else {
+            sb.append('>');
+            length = ja.length();
+            for (i = 0; i < length; i += 1) {
+                object = ja.get(i);
+                if (object != null) {
+                    if (object instanceof String) {
+                        sb.append(XML.escape(object.toString()));
+                    } else if (object instanceof JSONObject) {
+                        sb.append(toString((JSONObject)object));
+                    } else if (object instanceof JSONArray) {
+                        sb.append(toString((JSONArray)object));
+                    } else {
+                        sb.append(object.toString());
+                    }
+                }
+            }
+            sb.append('<');
+            sb.append('/');
+            sb.append(tagName);
+            sb.append('>');
+        }
+        return sb.toString();
+    }
+}


[03/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/selectbox-customize/jquery.sb.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/selectbox-customize/jquery.sb.js b/pulse/src/main/webapp/scripts/selectbox-customize/jquery.sb.js
new file mode 100644
index 0000000..4235f5e
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/selectbox-customize/jquery.sb.js
@@ -0,0 +1,864 @@
+(function( $, window, undefined ) {
+    // utility functions
+    $.fn.borderWidth = function() { return $(this).outerWidth() - $(this).innerWidth(); };
+    $.fn.paddingWidth = function() { return $(this).innerWidth() - $(this).width(); };
+    $.fn.extraWidth = function() { return $(this).outerWidth(true) - $(this).width(); };
+    $.fn.offsetFrom = function( e ) {
+        var $e = $(e);
+        return {
+            left: $(this).offset().left - $e.offset().left,
+            top: $(this).offset().top - $e.offset().top
+        };
+    };
+    $.fn.maxWidth = function() {
+        var max = 0;
+        $(this).each(function() {
+            if($(this).width() > max) {
+              max = $(this).width();
+            }
+        });
+        return max;
+    };
+    $.fn.triggerAll = function(event, params) {
+      return $(this).each(function() {
+        $(this).triggerHandler(event, params);
+      });
+    };
+    var aps = Array.prototype.slice,
+        randInt = function() {
+            return Math.floor(Math.random() * 999999999);
+        };
+    
+    // jQuery-Proto
+    $.proto = function() {
+        var name = arguments[0],    // The name of the jQuery function that will be called
+            clazz = arguments[1],   // A reference to the class that you are associating
+            klazz = clazz,          // A version of clazz with a delayed constructor
+            extOpt = {},            // used to extend clazz with a variable name for the init function
+            undefined;              // safety net
+        
+        opts = $.extend({
+            elem: "elem",           // the property name on the object that will be set to the current jQuery context
+            access: "access",       // the name of the access function to be set on the object
+            init: "init",           // the name of the init function to be set on the object
+            instantAccess: false    // when true, treat all args as access args (ignore constructor args) and allow construct/function call at the same time
+        }, arguments[2]);
+        
+        if(clazz._super) {
+            extOpt[opts.init] = function(){};
+            klazz = clazz.extend(extOpt);
+        }
+        
+        $.fn[name] = function() {
+            var result, args = arguments;
+                
+            $(this).each(function() {
+                var $e = $(this),
+                    obj = $e.data(name),
+                    isNew = !obj;
+                
+                // if the object is not defined for this element, then construct
+                if(isNew) {
+                    
+                    // create the new object and restore init if necessary
+                    obj = new klazz();
+                    if(clazz._super) {
+                      obj[opts.init] = clazz.prototype.init;
+                    }
+                    
+                    // set the elem property and initialize the object
+                    obj[opts.elem] = $e[0];
+                    if(obj[opts.init]) {
+                        obj[opts.init].apply(obj, opts.instantAccess ? [] : aps.call(args, 0));
+                    }
+                    
+                    // associate it with the element
+                    $e.data(name, obj);
+                    
+                }
+                
+                // if it is defined or we allow instance access, then access
+                if(!isNew || opts.instantAccess) {
+                  
+                    // call the access function if it exists (allows lazy loading)
+                    if(obj[opts.access]) {
+                        obj[opts.access].apply(obj, aps.call(args, 0));
+                    }
+                    
+                    // do something with the object
+                    if(args.length > 0) {
+                    
+                        if($.isFunction(obj[args[0]])) {
+                        
+                            // use the method access interface
+                            result = obj[args[0]].apply(obj, aps.call(args, 1));
+                            
+                        } else if(args.length === 1) {
+                          
+                            // just retrieve the property (leverage deep access with getObject if we can)
+                            if($.getObject) {
+                              result = $.getObject(args[0], obj);
+                            } else {
+                              result = obj[args[0]];
+                            }
+                            
+                        } else {
+                          
+                            // set the property (leverage deep access with setObject if we can)
+                            if($.setObject) {
+                              $.setObject(args[0], args[1], obj);
+                            } else {
+                              obj[args[0]] = args[1];
+                            }
+                            
+                        }
+                        
+                    } else if(result === undefined) {
+                    
+                        // return the first object if there are no args
+                        result = $e.data(name);
+                        
+                    }
+                }
+            });
+            
+            // chain if no results were returned from the clazz's method (it's a setter)
+            if(result === undefined) {
+              return $(this);
+            }
+            
+            // return the first result if not chaining
+            return result;
+        };
+    };
+    
+    var falseFunc = function() {
+            return false;
+        },
+        SelectBox = function() {
+        
+        var self = this,
+            o = {},
+            $orig = null,
+            $label = null,
+            $sb = null,
+            $display = null,
+            $dd = null,
+            $items = null,
+            searchTerm = "",
+            cstTimeout = null,
+            delayReloadTimeout = null,
+            resizeTimeout = null,
+            
+            // functions
+            loadSB,
+            createOption,
+            focusOrig,
+            blurOrig,
+            destroySB,
+            reloadSB,
+            delayReloadSB,
+            openSB,
+            centerOnSelected,
+            closeSB,
+            positionSB,
+            positionSBIfOpen,
+            delayPositionSB,
+            clickSB,
+            clickSBItem,
+            keyupSB,
+            keydownSB,
+            focusSB,
+            blurSB,
+            addHoverState,
+            removeHoverState,
+            addActiveState,
+            removeActiveState,
+            getDDCtx,
+            getSelected,
+            getEnabled,
+            selectItem,
+            clearSearchTerm,
+            findMatchingItem,
+            selectMatchingItem,
+            selectNextItemStartsWith,
+            closeAll,
+            closeAllButMe,
+            closeAndUnbind,
+            blurAllButMe,
+            stopPageHotkeys,
+            flickerDisplay,
+            unbind;
+        
+        loadSB = function() {
+            
+            // create the new sb
+            $sb = $("<div class='sb " + o.selectboxClass + " " + $orig.attr("class") + "' id='sb" + randInt() + "'></div>")
+                .attr("role", "listbox")
+                .attr("aria-has-popup", "true")
+                .attr("aria-labelledby", $label.attr("id") ? $label.attr("id") : "");
+            $("body").append($sb);
+            
+            // generate the display markup
+            var displayMarkup = $orig.children().size() > 0
+                ? o.displayFormat.call($orig.find("option:selected")[0], 0, 0)
+                : "&nbsp;";
+            $display = $("<div class='display " + $orig.attr("class") + "' id='sbd" + randInt() + "'></div>")
+                .append($("<div class='text'></div>").append(displayMarkup))
+                .append(o.arrowMarkup);
+            $sb.append($display);
+            
+            // generate the dropdown markup
+            $dd = $("<ul class='" + o.selectboxClass + " items " + $orig.attr("class") + "' role='menu' id='sbdd" + randInt() + "'></ul>")
+                .attr("aria-hidden", "true");
+            $sb.append($dd)
+                .attr("aria-owns", $dd.attr("id"));
+            if($orig.children().size() === 0) {
+                $dd.append(createOption().addClass("selected"));
+            } else {
+                $orig.children().each(function( i ) {
+                    var $opt, $og, $ogItem, $ogList;
+                    if($(this).is("optgroup")) {
+                        $og = $(this);
+                        $ogItem = $("<li class='optgroup'>" + o.optgroupFormat.call($og[0], i+1) + "</li>")
+                            .addClass($og.is(":disabled") ? "disabled" : "")
+                            .attr("aria-disabled", $og.is(":disabled") ? "true" : "");
+                        $ogList = $("<ul class='items'></ul>");
+                        $ogItem.append($ogList);
+                        $dd.append($ogItem);
+                        $og.children("option").each(function() {
+                            $opt = createOption($(this), i)
+                                .addClass($og.is(":disabled") ? "disabled" : "")
+                                .attr("aria-disabled", $og.is(":disabled") ? "true" : "");
+                            $ogList.append($opt);
+                        });
+                    } else {
+                        $dd.append(createOption($(this), i));
+                    }
+                });
+            }
+            
+            // cache all sb items
+            $items = $dd.find("li").not(".optgroup");
+            
+            // for accessibility/styling
+            $sb.attr("aria-active-descendant", $items.filter(".selected").attr("id"));
+            $dd.children(":first").addClass("first");
+            $dd.children(":last").addClass("last");
+            
+            // modify width based on fixedWidth/maxWidth options
+            if(!o.fixedWidth) {
+                var largestWidth = $dd.find(".text, .optgroup").maxWidth() + $display.extraWidth() + 1;
+                $sb.width(o.maxWidth ? Math.min(o.maxWidth, largestWidth) : largestWidth);
+            } else if(o.maxWidth && $sb.width() > o.maxWidth) {
+                $sb.width(o.maxWidth);
+            }
+            
+            // place the new markup in its semantic location (hide/show fixes positioning bugs)
+            $orig.before($sb).addClass("has_sb").hide().show();
+            
+            // these two lines fix a div/span display bug on load in ie7
+            positionSB();
+            flickerDisplay();
+            
+            // hide the dropdown now that it's initialized
+            $dd.hide();
+            
+            // bind events
+            if(!$orig.is(":disabled")) {
+                $orig
+                    .bind("blur.sb", blurOrig)
+                    .bind("focus.sb", focusOrig);
+                $display
+                    .mouseup(addActiveState)
+                    .mouseup(clickSB)
+                    .click(falseFunc)
+                    .focus(focusSB)
+                    .blur(blurSB)
+                    .hover(addHoverState, removeHoverState);
+                getEnabled()
+                    .click(clickSBItem)
+                    .hover(addHoverState, removeHoverState);
+                $dd.find(".optgroup")
+                    .hover(addHoverState, removeHoverState)
+                    .click(falseFunc);
+                $items.filter(".disabled")
+                    .click(falseFunc);
+                if(!$.browser.msie || $.browser.version >= 9) {
+                    $(window).resize($.throttle ? $.throttle(100, positionSBIfOpen) : delayPositionSB);
+                }
+            } else {
+                $sb.addClass("disabled").attr("aria-disabled");
+                $display.click(function( e ) { e.preventDefault(); });
+            }
+            
+            // bind custom events
+            $sb.bind("close.sb", closeSB).bind("destroy.sb", destroySB);
+            $orig.bind("reload.sb", reloadSB);
+            if($.fn.tie && o.useTie) {
+                $orig.bind("domupdate.sb", delayReloadSB);
+            }
+        };
+        
+        delayPositionSB = function() {
+            clearTimeout(resizeTimeout);
+            resizeTimeout = setTimeout(positionSBIfOpen, 50);
+        };
+        
+        positionSBIfOpen = function() {
+            if($sb.is(".open")) {
+                positionSB();
+                openSB(true);
+            }
+        }
+        
+        // create new markup from an <option>
+        createOption = function( $option, index ) {
+            if(!$option) { 
+                $option = $("<option value=''>&nbsp;</option>");
+                index = 0;
+            }
+            var $li = $("<li id='sbo" + randInt() + "'></li>")
+                    .attr("role", "option")
+                    .data("orig", $option[0])
+                    .data("value", $option ? $option.attr("value") : "")
+                    .addClass($option.is(":selected") ? "selected" : "")
+                    .addClass($option.is(":disabled") ? "disabled" : "")
+                    .attr("aria-disabled", $option.is(":disabled") ? "true" : ""),
+                $inner = $("<div class='item'></div>"),
+                $text = $("<div class='text'></div>")
+                    .html(o.optionFormat.call($option[0], 0, index + 1));
+            return $li.append($inner.append($text));
+        };
+        
+        // causes focus if original is focused
+        focusOrig = function() {
+            blurAllButMe();
+            $display.triggerHandler("focus");
+        };
+        
+        // loses focus if original is blurred
+        blurOrig = function() {
+            if(!$sb.is(".open")) {
+                $display.triggerHandler("blur");
+            }
+        };
+        
+        // unbind and remove
+        destroySB = function( internal ) {
+            $sb.remove();
+            $orig
+                .unbind(".sb")
+                .removeClass("has_sb");
+            $(window).unbind("resize", delayPositionSB);
+            if(!internal) {
+                $orig.removeData("sb");
+            }
+        };
+        
+        // destroy then load, maintaining open/focused state if applicable
+        reloadSB = function() {
+            var isOpen = $sb.is(".open"),
+                isFocused = $display.is(".focused");
+            closeSB(true);
+            destroySB(true);
+            self.init(o);
+            if(isOpen) {
+                $orig.focus();
+                openSB(true);
+            } else if(isFocused) {
+                $orig.focus();
+            }
+        };
+        
+        // debouncing when useTie === true
+        delayReloadSB = function() {
+            clearTimeout(delayReloadTimeout);
+            delayReloadTimeout = setTimeout(reloadSB, 30);
+        };
+        
+        // when the user clicks outside the sb
+        closeAndUnbind = function() {
+            $sb.removeClass("focused");
+            closeSB();
+            unbind();
+        };
+        
+        unbind = function() {
+          $(document)
+              .unbind("click", closeAndUnbind)
+              .unbind("keyup", keyupSB)
+              .unbind("keypress", stopPageHotkeys)
+              .unbind("keydown", stopPageHotkeys)
+              .unbind("keydown", keydownSB);
+        };
+        
+        // trigger all sbs to close
+        closeAll = function() {
+            $(".sb.open." + o.selectboxClass).triggerAll("close");
+        };
+        
+        // trigger all sbs to blur
+        blurAllButMe = function() {
+            $(".sb.focused." + o.selectboxClass).not($sb[0]).find(".display").blur();
+        };
+        
+        // to prevent multiple selects open at once
+        closeAllButMe = function() {
+            $(".sb.open." + o.selectboxClass).not($sb[0]).triggerAll("close");
+        };
+        
+        // hide and reset dropdown markup
+        closeSB = function( instantClose ) {
+            if($sb.is(".open")) {
+                $display.blur();
+                $items.removeClass("hover");
+                unbind();
+                $dd.attr("aria-hidden", "true");
+                if(instantClose === true) {
+                  $dd.hide();
+                  $sb.removeClass("open");
+                  $sb.append($dd);
+                } else {
+                    $dd.fadeOut(o.animDuration, function() {
+                        $sb.removeClass("open");
+                        $sb.append($dd);
+                    });
+                }
+            }
+        };
+        
+        // since the context can change, we should get it dynamically
+        getDDCtx = function() {
+            var $ddCtx = null;
+            if(o.ddCtx === "self") {
+                $ddCtx = $sb;
+            } else if($.isFunction(o.ddCtx)) {
+                $ddCtx = $(o.ddCtx.call($orig[0]));
+            } else {
+                $ddCtx = $(o.ddCtx);
+            }
+            return $ddCtx;
+        };
+        
+        // DRY
+        getSelected = function() {
+          return $items.filter(".selected");
+        };
+        
+        // DRY
+        getEnabled = function() {
+          return $items.not(".disabled");
+        };
+        
+        // reposition the scroll of the dropdown so the selected option is centered (or appropriately onscreen)
+        centerOnSelected = function() {
+            $dd.scrollTop($dd.scrollTop() + getSelected().offsetFrom($dd).top - $dd.height() / 2 + getSelected().outerHeight(true) / 2);
+        };
+        
+        flickerDisplay = function() {
+            if($.browser.msie && $.browser.version < 8) {
+                $("." + o.selectboxClass + " .display").hide().show(); // fix ie7 display bug
+            }
+        };
+        
+        // show, reposition, and reset dropdown markup
+        openSB = function( instantOpen ) {
+            var dir,
+                $ddCtx = getDDCtx();
+            blurAllButMe();
+            $sb.addClass("open");
+            $ddCtx.append($dd);
+            dir = positionSB();
+            $dd.attr("aria-hidden", "false");
+            if(instantOpen === true) {
+                $dd.show();
+                centerOnSelected();
+            } else if(dir === "down") {
+                $dd.slideDown(o.animDuration, centerOnSelected);
+            } else {
+                $dd.fadeIn(o.animDuration, centerOnSelected);
+            }
+            $orig.focus();
+        };
+        
+        // position dropdown based on collision detection
+        positionSB = function() {
+            var $ddCtx = getDDCtx(),
+                ddMaxHeight = 0,
+                ddX = $display.offsetFrom($ddCtx).left,
+                ddY = 0,
+                dir = "",
+                ml, mt,
+                bottomSpace, topSpace,
+                bottomOffset, spaceDiff,
+                bodyX, bodyY;
+            
+            // modify dropdown css for getting values
+            $dd.removeClass("above");
+            $dd.show().css({
+                maxHeight: "none",
+                position: "relative",
+                visibility: "hidden"
+            });
+            if(!o.fixedWidth) {
+              $dd.width($display.outerWidth() - $dd.extraWidth() + 1);
+            }
+            
+            // figure out if we should show above/below the display box
+            bottomSpace = $(window).scrollTop() + $(window).height() - $display.offset().top - $display.outerHeight();
+            topSpace = $display.offset().top - $(window).scrollTop();
+            bottomOffset = $display.offsetFrom($ddCtx).top + $display.outerHeight();
+            spaceDiff = bottomSpace - topSpace + o.dropupThreshold;
+            if($dd.outerHeight() < bottomSpace) {
+                ddMaxHeight = o.maxHeight ? o.maxHeight : bottomSpace;
+                ddY = bottomOffset;
+                dir = "down";
+            } else if($dd.outerHeight() < topSpace) {
+                ddMaxHeight = o.maxHeight ? o.maxHeight : topSpace;
+                ddY = $display.offsetFrom($ddCtx).top - Math.min(ddMaxHeight, $dd.outerHeight());
+                dir = "up";
+            } else if(spaceDiff >= 0) {
+                ddMaxHeight = o.maxHeight ? o.maxHeight : bottomSpace;
+                ddY = bottomOffset;
+                dir = "down";
+            } else if(spaceDiff < 0) {
+                ddMaxHeight = o.maxHeight ? o.maxHeight : topSpace;
+                ddY = $display.offsetFrom($ddCtx).top - Math.min(ddMaxHeight, $dd.outerHeight());
+                dir = "up";
+            } else {
+                ddMaxHeight = o.maxHeight ? o.maxHeight : "none";
+                ddY = bottomOffset;
+                dir = "down";
+            }
+            
+            ml = ("" + $("body").css("margin-left")).match(/^\d+/) ? $("body").css("margin-left") : 0;
+            mt = ("" + $("body").css("margin-top")).match(/^\d+/) ? $("body").css("margin-top") : 0;
+            bodyX = $().jquery >= "1.4.2"
+                ? parseInt(ml)
+                : $("body").offset().left;
+            bodyY = $().jquery >= "1.4.2"
+                ? parseInt(mt)
+                : $("body").offset().top;
+            
+            
+            // modify dropdown css for display
+            $dd.hide().css({
+                left: ddX + ($ddCtx.is("body") ? bodyX : 0),
+                maxHeight: ddMaxHeight,
+                position: "absolute",
+                top: ddY + ($ddCtx.is("body") ? bodyY : 0),
+                visibility: "visible"
+            });
+            if(dir === "up") {
+              $dd.addClass("above");
+            }
+            return dir;
+        };
+        
+        // when the user explicitly clicks the display
+        clickSB = function( e ) {
+            if($sb.is(".open")) {
+                closeSB();
+            } else {
+                openSB();
+            }
+            return false;
+        };
+        
+        // when the user selects an item in any manner
+        selectItem = function() {
+            var $item = $(this),
+                oldVal = $orig.val(),
+                newVal = $item.data("value");
+            
+            // update the original <select>
+            $orig.find("option").each(function() { this.selected = false; });
+            $($item.data("orig")).each(function() { this.selected = true; });
+            
+            // change the selection to this item
+            $items.removeClass("selected");
+            $item.addClass("selected");
+            $sb.attr("aria-active-descendant", $item.attr("id"));
+            
+            // update the title attr and the display markup
+            $display.find(".text").attr("title", $item.find(".text").html());
+            $display.find(".text").html(o.displayFormat.call($item.data("orig")));
+            
+            // trigger change on the old <select> if necessary
+            if(oldVal !== newVal) {
+                $orig.change();
+            }
+        };
+        
+        // when the user explicitly clicks an item
+        clickSBItem = function( e ) {
+            closeAndUnbind();
+            $orig.focus();
+            selectItem.call(this);
+            return false;
+        };
+        
+        // start over for generating the search term
+        clearSearchTerm = function() {
+            searchTerm = "";
+        };
+        
+        // iterate over all the options to see if any match the search term
+        findMatchingItem = function( term ) {
+            var i, t, $tNode,
+                $available = getEnabled();
+            for(i=0; i < $available.size(); i++) {
+                $tNode = $available.eq(i).find(".text");
+                t = $tNode.children().size() == 0 ? $tNode.text() : $tNode.find("*").text();
+                if(term.length > 0 && t.toLowerCase().match("^" + term.toLowerCase())) {
+                    return $available.eq(i);
+                }
+            }
+            return null;
+        };
+        
+        // if we get a match for any options, select it
+        selectMatchingItem = function( text ) {
+            var $matchingItem = findMatchingItem(text);
+            if($matchingItem !== null) {
+                selectItem.call($matchingItem[0]);
+                return true;
+            }
+            return false;
+        };
+        
+        // stop up/down/backspace/space from moving the page
+        stopPageHotkeys = function( e ) {
+            if(e.ctrlKey || e.altKey) {
+                return;
+            }
+            if(e.which === 38 || e.which === 40 || e.which === 8 || e.which === 32) {
+                e.preventDefault();
+            }
+        };
+        
+        // if a normal match fails, try matching the next element that starts with the pressed letter
+        selectNextItemStartsWith = function( c ) {
+            var i, t,
+                $selected = getSelected(),
+                $available = getEnabled();
+            for(i = $available.index($selected) + 1; i < $available.size(); i++) {
+                t = $available.eq(i).find(".text").text();
+                if(t !== "" && t.substring(0,1).toLowerCase() === c.toLowerCase()) {
+                    selectItem.call($available.eq(i)[0]);
+                    return true;
+                }
+            }
+            return false;
+        };
+        
+        // go up/down using arrows or attempt to autocomplete based on string
+        keydownSB = function( e ) {
+            if(e.altKey || e.ctrlKey) {
+                return false;
+            }
+            var $selected = getSelected(),
+                $enabled = getEnabled();
+            switch(e.which) {
+            case 9: // tab
+                closeSB();
+                blurSB();
+                break;
+            case 35: // end
+                if($selected.size() > 0) {
+                    e.preventDefault();
+                    selectItem.call($enabled.filter(":last")[0]);
+                    centerOnSelected();
+                }
+                break;
+            case 36: // home
+                if($selected.size() > 0) {
+                    e.preventDefault();
+                    selectItem.call($enabled.filter(":first")[0]);
+                    centerOnSelected();
+                }
+                break;
+            case 38: // up
+                if($selected.size() > 0) {
+                    if($enabled.filter(":first")[0] !== $selected[0]) {
+                        e.preventDefault();
+                        selectItem.call($enabled.eq($enabled.index($selected)-1)[0]);
+                    }
+                    centerOnSelected();
+                }
+                break;
+            case 40: // down
+                if($selected.size() > 0) {
+                    if($enabled.filter(":last")[0] !== $selected[0]) {
+                        e.preventDefault();
+                        selectItem.call($enabled.eq($enabled.index($selected)+1)[0]);
+                        centerOnSelected();
+                    }
+                } else if($items.size() > 1) {
+                    e.preventDefault();
+                    selectItem.call($items.eq(0)[0]);
+                }
+                break;
+            default:
+                break;
+            }
+        };
+        
+        // the user is typing -- try to select an item based on what they press
+        keyupSB = function( e ) {
+            if(e.altKey || e.ctrlKey) {
+              return false;
+            }
+            if(e.which !== 38 && e.which !== 40) {
+                
+                // add to the search term
+                searchTerm += String.fromCharCode(e.keyCode);
+                
+                if(selectMatchingItem(searchTerm)) {
+                
+                    // we found a match, continue with the current search term
+                    clearTimeout(cstTimeout);
+                    cstTimeout = setTimeout(clearSearchTerm, o.acTimeout);
+                    
+                } else if(selectNextItemStartsWith(String.fromCharCode(e.keyCode))) {
+                    
+                    // we selected the next item that starts with what you just pressed
+                    centerOnSelected();
+                    clearTimeout(cstTimeout);
+                    cstTimeout = setTimeout(clearSearchTerm, o.acTimeout);
+                    
+                } else {
+                    
+                    // no matches were found, clear everything
+                    clearSearchTerm();
+                    clearTimeout(cstTimeout);
+                    
+                }
+            }
+        };
+        
+        // when the sb is focused (by tab or click), allow hotkey selection and kill all other selectboxes
+        focusSB = function() {
+            closeAllButMe();
+            $sb.addClass("focused");
+            $(document)
+                .click(closeAndUnbind)
+                .keyup(keyupSB)
+                .keypress(stopPageHotkeys)
+                .keydown(stopPageHotkeys)
+                .keydown(keydownSB);
+        };
+        
+        // when the sb is blurred (by tab or click), disable hotkey selection
+        blurSB = function() {
+            $sb.removeClass("focused");
+            $display.removeClass("active");
+            $(document)
+                .unbind("keyup", keyupSB)
+                .unbind("keydown", stopPageHotkeys)
+                .unbind("keypress", stopPageHotkeys)
+                .unbind("keydown", keydownSB);
+        };
+        
+        // add hover class to an element
+        addHoverState = function() {
+          $(this).addClass("hover");
+        };
+        
+        // remove hover class from an element
+        removeHoverState = function() {
+          $(this).removeClass("hover");
+        };
+        
+        // add active class to the display
+        addActiveState = function() {
+          $display.addClass("active");
+          $(document).bind("mouseup", removeActiveState);
+        };
+        
+        // remove active class from an element
+        removeActiveState = function() {
+          $display.removeClass("active");
+          $(document).unbind("mouseup", removeActiveState);
+        };
+        
+        // constructor
+        this.init = function( opts ) {
+            
+            // this plugin is not compatible with IE6 and below;
+            // a normal <select> will be displayed for old browsers
+            if($.browser.msie && $.browser.version < 7) {
+              return;
+            }
+        
+            // get the original <select> and <label>
+            $orig = $(this.elem);
+            if($orig.attr("id")) {
+                $label = $("label[for='" + $orig.attr("id") + "']:first");
+            }
+            if(!$label || $label.size() === 0) {
+                $label = $orig.closest("label");
+            }
+            
+            // don't create duplicate SBs
+            if($orig.hasClass("has_sb")) {
+                return;
+            }
+            
+            // set the various options
+            o = $.extend({
+                acTimeout: 800,               // time between each keyup for the user to create a search string
+                animDuration: 200,            // time to open/close dropdown in ms
+                ddCtx: 'body',                // body | self | any selector | a function that returns a selector (the original select is the context)
+                dropupThreshold: 150,         // the minimum amount of extra space required above the selectbox for it to display a dropup
+                fixedWidth: false,            // if false, dropdown expands to widest and display conforms to whatever is selected
+                maxHeight: false,             // if an integer, show scrollbars if the dropdown is too tall
+                maxWidth: false,              // if an integer, prevent the display/dropdown from growing past this width; longer items will be clipped
+                selectboxClass: 'selectbox',  // class to apply our markup
+                useTie: false,                // if jquery.tie is included and this is true, the selectbox will update dynamically
+                
+                // markup appended to the display, typically for styling an arrow
+                arrowMarkup: "<div class='arrow_btn'><span class='arrow'></span></div>",
+                
+                // use optionFormat by default
+                displayFormat: undefined,
+                
+                // formatting for the display; note that it will be wrapped with <a href='#'><span class='text'></span></a>
+                optionFormat: function( ogIndex, optIndex ) {
+                    if($(this).size() > 0) {
+                        var label = $(this).attr("label");
+                        if(label && label.length > 0) {
+                          return label;
+                        }
+                        return $(this).text();
+                    } else {
+                        return "";
+                    }
+                },
+                
+                // the function to produce optgroup markup
+                optgroupFormat: function( ogIndex ) {
+                    return "<span class='label'>" + $(this).attr("label") + "</span>";
+                }
+            }, opts);
+            o.displayFormat = o.displayFormat || o.optionFormat;
+            
+            // generate the new sb
+            loadSB();
+        };
+        
+        // public method interface
+        this.open = openSB;
+        this.close = closeSB;
+        this.refresh = reloadSB;
+        this.destroy = destroySB;
+        this.options = function( opts ) {
+            o = $.extend(o, opts);
+            reloadSB();
+        };
+    };
+
+    $.proto("sb", SelectBox);
+
+}(jQuery, window));
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java
new file mode 100644
index 0000000..70a1d99
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java
@@ -0,0 +1,312 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.testbed;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+
+/**
+ * 
+ * TODO
+ * 0. SystemAlerts
+ * 1. Operations like member-up/down/crash, region create/destroy [7.5 scope]
+ * 2. Read events like member-up/down/crash, region create/destroy [7.5 scope]
+ * 3. PropFile Writing
+ * 4. Link to other remote systems, topology - multi-cluster [7.5] 
+ * 
+ * @author tushark
+ *
+ */
+public class GemFireDistributedSystem {
+  
+  private static final String SERVERS = "servers";
+  private static final String LOCATORS = "locators";
+  private static final String PEERS = "peers";
+  private static final String HOSTS = "hosts";
+  private static final String REGIONS = "regions";
+  private static final String CLIENTS = "clients";
+  private static final String SEP = ".";
+  private static final String FUNCTIONS = null;
+  private static final String CQS = null;
+  
+  
+  List<Server> servers = new ArrayList<Server>();
+  List<Client> clients = new ArrayList<Client>();
+  List<Locator> locators = new ArrayList<Locator>();
+  List<Peer> peers = new ArrayList<Peer>();
+  List<Host> hosts = new ArrayList<Host>();
+  List<Region> regions = new ArrayList<Region>();
+  List<Function> functions = new ArrayList<Function>();
+  List<CQ> cqs = new ArrayList<CQ>();
+  String dsName = null;
+  
+  public GemFireDistributedSystem(String name,Properties pr){
+    PropFileHelper propertiesFile = new PropFileHelper(pr);
+    this.dsName = name;
+    readGemfireDS(propertiesFile);
+  }
+  
+  public GemFireDistributedSystem(String name,String fileName) throws IOException{
+    PropFileHelper propertiesFile = new PropFileHelper(fileName);
+    this.dsName = name;
+    readGemfireDS(propertiesFile);
+  }
+  
+  private void readGemfireDS(PropFileHelper propertiesFile) {
+    String serverStrings[] = propertiesFile.readValues(dsName + SEP + SERVERS);
+    System.out.println("Servers = " + serverStrings.length);
+    for(String serverName : serverStrings){
+      Server server = new Server();
+      server.init(propertiesFile,dsName,serverName);
+      servers.add(server);
+    }  
+    
+    String clientStrings[] = propertiesFile.readValues(dsName + SEP + CLIENTS);
+    System.out.println("Clients = " + clientStrings.length);
+    for(String clientName : clientStrings){
+      Client client = new Client();
+      client.init(propertiesFile,dsName,clientName);
+      clients.add(client);
+    }  
+    
+    String locatorStrings[] = propertiesFile.readValues(dsName + SEP + LOCATORS);
+    System.out.println("Locators = " + locatorStrings.length);
+    for(String locatorName : locatorStrings){
+      Locator locator = new Locator();
+      locator.init(propertiesFile,dsName,locatorName);
+      locators.add(locator);
+    }
+    
+    String peerStrings[] = propertiesFile.readValues(dsName + SEP + PEERS);
+    System.out.println("Peers = " + peerStrings.length);
+    for(String peerName : peerStrings){
+      Peer peer = new Peer();
+      peer.init(propertiesFile,dsName,peerName);
+      peers.add(peer);
+    }
+    
+    String hostsStrings[] = propertiesFile.readValues(dsName + SEP + HOSTS);
+    for(String hostName : hostsStrings){
+      Host host = new Host();
+      host.init(propertiesFile,dsName,hostName);
+      hosts.add(host);
+    }
+    
+    String regionsStrings[] = propertiesFile.readValues(dsName + SEP + REGIONS);
+    for(String regionName : regionsStrings){
+      Region region = new Region();
+      region.init(propertiesFile,dsName,regionName);
+      regions.add(region);
+    }
+    
+    String functionStrings[] = propertiesFile.readValues(dsName + SEP + FUNCTIONS);
+    for(String functionName : functionStrings){
+      Function function = new Function();
+      function.init(propertiesFile,dsName,functionName);
+      functions.add(function);
+    }    
+    
+    String cqStrings[] = propertiesFile.readValues(dsName + SEP + CQS);
+    for(String cqName : cqStrings){
+      CQ cq = new CQ();
+      cq.init(propertiesFile,dsName,cqName);
+      cqs.add(cq);
+    }
+    
+  }
+  
+  public List<Region> getRegions(String memberName) {    
+    List<Region> list = new ArrayList<Region>();
+    for(Region r : regions){
+      if(r.getMembers().contains(memberName))
+          list.add(r);
+    }
+    return list;
+   }
+  
+  public Region getRegion(String regionName) {
+    Region r = null;
+    for (Region rn : getRegions()) {
+      if (rn.getName().equals(regionName)) {
+        r = rn;
+        break;
+      }
+    }
+    return r;
+  }
+
+  public List<Region> getRegions() {
+   return regions;
+  }
+  
+  public List<Function> getFunction() {
+    return functions;
+  }
+  
+  public List<CQ> getCQs() {
+    return cqs;
+  }
+  
+  public List<Server> getServers(){
+    return servers;    
+  }
+  
+  public List<Client> getClients(){
+    return clients;
+  }
+  
+  public List<Peer> getPeers(){
+    return peers;    
+  }
+  
+  public List<Locator> getLocators(){
+    return locators;    
+  }
+  
+  public List<Host> getPhysicalHosts(){
+    return hosts;    
+  }
+  
+  public static class Base{
+    protected Map<String,String> properties=null;
+    protected String name;
+    
+    public void init(PropFileHelper propertiesFile, String dsName, String name) {
+      this.name = name;      
+      String leadingkey = dsName + SEP + name;
+      Map<String,String> map = propertiesFile.readObject(leadingkey);
+      map.put("name",name);
+      this.properties = map;
+    }
+    
+    public String getName(){
+      return properties.get("name");
+    }
+    
+    public String key(String string) {
+      return properties.get(string);
+    }
+    
+    public int keyInt(String string) {
+      String str = properties.get(string);
+      try{
+        int index = Integer.parseInt(str);
+        return index;
+      }catch(Exception e){
+        return -1;
+      }
+    }
+    
+    public List<String> values(String string) {
+      String values= properties.get(string);
+      String array[] = values.split(",");
+      List<String> list = new ArrayList<String>();
+      for(String s:array)
+        list.add(s);
+      return list;
+    }
+    
+  }
+  
+  public static class Host extends Base{
+    
+  }
+  
+  public static class Server extends Base{
+    public String toString(){
+      return properties.get("name") + "[on host=" + properties.get("host");
+    }
+    
+    public String getHost(){
+      return properties.get("host");
+    }
+  }
+  
+  public static class Client extends Base{
+    public String toString(){
+      return properties.get("name") ;//+ "[on host=" + properties.get("host");
+    }
+    
+    public String getHost(){
+      return properties.get("host");
+    }
+  }
+  
+  public static class Locator extends Base{
+    public String getHost(){
+      return properties.get("host");
+    }
+  }
+  
+  public static class Peer extends Base{
+
+    public String getHost(){
+      return properties.get("host");
+    }
+  }
+  
+  public static class Region extends Base{
+    public String toString(){
+      return properties.get("name") + "[type=" + properties.get("type");
+    }
+    
+    public String getType(){
+      return key("type");
+    }
+    
+    public int getEntryCount(){
+      return keyInt("entryCount");
+    }
+    
+    public List<String> getWanSenders(){
+      return values("wanSenders");
+    }
+    
+    public List<String> getMembers(){
+      return values("members");
+    }
+    
+  }
+  
+  public static class WanSender extends Base{
+    
+  }
+
+  public static class Function extends Base{
+    public String getMemberId(){
+      return key("memberId");
+    }    
+  }
+  
+  public static class CQ extends Base{
+    public String getQuery(){
+      return key("query");
+    }    
+    
+    public String getClient(){
+      return key("client");
+    }
+  }
+  
+  public static class SystemAlert extends Base{
+    //TODO
+  }
+  
+  public static void main(String[] args) throws IOException {
+    
+    GemFireDistributedSystem ds = new GemFireDistributedSystem("t1", "config/testbed.properties");
+    System.out.println("Servers = " + ds.getServers());    
+    System.out.println("Regions = " + ds.getRegions());
+    System.out.println("Clients = " + ds.getClients());
+  } 
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemfireTopology.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemfireTopology.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemfireTopology.java
new file mode 100644
index 0000000..d463248
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemfireTopology.java
@@ -0,0 +1,5 @@
+package com.vmware.gemfire.tools.pulse.testbed;
+
+public class GemfireTopology {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/PropFileHelper.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/PropFileHelper.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/PropFileHelper.java
new file mode 100644
index 0000000..84d7b1a
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/PropFileHelper.java
@@ -0,0 +1,104 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.testbed;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+public class PropFileHelper {
+  
+  private String filePath=null;
+  private Properties pr=null;
+  
+  public PropFileHelper(String filePath) throws FileNotFoundException, IOException{
+    this.filePath = filePath;
+    pr = new Properties();
+    pr.load(new FileInputStream(new File(this.filePath)));
+  }
+  
+  public PropFileHelper(Properties pr2) {
+    this.pr =pr2;
+  }
+
+  public String[] readValues(String property){
+    return readValues(property,",");
+  }
+  
+  public String[] readValues(String property, String separator){
+    String value = readKey(property);
+    if(value!=null){
+      String[] array = value.split(separator);
+      return array;
+    }else{
+      return new String[0];
+    }
+  }
+  
+  public String readKey(String key){
+    String value = pr.getProperty(key);
+    if(value!=null)
+      return value.trim();
+    else return value;
+  }
+  
+  public Map<String,String> readObject(String leadingkey){
+    Map<String,String> map = new HashMap<String,String>();
+    String leadingKeyString = leadingkey+"."; 
+    for(Object keyObject : pr.keySet()){
+      String key = (String)keyObject;
+      String value = readKey(key);
+      if(key.startsWith(leadingKeyString)){
+        String innerProp = key.substring(leadingKeyString.length());
+        /* inner object stuff
+        if(checkForMultipleValues){
+          if(innerProp.contains(separator)){
+            String array[] = readValues(key);
+          }
+        }else*/
+        {
+          //System.out.println("Adding prop with key " + innerProp + " k=" + leadingkey);
+          map.put(innerProp, value);
+        }      
+      }
+    }    
+    return map;
+  }
+  
+  public static void main(String[] args) {
+    
+    Properties pr = new Properties();
+    pr.put("topologies", "t1,t2");
+    pr.put("t1.id", "1");
+    pr.put("t2.id", "2");
+    
+    pr.put("t1.prop1", "prop11");
+    pr.put("t1.prop2", "prop12");
+    pr.put("t1.prop3", "prop13");
+    pr.put("t2.prop1", "1");
+    pr.put("t2.prop2", "2");
+    pr.put("t2.prop3", "3");
+    
+    PropFileHelper helper = new PropFileHelper(pr);
+    String topologies[] = helper.readValues("topologies");
+    for(String topology : topologies){
+      Map<String,String> topologyMap = helper.readObject(topology);
+      System.out.println(topologyMap);
+    }
+    
+  }
+
+  public Properties getProperties() {
+    return pr;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/PropMockDataUpdater.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/PropMockDataUpdater.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/PropMockDataUpdater.java
new file mode 100644
index 0000000..d22e33d
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/PropMockDataUpdater.java
@@ -0,0 +1,504 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.testbed;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Random;
+import java.util.ResourceBundle;
+
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster.Alert;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster.Client;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster.GatewayReceiver;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster.GatewaySender;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster.Member;
+import com.vmware.gemfire.tools.pulse.internal.data.Cluster.Region;
+import com.vmware.gemfire.tools.pulse.internal.data.IClusterUpdater;
+import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
+import com.vmware.gemfire.tools.pulse.internal.data.Repository;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONException;
+import com.vmware.gemfire.tools.pulse.internal.json.JSONObject;
+import com.vmware.gemfire.tools.pulse.internal.log.PulseLogWriter;
+import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Locator;
+import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Peer;
+import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Server;
+
+
+public class PropMockDataUpdater implements IClusterUpdater {
+  private static final int MAX_HOSTS = 40;
+  private static final PulseLogWriter LOGGER = PulseLogWriter.getLogger();
+  private final ResourceBundle resourceBundle = Repository.get().getResourceBundle();
+  private static final int POLL_INTERVAL = 5000;
+  public static final int MAX_SAMPLE_SIZE = 180;
+  public static final int ALERTS_MAX_SIZE = 1000;
+  public static final int PAGE_ALERTS_MAX_SIZE = 100;
+
+  private Cluster cluster= null;
+  private TestBed testbed;
+  private final String testbedFile = System.getProperty("pulse.propMockDataUpdaterFile");;
+
+  public PropMockDataUpdater(Cluster cluster) {
+    this.cluster = cluster;
+    try {
+      loadPropertiesFile();
+    } catch (FileNotFoundException e) {
+      throw new RuntimeException(e);
+    } catch (IOException e) {
+      throw new RuntimeException(e);
+    }
+  }
+
+  private void loadPropertiesFile() throws FileNotFoundException, IOException{
+    this.testbed = new TestBed(testbedFile,true);
+  }
+
+  /**
+   * function used for updating Cluster data
+   * for Mock
+   */
+  @Override
+  public boolean updateData() {
+    cluster.setConnectedFlag(true);
+    Random r = new Random(System.currentTimeMillis());
+    long totalHeapSize = Math.abs(r.nextInt(3200 - 2048) + 2048);
+    cluster.setTotalHeapSize(totalHeapSize);
+    long usedHeapSize  = Math.abs(r.nextInt(2048));
+    cluster.setUsedHeapSize(usedHeapSize);
+    float writePerSec = Math.abs(r.nextInt(100));
+    cluster.setWritePerSec(writePerSec);
+
+    //propfile
+    cluster.setSubscriptionCount(testbed.getRootDs().getClients().size());
+    cluster.setRegisteredCQCount((long) testbed.getRootDs().getCQs().size());
+    cluster.setRunningFunctionCount(testbed.getRootDs().getFunction().size());
+
+
+    cluster.setClusterId( Math.abs(r.nextInt(100)));
+    cluster.getWritePerSecTrend().add(writePerSec);
+    cluster.setDiskWritesRate(writePerSec);
+
+    long garbageCollectionCount = Math.abs(r.nextInt(100));
+    cluster.setGarbageCollectionCount(garbageCollectionCount);
+    cluster.getGarbageCollectionTrend().add(garbageCollectionCount);
+
+    long readPerSec = Math.abs(r.nextInt(100));
+    cluster.setReadPerSec(readPerSec);
+    cluster.getReadPerSecTrend().add(readPerSec);
+
+    long diskReadsRate = readPerSec;cluster.setDiskReadsRate(diskReadsRate);
+    cluster.setDiskReadsRate(readPerSec);
+    long queriesPerSec = Math.abs(r.nextInt(100));
+    cluster.setQueriesPerSec(queriesPerSec);
+    cluster.getQueriesPerSecTrend().add(queriesPerSec);
+
+    long loadPerSec = Math.abs(r.nextInt(100));
+    cluster.setLoadPerSec(loadPerSec);
+    cluster.setTotalHeapSize(totalHeapSize);
+    long totalBytesOnDisk = totalHeapSize;
+    cluster.setTotalBytesOnDisk(totalBytesOnDisk);
+
+    cluster.getTotalBytesOnDiskTrend().add(totalBytesOnDisk);
+
+    cluster.getMemoryUsageTrend().add(usedHeapSize);
+    cluster.getThroughoutWritesTrend().add(writePerSec);
+
+    cluster.setMemberCount(0);
+
+    Map<String,Cluster.Member>  membersHMap = cluster.getMembersHMap();
+    List<Cluster.Region> regionsList = (List<Cluster.Region>)cluster.getClusterRegions().values();
+    Map<String, Boolean> wanInformation = cluster.getWanInformation();
+
+    // Create 3 members first time around
+    int locatorCount=0;
+    if (membersHMap.size() == 0) {
+      for(Locator locator : testbed.getRootDs().getLocators()){
+        String id = "(Launcher_Locator-1099-13-40-24-5368)-"+locatorCount++;
+        String name = locator.getName();
+        membersHMap.put(id+name, initializeMember(id,name, true, true, true, false, locator.getHost()));
+      }
+      cluster.setLocatorCount(testbed.getRootDs().getLocators().size());
+
+      int serverCount=0;
+      for(Server server : testbed.getRootDs().getServers()){
+        String id = "(Launcher_Server-1099-13-40-24-5368)-"+serverCount++;
+        String name = server.getName();
+        membersHMap.put(id+name, initializeMember(id,name, false, true, false, true, server.getHost()));
+      }
+      cluster.setServerCount(testbed.getRootDs().getServers().size());
+
+      int peerCount=0;
+      for(Peer peer : testbed.getRootDs().getPeers()){
+        String id = "(Launcher_Peer-1099-13-40-24-5368)-"+peerCount++;
+        String name = peer.getName();
+        membersHMap.put( id+name, initializeMember(id,name, false, true, false, false, peer.getHost()));
+      }
+
+      for(Entry<String, Member> memberSet : membersHMap.entrySet())
+      {
+        HashMap<String,Cluster.Region> memberRegions = new HashMap<String,Cluster.Region>();
+        HashMap<String,Cluster.Client> memberClientsHM = new HashMap<String,Cluster.Client>();
+
+        Random randomGenerator = new Random();
+
+        //Read from property file
+        int randomInt = (randomGenerator.nextInt(5)) + 1;
+        List<com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Region> thisMemberRegions = testbed.getRootDs().getRegions(memberSet.getValue().getName());
+
+        int regionExists = 0;
+        int index=0;
+        for (com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Region thisMemberRegion : thisMemberRegions) {
+          Region region = initMemberRegion(index++,thisMemberRegion.getName(),memberSet.getValue().getName(),
+              thisMemberRegion.getEntryCount(),thisMemberRegion.getType(), thisMemberRegion.getMembers().size()); //read from property file
+          if (regionsList.size() > 0) {
+            for (Region clusterRegion : regionsList) {
+              if ((region.getName()).equals(clusterRegion.getName())) {
+                clusterRegion.getMemberName().add(memberSet.getValue().getName());
+                //clusterRegion.memberCount = clusterRegion.memberCount + 1;
+                //int mcount = clusterRegion.getMemberCount() + 1;
+                //clusterRegion.setMemberCount(mcount);
+                regionExists = 1;
+                break;
+              }
+            }
+            if (regionExists == 0){
+              regionsList.add(region);
+            }
+          } else{
+            regionsList.add(region);
+          }
+          memberRegions.put(region.getFullPath(),region);
+          //totalRegionCount = regionsList.size();
+          cluster.setTotalRegionCount(regionsList.size());
+        }
+        membersHMap.get(memberSet.getKey()).setMemberRegions(memberRegions);
+
+        if (memberSet.getValue().isCache()) {
+          Client client = initMemberClient(0, memberSet.getValue().getHost()); //read from prop File
+          memberClientsHM.put(client.getId(), client);
+          randomInt = randomGenerator.nextInt(10);
+          for (int y = 1; y < randomInt; y++) {
+            Client newClient = initMemberClient(y, memberSet.getValue()
+                .getHost());
+            memberClientsHM.put(newClient.getId(), newClient);
+          }
+          membersHMap.get(memberSet.getKey()).updateMemberClientsHMap(memberClientsHM);
+          /*clientConnectionCount = clientConnectionCount
+              + membersHMap.get(memberSet.getKey()).getMemberClientsHMap().size();*/
+          long clientConnectionCount = cluster.getClientConnectionCount() + membersHMap.get(memberSet.getKey()).getMemberClientsHMap().size();
+          cluster.setClientConnectionCount(clientConnectionCount);
+        }
+
+      }
+    }
+    wanInformation.clear(); //read from property file
+    int wanInfoSize = Math.abs(r.nextInt(10));
+    wanInfoSize++;
+    for (int i = 0; i < wanInfoSize; i++) {
+      String name = "Mock Cluster" + i;
+      Boolean value = false;
+      if (i % 2 == 0){
+        value = true;
+      }
+      wanInformation.put(name, value);
+    }
+    //memberCount = membersHMap.size();
+    cluster.setMemberCount(membersHMap.size());
+
+    totalHeapSize = 0;
+    for(Entry<String, Member> memberSet : membersHMap.entrySet())
+    {
+      refresh(membersHMap.get(memberSet.getKey()));
+      Member member = membersHMap.get(memberSet.getKey());
+      totalHeapSize += member.getCurrentHeapSize();
+    }
+
+    for (Region region : regionsList) {
+      region.setGetsRate((Math.abs(r.nextInt(100))) + 1);
+      region.setPutsRate((Math.abs(r.nextInt(100))) +1);
+      region.getGetsPerSecTrend().add(region.getGetsRate());
+      region.getPutsPerSecTrend().add(region.getPutsRate());
+    }
+
+    return true;
+  }
+
+
+  private Region initMemberRegion(int count, String regionName, String memName, int entryCount, String type, int memberCount) {
+    Region memberRegion = new Region();
+    memberRegion.setName(regionName);
+    memberRegion.setFullPath("/"+regionName);
+    Random randomGenerator = new Random();
+    memberRegion.setSystemRegionEntryCount(entryCount);
+    // memberRegion.setEntrySize("N/A");
+    memberRegion.setEntrySize(Math.abs(randomGenerator.nextInt(10)));
+    memberRegion.setDiskStoreName("ABC");
+    memberRegion.setScope("DISTRIBUTED_NO_ACK");
+    memberRegion.setDiskSynchronous(true);
+    memberRegion.setRegionType(type);
+    if(type.contains("PERSISTENT"))
+      memberRegion.setPersistentEnabled(true);
+    else
+      memberRegion.setPersistentEnabled(false);
+    if (count % 2 == 0){
+      memberRegion.setWanEnabled(true);
+    }
+    else{
+      memberRegion.setWanEnabled(false);
+    }
+    memberRegion.setWanEnabled(true);
+    /*memberRegion.setSystemRegionEntryCount(Long.valueOf(String.valueOf(Math
+        .abs(randomGenerator.nextInt(100)))));*/
+    memberRegion.getMemberName().add(memName);
+    memberRegion.setMemberCount(memberCount);
+    return memberRegion;
+  }
+
+
+  private Client initMemberClient(int count, String host) {
+
+    Client memberClient = new Client();
+    Random r = new Random(System.currentTimeMillis());
+    memberClient.setName("Name_" + count);
+    long processCpuTime = (long) (r.nextDouble() * 100);
+    memberClient.setProcessCpuTime(processCpuTime);
+    memberClient.setCpuUsage(0);
+    memberClient.setGets(Math.abs(r.nextInt(100)));
+    memberClient.setHost(host);
+    memberClient.setId(String.valueOf(1000 + count));
+    memberClient.setPuts(Math.abs(r.nextInt(100)));
+    memberClient.setCpus(Math.abs(r.nextInt(20)));
+    memberClient.setQueueSize(Math.abs(r.nextInt(100)));
+    if ((count % 2) == 0){
+      memberClient.setStatus("up");
+    }
+    else{
+      memberClient.setStatus("down");
+    }
+    memberClient.setThreads(Math.abs(r.nextInt(100)));
+    memberClient
+        .setUptime(Math.abs(System.currentTimeMillis() - r.nextLong()));
+
+    return memberClient;
+  }
+
+  private Member initializeMember(String id, String name, boolean manager,
+      boolean isCache, boolean isLocator, boolean isServer, String host) {
+    Member m = new Member();
+
+    m.setId(id);
+    m.setName(name);
+
+    //m.setHost(getHostName(System.currentTimeMillis()));
+    m.setHost(host);
+
+    m.setMaxHeapSize(247);
+
+    Random r = new Random(System.currentTimeMillis());
+
+    m.setCache(isCache);
+    m.setLocator(isLocator);
+    m.setServer(isServer);
+    m.setManager(manager);
+
+    m.setLoadAverage((double) Math.abs(r.nextInt(100)));
+    m.setNumThreads(Math.abs(r.nextInt(100)));
+    m.setGarbageCollectionCount((long) Math.abs(r.nextInt(100)));
+    m.getGarbageCollectionSamples().add(m.getGarbageCollectionCount());
+
+    m.setTotalFileDescriptorOpen((long) Math.abs(r.nextInt(100)));
+    m.setTotalDiskUsage(Math.abs(r.nextInt(100)));
+
+
+    m.setThroughputWrites(Math.abs(r.nextInt(10)));
+    m.getThroughputWritesTrend().add(m.getThroughputWrites());
+
+    GatewayReceiver gatewayReceiver = m.getGatewayReceiver();
+    String port  = cluster.getPort();
+    if(port==null || "".equals(port))
+      port = "1099";
+    gatewayReceiver.setListeningPort(Integer.parseInt(port));
+    gatewayReceiver.setLinkThroughput((float) Math.abs(r.nextInt(10)));
+    gatewayReceiver.setAvgBatchProcessingTime((long) Math.abs(r.nextInt(10)));
+    gatewayReceiver.setId(String.valueOf(Math.abs(r.nextInt(10))));
+    gatewayReceiver.setQueueSize(Math.abs(r.nextInt(10)));
+    gatewayReceiver.setStatus(true);
+    gatewayReceiver.setBatchSize(Math.abs(r.nextInt(10)));
+
+
+    int gatewaySenderCount = Math.abs(r.nextInt(10));
+
+    List<GatewaySender> list = m.getGatewaySenderList();
+
+    for (int i = 0; i < gatewaySenderCount; i++) {
+      list.add(createGatewaySenderCount(r));
+    }
+
+
+    Map<String, List<Member>> physicalToMember = cluster.getPhysicalToMember();
+
+    List<Cluster.Member> memberArrList = physicalToMember.get(m.getHost());
+    if (memberArrList != null){
+      memberArrList.add(m);
+    }
+    else {
+      ArrayList<Cluster.Member> memberList = new ArrayList<Cluster.Member>();
+      memberList.add(m);
+      physicalToMember.put(m.getHost(), memberList);
+    }
+    int memberCount = cluster.getMemberCount();memberCount++;cluster.setMemberCount(memberCount);
+    return m;
+  }
+
+  private GatewaySender createGatewaySenderCount(Random r) {
+
+    GatewaySender gatewaySender = new GatewaySender();
+
+    gatewaySender.setBatchSize(Math.abs(r.nextInt(10)));
+    gatewaySender.setId(String.valueOf(Math.abs(r.nextInt(10))));
+    gatewaySender.setLinkThroughput((float) Math.abs(r.nextInt(10)));
+    gatewaySender.setPersistenceEnabled(true);
+    gatewaySender.setPrimary(true);
+    gatewaySender.setQueueSize(Math.abs(r.nextInt(10)));
+    gatewaySender.setSenderType(false);
+    gatewaySender.setStatus(true);
+
+    return gatewaySender;
+  }
+
+  /*
+  private String getHostName(long rndSeed) {
+    Random rnd = new Random(rndSeed);
+    String hName = null;
+
+    int index = Math.abs(rnd.nextInt(MAX_HOSTS));
+
+    ArrayList<String> hostNames = cluster.getHostNames();
+
+    if (hostNames.size() <= index) {
+      hName = "host" + hostNames.size();
+      hostNames.add(hName);
+    } else {
+      hName = hostNames.get(index);
+    }
+
+    Map<String, ArrayList<Member>> physicalToMember = cluster.getPhysicalToMember();
+
+    ArrayList<Member> memberArrList = physicalToMember.get(hName);
+    if (memberArrList != null) {
+      if (memberArrList.size() > 4){
+        hName = getHostName(rndSeed + rnd.nextLong());
+      }
+    }
+    return hName;
+  }*/
+
+  private void refresh(Member m) {
+    if(LOGGER.infoEnabled()){
+      LOGGER.info(resourceBundle.getString("LOG_MSG_REFRESHING_MEMBER_DATA")+" : " + m.getName());
+    }
+
+    Random r = new Random(System.currentTimeMillis());
+
+    m.setUptime(System.currentTimeMillis());
+    m.setQueueBacklog("" + Math.abs(r.nextInt(500)));
+    m.setCurrentHeapSize(Math.abs(r.nextInt(Math.abs((int) m.getMaxHeapSize()))));
+    m.setTotalDiskUsage(Math.abs(r.nextInt(100)));
+
+    Float cpuUsage = r.nextFloat() * 100;
+    m.getCpuUsageSamples().add(cpuUsage);
+    m.setCpuUsage(cpuUsage);
+
+    m.getHeapUsageSamples().add(m.getCurrentHeapSize());
+    m.setLoadAverage((double) Math.abs(r.nextInt(100)));
+    m.setNumThreads(Math.abs(r.nextInt(100)));
+    m.setGarbageCollectionCount((long) Math.abs(r.nextInt(100)));
+    m.getGarbageCollectionSamples().add(m.getGarbageCollectionCount());
+
+    m.setTotalFileDescriptorOpen((long) Math.abs(r.nextInt(100)));
+
+    m.setThroughputWrites(Math.abs(r.nextInt(10)));
+    m.getThroughputWritesTrend().add(m.getThroughputWrites());
+
+    m.setGetsRate(Math.abs(r.nextInt(5000)));
+    m.getGetsPerSecond().add(m.getGetsRate());
+
+    m.setPutsRate(Math.abs(r.nextInt(5000)));
+    m.getPutsPerSecond().add(m.getPutsRate());
+
+    Alert[] alerts = cluster.getAlertsList();
+    List<Alert> alertsList = Arrays.asList(alerts);
+
+    if (r.nextBoolean()) {
+      // Generate alerts
+      if (r.nextBoolean()) {
+        if (r.nextInt(10) > 5) {
+          alertsList.add(createAlert(Alert.SEVERE, m.getName(), alertsList.size()));
+          if(alertsList.size() > ALERTS_MAX_SIZE){
+            alertsList.remove(0);
+          }
+        }
+      }
+
+      if (r.nextBoolean()) {
+        if (r.nextInt(10) > 5) {
+          alertsList.add(createAlert(Alert.ERROR, m.getName(), alertsList.size()));
+          if(alertsList.size() > ALERTS_MAX_SIZE){
+            alertsList.remove(0);
+          }
+        }
+      }
+
+      if (r.nextBoolean()) {
+        if (r.nextInt(10) > 5) {
+          alertsList.add(createAlert(Alert.WARNING, m.getName(), alertsList.size()));
+          if(alertsList.size() > ALERTS_MAX_SIZE){
+            alertsList.remove(0);
+          }
+        }
+      }
+    }
+  }
+
+  private Alert createAlert(int sev, String memberName, int index) {
+
+    Alert alert = new Alert();
+    alert.setSeverity(sev);
+    alert.setId(index);
+    alert.setMemberName(memberName);
+    alert.setTimestamp(new Date());
+
+    switch (sev) {
+    case Alert.SEVERE:
+      alert.setDescription(PulseConstants.ALERT_DESC_SEVERE);
+      break;
+    case Alert.ERROR:
+      alert.setDescription(PulseConstants.ALERT_DESC_ERROR);
+      break;
+    case Alert.WARNING:
+      alert.setDescription(PulseConstants.ALERT_DESC_WARNING);
+      break;
+    }
+    return alert;
+  }
+
+  @Override
+  public JSONObject executeQuery(String queryText, String members, int limit)
+      throws JSONException {
+    // TODO for Sushant/Sachin - Add implementation for MockUpdater for Automation
+    return null;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/TestBed.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/TestBed.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/TestBed.java
new file mode 100644
index 0000000..b68e0da
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/TestBed.java
@@ -0,0 +1,57 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.testbed;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class TestBed {
+  
+  private String fileName=null;
+  PropFileHelper propertiesFile =null;
+  GemFireDistributedSystem ds = null;
+  
+  public TestBed(String fileName) throws FileNotFoundException, IOException{
+    this.fileName = fileName;
+    propertiesFile = new PropFileHelper(fileName);
+    ds = new GemFireDistributedSystem("t1", propertiesFile.getProperties());
+  }
+  
+  
+  public TestBed(String fileName,boolean flag) throws FileNotFoundException, IOException{    
+    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+    InputStream inputStream = classLoader.getResourceAsStream("testbed.properties");
+    System.out.println("Inputstream : " + inputStream);
+    Properties properties = new Properties();
+    try {
+      properties.load(inputStream);
+    } catch (IOException e) {
+      e.printStackTrace();
+      throw new RuntimeException(e);
+    }    
+    this.fileName = fileName;
+    propertiesFile = new PropFileHelper(properties);
+    ds = new GemFireDistributedSystem("t1", propertiesFile.getProperties());
+  }
+  
+  
+  public String getBrowserForDriver(){
+    return propertiesFile.readKey("browser");
+  }
+  
+  public String getBrowserVersionForDriver(String browser){
+    return propertiesFile.readKey("browserVersion");
+  }
+  
+  public GemFireDistributedSystem getRootDs(){
+    return ds;
+  }  
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
new file mode 100644
index 0000000..127ddf8
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/PulseUITest.java
@@ -0,0 +1,311 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.testbed.driver;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.List;
+
+import junit.framework.Assert;
+
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Locator;
+import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Peer;
+import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Region;
+import com.vmware.gemfire.tools.pulse.testbed.GemFireDistributedSystem.Server;
+import com.vmware.gemfire.tools.pulse.testbed.TestBed;
+
+/**
+ * @author Sushant Rawal
+ * @author tushark
+ *
+ */
+public class PulseUITest {
+
+  private WebDriver driver;
+  private TestBed testBed;
+  private final String testBedPropertyfile = System.getProperty("pulse.propMockDataUpdaterFile");  
+  private static String pulseURL = System.getProperty("pulse.url");
+  private static String path =System.getProperty("pulse.war");;
+  
+  private static final String userName = "admin";
+  private static final String pasword = "admin";
+  
+  private static final String DATA_VIEW_LABEL = "Data View";
+  private static final String CLUSTER_VIEW_MEMBERS_ID = "clusterTotalMembersText";
+  private static final String CLUSTER_VIEW_SERVERS_ID = "clusterServersText";
+  private static final String CLUSTER_VIEW_LOCATORS_ID = "clusterLocatorsText";
+  private static final String CLUSTER_VIEW_REGIONS_ID = "clusterTotalRegionsText";
+  
+  private static Tomcat tomcat = null;
+  private static WebDriver initdriver = null;
+  
+  @BeforeClass
+  public static void setUpTomcat(){
+    try {      
+      String host = InetAddress.getLocalHost().getHostAddress();
+      int port = 8080;      
+      String context = "/pulse";      
+      //System.setProperty("pulse.propMockDataUpdaterClass", "com.vmware.gemfire.tools.pulse.testbed.PropMockDataUpdater");      
+      tomcat = TomcatHelper.startTomcat(host, port, context, path);   
+      pulseURL = "http://" + host  + ":" + port + context;
+      Thread.sleep(1000); //wait till tomcat settles down
+      initdriver = new FirefoxDriver();
+      loginToPulse(initdriver, userName, pasword);
+      Thread.sleep(5000); //wait till pulse starts polling threads...
+      initdriver.close();
+    } catch (FileNotFoundException e) {      
+      e.printStackTrace();
+      Assert.fail("Error " +e.getMessage());
+    } catch (IOException e) {
+      e.printStackTrace();
+      Assert.fail("Error " +e.getMessage());
+    } catch (Exception e) {
+      e.printStackTrace();
+      Assert.fail("Error " +e.getMessage());
+    }        
+  }
+  
+
+  @Before  
+  public void setUp() {
+    try {
+      testBed = new TestBed(testBedPropertyfile,true);
+    } catch (FileNotFoundException e) {      
+      e.printStackTrace();
+      Assert.fail("Error " +e.getMessage());
+    } catch (IOException e) {
+      e.printStackTrace();
+      Assert.fail("Error " +e.getMessage());
+    } catch (Exception e) {
+      e.printStackTrace();
+      Assert.fail("Error " +e.getMessage());
+    }    
+        
+    driver = new FirefoxDriver();
+    driver.manage().window().maximize();//required to make all elements visible
+    loginToPulse();    
+  }
+  
+  private void loginToPulse() {    
+    loginToPulse(driver, userName, pasword);
+  }
+
+  private static void loginToPulse(WebDriver driver, String userName,String password){
+    driver.get(pulseURL);    
+    WebElement userNameElement = driver.findElement(By.id("user_name"));
+    WebElement passwordElement = driver.findElement(By.id("user_password"));
+    userNameElement.sendKeys(userName);
+    passwordElement.sendKeys(password);
+    passwordElement.submit();
+    WebElement userNameOnPulsePage = (new WebDriverWait(driver, 10))
+        .until(new ExpectedCondition<WebElement>() {
+          @Override
+          public WebElement apply(WebDriver d) {
+            return d.findElement(By.id("userName"));
+          }
+        });
+    Assert.assertNotNull(userNameOnPulsePage);
+  }
+  
+  
+  private void searchByLinkAndClick(String linkText){
+    WebElement  dataViewButton= By.linkText(linkText).findElement(driver);
+    Assert.assertNotNull(dataViewButton);   
+    dataViewButton.click();
+  }
+  
+  private void searchByIdAndClick(String id){
+    WebElement  element = driver.findElement(By.id(id));
+    Assert.assertNotNull(element);
+    element.click();    
+  }
+  
+  private void searchByXPathAndClick(String xpath){    
+    WebElement  element = driver.findElement(By.xpath(xpath));
+    Assert.assertNotNull(element);
+    element.click();    
+  }
+  
+  private void waitForElementByClassName(final String className, int seconds){
+    WebElement linkTextOnPulsePage1 = (new WebDriverWait(driver, seconds))
+    .until(new ExpectedCondition<WebElement>() {
+      @Override
+      public WebElement apply(WebDriver d) {
+        return d.findElement(By.className(className));
+      }
+    });
+    Assert.assertNotNull(linkTextOnPulsePage1);
+  }
+  
+  private void waitForElementById(final String id, int seconds){
+    WebElement element = (new WebDriverWait(driver, 10))
+    .until(new ExpectedCondition<WebElement>() {
+      @Override
+      public WebElement apply(WebDriver d) {
+        return d.findElement(By.id(id));
+      }
+    });
+    Assert.assertNotNull(element);
+  }
+  
+  @Test
+  public void testClusterViewTopRibbon() {
+    List<Server> servers = testBed.getRootDs().getServers();
+    List<Locator> locators = testBed.getRootDs().getLocators();
+    List<Peer> peers = testBed.getRootDs().getPeers();
+    List<Region> regions = testBed.getRootDs().getRegions();
+    int totalMembers = servers.size() + locators.size() + peers.size();
+    int clusterMembers = Integer.parseInt(driver.findElement(
+        By.id(CLUSTER_VIEW_MEMBERS_ID)).getText());
+    int clusterServers = Integer.parseInt(driver.findElement(
+        By.id(CLUSTER_VIEW_SERVERS_ID)).getText());
+    int clusterLocators = Integer.parseInt(driver.findElement(
+        By.id(CLUSTER_VIEW_LOCATORS_ID)).getText());
+    int clusterRegions = Integer.parseInt(driver.findElement(
+        By.id(CLUSTER_VIEW_REGIONS_ID)).getText());
+    Assert.assertEquals(totalMembers, clusterMembers);
+    Assert.assertEquals(servers.size(), clusterServers);
+    Assert.assertEquals(locators.size(), clusterLocators);
+    Assert.assertEquals(regions.size(), clusterRegions);
+  }  
+
+
+  @Test
+  public void testDataViewRegionProperties() {
+    searchByLinkAndClick(DATA_VIEW_LABEL);
+    waitForElementByClassName("pointDetailsPadding",10);    
+    searchByIdAndClick("btngridIcon");
+    
+    for(int i=1;i<testBed.getRootDs().getRegions().size();i++){
+      searchByIdAndClick(""+i);
+      String regionName1 = driver.findElement(By.id("regionName")).getText();
+      @SuppressWarnings("rawtypes")
+      List regionMemberscount1 = testBed.getRootDs().getRegion(regionName1)
+          .getMembers();
+      int regionEntCount1 = testBed.getRootDs().getRegion(regionName1)
+          .getEntryCount();
+      int regionMembers1 = Integer.parseInt(driver.findElement(
+          By.id("regionMembers")).getText());
+      int regionEntryCount1 = Integer.parseInt(driver.findElement(
+          By.id("regionEntryCount")).getText());
+      Assert.assertEquals(regionMemberscount1.size(), regionMembers1);
+      Assert.assertEquals(regionEntCount1, regionEntryCount1);
+    }
+  }
+
+  
+  @Test
+  public void testMemberViewRegions() {
+    
+    searchByLinkAndClick(DATA_VIEW_LABEL);
+    waitForElementByClassName("pointDetailsPadding",10);    
+    searchByXPathAndClick("//div[@title='peer1']");    
+    waitForElementById("memberRegionsCount",10);    
+    
+    List<Server> servers = testBed.getRootDs().getServers();
+    List<Locator> locators = testBed.getRootDs().getLocators();
+    List<Peer> peers = testBed.getRootDs().getPeers();    
+
+    String prevSelectedMember = "peer1";
+    
+    for (Peer p : peers) {
+      String peer = p.getName();
+      System.out.println("Checking regions mapping for member " + peer);
+      WebElement comboBox = driver.findElement(By.linkText(prevSelectedMember));
+      comboBox.click();                 
+      WebElement comboList = driver.findElement(By.id("clusterMembersContainer"));     
+      WebElement selectedMember = comboList.findElement(By.linkText(peer));
+      selectedMember.click();
+      timeout();
+      String peername = driver.findElement(By.id("memberName")).getText();      
+      List<Region> peerRegionscount = testBed.getRootDs().getRegions(peer);
+      int peerRegions = Integer.parseInt(driver.findElement(
+          By.id("memberRegionsCount")).getText());
+      Assert.assertEquals(peerRegionscount.size(), peerRegions);
+      prevSelectedMember = peername;
+    }
+    
+    for (Server s : servers) {
+      String server = s.getName();
+      System.out.println("Checking regions mapping for server " + server);
+      WebElement comboBox = driver.findElement(By.linkText(prevSelectedMember));
+      comboBox.click();                 
+      WebElement comboList = driver.findElement(By.id("clusterMembersContainer"));     
+      WebElement selectedMember = comboList.findElement(By.linkText(server));
+      selectedMember.click();
+      timeout();
+      String peername = driver.findElement(By.id("memberName")).getText();      
+      List<Region> serverRegionscount = testBed.getRootDs().getRegions(server);
+      int serverRegions = Integer.parseInt(driver.findElement(
+          By.id("memberRegionsCount")).getText());
+      Assert.assertEquals(serverRegionscount.size(), serverRegions);
+      prevSelectedMember = peername;            
+    }
+    /*
+    for (Locator l : locators) {      
+      String locator = l.getName();
+      System.out.println("Checking regions mapping for locator " + locator);
+      WebElement comboBox = driver.findElement(By.linkText(prevSelectedMember));
+      comboBox.click();                 
+      WebElement comboList = driver.findElement(By.id("clusterMembersContainer"));     
+      WebElement selectedMember = comboList.findElement(By.linkText(locator));
+      selectedMember.click();
+      timeout();
+      String peername = driver.findElement(By.id("memberName")).getText();      
+      List<Region> locatorRegionscount = testBed.getRootDs().getRegions(locator);
+      int locatorRegions = Integer.parseInt(driver.findElement(
+          By.id("memberRegionsCount")).getText());
+      Assert.assertEquals(locatorRegionscount.size(), locatorRegions);
+      prevSelectedMember = peername;
+    }*/
+  }
+
+  public void timeout() {
+    WebElement memberNameOnPulsePage = (new WebDriverWait(driver, 10))
+        .until(new ExpectedCondition<WebElement>() {
+          @Override
+          public WebElement apply(WebDriver d) {
+            return d.findElement(By.id("memberName"));
+          }
+        });
+    Assert.assertNotNull(memberNameOnPulsePage);    
+  }  
+
+  @After
+  public void closeSession() {      
+    driver.close();
+  }
+  
+  @AfterClass
+  public static void stopTomcat(){
+    try {
+      if(tomcat!=null){
+        tomcat.stop();
+        tomcat.destroy();
+      }
+    } catch (LifecycleException e) {     
+      e.printStackTrace();
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/TomcatHelper.java
----------------------------------------------------------------------
diff --git a/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/TomcatHelper.java b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/TomcatHelper.java
new file mode 100644
index 0000000..4a3f318
--- /dev/null
+++ b/pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/driver/TomcatHelper.java
@@ -0,0 +1,80 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.vmware.gemfire.tools.pulse.testbed.driver;
+
+import java.net.InetAddress;
+
+import org.apache.catalina.connector.Connector;
+import org.apache.catalina.core.StandardHost;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.tomcat.util.IntrospectionUtils;
+
+public class TomcatHelper {
+  public static Tomcat startTomcat(String bindAddress, int port, String context, String path) throws Exception {
+
+    Tomcat tomcat = new Tomcat();
+
+    // Set up logging - first we're going to remove all existing handlers. Don't do this before Tomcat is
+    // instantiated otherwise there isn't anything to remove.
+    /*
+
+    Logger globalLogger = Logger.getLogger("");
+    for (Handler handler : globalLogger.getHandlers()) {
+      globalLogger.removeHandler(handler);
+    }
+
+    // Now let's add our handler
+    Handler gfHandler = new GemFireHandler((LogWriterImpl) log);
+    Logger logger = Logger.getLogger("");
+    logger.addHandler(gfHandler);
+    
+    */
+
+    // Set up for commons-logging which is used by Spring.
+    // This forces JCL to use the JDK logger otherwise it defaults to trying to use Log4J.
+    if (System.getProperty("org.apache.commons.logging.Log") == null) {
+      System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.Jdk14Logger");
+    }
+
+    if (bindAddress != null && bindAddress.length() > 0) {
+      Connector c = tomcat.getConnector();
+      IntrospectionUtils.setProperty(c, "address", bindAddress);
+    }
+    tomcat.setPort(port);
+
+    // Working (scratch) dir
+    String scratch = System.getProperty("java.io.tmpdir") + System.getProperty("file.separator") + "Pulse_"
+        + ((bindAddress == null || bindAddress.length() == 0) ? "0.0.0.0" : bindAddress) + "_" + port + "_"
+        + String.format("%x", path.hashCode());
+    
+    
+    tomcat.setBaseDir(scratch);
+    StandardHost stdHost = (StandardHost) tomcat.getHost();
+    //stdHost.setUnpackWARs(false);   
+    //tomcat.addContext(context, path);
+    tomcat.addWebapp(stdHost, context, path);
+    stdHost.setDeployOnStartup(true);    
+    tomcat.start();
+
+    return tomcat;
+  }
+  
+  public static void main(String[] args) throws Exception {    
+    String host = InetAddress.getLocalHost().getHostAddress();
+    int port = 8080;
+    String path = "/tushark1/code-checkout/tools/Pulse/trunk/build-artifacts/linux/dist/pulse-7.0.1.RC1.war";
+    String context = "/pulse";      
+    System.setProperty("pulse.propMockDataUpdaterClass", "com.vmware.gemfire.tools.pulse.testbed.PropMockDataUpdater");      
+    Tomcat tomcat = TomcatHelper.startTomcat("localhost", port, context, path);   
+    Thread.sleep(30000);
+    System.out.println("Sleep completed");
+    System.out.println("Exiting ....");
+    tomcat.stop();
+    tomcat.destroy();
+  }
+}


[22/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/regionDetail.html
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/regionDetail.html b/pulse/src/main/webapp/regionDetail.html
new file mode 100644
index 0000000..e5d50c9
--- /dev/null
+++ b/pulse/src/main/webapp/regionDetail.html
@@ -0,0 +1,550 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta http-equiv="CACHE-CONTROL" content="NO-CACHE,NO-STORE" />
+<meta http-equiv="PRAGMA" content="NO-CACHE" />
+<meta http-equiv="EXPIRES" content="-1">
+<title>Pulse</title>
+<link href="css/common.css" rel="stylesheet" type="text/css" />
+<link href="css/style.css" rel="stylesheet" type="text/css" />
+<link type="text/css" href="css/base.css" rel="stylesheet" />
+<link type="text/css" href="css/Treemap.css" rel="stylesheet" />
+<link type="text/css" href="css/jquery.jscrollpane.css" rel="stylesheet" media="all" />
+<link rel="stylesheet" type="text/css" media="screen" href="css/grid/ui.jqgrid.css" />
+<!-- fix IE Ui issues-->
+<!--[if IE 7]>
+  <link href="css/ie/ie7.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 8]>
+  <link href="css/ie/ie8.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 9]>
+  <link href="css/ie/ie9.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!-- IE Fix for HTML5 Tags -->
+<!--[if lt IE 9]>
+<script src='scripts/lib/html5.js'></script>
+<script type="text/javascript" src="scripts/lib/excanvas.js"></script>
+<script type="text/javascript"> if (!window.console) console = {log: function() {}}; </script>
+  <![endif]-->
+<script type="text/javascript" src="scripts/lib/jquery-1.7.2.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.i18n.properties.js"></script>
+<script type="text/javascript" src="scripts/lib/jit.js"></script>
+<script type="text/javascript" src='scripts/lib/common.js'></script>
+<script type="text/javascript" src="scripts/lib/jquery.mousewheel.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.jscrollpane.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.placeholder.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.sparkline.js"></script>
+<script type="text/javascript" src="scripts/lib/grid.locale-en.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.jqGrid.src.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.tablednd.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.timeago.js"></script>
+
+<script type="text/javascript" src='scripts/pulsescript/regionView.js'></script>
+<script type="text/javascript" src="scripts/pulsescript/PulseCallbacks.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/PulseFunctions.js"></script>
+<script type="text/javascript" src='scripts/pulsescript/common.js'></script>
+<script type="text/javascript" src="scripts/lib/tooltip.js"></script>
+
+<STYLE type="text/css">
+	div.jspDrag {left: -3px;}
+</STYLE>
+</head>
+
+<body onload="return checkMedia();">
+
+<!-- popup (Riya) -->
+<div id="popupDiv" style="position:relative; display: none;"  data-role="widget" data-widgetid="ClusterSelectedRegionsMember" data-active ="yes" data-timeline="5000">
+
+	<!-- Large Block-->
+    <div class="content" style="background: none repeat scroll 0 0 #132634;">
+      <h3><span id="idMemberName">M1</span></h3>
+        
+        <div class="clearfix">
+          <div class="widthfull-100per left " style="padding-top:5px;">
+            <div class=" popupdetailsBlock">
+						  <div class="color-fff font-size15" id="regionMemberEntryCount">0</div>
+						  <span class="labeltext">Entry Count</span>
+					  </div>
+					  <div class="popupdetailsBlock">
+						  <div class="color-fff font-size15" id="regionMemberEntrySize">0</div>
+						  <span class="labeltext">Entry Size(MB)</span>
+					  </div>
+					  <div class="marginB5 popupdetailsBlock">
+						  <div class="color-fff font-size15" id="regionMemberAccessor">-</div>
+						  <span class="labeltext">Accessor</span>
+					  </div>
+          </div>
+				  <div class="left popupCanvasContentBlock" id="SmallBlock_3">
+				    <div style="border-top: 1px solid #4e6277; margin: 0px 10px 5px;"></div>
+                    <div class="marginB11 graphBlocksContent">
+                        <div class="left">
+                            <span class="left">Last 15 Minutes</span>
+                        </div>
+                        <div class="right marginL10">
+		                    <span data-prod-custom="pulse-reads-custom" class="left">Reads</span>
+		                    <span class="left marginL5 colorCodeBlockOnPopup diskReadsCode"></span>
+		                </div>
+		                <div class="right marginL10">
+		                    <span data-prod-custom="pulse-writes-custom" class="left">Writes</span>
+		                    <span class="left marginL5 colorCodeBlockOnPopup diskWritesCode"></span>
+		                </div>
+                    </div>
+                    <div class="clearfix">
+                        <div class="left" style="width:135px;">
+                            <div class="graphBlocksContent">
+                                <div class="color-fff font-size15">
+                                    <span id="memberMemoryReadsThroughput">&nbsp;</span>
+                                </div>
+                                <div class="width100Per">
+                                    <span class="">Reads</span>
+                                </div>
+                                <div class="left marginTop6 graphborder" style="background: #132634;">
+                                	<span class="left lineGraph" id="memberMemoryReadsTrend">&nbsp;</span>
+                            	</div>
+                            </div>
+                        </div>
+                        <div class="left" style="width:135px;">
+                            <div class="graphBlocksContent">
+                                <div class="color-fff font-size15">
+                                    <span id="memberMemoryWritesThroughput">&nbsp;</span>
+                                </div>
+                                <div class="width100Per ">
+                                    <span class="">Writes</span>
+                                </div>
+                                <div class="left marginTop6 graphborder" style="background: #132634;">
+                                	<span class="left lineGraph" id="memberMemoryWritesTrend">&nbsp;</span>
+                            	</div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="clearfix">
+                        <div class="left" style="width:135px;">
+                            <div class="graphBlocksContent">
+                                <div class="color-fff font-size15">
+                                    <span id="memberDiskReadsThroughput">&nbsp;</span>
+                                </div>
+                                <div class="width100Per">
+                                    <span class="">Disk Reads</span>
+                                </div>
+                                <div class="left marginTop6 graphborder" style="background: #132634;">
+                                	<span class="left lineGraph" id="memberDiskReadsTrend">&nbsp;</span>
+                            	</div>
+                            </div>
+                        </div>
+                        <div class="left" style="width:135px; border: 0px solid #889eb9;">
+                            <div class="graphBlocksContent" >
+                                <div class="color-fff font-size15">
+                                    <span id="memberDiskWritesThroughput">&nbsp;</span>
+                                </div>
+                                <div class="width100Per">
+                                    <span class="">Disk Writes</span>
+                                </div>
+                                <div class="left marginTop6 graphborder" style="background: #132634;">
+                                <span class="left lineGraph" id="memberDiskWritesTrend">&nbsp;</span>
+                            </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <!-- </div>
+            </div> -->
+        </div>
+    </div>
+</div>
+<!-- popup (Riya) -->
+
+<!-- Connection lost-->
+<div class="connectionLostMasterBlock hide" id="connectionStatusDiv" >
+<div class="connectionLostInnerBlock">
+    <label class="left">Connecting ...</label>
+    <div class="clear"></div>
+    <div id="connectionErrorMsgDiv" class="right"></div>
+</div>
+</div>
+<div id="canvasWidth">
+<!--Top Links-->
+  <div class="headerTopLinksMaster">
+    <div class="right">
+      <div class="left position-relative"><a href="#."class="left headerTopLinks aboutClicked-Off">About</a> 
+        <!-- About Dropdown-->
+        <div id="detailsAbout" class="aboutBlock display-none">
+          <div class="aboutDetailsBlock">
+            <div class="left widthfull-100per marginBottom30">
+              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about.png">
+                <div>
+                 <div class="aboutVersionBlock left" id="pulseVersion"></div>
+                 <div class="left termsBlock">&nbsp;<a id="pulseVersionDetailsLink"  href="#dialog1" class="display-none" >Version Details</a></div>
+                </div>
+              </div>
+              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
+            </div>
+           <div class="left widthfull-100per">
+                <div class="left copyright">
+                  Copyright &#0169; 2012-2014 Pivotal Software, Inc. All Rights Reserved. 
+                  This product is protected by U.S. and international copyright and 
+                  intellectual property laws. Pivotal products are covered by one or 
+                  more patents listed at <a href="http://www.pivotal.io/patents"
+                  target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
+                </div>
+                
+                <div class="left copyright">Pivotal is a registered
+                  trademark or trademark of Pivotal Software, Inc. in the United States and
+                  other jurisdictions. All other marks and names mentioned herein
+                  may be trademarks of their respective companies.</div>
+                
+                <div class="left termsBlock">
+                  <a href="oslicenses.txt" target="_blank">Open Source
+                    Licenses</a>
+                </div>
+               <!-- <div class="right termsBlock">
+                  Pulse <a href="#.">Terms of Service</a>
+                </div>-->
+              </div>
+            </div>
+        </div>
+        <!-- Version Details Popup -->
+      </div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left"><a data-prod-custom="pulse-help-custom"  target="_blank" href="http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html" class="left headerTopLinks">Help</a></div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left headerTopLinks welcomeLabelPRZero">Welcome</div>
+      <div class="left headerTopLinks textbold font-size12" id="userName"></div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left"><a href="pulse/clusterLogout" class="left headerTopLinks">Sign Out</a></div>
+    </div>
+  </div> 
+  <!-- Header block-->
+  <header>
+    <div class="left">
+      <a href="#." class="left textbold HeaderLink HeaderLinkActive" id="clusterName"  onclick="openClusterDetail();"></a>
+    </div>
+    <div class="textbold right logoBlock"><a href="#.">[LOGO]</a></div>
+  </header>
+  <div class="clear"></div>
+  <div class="subHeader">
+			<ul>
+				<li><a href="#." class="active" onclick="openClusterDetail();">Cluster View</a></li>
+				<!-- Hide Data Browser tab for gemfirexd (Pulse-Cheetah Release) -->
+				<li><a href="#."  onclick="openDataBrowser();">Data Browser</a></li>
+				<!-- Hide Query Statistics tab for gemfire -->
+				<li id="subTabQueryStatistics"><a href="#." onclick="openQueryStatistics();">Query Statistics</a></li>
+			</ul>
+		<div class="clear"></div>
+		</div>
+  <!-- Middle block-->
+  <div class="left widthfull-100per"> 
+    <!--Top Right Block 1-->
+    <div class="right widthfull-100per marginTB10">
+    <!-- Tab -->
+    <div id="notificationsPanel" class="right marginL10 TabTopPanel position-relative" 
+    data-role="widget" data-widgetid="CluserAlertNotification" data-active ="yes" data-timeline="5000">
+    </div>
+      <div class="left position-relative membersNameTopMargin"><span class="member_txt" style="font-size: 14px;">Region Name&nbsp;:&nbsp;<span id="regionNameText"></span></span> </div>
+    </div>
+    <!--Middle Block 1-->
+    <div class="left leftBlockCanvas">
+      <div  data-role="widget" data-widgetid="ClusterSelectedRegion" data-active ="yes" data-timeline="5000">
+        <div class="dataViewTreeViewBlock"> 
+          <!-- Large Block-->
+          <div class="canvasBlockLargeDataView marginBR10-11 left">
+            <div class="left widthfull-100per canvasBlockInnerBlock">
+              <span data-prod-custom="pulse-rtSummaryBySize-custom" class="left marginL10 canvasHeading">Region Members</span>
+              <a id="btngridIcon" class="gridIcon " onClick="tabClusterGrid();"></a>
+              <a id="btnchartIcon" class="chartIconActive" onClick="tabTreeMap();" ></a>
+            </div>
+            <div class="left widthfull-100per canvasBlockInnerBlock regionHeading">
+              <!-- Search-->
+              <div class="left marginBottom6 marginL10 marginTop6">
+                <div class="searchBlockMaster">
+                  <input type="button" class="searchButton">
+                  <!-- <input type="text" placeholder="Search" 
+                    onkeyup="applyFilterOnClusterRegions();" class="searchBox"
+                    id="filterClusterRegionsBox"> -->
+                    <input type="text" placeholder="Search" 
+                    onkeyup="applyFilterOnRegionMembers();" class="searchBox"
+                    id="filterRegionMembersBox">
+                </div>
+              </div>
+            </div>
+            <div class="left canvasInnerBlock canvasBlockLargeContentDataView" id="LargeBlock_1"> 
+              <!--Grid  Block-->
+              <div class="graphBlocksPanelDataView left display-none" id="gridBlocks_Panel">
+                <div class="left widthfull-100per">
+                  <table id="memberList"></table>
+                </div>
+              </div>
+              <!--chart  Block-->
+              <div class="chartBlocksPanelDataView left" id="chartBlocks_Panel">
+                <div class="left widthfull-100per">
+                  <div class="clear"></div>
+                  <div class="treeViewGraphDataView position-relative">
+                    <div id="GraphTreeMap" style="width: 100%; height: 690px; overflow: hidden;"></div> 
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <!-- Right Block-->
+        <div class="rightBlockDataView"> 
+          <!-- Block 1-->
+          <div class="canvasBlockDataView marginB10 left">
+            <!-- <div class="selectedRegionLabel" id="regionName"></div> -->
+            <div class="selectedRegionLabel" id="regionPath"></div>
+            <div class="left width563 canvasBlockInnerBlock regionHeading">
+              <span class="left marginL10 canvasHeading">
+                <!-- <span data-prod-custom="pulse-regionstablePath-custom" class="left">Region Path:&nbsp;</span>
+                <label id="regionPath"></label> -->
+                <span data-prod-custom="pulse-regionstableType-custom" class="left">Region Type:&nbsp;</span>
+                <label id="regionType"></label>
+              </span>
+            </div>
+            <div class="left canvasInnerBlock canvasContentBlockDataView" id="SmallBlock_1"> 
+              <!-- block 1-->
+              <div class="graphBlocksContentDataView left">
+                <div class="detailsBlock-memberDataView">
+                  <div class="color-d2d5d7 font-size20" id="regionMembersText"></div>
+                  <span class="labeltext">Members</span></div>
+                <div class="detailsBlock-memberDataView">
+                  <div class="color-d2d5d7 font-size20" id="regionEmptyNodes"></div>
+                  <span class="labeltext">Empty Nodes</span></div>
+                <div class="detailsBlock-memberDataView">
+                  <div class="color-d2d5d7 font-size20"  id="regionEntryCountText"></div>
+                  <span class="labeltext" data-prod-custom="pulse-entrycount-custom">Entry Count</span></div>
+                <div class="detailsBlock-memberDataView">
+                  <div class="color-d2d5d7 font-size20" id="regionDiskUsage"></div>
+                  <span class="labeltext">Disk Usage</span></div>
+                <div class="detailsBlock-memberDataView">
+                  <div class="color-d2d5d7 font-size20" id="regionPersistence"></div>
+                  <span class="labeltext">Persistence</span></div>
+                <!-- <div class="detailsBlock-memberDataView">
+                  <div class="color-d2d5d7 font-size20" id="regionIsEnableOffHeapMemory"></div>
+                  <span class="labeltext">Off-Heap</span></div>
+                <div class="detailsBlock-memberDataView">
+                  <div class="color-d2d5d7 font-size20" id="regionIsHdfsWriteOnly"></div>
+                  <span class="labeltext">HDFS Write Only</span></div> -->
+              </div>
+              <div class="clear"></div>
+              <div class="horizontalSeparator"></div>
+              <div class="left widthfull-100per">
+                <div class="left dataViewLeftBlock"> 
+                  <!-- B1 -->
+                  <div class="left display-block widthfull-100per marginTop10" id="memoryUsageDiv">
+                    <div class="pointGridHeading border-topZero">
+                      <span data-prod-custom="pulse-regionMemoryUsage-custom" class="pointHeadingPadding textUpper">Memory Usage</span>
+                    </div>
+                    <div class="pointGridDataView">
+                      <div class="left dataViewUsedMasterBlock">
+                        <div class="left widthfull-100per">
+                          <div class="usageDataView firstPaddingLeftZero left">
+                            <div class="color-d2d5d7 font-size20">
+                              <span id="memoryUsed">0</span>
+                              <span class="font-size13 paddingL5" id="memoryUsedMBSpan">MB</span>
+                            </div>
+                            <span class="labeltext">Used</span> </div>
+                          <div class="usageDataView lastPaddingLeftZero right">
+                            <div class="color-d2d5d7 font-size20">
+                              <span id="totalMemory">0</span>
+                              <span class="font-size13 paddingL5">MB</span>
+                            </div>
+                            <span class="labeltext">Total</span> </div>
+                        </div>
+                        <div class="dataUsedProgressbar">
+                          <div class="widthfull-100per">
+                            <div class="memoryUsageChart" id="memoryUsage"></div>
+                            <div class="memoryUsageValue">
+                              <span id="memoryUsageVal"></span>
+                              <span class="PerRightMargin">%</span>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                  <div class="clear"></div>
+                  <div class="horizontalSeparator"></div>
+                  <!--B2-->
+                  <div class=" border-topZero">
+                        <span data-prod-custom="pulse-regionMemoryReadsWrites-custom" class="pointHeadingPadding textUpper">In-Memory Read/Write</span>
+                  </div>
+	                <div class="dataViewGraphMaster marginzero width100Per">
+		                  <div class="left display-block widthfull-100per">
+		                    <div class="left widthfull-100per">
+		                      <div class="left dataViewUsedMasterBlock">
+		                        <div class="graphBlocksContent marginB11 ">
+		                          <div class="left">
+		                            <span class="left">Last 15 Minutes</span>
+		                          </div>
+		                          <div class="right marginL10">
+		                            <span data-prod-custom="pulse-reads-custom" class="left">Reads</span>
+		                            <span class="left marginL10 colorCodeBlock diskReadsCode"></span>
+		                          </div>
+		                          <div class="right marginL10">
+		                            <span data-prod-custom="pulse-writes-custom" class="left">Writes</span>
+		                            <span class="left marginL10 colorCodeBlock diskWritesCode"></span>
+		                          </div>
+		                        </div>
+		                        <div class="">
+		                         <div class="graphBlocksContent">
+		                            <div class="color-d2d5d7 font-size20" id="currentReadsPerSec"></div>
+		                            <span class="labeltext">Reads</span>
+		                         </div>
+		                          <div class="widthfull-100per">
+		                            <div class="dataViewGraph"><span class="left lineGraph" id="readsPerSecTrend"></span></div>
+		                          </div>
+		                        </div>
+		                      </div>
+		                    </div>
+		                  </div>
+		                  <div class="left display-block widthfull-100per">
+		                    <div class="left widthfull-100per">
+		                      <div class="left dataViewUsedMasterBlock marginTop4">
+		                        <div class="">
+		                         <div class="graphBlocksContent">
+		                            <div class="color-d2d5d7 font-size20" id="currentWritesPerSec"></div>
+		                            <span class="labeltext">Writes</span>
+		                         </div>
+		                          <div class="widthfull-100per">
+		                            <div class="dataViewGraph"><span class="left lineGraph" id="writesPerSecTrend"></span></div>
+		                          </div>
+		                        </div>
+		                      </div>
+		                    </div>
+		                  </div>
+	                </div>
+                </div>
+                <div class="left dataViewRightBlock marginL10">
+                  <!--B3-->
+                  <div class="left display-block widthfull-100per margin marginTop10" id="regionMembersWidgetContainer">
+                    <!-- <div class="pointGridHeading border-topZero"><span data-prod-custom="pulse-regionstableMembers-custom" class="pointHeadingPadding textUpper">Region Members</span></div> -->
+                    <div>
+                      <div class="left regionMembersMasterBlock">
+                        <!-- <div class="left widthfull-100per"> 
+                          Search
+                          <div class="left marginB10 marginL10">
+                           <div class="searchBlockMaster">
+                            <input type="button" class="searchButton">
+                            <input type="text" placeholder="Search" onkeyup="applyFilterOnMembersList();" class="searchBox" id="filterMembersListBox">
+                          </div>
+                          </div>
+                          <div class="clear"></div>
+                           <div class="left regionMembersSearchBlock">
+                           <div id="memberNames" class="memberNamescls"></div>
+                          </div>
+                        </div> -->
+                      </div>
+                    </div>
+                  </div>
+                  <div class="clear"></div>
+                  <div class="horizontalSeparator"></div>
+                  <!--B4-->
+                  <div class=" border-topZero">
+                        <span data-prod-custom="pulse-regionDiskReadsWrites-custom" class="pointHeadingPadding textUpper">Disk Read/Write</span>
+                  </div>
+                  <div class="dataViewGraphMaster marginzero width100Per">
+                      <div class="left display-block widthfull-100per">
+                        <div class="left widthfull-100per">
+                          <div class="left dataViewUsedMasterBlock ">
+                            <div class="graphBlocksContent marginB11 ">
+                              <div class="left">
+                                <span class="left">Last 15 Minutes</span>
+                              </div>
+                              <div class="right marginL10">
+                                <span data-prod-custom="pulse-reads-custom" class="left">Reads</span>
+                                <span class="left marginL10 colorCodeBlock diskReadsCode"></span>
+                              </div>
+                              <div class="right marginL10">
+                                <span data-prod-custom="pulse-writes-custom" class="left">Writes</span>
+                                <span class="left marginL10 colorCodeBlock diskWritesCode"></span>
+                              </div>
+                            </div>
+                            <div class="">
+                             <div class="graphBlocksContent">
+                                <div class="color-d2d5d7 font-size20" id="currentDiskReadsPerSec"></div>
+                                <span class="labeltext">Reads</span>
+                             </div>
+                              <div class="widthfull-100per">
+                                <div class="dataViewGraph"><span class="left lineGraph" id="diskReadsPerSecTrend"></span></div>
+                              </div>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                      <div class="left display-block widthfull-100per">
+                        <div class="left widthfull-100per">
+                          <div class="left dataViewUsedMasterBlock marginTop4">
+                            <div class="">
+                             <div class="graphBlocksContent">
+                                <div class="color-d2d5d7 font-size20" id="currentDiskWritesPerSec"></div>
+                                <span class="labeltext">Writes</span>
+                             </div>
+                              <div class="widthfull-100per">
+                                <div class="dataViewGraph"><span class="left lineGraph" id="diskWritesPerSecTrend"></span></div>
+                              </div>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                  </div>
+                 </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="clear"></div>
+        </div>
+      </div>
+    </div>
+  </div>
+
+<!-- Placeholder--> 
+<script>
+$('input[placeholder], textarea[placeholder]').placeholder();
+</script>
+<!--Popups Block-->
+<div id="boxes"> 
+  <!-- Version Details popup-->
+ <div id="dialog1" class="window width345" data-role="widget" data-widgetid="PulseVersionDetails" data-active ="yes" data-timeline="5000">
+    <div class="popup_heading"><span>Version Details</span><a href="#" class="closePopup">&nbsp;</a></div>
+    <div class="popup_contentBlock">
+      <div class="popup-innerblock">
+        <ul class="widthfull-100per left">
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Pulse Version:</label>
+            <label class="width-58 display-inline-block" id="pulseVer"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Build Id:</label>
+            <label class="width-58 display-inline-block" id="buildId"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Build Date:</label>
+            <label class="width-58 display-inline-block" id="buildDate"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Source Date:</label>
+            <label class="width-58 display-inline-block" id="sourceDate"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Source Revision:</label>
+            <label class="width-58 display-inline-block" id="sourceRevision"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Source Repository:</label>
+            <label class="width-58 display-inline-block" id="sourceRepository"></label>
+          </li>
+        </ul>
+        <div class="clear"></div>
+      </div>
+    </div>
+  </div>
+  <!-- Mask to cover the whole screen -->
+  <div id="mask"></div>
+</div>
+<div id="tooltip" class="tooltip"></div>
+<div id="region_tooltip" class="tooltip"></div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/lib/common.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/lib/common.js b/pulse/src/main/webapp/scripts/lib/common.js
new file mode 100644
index 0000000..b53cb97
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/lib/common.js
@@ -0,0 +1,517 @@
+var isThisGoodResolution;
+var oldSelectedTab;
+/* flagActiveTab valid values 
+ * MEM_R_GRAPH_DEF, 
+ * MEM_TREE_MAP_DEF, MEM_TREE_MAP_SG, MEM_TREE_MAP_RZ, DATA_TREE_MAP_DEF, 
+ * MEM_GRID_DEF, MEM_GRID_SG, MEM_GRID_RZ, DATA_GRID_DEF
+ */
+var flagActiveTab = "";
+
+var currentActiveNotificationTab = "ALL"; // valid values 'ALL', 'SEVERE', 'ERROR', 'WARNING'
+var currentActivePerspective = "MEMBER"; // valid values 'MEMBER', 'DATA'
+var hotspotAttributes = new Array(); // For Hotspot
+var currentHotspotAttribiute = null; // For Hotspot
+
+function checkMedia()
+
+{
+	$('.scroll-pane').jScrollPane();/*
+																	 * custom scroll bar on body load for 1st tab
+																	 */
+	$('.scroll-pane_1').jScrollPane();
+	$('.pointGridData').jScrollPane();
+	$('.regionMembersSearchBlock').jScrollPane();
+
+	$('.ui-jqgrid-bdiv').jScrollPane();
+
+	if (document.getElementById('canvasWidth') != null) {
+		var winW, winH;
+		if (document.body && document.body.offsetWidth) {
+			winW = document.body.offsetWidth;
+			winH = document.body.offsetHeight;
+
+		}
+		if (document.compatMode == 'CSS1Compat' && document.documentElement
+		    && document.documentElement.offsetWidth) {
+			winW = document.documentElement.offsetWidth;
+			winH = document.documentElement.offsetHeight;
+		}
+		if (window.innerWidth && window.innerHeight) {
+			winW = window.innerWidth;
+			winH = window.innerHeight;
+		}
+
+		document.getElementById('canvasWidth').style.width = "1258px";
+		// alert('Weight: ' + winW );
+		// alert('Height: ' + winH );
+		if (winW <= 1024) {
+
+			document.getElementById('canvasWidth').style.width = "1002px";
+			// document.getElementById("overLapLinkBlock").style.display =
+			// 'none';
+			/* onload hide first top tab block */
+			$('#TopTab_All').hide();
+			$('#btnTopTab_All').removeClass('TopTabLinkActive');
+			isThisGoodResolution = false;
+		} else {
+
+			document.getElementById('canvasWidth').style.width = "1258px";
+			isThisGoodResolution = true;
+			// document.getElementById("overLapLinkBlock").style.display =
+			// 'block';
+		}
+	}
+
+}
+
+/* Version Details Popup handler */
+$(document).ready(function() {
+
+  // popHandler handles the display of pop up window on click event on link
+  function popupHandler(e) {
+    // Cancel the link behavior
+    e.preventDefault();
+
+    // Get the A tag
+    var id = $(this).attr('href');
+
+    // Get the screen height and width
+    var maskHeight = $(document).height();
+    var maskWidth = $(window).width();
+
+    // Set height and width to mask to fill up the whole screen
+    $('#mask').css({
+      'width' : maskWidth,
+      'height' : maskHeight
+    });
+
+    // transition effect
+    $('#mask').fadeIn(1000);
+    $('#mask').fadeTo("fast", 0.8);
+
+    // Get the window height and width
+    var winH = $(window).height();
+    var winW = $(window).width();
+
+    // Set the popup window to center
+    $(id).css('top', winH / 2 - $(id).height() / 2);
+    $(id).css('left', winW / 2 - $(id).width() / 2);
+
+    // transition effect
+    $(id).fadeIn(1500);
+
+  };    // end of popupHandler
+
+  // Add popupHandler on click of version details link   
+  $('[id=pulseVersionDetailsLink]').click(popupHandler);
+
+  // if close button is clicked
+  $('.window .closePopup').click(function(e) {
+    // Cancel the link behavior
+    e.preventDefault();
+
+    $('#mask').hide();
+    $('.window').hide();
+  });
+  // if input close button is clicked
+  $('.window .closePopupInputButton').click(function(e) {
+    // Cancel the link behavior
+    e.preventDefault();
+
+    $('#mask').hide();
+    $('.window').hide();
+  });
+
+  // if mask is clicked
+  $('#mask').click(function() {
+    $(this).hide();
+    $('.window').hide();
+  });
+
+});
+
+/* About Dropdown */
+$(document).ready(function() {
+	$(".aboutClicked-Off").click(function(e) {
+		e.preventDefault();
+		$("div#detailsAbout").toggle();
+		$(".aboutClicked-Off").toggleClass("aboutClicked-On");
+	});
+
+	$("div#detailsAbout").mouseup(function() {
+		return false;
+	});
+	$(document).mouseup(function(e) {
+		if ($(e.target).parent("a.aboutClicked-Off").length == 0) {
+			$(".aboutClicked-Off").removeClass("aboutClicked-On");
+			$("div#detailsAbout").hide();
+		}
+	});
+
+});
+/* Members name Dropdown */
+$(document).ready(function() {
+	$(".memberClicked-Off").click(function(e) {
+		e.preventDefault();
+		$("div#setting").toggle();
+		$(".memberClicked-Off").toggleClass("memberClicked-On");
+		$('.jsonSuggestScrollFilter').jScrollPane();
+	});
+
+	$("div#setting").mouseup(function() {
+		return false;
+	});
+	$(document).mouseup(function(e) {
+		if ($(e.target).parent("a.memberClicked-Off").length == 0) {
+			$(".memberClicked-Off").removeClass("memberClicked-On");
+			$("div#setting").hide();
+		}
+	});
+
+	/* on off switch */
+	$('#membersButton').addClass('switchActive');
+	$('#switchLinks').show();
+
+	$("#membersButton").click(function(e) {
+		$('#membersButton').addClass('switchActive');
+		$('#dataButton').removeClass('switchActive');
+		$('#switchLinks').show();
+	});
+
+	$("#dataButton").click(function(e) {
+		$('#membersButton').removeClass('switchActive');
+		$('#dataButton').addClass('switchActive');
+		$('#switchLinks').hide();
+	});
+
+});
+/* show block function */
+function showDiv(divSelected) {
+	$('#' + divSelected).show();
+}
+
+/* hide block function */
+function hideDiv(divSelected) {
+	$('#' + divSelected).hide();
+}
+/* Toggle Top Tab */
+function toggleTab(divSelected) {
+	/*
+	 * $(document).mouseup(function(e) { $('#'+divSelected).hide(); });
+	 */
+
+	if (!isThisGoodResolution) {
+		$('#' + divSelected).toggle();
+		$('.scroll-pane').jScrollPane();
+		if (oldSelectedTab == divSelected) {
+			$('#' + 'btn' + oldSelectedTab).removeClass('TopTabLinkActive');
+			oldSelectedTab = "";
+
+		} else {
+			oldSelectedTab = divSelected;
+		}
+
+	}
+
+}
+
+/* toggle block function */
+function toggleDiv(divSelected) {
+	$('#' + divSelected).toggle();
+	if ($('#' + 'btn' + divSelected).hasClass('minusIcon')) {
+		$('#' + 'btn' + divSelected).addClass('plusIcon');
+		$('#' + 'btn' + divSelected).removeClass('minusIcon');
+	} else {
+		$('#' + 'btn' + divSelected).addClass('minusIcon');
+		$('#' + 'btn' + divSelected).removeClass('plusIcon');
+	}
+
+}
+
+/*---Accordion-----*/
+function accordion() {
+
+	$('.accordion .heading').prepend('<span class="spriteArrow"></span>');
+	$('.accordion .heading').click(
+	    function() {
+		    var accordionId = $(this).parent().parent().attr('id');
+		    accordionId = ('#' + accordionId);
+
+		    if ($(this).is('.inactive')) {
+			    $(accordionId + ' .active').toggleClass('active').toggleClass(
+			        'inactive').next().slideToggle();
+			    $(this).toggleClass('active').toggleClass('inactive');
+			    $(this).next().slideToggle();
+			    $(this).next().find('.n-heading').removeClass('n-active');
+			    $(this).next().find('.n-heading').addClass('n-inactive');
+			    $(this).next().find('.n-accordion-content').hide();
+		    }
+
+		    else {
+			    $(this).toggleClass('active').toggleClass('inactive');
+			    $(this).next().slideToggle();
+
+		    }
+		    /* custom scroll bar */
+		    $('.ScrollPaneBlock').jScrollPane();
+	    });
+	// onload keep open
+        $('.accordion .heading').not('.active').addClass('inactive');
+        $('.accordion .heading.active').next().show();
+}
+
+/*---Accordion Nested-----*/
+function accordionNested() {
+
+	$('.accordionNested .n-heading').prepend(
+	    '<span class="n-spriteArrow"></span>');
+	$('.accordionNested .n-heading').click(
+	    function() {
+		    /* Custom scroll */
+		    var accordionIdNested = $(this).parent().parent().attr('id');
+		    accordionIdNested = ('#' + accordionIdNested);
+
+		    if ($(this).is('.n-inactive')) {
+			    $(accordionIdNested + ' .n-active').toggleClass('n-active')
+			        .toggleClass('n-inactive').next().slideToggle();
+			    $(this).toggleClass('n-active').toggleClass('n-inactive');
+			    $(this).next().slideToggle();
+			    /* Custom scroll */
+			    $('.ui-jqgrid-bdiv').jScrollPane();
+		    }
+
+		    else {
+			    $(this).toggleClass('n-active').toggleClass('n-inactive');
+			    $(this).next().slideToggle();
+
+		    }
+
+	    });
+	// onload keep open
+        $('.accordionNested .n-heading').not('.n-active').addClass('n-inactive');
+        $('.accordionNested .n-heading.n-active').next().show();
+        /* Custom scroll */
+        $('.ui-jqgrid-bdiv').jScrollPane();
+}
+
+/* show panel */
+function tabGridNew(parentId) {
+  $('#gridBlocks_Panel').hide();
+  destroyScrollPane(parentId);
+  $('#gridBlocks_Panel').show();
+  $('#chartBlocks_Panel').hide();
+  $('#graphBlocks_Panel').hide();
+  /* Custom scroll */
+
+  $('.ui-jqgrid-bdiv').each(function(index) {
+    var tempName = $(this).parent().attr('id');
+    if (tempName == parentId) {
+      $(this).jScrollPane({maintainPosition : true, stickToRight : true});  
+    }
+  });
+
+  $('#btngridIcon').addClass('gridIconActive');
+  $('#btngridIcon').removeClass('gridIcon');
+
+  $('#btnchartIcon').addClass('chartIcon');
+  $('#btnchartIcon').removeClass('chartIconActive');
+
+  $('#btngraphIcon').addClass('graphIcon');
+  $('#btngraphIcon').removeClass('graphIconActive');
+}
+
+function tabChart() {
+
+	$('#gridBlocks_Panel').hide();
+	$('#chartBlocks_Panel').show();
+	$('#graphBlocks_Panel').hide();
+
+	$('#btngridIcon').addClass('gridIcon');
+	$('#btngridIcon').removeClass('gridIconActive');
+
+	$('#btnchartIcon').addClass('chartIconActive');
+	$('#btnchartIcon').removeClass('chartIcon');
+
+	$('#btngraphIcon').addClass('graphIcon');
+	$('#btngraphIcon').removeClass('graphIconActive');
+}
+
+/* Top tab Panel */
+function tabAll() {
+  // update currentActiveNotificationTab value
+  currentActiveNotificationTab = "ALL";
+  if (isThisGoodResolution) {
+    $('#TopTab_All').show();
+  }
+  $('#TopTab_Error').hide();
+  $('#TopTab_Warning').hide();
+  $('#TopTab_Severe').hide();
+
+  $('#btnTopTab_All').addClass('TopTabLinkActive');
+  $('#btnTopTab_Error').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Warning').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Severe').removeClass('TopTabLinkActive');
+  $('.scroll-pane').jScrollPane();
+}
+
+function tabError() {
+  // update currentActiveNotificationTab value
+  currentActiveNotificationTab = "ERROR";
+  $('#TopTab_All').hide();
+  if (isThisGoodResolution) {
+    $('#TopTab_Error').show();
+  }
+  $('#TopTab_Warning').hide();
+  $('#TopTab_Severe').hide();
+
+  $('#btnTopTab_All').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Error').addClass('TopTabLinkActive');
+  $('#btnTopTab_Warning').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Severe').removeClass('TopTabLinkActive');
+  $('.scroll-pane').jScrollPane();
+}
+
+function tabWarning() {
+  // update currentActiveNotificationTab value
+  currentActiveNotificationTab = "WARNING";
+  $('#TopTab_All').hide();
+  $('#TopTab_Error').hide();
+  if (isThisGoodResolution) {
+    $('#TopTab_Warning').show();
+  }
+  $('#TopTab_Severe').hide();
+
+  $('#btnTopTab_All').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Error').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Warning').addClass('TopTabLinkActive');
+  $('#btnTopTab_Severe').removeClass('TopTabLinkActive');
+  $('.scroll-pane').jScrollPane();
+}
+
+function tabSevere() {
+  // update currentActiveNotificationTab value
+  currentActiveNotificationTab = "SEVERE";
+  $('#TopTab_All').hide();
+  $('#TopTab_Error').hide();
+  $('#TopTab_Warning').hide();
+  if (isThisGoodResolution) {
+    $('#TopTab_Severe').show();
+  }
+
+  $('#btnTopTab_All').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Error').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Warning').removeClass('TopTabLinkActive');
+  $('#btnTopTab_Severe').addClass('TopTabLinkActive');
+  $('.scroll-pane').jScrollPane();
+}
+/* Auto Complete box */
+/**
+ * function used for opening Cluster View
+ */
+function openClusterDetail() {
+	location.href = 'clusterDetail.html';
+}
+/**
+ * function used for opening Data View
+ */
+function openDataView() {
+	location.href = 'dataView.html';
+}
+/**
+ * function used for opening Data Browser
+ */
+function openDataBrowser() {
+	location.href = 'DataBrowser.html';
+}
+
+/**
+ * function used for opening Query statistics
+ */
+function openQueryStatistics() {
+  location.href = 'QueryStatistics.html';
+}
+
+function destroyScrollPane(scrollPaneParentId) {
+    $('.ui-jqgrid-bdiv').each(function(index) {
+      var tempName = $(this).parent().attr('id');
+      if (tempName == scrollPaneParentId) {
+        var api = $(this).data('jsp');
+        api.destroy();
+      }
+    });
+}
+
+//Initial set up for hotspot drop down
+function initHotspotDropDown() {
+
+  var htmlHotSpotList = generateHotSpotListHTML(hotspotAttributes);
+
+  // Set list height
+  if(hotspotAttributes.length <= 5){
+    $("#hotspotListContainer").height(hotspotAttributes.length * 26);
+  }else{
+    $("#hotspotListContainer").height(5 * 26);
+  }
+
+  $('#hotspotList').html(htmlHotSpotList);
+  $('.jsonSuggestScrollFilter').jScrollPane();
+
+  currentHotspotAttribiute = hotspotAttributes[0].id;
+  $('#currentHotSpot').html(hotspotAttributes[0].name);
+
+  // Hot Spot List event handlers
+  $(".hotspotClicked-Off").click(function(e) {
+    e.preventDefault();
+    $("div#hotspotSetting").toggle();
+    $(".hotspotClicked-Off").toggleClass("hotspotClicked-On");
+    $('.jsonSuggestScrollFilter').jScrollPane();
+  });
+
+  $("div#hotspotSetting").mouseup(function() {
+    return false;
+  });
+  $(document).mouseup(function(e) {
+    if ($(e.target).parent("a.hotspotClicked-Off").length == 0) {
+      $(".hotspotClicked-Off").removeClass("hotspotClicked-On");
+      $("div#hotspotSetting").hide();
+    }
+  });
+}
+
+//Function to be called on when Hot Spot selection changes
+function onHotspotChange(element) {
+  if (element != currentHotspotAttribiute) {
+    for ( var cnt = 0; cnt < hotspotAttributes.length; cnt++) {
+      if (element == hotspotAttributes[cnt].id) {
+        currentHotspotAttribiute = hotspotAttributes[cnt].id;
+        $('#currentHotSpot').html(hotspotAttributes[cnt].name);
+        applyHotspot();
+      }
+    }
+  }
+  // Hide drop down
+  $(".hotspotClicked-Off").removeClass("hotspotClicked-On");
+  $("div#hotspotSetting").hide();
+}
+
+//Function to generate HTML for Hot Spot list drop down
+function generateHotSpotListHTML(hotspotAttributes) {
+  var htmlHotSpotList = '';
+  for ( var i = 0; i < hotspotAttributes.length; i++) {
+    htmlHotSpotList += '<div class="resultItemFilter">'
+        + '<a href="#"  onclick="onHotspotChange(\'' + hotspotAttributes[i].id
+        + '\');" >' + hotspotAttributes[i].name + '</a></div>';
+  }
+  return htmlHotSpotList;
+}
+
+//Merged 3102 from 702X_maint
+function destroyScrollPane(scrollPaneParentId) { 
+   $('.ui-jqgrid-bdiv').each(function(index) { 
+   var tempName = $(this).parent().attr('id'); 
+   if (tempName == scrollPaneParentId) { 
+     var api = $(this).data('jsp'); 
+       api.destroy(); 
+    } 
+    }); 
+}



[09/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/scripts/pulsescript/MemberDetails.js
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/scripts/pulsescript/MemberDetails.js b/pulse/src/main/webapp/scripts/pulsescript/MemberDetails.js
new file mode 100644
index 0000000..1186f49
--- /dev/null
+++ b/pulse/src/main/webapp/scripts/pulsescript/MemberDetails.js
@@ -0,0 +1,1034 @@
+/*=========================================================================
+ * Copyright (c) 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * one or more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+
+// MemberDetails.js
+var memberRegions;
+var membersList = null;
+var isMemberListFilterHandlerBound = false;
+var gatewaysenderEndpoints = null;
+var asyncEventQueueData = null;
+
+// initializeMemberDetailsPage: function that initializes all widgets present on
+// Member Details Page
+$(document).ready(function() {
+
+  // Load Notification HTML
+  generateNotificationsPanel();
+
+  // loadResourceBundles();
+  // modify UI text as per requirement
+  customizeUI();
+
+  if (CONST_BACKEND_PRODUCT_SQLFIRE == productname.toLowerCase()) {
+    alterHtmlContainer(CONST_BACKEND_PRODUCT_SQLFIRE);
+  } else {
+    alterHtmlContainer(CONST_BACKEND_PRODUCT_GEMFIRE);
+  }
+
+  scanPageForWidgets();
+  createMemberRegionsTreeMap();
+  createMemberRegionsGrid();
+  createMemberClientsGrid(); // creating empty member client grid
+  $.ajaxSetup({
+    cache : false
+  });
+  
+  $('#MemberGatewayHubWidget').show();
+});
+
+/*
+ * Displays Gateway sender Popup
+ */
+function showGatewaySenderPopup(element) {
+  
+  hideAsyncEventQueuePopup();
+  
+  // content html
+  var alertDiv = "<div class='content'><span class='left marginL10 canvasHeading'>Gateway Sender Details</span>"
+    + "<div class='canvasInnerBlock tooltipcontent'><div class='gridBlocksPanel left' id='gateway_gridBlocks_Panel'>"
+    + "<div class='left widthfull-100per'><table id='idGatewaySenderGrid'></table></div></div></div>" 
+    + "<div class='marginB10'>&nbsp;&nbsp;</div></div><a class='closePopup' href='javascript:hideGatewaySenderPopup();'></a>";
+
+  $("#tooltip").html(alertDiv);
+
+  // Logic to display pop up
+  $(".tip_trigger").removeClass("active");
+  var parentOffset = $(element).offset();
+  $(element).addClass("active");
+
+  $("#tooltip").find('.tooltipcontent').css("height", 200);
+  $("#tooltip").find('.tooltipcontent').css("width", 500);
+  $("#tooltip").find('.content').css("width", 500);
+  $("#tooltip").css({
+    width : '500px'
+  });
+  var relX = parentOffset.left - ($("#tooltip").width() / 2);
+  var relY = parentOffset.top - 255;
+
+  $("#tooltip").css({
+    top : relY,
+    left : relX
+  });
+  
+  // put grid into pop-up
+  if (!($("#idGatewaySenderGrid")[0].grid)) {
+    // if grid is not initialized then create
+    createGatewaySenderGrid();
+  } else{
+    destroyScrollPane('gview_idGatewaySenderGrid') ;
+  }
+  
+  //clear grid and load data from global variable updated periodically
+  $('#idGatewaySenderGrid').jqGrid('clearGridData');
+  $('#idGatewaySenderGrid').jqGrid("getGridParam").data = gatewaysenderEndpoints;
+  var gridUserData = jQuery("#idGatewaySenderGrid").getGridParam('userData');
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#idGatewaySenderGrid").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  // Reload jqgrid
+  jQuery("#idGatewaySenderGrid").trigger("reloadGrid");
+  
+  $("#tooltip").show();
+  $("#tooltip").find('.ui-jqgrid-bdiv').jScrollPane({maintainPosition : true, stickToRight : true});
+}
+
+/*
+ * Hides Notification Alert Popup
+ */
+function hideGatewaySenderPopup() {
+  // Hide Pop up
+  $("#tooltip").hide();
+
+  destroyScrollPane('gview_idGatewaySenderGrid') ;
+}
+
+
+function showAsyncEventQueuePopup(element) {
+  
+  hideGatewaySenderPopup();
+  
+  // content html
+  var alertDiv = "<div class='content'><span class='left marginL10 canvasHeading'>Asynchronous Event Queue Details</span>"
+    + "<div class='canvasInnerBlock tooltipcontent'><div class='gridBlocksPanel left' id='asynch_event_queue_gridBlocks_Panel'>"
+    + "<div class='left widthfull-100per'><table id='idAsynchEventQueueGrid'></table></div></div></div>" 
+    + "<div class='marginB10'>&nbsp;&nbsp;</div></div><a class='closePopup' href='javascript:hideAsyncEventQueuePopup();'></a>";
+
+  $("#tooltip").html(alertDiv);
+
+  // Logic to display pop up
+  $(".tip_trigger").removeClass("active");
+  var parentOffset = $(element).offset();
+  $(element).addClass("active");
+
+  $("#tooltip").find('.tooltipcontent').css("height", 200);
+  $("#tooltip").find('.tooltipcontent').css("width", 500);
+  $("#tooltip").find('.content').css("width", 500);
+  $("#tooltip").css({
+    width : '500px'
+  });
+  var relX = parentOffset.left - ($("#tooltip").width() / 2);
+  var relY = parentOffset.top - 255;
+
+  $("#tooltip").css({
+    top : relY,
+    left : relX
+  });
+  
+  // put grid into pop-up
+  if (!($("#idAsynchEventQueueGrid")[0].grid)) {
+    // if grid is not initialized then create
+    createAsynchEventQueueGrid();
+  } else{
+    destroyScrollPane('gview_idAsynchEventQueueGrid') ;
+  }
+
+  //clear grid and load data from global variable updated periodically
+  $('#idAsynchEventQueueGrid').jqGrid('clearGridData');
+  $('#idAsynchEventQueueGrid').jqGrid("getGridParam").data = asyncEventQueueData;
+  var gridUserData = jQuery("#idAsynchEventQueueGrid").getGridParam('userData');
+  
+  // Apply sort order ans sort columns on updated jqgrid data
+  jQuery("#idAsynchEventQueueGrid").jqGrid('setGridParam', {
+    sortname : gridUserData.sortColName,
+    sortorder : gridUserData.sortOrder
+  });
+  
+  // Reload jqgrid
+  jQuery("#idAsynchEventQueueGrid").trigger("reloadGrid");
+  $("#tooltip").show();
+  $("#tooltip").find('.ui-jqgrid-bdiv').jScrollPane({maintainPosition : true, stickToRight : true});
+}
+
+/*
+ * Hides Notification Alert Popup
+ */
+function hideAsyncEventQueuePopup() {
+
+  // Hide Pop up
+  $("#tooltip").hide();
+
+  destroyScrollPane('gview_idAsynchEventQueueGrid') ;
+}
+
+/*
+ * Function to show and hide html elements/components based upon whether product
+ * is sqlfire or gemfire
+ */
+function alterHtmlContainer(prodname) {
+  if (CONST_BACKEND_PRODUCT_SQLFIRE == prodname.toLowerCase()) {
+    // Hide HTML for following
+
+    // Show HTML for following
+    $('#subTabQueryStatistics').show();
+  } else {
+    // Hide HTML for following
+    $('#subTabQueryStatistics').hide();
+
+    // Show HTML for following
+
+  }
+
+}
+
+// Function to generate HTML for Members list drop down
+function generateMemberListHTML(membersList) {
+  var htmlMemberList = '';
+  for ( var i = 0; i < membersList.length; i++) {
+    htmlMemberList += '<div class="resultItemFilter">'
+        + '<a href="MemberDetails.html?member=' + membersList[i].memberId
+        + '&memberName=' + membersList[i].name + '">' + membersList[i].name
+        + '</a></div>';
+  }
+  return htmlMemberList;
+}
+
+// Handler to filter members list drop down based on user's criteria
+var applyFilterOnMembersListDropDown = function(e) {
+  var searchKeyword = extractFilterTextFrom('filterMembersBox');
+  var filteredMembersList = new Array();
+  if (searchKeyword != "") {
+    // generate filtered members list
+    for ( var i = 0; i < membersList.length; i++) {
+      if (membersList[i].name.toLowerCase().indexOf(searchKeyword) !== -1) {
+        filteredMembersList.push(membersList[i]);
+      }
+    }
+
+    // Set list height
+    if(filteredMembersList.length <= 5){
+      $("#clusterMembersList").height(filteredMembersList.length * 26);
+    }else{
+      $("#clusterMembersList").height(5 * 26);
+    }
+
+    var htmlMemberListWithFilter = generateMemberListHTML(filteredMembersList);
+    e.preventDefault();
+    // $("div#setting").toggle();
+    $('#clusterMembersContainer').html(htmlMemberListWithFilter);
+    // $("div#setting").toggle();
+    $('.jsonSuggestScrollFilter').jScrollPane();
+  } else {
+
+    // Set list height
+    if(membersList.length <= 5){
+      $("#clusterMembersList").height(membersList.length * 26);
+    }else{
+      $("#clusterMembersList").height(5 * 26);
+    }
+
+    var htmlMemberList = generateMemberListHTML(membersList);
+    e.preventDefault();
+    // $("div#setting").toggle();
+    $('#clusterMembersContainer').html(htmlMemberList);
+    // $("div#setting").toggle();
+    $('.jsonSuggestScrollFilter').jScrollPane();
+  }
+
+};
+
+
+function createAsynchEventQueueGrid() {
+  jQuery("#idAsynchEventQueueGrid").jqGrid(
+      {
+        datatype : "local",
+        height : 150,
+        width : 500,
+        shrinkToFit : false,
+        rowNum : 20,
+        colNames : [ 'Id', 'Primary', 'Parallel', 'Batch Size', 'Batch Time Interval', 'Batch Conflation Enabled', 'Async Event Listener', 'Event Queue Size' ],
+        colModel : [
+            {
+              name : 'id',
+              index : 'id',
+              width : 80,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formAsynchEventQueueGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'primary',
+              index : 'primary',
+              width : 60,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formAsynchEventQueueGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'senderType',
+              index : 'senderType',
+              width : 60,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formAsynchEventQueueGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'batchSize',
+              index : 'batchSize',
+              width : 80,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formAsynchEventQueueGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "long"
+            },
+            {
+              name : 'batchTimeInterval',
+              index : 'batchTimeInterval',
+              width : 95,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formAsynchEventQueueGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'batchConflationEnabled',
+              index : 'batchConflationEnabled',
+              width : 125,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formAsynchEventQueueGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'asyncEventListener',
+              index : 'asyncEventListener',
+              align : 'right',
+              width : 145,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formAsynchEventQueueGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "long"
+            },
+            {
+              name : 'queueSize',
+              index : 'queueSize',
+              width : 125,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formAsynchEventQueueGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            } ],
+        userData : {
+          "sortOrder" : "asc",
+          "sortColName" : "id"
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#idAsynchEventQueueGrid").getGridParam(
+              'userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+        },
+        resizeStop : function(width, index) {
+          
+          var memberRegionsList = $('#gview_idAsynchEventQueueGrid');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          var api = memberRegionsListChild.data('jsp');
+          api.reinitialise();
+          
+          memberRegionsList = $('#gview_idAsynchEventQueueGrid');
+          memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_idAsynchEventQueueGrid');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+          
+          this.gridComplete();
+          $('#asynch_event_queue_gridBlocks_Panel').toggle();
+          refreshTheGridByToggle('#asynch_event_queue_gridBlocks_Panel');
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+
+          var memberRegionsList = $('#gview_idAsynchEventQueueGrid');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_idAsynchEventQueueGrid');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+        }
+      }
+  );
+}
+
+// Tool tip for Asynch Event Queue in grid
+function formAsynchEventQueueGridToolTip(rawObject) {
+  return 'title="Queue ' + rawObject.id + ' , Primary ' + rawObject.primary
+      + ' , Parallel ' + rawObject.senderType + ' , Batch size '
+      + rawObject.batchSize + ' , Batch Time Interval '
+      + rawObject.batchTimeInterval + ' , Batch Conflation Enabled '
+      + rawObject.batchConflationEnabled + ' , Async Event Listener '
+      + rawObject.asyncEventListener + ' , Queue size ' + rawObject.queueSize
+      + '"';
+}
+
+function createGatewaySenderGrid() {
+  jQuery("#idGatewaySenderGrid").jqGrid(
+      {
+        datatype : "local",
+        height : 150,
+        width : 500,
+        shrinkToFit : false,
+        rowNum : 20,
+        colNames : [ 'Sender Id', 'Primary', 'Parallel', 'Remote DS Id', 'Connected Status', 'Batch Size', 'Event Queue Size',
+            'Threshold Alert Count' ],
+        colModel : [
+            {
+              name : 'id',
+              index : 'id',
+              width : 80,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formGatewaySendersGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'primary',
+              index : 'primary',
+              width : 60,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formGatewaySendersGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'senderType',
+              index : 'senderType',
+              width : 60,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formGatewaySendersGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'remoteDSId',
+              index : 'remoteDSId',
+              width : 95,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formGatewaySendersGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'status',
+              index : 'status',
+              width : 125,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formGatewaySendersGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'batchSize',
+              index : 'batchSize',
+              width : 80,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formGatewaySendersGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "long"
+            },
+            {
+              name : 'queueSize',
+              index : 'queueSize',
+              width : 125,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formGatewaySendersGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            },
+            {
+              name : 'eventsExceedingAlertThreshold',
+              index : 'eventsExceedingAlertThreshold',
+              align : 'right',
+              width : 145,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formGatewaySendersGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "long"
+            } ],
+        userData : {
+          "sortOrder" : "asc",
+          "sortColName" : "id"
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#idGatewaySenderGrid").getGridParam(
+              'userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+        },
+        resizeStop : function(width, index) {
+          
+          var memberRegionsList = $('#gview_idGatewaySenderGrid');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+          var api = memberRegionsListChild.data('jsp');
+          api.reinitialise();
+          
+          memberRegionsList = $('#gview_idGatewaySenderGrid');
+          memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_idGatewaySenderGrid');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+          
+          this.gridComplete();
+          $('#gateway_gridBlocks_Panel').toggle();
+          refreshTheGridByToggle('#gateway_gridBlocks_Panel');
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+
+          var memberRegionsList = $('#gview_idGatewaySenderGrid');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_idGatewaySenderGrid');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+        }
+      }
+  );
+}
+
+// Tool tip for Gateway Senders in grid
+function formGatewaySendersGridToolTip(rawObject) {
+  return 'title="Sender ' + rawObject.id + ' , Primary ' + rawObject.primary
+      + ' , Parallel ' + rawObject.senderType + '"';
+}
+
+function createMemberClientsGrid() {
+  jQuery("#memberClientsList").jqGrid(
+      {
+        datatype : "local",
+        height : 190,
+        width : 745,
+        rowNum : 100,
+        shrinkToFit : false,
+        colNames : [ 'Id', 'Name', 'Host', 'Connected','Subscription Enabled', 'Queue Size','Client CQ Count', 'CPU Usage', 'Uptime',
+            'Threads', 'Gets', 'Puts' ],
+        colModel : [
+            {
+              name : 'clientId',
+              index : 'clientId',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'name',
+              index : 'name',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'host',
+              index : 'host',
+              width : 100,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'isConnected',
+              index : 'isConnected',
+              width : 75,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'isSubscriptionEnabled',
+              index : 'isSubscriptionEnabled',
+              width : 140,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                  return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'queueSize',
+              index : 'queueSize',
+              width : 80,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            },
+            {
+              name : 'clientCQCount',
+              index : 'clientCQCount',
+              width : 110,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                  return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            },
+            {
+              name : 'cpuUsage',
+              index : 'cpuUsage',
+              width : 80,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'uptime',
+              index : 'uptime',
+              width : 75,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'threads',
+              index : 'threads',
+              align : 'right',
+              width : 70,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'gets',
+              index : 'gets',
+              width : 50,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'puts',
+              index : 'puts',
+              width : 50,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formClientsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            } ],
+        userData : {
+          "sortOrder" : "asc",
+          "sortColName" : "name"
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#memberClientsList").getGridParam(
+              'userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+        },
+        resizeStop : function(width, index) {
+          $('#LargeBlock_2').hide();
+          destroyScrollPane('gview_memberClientsList');
+          $('#LargeBlock_2').show();
+          $('.ui-jqgrid-bdiv').each(function(index) {
+            var tempName = $(this).parent().attr('id');
+            if (tempName == 'gview_memberClientsList') {
+              $(this).jScrollPane({
+                maintainPosition : true,
+                stickToRight : true
+              });
+            }
+          });
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+
+          var memberRegionsList = $('#gview_memberClientsList');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_memberClientsList');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+        }
+      });
+}
+
+// Tool tip for clients in grid
+function formClientsGridToolTip(rawObject) {
+  return 'title="Name ' + rawObject.name + ' , Host ' + rawObject.host
+      + ' , Queue Size ' + rawObject.queueSize + ' , CPU Usage '
+      + rawObject.cpuUsage + ' , Threads ' + rawObject.threads + '"';
+}
+
+// function used for creating empty member region tree map
+function createMemberRegionsTreeMap() {
+
+  var dataVal = {
+    "$area" : 1
+  };
+  var json = {
+    "children" : {},
+    "data" : dataVal,
+    "id" : "root",
+    "name" : "Regions"
+  };
+
+  memberRegionsTreeMap = new $jit.TM.Squarified(
+      {
+
+        injectInto : 'memberRegionSummary',
+        levelsToShow : 1,
+        titleHeight : 0,
+        background : '#8c9aab',
+        offset : 2,
+        Label : {
+          type : 'HTML',
+          size : 1
+        },
+        Node : {
+          CanvasStyles : {
+            shadowBlur : 0
+          }
+        },
+        Events : {
+          enable : true,
+          onMouseEnter : function(node, eventInfo) {
+            if (node) {
+              node.setCanvasStyle('shadowBlur', 7);
+              node.setData('border', '#ffffff');
+              selecetdClusterTMNodeId = "";
+              memberRegionsTreeMap.fx.plotNode(node,
+                  memberRegionsTreeMap.canvas);
+              memberRegionsTreeMap.labels.plotLabel(
+                  memberRegionsTreeMap.canvas, node);
+            }
+          },
+          onMouseLeave : function(node) {
+            if (node) {
+              node.removeData('border', '#ffffff');
+              node.removeCanvasStyle('shadowBlur');
+              memberRegionsTreeMap.plot();
+            }
+          }
+        },
+
+        Tips : {
+          enable : true,
+          offsetX : 20,
+          offsetY : 20,
+          onShow : function(tip, node, isLeaf, domElement) {
+
+            var data = node.data;
+            var html = "";
+            if (data.regionType) {
+              html = "<div class=\"tip-title\"><div><div class='popupHeading'>"
+                  + node.id
+                  + "</div>"
+                  + "<div class='popupFirstRow'><div class='popupRowBorder borderBottomZero'>"
+                  + "<div class='labeltext left display-block width-45'><span class='left'>"
+                  + "Type</span></div><div class='right width-55'>"
+                  + "<div class='color-d2d5d7 font-size14 popInnerBlockEllipsis'>"
+                  + data.regionType
+                  + "</div>"
+                  + "</div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-45'>"
+                  + "<span class='left'>"
+                  + jQuery.i18n.prop('pulse-entrycount-custom')
+                  + "</span></div><div class='right width-55'>"
+                  + "<div class='color-d2d5d7 font-size14'>"
+                  + data.entryCount
+                  + "</div>"
+                  + "</div></div><div class='popupRowBorder borderBottomZero'><div class='labeltext left display-block width-45'>"
+                  + "<span class='left'>"
+                  + jQuery.i18n.prop('pulse-entrysize-custom')
+                  + "</span></div><div class='right width-55'>"
+                  + "<div class='color-d2d5d7 font-size14'>" + data.entrySize
+                  + "</div></div></div></div></div>" + "</div>";
+            } else {
+              html = "<div class=\"tip-title\"><div><div class='popupHeading'>No "
+                  + jQuery.i18n.prop('pulse-regiontabletooltip-custom')
+                  + " Found</div>";
+            }
+            tip.innerHTML = html;
+          }
+        },
+        onCreateLabel : function(domElement, node) {
+          domElement.style.opacity = 0.01;
+        }
+      });
+  memberRegionsTreeMap.loadJSON(json);
+  memberRegionsTreeMap.refresh();
+}
+
+// function used for creating blank grids for member's region list
+// for member details screen
+function createMemberRegionsGrid() {
+  jQuery("#memberRegionsList").jqGrid(
+      {
+        datatype : "local",
+        height : 250,
+        width : 745,
+        rowNum : 1000,
+        shrinkToFit : false,
+        colNames : [ 'Name', 'Type', 'Entry Count', 'Entry Size', 'Scope',
+            'Disk Store Name', 'Disk Synchronous', 'Gateway Enabled' ],
+        colModel : [
+            {
+              name : 'name',
+              index : 'name',
+              width : 150,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formRegionsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'type',
+              index : 'type',
+              width : 150,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formRegionsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'entryCount',
+              index : 'entryCount',
+              width : 100,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formRegionsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            },
+            {
+              name : 'entrySize',
+              index : 'entrySize',
+              width : 100,
+              align : 'right',
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formRegionsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "int"
+            },
+            {
+              name : 'scope',
+              index : 'scope',
+              width : 150,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formRegionsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'diskStoreName',
+              index : 'diskStoreName',
+              width : 120,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formRegionsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'diskSynchronous',
+              index : 'diskSynchronous',
+              width : 120,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formRegionsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            },
+            {
+              name : 'gatewayEnabled',
+              index : 'gatewayEnabled',
+              width : 120,
+              cellattr : function(rowId, val, rawObject, cm, rdata) {
+                return formRegionsGridToolTip(rawObject);
+              },
+              sortable : true,
+              sorttype : "string"
+            } ],
+        userData : {
+          "sortOrder" : "asc",
+          "sortColName" : "name"
+        },
+        onSortCol : function(columnName, columnIndex, sortorder) {
+          // Set sort order and sort column in user variables so that
+          // periodical updates can maintain the same
+          var gridUserData = jQuery("#memberRegionsList").getGridParam(
+              'userData');
+          gridUserData.sortColName = columnName;
+          gridUserData.sortOrder = sortorder;
+        },
+        resizeStop : function(width, index) {
+          $('#btngridIcon').click();
+          refreshTheGrid($('#btngridIcon'));
+        },
+        gridComplete : function() {
+          $(".jqgrow").css({
+            cursor : 'default'
+          });
+
+          var memberRegionsList = $('#gview_memberRegionsList');
+          var memberRegionsListChild = memberRegionsList
+              .children('.ui-jqgrid-bdiv');
+
+          memberRegionsListChild.unbind('jsp-scroll-x');
+          memberRegionsListChild.bind('jsp-scroll-x', function(event,
+              scrollPositionX, isAtLeft, isAtRight) {
+            var mRList = $('#gview_memberRegionsList');
+            var mRLC = mRList.children('.ui-jqgrid-hdiv').children(
+                '.ui-jqgrid-hbox');
+            mRLC.css("position", "relative");
+            mRLC.css('right', scrollPositionX);
+          });
+
+          // change col names depend on product
+          if (CONST_BACKEND_PRODUCT_SQLFIRE == productname.toLowerCase()) {
+            jQuery("#memberRegionsList").jqGrid('setLabel', 'entryCount',
+                jQuery.i18n.prop('pulse-entrycount-custom'));
+            jQuery("#memberRegionsList").jqGrid('setLabel', 'entrySize',
+                jQuery.i18n.prop('pulse-entrysize-custom'));
+          }
+        }
+      });
+}
+
+// Tool tip for regions in grid
+function formRegionsGridToolTip(rawObject) {
+  return 'title="Name ' + rawObject.name + ' , Type ' + rawObject.type + ' , '
+      + jQuery.i18n.prop('pulse-entrycount-custom') + ' '
+      + rawObject.entryCount + ' , Scope ' + rawObject.scope
+      + ' , Disk Store Name ' + rawObject.diskStoreName
+      + ' , Disk Synchronous ' + rawObject.diskSynchronous + ' , '
+      + jQuery.i18n.prop('pulse-entrysize-custom') + ' ' + rawObject.entrySize
+      + '"';
+}
+
+function refreshTheGrid(gridDiv) {
+  setTimeout(function() {
+    gridDiv.click();
+  }, 300);
+}
+
+function refreshTheGridByToggle(gridDiv) {
+  setTimeout(function() {
+    gridDiv.toggle();
+  }, 300);
+}



[29/79] [partial] incubator-geode git commit: GEODE-12: Imported pulse from geode-1.0.0-SNAPSHOT-2.src.tar

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/testQueryResultWithStructSmall.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/testQueryResultWithStructSmall.txt b/pulse/src/main/resources/testQueryResultWithStructSmall.txt
new file mode 100644
index 0000000..c3dc38e
--- /dev/null
+++ b/pulse/src/main/resources/testQueryResultWithStructSmall.txt
@@ -0,0 +1,15 @@
+{
+  "result":[
+    {
+        "member":[["java.lang.String","pc68(19971)<v1>:19276"]],
+        "result":[
+                ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",24],"active":["boolean",true],"pk":["java.lang.String","24"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id
 ":["int",85],"secId":["java.lang.String","ORCL"],"mktValue":["double",86],"sharesOutstanding":["double",85000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",86],"secId":["java.lang.String","SAP"],"mktValue":["double",87],"sharesOutstanding":["double",86000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",84],"secId":["java.lang.String","APPL"],"mktValue":["double",85],"sharesOutstanding":["double",84000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",24],"active":["boolean",true],"pk":["java.lang.String","24"],"collectionHolderMap"
 :["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"ORCL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",85],"secId":["java.lang.String","ORCL"],"mktValue":["double",86],"sharesOutstanding":["double",85000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SAP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["
 int",86],"secId":["java.lang.String","SAP"],"mktValue":["double",87],"sharesOutstanding":["double",86000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",84],"secId":["java.lang.String","APPL"],"mktValue":["double",85],"sharesOutstanding":["double",84000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]}],
+                ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",15],"active":["boolean",false],"pk":["java.lang.String","15"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"i
 d":["int",54],"secId":["java.lang.String","YHOO"],"mktValue":["double",55],"sharesOutstanding":["double",54000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",55],"secId":["java.lang.String","GOOG"],"mktValue":["double",56],"sharesOutstanding":["double",55000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",52],"secId":["java.lang.String","SUN"],"mktValue":["double",53],"sharesOutstanding":["double",52000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",53],"secId":["java.lang.String","IBM"],"mktValue":["double",54],"sharesOutstanding":["double",53000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinVal
 ue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",15],"active":["boolean",false],"pk":["java.lang.String","15"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"YHOO":["com.gemstone.gemfire.cache.query.data.Position",{"id":[
 "int",54],"secId":["java.lang.String","YHOO"],"mktValue":["double",55],"sharesOutstanding":["double",54000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"GOOG":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",55],"secId":["java.lang.String","GOOG"],"mktValue":["double",56],"sharesOutstanding":["double",55000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",52],"secId":["java.lang.String","SUN"],"mktValue":["double",53],"sharesOutstanding":["double",52000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",53],"secId":["java.lang.String","IBM"],"mktValue":["double",54],"sharesOutstanding":["double",53000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":
 ["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]}],
+                ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",7],"active":["boolean",false],"pk":["java.lang.String","7"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":
 ["int",27],"secId":["java.lang.String","IBM"],"mktValue":["double",28],"sharesOutstanding":["double",27000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",26],"secId":["java.lang.String","SUN"],"mktValue":["double",27],"sharesOutstanding":["double",26000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",24],"secId":["java.lang.String","NOVL"],"mktValue":["double",25],"sharesOutstanding":["double",24000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",25],"secId":["java.lang.String","HP"],"mktValue":["double",26],"sharesOutstanding":["double",25000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["
 float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",7],"active":["boolean",false],"pk":["java.lang.String","7"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"IBM":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",27]
 ,"secId":["java.lang.String","IBM"],"mktValue":["double",28],"sharesOutstanding":["double",27000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"SUN":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",26],"secId":["java.lang.String","SUN"],"mktValue":["double",27],"sharesOutstanding":["double",26000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",24],"secId":["java.lang.String","NOVL"],"mktValue":["double",25],"sharesOutstanding":["double",24000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",25],"secId":["java.lang.String","HP"],"mktValue":["double",26],"sharesOutstanding":["double",25000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.
 223372E18],"doubleMinValue":["double",4.9E-324]}]}],
+                ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",14],"active":["boolean",true],"pk":["java.lang.String","14"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id
 ":["int",50],"secId":["java.lang.String","NOVL"],"mktValue":["double",51],"sharesOutstanding":["double",50000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",51],"secId":["java.lang.String","HP"],"mktValue":["double",52],"sharesOutstanding":["double",51000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",49],"secId":["java.lang.String","RHAT"],"mktValue":["double",50],"sharesOutstanding":["double",49000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type2"],"ID":["int",14],"active":["boolean",true],"pk":["java.lang.String","14"],"collectionHolderMap":[
 "java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",50],"secId":["java.lang.String","NOVL"],"mktValue":["double",51],"sharesOutstanding":["double",50000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"HP":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int
 ",51],"secId":["java.lang.String","HP"],"mktValue":["double",52],"sharesOutstanding":["double",51000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",49],"secId":["java.lang.String","RHAT"],"mktValue":["double",50],"sharesOutstanding":["double",49000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]}],
+                ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id"
 :["int",6],"secId":["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-
 9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type1"],"ID":["int",1],"active":["boolean",false],"pk":["java.lang.String","1"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"APPL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",6],"secId"
 :["java.lang.String","APPL"],"mktValue":["double",7],"sharesOutstanding":["double",6000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"AOL":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",5],"secId":["java.lang.String","AOL"],"mktValue":["double",6],"sharesOutstanding":["double",5000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",3],"secId":["java.lang.String","GOOG"],"mktValue":["double",4],"sharesOutstanding":["double",3000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",4],"secId":["java.lang.String","MSFT"],"mktValue":["double",5],"sharesOutstanding":["double",4000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue":["float",-9.223372E18],"doub
 leMinValue":["double",4.9E-324]}]}],
+                ["com.gemstone.gemfire.cache.query.types.StructType",{"r1":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",21],"active":["boolean",false],"pk":["java.lang.String","21"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"i
 d":["int",76],"secId":["java.lang.String","NOVL"],"mktValue":["double",77],"sharesOutstanding":["double",76000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",75],"secId":["java.lang.String","RHAT"],"mktValue":["double",76],"sharesOutstanding":["double",75000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",73],"secId":["java.lang.String","SAP"],"mktValue":["double",74],"sharesOutstanding":["double",73000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",74],"secId":["java.lang.String","DELL"],"mktValue":["double",75],"sharesOutstanding":["double",74000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinVa
 lue":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}],"r2":["com.gemstone.gemfire.cache.query.data.Portfolio",{"type":["java.lang.String","type0"],"ID":["int",21],"active":["boolean",false],"pk":["java.lang.String","21"],"collectionHolderMap":["java.util.HashMap",{"3":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"2":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"1":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}],"0":["com.gemstone.gemfire.cache.query.data.CollectionHolder",{"arr":["java.lang.String[]",["0","1","2","3","4","SUN","IBM","YHOO","GOOG","MSFT"]]}]}],"createTime":["long",0],"positions":["java.util.HashMap",{"NOVL":["com.gemstone.gemfire.cache.query.data.Position",{"id":
 ["int",76],"secId":["java.lang.String","NOVL"],"mktValue":["double",77],"sharesOutstanding":["double",76000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"RHAT":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",75],"secId":["java.lang.String","RHAT"],"mktValue":["double",76],"sharesOutstanding":["double",75000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}]}],"p1":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",73],"secId":["java.lang.String","SAP"],"mktValue":["double",74],"sharesOutstanding":["double",73000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"p2":["com.gemstone.gemfire.cache.query.data.Position",{"id":["int",74],"secId":["java.lang.String","DELL"],"mktValue":["double",75],"sharesOutstanding":["double",74000],"col":["java.util.HashSet",[["java.lang.String","1"],["java.lang.String","0"]]]}],"floatMinValue":["float",1.4E-45],"longMinValue
 ":["float",-9.223372E18],"doubleMinValue":["double",4.9E-324]}]}]
+              ]
+    }
+  ]
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/resources/test_pp.txt
----------------------------------------------------------------------
diff --git a/pulse/src/main/resources/test_pp.txt b/pulse/src/main/resources/test_pp.txt
new file mode 100644
index 0000000..1325484
--- /dev/null
+++ b/pulse/src/main/resources/test_pp.txt
@@ -0,0 +1,7 @@
+{"result":[
+  ["boolean[]",[true,true,true]],
+  ["boolean[]",[false,false,false]],
+  ["boolean[]",[false,false,false]],
+  ["boolean[]",[true,true,true]],
+  ["boolean[]",[false,false,false]]
+]}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/DataBrowser.html
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/DataBrowser.html b/pulse/src/main/webapp/DataBrowser.html
new file mode 100644
index 0000000..6a68077
--- /dev/null
+++ b/pulse/src/main/webapp/DataBrowser.html
@@ -0,0 +1,350 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta http-equiv="CACHE-CONTROL" content="NO-CACHE,NO-STORE" />
+<meta http-equiv="PRAGMA" content="NO-CACHE" />
+<meta http-equiv="EXPIRES" content="-1">
+<title>Pulse</title>
+<link href="css/common.css" rel="stylesheet" type="text/css" />
+<link href="css/style.css" rel="stylesheet" type="text/css" />
+
+<!-- fix IE Ui issues-->
+<!--[if IE 7]>
+                <link href="css/ie/ie7.css" type="text/css" rel="stylesheet"/>
+         <![endif]-->
+<!--[if IE 8]>
+                <link href="css/ie/ie8.css" type="text/css" rel="stylesheet"/>
+         <![endif]-->
+<!--[if IE 9]>
+                <link href="css/ie/ie9.css" type="text/css" rel="stylesheet"/>
+         <![endif]-->
+<!-- IE Fix for HTML5 Tags -->
+<!--[if lt IE 9]>
+        <script src='scripts/lib/html5.js'></script>
+        <script type="text/javascript" src="scripts/lib/excanvas.js"></script>
+        <script type="text/javascript"> if (!window.console) console = {log: function() {}}; </script>
+                <![endif]-->
+
+<script type="text/javascript" src='scripts/lib/jquery-1.7.2.js'></script>
+<script type="text/javascript" src='scripts/lib/common.js'></script>
+
+<!--Splitter-->
+<script src="scripts/lib/jquery.splitter-0.5.js"></script>
+<link href="css/jquery.splitter.css" rel="stylesheet" />
+
+<!--Custom Scroll Bar-->
+<!-- styles needed by jScrollPane - include in your own sites -->
+<link type="text/css" href="css/jquery.jscrollpane.css" rel="stylesheet"
+	media="all" />
+<!-- the mousewheel plugin -->
+<script type="text/javascript" src="scripts/lib/jquery.mousewheel.js"></script>
+<!-- the jScrollPane script -->
+<script type="text/javascript" src="scripts/lib/jquery.jscrollpane.js"></script>
+<!--Place Holder tag-->
+<script type="text/javascript" src="scripts/lib/jquery.placeholder.js"></script>
+
+<!-- Grid view CSS and js-->
+<link rel="stylesheet" type="text/css" media="screen" href="css/grid/ui.jqgrid.css" />
+<script src="scripts/lib/grid.locale-en.js" type="text/javascript"></script>
+<script src="scripts/lib/jquery.jqGrid.src.js" type="text/javascript"></script>
+<script src="scripts/lib/jquery.tablednd.js" type="text/javascript"></script>
+<!-- -->
+<!--Tree View-->
+<link type="text/css" href="css/treeView/Treemap.css" rel="stylesheet" />
+<script type="text/javascript" src="scripts/lib/jit.js"></script>
+
+<!-- popups-->
+<link href="css/popup.css" rel="stylesheet" type="text/css" />
+<!-- Customize checkbox & radiobutton -->
+<script type="text/javascript" src="scripts/lib/checkBox-RadioButton.js"></script>
+<!-- Treeview JSON -->
+<script type="text/javascript" src="scripts/lib/jquery.ztree.core-3.5.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.ztree.excheck-3.5.js"></script>
+<link rel="stylesheet" href="css/jquery.ztreestyle.css" type="text/css">
+
+<!-- jQuery plugin to support automatically updating fuzzy timestamps 
+(e.g. "4 minutes ago" or "about 1 day ago") -->
+<script type="text/javascript" src="scripts/lib/jquery.timeago.js"></script>
+
+<!-- start:Data Browser widget based js files -->
+<script type="text/javascript" src="scripts/pulsescript/PulseCallbacks.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/PulseFunctions.js"></script>
+<script type="text/javascript" src='scripts/pulsescript/common.js'></script>
+<!-- end:Data Browser widget based js files -->
+
+<!-- end:Data Browser Page JS files -->
+
+<script type="text/javascript" src="scripts/pulsescript/pages/DataBrowser.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/pages/DataBrowserQuery.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/pages/DataBrowserQueryHistory.js"></script>
+
+<!-- Jquery based plugin for exporting data to a file -->
+<script type="text/javascript" src="scripts/lib/jquery.generateFile.js"></script>
+
+</head>
+
+<body>
+	<!-- Connection lost-->
+	<div class="connectionLostMasterBlock hide" id="connectionStatusDiv">
+		<div class="connectionLostInnerBlock">
+			<label class="left">Connecting ...</label>
+			<div class="clear"></div>
+			<div id="connectionErrorMsgDiv" class="right"></div>
+		</div>
+	</div>
+
+	<div id="canvasWidth">
+		<!--Top Links-->
+		<div class="headerTopLinksMaster">
+			<div class="right">
+				<div class="left position-relative"><a href="#." class="left headerTopLinks aboutClicked-Off">About</a>
+					<!-- About Dropdown-->
+	        <div id="detailsAbout" class="aboutBlock display-none">
+	          <div class="aboutDetailsBlock">
+	            <div class="left widthfull-100per marginBottom30">
+	              <div class="left"><img src="images/about.png">
+	                <div>
+	                 <div class="aboutVersionBlock left" id="pulseVersion"></div>
+	                 <div class="left termsBlock">&nbsp;<a id="pulseVersionDetailsLink" href="#dialog1" class="display-none" >Version Details</a></div>
+	                </div>
+	              </div>
+	              <div class="right aboutText">The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
+	            </div>
+	            <div class="left widthfull-100per">
+	                <div class="left copyright">
+	                  Copyright &#0169; 2012-2014 Pivotal Software, Inc. All Rights Reserved. 
+                  This product is protected by U.S. and international copyright 
+                  and intellectual property laws. Pivotal products are covered by 
+                  one or more patents listed at <a href="http://www.pivotal.io/patents"
+                  target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
+	                </div>
+	               
+	                <div class="left copyright">Pivotal is a registered
+	                  trademark or trademark of Pivotal Software, Inc. in the United States and
+	                  other jurisdictions. All other marks and names mentioned herein
+	                  may be trademarks of their respective companies.</div>
+	               
+	                <div class="left termsBlock">
+	                  <a href="oslicenses.txt" target="_blank">Open Source
+	                    Licenses</a>
+	                </div>
+	               <!--  <div class="right termsBlock">
+	                  Pulse <a href="#.">Terms of Service</a>
+	                </div>-->
+	              </div>
+	            </div>
+	        </div>
+				</div>
+				<div class="left headerTopSeperator"></div>
+	      <div class="left"><a target="_blank" href="http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html" class="left headerTopLinks">Help</a></div>
+	      <div class="left headerTopSeperator"></div>
+	      <div class="left headerTopLinks welcomeLabelPRZero">Welcome</div>
+	      <div class="left headerTopLinks textbold font-size12" id="userName"></div>
+	      <div class="left headerTopSeperator"></div>
+	      <div class="left"><a href="pulse/clusterLogout" class="left headerTopLinks">Sign Out</a></div>
+			</div>
+		</div>
+		<!-- Header block-->
+		<header>
+      <div class="left">
+        <a id="clusterNameLink" href="#." class="left textbold HeaderLink HeaderLinkActive" onclick="openClusterDetail();">Cluster View</a>
+      </div>
+			<div class="textbold right logoBlock">
+				<a href="#.">[LOGO]</a>
+			</div>
+		</header>
+		<div class="clear"></div>
+		<div class="subHeader">
+		<ul>
+			<li><a href="#." onclick="openClusterDetail();">Cluster View</a></li>
+			<li><a href="#." class="active" onclick="openDataBrowser();">Data Browser</a></li>
+			<!-- Hide Query Statistics tab for gemfire -->
+			<li id="subTabQueryStatistics"><a href="#." onclick="openQueryStatistics();">Query Statistics</a></li>
+		</ul>
+		<div class="clear"></div>
+		</div>
+		<!-- Middle block-->
+		<div class="left widthfull-100per">
+			<!--Top Right Block 1-->
+			<div class="right widthfull-100per marginTB10">
+                            
+				<!-- Tab-->
+				<div id="notificationsPanel" class="right marginL10 TabTopPanel position-relative" 
+				data-role="widget" data-widgetid="CluserAlertNotification" data-active ="yes" data-timeline="5000">
+				</div>
+				<!--   <div class="right marginL10"><a href="dataView.html" class="left linkButton">Cluster View</a></div>-->
+				<div class="left position-relative breadCrumbs">
+					<label class="font-size20">Data Browser</label>
+				</div>
+			</div>
+			<!--Middle Block 1-->
+			<div class="left leftBlockCanvas">
+				<!-- Splitter Master-->
+				<div class="splitterMaster">
+					<div class="splitterInnerBlock">
+						<div id="widget">
+							<!-- Left splitter-->
+							<div id="leftBlock">
+								<div class="leftTopSplitterSpacing">
+								  <div class="rightInnerBlocks">
+								    <a class="active" href="#.">Data Regions</a>
+								  </div>
+									<!-- Search Block 1-->
+									<div class="left widthfull-100per canvasBlockInnerBlock">
+										<!-- Search-->
+										<div class="regionNameSearch position-relative">
+											<div class="searchBlockRegion">
+												<input type="button" class="searchButtonRegion"> <input
+													type="text" id="filterTextRegion" placeholder="Type a Name"
+													class="searchBoxRegion" onKeyUp="applyFilterOnRegions();">
+											</div>
+										</div>
+									</div>
+									<!-- Block 2-->
+									<div class="pointGridHeading">
+										<a id="linkColocatedRegions" href="#." 
+										  class="colocatedRegionsLink disabledLink" 
+										  onclick="showColocatedRegions();">Colocated Regions</a>
+										<a id="linkAllRegions" href="#." 
+										  class="colocatedRegionsLink disabledLink"
+										  onclick="showAllRegions();">All Regions</a>
+										<input type="hidden" id="selectedRegion" value=""/>
+									</div>
+									<!-- Block 3 with scroll-->
+									<div class="ScrollPaneBlock leftSliderScrollRegion">
+										<div class="splitterScrollRegionInnerBlock">
+											<!-- Tree View-->
+											<ul id="treeDemo" class="ztree">
+											</ul>
+										</div>
+										<div style="clear: both"></div>
+									</div>
+								</div>
+								<!-- Members List Block-->
+								<div class="">
+								  <div class="rightInnerBlocks btm_pnl">
+								    <a href="#." class="active">Region Members</a>
+								  </div>
+								  <div class="ScrollPaneBlock leftSliderScrollMembers" style="background:#132634;">
+								    <div class="splitterScrollMembersInnerBlock">
+								      <ul id="membersList">
+								      </ul>
+								    </div>
+								    <div style="clear:both"></div>
+								  </div>
+								</div>
+							</div>
+							<!--Right splitter -->
+							<div id="rightBlock">
+								<!-- Tab links-->
+								<div class="rightInnerBlocks ">
+								  <a href="#." class="active">Queries</a>
+								</div>
+								<!-- Query Block-->
+								<div class="queryMasterBlock">
+								  <a href="#." class="historyClicked-Off" id="historyIcon">History</a>
+                                  <!-- Query Block-->
+                                  <div class="queryHistoryScroll-pane" id="detailsHistory">
+                                  <div id="detailsHistoryList"></div>
+                                  </div>
+									<div class="queryInnerBlock queriesblock marginTB15-10">
+										<div class="queryHistoryBlock">
+											<label class="queryBlocklabel">Query Editor</label> 
+										</div>
+										<div class="quertTextaremargin textareadiv">
+											<!-- Textarea-->
+											<textarea class="queryTextarea" id="dataBrowserQueryText" onkeyup="onQueryTextChange();"
+												placeholder="Write query here"></textarea>
+											<!-- Buttons-->
+											
+										</div>
+										<input type="reset" value="Clear" class="right buttonCss blue" onclick="clearDBQuery()">
+                                        <input type="button" id="btnExecuteQuery" disabled="disabled" value="Execute" class="right buttonCss grey" onclick="executeDBQuery()">
+									</div>
+								</div>
+								<div class="queryInnerBlock marginBottomResult">
+									<label class="queryBlocklabel marginResult left">Result</label>
+									<div id="loaderSymbolWrapper" class="loaderParent">
+									  <div id="loadingSymbol" class="loader"></div>
+									</div>
+								</div>
+								<div class="ScrollPaneBlock" style="height: 460px;">
+									<div class="expCollMaster">
+										<!-- Accordion-->
+										<div class="accordion" id="memberAccordion">
+										</div>
+										<div style="clear: both"></div>
+									</div>
+								</div>
+								<div class="quertTextaremargin">
+									<!-- Buttons-->
+									<input type="button" value="Export Result"
+										class="right buttonCss blue" onclick="exportResult();">
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<!--Popups Block-->
+	<div id="boxes">
+		<!-- Version Details popup-->
+		<div id="dialog1" class="window width345">
+			<div class="popup_heading">
+				<span>Version Details</span><a href="#" class="closePopup">&nbsp;</a>
+			</div>
+			<div class="popup_contentBlock">
+				<div class="popup-innerblock">
+					<ul class="widthfull-100per left">
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Pulse Version:</label> <label
+							class="width-58 display-inline-block" id="pulseVer"></label></li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Build Id:</label> <label
+							class="width-58 display-inline-block" id="buildId"></label></li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Build Date:</label> <label
+							class="width-58 display-inline-block" id="buildDate"></label></li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Source Date:</label> <label
+							class="width-58 display-inline-block" id="sourceDate"></label></li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Source Revision:</label> <label
+							class="width-58 display-inline-block" id="sourceRevision"></label>
+						</li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Source Repository:</label>
+							<label class="width-58 display-inline-block"
+							id="sourceRepository"></label></li>
+					</ul>
+					<div class="clear"></div>
+				</div>
+			</div>
+		</div>
+  <!-- Grid Details popup-->
+  <div id="gridPopup" class="window width700" >
+    <div class="popup_heading"><span>Object Explorer</span><a href="#" class="closePopup">&nbsp;</a></div>
+    <div class="popup_contentBlock">
+      <div class="popup-innerblock">
+        <table id="treegrid"><tr><td/></tr></table>
+      </div>
+      <div class="popup-innerblock">
+        <table id="popUpExplorer"><tr><td/></tr></table>
+      </div>
+    </div>
+  </div>
+		<!-- Mask to cover the whole screen -->
+		<div id="mask"></div>
+	</div>
+	<div id="tooltip" class="tooltip"></div>
+	<!-- Placeholder-->
+	<script>
+$('input[placeholder], textarea[placeholder]').placeholder();
+</script>
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/Login.html
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/Login.html b/pulse/src/main/webapp/Login.html
new file mode 100644
index 0000000..da68a87
--- /dev/null
+++ b/pulse/src/main/webapp/Login.html
@@ -0,0 +1,125 @@
+<!doctype html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta http-equiv="CACHE-CONTROL" content="NO-CACHE,NO-STORE" />
+<meta http-equiv="PRAGMA" content="NO-CACHE" />
+<meta http-equiv="EXPIRES" content="-1">
+<title>Pulse</title>
+
+<!--  CSS Files -->
+<link href="css/common.css" rel="stylesheet" type="text/css" />
+<link href="css/style.css" rel="stylesheet" type="text/css" />
+<!-- fix IE Ui issues-->
+<!--[if IE]>
+    <link href="css/ie/ie.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 7]>
+  <link href="css/ie/ie7.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 8]>
+  <link href="css/ie/ie8.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 9]>
+  <link href="css/ie/ie9.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--  END CSS FILES -->
+
+<!-- JS FILES -->
+<!-- IE Fix for HTML5 Tags -->
+<!--[if lt IE 9]>
+<script src='js/html5.js'></script>
+  <![endif]-->
+<script type="text/javascript" src="scripts/lib/jquery-1.7.2.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.i18n.properties.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/PulseCallbacks.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/PulseFunctions.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/common.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/pages/Login.js"></script>
+
+<!--Place Holder tag-->
+<script type="text/javascript" src="scripts/lib/jquery.placeholder.js"></script>
+<!-- END JS FILES -->
+
+<script type="text/javascript">
+$(function(){
+  $("#loginForm").submit(function(){
+    if(!validate()) 
+      return false;
+  });
+});
+</script>
+</head>
+
+<body onload="pageOnLoad();" class="bodyLoginBg">
+<div id="loginWidth"> 
+  <!-- Header block-->
+  <header>
+    <div class="textbold right logoBlock"><a href="#.">[LOGO]</a></div>
+  </header>
+  <div class="clear"></div>
+  <!-- Middle block-->
+  <div class="loginMasterBlock">
+    <div class="pulseBottomSpace"><img data-prod-custom="pulse-monitoring-custom" src="images/pulse-monitoring.png">
+      <div class="text-center" id="pulseVersion"></div>
+    </div>
+    <!-- error Block-->
+    <div id="errorMasterBlock" class="errorMasterBlock" style="display:none;">
+      <div id="errorText" class="errorInnerIcon"> </div>
+    </div>
+    <div class="loginInnerBlock">
+    <form method="POST" action="j_spring_security_check" name="loginForm" id="loginForm" autocomplete="off">
+      <input class="inputUserName" type="text" name="j_username" id="user_name"  placeholder="Username" autofocus="autofocus" autocomplete="off">
+      <input style="display:none;" type="password" id="fool_password" autocomplete="off">
+      <input class="inputPassword" type="password" name="j_password" id="user_password" placeholder="Password" autocomplete="off">
+      <!-- Locator host and port are removed for a time -->
+      <!-- <input class="inputUserName" type="text" name="locator_host" id="locator_host" placeholder="Host">
+      <input class="inputUserName" type="text" name="locator_port" id="locator_port" placeholder="Port">-->
+      <input type="submit" value="Sign In" class="signInButton">
+    </form>
+    </div>
+    <br>
+    <div class="text-center copyright">Copyright &#0169; 2012-2014 Piovtal Software, Inc. All rights reserved.</div>
+  </div>
+</div>
+<!-- Placeholder--> 
+<script>
+$('input[placeholder], textarea[placeholder]').placeholder();
+</script>
+
+	<!-- <div style="width:100%; padding-top: 20%; padding-bottom: 20%;"> 
+    <div style="margin-left: 30%;">
+      <div style="float:left; border-right: medium solid #CCCCCC;">
+        <form method="POST" action="ClusterLogin" name="loginForm" id="loginForm">
+          <div style="width: 300px; padding-top: 10px;">
+            <span style="width:50px;">User Name:</span>
+            <input type="text" name="user_name" id="user_name" style="float: right; margin-right: 10px;" />
+          </div>
+          <div style="width: 300px; padding-top: 10px;">
+            <span style="width:50px;">Password:</span>
+            <input type="password" name="user_password" id="user_password" style="float: right; margin-right: 10px;" />
+          </div>
+          <div id="locatorHostDiv" style="width: 300px; padding-top: 10px;">
+            <span style="width:50px;">Locator Host:</span>
+            <input type="text" name="locator_host" id="locator_host" style="float: right; margin-right: 10px;" />
+          </div>
+          <div id="locatorPortDiv" style="width: 300px; padding-top: 10px;">
+            <span style="width:50px;">Locator Port:</span>
+            <input type="text" name="locator_port" id="locator_port" style="float: right; margin-right: 10px;" />
+          </div>
+	        <div style="width: 300px; padding-top: 10px;">
+            <input type="reset" value="Cancel" style="float: right; margin-right: 10px;" />
+            <input type="submit" value="Submit" style="float: right; margin-right: 10px;" />
+          </div>
+	      </form>
+	      <label id="errorText" style="color: #FF0000;"></label>
+      </div>
+      <div style="float:left; margin: 40px; ">
+        <div style="font-size: xx-large; text-align: center;"><label>Pulse</label></div>
+        <div><label>GemFire Monitoring</label></div>
+      </div>
+    </div>
+  </div> -->
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/META-INF/MANIFEST.MF
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/META-INF/MANIFEST.MF b/pulse/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5e94951
--- /dev/null
+++ b/pulse/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/MemberDetails.html
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/MemberDetails.html b/pulse/src/main/webapp/MemberDetails.html
new file mode 100644
index 0000000..e0d8cc0
--- /dev/null
+++ b/pulse/src/main/webapp/MemberDetails.html
@@ -0,0 +1,601 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta http-equiv="CACHE-CONTROL" content="NO-CACHE,NO-STORE" />
+<meta http-equiv="PRAGMA" content="NO-CACHE" />
+<meta http-equiv="EXPIRES" content="-1">
+<title>Pulse</title>
+<link href="css/common.css" rel="stylesheet" type="text/css" />
+<link href="css/style.css" rel="stylesheet" type="text/css" />
+
+<!-- fix IE Ui issues-->
+
+<!--[if IE 7]>
+  <link href="css/ie/ie7.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 8]>
+  <link href="css/ie/ie8.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!--[if IE 9]>
+  <link href="css/ie/ie9.css" type="text/css" rel="stylesheet"/>
+ <![endif]-->
+<!-- IE Fix for HTML5 Tags -->
+<!--[if lt IE 9]>
+<script src='scripts/lib/html5.js'></script>
+  <script type="text/javascript" src="scripts/lib/excanvas.js"></script>
+  <script type="text/javascript"> if (!window.console) console = {log: function() {}}; </script>
+  <![endif]-->
+  
+<!-- Rgraph and TreeMap-->
+<link type="text/css" href="css/base.css" rel="stylesheet" />
+<link type="text/css" href="css/Treemap.css" rel="stylesheet" />
+
+<!--Custom Scroll Bar-->
+<!-- styles needed by jScrollPane - include in your own sites -->
+<link type="text/css" href="css/jquery.jscrollpane.css" rel="stylesheet" media="all" />
+<!--Grid View-->
+<link rel="stylesheet" type="text/css" media="screen" href="css/grid/ui.jqgrid.css" />
+
+<!-- JavaScripts -->
+
+  <!-- Start: JQuery plugins JS -->
+  <script type="text/javascript" src='scripts/lib/jquery-1.7.2.js'></script>
+  <script type="text/javascript" src="scripts/lib/jit.js"></script>
+  <script type="text/javascript" src="scripts/lib/jquery.sparkline.js"></script>
+  <script type="text/javascript" src="scripts/lib/jquery.i18n.properties.js"></script>
+  <!-- End: JQuery plugins JS -->
+  
+  <!-- Start: Common JS -->
+  <script type="text/javascript" src='scripts/lib/common.js'></script>
+  <!-- End: Common JS -->
+
+	<!-- the mousewheel plugin -->
+	<script type="text/javascript" src="scripts/lib/jquery.mousewheel.js"></script>
+	<!-- the jScrollPane script -->
+	<script type="text/javascript" src="scripts/lib/jquery.jscrollpane.js"></script>
+	<!--Place Holder tag-->
+	<script type="text/javascript" src="scripts/lib/jquery.placeholder.js"></script>
+	<!--Grid View-->
+  <script src="scripts/lib/grid.locale-en.js" type="text/javascript"></script>
+  <script src="scripts/lib/jquery.jqGrid.src.js" type="text/javascript"></script>
+  <script src="scripts/lib/jquery.tablednd.js" type="text/javascript"></script>
+  
+  <!-- jQuery plugin to support automatically updating fuzzy timestamps 
+  (e.g. "4 minutes ago" or "about 1 day ago") -->
+  <script type="text/javascript" src="scripts/lib/jquery.timeago.js"></script>
+  
+  <!-- Start: Members Widgets JS -->
+  <script type="text/javascript" src="scripts/pulsescript/PulseCallbacks.js"></script>
+<script type="text/javascript" src="scripts/pulsescript/PulseFunctions.js"></script>
+<script type="text/javascript" src='scripts/pulsescript/common.js'></script>
+  <script type="text/javascript" src="scripts/pulsescript/MemberDetails.js"></script>
+</head>
+
+<body onload="return checkMedia();">
+<!-- Connection lost-->
+<div class="connectionLostMasterBlock hide" id="connectionStatusDiv" >
+<div class="connectionLostInnerBlock">
+    <label class="left">Connecting ...</label>
+    <div class="clear"></div>
+    <div id="connectionErrorMsgDiv"></div>
+</div>
+</div>
+	<div id="canvasWidth">
+	<!--Top Links-->
+  <div class="headerTopLinksMaster">
+    <div class="right">
+      <div class="left position-relative"><a href="#."class="left headerTopLinks aboutClicked-Off">About</a> 
+        <!-- About Dropdown-->
+        <div id="detailsAbout" class="aboutBlock display-none">
+          <div class="aboutDetailsBlock">
+            <div class="left widthfull-100per marginBottom30">
+              <div class="left"><img data-prod-custom="pulse-aboutimg-custom" src="images/about.png">
+                <div>
+                 <div class="aboutVersionBlock left" id="pulseVersion"></div>
+                 <div class="left termsBlock">&nbsp;<a id="pulseVersionDetailsLink" href="#dialog1" class="display-none" >Version Details</a></div>
+                </div>
+              </div>
+              <div data-prod-custom="pulse-about-custom" class="right aboutText">The Pulse tool monitors Pivotal&#0153; GemFire&#0169; system in real time. It provides health information, detailed operational and configuration data, system alerts, throughput performance and statistics for system members and connected clients.</div>
+            </div>
+            <div class="left widthfull-100per">
+                <div class="left copyright">
+                  Copyright &#0169; 2012-2014 Pivotal Software, Inc. All Rights Reserved. 
+                  This product is protected by U.S. and international copyright 
+                  and intellectual property laws. Pivotal products are covered by 
+                  one or more patents listed at <a href="http://www.pivotal.io/patents"
+                  target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
+                </div>
+               
+                <div class="left copyright">Pivotal is a registered
+                  trademark or trademark of Pivotal Software, Inc. in the United States and
+                  other jurisdictions. All other marks and names mentioned herein
+                  may be trademarks of their respective companies.</div>
+               
+                <div class="left termsBlock">
+                  <a href="oslicenses.txt" target="_blank">Open Source
+                    Licenses</a>
+                </div>
+               <!--  <div class="right termsBlock">
+                  Pulse <a href="#.">Terms of Service</a>
+                </div>-->
+              </div>
+            </div>
+        </div>
+      
+      </div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left"><a data-prod-custom="pulse-help-custom" target="_blank" href="http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html" class="left headerTopLinks" class="left headerTopLinks">Help</a></div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left headerTopLinks welcomeLabelPRZero">Welcome</div>
+      <div class="left headerTopLinks textbold font-size12" id="userName"></div>
+      <div class="left headerTopSeperator"></div>
+      <div class="left"><a href="pulse/clusterLogout" class="left headerTopLinks">Sign Out</a></div>
+    </div>
+  </div>
+		<!-- Header block-->
+		<header>
+			<div class="left">
+				<a id="clusterNameLink" href="#." class="left textbold HeaderLink HeaderLinkActive" onclick="openClusterDetail();"></a>
+			</div>
+			<div class="textbold right logoBlock">
+				<a href="#.">[LOGO]</a>
+			</div>
+		</header>
+		<div class="clear"></div>
+		<div class="subHeader">
+			<ul>
+				<li><a href="#." class="active" onclick="openClusterDetail();">Cluster View</a></li>
+				<!-- Hide Data Browser tab for gemfirexd (Pulse-Cheetah Release) -->
+				<li><a href="#."  onclick="openDataBrowser();">Data Browser</a></li>
+				<!-- Hide Query Statistics tab for gemfire -->
+				<li id="subTabQueryStatistics"><a href="#." onclick="openQueryStatistics();">Query Statistics</a></li>
+			</ul>
+		<div class="clear"></div>
+		</div>
+		<!-- Middle block-->
+		<div class="left widthfull-100per">
+			<!--Top Right Block 1-->
+			<div class="right widthfull-100per marginTB10">
+				<!-- Tab-->
+				  <div id="notificationsPanel" class="right marginL10 TabTopPanel position-relative" 
+				  data-role="widget" data-widgetid="CluserAlertNotification" data-active ="yes" data-timeline="5000">
+				  </div>
+				<!-- <div class="right marginL10">
+					<a href="#." class="left linkButton" onclick="openDataView();">Data View</a>
+				</div> -->
+				<div class="left position-relative membersNameTopMargin" data-role="widget" data-widgetid="MembersList" data-active ="yes" data-timeline="5000">
+					<a href="#." class="memberClicked-Off" id="userLink">
+					 <span id="memberName" class="member_txt">Member Name</span>
+				  </a>
+					<!-- Setting Dropdown-->
+					<div id="setting" class="settingBlock" style="display: none">
+						<div class="memeberNameSearch position-relative">
+							<div class="searchBlockMaster">
+								<input type="button" class="searchButton">
+								<input type="text" class="searchBox" placeholder="Search"
+								id="filterMembersBox" >
+							</div>
+						</div>
+						<div id="clusterMembersList" class="jsonSuggestScrollFilter">
+						  <div id="clusterMembersContainer"> </div>
+						</div>  
+					</div>
+				</div>
+			</div>
+			<!--Middle Block 1-->
+			<div class="left leftBlockCanvas">
+				<!-- Status Block-->
+				<div class="statusmasterBlock left" data-role="widget" data-widgetid="MemberDetails" data-active ="yes" data-timeline="5000">
+					<!--Status Block Normal-->
+					<div class="statusFirstBlock left">
+						<div class="statusMasterBlock" id="memberStatusIcon">
+							<div id="memberStatus" class="textbold"> </div>
+							<div class="labeltext">Member Status</div>
+						</div>
+					</div>
+					<!-- Deails B1-->
+					<!-- <div class="borderRightDarkBlue detailsBlock">
+						<div id="memberDiskStorageUsed" class="color-d2d5d7 font-size23"> </div>
+						<span class="labeltext">Disk Storage Used</span>
+					</div> -->
+					<!-- Deails B2-->
+					<div class=" detailsBlock">
+						<div id="memberRegionsCount" class="color-d2d5d7 font-size23"> </div>
+						<span data-prod-custom="pulse-regionstableCaps-custom" class="labeltext">Regions</span>
+					</div>
+					<!-- Deails B3-->
+					<div class=" detailsBlock">
+						<div id="threads" class="color-d2d5d7 font-size23"></div>
+						<span class="labeltext">Threads</span>
+					</div>
+					<!-- Deails B4-->
+					<div class=" detailsBlock">
+						<div id="sockets" class="color-d2d5d7 font-size23"></div>
+						<span class="labeltext">Sockets</span>
+					</div>
+					<!-- Deails B5-->
+					<div class=" detailsBlock">
+						<div id="loadAverage" class="color-d2d5d7 font-size23"></div>
+						<span class="labeltext">Load Avg.</span>
+					</div>
+					<!-- Deails B6-->
+					<div class=" detailsBlock display-none">
+					  <div id="offHeapFreeSize" class="color-d2d5d7 font-size23"></div>
+					  <span class="labeltext">Off-Heap Free Size</span>
+					</div>
+					<!-- Deails B7-->
+					<div class=" detailsBlock display-none">
+					  <div id="offHeapUsedSize" class="color-d2d5d7 font-size23"></div>
+					  <span class="labeltext">Off-Heap Used Size</span>
+					</div>
+					<!-- Deails B8-->
+					<div class=" detailsBlock">
+					  <div id="numClients" class="color-d2d5d7 font-size23"></div>
+					  <span class="labeltext">Clients</span>
+					</div>
+				</div>
+				<div class="clear"></div>
+				<div>
+					<div class="middleTopologyBlock">
+						<!-- Large Block-->
+						<div class="canvasBlockLarge marginBR10-11 left">
+							<div class="left widthfull-100per canvasBlockInnerBlock">
+								<span data-prod-custom="pulse-memberRegionsTables-custom" class="left marginL10 canvasHeading">Member Regions</span>
+								<a id="btnLargeBlock_1" class="minusIcon borderLeftToggleBlock" onClick="toggleDiv('LargeBlock_1');"></a>
+								<a id="btngridIcon" class="gridIcon " onClick="tabGridNew('gview_memberRegionsList');"></a>
+								<a id="btnchartIcon" class="chartIconActive " onClick="tabChart();"></a>
+							</div>
+							<div class="left canvasInnerBlock" id="LargeBlock_1">
+							<div class="left widthfull-100per canvasBlockInnerBlock regionHeading">
+							   <!-- Search-->
+							   <div class="left marginBottom6 marginL10 marginTop6">
+							     <div class="searchBlockMaster">
+							       <input type="button" class="searchButton">
+							       <input type="text" placeholder="Search"
+							         onkeyup="applyFilterOnMemberRegions();" class="searchBox"
+							         id="filterMemberRegionsBox">
+							     </div>
+							   </div>
+							</div>
+								<!--Grid  Block-->
+								<div class="gridBlocksPanel left display-none canvasBlockLargeGridContent"
+									id="gridBlocks_Panel">
+									<div class="left widthfull-100per">
+										<table id="memberRegionsList">
+										</table>
+									</div>
+								</div>
+								<!--chart  Block-->
+								<div class="chartBlocksPanel left canvasBlockLargeContent membersTreeViewHeight" id="chartBlocks_Panel">
+									<div class="left widthfull-100per" >
+										<div class="marginB11 left widthfull-100per" >
+											<!-- <div class="left marginL10">
+												<span class="left colorCodeBlock managerCode"></span><span
+													class="left marginL10">Managers</span>
+											</div>
+											<div class="left marginL10">
+												<span class="left colorCodeBlock colorCode-ffae00"></span><span
+													class="left marginL10">Locators</span>
+											</div> -->
+										<!-- 	<div class="searchBlockMaster">
+												<input type="button" class="searchButton"> <input
+													type="text" class="searchBox" id="searchRegionName" 
+													placeholder="Search" onKeydown="Javascript: if (event.keyCode==13) searchName();">
+											</div>-->
+										</div>
+										<div class="treeViewGraph position-relative" data-role="widget" data-widgetid="MemberRegionSummary" data-active ="yes" data-timeline="5000">
+											<!-- tree view Control-->
+											<div id="center-containerTree">
+ 												<!-- <div id="TreeMap"></div> -->
+												<div id="memberRegionSummary" style="width:100%; height:410px; overflow:hidden;"></div>
+											</div>
+										</div>
+									</div>
+								</div>
+							</div>
+						</div>
+						<!-- Member Clients -->
+						<div class="canvasBlockLarge marginBR10-11 left" id="memberClientsWidget" data-role="widget" data-widgetid="MemberClients" data-active ="yes" data-timeline="5000">
+              <div class="left widthfull-100per canvasBlockInnerBlock">
+                <span class="left marginL10 canvasHeading">Member Clients</span>
+                <a id="btnLargeBlock_2" class="minusIcon borderLeftToggleBlock" onClick="toggleDiv('LargeBlock_2');"></a>
+              </div>
+              <div
+                class="left canvasInnerBlock canvasBlockLargeGridContent"
+                id="LargeBlock_2" >
+                <!--Grid  Block-->
+                <div class="gridBlocksPanel left"
+                  id="gridBlocks_Panel" >
+                  <div class="left widthfull-100per" >
+                    <table id="memberClientsList">
+                    </table>
+                  </div>
+                </div>
+              </div>
+            </div>
+						<!-- Block 4-->
+						<div class="canvasBlockKeyStats marginBR10-11 left" data-role="widget" data-widgetid="MemberKeyStatistics" data-active ="yes" data-timeline="5000">
+							<div class="left width495 canvasBlockInnerBlock" >
+								<span class="left marginL10 canvasHeading">Key Statistics</span><a
+									id="btnSmallBlock_4" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_4');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlockKeyStats"
+								id="SmallBlock_4" >
+								<div class="graphBlocksContent left" >
+									<span class="marginB11 left widthfull-100per">Last 15
+										Minutes</span>
+									<!--Line 1-->
+									<div class="left widthfull-100per marginB10" >
+										<span id="memberCPUUsageSparkLine" class="left lineGraphKeyStats"> </span>
+										<span id="memberCPUUsageValue" class="color-d2d5d7 font-size23"> </span>
+										<span class="paddingL5">% CPU Usage</span>
+									</div>
+                  <!--Line 2-->
+                  <!-- <div class="left widthfull-100per ">
+                    <span id="memberMemoryUsageSparkLine" class="left lineGraphKeyStats"> </span>
+                    <span id="memberMemoryUsageValue" class="color-d2d5d7 font-size23"> </span>
+                    <span class="paddingL5">MB</span>
+                  </div> -->
+									<!--Line 3-->
+									<div class="left widthfull-100per marginB10" >
+										<span id="memberGetsPerSecSparkLine" class="left lineGraphKeyStats"> </span>
+										<span id="memberGetsPerSecValue" class="color-d2d5d7 font-size23">345.12</span>
+										<span data-prod-custom="pulse-readgetpersec-custom" class="paddingL5">Read/Sec</span>
+									</div>
+									<!--Line 4-->
+									<div class="left widthfull-100per marginB10" >
+										<span id="memberPutsPerSecSparkLineBar" class="left lineGraphKeyStats"> </span>
+										<span id="memberPutsPerSecValue" class="color-d2d5d7 font-size23">678.34</span>
+										<span data-prod-custom="pulse-writeputpersec-custom" class="paddingL5">Write/Sec</span>
+									</div>
+								</div>
+							</div>
+						</div>
+						<!-- Block 5-->
+						<!-- <div class="canvasBlock marginBR10-11 left">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading">Memory Usage</span><a
+									id="btnSmallBlock_5" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_5');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_5">
+								<div class="graphBlocksContent">
+									<div id="memberHeapUsageAvg" class="color-d2d5d7 font-size40"> </div>
+									<span>Last 15 Minutes</span>
+								</div>
+								<div class="left graphChart">
+									<span class="left lineGraph" id="memberHeapUsage"></span>
+								</div>
+							</div>
+						</div>-->
+						<!-- Block 6-->
+						<div class="canvasBlock marginBR10-11 left" data-role="widget" data-widgetid="MemberGCPauses" data-active ="yes" data-timeline="5000">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading">No. of JVM
+									pauses</span><a id="btnSmallBlock_6" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_6');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_6">
+								<div class="graphBlocksContent">
+									<div id="memberGcPausesAvg" class="color-d2d5d7 font-size40"> </div>
+									<span>Last 15 Minutes</span>
+								</div>
+								<div class="left graphChart">
+									<span class="left lineGraph" id="memberGCPauses"></span>
+								</div>
+							</div>
+						</div>
+					</div>
+					<!-- Right Block-->
+					<div class="rightBlockCanvas">
+						<!-- Block 1-->
+						<div id="MemberGatewayHubWidget" class="canvasBlock marginB10 left " 
+						  data-role="widget" data-widgetid="MemberGatewayHub" data-active ="yes" data-timeline="5000">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading">Gateway Receiver</span><a
+									id="btnSmallBlock_1" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_1');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_1">
+								<div class="graphBlocksContent">
+									<div class="detailsBlock-member firstPaddingLeftZero">
+										<div id="receiverListeningPort" class="color-d2d5d7 font-size20"> </div>
+										<span class="labeltext">Listening Port</span>
+									</div>
+									<div class="detailsBlock-member">
+										<div id="receiverLinkThroughput" class="color-d2d5d7 font-size20"> </div>
+										<span class="labeltext">Link Throughput</span>
+									</div>
+									<div class="detailsBlock-member lastPaddingLeftZero">
+										<div id="receiverAvgBatchLatency" class="color-d2d5d7 font-size20"> </div>
+										<span class="labeltext">AVG Batch Latency</span>
+									</div>
+								</div>
+								<!-- End Point Master-->
+								<div class="left endPointMasterBlock">
+									<!--End point-->
+									<div class="pointHeading">
+										<label class="pointTextHeading">Gateway Senders</label>
+									</div>
+									<div class="pointGridHeading">
+										<span class="pointHeadingPadding pointC1">ID</span><span
+											class="pointHeadingPadding pointC2">Queue Size</span><span
+											class="pointHeadingPadding pointC3">Status</span>
+									</div>
+									<div class="pointGridData">
+									  <div id="gatewaySendersList" > </div>
+									</div>
+								</div>
+								<div class="clearButton">
+									<a id="idGatewaySenderMoreDetailsLink" class="right linkButton" onclick="showGatewaySenderPopup(this)" href="#">More Details</a>
+								</div>
+								<!-- Regions Involved-->
+								<div class="left endPointMasterBlock">
+									<!--Regions Involved-->
+									<img src="images/spacer.png" height="1" border="0"
+										class="pointHeading">
+									<div class="pointGridHeading">
+										<span data-prod-custom="pulse-regionstableInvolved-custom" class="pointHeadingPadding textUpper">Regions
+											Involved</span>
+									</div>
+									<div class="pointGridData" >
+									  <div id="regionInvolvedList"></div>
+									</div>
+								</div>
+							</div>
+						</div>
+						<div class="clear"></div>
+            <!-- Block 2-->
+            <div id="MemberAsynchEventQueuesWidget" class="canvasBlock marginB10 left " 
+              data-role="widget" data-widgetid="MemberAsynchEventQueues" data-active ="yes" data-timeline="5000">
+              <div class="left width242 canvasBlockInnerBlock">
+                <span class="left marginL10 canvasHeading">Asynch Event Queues</span>
+                <a id="btnSmallBlock_2" class="minusIcon" onClick="toggleDiv('SmallBlock_2');"></a>
+              </div>
+              <div class="left canvasInnerBlock canvasContentBlock" id="SmallBlock_2">
+                <div class="left endPointMasterBlock">
+                <!-- asynch event queue -->
+                  <div class="pointGridHeading">
+                    <span class="pointHeadingPadding pointC1">ID</span>
+                    <span class="pointHeadingPadding pointC2">Queue Size</span>
+                    <span class="pointHeadingPadding pointC3">Type</span>
+                  </div>
+                  <div class="pointGridData">
+                    <div id="asynchList"> </div>
+                  </div>
+                </div>
+                <div class="clearButton">
+                  <a id="idAsynchMoreDetailsLink" class="right linkButton" onclick="showAsyncEventQueuePopup(this)" href="#">More Details</a>
+                </div>
+              </div>
+            </div>
+            <div class="clear"></div>
+						<!-- Block 5-->
+						<div class="canvasBlock marginBR10-11 left" data-role="widget" data-widgetid="MemberHeapUsage" data-active ="yes" data-timeline="5000">
+							<div class="left width242 canvasBlockInnerBlock" >
+								<span class="left marginL10 canvasHeading">Memory Usage</span><a
+									id="btnSmallBlock_5" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_5');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_5" >
+								<div class="graphBlocksContent" >
+									<div id="memberHeapUsageAvg" class="color-d2d5d7 font-size40">
+									</div>
+									<span>Last 15 Minutes</span>
+								</div>
+								<div class="left graphChart" >
+									<span class="left lineGraph" id="memberHeapUsage"></span>
+								</div>
+							</div>
+						</div>
+						<!-- Block 3-->
+						<div class="canvasBlock marginB10 left" data-role="widget" data-widgetid="MemberDiskThroughput" data-active ="yes" data-timeline="5000">
+							<div class="left width242 canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading">Disk Throughput</span>
+								<a id="btnSmallBlock_3" class="minusIcon"
+									onClick="toggleDiv('SmallBlock_3');"></a>
+							</div>
+							<div class="left canvasInnerBlock canvasContentBlock"
+								id="SmallBlock_3">
+								<div class="graphBlocksContent marginB11 left">
+									<div class="left">
+										<span class="left">Last 15 Minutes</span>
+									</div>
+									<div class="right marginL10">
+										<span data-prod-custom="pulse-reads-custom" class="left">Reads</span> <span
+											class="left marginL10 colorCodeBlock diskReadsCode"></span>
+									</div>
+									<div class="right marginL10">
+										<span data-prod-custom="pulse-writes-custom" class="left">Writes</span> <span
+											class="left marginL10 colorCodeBlock diskWritesCode"></span>
+									</div>
+								</div>
+								<div class="graphBlocksContent width91Per left">
+									<div class="color-d2d5d7 font-size20">
+										<span id="diskReadsThroughput"></span>
+									</div>
+									<div class="width100Per left">
+										<span class="left">Reads</span> <span class="right"
+											id="currentDiskReadsThroughput"></span>
+									</div>
+								</div>
+								<div class="left graphChart marginB11">
+									<span class="left lineGraph" id="diskReadsThroughputTrend"></span>
+								</div>
+								<div class="graphBlocksContent width91Per left">
+									<div class="color-d2d5d7 font-size20">
+										<span id="diskWritesThroughput"></span>
+									</div>
+									<div class="width100Per left">
+										<span class="left">Writes</span> <span class="right"
+											id="currentDiskWritesThroughput"></span>
+									</div>
+								</div>
+								<div class="left graphChart">
+									<span class="left lineGraph" id="diskWritesThroughputTrend"></span>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<!-- Placeholder-->
+	<script>
+    $('input[placeholder], textarea[placeholder]').placeholder();
+  </script>
+<!--Popups Block-->
+<div id="boxes"> 
+  <!-- Version Details popup-->
+ <div id="dialog1" class="window width345" data-role="widget" data-widgetid="PulseVersionDetails" data-active ="yes" data-timeline="5000">
+    <div class="popup_heading"><span>Version Details</span><a href="#" class="closePopup">&nbsp;</a></div>
+    <div class="popup_contentBlock">
+      <div class="popup-innerblock">
+        <ul class="widthfull-100per left">
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Pulse Version:</label>
+            <label class="width-58 display-inline-block" id="pulseVer"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Build Id:</label>
+            <label class="width-58 display-inline-block" id="buildId"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Build Date:</label>
+            <label class="width-58 display-inline-block" id="buildDate"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Source Date:</label>
+            <label class="width-58 display-inline-block" id="sourceDate"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Source Revision:</label>
+            <label class="width-58 display-inline-block" id="sourceRevision"></label>
+          </li>
+          <li class="left widthfull-100per">
+            <label class="width-40 display-inline-block">Source Repository:</label>
+            <label class="width-58 display-inline-block" id="sourceRepository"></label>
+          </li>
+        </ul>
+        <div class="clear"></div>
+      </div>
+    </div>
+  </div>
+  <!-- Mask to cover the whole screen -->
+  <div id="mask"></div>
+</div>
+<div id="tooltip" class="tooltip"></div>
+<!-- Placeholder--> 
+<script>
+$('input[placeholder], textarea[placeholder]').placeholder();
+</script>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1922937f/pulse/src/main/webapp/QueryStatistics.html
----------------------------------------------------------------------
diff --git a/pulse/src/main/webapp/QueryStatistics.html b/pulse/src/main/webapp/QueryStatistics.html
new file mode 100644
index 0000000..8549577
--- /dev/null
+++ b/pulse/src/main/webapp/QueryStatistics.html
@@ -0,0 +1,306 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="X-UA-Compatible" content="IE=edge" />
+<meta http-equiv="CACHE-CONTROL" content="NO-CACHE,NO-STORE" />
+<meta http-equiv="PRAGMA" content="NO-CACHE" />
+<meta http-equiv="EXPIRES" content="-1">
+<title>Pulse</title>
+<link href="css/common.css" rel="stylesheet" type="text/css" />
+<link href="css/style.css" rel="stylesheet" type="text/css" />
+
+<!-- fix IE Ui issues-->
+<!--[if IE 7]>
+                <link href="css/ie/ie7.css" type="text/css" rel="stylesheet"/>
+         <![endif]-->
+<!--[if IE 8]>
+                <link href="css/ie/ie8.css" type="text/css" rel="stylesheet"/>
+         <![endif]-->
+<!--[if IE 9]>
+                <link href="css/ie/ie9.css" type="text/css" rel="stylesheet"/>
+         <![endif]-->
+<!-- IE Fix for HTML5 Tags -->
+<!--[if lt IE 9]>
+        <script src='scripts/lib/html5.js'></script>
+        <script type="text/javascript" src="scripts/lib/excanvas.js"></script>
+        <script type="text/javascript"> if (!window.console) console = {log: function() {}}; </script>
+                <![endif]-->
+
+<script type="text/javascript" src='scripts/lib/jquery-1.7.2.js'></script>
+<script type="text/javascript" src='scripts/lib/common.js'></script>
+<script type="text/javascript"
+	src="scripts/lib/jquery.i18n.properties.js"></script>
+<!--Custom Scroll Bar-->
+<!-- styles needed by jScrollPane - include in your own sites -->
+<link type="text/css" href="css/jquery.jscrollpane.css" rel="stylesheet"
+	media="all" />
+<!-- the mousewheel plugin -->
+<script type="text/javascript" src="scripts/lib/jquery.mousewheel.js"></script>
+<!-- the jScrollPane script -->
+<script type="text/javascript" src="scripts/lib/jquery.jscrollpane.js"></script>
+<!--Place Holder tag-->
+	<script type="text/javascript" src="scripts/lib/jquery.placeholder.js"></script>
+<!-- Rgraph and TreeMap-->
+<link type="text/css" href="css/base.css" rel="stylesheet" />
+<link type="text/css" href="css/Treemap.css" rel="stylesheet" />
+<script type="text/javascript" src="scripts/lib/jit.js"></script>
+<script type="text/javascript" src="scripts/lib/jquery.sparkline.js"></script>
+
+<!-- Grid view CSS and js-->
+<link rel="stylesheet" type="text/css" media="screen"
+	href="css/grid/ui.jqgrid.css" />
+<script src="scripts/lib/grid.locale-en.js" type="text/javascript"></script>
+<script src="scripts/lib/jquery.jqGrid.src.js" type="text/javascript"></script>
+<script src="scripts/lib/jquery.tablednd.js" type="text/javascript"></script>
+<!-- -->
+<!-- jQuery plugin to support automatically updating fuzzy timestamps 
+(e.g. "4 minutes ago" or "about 1 day ago") -->
+<script type="text/javascript" src="scripts/lib/jquery.timeago.js"></script>
+
+<!-- start:Cluster widget based js files -->
+<script type="text/javascript"
+	src="scripts/pulsescript/PulseCallbacks.js"></script>
+<script type="text/javascript"
+	src="scripts/pulsescript/PulseFunctions.js"></script>
+<script type="text/javascript" src='scripts/pulsescript/common.js'></script>
+<script type="text/javascript"
+	src='scripts/pulsescript/queryStatistics.js'></script>
+
+<!-- multiselect -->
+<link rel="stylesheet" type="text/css"
+	href="css/multiselect/jquery.multiselect.css" />
+<link rel="stylesheet" type="text/css" href="css/multiselect/style.css" />
+<link rel="stylesheet" type="text/css"
+	href="css/multiselect/prettify.css" />
+<script type="text/javascript"
+	src="scripts/multiselect/jquery-ui.js"></script>
+<script type="text/javascript"
+	src="scripts/multiselect/jquery.multiselect.js"></script>
+<script type="text/javascript" src="scripts/multiselect/prettify.js"></script>
+<script type="text/javascript" src="scripts/lib/checkBox-RadioButton.js"></script>
+<!-- multiselect -->
+</head>
+
+<body>
+	<!-- Connection lost-->
+	<div class="connectionLostMasterBlock hide" id="connectionStatusDiv">
+		<div class="connectionLostInnerBlock">
+			<label class="left">Connecting ...</label>
+			<div class="clear"></div>
+			<div id="connectionErrorMsgDiv" class="right"></div>
+		</div>
+	</div>
+
+	<div id="canvasWidth">
+		<!--Top Links-->
+		<div class="headerTopLinksMaster">
+			<div class="right">
+				<div class="left position-relative">
+					<a href="#." class="left headerTopLinks aboutClicked-Off">About</a>
+					<!-- About Dropdown-->
+					<div id="detailsAbout" class="aboutBlock display-none">
+						<div class="aboutDetailsBlock">
+							<div class="left widthfull-100per marginBottom30">
+								<div class="left">
+									<img data-prod-custom="pulse-aboutimg-custom"
+										src="images/about.png">
+									<div>
+										<div class="aboutVersionBlock left" id="pulseVersion"></div>
+										<div class="left termsBlock">
+											&nbsp;<a id="pulseVersionDetailsLink" href="#dialog1"
+												class="display-none">Version Details</a>
+										</div>
+									</div>
+								</div>
+								<div data-prod-custom="pulse-about-custom"
+									class="right aboutText">The Pulse tool monitors
+									Pivotal&#0153; GemFire&#0169; system in real time. It provides
+									health information, detailed operational and configuration
+									data, system alerts, throughput performance and statistics for
+									system members and connected clients.</div>
+							</div>
+							<div class="left widthfull-100per">
+								<div class="left copyright">
+									Copyright © 2012-2014 Pivotal Software, Inc. All Rights Reserved.
+									This product is protected by U.S. and international copyright
+									and intellectual property laws. Pivotal products are covered by
+									one or more patents listed at <a href="http://www.pivotal.io/patents"
+									target="_blank" class="termsBlockLink text-center">http://www.pivotal.io/patents</a>.
+								</div>
+
+								<div class="left copyright">Pivotal is a registered
+									trademark or trademark of Pivotal Software, Inc. in the United States and
+									other jurisdictions. All other marks and names mentioned herein
+									may be trademarks of their respective companies.</div>
+
+								<div class="left termsBlock">
+									<a href="oslicenses.txt" target="_blank">Open Source
+										Licenses</a>
+								</div>
+								<!--  <div class="right termsBlock">
+	                  Pulse <a href="#.">Terms of Service</a>
+	                </div>-->
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="left headerTopSeperator"></div>
+				<div class="left">
+					<a data-prod-custom="pulse-help-custom" target="_blank"
+						href="http://gemfire.docs.pivotal.io/latest/userguide/index.html#tools_modules/pulse/chapter_overview.html"
+						class="left headerTopLinks">Help</a>
+				</div>
+				<div class="left headerTopSeperator"></div>
+				<div class="left headerTopLinks welcomeLabelPRZero">Welcome</div>
+				<div class="left headerTopLinks textbold font-size12" id="userName"></div>
+				<div class="left headerTopSeperator"></div>
+				<div class="left">
+					<a href="pulse/clusterLogout" class="left headerTopLinks">Sign
+						Out</a>
+				</div>
+			</div>
+		</div>
+		<!-- Header block-->
+		<header>
+			<div class="left">
+				<a href="#." onclick="openClusterDetail();"
+					class="left textbold HeaderLink HeaderLinkActive" id="clusterName"></a>
+			</div>
+			<div class="textbold right logoBlock">
+				<a href="#.">[LOGO]</a>
+			</div>
+		</header>
+		<div class="clear"></div>
+		<div class="subHeader">
+			<ul>
+				<li><a href="#." onclick="openClusterDetail();">Cluster
+						View</a></li>
+				<!-- Hide Data Browser tab for gemfirexd (Pulse-Cheetah Release) -->
+				<!-- <li><a href="#."  onclick="openDataBrowser();">Data Browser</a></li> -->
+				<li><a href="#." onclick="openQueryStatistics();" class="active">Query Statistics</a></li>
+			</ul>
+			<div class="clear"></div>
+		</div>
+		<!-- Middle block-->
+		<div class="left widthfull-100per">
+			<!--Top Right Block 1-->
+			<div class="right widthfull-100per marginTB10">
+
+				<!-- Tab-->
+				<div id="notificationsPanel" class="right marginL10 TabTopPanel position-relative"
+					data-role="widget" data-widgetid="CluserAlertNotification" data-active="yes" data-timeline="5000">
+				</div>
+				<div class="left leftBlockCanvas">
+					<!-- to be replaced with grid -->
+					<!-- canvasBlockLarge -->
+					<div class="statusmasterBlock">
+						<div
+							class="left widthfull-100per canvasBlockInnerBlock backgroundQueryStats">
+							<!-- Search-->
+							<div class="left widthfull-100per canvasBlockInnerBlock">
+								<span class="left marginL10 canvasHeading">Top 50 Queries</span>
+							</div>
+							<div class="clear"></div>
+							<div class="left width96Per marginBottom6 marginL10 marginTop6">
+								<div class="searchBlockMasterQS">
+									<input type="button" class="searchButtonQS"> <input
+										type="text" placeholder="Search Query Definition"
+										onkeyup="applyFilterOnQueryStatistics();"
+										class="searchBoxQueryStatistics" id="filterQueryStatisticsBox">
+								</div>
+								<div class="right">
+									<select id="columnsSelect" name="columnsSelect"
+										multiple="multiple" size="20"></select>
+								</div>
+							</div>
+							<div data-role="widget" data-widgetid="QueryStatistics"
+								data-active="yes" data-timeline="30000">
+								<div
+									class="left widthfull-100per canvasInnerBlock backgroundQueryStats">
+									<!--Grid  Block-->
+									<div class="gridBlocksPanel left" id="gridBlocks_Panel">
+										<div class="left widthfull-100per">
+											<table id="queryStatisticsList"></table>
+										</div>
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+			</div>
+			<!--Middle Block 1-->
+		</div>
+	</div>
+	<!--Popups Block-->
+	<div id="boxes">
+		<!-- Version Details popup-->
+		<!-- Version Details popup-->
+		<div id="dialog1" class="window width345" data-role="widget"
+			data-widgetid="PulseVersionDetails" data-active="yes"
+			data-timeline="5000">
+			<div class="popup_heading">
+				<span>Version Details</span><a href="#" class="closePopup">&nbsp;</a>
+			</div>
+			<div class="popup_contentBlock">
+				<div class="popup-innerblock">
+					<ul class="widthfull-100per left">
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Pulse Version:</label> <label
+							class="width-58 display-inline-block" id="pulseVer"></label></li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Build Id:</label> <label
+							class="width-58 display-inline-block" id="buildId"></label></li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Build Date:</label> <label
+							class="width-58 display-inline-block" id="buildDate"></label></li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Source Date:</label> <label
+							class="width-58 display-inline-block" id="sourceDate"></label></li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Source Revision:</label>
+							<label class="width-58 display-inline-block" id="sourceRevision"></label>
+						</li>
+						<li class="left widthfull-100per"><label
+							class="width-40 display-inline-block">Source
+								Repository:</label> <label class="width-58 display-inline-block"
+							id="sourceRepository"></label></li>
+					</ul>
+					<div class="clear"></div>
+				</div>
+			</div>
+		</div>
+		<!-- Grid Details popup-->
+		<div id="gridPopup" class="window width700">
+			<div class="popup_heading">
+				<span>Object Explorer</span><a href="#" class="closePopup">&nbsp;</a>
+			</div>
+			<div class="popup_contentBlock">
+				<div class="popup-innerblock">
+					<table id="treegrid">
+						<tr>
+							<td />
+						</tr>
+					</table>
+				</div>
+				<div class="popup-innerblock">
+					<table id="popUpExplorer">
+						<tr>
+							<td />
+						</tr>
+					</table>
+				</div>
+			</div>
+		</div>
+		<!-- Mask to cover the whole screen -->
+		<div id="mask"></div>
+	</div>
+	<div id="tooltip" class="tooltip"></div>
+	<!-- Placeholder-->
+	<script>
+    $('input[placeholder], textarea[placeholder]').placeholder();
+  </script>
+
+</body>
+</html>



[58/79] incubator-geode git commit: GEODE-287: Remove old gfsh code

Posted by tu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/67085172/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/PrintUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/PrintUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/PrintUtil.java
deleted file mode 100644
index 514b3b8..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tools/gfsh/app/util/PrintUtil.java
+++ /dev/null
@@ -1,1683 +0,0 @@
-package com.gemstone.gemfire.internal.tools.gfsh.app.util;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.types.CollectionType;
-import com.gemstone.gemfire.cache.query.types.ObjectType;
-import com.gemstone.gemfire.cache.query.types.StructType;
-import com.gemstone.gemfire.internal.tools.gfsh.app.cache.data.Mappable;
-import com.gemstone.gemfire.internal.tools.gfsh.app.misc.util.StringUtil;
-
-public class PrintUtil
-{
-	private static boolean tableFormat = false;
-	
-	public static boolean isTableFormat()
-	{
-		return tableFormat;
-	}
-	
-	public static void setTableFormat(boolean tableFormat)
-	{
-		PrintUtil.tableFormat = tableFormat;
-	}
-	
-	/**
-	 * Prints the region entries. It prints both keys and values formatted.
-	 * @param region
-	 * @param startIndex
-	 * @param startRowNum
-	 * @param rowCount
-	 * @param keyList
-	 * @return Returns the number of rows printed.
-	 * @throws Exception
-	 */
-	public static int printEntries(Region region, Iterator regionIterator, int startIndex, int startRowNum, int rowCount, List keyList) throws Exception
-	{
-		if (isTableFormat() == false) {
-			return SimplePrintUtil.printEntries(region, regionIterator, startIndex, startRowNum, rowCount, keyList);
-		}
-		
-		if (region == null || regionIterator == null) {
-			System.out.println("Error: Region is null");
-			return 0;
-		}
-		
-		int endIndex = startIndex + rowCount; // exclusive
-		if (endIndex >= region.size()) {
-			endIndex = region.size();
-		}
-		
-
-		// Determine max column lengths
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		ArrayList keyMaxLenList = new ArrayList();
-		ArrayList valueMaxLenList = new ArrayList();
-		Object key = null;
-		Object value = null;
-		Set nameSet = region.entrySet();
-		int index = startIndex;
-
-		ArrayList<Region.Entry> entryList = new ArrayList();
-		for (Iterator itr = regionIterator; index < endIndex && itr.hasNext(); index++) {
-			Region.Entry entry = (Region.Entry) itr.next();
-			entryList.add(entry);
-			key = entry.getKey();
-			value = entry.getValue();
-			computeMaxLengths(keyMaxLenList, valueMaxLenList, key, value);
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-		}
-
-		if (key == null) {
-			return 0;
-		}
-
-		// Print headers including row column
-		int rowMax = String.valueOf(endIndex).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(keyMaxLenList, valueMaxLenList, key, value, rowMax);
-
-		// Print keys and values
-		int row = startRowNum;
-		index = startIndex;
-		for (Iterator itr = entryList.iterator(); index < endIndex && itr.hasNext(); index++) {
-
-			System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-			System.out.print("  ");
-
-			Region.Entry entry = (Region.Entry) itr.next();
-			key = entry.getKey();
-			value = entry.getValue();
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			printObject(keyMaxLenList, key, true);
-			System.out.print(" | ");
-			printObject(valueMaxLenList, value, false);
-			System.out.println();
-			row++;
-		}
-		System.out.println();
-		System.out.println(" Fetch size: " + rowCount);
-		System.out.println("   Returned: " + (row-1) + "/" + region.size());
-		for (Object keyName : keyNameSet) {
-			System.out.println("  Key Class: " + keyName);
-		}
-		for (Object valueName : valueNameSet) {
-			System.out.println("Value Class: " + valueName);
-
-		}
-		return endIndex - startIndex;
-	}
-
-	public static int printEntries(Region region, Map keyMap, List keyList) throws Exception
-	{
-		if (isTableFormat() == false) {
-			return SimplePrintUtil.printEntries(region, keyMap, keyList);
-		}
-		
-		if (region == null) {
-			System.out.println("Error: Region is null");
-			return 0;
-		}
-
-		// Determine max column lengths
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		ArrayList keyMaxLenList = new ArrayList();
-		ArrayList valueMaxLenList = new ArrayList();
-		ArrayList indexList = new ArrayList(keyMap.keySet());
-		Collections.sort(indexList);
-		Object key = null;
-		Object value = null;
-		for (Iterator iterator = indexList.iterator(); iterator.hasNext();) {
-			Object index = iterator.next();
-			key = keyMap.get(index);
-			value = region.get(key);
-			computeMaxLengths(keyMaxLenList, valueMaxLenList, key, value);
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-		}
-		if (key == null) {
-			return 0;
-		}
-
-		// Print headers including row column
-		int rowCount = keyMap.size();
-		int rowMax = String.valueOf(rowCount).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(keyMaxLenList, valueMaxLenList, key, value, rowMax);
-
-		// Print keys and values
-		int row = 1;
-		for (Iterator iterator = indexList.iterator(); iterator.hasNext();) {
-
-			System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-			System.out.print("  ");
-
-			Object index = iterator.next();
-			key = keyMap.get(index);
-			value = region.get(key);
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			printObject(keyMaxLenList, key, true);
-			System.out.print(" | ");
-			printObject(valueMaxLenList, value, false);
-			System.out.println();
-			row++;
-		}
-		System.out.println();
-		for (Object keyName : keyNameSet) {
-			System.out.println("  Key Class: " + keyName);
-		}
-		for (Object valueName : valueNameSet) {
-			System.out.println("Value Class: " + valueName);
-		}
-		return rowCount;
-	}
-
-	public static int printEntries(Region region, Set keySet, List keyList) throws Exception
-	{
-		
-		if (isTableFormat() == false) {
-			return SimplePrintUtil.printEntries(region, keySet, keyList);
-		}
-		
-		if (region == null) {
-			System.out.println("Error: Region is null");
-			return 0;
-		}
-
-		// Determine max column lengths
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		ArrayList keyMaxLenList = new ArrayList();
-		ArrayList valueMaxLenList = new ArrayList();
-		Object key = null;
-		Object value = null;
-		for (Iterator iterator = keySet.iterator(); iterator.hasNext();) {
-			key = iterator.next();
-			value = region.get(key);
-			computeMaxLengths(keyMaxLenList, valueMaxLenList, key, value);
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-		}
-		if (key == null) {
-			return 0;
-		}
-
-		// Print headers including row column
-		int rowCount = keySet.size();
-		int rowMax = String.valueOf(rowCount).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(keyMaxLenList, valueMaxLenList, key, value, rowMax);
-
-		// Print keys and values
-		int row = 1;
-		for (Iterator iterator = keySet.iterator(); iterator.hasNext();) {
-
-			System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-			System.out.print("  ");
-
-			key = iterator.next();
-			value = region.get(key);
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			printObject(keyMaxLenList, key, true);
-			System.out.print(" | ");
-			printObject(valueMaxLenList, value, false);
-			System.out.println();
-			row++;
-		}
-		System.out.println();
-		for (Object keyName : keyNameSet) {
-			System.out.println("  Key Class: " + keyName);
-		}
-		for (Object valueName : valueNameSet) {
-			System.out.println("Value Class: " + valueName);
-		}
-		return rowCount;
-	}
-	
-	public static int printEntries(Map map, int startIndex, int startRowNum, int rowCount, int actualSize, List keyList) throws Exception
-	{
-		if (isTableFormat() == false) {
-			return SimplePrintUtil.printEntries(map, startIndex, startRowNum, rowCount, actualSize, keyList);
-		}
-		
-		if (map == null) {
-			System.out.println("Error: map is null");
-			return 0;
-		}
-
-		// Determine max column lengths
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		ArrayList keyMaxLenList = new ArrayList();
-		ArrayList valueMaxLenList = new ArrayList();
-		Object key = null;
-		Object value = null;
-		Set entrySet = map.entrySet();
-		int count = 0;
-		for (Iterator itr = entrySet.iterator(); count < rowCount && itr.hasNext(); count++) {
-			Map.Entry entry = (Map.Entry) itr.next();
-			key = entry.getKey();
-			value = entry.getValue();
-			computeMaxLengths(keyMaxLenList, valueMaxLenList, key, value);
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-		}
-
-		if (key == null) {
-			return 0;
-		}
-
-		// Print headers including row column
-		int rowMax = String.valueOf(startRowNum + rowCount - 1).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(keyMaxLenList, valueMaxLenList, key, value, rowMax);
-
-		// Print keys and values
-//		int row = 1;
-		count = 0;
-		int row = startRowNum;
-		int lastRow = startRowNum + rowCount - 1;
-		for (Iterator itr = entrySet.iterator(); count < rowCount && itr.hasNext(); count++) {
-
-			System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-			System.out.print("  ");
-
-			Map.Entry entry = (Map.Entry) itr.next();
-			key = entry.getKey();
-			value = entry.getValue();
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			printObject(keyMaxLenList, key, true);
-			System.out.print(" | ");
-			printObject(valueMaxLenList, value, false);
-			System.out.println();
-			row++;
-		}
-		System.out.println();
-		System.out.println(" Fetch size: " + rowCount);
-		System.out.println("   Returned: " + (row-1) + "/" + actualSize);
-		for (Object keyName : keyNameSet) {
-		System.out.println("  Key Class: " + keyName);
-		}
-		for (Object valueName : valueNameSet) {
-			System.out.println("Value Class: " + valueName);
-		}
-		return count;
-	}
-	
-	public static int printSet(Set set, int rowCount, List keyList) throws Exception
-	{
-		return printSet(set, rowCount, keyList, true);
-	}
-	
-	public static int printSet(Set set, int rowCount, List keyList, boolean showSummary) throws Exception
-	{
-		return printSet(set, rowCount, keyList, "Key", showSummary);
-	}
-	
-	public static int printSet(Set set, int rowCount, List keyList, 
-			String keyColumnName,
-			boolean showSummary) throws Exception
-	{
-		if (isTableFormat() == false) {
-			return SimplePrintUtil.printSet(set, rowCount, keyList, 
-					keyColumnName, showSummary);
-		}
-		
-		if (set == null) {
-			return 0;
-		}
-
-		// Determine max column lengths
-		HashSet keyNameSet = new HashSet();
-		ArrayList keyMaxLenList = new ArrayList();
-		Object key = null;
-		Set nameSet = set;
-		int count = 0;
-		int keyMin = keyColumnName.length();
-		for (Iterator itr = nameSet.iterator(); count < rowCount && itr.hasNext(); count++) {
-			key = itr.next();
-			computeMaxLengths(keyMaxLenList, key, true, keyMin, 0);
-			keyNameSet.add(key.getClass().getName());
-		}
-
-		if (key == null) {
-			return 0;
-		}
-
-		// Print headers including row column
-		int rowMax = String.valueOf(rowCount).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(keyMaxLenList, null, key, null, rowMax, keyColumnName, null, false);
-
-		// Print keys and values
-		int row = 1;
-		count = 0;
-		for (Iterator itr = nameSet.iterator(); count < rowCount && itr.hasNext(); count++) {
-
-			System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-			System.out.print("  ");
-
-			key = itr.next();
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			printObject(keyMaxLenList, key, true);
-			System.out.println();
-			row++;
-		}
-		if (showSummary) {
-			System.out.println();
-			System.out.println("Displayed (fetched): " + (row - 1));
-			System.out.println("        Actual Size: " + set.size());
-			for (Object keyName : keyNameSet) {
-				System.out.println("          " + keyColumnName + " Class: " + keyName);
-			}
-		}
-		return row - 1;
-	}
-	
-	public static int printEntries(Map map, int rowCount, List keyList) throws Exception
-	{
-		return printEntries(map, rowCount, keyList, true, true);
-	}
-	
-	public static int printEntries(Map map, int rowCount, List keyList, boolean showSummary, boolean showValues) throws Exception
-	{
-		return printEntries(map, rowCount, keyList, "Key", "Value", showSummary, showValues);
-	}
-	
-	public static int printEntries(Map map, int rowCount, List keyList, 
-			String keyColumnName, String valueColumnName, 
-			boolean showSummary, boolean showValues) throws Exception
-	{
-		if (isTableFormat() == false) {
-			return SimplePrintUtil.printEntries(map, rowCount, keyList, 
-					keyColumnName, valueColumnName, showSummary, showValues);
-		}
-		
-		if (map == null) {
-			System.out.println("Error: Region is null");
-			return 0;
-		}
-
-		// Determine max column lengths
-		HashSet keyNameSet = new HashSet();
-		HashSet valueNameSet = new HashSet();
-		ArrayList keyMaxLenList = new ArrayList();
-		ArrayList valueMaxLenList = new ArrayList();
-		Object key = null;
-		Object value = null;
-		Set nameSet = map.entrySet();
-		int count = 0;
-		int keyMin = keyColumnName.length();
-		int valueMin = valueColumnName.length();
-		for (Iterator itr = nameSet.iterator(); count < rowCount && itr.hasNext(); count++) {
-			Map.Entry entry = (Map.Entry) itr.next();
-			key = entry.getKey();
-			value = entry.getValue();
-			computeMaxLengths(keyMaxLenList, valueMaxLenList, key, value, keyMin, valueMin);
-			keyNameSet.add(key.getClass().getName());
-			if (value != null) {
-				valueNameSet.add(value.getClass().getName());
-			}
-		}
-
-		if (key == null) {
-			return 0;
-		}
-
-		// Print headers including row column
-		int rowMax = String.valueOf(rowCount).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(keyMaxLenList, valueMaxLenList, key, value, rowMax, keyColumnName, valueColumnName, showValues);
-
-		// Print keys and values
-		int row = 1;
-		count = 0;
-		for (Iterator itr = nameSet.iterator(); count < rowCount && itr.hasNext(); count++) {
-
-			System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-			System.out.print("  ");
-
-			Map.Entry entry = (Map.Entry) itr.next();
-			key = entry.getKey();
-			value = entry.getValue();
-			if (keyList != null) {
-				keyList.add(key);
-			}
-			printObject(keyMaxLenList, key, true);
-			if (showValues) {
-				System.out.print(" | ");
-				printObject(valueMaxLenList, value, false);
-			}
-			System.out.println();
-			row++;
-		}
-		if (showSummary) {
-			System.out.println();
-			System.out.println("Displayed (fetched): " + (row - 1));
-			System.out.println("        Actual Size: " + map.size());
-			for (Object keyName : keyNameSet) {
-				System.out.println("          " + keyColumnName + " Class: " + keyName);
-			}
-			for (Object valueName : valueNameSet) {
-				System.out.println("        " + valueColumnName + " Class: " + valueName);
-	
-			}
-		}
-		return row - 1;
-	}
-	
-	private static void computeMaxLengths(List keyList, List valueList, Object key, Object value)
-	{
-		computeMaxLengths(keyList, valueList, key, value, 3, 5); // "Key", "Value"
-	}
-
-	private static void computeMaxLengths(List keyList, List valueList, Object key, Object value, int keyMin, int valueMin)
-	{
-		computeMaxLengths(keyList, key, true, keyMin, valueMin);
-		computeMaxLengths(valueList, value, false, keyMin, valueMin);
-	}
-
-	private static void printTopHeaders(List list, Object obj, 
-			boolean printLastColumnSpaces, String primitiveHeader)
-	{
-		Object object = obj;
-		if (object == null) {
-			object = "null";
-		}
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date) 
-		{
-
-			int maxLen = (Integer) list.get(0);
-			if (maxLen < primitiveHeader.length()) {
-				maxLen = primitiveHeader.length();
-			}
-			if (printLastColumnSpaces) {
-				System.out.print(StringUtil.getRightPaddedString(primitiveHeader, maxLen, ' '));
-			} else {
-				System.out.print(primitiveHeader);
-			}
-			
-		} else if (object instanceof Map) {
-			
-			// Map
-			Map map = (Map) object;
-			Set set = map.keySet();
-			if (set != null) {
-			TreeSet keySet = new TreeSet(set);
-			int listIndex = 0;
-				for (Object header : keySet) {
-					int maxLen = (Integer) list.get(listIndex);
-					if (listIndex == list.size() - 1) {
-						if (printLastColumnSpaces) {
-							System.out.print(StringUtil.getRightPaddedString(header.toString(), maxLen, ' '));
-						} else {
-							System.out.print(header);
-						}
-					} else {
-						System.out.print(StringUtil.getRightPaddedString(header.toString(), maxLen, ' '));
-						System.out.print("  ");
-					}
-	
-					listIndex++;
-				}
-			}
-			
-		} else {
-
-			// print object
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			String name;
-			Object value;
-			int listIndex = 0;
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				try {
-					value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-					int maxLen = (Integer) list.get(listIndex);
-					String header = name.substring(3);
-					if (listIndex == list.size() - 1) {
-						if (printLastColumnSpaces) {
-							System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-						} else {
-							System.out.print(header);
-						}
-					} else {
-						System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-						System.out.print("  ");
-					}
-
-					listIndex++;
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-
-	private static void printBottomHeaders(List list, Object obj, boolean printLastColumnSpaces,
-			String primitiveHeader)
-	{
-		Object object = obj;
-		if (object == null) {
-			object = "null";
-		}
-		
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date) 
-		{
-
-			int maxLen = (Integer) list.get(0);
-			if (maxLen < primitiveHeader.length()) {
-				maxLen = primitiveHeader.length();
-			}
-			if (printLastColumnSpaces) {
-				System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", primitiveHeader
-						.length(), '-'), maxLen, ' '));
-			} else {
-				System.out.print(StringUtil.getRightPaddedString("", primitiveHeader.length(), '-'));
-			}
-
-		} else if (object instanceof Map) {
-			
-			// Map
-			Map map = (Map) object;
-			Set<String> set = map.keySet();
-			if (set != null) {
-				TreeSet keySet = new TreeSet(set);
-				int listIndex = 0;
-				for (Object header : keySet) {
-					Object value = map.get(header);
-					value = getPrintableValue(value);
-					int maxLen = (Integer) list.get(listIndex);
-
-					if (listIndex == list.size() - 1) {
-						if (printLastColumnSpaces) {
-							System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header.toString()
-									.length(), '-'), maxLen, ' '));
-						} else {
-							System.out.print(StringUtil.getRightPaddedString("", header.toString().length(), '-'));
-						}
-					} else {
-						System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header.toString()
-								.length(), '-'), maxLen, ' '));
-						System.out.print("  ");
-					}
-					listIndex++;
-				}
-			}
-			
-		} else {
-
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			String name;
-			Object value;
-			int listIndex = 0;
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				try {
-					value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-					int maxLen = (Integer) list.get(listIndex);
-					String header = name.substring(3);
-
-					if (listIndex == list.size() - 1) {
-						if (printLastColumnSpaces) {
-							System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header
-									.length(), '-'), maxLen, ' '));
-						} else {
-							System.out.print(StringUtil.getRightPaddedString("", header.length(), '-'));
-						}
-					} else {
-						System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header
-								.length(), '-'), maxLen, ' '));
-						System.out.print("  ");
-					}
-					listIndex++;
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-	
-	private static void printHeaders(List keyList, List valueList, 
-			Object key, Object value, int rowMaxLen)
-			throws Exception
-	{
-		printHeaders(keyList, valueList, key, value, rowMaxLen, "Key", "Value", true);
-	}
-
-	private static void printHeaders(List keyList, List valueList, 
-			Object key, Object value, int rowMaxLen, 
-			String keyColumnName, String valueColumnName, boolean showValues)
-			throws Exception
-	{
-		System.out.print(StringUtil.getRightPaddedString("Row", rowMaxLen, ' '));
-		System.out.print("  ");
-		printTopHeaders(keyList, key, true, keyColumnName);
-		if (showValues) {
-			System.out.print(" | ");
-			printTopHeaders(valueList, value, false, valueColumnName);
-		}
-		System.out.println();
-
-		if (rowMaxLen < 3) {
-			rowMaxLen = 3;
-		}
-		System.out.print(StringUtil.getRightPaddedString("", rowMaxLen, '-'));
-		System.out.print("  ");
-		printBottomHeaders(keyList, key, true, keyColumnName);
-		if (showValues) {
-			System.out.print(" | ");
-			printBottomHeaders(valueList, value, false, valueColumnName);
-		}
-		System.out.println();
-	}
-	
-	/**
-	 * Prints the SelectResults contents up to the specified rowCount.
-	 * @param sr
-	 * @param startRowNum
-	 * @param rowCount
-	 * @return The number of rows printed
-	 */
-	public static int printSelectResults(SelectResults sr, int startIndex, int startRowNum, int rowCount)
-	{
-		if (isTableFormat() == false) {
-			return SimplePrintUtil.printSelectResults(sr, startIndex, startRowNum, rowCount);
-		}
-		
-		if (sr == null) {
-			System.out.println("Error: SelectResults is null");
-			return 0;
-		}
-
-		int endIndex = startIndex + rowCount; // exclusive
-		if (endIndex >= sr.size()) {
-			endIndex = sr.size();
-		}
-		
-		CollectionType type = sr.getCollectionType();
-		ObjectType elementType = type.getElementType();
-		int row = 1;
-		if (rowCount == -1) {
-			rowCount = sr.size();
-		}
-
-		HashSet elementNameSet = new HashSet();
-		ArrayList maxLenList = new ArrayList();
-		Object element = null;
-		boolean isStructType = false;
-		StructType structType = null;
-		Struct struct = null;
-		List srList = sr.asList();
-		
-		for (int i = startIndex; i < endIndex; i++) {
-			element = srList.get(i);
-			if (elementType.isStructType()) {
-				structType = (StructType) elementType;
-				struct = (Struct) element;
-				computeMaxLengths(maxLenList, structType, struct);
-				isStructType = true;
-			} else {
-				computeMaxLengths(maxLenList, element, false);
-				if (element != null) {
-					elementNameSet.add(element.getClass().getName());
-				}
-			}
-			row++;
-		}
-
-		if (element == null && struct == null) {
-			return 0;
-		}
-
-		int rowMax = String.valueOf(startRowNum + rowCount - 1).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		if (isStructType) {
-			printHeaders(maxLenList, structType, struct, rowMax);
-		} else {
-			printHeaders(maxLenList, element, rowMax);
-		}
-
-		row = startRowNum;
-		for (int i = startIndex; i < endIndex; i++) {
-			element = srList.get(i);
-
-			if (elementType.isStructType()) {
-
-				structType = (StructType) elementType;
-				struct = (Struct) element;
-				System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-				System.out.print("  ");
-				printStruct(maxLenList, structType, struct);
-				System.out.println();
-
-			} else {
-
-				System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-				System.out.print("  ");
-				printObject(maxLenList, element, false);
-				System.out.println();
-			}
-			row++;
-		}
-		System.out.println();
-		for (Object elementClassName : elementNameSet) {
-			System.out.println("Class: " + elementClassName);
-		}
-		return endIndex - startIndex;
-	}
-
-	private static int printSelectResults_iterator(SelectResults sr, int startRowNum, int rowCount)
-	{
-		if (sr == null) {
-			System.out.println("SelectResults is null");
-			return 0;
-		}
-
-		CollectionType type = sr.getCollectionType();
-		ObjectType elementType = type.getElementType();
-		int row = 1;
-		if (rowCount == -1) {
-			rowCount = sr.size();
-		}
-
-		HashSet elementNameSet = new HashSet();
-		ArrayList maxLenList = new ArrayList();
-		Object element = null;
-		boolean isStructType = false;
-		StructType structType = null;
-		Struct struct = null;
-		for (Iterator iter = sr.iterator(); iter.hasNext() && row <= rowCount;) {
-			element = iter.next();
-			if (elementType.isStructType()) {
-				structType = (StructType) elementType;
-				struct = (Struct) element;
-				computeMaxLengths(maxLenList, structType, struct);
-				isStructType = true;
-			} else {
-				computeMaxLengths(maxLenList, element, false);
-				elementNameSet.add(element.getClass().getName());
-			}
-			row++;
-		}
-
-		if (element == null && struct == null) {
-			return 0;
-		}
-
-		int rowMax = String.valueOf(startRowNum + rowCount - 1).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		if (isStructType) {
-			printHeaders(maxLenList, structType, struct, rowMax);
-		} else {
-			printHeaders(maxLenList, element, rowMax);
-		}
-
-		row = startRowNum;
-		int lastRow = startRowNum + rowCount - 1;
-		for (Iterator iter = sr.iterator(); iter.hasNext() && row <= lastRow;) {
-			element = iter.next();
-
-			if (elementType.isStructType()) {
-
-				structType = (StructType) elementType;
-				struct = (Struct) element;
-				System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-				System.out.print("  ");
-				printStruct(maxLenList, structType, struct);
-				System.out.println();
-
-			} else {
-
-				System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-				System.out.print("  ");
-				printObject(maxLenList, element, false);
-				System.out.println();
-			}
-			row++;
-		}
-		System.out.println();
-		for (Object elementClassName : elementNameSet) {
-			System.out.println("Class: " + elementClassName);
-		}
-		return row - 1;
-	}
-
-	private static void computeMaxLengths(List list, StructType structType, Struct struct)
-	{
-		ObjectType[] fieldTypes = structType.getFieldTypes();
-		String[] fieldNames = structType.getFieldNames();
-		Object[] fieldValues = struct.getFieldValues();
-
-		int listIndex = 0;
-		for (int i = 0; i < fieldTypes.length; i++) {
-			ObjectType fieldType = fieldTypes[i];
-			String fieldName = fieldNames[i];
-			Object fieldValue = fieldValues[i];
-
-			Integer len;
-			if (listIndex >= list.size()) {
-				len = fieldName.length();
-				list.add(len);
-			} else {
-				len = (Integer) list.get(listIndex);
-			}
-			if (fieldValue == null) {
-				if (len.intValue() < 4) {
-					len = 4;
-				}
-			} else {
-				int valueLen = fieldValue.toString().length();
-				if (len.intValue() < valueLen) {
-					len = valueLen;
-				}
-			}
-			list.set(listIndex, len);
-			listIndex++;
-		}
-	}
-	
-	private static void computeMaxLengths(List list, Object obj, boolean isKey)
-	{
-		computeMaxLengths(list, obj, isKey, 3, 5);
-	}
-
-	private static void computeMaxLengths(List list, Object obj, boolean isKey, int keyMin, int valueMin)
-	{
-		Object object = obj;
-		if (obj == null) {
-			object = "null";
-		}
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date) 
-		{
-			if (list.size() > 0) {
-				int len = (Integer) list.get(0);
-				if (len < object.toString().length()) {
-					list.set(0, object.toString().length());
-				}
-			} else {
-				if (isKey) {
-					if (object.toString().length() < keyMin) { // Key
-						list.add(keyMin);
-					} else {
-						list.add(object.toString().length());
-					}
-				} else {
-					if (object.toString().length() < valueMin) { // Value
-						list.add(valueMin);
-					} else {
-						list.add(object.toString().length());
-					}
-				}
-			}
-			
-		} else if (object instanceof Map) {
-			
-			// Map
-			Map map = (Map) object;
-			Set set = map.keySet();
-			if (set != null) {
-				TreeSet keySet = new TreeSet(set);
-				int listIndex = 0;
-				for (Object name : keySet) {
-					Object value = map.get(name);
-					value = getPrintableValue(value);
-					Integer len;
-					if (listIndex >= list.size()) {
-						len = name.toString().length();
-						list.add(len);
-					} else {
-						len = (Integer) list.get(listIndex);
-					}
-					if (value == null) {
-						if (len.intValue() < 4) {
-							len = 4;
-						}
-					} else {
-						int valueLen = value.toString().length();
-						if (len.intValue() < valueLen) {
-							len = valueLen;
-						}
-					}
-					list.set(listIndex, len);
-					listIndex++;
-				}
-			}
-
-		} else {
-
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			String name;
-			Object value;
-			int listIndex = 0;
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				try {
-					value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-					Integer len;
-					if (listIndex >= list.size()) {
-						len = name.length() - 3;
-						list.add(len);
-					} else {
-						len = (Integer) list.get(listIndex);
-					}
-					if (value == null) {
-						if (len.intValue() < 4) {
-							len = 4;
-						}
-					} else {
-						int valueLen = value.toString().length();
-						if (len.intValue() < valueLen) {
-							len = valueLen;
-						}
-					}
-					list.set(listIndex, len);
-					listIndex++;
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-
-	private static void printHeaders(List list, StructType structType, Struct struct, int rowMaxLen)
-	{
-		System.out.print(StringUtil.getRightPaddedString("Row", rowMaxLen, ' '));
-		System.out.print("  ");
-
-		ObjectType[] fieldTypes = structType.getFieldTypes();
-		String[] fieldNames = structType.getFieldNames();
-		Object[] fieldValues = struct.getFieldValues();
-
-		int listIndex = 0;
-		for (int i = 0; i < fieldTypes.length; i++) {
-			ObjectType fieldType = fieldTypes[i];
-			String fieldName = fieldNames[i];
-			Object fieldValue = fieldValues[i];
-			fieldValue = getPrintableValue(fieldValue);
-			int maxLen = (Integer) list.get(listIndex);
-			String header = fieldName;
-			System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-			System.out.print("  ");
-			listIndex++;
-		}
-		System.out.println();
-		System.out.print(StringUtil.getRightPaddedString("", rowMaxLen, '-'));
-		System.out.print("  ");
-		listIndex = 0;
-		for (int i = 0; i < fieldTypes.length; i++) {
-			ObjectType fieldType = fieldTypes[i];
-			String fieldName = fieldNames[i];
-			Object fieldValue = fieldValues[i];
-			fieldValue = getPrintableValue(fieldValue);
-			int maxLen = (Integer) list.get(listIndex);
-			String header = fieldName;
-			System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header.length(), '-'),
-					maxLen, ' '));
-			System.out.print("  ");
-			listIndex++;
-		}
-		System.out.println();
-	}
-
-	private static void printHeaders(List list, Object object, int rowMaxLen)
-	{
-		System.out.print(StringUtil.getRightPaddedString("Row", rowMaxLen, ' '));
-		System.out.print("  ");
-		printTopHeaders(list, object, false, "Value");
-		System.out.println();
-		
-		System.out.print(StringUtil.getRightPaddedString("", rowMaxLen, '-'));
-		System.out.print("  ");
-		printBottomHeaders(list, object, false, "Value");
-		System.out.println();
-	}
-
-	private static void printStruct(List list, StructType structType, Struct struct)
-	{
-		ObjectType[] fieldTypes = structType.getFieldTypes();
-		String[] fieldNames = structType.getFieldNames();
-		Object[] fieldValues = struct.getFieldValues();
-
-		int listIndex = 0;
-		for (int i = 0; i < fieldTypes.length; i++) {
-			ObjectType fieldType = fieldTypes[i];
-			String fieldName = fieldNames[i];
-			Object fieldValue = fieldValues[i];
-			int maxLen = (Integer) list.get(listIndex);
-			if (listIndex == list.size() - 1) {
-				if (fieldValue == null) {
-					System.out.println("null");
-				} else {
-					System.out.print(fieldValue.toString());
-				}
-			} else {
-				if (fieldValue == null) {
-					System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-				} else {
-					System.out.print(StringUtil.getRightPaddedString(fieldValue.toString(), maxLen, ' '));
-				}
-				System.out.print("  ");
-			}
-			listIndex++;
-		}
-	}
-
-	private static void printObject(List list, Object obj, boolean printLastColumnSpaces)
-	{
-		Object object = obj;
-		if (object == null) {
-			object = "null";
-		}
-		
-		if (object instanceof String || object.getClass().isPrimitive() || 
-				object.getClass() == Boolean.class ||
-				object.getClass() == Byte.class ||
-				object.getClass() == Character.class ||
-				object.getClass() == Short.class ||
-				object.getClass() == Integer.class ||
-				object.getClass() == Long.class ||
-				object.getClass() == Float.class ||
-				object.getClass() == Double.class ||
-				object.getClass().isArray() ||
-				object instanceof Date)  
-		{
-			object = getPrintableValue(object);
-			if (list.size() > 0) {
-				int maxLen = (Integer) list.get(0);
-				if (printLastColumnSpaces) {
-					System.out.print(StringUtil.getRightPaddedString(object.toString(), maxLen, ' '));
-				} else {
-					System.out.print(object.toString());
-				}
-			} else {
-				System.out.print(object.toString());
-			}
-			
-		} else if (object instanceof Map) {
-			
-			Map map = (Map) object;
-			Set  set = map.keySet();
-			if (set != null) {
-				TreeSet keySet = new TreeSet(set);
-				int listIndex = 0;
-				for (Object key : keySet) {
-					Object value = map.get(key);
-					value = getPrintableValue(value);
-
-					int maxLen = (Integer) list.get(listIndex);
-					if (listIndex == list.size() - 1) {
-						if (value == null) {
-							if (printLastColumnSpaces) {
-								System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-							} else {
-								System.out.print("null");
-							}
-						} else {
-							if (printLastColumnSpaces) {
-								System.out.print(StringUtil.getRightPaddedString(value.toString(), maxLen, ' '));
-							} else {
-								System.out.print(value.toString());
-							}
-						}
-
-					} else {
-						if (value == null) {
-							System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-						} else {
-							System.out.print(StringUtil.getRightPaddedString(value.toString(), maxLen, ' '));
-						}
-						System.out.print("  ");
-					}
-
-					listIndex++;
-				}
-			}
-
-		} else {
-
-			Class cls = object.getClass();
-			Method methods[] = cls.getMethods();
-			Method method;
-			Class retType;
-			String name;
-			Object value;
-			int listIndex = 0;
-			for (int i = 0; i < methods.length; i++) {
-				method = methods[i];
-				name = method.getName();
-				if (name.length() <= 3 || name.startsWith("get") == false || name.equals("getClass")) {
-					continue;
-				}
-				retType = method.getReturnType();
-				if (retType == Void.TYPE) {
-					continue;
-				}
-				try {
-					value = method.invoke(object, (Object[])null);
-					value = getPrintableValue(value);
-
-					int maxLen = (Integer) list.get(listIndex);
-					if (listIndex == list.size() - 1) {
-						if (value == null) {
-							if (printLastColumnSpaces) {
-								System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-							} else {
-								System.out.print("null");
-							}
-						} else {
-							if (printLastColumnSpaces) {
-								System.out.print(StringUtil.getRightPaddedString(value.toString(), maxLen, ' '));
-							} else {
-								System.out.print(value.toString());
-							}
-						}
-
-					} else {
-						if (value == null) {
-							System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-						} else {
-							System.out.print(StringUtil.getRightPaddedString(value.toString(), maxLen, ' '));
-						}
-						System.out.print("  ");
-					}
-
-					listIndex++;
-				} catch (Exception ex) {
-				}
-			}
-		}
-	}
-
-	public static void printList(List resultList)
-	{
-		ArrayList maxLenList = new ArrayList();
-		Object nonNullObject = null;
-		for (int i = 0; i < resultList.size(); i++) {
-			Object object = resultList.get(i);
-			if (object != null) {
-				nonNullObject = object;
-			}
-			computeMaxLengths(maxLenList, object, true); // TODO: true?
-		}
-		if (nonNullObject == null) {
-			return;
-		}
-
-		int rowMax = String.valueOf(resultList.size()).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(maxLenList, nonNullObject, rowMax);
-		for (int i = 0; i < resultList.size(); i++) {
-			Object object = resultList.get(i);
-			System.out.print(StringUtil.getRightPaddedString((i + 1) + "", rowMax, ' '));
-			System.out.print("  ");
-			printObject(maxLenList, object, false);
-			System.out.println();
-		}
-	}
-	
-	public static int printList(List list, int startIndex, int startRowNum, int rowCount, int actualSize, List keyList) throws Exception
-	{
-		if (list == null || list.size() == 0) {
-			return 0;
-		}
-		
-		if (isTableFormat() == false) {
-			return SimplePrintUtil.printList(list, startIndex, startRowNum, rowCount, actualSize, keyList);
-		}
-
-		// Determine max column lengths
-		HashSet objectNameSet = new HashSet();
-		ArrayList maxLenList = new ArrayList();
-		int count = 0;
-		Object object = null;
-		for (Iterator itr = list.iterator(); count < rowCount && itr.hasNext(); count++) {
-			object = itr.next();
-			computeMaxLengths(maxLenList, object, true);
-			objectNameSet.add(object.getClass().getName());
-		}
-		
-		if (object == null) {
-			return 0;
-		}
-
-		// Print headers including row column
-		int rowMax = String.valueOf(startRowNum + rowCount - 1).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printHeaders(maxLenList, object, rowMax);
-
-		// Print keys and values
-//		int row = 1;
-		count = 0;
-		int row = startRowNum;
-		int lastRow = startRowNum + rowCount - 1;
-		for (Iterator itr = list.iterator(); count < rowCount && itr.hasNext(); count++) {
-
-			System.out.print(StringUtil.getRightPaddedString(row + "", rowMax, ' '));
-			System.out.print("  ");
-
-			object = itr.next();
-			if (keyList != null) {
-				keyList.add(object);
-			}
-			printObject(maxLenList, object, true);
-			System.out.println();
-			row++;
-		}
-		System.out.println();
-		System.out.println(" Fetch size: " + rowCount);
-		System.out.println("   Returned: " + (row-1) + "/" + actualSize);
-		for (Object keyName : objectNameSet) {
-	    System.out.println("      Class: " + keyName);
-		}
-		return count;
-	}
-	
-	private static void computeMappableMaxLengths(List list, Mappable mappable)
-	{
-		computeMappableMaxLengths(list, mappable, null);
-	}
-	
-	private static void computeMappableMaxLengths(List list, Mappable mappable, List<String>keyList)
-	{
-		String name;
-		Object value;
-		int listIndex = 0;
-		if (keyList == null) {
-			keyList = new ArrayList(mappable.getKeys());
-			Collections.sort(keyList);
-		}
-		for (int i = 0; i < keyList.size(); i++) {
-			name = keyList.get(i);
-			value = mappable.getValue(name);
-			value = getPrintableValue(value);
-			Integer len;
-			if (listIndex >= list.size()) {
-				len = name.length();
-				list.add(len);
-			} else {
-				len = (Integer) list.get(listIndex);
-			}
-			if (value == null) {
-				if (len.intValue() < 4) {
-					len = 4;
-				}
-			} else {
-				int valueLen = value.toString().length();
-				if (len.intValue() < valueLen) {
-					len = valueLen;
-				}
-			}
-			list.set(listIndex, len);
-			listIndex++;
-		}
-	}
-	
-	private static void printMappableHeaders(List list, Mappable mappable, int rowMaxLen)
-	{
-		printMappableHeaders(list, mappable, rowMaxLen, null);
-	}
-	
-	private static void printMappableHeaders(List list, Mappable mappable, int rowMaxLen, List<String>keyList)
-	{
-		System.out.print(StringUtil.getRightPaddedString("Row", rowMaxLen, ' '));
-		System.out.print("  ");
-		printMappableTopHeaders(list, mappable, false, keyList);
-		System.out.println();
-		if (rowMaxLen < 3) {
-			rowMaxLen = 3;
-		}
-		System.out.print(StringUtil.getRightPaddedString("", rowMaxLen, '-'));
-		System.out.print("  ");
-		printMappableBottomHeaders(list, mappable, false, keyList);
-		System.out.println();
-	}
-	
-//FindBugs - private method never called
-//	private static void printMappableTopHeaders(List list, Mappable mappable, 
-//			boolean printLastColumnSpaces)
-//	{
-//		printMappableTopHeaders(list, mappable, printLastColumnSpaces, null);
-//	}
-	
-	private static void printMappableTopHeaders(List list, Mappable mappable, 
-			boolean printLastColumnSpaces, List<String>keyList)
-	{
-		int listIndex = 0;
-		if (keyList == null) {
-			keyList = new ArrayList(mappable.getKeys());
-			Collections.sort(keyList);
-		}
-		for (int i = 0; i < keyList.size(); i++) {
-			String header = keyList.get(i);
-			int maxLen = (Integer) list.get(listIndex);
-			if (listIndex == list.size() - 1) {
-				if (printLastColumnSpaces) {
-					System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-				} else {
-					System.out.print(header);
-				}
-			} else {
-				System.out.print(StringUtil.getRightPaddedString(header, maxLen, ' '));
-				System.out.print("  ");
-			}
-
-			listIndex++;
-		}
-	}
-	
-//FindBugs - private method never called
-//	private static void printMappableBottomHeaders(List list, Mappable mappable, boolean printLastColumnSpaces)
-//	{
-//		printMappableBottomHeaders(list, mappable, printLastColumnSpaces, null);
-//	}
-	
-	private static void printMappableBottomHeaders(List list, Mappable mappable, boolean printLastColumnSpaces, List<String> keyList)
-	{
-		int listIndex = 0;
-		if (keyList == null) {
-			keyList = new ArrayList(mappable.getKeys());
-			Collections.sort(keyList);
-		}
-		for (int i = 0; i < keyList.size(); i++) {
-			String header = keyList.get(i);
-			int maxLen = (Integer) list.get(listIndex);
-			if (listIndex == list.size() - 1) {
-				if (printLastColumnSpaces) {
-					System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header
-							.length(), '-'), maxLen, ' '));
-				} else {
-					System.out.print(StringUtil.getRightPaddedString("", header.length(), '-'));
-				}
-			} else {
-				System.out.print(StringUtil.getRightPaddedString(StringUtil.getRightPaddedString("", header
-						.length(), '-'), maxLen, ' '));
-				System.out.print("  ");
-			}
-			listIndex++;
-		}
-	}
-	
-	private static void printMappable(List list, Mappable mappable, boolean printLastColumnSpaces)
-	{
-		printMappable(list, mappable, printLastColumnSpaces, null);
-	}
-	
-	private static void printMappable(List list, Mappable mappable, boolean printLastColumnSpaces, List<String>keyList)
-	{
-		int listIndex = 0;
-		if (keyList == null) {
-			keyList = new ArrayList(mappable.getKeys());
-			Collections.sort(keyList);
-		}
-		for (int i = 0; i < keyList.size(); i++) {
-			String name = keyList.get(i);
-			Object value = mappable.getValue(name);
-			value = getPrintableValue(value);
-
-			int maxLen = (Integer) list.get(listIndex);
-			if (listIndex == list.size() - 1) {
-				if (value == null) {
-					if (printLastColumnSpaces) {
-						System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-					} else {
-						System.out.print("null");
-					}
-				} else {
-					if (printLastColumnSpaces) {
-						System.out.print(StringUtil.getRightPaddedString(value.toString(), maxLen, ' '));
-					} else {
-						System.out.print(value.toString());
-					}
-				}
-
-			} else {
-				if (value == null) {
-					System.out.print(StringUtil.getRightPaddedString("null", maxLen, ' '));
-				} else {
-					System.out.print(StringUtil.getRightPaddedString(value.toString(), maxLen, ' '));
-				}
-				System.out.print("  ");
-			}
-
-			listIndex++;
-		}
-	}
-	
-	public static void printMappableList(List<Mappable> resultList)
-	{
-		printMappableList(resultList, null);
-	}
-	
-	public static void printMappableList(List<Mappable> resultList, String sortByKey)
-	{
-		List<Mappable> list;
-		if (sortByKey != null) {
-			TreeMap map = new TreeMap();
-			for (int i = 0; i < resultList.size(); i++) {
-				Mappable mappable = resultList.get(i);
-				map.put(mappable.getValue(sortByKey), mappable);
-			}
-			list = new ArrayList(map.values());
-		} else {
-			list = resultList;
-		}
-		
-		if (isTableFormat() == false) {
-			SimplePrintUtil.printMappableList(list);
-			return;
-		}
-		
-		ArrayList maxLenList = new ArrayList();
-		Mappable nonNullMappable = null;
-		for (int i = 0; i < list.size(); i++) {
-			Mappable mappable = list.get(i);
-			if (mappable != null) {
-				nonNullMappable = mappable;
-			}
-			computeMappableMaxLengths(maxLenList, mappable);
-		}
-		if (nonNullMappable == null) {
-			return;
-		}
-
-		int rowMax = String.valueOf(list.size()).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printMappableHeaders(maxLenList, nonNullMappable, rowMax);
-		for (int i = 0; i < list.size(); i++) {
-			Mappable mappable = list.get(i);
-			System.out.print(StringUtil.getRightPaddedString((i + 1) + "", rowMax, ' '));
-			System.out.print("  ");
-			printMappable(maxLenList, mappable, false);
-			System.out.println();
-		}
-	}
-	
-	public static void printMappableList(List<Mappable> resultList, String sortByKey, List<String>keyList)
-	{
-		List<Mappable> list;
-		if (sortByKey != null) {
-			TreeMap map = new TreeMap();
-			for (int i = 0; i < resultList.size(); i++) {
-				Mappable mappable = resultList.get(i);
-				map.put(mappable.getValue(sortByKey), mappable);
-			}
-			list = new ArrayList(map.values());
-		} else {
-			list = resultList;
-		}
-		
-		if (isTableFormat() == false) {
-			SimplePrintUtil.printMappableList(list);
-			return;
-		}
-		
-		ArrayList maxLenList = new ArrayList();
-		Mappable nonNullMappable = null;
-		for (int i = 0; i < list.size(); i++) {
-			Mappable mappable = list.get(i);
-			if (mappable != null) {
-				nonNullMappable = mappable;
-			}
-			computeMappableMaxLengths(maxLenList, mappable, keyList);
-		}
-		if (nonNullMappable == null) {
-			return;
-		}
-
-		int rowMax = String.valueOf(list.size()).length();
-		if (rowMax < 3) {
-			rowMax = 3;
-		}
-		printMappableHeaders(maxLenList, nonNullMappable, rowMax, keyList);
-		for (int i = 0; i < list.size(); i++) {
-			Mappable mappable = list.get(i);
-			System.out.print(StringUtil.getRightPaddedString((i + 1) + "", rowMax, ' '));
-			System.out.print("  ");
-			printMappable(maxLenList, mappable, false, keyList);
-			System.out.println();
-		}
-	}
-	
-	
-	private static Object getPrintableValue(Object value)
-	{
-		if (value instanceof Byte) {
-			value = ((Byte) value).toString();
-		} else if (value instanceof byte[]) {
-			value = "[B " + ((byte[])value).length;
-		} else if (value instanceof boolean[]) {
-			value = "[Z " + ((boolean[])value).length;
-		} else if (value instanceof short[]) {
-			value = "[S " + ((short[])value).length;
-		} else if (value instanceof int[]) {
-			value = "[I " + ((int[])value).length;
-		} else if (value instanceof long[]) {
-			value = "[J " + ((long[])value).length;
-		} else if (value instanceof float[]) {
-			value = "[F " + ((float[])value).length;
-		} else if (value instanceof double[]) {
-			value = "[D " + ((double[])value).length;
-		}
-		return value;
-	}
-}