org.kuali.mobility.admin.controllers
Class PublishingController

java.lang.Object
  extended by org.kuali.mobility.admin.controllers.PublishingController

@Controller
@RequestMapping(value="/publishing")
public class PublishingController
extends Object

Controller for performing publishing actions

Author:
Kuali Mobility Team (moblitiy.collab@kuali.org)

Constructor Summary
PublishingController()
           
 
Method Summary
 String addTool(org.springframework.ui.Model uiModel, HomeScreen homeScreen, org.springframework.validation.BindingResult result, Long toolId)
          Associate a Tool with a HomeScreen if it isn't already associated
 String deleteLayout(org.springframework.ui.Model uiModel, long layoutId)
          Delete a HomeScreen
 String deleteNewsSource(org.springframework.ui.Model uiModel, long id)
          Delete a NewsSource
 String deleteNotification(Long id, org.springframework.ui.Model uiModel)
          Delete a notification
 String deleteTool(org.springframework.ui.Model uiModel, long toolId)
          Delete a Tool
 String editLayout(org.springframework.ui.Model uiModel, HomeScreen homeScreen, org.springframework.validation.BindingResult result)
          Save a HomeScreen
 String editLayout(org.springframework.ui.Model uiModel, long layoutId)
          Edit an existing HomeScreen
 String editNews(org.springframework.ui.Model uiModel)
          Create a new NewsSource
 String editNews(org.springframework.ui.Model uiModel, long id)
          Edit an existing NewsSource
 String editNewsSource(org.springframework.ui.Model uiModel, NewsSource source, org.springframework.validation.BindingResult result)
          Save a NewsSource
 String editNotification(Long id, org.springframework.ui.Model uiModel)
          Edit a notification
 String editTool(org.springframework.ui.Model uiModel, long toolId)
          Edit an existing Tool
 String editTool(org.springframework.ui.Model uiModel, Tool tool, org.springframework.validation.BindingResult result)
          Save a Tool
 String index(org.springframework.ui.Model uiModel)
          The main entry point for publishing.
 void initBinder(org.springframework.web.bind.WebDataBinder binder)
           
 String layout(org.springframework.ui.Model uiModel)
          The entry point for publishing HomeScreen layouts
 String moveDown(org.springframework.ui.Model uiModel, long id)
          Move a news feed down in the display order
 String moveToolDown(org.springframework.ui.Model uiModel, HomeScreen homeScreen, org.springframework.validation.BindingResult result, Long toolId)
          Move a tool down in the Tool list display order
 String moveToolUp(org.springframework.ui.Model uiModel, HomeScreen homeScreen, org.springframework.validation.BindingResult result, Long toolId)
          Move a tool up in the Tool list display order
 String moveUp(org.springframework.ui.Model uiModel, long id)
          Move a news feed up in the display order
 String newLayout(org.springframework.ui.Model uiModel)
          Create a new HomeScreen
 String news(org.springframework.ui.Model uiModel)
          The main entry point for News publishing
 String newTool(org.springframework.ui.Model uiModel)
          Create a new Tool
 String notificationForm(Long id, org.springframework.ui.Model uiModel)
          Create or edit a notification
 String notifications(org.springframework.ui.Model uiModel)
          the main entry point for notifications
 String removeTool(org.springframework.ui.Model uiModel, HomeScreen homeScreen, org.springframework.validation.BindingResult result, Long toolId)
          Remove a Tool's association with a HomeScreen
 String submit(javax.servlet.http.HttpServletRequest request, org.springframework.ui.Model uiModel, Notification notification, org.springframework.validation.BindingResult result)
          Save a notification
 String tool(org.springframework.ui.Model uiModel)
          Entry point for publishing Tools.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublishingController

public PublishingController()
Method Detail

index

@RequestMapping(value="index",
                method=GET)
public String index(org.springframework.ui.Model uiModel)
The main entry point for publishing. Provides links to more specific publishing tools.

Parameters:
uiModel -
Returns:

tool

@RequestMapping(value="tool",
                method=GET)
public String tool(org.springframework.ui.Model uiModel)
Entry point for publishing Tools. Lists currently defined Tools.

Parameters:
uiModel -
Returns:
the tool publishing entry page

newTool

@RequestMapping(value="tool/new",
                method=GET)
public String newTool(org.springframework.ui.Model uiModel)
Create a new Tool

Parameters:
uiModel -
Returns:
the edit tool page

editTool

