|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--org.locomotive.loco.servlet.LocoServlet | +--org.locomotive.module.pub.PublisherServlet
This class is the main Servlet 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 Servlet 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.servlet.LocoServlet |
conn,
DEBUG,
ERROR,
form_data,
NORMAL,
req,
resp,
session,
steam_vars,
url_tokens,
user,
WARNING |
Constructor Summary | |
PublisherServlet()
|
Method Summary | |
static boolean |
fileRename(java.io.File oldfile,
java.io.File newfile)
This method is a workaround because the renameTo doesn't work on NFS mounted file systems I'd still consider it a bug -- a Java application or servlet has no idea whether a given path is a "single filesystem" or is NFS-mounted. |
protected void |
getPermissions()
Prepares the PermissionSet object for permission checking. |
void |
init(javax.servlet.ServletConfig config)
The required init method, as defined in org.locomotive.loco.Servlet. |
void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
main entry point called by RequestManager for each new request. |
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.Servlet. |
Methods inherited from class org.locomotive.loco.servlet.LocoServlet |
displayPage,
displayString,
handleException,
log,
logEvent,
sayBadURL,
setup |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete,
doGet,
doOptions,
doPost,
doPut,
doTrace,
getLastModified,
service |
Methods inherited from class javax.servlet.GenericServlet |
destroy,
getInitParameter,
getInitParameterNames,
getServletConfig,
getServletContext,
getServletInfo,
init,
log,
log |
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 PublisherServlet()
Method Detail |
public void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
LocoServlet.setup(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
,
javax.servlet.http.HttpServlet.html#service
protected void showMain() throws java.io.IOException
protected boolean showIndex(int status) throws java.io.IOException
status
- status of pages we want to see an index forprotected void showOwn() throws java.io.IOException
protected void showDefaultIndex() throws java.io.IOException
protected void showApprove() throws java.io.IOException
protected void showCensor() throws java.io.IOException
protected void showCreate() throws java.io.IOException
protected void showPreview() throws java.io.IOException
protected void showFinal() throws java.io.IOException
protected void getPermissions() throws java.io.IOException
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
public boolean shutdown(Log log)
org.locomotive.loco.Servlet#shutdown
public static boolean fileRename(java.io.File oldfile, java.io.File newfile)
method
,
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |