Package com.google.api.gbase.client

Examples of com.google.api.gbase.client.GoogleBaseService


  /** Shows the page for inserting or updating a recipe or deletes a recipe. */
  @Override
  protected void doGet(HttpServletRequest request,
                       HttpServletResponse response)
      throws ServletException, IOException {
    GoogleBaseService service = (GoogleBaseService) request.getAttribute(
        AuthenticationFilter.SERVICE_ATTRIBUTE);
    String id = request.getParameter(RecipeUtil.ID_PARAMETER);
    try {
      if (isDelete()) {
          recipeDelete(service, id);
          listOwnRecipes(response);
      } else {
        // The recipe that will be used on the edit page
        // for inserting or updating.
        Recipe recipe = null;
        if (isAdd()) {
          recipe = new Recipe();
        } else if (isUpdate()) {
          URL entryUrl = urlFactory.getItemsEntryURL(id);
          GoogleBaseEntry entry = service.getEntry(entryUrl);
          recipe = new Recipe(entry);
        }
        if (recipe != null) {
          // Ready to add or update
          editRecipe(request, response, recipe, null);
View Full Code Here

TOP

Related Classes of com.google.api.gbase.client.GoogleBaseService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.