org.sakaiproject.mailsender.logic
Interface ComposeLogic


public interface ComposeLogic


Method Summary
 int countUsersByGroup(String groupId)
          Get the number of users in a group.
 int countUsersByRole(String role)
          Gets the numbers of users in a role.
 List<EmailRole> getEmailGroups()
          Get a list of groups available for this tool
 List<EmailRole> getEmailRoles()
          Read the tool config and build the email roles that are specified
 List<EmailRole> getEmailSections()
          Get the sections as by the section info tool
 String getGroupAwareRole()
          Get group-aware role which is set in sakai.properties e.g.
 String getGroupAwareRoleDefault()
          // OOTB(Out of the box) Sakai defaults
 List<org.sakaiproject.user.api.User> getUsers()
           
 List<org.sakaiproject.user.api.User> getUsersByGroup(String groupId)
          Retrieve members for the current site that are of a certain group/section
 List<org.sakaiproject.user.api.User> getUsersByRole(String role)
          Retrieve members for the current site that are of a certain role.
 

Method Detail

getEmailRoles

List<EmailRole> getEmailRoles()
                              throws org.sakaiproject.authz.api.GroupNotDefinedException
Read the tool config and build the email roles that are specified

Returns:
return EmailRoles (called from getEmailGroups())
Throws:
org.sakaiproject.authz.api.GroupNotDefinedException

getEmailGroups

List<EmailRole> getEmailGroups()
                               throws org.sakaiproject.exception.IdUnusedException
Get a list of groups available for this tool

Returns:
Throws:
org.sakaiproject.exception.IdUnusedException

getEmailSections

List<EmailRole> getEmailSections()
                                 throws org.sakaiproject.exception.IdUnusedException
Get the sections as by the section info tool

Returns:
Throws:
org.sakaiproject.exception.IdUnusedException

getGroupAwareRole

String getGroupAwareRole()
Get group-aware role which is set in sakai.properties e.g. "mailsender.group.aware.role=Student,access"

Returns:
return the String of group-aware role name

getGroupAwareRoleDefault

String getGroupAwareRoleDefault()
// OOTB(Out of the box) Sakai defaults

Returns:
return default group-aware role by type if type=course, return Student. if type=project, return access.

getUsersByRole

List<org.sakaiproject.user.api.User> getUsersByRole(String role)
                                                    throws org.sakaiproject.exception.IdUnusedException
Retrieve members for the current site that are of a certain role.

Parameters:
role -
Returns:
List of Users that are sorted by last name, first name.
Throws:
org.sakaiproject.exception.IdUnusedException

countUsersByRole

int countUsersByRole(String role)
Gets the numbers of users in a role.

Parameters:
role -
Returns:

getUsersByGroup

List<org.sakaiproject.user.api.User> getUsersByGroup(String groupId)
                                                     throws org.sakaiproject.exception.IdUnusedException
Retrieve members for the current site that are of a certain group/section

Parameters:
groupId -
Returns:
Throws:
org.sakaiproject.exception.IdUnusedException

countUsersByGroup

int countUsersByGroup(String groupId)
Get the number of users in a group.

Parameters:
groupId -
Returns:

getUsers

List<org.sakaiproject.user.api.User> getUsers()
                                              throws org.sakaiproject.exception.IdUnusedException
Throws:
org.sakaiproject.exception.IdUnusedException


Copyright © 2007-2013 Sakai Project. All Rights Reserved.