Package org.cipres.treebase.domain.admin

Examples of org.cipres.treebase.domain.admin.Help


  public void setHelp(Help help) {
    helpObject = help;
  }

  public void setId(Long id) {
    Help theHelpObject = getHelpService().findByID(id);
    if (theHelpObject == null) {
      theHelpObject = new Help();
      getHelpService().save(theHelpObject);
    } else {
      setHelp(theHelpObject);
    }
  }
View Full Code Here


      setHelp(theHelpObject);
    }
  }

  public void setTag(String tag) {
    Help theHelpObject = getHelpService().findByTag(tag);
    if (theHelpObject == null) {
      theHelpObject = getHelpService().createHelp(tag);
    }
    setHelp(theHelpObject);
  }
View Full Code Here

  public void testDomainHome() {
    assertNotNull(getFixture().getDomainHome());
  }
 
  public void testFindByTag() {
    Help h=null;
    //this line will cause null pointer,
    //since junit TestCase cannot inject a hibernate session  
    //h = getFixture().findByTag("there is no such tag");
    assertNull(h);
  }
View Full Code Here

  public Help findByTag(String tag) {
    return getHelpHome().findByTag(tag);
  }

  public Help unknownHelp() {
    Help unknownHelp = new Help();
    unknownHelp.setId(0L);
    return unknownHelp;
  }
View Full Code Here

     
    HelpControllerAction fbo = (HelpControllerAction) command;
    String helpTag = request.getParameter("helpTag");
    String newText = request.getParameter("newHelpText");
   
    Help newHelp = getHelpService().findByTag(helpTag);
    if (newHelp == null) {
      newHelp = getHelpService().createHelp(helpTag);
    }

    fbo.setHelp(newHelp);
 
    LOGGER.debug("Setting new help text and saving object");
    getHelpService().save(newHelp);
    newHelp.setHelpText(newText);
    getHelpService().update(newHelp);
   
    return new ModelAndView(getSuccessView(), getCommandName(), fbo);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.cipres.treebase.domain.admin.HelpHome#makeHelp(java.lang.String)
   */
  public Help createHelp(String helpTag) {
    Help newHelp = new Help(helpTag);
    this.save(newHelp);
    return newHelp;
  }
View Full Code Here

TOP

Related Classes of org.cipres.treebase.domain.admin.Help

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.