|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.webinterface.SiteSection
public abstract class SiteSection
This class holds information about one section of the site, including information about what to put in the menu sidebar and how to determine which page you're in.
Constructor Summary | |
---|---|
SiteSection(java.lang.String mainname,
java.lang.String prefix,
int visiblePages,
java.lang.String[][] pagesAndTitles,
java.lang.String dirname,
java.lang.String bundle)
Create a new SiteSection object. |
Method Summary | |
---|---|
static void |
cleanup()
Clean up sitesections. |
abstract void |
close()
Called when webserver shuts down. |
void |
generateNavigationTree(javax.servlet.jsp.JspWriter out,
java.lang.String url,
java.util.Locale locale)
Generate this section's part of the navigation tree (sidebar). |
java.lang.String |
getDirname()
Return the directory name of this site section. |
static java.util.List<SiteSection> |
getSections()
The list of sections of the website. |
java.lang.String |
getTitle(java.lang.String url,
java.util.Locale locale)
Given a URL, returns the corresponding page title. |
abstract void |
initialize()
Called when the site section is first deployed. |
static boolean |
isDeployed(java.lang.String dirName)
Check whether a section with a given dirName is deployed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SiteSection(java.lang.String mainname, java.lang.String prefix, int visiblePages, java.lang.String[][] pagesAndTitles, java.lang.String dirname, java.lang.String bundle)
mainname
- The name of the entire section used in the sidebar.prefix
- The prefix that all the JSP pages will have.visiblePages
- How many of the pages will be visible in the menu
(taken from the start of the list).pagesAndTitles
- The actual pages and title-labels, without the
prefix and jsp extension, involved in the section. They must be given as
an array of 2-element arrays.dirname
- The top level directory this site section is deployed
under.bundle
- The resource bundle with translations of this sitesection.
ArgumentNotValid
- if any of the elements of pagesAndTitles are
not a 2-element array.Method Detail |
---|
public java.lang.String getTitle(java.lang.String url, java.util.Locale locale)
url
- a given URL.locale
- the current locale.
ArgumentNotValid
- on null locale.public void generateNavigationTree(javax.servlet.jsp.JspWriter out, java.lang.String url, java.util.Locale locale) throws java.io.IOException
out
- A place to write our HTMLurl
- The url of the page we're currently viewing. The
list of subpages will only be displayed if the page we're viewing is one
that belongs to this section.locale
- The locale to generate the navigation tree for.
java.io.IOException
- If there is a problem writing to the page.public java.lang.String getDirname()
public abstract void initialize()
public abstract void close()
public static java.util.List<SiteSection> getSections()
IOFailure
- if site sections cannot be read from settings.public static void cleanup()
public static boolean isDeployed(java.lang.String dirName)
dirName
- The dirName to check for
ArgumentNotValid
- if dirName is null or empty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |