Home > Contents > Index >
Expanded TOC | Accordion TOC | Annotated TOC | Index
ICS.AppEvent
Creates an event that triggers a registered application logic.
Syntax
public boolean AppEvent(String name, String guid, String times, FTValList params)Parameters
name
- Name to register the event under. Do not use special characters in event name, such as "{", "*", or "&".
guid
- The name of the servlet that is called when the event is triggered.
times
- Time at which the event will be triggered. Use the format:
hh:mm:ss W/DD/MM
- where:
hh
(hour): 0 - 23mm
(minute): 0 - 59ss
(second): 0 - 59W
(day of the week): 0 - 6 with 0 = Sunday.DD
(day of the month): 1 - 31MM
(month): 1 - 12- For each of these fields, it is valid to use an asterisk (all legal values) or a list of elements separated by commas. A value can be one or more numbers separated by a minus sign indicating an inclusive range. For example:
2, 5 - 7:0:0 1/*/*- means the event is triggered at 2 a.m., 5 a.m., 6 a.m. and 7 a.m. every Monday.
- Specify days by two fields: day of the month (DD) and day of the week (W). If both are specified, both take effect. For example, 1:0:0 1/15/* means the event is triggered at 1 a.m. every Monday, as well as on the fifteenth of each month. To specify days by only one field, set the other field to *.
params
- A list of name/value pairs that are passed to the servlet. May be null.
Description
The
AppEvent
method creates an event that triggers a registered application logic.Returns
Boolean value indicating success or failure.
Error Numbers
Use
GetErrno
to view the error.Possible values of
errno
include:
Value Description-200
Failed to register event.-201
Exception in event. (May appear as-200
.)
Example
This example registers an event that will invoke the Sites application logic. The event will be triggered every day at 1:10 p.m. and invoke Sites to process the pagename
API/Main
. Note that the single parameter to this application logic is passed in theFTValList
.
ics.ClearErrno(); FTValList params = new FTValList() params.setValString( "pagename" , "API/Main" ); String csGUID = "ContentServer"; ics.AppEvent( "AppEvent" , csGUID , "13:10:00 */*/*" , params ); int errs = ics.GetErrno();See Also
DeployJSPFile , DestroyEvent , EmailEvent , EnableEvent , SendMail
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.