|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.surfnet.coin.teams.util.ControllerUtilImpl
@Component(value="controllerUtil") public class ControllerUtilImpl
This class includes methods that are often used by controllers
| Constructor Summary | |
|---|---|
ControllerUtilImpl()
|
|
| Method Summary | |
|---|---|
javax.mail.internet.MimeMultipart |
getMimeMultipartMessageBody(String plainText,
String html)
Makes MimeMultipart with a plain text and html version of the mail |
Team |
getTeam(javax.servlet.http.HttpServletRequest request)
Get the team from the HttpServletRequest request. |
Team |
getTeamById(String teamId)
Get the team from the String teamId. |
boolean |
hasUserAdministrativePrivileges(nl.surfnet.coin.api.client.domain.Person person,
String teamId)
Checks if the current user has administrative privileges (whether he is admin OR manager) for a given team. |
boolean |
hasUserAdminPrivileges(nl.surfnet.coin.api.client.domain.Person person,
String teamId)
Checks if the current user has admin privileges for a given team. |
boolean |
isPersonMemberOfTeam(String personId,
Team team)
Check if a Person is member of the given Team |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ControllerUtilImpl()
| Method Detail |
|---|
public Team getTeam(javax.servlet.http.HttpServletRequest request)
HttpServletRequest request.
getTeam in interface ControllerUtilrequest - the HttpServletRequest
Team team
RuntimeException - if the team cannot be foundpublic Team getTeamById(String teamId)
String teamId.
getTeamById in interface ControllerUtilteamId - the String teamId
Team team
RuntimeException - if the team cannot be found
public boolean hasUserAdministrativePrivileges(nl.surfnet.coin.api.client.domain.Person person,
String teamId)
hasUserAdministrativePrivileges in interface ControllerUtilperson - PersonteamId - String the team Id for which the person's privileges are checked
boolean true/code> if the user is admin AND/OR manager false if the user isn't
public boolean hasUserAdminPrivileges(nl.surfnet.coin.api.client.domain.Person person,
String teamId)
hasUserAdminPrivileges in interface ControllerUtilperson - PersonteamId - String the team Id for which the person's privileges are checked
boolean true/code> if the user is admin AND/OR manager false if the user isn't
public boolean isPersonMemberOfTeam(String personId,
Team team)
Person is member of the given Team
isPersonMemberOfTeam in interface ControllerUtilpersonId - String the person identifierteam - Team the team
public javax.mail.internet.MimeMultipart getMimeMultipartMessageBody(String plainText,
String html)
throws javax.mail.MessagingException
ControllerUtilMimeMultipart with a plain text and html version of the mail
getMimeMultipartMessageBody in interface ControllerUtilplainText - contents of the plain text part of the mailhtml - contents of the html part of the mail
javax.mail.MessagingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||