%@ taglib uri="edicos.tld" prefix="edicos" %>
<%@ taglib uri="/edicos/tld/biinternet" prefix="bii" %>
<%@ page
language="java"
contentType="text/html; charset=UTF-8"
import="de.gauss.base.exception.ExpandableException,
de.gauss.lang.StringValue,
de.gauss.lang.DateValue,
de.gauss.lang.IntegerValue,
de.gauss.lang.Sort,
de.gauss.lang.KeySort,
de.gauss.vip.api.lang.ObjectId,
de.gauss.vip.api.admin.User,
de.gauss.vip.api.lang.ObjectType,
de.gauss.vip.api.lang.ObjectState,
de.gauss.vip.api.object.FieldNames,
de.gauss.vip.api.object.SimpleLink,
de.gauss.vip.htmlclient.Util,
de.gauss.vip.htmlclient.VIPHTMLClientRuntimeException,
de.gauss.vip.htmlclient.VIPHTMLClientSupport,
de.gauss.vip.i18n.Internationalization,
de.gauss.vip.portalmanager.SessionBean,
de.gauss.vip.portalmanager.VipObjectHandlerBean,
de.gauss.vip.portalmanager.VipObjectBean,
de.gauss.vip.portalmanager.VipUserBean,
de.gauss.vip.portalmanager.VipProfile,
de.gauss.vip.portalmanager.error.ExceptionDisplayBean,
de.gauss.vip.repository.RepositoryMap,
de.gauss.vip.repository.RepositoryIterator,
de.gauss.vip.repository.RepositoryEntry,
de.gauss.vip.repository.RepositoryEntryIterator,
de.gauss.vip.portalmanager.ContentHandlerBean,
de.gauss.vip.api.object.ObjectData,
de.gauss.vip.util.AttributeName,
de.gauss.lang.Value,
java.net.URLEncoder,
java.text.*,
java.util.*,
java.io.*,
java.text.SimpleDateFormat,
de.gauss.vip.portalmanager.application.UnknownApplicationException,
de.gauss.lang.TupelMap,
de.edicos.bi.util.*,
de.edicos.bi.util.tags.navigation.*,
de.edicos.util.*,
de.gauss.vip.portalmanager.converter.XmlContentConverter,
javax.mail.*,
de.gauss.vip.lang.filter.EqualFilter,
de.gauss.lang.BooleanValue,
javax.mail.internet.*,
de.gauss.vip.api.lang.ObjectType,
de.edicos.util.Utilities,
de.edicos.bi.internet.admin.InfoItem,
de.edicos.bi.internet.admin.InfoItemReader,
de.edicos.util.PropertiesManager,
java.util.GregorianCalendar,
de.gauss.vip.lang.TextContent,
de.gauss.vip.repository.RepositoryEntry,
de.gauss.vip.repository.RepositoryIterator,
de.gauss.vip.repository.RepositoryMap,
de.gauss.vip.lang.filter.EqualFilter,
de.gauss.vip.lang.filter.AndFilter,
de.gauss.vip.lang.filter.LikeFilter,
de.gauss.vip.lang.filter.GreaterOrEqualFilter,
de.gauss.vip.lang.filter.LessOrEqualFilter,
de.gauss.lang.StringValue,
de.gauss.lang.Value,
java.util.Collections,
java.util.ArrayList,
java.util.Iterator,
de.gauss.vip.repository.RepositoryIterator,
de.gauss.vip.repository.RepositoryMap,
de.gauss.vip.portalmanager.repository.FilterResultMap,
de.gauss.vip.lang.filter.LessFilter,
de.gauss.vip.lang.filter.GreaterFilter,
de.gauss.vip.lang.filter.OrFilter,
de.gauss.vip.lang.filter.EqualFilter,
de.gauss.vip.lang.filter.AndFilter,
de.gauss.vip.lang.filter.Filter,
de.gauss.vip.api.lang.ObjectType,
de.gauss.vip.api.lang.ObjectId,
de.gauss.lang.Sort,
de.gauss.lang.KeySort,
de.gauss.vip.api.object.ObjectHandlerUtil,
de.gauss.lang.StringValue,
de.gauss.lang.BooleanValue,
de.gauss.lang.SimpleDateValue,
de.edicos.util.XMLPropertiesManager,
java.util.GregorianCalendar,
java.util.Date,
java.text.*,
java.text.SimpleDateFormat,
java.util.Locale"
%>
<%!
// sitemap to show links of all objects specified with true vip filter attribute
// CONFIGURATION
// maximum depth in hierarachy of sitemap
int LEVEL_MAX_DEPTH = 7;
// filter for this vip attribute to be true (boolean)
String FILTER_ATTR = "nav_show";
// sort for this vip attribute to order the subelements (string)
String SORT_ATTR = "nav_order";
int oldLevel = 100;
int MainChapterCounter = 0;
int FirstSubChapterCounter = 0;
int SecondSubChapterCounter = 0;
int ThirdSubChapterCounter = 0;
int MaxMainChapterCounter = 0;
int MaxFirstSubChapterCounter = 0;
int MaxSecondSubChapterCounter = 0;
int MaxThirdSubChapterCounter = 0;
String MyNavigationArray [][][][][]= new String [7][10][10][10][2];
int printSitemap (RepositoryEntry thisObject, VipObjectBean vob, int level, JspWriter out) throws JspException {
String searchtext = "";
String year = "0";
String month = "0";
String area = "0";
String addPrintParams = "";
boolean MainChapter = false;
boolean FirstSubChapter = false;
boolean SecondSubChapter = false;
boolean ThirdSubChapter = false;
try {
String title = "no title";
Value title_value = thisObject.getValue("nav_title");
if (title_value != null)
{
title = title_value.toString();
}
else
if (thisObject.getValue("subtitle").toString() != null)
{
title = thisObject.getValue("subtitle").toString();
}
else
{
title = thisObject.getValue("title").toString();
}
if (title.equals("")) title = thisObject.getValue("title").toString();
String url = vob.getRelativeUrl("35710", thisObject);
String printLink = "";
int old_level = 0;
if (level >= 0)
{
if (oldLevel != level)
if (level == 0){
MainChapter = true;
MainChapterCounter++;
FirstSubChapterCounter = 0;
SecondSubChapterCounter = 0;
ThirdSubChapterCounter = 0;
MyNavigationArray [MainChapterCounter][0][0][0][0] = title;
MyNavigationArray [MainChapterCounter][0][0][0][1] = url;
}
if (level == 1){
FirstSubChapter = true;
FirstSubChapterCounter++;
SecondSubChapterCounter = 0;
MyNavigationArray [MainChapterCounter][FirstSubChapterCounter][0][0][0] = title;
MyNavigationArray [MainChapterCounter][FirstSubChapterCounter][0][0][1] = url;
}
if (level == 2){
SecondSubChapter = true;
SecondSubChapterCounter++;
MyNavigationArray [MainChapterCounter][FirstSubChapterCounter][SecondSubChapterCounter][0][0] = title;
MyNavigationArray [MainChapterCounter][FirstSubChapterCounter][SecondSubChapterCounter][0][1] = url;
ThirdSubChapterCounter = 0;
}
if (level == 3){
ThirdSubChapter = true;
ThirdSubChapterCounter++;
MyNavigationArray [MainChapterCounter][FirstSubChapterCounter][SecondSubChapterCounter][ThirdSubChapterCounter][0] = title;
MyNavigationArray [MainChapterCounter][FirstSubChapterCounter][SecondSubChapterCounter][ThirdSubChapterCounter][1] = url;
}
old_level = level;
}
boolean btest = true;
EqualFilter filter = new EqualFilter(new StringValue(FILTER_ATTR), new BooleanValue(btest));
KeySort sort = new KeySort(new StringValue(SORT_ATTR));
String oid = thisObject.getValue("oid").toString();
RepositoryMap rm = vob.getSubElements(new StringValue(oid), 1);
RepositoryMap frm = new RepositoryMap(rm.filter(filter));
RepositoryIterator ri = frm.sort(sort);
level++;
if (level < LEVEL_MAX_DEPTH) {
while (ri.hasNext()) {
RepositoryEntry re = ri.nextValue();
printSitemap(re, vob, level, out);
}
}
} catch (Exception e) {
return 0;
// throw new JspException(e);
}
return level;
}
%>
<%
// --------------- ---------------------------------------------
// --------------- SessionBean: userBean and ---------------------------------------------
// --------------- an Object to handle VIP objects(CMS) ---------------------------------------------
// --------------- ---------------------------------------------
//
%>