Class MailXSLTHelper
java.lang.Object
org.ametys.plugins.workspaces.project.helper.MailXSLTHelper
- All Implemented Interfaces:
Serviceable
Helper providing information required for mail notification
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getCalendarColor
(String calendarId) Get the color of aCalendar
from its idstatic String
getCalendarEventICSExportLink
(String eventId, String projectURL) Get the ics export link of a calendar event from its idstatic String
getFileType
(String mimeType) Get a file type from a mime type.static String
getFileTypeFromId
(String resourceId) Get a file type from a resourceId.static String
getTaskICSExportLink
(String taskId, String projectURL) Get the ics export link of a task from its idstatic boolean
hasDueDate
(String taskId) Test if a task have a due date from its idvoid
service
(ServiceManager manager)
-
Constructor Details
-
MailXSLTHelper
public MailXSLTHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getFileTypeFromId
Get a file type from a resourceId.- Parameters:
resourceId
- the id of the resource we want to get the file type- Returns:
- the name of the file type
-
getFileType
Get a file type from a mime type.- Parameters:
mimeType
- the mime type to transform- Returns:
- the name of the file type
-
getCalendarColor
Get the color of aCalendar
from its id- Parameters:
calendarId
- the calendar's id- Returns:
- the color of the calendar
-
getCalendarEventICSExportLink
Get the ics export link of a calendar event from its id- Parameters:
eventId
- the event's idprojectURL
- the URL of the project- Returns:
- the recurrence of the calendar event
-
hasDueDate
Test if a task have a due date from its id- Parameters:
taskId
- the task's id- Returns:
- true if the task has a due date
-
getTaskICSExportLink
Get the ics export link of a task from its id- Parameters:
taskId
- the task's idprojectURL
- the URL of the project- Returns:
- the recurrence of the calendar event
-