Class MailXSLTHelper
- java.lang.Object
-
- org.ametys.plugins.workspaces.project.helper.MailXSLTHelper
-
- All Implemented Interfaces:
Serviceable
public class MailXSLTHelper extends Object implements Serviceable
Helper providing information required for mail notification
-
-
Constructor Summary
Constructors Constructor Description MailXSLTHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringgetCalendarColor(String calendarId)Get the color of aCalendarfrom its idstatic StringgetCalendarEventEndDate(String eventId)Get the end date of a calendar event from its idstatic StringgetCalendarEventRecurrence(String eventId)Get the recurrence of a calendar event from its idstatic StringgetCalendarEventRepeatUntil(String eventId)Get the date of end of recurrence of a calendar event from its idstatic StringgetCalendarEventStartDate(String eventId)Get the start date of a calendar event from its idstatic StringgetFileType(String mimeType)Get a file type from a mime type.static StringgetFileTypeFromId(String resourceId)Get a file type from a resourceId.static StringgetThreadAuthorFullname(String threadId)Get the author's fullname of a thread by its idstatic StringgetThreadCreationDate(String threadId)Get the creation date of a thread by its idstatic booleanisCalendarEventFullDay(String eventId)Test if a calendar event last all day from its idvoidservice(ServiceManager manager)
-
-
-
Constructor Detail
-
MailXSLTHelper
public MailXSLTHelper()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getFileTypeFromId
public static String getFileTypeFromId(String resourceId)
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
public static String getFileType(String mimeType)
Get a file type from a mime type.- Parameters:
mimeType- the mime type to transform- Returns:
- the name of the file type
-
getCalendarColor
public static String getCalendarColor(String calendarId)
Get the color of aCalendarfrom its id- Parameters:
calendarId- the calendar's id- Returns:
- the color of the calendar
-
getCalendarEventStartDate
public static String getCalendarEventStartDate(String eventId)
Get the start date of a calendar event from its id- Parameters:
eventId- the event's id- Returns:
- the
Stringrepresentation of the date
-
getCalendarEventEndDate
public static String getCalendarEventEndDate(String eventId)
Get the end date of a calendar event from its id- Parameters:
eventId- the event's id- Returns:
- the
Stringrepresentation of the date
-
isCalendarEventFullDay
public static boolean isCalendarEventFullDay(String eventId)
Test if a calendar event last all day from its id- Parameters:
eventId- the event's id- Returns:
- true if the calendar event last all day
-
getCalendarEventRecurrence
public static String getCalendarEventRecurrence(String eventId)
Get the recurrence of a calendar event from its id- Parameters:
eventId- the event's id- Returns:
- the recurrence of the calendar event
-
getCalendarEventRepeatUntil
public static String getCalendarEventRepeatUntil(String eventId)
Get the date of end of recurrence of a calendar event from its id- Parameters:
eventId- the event's id- Returns:
- the
Stringrepresentation of the date of end of recurrence
-
getThreadCreationDate
public static String getThreadCreationDate(String threadId)
Get the creation date of a thread by its id- Parameters:
threadId- the thread's id- Returns:
- the
Stringrepresentation of the creation date of the thread
-
getThreadAuthorFullname
public static String getThreadAuthorFullname(String threadId)
Get the author's fullname of a thread by its id- Parameters:
threadId- the thread's id- Returns:
- the author fullname
-
-