org.liquidsite.app.admin.view
Class SiteView

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

public class SiteView
extends AdminView

A helper class for the site view. This class contains methods for creating the HTML and JavaScript responses to the various pages in the site 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 getSiteTreeFocus(Request request)
          Returns the site tree focus object.
 void setSiteTreeFocus(Request request, java.lang.Object obj)
          Sets the site tree focus object.
 void viewAddObject(Request request, PersistentObject parent)
          Shows the add object page.
 void viewEditDomain(Request request, PersistentObject parent, Domain domain)
          Shows the add or edit domain page.
 void viewEditFile(Request request, Content reference)
          Shows the add or edit file page.
 void viewEditFolder(Request request, PersistentObject parent, ContentFolder folder)
          Shows the add or edit folder page.
 void viewEditPage(Request request, Content reference)
          Shows the add or edit page page.
 void viewEditSite(Request request, PersistentObject reference)
          Shows the add or edit site page.
 void viewEditTemplate(Request request, PersistentObject parent, ContentTemplate template)
          Shows the add or edit template page.
 void viewEditTranslator(Request request, Content reference)
          Shows the add or edit translator page.
 void viewLoadSiteScript(Request request, PersistentObject obj, boolean open)
          Shows the load site object JavaScript code.
 void viewOpenSiteScript(Request request, PersistentObject obj)
          Shows the open site object JavaScript code.
 void viewOpenTemplateScript(Request request, ContentTemplate template)
          Shows the open template JavaScript code.
 void viewSite(Request request)
          Shows the site page.
 void viewTemplatePreview(Request request, ContentTemplate template)
          Shows the template 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

viewSite

public void viewSite(Request request)
              throws ContentException,
                     ContentSecurityException
Shows the site 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

viewEditDomain

public void viewEditDomain(Request request,
                           PersistentObject parent,
                           Domain domain)
                    throws ContentException
Shows the add or edit domain page.

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

viewEditSite

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

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

viewEditTranslator

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

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

viewEditPage

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

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

viewEditFile

public void viewEditFile(Request request,
                         Content 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

viewEditFolder

public void viewEditFolder(Request request,
                           PersistentObject parent,
                           ContentFolder folder)
                    throws ContentException
Shows the add or edit folder page. Either the parent or the folder object must be specified.

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

viewEditTemplate

public void viewEditTemplate(Request request,
                             PersistentObject parent,
                             ContentTemplate template)
                      throws ContentException
Shows the add or edit template page. Either the parent or the template object must be specified.

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

viewTemplatePreview

public void viewTemplatePreview(Request request,
                                ContentTemplate template)
                         throws ContentException
Shows the template preview page.

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

viewLoadSiteScript

public void viewLoadSiteScript(Request request,
                               PersistentObject obj,
                               boolean open)
                        throws ContentException
Shows the load site 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

viewOpenSiteScript

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

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

viewOpenTemplateScript

public void viewOpenTemplateScript(Request request,
                                   ContentTemplate template)
                            throws ContentException
Shows the open template JavaScript code.

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

getSiteTreeFocus

public java.lang.Object getSiteTreeFocus(Request request)
Returns the site 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 site view focus object, or null for none

setSiteTreeFocus

public void setSiteTreeFocus(Request request,
                             java.lang.Object obj)
Sets the site 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