@RequestMapping(value="tool/edit/{toolId}",
                method=GET)
public String editTool(org.springframework.ui.Model uiModel,
                                      @PathVariable(value="toolId")
                                      long toolId)
Edit an existing Tool

Parameters:
uiModel -
toolId - id of the Tool to edit
Returns:
the edit tool page

deleteTool

@RequestMapping(value="tool/delete/{toolId}",
                method=GET)
public String deleteTool(org.springframework.ui.Model uiModel,
                                        @PathVariable(value="toolId")
                                        long toolId)
Delete a Tool

Parameters:
uiModel -
toolId - id of the Tool to delete
Returns:
back to the tool publishing entry page

editTool

@RequestMapping(value="tool/edit",
                method=POST)
public String editTool(org.springframework.ui.Model uiModel,
                                      @ModelAttribute(value="tool")
                                      Tool tool,
                                      org.springframework.validation.BindingResult result)
Save a Tool

Parameters:
uiModel -
tool - the Tool object to save
result - binding validation result
Returns:
back to the tool publishing entry page

layout

@RequestMapping(value="layout",
                method=GET)
public String layout(org.springframework.ui.Model uiModel)
The entry point for publishing HomeScreen layouts

Parameters:
uiModel -
Returns:
the home screen publishing entry page

newLayout

@RequestMapping(value="layout/new",
                method=GET)
public String newLayout(org.springframework.ui.Model uiModel)
Create a new HomeScreen

Parameters:
uiModel -
Returns:
the home screen editing page

editLayout

@RequestMapping(value="layout/edit/{layoutId}",
                method=GET)
public String editLayout(org.springframework.ui.Model uiModel,
                                        @PathVariable(value="layoutId")
                                        long layoutId)
Edit an existing HomeScreen

Parameters:
uiModel -
layoutId - the id of the HomeScreen to edit
Returns:
the home screen editing page

editLayout

@RequestMapping(value="layout/edit",
                method=POST)
public String editLayout(org.springframework.ui.Model uiModel,
                                        @ModelAttribute(value="layout")
                                        HomeScreen homeScreen,
                                        org.springframework.validation.BindingResult result)
Save a HomeScreen

Parameters:
uiModel -
homeScreen - the HomeScreen to save
result - binding validation result
Returns:
the home screen publishing entry page

deleteLayout

@RequestMapping(value="layout/delete/{layoutId}",
                method=GET)
public String deleteLayout(org.springframework.ui.Model uiModel,
                                          @PathVariable(value="layoutId")
                                          long layoutId)
Delete a HomeScreen

Parameters:
uiModel -
layoutId - the id of the HomeScren to delete
Returns:
the home screen publishing entry page

addTool

@RequestMapping(value="layout/edit",
                method=POST,
                params="add")
public String addTool(org.springframework.ui.Model uiModel,
                                     @ModelAttribute(value="layout")
                                     HomeScreen homeScreen,
                                     org.springframework.validation.BindingResult result,
                                     @RequestParam(value="toolToAdd")
                                     Long toolId)
Associate a Tool with a HomeScreen if it isn't already associated

Parameters:
uiModel -
homeScreen - the HomeScreen to which to add the Tool
result - binding validation result for the HomeScreen
toolId - the id of the Tool to associate with the HomeSreen
Returns:
the home screen editing page

removeTool

@RequestMapping(value="layout/edit",
                method=POST,
                params="remove")
public String removeTool(org.springframework.ui.Model uiModel,
                                        @ModelAttribute(value="layout")
                                        HomeScreen homeScreen,
                                        org.springframework.validation.BindingResult result,
                                        @RequestParam(value="removeId")
                                        Long toolId)
Remove a Tool's association with a HomeScreen

Parameters:
uiModel -
homeScreen - the HomeScreen from which to remove the Tool association
result - the binding validation result for the HomeScreen
toolId - the id of the Tool to remove
Returns:
the home screen editing page

moveToolUp

@RequestMapping(value="layout/edit",
                method=POST,
                params="up")
public String moveToolUp(org.springframework.ui.Model uiModel,
                                        @ModelAttribute(value="layout")
                                        HomeScreen homeScreen,
                                        org.springframework.validation.BindingResult result,
                                        @RequestParam(value="removeId")
                                        Long toolId)
Move a tool up in the Tool list display order

Parameters:
uiModel -
homeScreen - the HomeScreen to edit
result - binding validation result for the HomeScreen
toolId - the id of the Tool to move
Returns:
the home screen editing page

