|
boolean | itsMe (String id) |
|
boolean | myTurn (HttpServletRequest request) |
|
void | execute (ServletContext context, HttpServletRequest request, HttpServletResponse response) |
|
◆ execute()
void org.turro.elephant.calendar.FullCalendarUtil.execute |
( |
ServletContext |
context, |
|
|
HttpServletRequest |
request, |
|
|
HttpServletResponse |
response |
|
) |
| |
Implements org.turro.elephant.direct.IDirectContent.
Definition at line 61 of file FullCalendarUtil.java.
63 String pstart = request.getParameter(
"start"),
64 pend = request.getParameter(
"end");
65 if(!Strings.isBlank(pstart) && !Strings.isBlank(pend)) {
66 Date start = Iso8601DateFormat.getDate(pstart +
"T00:00:00");
67 Date end = Iso8601DateFormat.getDate(pend +
"T00:00:00");
68 HashMap<String, String> args =
new HashMap<>();
69 if(!Strings.isBlank(request.getParameter(
"webInfo"))) {
70 args.put(
"webInfo", request.getParameter(
"webInfo"));
72 if(!Strings.isBlank(request.getParameter(
"pubCats"))) {
73 args.put(
"publicationCategories", request.getParameter(
"pubCats"));
75 if(!Strings.isBlank(request.getParameter(
"pubGroups"))) {
76 args.put(
"publicationGroups", request.getParameter(
"pubGroups"));
78 if(!Strings.isBlank(request.getParameter(
"dosCats"))) {
79 args.put(
"dossierCategories", request.getParameter(
"dosCats"));
81 if(!Strings.isBlank(request.getParameter(
"convPaths"))) {
82 args.put(
"convocationPaths", request.getParameter(
"convPaths"));
84 if(!Strings.isBlank(request.getParameter(
"servTypes"))) {
85 args.put(
"serviceTypes", request.getParameter(
"servTypes"));
87 if(!Strings.isBlank(request.getParameter(
"required"))) {
88 args.put(
"required", request.getParameter(
"required"));
90 if(!Strings.isBlank(request.getParameter(
"target"))) {
91 args.put(
"target", request.getParameter(
"target"));
93 response.setContentType(
"application/json");
96 }
catch (IOException ex) {
97 Logger.getLogger(FullCalendarUtil.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
static String getPublicEvents(Date start, Date end, HashMap< String, String > args)
◆ getIdentifier()
static String org.turro.elephant.calendar.FullCalendarUtil.getIdentifier |
( |
| ) |
|
|
static |
Definition at line 46 of file FullCalendarUtil.java.
47 return FullCalendarUtil.class.getAnnotation(DirectContent.class).identifier();
◆ getPublicEvents()
static String org.turro.elephant.calendar.FullCalendarUtil.getPublicEvents |
( |
Date |
start, |
|
|
Date |
end, |
|
|
HashMap< String, String > |
args |
|
) |
| |
|
static |
Definition at line 101 of file FullCalendarUtil.java.
102 String url = args.get(
"webInfo");
103 ArrayList<FullCalendarEvent> fevents =
new ArrayList<>();
104 for(ICalendarEvent evt : Events.getPublicEvents(start, end, args)) {
105 FullCalendarEvent fce =
new FullCalendarEvent();
106 fce.start = evt.getBeginDate();
107 fce.end = evt.getEndDate();
108 fce.title = evt.getTitle();
109 fce.description = evt.getContent();
110 fce.motive = evt.getMotive();
111 fce.url = Strings.isBlank(url) ? evt.getPath() : url +
"?webInfo=" + evt.getPath();
114 return new GsonBuilder().setDateFormat(
"yyyy-MM-dd'T'HH:mm:ssX").create().toJson(fevents);
◆ itsMe()
boolean org.turro.elephant.calendar.FullCalendarUtil.itsMe |
( |
String |
id | ) |
|
◆ myTurn()
boolean org.turro.elephant.calendar.FullCalendarUtil.myTurn |
( |
HttpServletRequest |
request | ) |
|
The documentation for this class was generated from the following file: