Package org.kuali.rice.ken.web.spring
Class BaseSendNotificationController
java.lang.Object
org.kuali.rice.ken.web.spring.BaseSendNotificationController
- Direct Known Subclasses:
SendEventNotificationMessageController,SendNotificationMessageController
Base class for KEN controllers for sending notifications
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataObjectServiceprotected org.kuali.rice.kim.api.group.GroupServiceprotected org.kuali.rice.kim.api.identity.IdentityServiceprotected NamespaceServiceprotected NotificationChannelServiceprotected NotificationMessageContentServiceprotected NotificationRecipientServiceprotected NotificationServiceprotected NotificationWorkflowDocumentService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NotificationBocreateNotification(javax.servlet.http.HttpServletRequest request, Map<String, Object> model, ErrorList errors) Provides an overridable method in which to customize a createdNotificationBoinstance.protected WorkflowDocumentcreateNotificationWorkflowDocument(javax.servlet.http.HttpServletRequest request, String initiatorId, Map<String, Object> model) Creates a notificationWorkflowDocument.protected Dateorg.kuali.rice.kim.api.group.GroupServiceorg.kuali.rice.kim.api.identity.IdentityServiceprotected StringgetParameter(javax.servlet.http.HttpServletRequest request, String parameterName, Map<String, Object> model, ErrorList errors, String errorMessage) protected StringgetParameter(javax.servlet.http.HttpServletRequest request, String parameterName, Map<String, Object> model, ErrorList errors, String errorMessage, String defaultValue) protected String[]getParameterList(javax.servlet.http.HttpServletRequest request, String parameterName, Map<String, Object> model, ErrorList errors, String errorMessage) protected StringgetPrincipalIdFromIdOrName(String principalIdOrName) protected booleanisUserRecipientValid(String user, ErrorList errors) protected booleanisWorkgroupRecipientValid(String groupName, String namespaceCode, ErrorList errors) protected String[]parseCommaSeparatedValues(javax.servlet.http.HttpServletRequest request, String param) protected String[]parseUserRecipients(javax.servlet.http.HttpServletRequest request) protected String[]parseWorkgroupNamespaceCodes(javax.servlet.http.HttpServletRequest request) protected String[]parseWorkgroupRecipients(javax.servlet.http.HttpServletRequest request) protected NotificationBopopulateNotificationInstance(javax.servlet.http.HttpServletRequest request, Map<String, Object> model) Creates a newNotificationBoinstance.voidsetDataObjectService(DataObjectService dataObjectService) voidsetGroupService(org.kuali.rice.kim.api.group.GroupService groupService) voidsetIdentityService(org.kuali.rice.kim.api.identity.IdentityService identityService) voidsetNamespaceService(NamespaceService namespaceService) voidsetNotificationChannelService(NotificationChannelService notificationChannelService) voidsetNotificationMessageContentService(NotificationMessageContentService notificationMessageContentService) voidsetNotificationRecipientService(NotificationRecipientService notificationRecipientService) voidsetNotificationService(NotificationService notificationService) voidsetNotificationWorkflowDocumentService(NotificationWorkflowDocumentService notificationWorkflowDocumentService) setupModelForSendNotification(javax.servlet.http.HttpServletRequest request) Prepares the model used for sending the notification.protected org.springframework.web.servlet.ModelAndViewsubmitNotificationMessage(javax.servlet.http.HttpServletRequest request, String routeMessage, String viewName) Submits the actual event notification message.
-
Field Details
-
notificationService
-
notificationWorkflowDocumentService
@Autowired @Qualifier("notificationWorkflowDocumentService") protected NotificationWorkflowDocumentService notificationWorkflowDocumentService -
notificationChannelService
@Autowired @Qualifier("notificationChannelService") protected NotificationChannelService notificationChannelService -
notificationRecipientService
@Autowired @Qualifier("notificationRecipientService") protected NotificationRecipientService notificationRecipientService -
notificationMessageContentService
@Autowired @Qualifier("messageContentService") protected NotificationMessageContentService notificationMessageContentService -
dataObjectService
-
identityService
@Autowired @Qualifier("kimIdentityService") protected org.kuali.rice.kim.api.identity.IdentityService identityService -
groupService
@Autowired @Qualifier("kimGroupService") protected org.kuali.rice.kim.api.group.GroupService groupService -
namespaceService
-
-
Constructor Details
-
BaseSendNotificationController
public BaseSendNotificationController()
-
-
Method Details
-
getParameter
-
getParameter
-
getParameterList
-
getDate
-
parseUserRecipients
-
parseWorkgroupRecipients
-
parseWorkgroupNamespaceCodes
-
parseCommaSeparatedValues
-
isUserRecipientValid
-
isWorkgroupRecipientValid
-
getPrincipalIdFromIdOrName
-
submitNotificationMessage
protected org.springframework.web.servlet.ModelAndView submitNotificationMessage(javax.servlet.http.HttpServletRequest request, String routeMessage, String viewName) Submits the actual event notification message.- Parameters:
request- the servlet requestrouteMessage- the message to attach to the route actionviewName- the name of the view to forward to after completion- Returns:
- the next view to show
- Throws:
javax.servlet.ServletExceptionIOException
-
createNotificationWorkflowDocument
protected WorkflowDocument createNotificationWorkflowDocument(javax.servlet.http.HttpServletRequest request, String initiatorId, Map<String, Object> model) throws IllegalArgumentException, ErrorListCreates a notificationWorkflowDocument.- Parameters:
request- the servlet requestinitiatorId- the user sending the notificationmodel- the Spring MVC model- Returns:
- a
WorkflowDocumentfor the notification - Throws:
IllegalArgumentExceptionErrorList
-
populateNotificationInstance
protected NotificationBo populateNotificationInstance(javax.servlet.http.HttpServletRequest request, Map<String, Object> model) throws IllegalArgumentException, ErrorListCreates a newNotificationBoinstance.- Parameters:
request- the servlet requestmodel- the Spring MVC model- Returns:
- a new notification
- Throws:
IllegalArgumentExceptionErrorList
-
createNotification
protected NotificationBo createNotification(javax.servlet.http.HttpServletRequest request, Map<String, Object> model, ErrorList errors) throws ErrorListProvides an overridable method in which to customize a createdNotificationBoinstance.- Parameters:
request- the servlet requestmodel- the Spring MVC modelerrors- the error list- Returns:
- a new notification
- Throws:
ErrorList
-
setupModelForSendNotification
protected Map<String,Object> setupModelForSendNotification(javax.servlet.http.HttpServletRequest request) Prepares the model used for sending the notification.- Parameters:
request- the servlet request- Returns:
- the Spring MVC model
-
getNotificationService
-
setNotificationService
-
getNotificationWorkflowDocumentService
-
setNotificationWorkflowDocumentService
public void setNotificationWorkflowDocumentService(NotificationWorkflowDocumentService notificationWorkflowDocumentService) -
getNotificationChannelService
-
setNotificationChannelService
-
getNotificationRecipientService
-
setNotificationRecipientService
public void setNotificationRecipientService(NotificationRecipientService notificationRecipientService) -
getNotificationMessageContentService
-
setNotificationMessageContentService
public void setNotificationMessageContentService(NotificationMessageContentService notificationMessageContentService) -
getDataObjectService
-
setDataObjectService
-
getIdentityService
public org.kuali.rice.kim.api.identity.IdentityService getIdentityService() -
setIdentityService
public void setIdentityService(org.kuali.rice.kim.api.identity.IdentityService identityService) -
getGroupService
public org.kuali.rice.kim.api.group.GroupService getGroupService() -
setGroupService
public void setGroupService(org.kuali.rice.kim.api.group.GroupService groupService) -
getNamespaceService
-
setNamespaceService
-