|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.locomotive.loco.handler.GenericHandler | +--org.locomotive.module.pub.PublisherHandler
This class is the main handler for the Locomotive Personal Website
Publisher. This example module of the Locomotive allows users to create
and design their own website by filling out text fields, inserting
images, and arranging all of the HTML elements in a pre-arranged
lay-out determined by the template selected by the user. The Locomotive
stores all of the necessary information (text strings, images, which
template is used, etc.) and automatically dynamically creates the page
for viewing when the handler string is parsed to determine the
specific user's page. This module also displays an index of published
webpages, beginning with the most recent.
NOTE: The image path (image_path) variable below must be modified
All templates for the Publisher Module are in the templates/pub dir.
The tokens and their corresponding methods are:
Token Method Template [no token] showMain() pub/main.tmpl index showDefaultIndex() pub/index.tmpl approve showApprove() pub/approve.tmpl censor showCensor() pub/censor.tmpl create showCreate() pub/create.tmpl preview showPreview() pub/preview.tmpl final showFinal() pub/final.tmpl
Field Summary | |
static int |
num_listings_per_index_page
Constant used to determine how many page listings to show per index page. |
static java.lang.String |
PUB_ADMIN
Permission that allows a user to allow or censor newly user-created web pages. |
Fields inherited from class org.locomotive.loco.handler.GenericHandler |
already_displayed_page,
conn,
DEBUG,
ERROR,
form_data,
handler_uri,
hd,
NORMAL,
session,
steam_vars,
url_tokens,
user,
WARNING |
Constructor Summary | |
PublisherHandler()
|
Method Summary | |
protected void |
getPermissions()
Prepares the PermissionSet object for permission checking. |
void |
handleRequest(HandlerData hd_in)
main entry point called by RequestManager for each new request. |
boolean |
init(Log log)
The required init method, as defined in org.locomotive.loco.Handler. |
protected void |
showApprove()
Displays a page showing the list of not-yet-approved published pages. |
protected void |
showCensor()
Displays a page showing the list of censored published pages. |
protected void |
showCreate()
Displays the page used to create a web page. |
protected void |
showDefaultIndex()
Shows the index of published pages that are not-yet-approved and approved. |
protected void |
showFinal()
Displays the final published version of a page. |
protected boolean |
showIndex(int status)
Displays a page showing a list of published pages. |
protected void |
showMain()
Displays the main start page for this module. |
protected void |
showOwn()
Shows the index of published pages owned by a user. |
protected void |
showPreview()
Displays a preview of a published page. |
boolean |
shutdown(Log log)
The required shutdown method, as defined in org.locomotive.loco.Handler. |
Methods inherited from class org.locomotive.loco.handler.GenericHandler |
displayPage,
displayString,
handleException,
log,
logEvent,
sayBadURL |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int num_listings_per_index_page
public static final java.lang.String PUB_ADMIN
Constructor Detail |
public PublisherHandler()
Method Detail |
public void handleRequest(HandlerData hd_in)
protected void showMain()
protected boolean showIndex(int status)
status
- status of pages we want to see an index forprotected void showOwn()
protected void showDefaultIndex()
protected void showApprove()
protected void showCensor()
protected void showCreate()
protected void showPreview()
protected void showFinal()
protected void getPermissions()
public boolean init(Log log)
public boolean shutdown(Log log)
org.locomotive.loco.Handler#shutdown
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |