1 PACKAGE dbms_auto_task AS
2
3 TYPE window_calendar_entry IS RECORD (
4 window_name dba_scheduler_windows.window_name%TYPE,
5 start_time TIMESTAMP WITH TIME ZONE,
6 duration dba_scheduler_windows.duration%TYPE);
7
8 TYPE window_calendar_t IS TABLE OF window_calendar_entry;
9
10 TYPE winname_t IS RECORD (
11 window_name dba_scheduler_windows.window_name%TYPE,
12 start_date TIMESTAMP WITH TIME ZONE,
13 end_date TIMESTAMP WITH TIME ZONE);
14
15 TYPE refcur_winname_t IS REF CURSOR RETURN winname_t;
16
17 FUNCTION WINDOW_CALENDAR(w refcur_winname_t) RETURN window_calendar_t PIPELINED;
18
19 -- compute a list of the task scheduled date provide the start and end dates.
20 -- taskname is the defined autotask name (used by EM)
21 PROCEDURE get_schedule_date
22 (taskname IN VARCHAR2,
23 start_date IN timestamp with time zone,
24 end_date IN timestamp with time zone,
25 scheduled_list OUT ket$_window_list);
26
27 --
28 -- combines supplied attribute flag sets into a single set of attribute
29 -- flags. Arguments listed in order of descending priority. I.e.
30 -- task_rep_attr settings, if any, override all of the other setings.
31 --
32 FUNCTION reconcile_attributes (
33 cli_comp_attr IN NUMBER DEFAULT 0, -- client compile-time attributes
34 cli_rep_attr IN NUMBER DEFAULT 0, -- client repository attributes
35 op_comp_attr IN NUMBER DEFAULT 0, -- operation compile-time attributes
36 op_rep_attr IN NUMBER DEFAULT 0, -- operation repository attributes
37 task_comp_attr IN NUMBER DEFAULT 0, -- task client-defined attributes
38 task_rep_attr IN NUMBER DEFAULT 0 -- task repository override attributes
39 ) RETURN NUMBER;
40
41 --
42 -- decode attribute flags into a string for display
43 --
44 FUNCTION decode_attributes (attr NUMBER DEFAULT 0) RETURN VARCHAR2;
45
46 --
47 -- determine if a given client's status should be overridden to DISABLED
48 -- even if it is ENABLED on disk (e.g. pack disabled, underscore parameter, etc).
49 -- A return value of 1 means such an override exists, 0 means it does not.
50 --
51 FUNCTION get_client_status_override(client_id IN PLS_INTEGER) RETURN PLS_INTEGER;
52
53 --
54 -- signal an error if the client is overridden to DISABLED even if it is
55 -- enabled on disk (e.g. pack disabled, underscore parameter, etc). Called to
56 -- validate an ENABLE operation.
57 --
58 PROCEDURE check_client_status_override(client_id IN PLS_INTEGER);
59
60 END dbms_auto_task;