info.aduna.gee.publication.cover
Class Section

java.lang.Object
  extended by info.aduna.gee.publication.cover.Section
All Implemented Interfaces:
EntryConstants, MlecDestroyable

public class Section
extends Object
implements EntryConstants, MlecDestroyable

This class represents a section in a ZPad. A section consists of a number of HTML pages filled with entries. Entries can be retreived afterwards by specifying their index in the section (starting from 0).


Field Summary
protected  boolean _editMode
          Whether the section was in edit mode.
protected  Navigator _navigator
          The navigator.
protected  String _sectionName
          The section name
protected  Template _template
           
 Vector entryPages
          The entries in this section (READ ONLY).
 long expirationTime
          The expiration-time for this section.
 String frame
          The Frame for this section (READ ONLY).
 String frameName
          The name of the frame (READ ONLY).
 int numberOfPages
          Read only.
 
Fields inherited from interface info.aduna.gee.publication.content.EntryConstants
ACLS_PREFIX, AFTER_TRANSFER, APPLET_TYPE_VALUE, ASSOCIATES_EDIT_LEVEL, BEFORE_STORAGE, BEFORE_TRANSFER, CODE_KEY, CODEBASE_KEY, CONSTRUCTION_KEY, CONTAINER_TTL_KEY, CONTAINERID_KEY, CONTAINERPROPS_KEY, DBPRIVACY_LEVEL_KEY, DESCRIPTION_KEY, EMBED_TYPE_VALUE, END_TIME_KEY, ENTRY_ID_KEY, ENTRYATTRIBS_KEY, ENTRYPARAMS_KEY, ENTRYPROPS_KEY, EXPIRES_KEY, EXTERNAL_ENTRY_KEY, HEIGHT_KEY, HTML_KEY, HTML_TYPE_VALUE, ID2IDID_KEY, IMAGE_TYPE_VALUE, IMPORT_CLASSNAME, IMPORT_DONT_FORWARD, IMPORT_IMPORTED, IMPORT_LANGUAGE, IMPORT_SERVER_NAME, IMPORT_TYPE_VALUE, INFO_EXTENSION, INHERIT_CONFIGURATION, INLINE_DESCRIPTION_IS_HTML_KEY, INLINE_DESCRIPTION_KEY, INSPIRES_KEY, JIT_DESTINATION, JIT_DESTINATION_INDEX, LINK_IN_FRAME_KEY, LINK_KEY, MANUAL_KEY, MINIMALHEIGHT_KEY, MINIMALWIDTH_KEY, NAVIGATION_KEY, OBJECT_TYPE_VALUE, OCCURRING_CLABELS_KEY, OVERRIDE_SUGGESTION_KEY, PRIVACY_LEVEL_KEY, PROVIDE_KEY, PROVIDE_PL_KEY, QUALIFIED_BASE_KEY, RE_EXPORT_KEY, RE_MANUAL_KEY, REPEAT_ID_KEY, REPEAT_TODAY_KEY, REQUIRES_NEW_PAGE, ROTATABLE_KEY, SHARED_CLABELS_KEY, SHOP_GIF_KEY, SHOP_GIF_LOCATION_KEY, SHOP_ID_KEY, SHOP_ORIGIN_KEY, SHOP_OVER_GIF_KEY, SORT_CLABELS, SORT_DESCRIPTION, SOURCE_KEY, STARTSECTION_KEY, SUBSCRIBED_COLOR_KEY, SUBSCRIBED_GIF_KEY, SUBSCRIBED_GIF_LOCATION_KEY, SUBSCRIBED_OVER_GIF_KEY, SUBSCRIBED_VISIBLE_CLABELS_KEY, SUBSCRIPTION_KEY, SUBSCRIPTION_LINK_KEY, SUGGESTION_KEY, SUMMARY_IS_HTML_KEY, SUMMARY_KEY, SUMMARY_TYPE_VALUE, TEMPLATEPREFERENCES_KEY, TEXT_KEY, TEXT_TYPE_VALUE, TIME_KEY, TMPL_DESCRIPTOR_KEY, TMPL_FOREIGN_ID_KEY, TMPL_ID_KEY, TMPL_PREFERENCES_KEY, TMPL_STUB_RECOGNIZER_KEY, TMPLD_TYPE_VALUE, TYPE_KEY, WIDTH_KEY
 
Constructor Summary
Section(String sectionName, String frameName, String frame, Template template, int numberOfPages, Vector entryPages, Navigator navigator, boolean editMode)
          Creates a new section.
 
Method Summary
 void destroy()
          If the Section is removed from ZpadSectionCache, all pages generated by the Section should be removed too.
 Entry getEntry(int entryId)
          Get an entry with a specific id from the section.
 int getIdOf(Object obj)
          Get the ID of a specific entry.
 String getPage(int pageNo)
          Get the HTML page for a particular number.
 int getPageOf(Entry entry)
          Get the pageno of the page an entry is in.
 int getPageOf(int entryID)
          Get the pagenumber of a particular entry number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_sectionName

protected String _sectionName
The section name


frameName

public String frameName
The name of the frame (READ ONLY).


frame

public String frame
The Frame for this section (READ ONLY).


_template

protected Template _template

numberOfPages

public int numberOfPages
Read only. Is equal to entryPages.size().


entryPages

public Vector entryPages
The entries in this section (READ ONLY). This is a vector containing a vector for each page in the section. These vectors contain the Entries that are on there corresponding pages.


_navigator

protected Navigator _navigator
The navigator.


_editMode

protected boolean _editMode
Whether the section was in edit mode. Should NOT be derived from Navigator!


expirationTime

public long expirationTime
The expiration-time for this section.

Constructor Detail

Section

public Section(String sectionName,
               String frameName,
               String frame,
               Template template,
               int numberOfPages,
               Vector entryPages,
               Navigator navigator,
               boolean editMode)
Creates a new section.

Method Detail

getPage

public String getPage(int pageNo)
Get the HTML page for a particular number.


destroy

public void destroy()
If the Section is removed from ZpadSectionCache, all pages generated by the Section should be removed too.

Specified by:
destroy in interface MlecDestroyable

getEntry

public Entry getEntry(int entryId)
Get an entry with a specific id from the section.

Parameters:
entryId - the numeric id of an entry.
Returns:
the requested entry or a dummy Entry if the entry for the specified index does not exist.
See Also:
Entry

getPageOf

public int getPageOf(int entryID)
Get the pagenumber of a particular entry number.


getPageOf

public int getPageOf(Entry entry)
Get the pageno of the page an entry is in. The reference passed as an argument should be the same as the reference of the entry that is looked for.

Parameters:
entry - the entry to look for.
Returns:
the pageno the entry was found in or 0 (default!) if not found.

getIdOf

public int getIdOf(Object obj)
Get the ID of a specific entry.

Parameters:
obj - the object to search for.
Returns:
the ID of the object or -1 if not found.


Copyright © 1997-2008 Aduna. All Rights Reserved.