_categories = new ArrayList<Category>();
_captchaPublicKey = "";
_captchaPrivateKey = "";
_analyticsJS = "";
Database db = ExtLibUtil.getCurrentDatabase();
View viewTypesAll = null;
View viewCategoriesAll = null;
View viewConfigAll = null;
ViewNavigator viewNavigatorTypes = null;
ViewNavigator viewNavigatorConfig = null;
ViewNavigator viewNavigatorCategories = null;
try {
viewTypesAll = db.getView("TypesAll");
viewTypesAll.setAutoUpdate(false);
viewNavigatorTypes = viewTypesAll.createViewNav();
ViewEntry tmpEntry;
ViewEntry entry = viewNavigatorTypes.getFirst();
while (entry != null) {
if (entry.isCategory() == false) {
entry.setPreferJavaDates(true);
List<Object> columnValues = entry.getColumnValues();
List<String> moderators = new Vector<String>();
Document doc = entry.getDocument();
Item moderatorsItem = doc.getFirstItem("TModerators");
if (moderatorsItem != null) moderators = (Vector<String>)moderatorsItem.getValues();
Type type = new Type((String)columnValues.get(2),
(String)columnValues.get(3),
moderators,
(String)columnValues.get(4),
(String)columnValues.get(0),
(String)columnValues.get(5));
_types.add(type);
}
tmpEntry = viewNavigatorTypes.getNext();
entry.recycle();
entry = tmpEntry;
}
viewCategoriesAll = db.getView("CategoriesAll");
viewCategoriesAll.setAutoUpdate(false);
viewNavigatorCategories = viewCategoriesAll.createViewNav();
entry = viewNavigatorCategories.getFirst();
while (entry != null) {
if (entry.isCategory() == false) {
entry.setPreferJavaDates(true);
List<Object> columnValues = entry.getColumnValues();
Category category = new Category((String)columnValues.get(1),
(String)columnValues.get(2),
(String)columnValues.get(3));
_categories.add(category);
}
tmpEntry = viewNavigatorCategories.getNext();
entry.recycle();
entry = tmpEntry;
}
viewConfigAll = db.getView("ConfigAll");
viewConfigAll.setAutoUpdate(false);
viewNavigatorConfig = viewConfigAll.createViewNav();
entry = viewNavigatorConfig.getFirst();
if (entry != null) {
Document doc = entry.getDocument();