moveToolDown

@RequestMapping(value="layout/edit",
                method=POST,
                params="down")
public String moveToolDown(org.springframework.ui.Model uiModel,
                                          @ModelAttribute(value="layout")
                                          HomeScreen homeScreen,
                                          org.springframework.validation.BindingResult result,
                                          @RequestParam(value="removeId")
                                          Long toolId)
Move a tool down in the Tool list display order

Parameters:
uiModel -
homeScreen - the HomeScreen to edit
result - binding validation result for the HomeScreen
toolId - the id of the Tool to move
Returns:
the home screen editing page

notifications

@RequestMapping(value="notifications",
                method=GET)
public String notifications(org.springframework.ui.Model uiModel)
the main entry point for notifications

Parameters:
uiModel -
Returns:
the notifications entry page

notificationForm

@RequestMapping(value="notificationForm",
                method=GET)
public String notificationForm(@RequestParam(value="id",required=false)
                                              Long id,
                                              org.springframework.ui.Model uiModel)
Create or edit a notification

Parameters:
id - (optional) the id of the notification to edit
uiModel -
Returns:
the notification edit form

editNotification

@RequestMapping(value="editNotification",
                method=GET)
public String editNotification(@RequestParam(value="id",required=true)
                                              Long id,
                                              org.springframework.ui.Model uiModel)
Edit a notification

Parameters:
id - the id of the notification to edit
uiModel -
Returns:
the notification edit form

deleteNotification

@RequestMapping(value="deleteNotification",
                method=GET)
public String deleteNotification(@RequestParam(value="id",required=true)
                                                Long id,
                                                org.springframework.ui.Model uiModel)
Delete a notification

Parameters:
id - the id of the notification to delete
uiModel -
Returns:
the notifications entry page

submit

@RequestMapping(value="notificationSubmit",
                method=POST)
public String submit(javax.servlet.http.HttpServletRequest request,
                                    org.springframework.ui.Model uiModel,
                                    @ModelAttribute(value="notification")
                                    Notification notification,
                                    org.springframework.validation.BindingResult result)
Save a notification

Parameters:
request -
uiModel -
notification - the Notification to save
result - binding validation result
Returns:
the notifications entry page

initBinder

@InitBinder
public void initBinder(org.springframework.web.bind.WebDataBinder binder)

news

@RequestMapping(value="news",
                method=GET)
public String news(org.springframework.ui.Model uiModel)
The main entry point for News publishing

Parameters:
uiModel -
Returns:
the news entry page

editNews

@RequestMapping(value="news/add",
                method=GET)
public String editNews(org.springframework.ui.Model uiModel)
Create a new NewsSource

Parameters:
uiModel -
Returns:
the news source editing page

editNews

@RequestMapping(value="news/edit/{id}",
                method=GET)
public String editNews(org.springframework.ui.Model uiModel,
                                      @PathVariable(value="id")
                                      long id)
Edit an existing NewsSource

Parameters:
uiModel -
id - the id of the NewsSource to edit
Returns:
the news source editing page

deleteNewsSource

@RequestMapping(value="news/delete/{id}",
                method=GET)
public String deleteNewsSource(org.springframework.ui.Model uiModel,
                                              @PathVariable(value="id")
                                              long id)
Delete a NewsSource

Parameters:
uiModel -
id - the id of the NewsSource to delete
Returns:
the news entry page

editNewsSource

@RequestMapping(value="news/edit",
                method=POST)
public String editNewsSource(org.springframework.ui.Model uiModel,
                                            @ModelAttribute(value="source")
                                            NewsSource source,
                                            org.springframework.validation.BindingResult result)
Save a NewsSource

Parameters:
uiModel -
source - the NewsSource to save
result - the binding validation result
Returns:
the news entry page

moveUp

@RequestMapping(value="news/up/{id}",
                method=GET)
public String moveUp(org.springframework.ui.Model uiModel,
                                    @PathVariable(value="id")
                                    long id)
Move a news feed up in the display order

Parameters:
uiModel -
id - the id of the NewsSource to move
Returns:
the news entry page

moveDown

@RequestMapping(value="news/down/{id}",
                method=GET)
public String moveDown(org.springframework.ui.Model uiModel,
                                      @PathVariable(value="id")
                                      long id)
Move a news feed down in the display order

Parameters:
uiModel -
id - the id of the NewsSource to move
Returns:
the news entry page


Copyright © 2011 The Kuali Foundation. All Rights Reserved.