18 package org.turro.elephant.impl.context;
20 import java.io.BufferedReader;
21 import java.io.IOException;
22 import java.io.PrintWriter;
23 import java.util.List;
24 import java.util.logging.Level;
25 import java.util.logging.Logger;
26 import javax.servlet.ServletException;
27 import org.turro.elephant.context.ElephantContext;
28 import org.turro.elephant.context.IElement;
29 import org.turro.elephant.impl.abstracts.AbstractElement;
30 import org.turro.elephant.impl.util.FileUtil;
31 import org.turro.elephant.layout.IManageable;
32 import org.turro.elephant.layout.IRenderable;
33 import org.turro.elephant.search.FoundList;
34 import org.turro.elephant.search.ISearchable;
35 import org.turro.elephant.search.SearchFormatter;
36 import org.turro.elephant.security.IDefendable;
37 import org.turro.elephant.web.context.WebResources;
38 import org.turro.i18n.I_;
54 public void loadData() throws ServletException, IOException {
61 return "<div class='default-element'>";
74 for(
int i = res.length -1 ; i >= 0; i--) {
91 if(!lang.equals(preferredLocale)) {
94 if(!names.isEmpty())
break;
98 return names.toArray(
new String[0]);
110 for(
int i = res.length -1 ; i >= 0; i--) {
118 while((line = br.readLine()) !=
null) {
133 }
catch (IOException ex) {
static String getRealPath(String path)
static String getRootResourcePath()
static String logMsg(String msg)
FoundList search(String value, boolean ignoreCase)
String[] getLocaleResourceNames(String preferredLocale)
static BufferedReader getBufferedFile(String folder, String file)
void addItem(String id, String link, String image, String title, String value, double similarity, String query)
Set< String > getDefaultLocales()
WebResources getResources()
List< String > globalResourceNames()
List< String > resourceNamesForLang(String lang)
static I18nApiWrapper api()
void includeContent(String path)
IConstructor getConstructor()
String getElementFolder()