org.liquidsite.app.admin.view
Class ContentView

java.lang.Object
  extended byorg.liquidsite.app.admin.view.AdminView
      extended byorg.liquidsite.app.admin.view.ContentView

public class ContentView
extends AdminView

A helper class for the content view. This class contains methods for creating the HTML and JavaScript responses to the various pages in the content view.


Field Summary
 
Fields inherited from class org.liquidsite.app.admin.view.AdminView
BASE, CONTENT, DIALOG, HOME, SCRIPT, SITE, SYSTEM, USER
 
Method Summary
 java.lang.Object getContentTreeFocus(Request request)
          Returns the content tree focus object.
 void setContentTreeFocus(Request request, java.lang.Object obj)
          Sets the content tree focus object.
 void viewAddObject(Request request, PersistentObject parent)
          Shows the add object page.
 void viewContent(Request request)
          Shows the content page.
 void viewDocumentPreview(Request request, ContentDocument doc)
          Shows the document preview page.
 void viewEditDocument(Request request, Content reference)
          Shows the add or edit document page.
 void viewEditFile(Request request, PersistentObject reference)
          Shows the add or edit file page.
 void viewEditForum(Request request, Content reference)
          Shows the add or edit forum page.
 void viewEditPost(Request request, Content reference)
          Shows the add or edit post page.
 void viewEditSection(Request request, PersistentObject parent, ContentSection section)
          Shows the add or edit section page.
 void viewEditTopic(Request request, Content reference)
          Shows the add or edit topic page.
 void viewLoadContentScript(Request request, PersistentObject obj, boolean open)
          Shows the load content object JavaScript code.
 void viewOpenContentScript(Request request, PersistentObject obj)
          Shows the open content object JavaScript code.
 void viewSectionPreview(Request request, ContentSection section)
          Shows the section preview page.
 
Methods inherited from class org.liquidsite.app.admin.view.AdminView
findDomains, findFolders, findForums, findGroups, findSections, findTemplates, viewError, viewInfo, viewRedirect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

viewContent

public void viewContent(Request request)
                 throws ContentException,
                        ContentSecurityException
Shows the content page.

Parameters:
request - the request object
Throws:
ContentException - if the database couldn't be accessed properly
ContentSecurityException - if the user didn't have the required permissions

viewAddObject

public void viewAddObject(Request request,
                          PersistentObject parent)
                   throws ContentException
Shows the add object page.

Parameters:
request - the request object
parent - the parent object
Throws:
ContentException - if the database couldn't be accessed properly

viewEditSection

public void viewEditSection(Request request,
                            PersistentObject parent,
                            ContentSection section)
                     throws ContentException
Shows the add or edit section page. Either the parent or the section object must be specified.

Parameters:
request - the request object
parent - the parent object, or null
section - the section object, or null
Throws:
ContentException - if the database couldn't be accessed properly

viewEditDocument

public void viewEditDocument(Request request,
                             Content reference)
                      throws ContentException
Shows the add or edit document page. Either the parent or the document object must be specified.

Parameters:
request - the request object
reference - the parent or document object
Throws:
ContentException - if the database couldn't be accessed properly

viewEditFile

public void viewEditFile(Request request,
                         PersistentObject reference)
                  throws ContentException
Shows the add or edit file page.

Parameters:
request - the request object
reference - the reference object (parent or file)
Throws:
ContentException - if the database couldn't be accessed properly

viewEditForum

public void viewEditForum(Request request,
                          Content reference)
                   throws ContentException
Shows the add or edit forum page. Either the parent or the forum object must be specified.

Parameters:
request - the request object
reference - the parent or forum object
Throws:
ContentException - if the database couldn't be accessed properly

viewEditTopic

public void viewEditTopic(Request request,
                          Content reference)
                   throws ContentException
Shows the add or edit topic page. Either the parent or the topic object must be specified.

Parameters:
request - the request object
reference - the parent or topic object
Throws:
ContentException - if the database couldn't be accessed properly

viewEditPost

public void viewEditPost(Request request,
                         Content reference)
                  throws ContentException
Shows the add or edit post page. Either the parent or the post object must be specified.

Parameters:
request - the request object
reference - the parent or post object
Throws:
ContentException - if the database couldn't be accessed properly

viewSectionPreview

public void viewSectionPreview(Request request,
                               ContentSection section)
                        throws ContentException
Shows the section preview page.

Parameters:
request - the request object
section - the section object
Throws:
ContentException - if the database couldn't be accessed properly

viewDocumentPreview

public void viewDocumentPreview(Request request,
                                ContentDocument doc)
                         throws ContentException
Shows the document preview page.

Parameters:
request - the request object
doc - the document object
Throws:
ContentException - if the database couldn't be accessed properly

viewLoadContentScript

public void viewLoadContentScript(Request request,
                                  PersistentObject obj,
                                  boolean open)
                           throws ContentException
Shows the load content object JavaScript code.

Parameters:
request - the request object
obj - the domain or content parent object
open - the open object flag
Throws:
ContentException - if the database couldn't be accessed properly

viewOpenContentScript

public void viewOpenContentScript(Request request,
                                  PersistentObject obj)
                           throws ContentException
Shows the open content object JavaScript code.

Parameters:
request - the request object
obj - the domain or content object
Throws:
ContentException - if the database couldn't be accessed properly

getContentTreeFocus

public java.lang.Object getContentTreeFocus(Request request)
Returns the content tree focus object. The focus object is either a domain or a content object, and is stored in the session. It is not possible to trust the focus object for any operations. It may have been removed from the database by another user.

Parameters:
request - the request
Returns:
the content view focus object, or null for none

setContentTreeFocus

public void setContentTreeFocus(Request request,
                                java.lang.Object obj)
Sets the content tree focus object. The focus object is either a domain or a content object, and is stored in the session.

Parameters:
request - the request
obj - the new focus object