DBA Data[Home] [Help]

PACKAGE: SYS.XS_DIAG

Source


1 PACKAGE XS_DIAG AUTHID CURRENT_USER AS
2 
3   -- Exeption when maximum number of messages allowed is set to be less than 1.
4   ERR_INVALID_MSG_MAX CONSTANT NUMBER := -20028;
5   EXCP_INVALID_MSG_MAX EXCEPTION;
6   PRAGMA EXCEPTION_INIT(EXCP_INVALID_MSG_MAX, -20028);
7 
8 
9 /******************************************************************************
10                        Validation Routines
11 
12 Input:
13   name               The name of object to be validated.
14   error_limit        The maximum number of errors that may be stored in the
15                      validation table.
16   policy             The name of the policy to be validated
17   table_owner        The owner of the table/view.
18   table_name         The name of the table/view.
19 
20 Output:
21   Return TRUE if the object is valid, otherwise return FALSE.
22 
23   For each identified inconsistency, a row will be inserted into
24   XS$VALIDATION_TABLE until the maximum number of inconisistencies that may be
25   store has been reached.
26 
27   VALIDATE_DATA_SECURITY() provides three styles of policy validation:
28   1. When policy is not null and table_name is null, the function will
29      validate the policy against all the tables that the policy is applied to.
30      Note, when table_name is null, table_owner will be ignored even if it is
31      not null.
32 
33   2. When both policy and table_name are not null, the function will validate
34      the policy against the specific table. If table_owner is not provided, the
35      current schema will be used.
36 
37   3. When policy is null and table name is not null, the function will validate
38      all the policies applied to the table against the table. If table_owner is
39      not provided, the current schema will be used.
40 
41 ******************************************************************************/
42 
43 
44   -- Validate principal.
45   FUNCTION validate_principal(name         IN VARCHAR2,
46                               error_limit  IN PLS_INTEGER := 1)
47     RETURN BOOLEAN;
48 
49   -- Validate roleset.
50   FUNCTION validate_roleset(name         IN VARCHAR2,
51                             error_limit  IN PLS_INTEGER := 1)
52     RETURN BOOLEAN;
53 
54   -- Validate security class.
55   FUNCTION validate_security_class(name         IN VARCHAR2,
56                                    error_limit  IN PLS_INTEGER := 1)
57     RETURN BOOLEAN;
58 
59   -- Validate acl.
60   FUNCTION validate_acl(name         IN VARCHAR2,
61                         error_limit  IN PLS_INTEGER := 1)
62     RETURN BOOLEAN;
63 
64   -- Validate data security policy against a specific table.
65   FUNCTION validate_data_security(policy         IN VARCHAR2 := NULL,
66                                   table_owner    IN VARCHAR2 := NULL,
67                                   table_name     IN VARCHAR2 := NULL,
68                                   error_limit    IN PLS_INTEGER := 1)
69     RETURN BOOLEAN;
70 
71   -- Validate namespace template.
72   FUNCTION validate_namespace_template(name         IN VARCHAR2,
73                                        error_limit  IN PLS_INTEGER := 1)
74     RETURN BOOLEAN;
75 
76   -- Validate an entire workspace.
77   FUNCTION validate_workspace(error_limit  IN PLS_INTEGER := 1)
78     RETURN BOOLEAN;
79 
80 END XS_DIAG;