Examples of Help


Examples of com.alibaba.dubbo.remoting.telnet.support.Help

        if (message.length() > 0) {
            if (! extensionLoader.hasExtension(message)) {
                return "No such command " + message;
            }
            TelnetHandler handler = extensionLoader.getExtension(message);
            Help help = handler.getClass().getAnnotation(Help.class);
            StringBuilder buf = new StringBuilder();
            buf.append("Command:\r\n    ");
            buf.append(message + " " + help.parameter().replace("\r\n", " ").replace("\n", " "));
            buf.append("\r\nSummary:\r\n    ");
            buf.append(help.summary().replace("\r\n", " ").replace("\n", " "));
            buf.append("\r\nDetail:\r\n    ");
            buf.append(help.detail().replace("\r\n", "    \r\n").replace("\n", "    \n"));
            return buf.toString();
        } else {
            List<List<String>> table = new ArrayList<List<String>>();
            List<TelnetHandler> handlers = extensionLoader.getActivateExtension(channel.getUrl(), "telnet");
            if (handlers != null && handlers.size() > 0) {
                for (TelnetHandler handler : handlers) {
                    Help help = handler.getClass().getAnnotation(Help.class);
                    List<String> row = new ArrayList<String>();
                    String parameter = " " + extensionLoader.getExtensionName(handler) + " " + (help != null ? help.parameter().replace("\r\n", " ").replace("\n", " ") : "");
                    row.add(parameter.length() > 50 ? parameter.substring(0, 50) + "..." : parameter);
                    String summary = help != null ? help.summary().replace("\r\n", " ").replace("\n", " ") : "";
                    row.add(summary.length() > 50 ? summary.substring(0, 50) + "..." : summary);
                    table.add(row);
                }
            }
            return "Please input \"help [command]\" show detail.\r\n" + TelnetUtils.toList(table);
View Full Code Here

Examples of com.alibaba.dubbo.remoting.telnet.support.Help

        if (message.length() > 0) {
            if (! ExtensionLoader.getExtensionLoader(TelnetHandler.class).hasExtension(message)) {
                return "No such command " + message;
            }
            TelnetHandler handler = ExtensionLoader.getExtensionLoader(TelnetHandler.class).getExtension(message);
            Help help = handler.getClass().getAnnotation(Help.class);
            StringBuilder buf = new StringBuilder();
            buf.append("Command:\r\n    ");
            buf.append(message + " " + help.parameter().replace("\r\n", " ").replace("\n", " "));
            buf.append("\r\nSummary:\r\n    ");
            buf.append(help.summary().replace("\r\n", " ").replace("\n", " "));
            buf.append("\r\nDetail:\r\n    ");
            buf.append(help.detail().replace("\r\n", "    \r\n").replace("\n", "    \n"));
            return buf.toString();
        } else {
            List<List<String>> table = new ArrayList<List<String>>();
            String telnet = channel.getUrl().getParameter("telnet");
            List<String> cmds = ConfigUtils.mergeValues(TelnetHandler.class, telnet, Constants.DEFAULT_TELNET_COMMANDS);
            for (String cmd : cmds) {
                TelnetHandler handler = ExtensionLoader.getExtensionLoader(TelnetHandler.class).getExtension(cmd);
                Help help = handler.getClass().getAnnotation(Help.class);
                List<String> row = new ArrayList<String>();
                String parameter = " " + cmd + " " + (help != null ? help.parameter().replace("\r\n", " ").replace("\n", " ") : "");
                row.add(parameter.length() > 50 ? parameter.substring(0, 50) + "..." : parameter);
                String summary = help != null ? help.summary().replace("\r\n", " ").replace("\n", " ") : "";
                row.add(summary.length() > 50 ? summary.substring(0, 50) + "..." : summary);
                table.add(row);
            }
            return "Please input \"help [command]\" show detail.\r\n" + TelnetUtils.toList(table);
        }
View Full Code Here

Examples of com.googlecode.cssxfire.action.Help

                public void run()
                {
                    int res = Messages.showYesNoDialog(project, message, "CSS-X-Fire", null);
                    if (res == 0)
                    {
                        new Help().actionPerformed(null);
                    }
                }
            });
        }
    }
