Groovy Documentation

controllers
Class PageController

java.lang.Object
  controllers.PageController

class PageController

Main controller for serving and editing CoW content.


Property Summary
static String NEWPAGE

Constant for newpage flow

static String SHOW404

Constant for newpage flow

static def allowedMethods

Request method restrictions.

static Map conf

Config

def dependenciesService

Tasks related to Dependencies.

def editFlow

Edit action.

def history

View the subversion history of this page using sventon, if it is running.

def index

The default action.

def indexingService

Indexing service

def newpageFlow

Validate the request and choose a state for the edit action.

def pageService

Tasks related to page requests.

def print

Print.

def sandboxManager

def securityService

The security service

def show

Show action.

def sventonService

Tasks related to sventon history browsing.

def upload

Upload a file in the current directory, including ZIP archive.

def yamService

Tasks related to YAM files.

 
Constructor Summary
PageController()

 
Method Summary
String renderBreadCrumb(String id, File pageFile)

Validate and triage the request.

String renderError(int code, String message)

Render an error template and set the response code.

String renderTemplate(String templateName, Map templateModel)

Render a template.

private void switchEditorType(boolean rich, def response)

Switch the saved "type of editor" preference.

 
Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Property Detail

NEWPAGE

static String NEWPAGE
Constant for newpage flow


SHOW404

static String SHOW404
Constant for newpage flow


allowedMethods

static def allowedMethods
Request method restrictions.


conf

static Map conf
Config


dependenciesService

def dependenciesService
Tasks related to Dependencies.


editFlow

def editFlow
Edit action. Handles edits on HTML (YAM and non-YAM) and TXT files.


history

def history
View the subversion history of this page using sventon, if it is running.


index

def index
The default action.


indexingService

def indexingService
Indexing service


newpageFlow

def newpageFlow
Validate the request and choose a state for the edit action.


pageService

def pageService
Tasks related to page requests.


print

def print
Print. This action serves both as a skin-less view of HTML/YAM pages (for printing) and as the target for iframe contents when viewing HTML pages that have no associated YAM.


sandboxManager

def sandboxManager


securityService

def securityService
The security service


show

def show
Show action. Deals with the following types of request:


sventonService

def sventonService
Tasks related to sventon history browsing.


upload

def upload
Upload a file in the current directory, including ZIP archive. ZIP are uncompressed on the fly and the directory structure recreated. Tests if the file is empty or too big. params.unzip == 'on' -> try to unzip the file whatever its type params.overwrite == 'on' -> overwrite any existing file


yamService

def yamService
Tasks related to YAM files.


 
Constructor Detail

PageController

PageController()


 
Method Detail

renderBreadCrumb

String renderBreadCrumb(String id, File pageFile)
Validate and triage the request.


renderError

String renderError(int code, String message)
Render an error template and set the response code.


renderTemplate

String renderTemplate(String templateName, Map templateModel)
Render a template.


switchEditorType

private void switchEditorType(boolean rich, def response)
Switch the saved "type of editor" preference. If there is a logged-in user, we store the preference on the JsecUser, otherwise we set a cookie on the response.
param:
rich use the rich (true) or form (false) editor.
param:
response the HttpServletResponse, used to set cookies


 

Groovy Documentation