This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mindstorm.i18n.entity; | |
import java.util.List; | |
import javax.jdo.annotations.IdGeneratorStrategy; | |
import javax.jdo.annotations.PersistenceCapable; | |
import javax.jdo.annotations.Persistent; | |
import javax.jdo.annotations.PrimaryKey; | |
import com.google.appengine.api.datastore.Key; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mindstorm.i18n.dao; | |
import java.util.List; | |
import javax.jdo.PersistenceManager; | |
import javax.jdo.Query; | |
import com.google.appengine.api.datastore.Key; | |
import com.google.appengine.api.datastore.KeyFactory; | |
import com.mindstorm.i18n.entity.Tips; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mindstorm.i18n.services; | |
import java.io.IOException; | |
import java.util.List; | |
import java.util.logging.Logger; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mindstorm.i18n.services; | |
import java.io.IOException; | |
import java.util.logging.Logger; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mindstorm.i18n.util; | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.logging.Logger; | |
import com.mindstorm.i18n.dao.TipsDAO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Employees" : [ | |
{ | |
"userId":"rirani", | |
"jobTitleName":"Developer", | |
"firstName":"Romin", | |
"lastName":"Irani", | |
"preferredFullName":"Romin Irani", | |
"employeeCode":"E1", | |
"region":"CA", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A Java Servlet, mapped to '/AddEmployee' endpoint and used by the addemployee.jsp page to add sample employees to the | |
* Index. | |
*/ | |
package com.mindstorm.employeesdirectory.servlets; | |
import java.io.IOException; | |
import javax.servlet.http.*; | |
import com.mindstorm.employeesdirectory.utils.ImportEmployeesIntoIndex; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This utility is used to load sample contacts in the Google App Engine Search Index. It will load the records that are present | |
* in the file defined in the Constants.SAMPLE_CONTACTS_DATA_FILE property. The loadData() method is invoked via the | |
* '/importindex' endpoint. | |
*/ | |
package com.mindstorm.employeesdirectory.utils; | |
import java.io.BufferedReader; | |
import java.io.FileInputStream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This class handles all the interaction with Google AppEngine Search API. | |
* Currently, it has methods for: | |
* 1. Index a document i.e. add a document to the existing index | |
* 2. Retrieve a Document from the Index, provided its Document Id (In our case it is the user id) | |
* 3. Remove a Document from the Index, provided its Document Id | |
* 4. Retrieve a List of Documents from the Index that match the Search Term. | |
*/ | |
package com.mindstorm.employeesdirectory.search; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> | |
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | |
<%@ page isELIgnored="false" %> | |
<% | |
String searchText = null; | |
//Read the searchText Request Parameter | |
if (request.getParameter("searchText") != null) { | |
searchText = (String) request.getParameter("searchText"); | |
System.out.println("Search Text : " + searchText); |