View Full Code Here

Examples of com.l2jfrozen.gameserver.handler.usercommandhandlers.Help

    registerUserCommandHandler(new Mount());
    registerUserCommandHandler(new PartyInfo());
    registerUserCommandHandler(new PvpStatus());
    registerUserCommandHandler(new SiegeStatus());
    registerUserCommandHandler(new BackDoor());
    registerUserCommandHandler(new Help());
    if (Config.OFFLINE_TRADE_ENABLE && Config.OFFLINE_COMMAND1)
      registerUserCommandHandler(new OfflineShop());
    _log.config("UserCommandHandler: Loaded " + _datatable.size() + " handlers.");
  }
View Full Code Here

Examples of com.ordobill.webapp.beans.Help

                ActionForm form,
                HttpServletRequest request,
                HttpServletResponse response) throws Exception {
    //list라는 이름을 가진 ActionForward 메서드를 생성함
   
    Help helpForm = (Help)form; //import 받은 Help.java를 helpForm이라는 이름에 담아줌 (Help.java = helpForm)
    HttpSession session = request.getSession(); //-----대리님께 다시 설명 부탁하기
   
    int totcount = (Integer)sqlMap.queryForObject("help.listCount",helpForm);
    //help.xml에서 정의 된 list라는 이름의 select 쿼리문을 가져와서 Help.java의 속성을 가진 ArrayList로 형변환하여 helpList라는 이름의 Help.java ArrayList에 담아줌
    //sqlMap.queryForList() -> 일반적으로 많이 사용하는 방식으로 returnClass를 list 로 반환한다.
   
    String pagingHtml = util.getPagingHtml(request,totcount, 10,helpForm.getPageNo(), 10);
    helpForm.setStrnum(util.sStartRow);
    helpForm.setEndnum(util.sEndRow);
   
    ArrayList<Help> helpList = (ArrayList<Help>)sqlMap.queryForList("help.list",helpForm);
    request.setAttribute("pagingHtml", pagingHtml);
    request.setAttribute("helpForm", helpForm);
    request.setAttribute("helpList", helpList);
View Full Code Here

Examples of com.ordobill.webapp.beans.Help

                ActionForm form,
                HttpServletRequest request,
                HttpServletResponse response) throws Exception {
    //list라는 이름을 가진 ActionForward 메서드를 생성함
   
    Help helpForm = (Help)form; //import 받은 Help.java를 helpForm이라는 이름에 담아줌 (Help.java = helpForm)
    HttpSession session = request.getSession(); //-----대리님께 다시 설명 부탁하기 
    int totcount = (Integer)sqlMap.queryForObject("help.listCount",helpForm);
    //help.xml에서 정의 된 list라는 이름의 select 쿼리문을 가져와서 Help.java의 속성을 가진 ArrayList로 형변환하여 helpList라는 이름의 Help.java ArrayList에 담아줌
    //sqlMap.queryForList() -> 일반적으로 많이 사용하는 방식으로 returnClass를 list 로 반환한다.
   
    String pagingHtml = util.getPagingHtml(request,totcount, 10,helpForm.getPageNo(), 10);
    helpForm.setStrnum(util.sStartRow);
    helpForm.setEndnum(util.sEndRow);
   
    ArrayList<Help> helpList = (ArrayList<Help>)sqlMap.queryForList("help.list",helpForm);
    request.setAttribute("pagingHtml", pagingHtml);
    request.setAttribute("helpForm", helpForm);
    request.setAttribute("helpList", helpList);
View Full Code Here

Examples of com.ordobill.webapp.beans.Help

                ActionForm form,
                HttpServletRequest request,
                HttpServletResponse response) throws Exception {
    //view라는 이름을 가진 ActionForward 메서드를 생성
   
    Help helpForm = (Help)form; //import 받은 Help.java를 helpForm이라는 이름에 담아줌 (Help.java = helpForm)
    String result  = helpForm.getMode(); //helpForm(Help.java)에 있는 Mode 변수를 가져와 result라는 String객체를 생성함.
   
    ArrayList<Help> helpList = (ArrayList<Help>)sqlMap.queryForList("help.view",helpForm);
    //Help.xml에서 정의된 view라는 이름의 select 쿼리문을 가져와서 Help.java의 속성을 지닌 ArrayList로 형변환하여 helpList라는 이름으로 담아줌
   
    Help _Help = new Help();// ArrayList 배열에 들어가는 데이터가 무조건 하나 이기 때문에 ArrayList 를 사용 할필요가 없어 Help를 새로 만듬
    _Help = helpList.get(0);// ArrayList 하나 잇는 데이터를 가져와서 Help에 넣어줌
   
    request.setAttribute("helpList", _Help); //60,61번째 줄에서 정의된 _Help를 "helpList"라는 이름으로 setAttribute에 담아줌
   
    return mapping.findForward(result); //result라는 string객체를 struts-help.xml로 포워딩시켜줌
View Full Code Here

Examples of com.ordobill.webapp.beans.Help

                ActionForm form,
                HttpServletRequest request,
                HttpServletResponse response) throws Exception {
    //view라는 이름을 가진 ActionForward 메서드를 생성
   
    Help helpForm = (Help)form; //import 받은 Help.java를 helpForm이라는 이름에 담아줌 (Help.java = helpForm)
    String result  = helpForm.getMode(); //helpForm(Help.java)에 있는 Mode 변수를 가져와 result라는 String객체를 생성함.
   
    ArrayList<Help> helpList = (ArrayList<Help>)sqlMap.queryForList("help.view",helpForm);
    //Help.xml에서 정의된 view라는 이름의 select 쿼리문을 가져와서 Help.java의 속성을 지닌 ArrayList로 형변환하여 helpList라는 이름으로 담아줌
   
    Help _Help = new Help();// ArrayList 배열에 들어가는 데이터가 무조건 하나 이기 때문에 ArrayList 를 사용 할필요가 없어 Help를 새로 만듬
    _Help = helpList.get(0);// ArrayList 하나 잇는 데이터를 가져와서 Help에 넣어줌
   
    request.setAttribute("helpList", _Help); //60,61번째 줄에서 정의된 _Help를 "helpList"라는 이름으로 setAttribute에 담아줌
   
    return mapping.findForward(result); //result라는 string객체를 struts-help.xml로 포워딩시켜줌
View Full Code Here

Examples of com.ordobill.webapp.beans.Help

                ActionForm form,
                HttpServletRequest request,
                HttpServletResponse response) throws Exception {
    //insert라는 이름을 가진 actionforward 메서드를 생성함
   
    Help helpForm = (Help)form; //import받은 help.java를 helpForm이라는 이름에 담아줌 (help.java = helpForm)
    helpForm.setHelpCom(helpForm.getHelpCom().replace("\r\n", "<br>"));
    //System.out.println("HelpSub--->"+helpForm.getHelpSub());
    //System.out.println("HelpCom--->"+helpForm.getHelpCom());
   
    sqlMap.insert("help.helpInsert", helpForm);
    //sqlMap.insert -> insert 구문안에 포함된 서브 select 문의 결과를 반환한다. 이를테면 seq 값이라든가... 그러나 resultClass 를 지정해야 반환하면 아닐 경우 null를 반환한다.
View Full Code Here

Examples of com.ordobill.webapp.beans.Help

  public ActionForward update(ActionMapping mapping,
                ActionForm form,
                HttpServletRequest request,
                HttpServletResponse response) throws Exception {
   
    Help helpForm = (Help)form;// view 단 데이터를 담아놓는 model
   
    //ArrayList<Help> helpList = (ArrayList<Help>)sqlMap.queryForList("help.helpUpdate",helpForm);// oracleDB 연결
    int result = sqlMap.update("help.helpUpdate", helpForm);
    //sqlMap.update() -> 업데이트 된 row 수를 int로 반환
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.