Package net.sf.regain.util.io

Examples of net.sf.regain.util.io.Localizer.msg()


    }

    if (sortingOptions == null) {
      // create default option relevance
      Localizer localizer = new Localizer(request.getResourceBaseUrl(), "msg", request.getLocale());
      String relevText = localizer.msg("relevance", "relevance");
      sortingOptions = new SortingOption[]{new SortingOption(relevText, "relevance", "desc", 1)};
    }

    if (sortingOptions != null) {
      String order = request.getParameter("order");
View Full Code Here


      showSortFieldContent = config.getShowSortFieldContent();
    }
    if (sortContent != null && showSortFieldContent) {
      Localizer localizer = new Localizer(request.getResourceBaseUrl(), "msg", request.getLocale());
      response.print(" ");
      response.print(localizer.msg("sortContent", "sort field content"));
      response.print(": ");
      response.print(sortContent);
    }
  }
}
View Full Code Here

    if (styleSheetClass != null) {
      response.print(" class=\"" + styleSheetClass + "\"");
    }
    response.print("/>");
    response.print("<button type=\"button\" onClick=\"addToList('" + name + "')\">"
        + localizer.msg("add", "Add") + "</button>");
    response.print("<button type=\"button\" onClick=\"removeFromList('" + name + "')\">"
        + localizer.msg("remove", "Remove") + "</button>");
  }

}
View Full Code Here

    }
    response.print("/>");
    response.print("<button type=\"button\" onClick=\"addToList('" + name + "')\">"
        + localizer.msg("add", "Add") + "</button>");
    response.print("<button type=\"button\" onClick=\"removeFromList('" + name + "')\">"
        + localizer.msg("remove", "Remove") + "</button>");
  }

}
View Full Code Here

    String currValue = (String) request.getContextAttribute("settings.interval");
   
    response.print("<select name=\"interval\">");
    for (int i = 0; i < CHOICES.length; i++) {
      String value = CHOICES[i];
      String name  = localizer.msg("choice." + value, value);
     
      response.print("<option value=\"" + value + "\"");
      if (value.equals(currValue)) {
        response.print(" selected=\"selected\"");
      }
View Full Code Here

      if (errorList.isEmpty()) {
        // There were no errors -> Save the values
        saveSettings(interval, dirlist, dirblacklist, sitelist, siteblacklist, imaplist, port);
        DesktopToolkit.checkWebserver();
        response.print(localizer.msg("settingsSaved", "Your settings where saved!"));
//        response.print("Ihre Einstellungen wurden gespeichert!");
      } else {
        // There were errors -> Show them
        response.print(localizer.msg("settingsContainsError", "The following errors where detected:<ul>"));
//        response.print("Leider enth&auml;lt Ihre Eingabe noch Fehler:<ul>");
View Full Code Here

        DesktopToolkit.checkWebserver();
        response.print(localizer.msg("settingsSaved", "Your settings where saved!"));
//        response.print("Ihre Einstellungen wurden gespeichert!");
      } else {
        // There were errors -> Show them
        response.print(localizer.msg("settingsContainsError", "The following errors where detected:<ul>"));
//        response.print("Leider enth&auml;lt Ihre Eingabe noch Fehler:<ul>");
        for (int i = 0; i < errorList.size(); i++) {
          response.print("<li>" + errorList.get(i) + "</li>");
        }
        response.print("</ul>");
View Full Code Here

      // Get the document count
      IndexSearcherManager manager = IndexSearcherManager.getInstance(config.getDirectory());
      int docCount = manager.getDocumentCount();
     
      // Print the results
      response.print(localizer.msg("indexInfo", "Last update: {0}<br/>Size: {1}<br/>Document count: {2}",
          lastUpdate, sizeAsString, new Integer(docCount)));
    } else {
      response.print(localizer.msg("noIndex", "There was no search index created so far."));
    }
  }
View Full Code Here

     
      // Print the results
      response.print(localizer.msg("indexInfo", "Last update: {0}<br/>Size: {1}<br/>Document count: {2}",
          lastUpdate, sizeAsString, new Integer(docCount)));
    } else {
      response.print(localizer.msg("noIndex", "There was no search index created so far."));
    }
  }

}
View Full Code Here

  {
    Localizer localizer = mMultiLocalizer.getLocalizer(request.getLocale());

    Crawler crawler = IndexUpdateManager.getInstance().getCurrentCrawler();
    if (crawler == null) {
      response.print(localizer.msg("noIndexUpdate", "Currently is no index update running."));
    } else {
      // Get the IndexConfig
      IndexConfig[] configArr = SearchToolkit.getIndexConfigArr(request);
      if (configArr.length > 1) {
        throw new RegainException("The indexupdate tag can only be used for one index!");
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.