Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Package com.RuntimeCollective.sitemap.bean

The Sitemap module defines the necessary classes to set up and edit the structure of a content library.

See:
          Description

Interface Summary
Publishable Interface to implement if you want an object to be publishable, ie sometimes live and sometimes dead.
SiteLocation The interface to implement if you want an object to be a location within your site map.
 

Class Summary
Bookmarks A collection of bookmarked content for a SitemapUser.
ContentSiteLocation A SiteLocation, which is itself a Content, and which holds other Contents in given roles and positions.
ImageCategory The ImageCategory class is used to group Images, for use in an image library.
SimplePublishable A commodity class which implements all the basic functionality of Publishable, so we can spare duplicating lots of simple code.
SimpleSiteLocation A commodity class which implements all the basic functionality of SiteLocation, so we can spare duplicating lots of simple code.
SiteLocationLink The SiteLocationLink class implements the abstract Link class, by linking to a SiteLocation.
SiteNode The SiteNode version of the ContentSiteLocation, which can have a parent and children SiteNodes.
Template The Template class will hold the code used to render e.g.
 

Package com.RuntimeCollective.sitemap.bean Description

The Sitemap module defines the necessary classes to set up and edit the structure of a content library. The key ContentSiteLocation class supports the mapping of Content objects to a SiteLocation. This module is particularly useful for editing the Sitemap of a Website, but it could also be used for non-Web applications.


1. Using sitemap.bean.Template

The Template class is simply made of references to two files (eg JSPs) which can be used 1/ to edit and 2/ to render another object.

If you want to create a new Website Template, you will have to:

2. Using sitemap.bean.Publishable

The Publishable interface (and its basic implementation SimplePublishable) is very generic, and should possibly be moved to Content or to Webapps. A Bean implementing this interface will have a Status (eg 'archived', 'live', 'to_be_approved'), 'go dead' and 'go live' dates, and related setting/checking methods (markAsArchived, isLive).

The optional sitemap.DeleteArchivedPublishables timer scans for old archived publishables, and delete them altogether from the database (the definition of 'old' is set in web.xml). It is set up by the sitemap.servlet.SitemapInitialiserServlet.

3. Creating a Sitemap

The top-level interface sitemap.bean.SiteLocation and its basic implementation sitemap.bean.SimpleSiteLocation define the basic contract of a Sitemap "location". Such a location is a Publishable, and has a Template assigned to it.

If you want to assign Content to a SiteLocation, use its sub-class sitemap.bean.ContentSiteLocation. A ContentSiteLocation object can be given a Content under a "role". For each "role", a ContentSiteLocation will contain a list of Contents, ordered by Position. What roles and positions you use will depend on the ContentSiteLocation you are defining. For example, for the Sussex Enterprise website, we have some pages which use the Template1, and hence have 3 Image contents (under the role "image"), one main TextComponent (under the role "text"), three secondary TextComponents (under the role "box"), etc.

If you also want your SiteLocations to be related to each other, use sitemap.bean.SiteNode. SiteNodes have a Parent and some Children. SiteNode is a subclass of ContentSiteLocation. Arguably, it should be re-engineered and made to sit above ContentSiteLocation in the class hierarchy.

4. Special Actions and Forms

There are some special RotatingContent actions and forms which make it possible to assign a dynamic number of TextComponents (each one with its list of Links) to a ContentSiteLocation, and to let a Template rotate through those alternative Contents according to time. For example, for the Sussex Enterprise website, we let administrators add as many TextComponent+Links alternatives to the Box2 of Template1-pages. When the Template1 displays such a page, it shows a different TextComponent and list of Links every 60 seconds.

There are also some actions and forms for editing "Channels", "Subsections", and "Pages", which are the terms used by Sussex Enterprise for top-level, second-level, and 3+-level SiteNodes.

5. Links

The Sitemap module also contains special content.bean.Link related classes: