DBA Data[Home] [Help]

PACKAGE: APPS.FND_FLEX_DESCVAL

Source


1 PACKAGE fnd_flex_descval AUTHID CURRENT_USER AS
2 /* $Header: AFFFDVLS.pls 120.1.12010000.1 2008/07/25 14:13:57 appldev ship $ */
3 
4 
5 /* ------------------------------------------------------------------------ */
6 /*	SET_CONTEXT_VALUE():						    */
7 /*	Sets the contex value in PLSQL global memory in preparation for     */
8 /*	calling validate_desccols().  See validate_desccols() for more      */
9 /*	information.							    *
10 /* ------------------------------------------------------------------------ */
11 
12   PROCEDURE set_context_value(context_value  IN  VARCHAR2);
13 
14 /* ------------------------------------------------------------------------ */
15 /*	SET_COLUMN_VALUE():						    */
16 /*	Sets the values for the named columns in PLSQL global memory in     */
17 /*	preparation for calling validate_desccols().  This function is      */
18 /*	overloaded for use with VARCHAR2, NUMBER, and DATE type columns.    */
19 /*	See validate_desccols() for more information.			    */
20 /* ------------------------------------------------------------------------ */
21 
22   PROCEDURE set_column_value(column_name  IN VARCHAR2,
23 			     column_value IN VARCHAR2);
24 
25   PROCEDURE set_column_value(column_name  IN VARCHAR2,
26 			     column_value IN NUMBER);
27 
28   PROCEDURE set_column_value(column_name  IN VARCHAR2,
29 			     column_value IN DATE);
30 
31 /* ------------------------------------------------------------------------ */
32 /*	CLEAR_COLUMN_VALUES():						    */
33 /*	Clears all values for the columns in PLSQL global memory that were  */
34 /*	defined by previous calls to set_column_value().   Note that column */
35 /*	values are also cleared after calling VALIDATE_DESCCOLS() or        */
36 /*      VAL_DESC().  See also set_column_value().                           */
37 /* ------------------------------------------------------------------------ */
38 
39   PROCEDURE clear_column_values;
40 
41 /* ------------------------------------------------------------------------ */
42 /*	VALIDATE_DESCCOLS():						    */
43 /*	Checks descriptive flexfield information prior to inserting it      */
44 /*	into the table upon which the desciptive flexfield is defined.      */
45 /*	The user must first pass the values or ids for all columns that     */
46 /*	might be used in the descriptive flexfield by setting them in       */
47 /*	PLSQL package globals by calling set_column_value(). The context    */
48 /*	column value can either be set as one of the column values, or      */
49 /*	can be set directly by set_context_value().  The context column     */
50 /*	name and the set of all possible columns the flexfield can use      */
51 /*	can be obtained from the register descriptive flexfields form.      */
52 /*
53 /*	This function is will indicate an error if any of the values are    */
54 /*	invalid, disabled, expired or not available for the current user    */
55 /*	because of value security rules.  The user information is obtained  */
56 /*	from the FND_GLOBAL package which is set automatically if the       */
57 /*	database session was started from Oracle forms or by the concurrent */
58 /*	manager.  If the session was started directly from SQL*Plus the     */
59 /*	user information is not set automatically and can optionally be     */
60 /*	passed in using resp_appl_id and resp_id.			    */
61 /*									    */
62 /*	Returns TRUE if all segments of the descriptive flexfield are	    */
63 /*	valid.  otherwise returns FALSE and sets the validation status      */
64 /*	codes to indicate the detailed nature of the error.		    */
65 /*	If this function returns TRUE, the segment information for the      */
66 /*	most recently validated flexfield can be retrieved using the data   */
67 /*	retrieval functions.  If the function returns FALSE, the segment    */
68 /*	data will be null, but the error message can be read.		    */
69 /*									    */
70 /*	Do not use enabled_activation.  This is for AOL internal use only.  */
71 /*	Only supports IDs input (values_or_ids = 'I') at this time.	    */
72 /* ------------------------------------------------------------------------ */
73 
74   FUNCTION validate_desccols(appl_short_name 	IN  VARCHAR2,
75 		    desc_flex_name	IN  VARCHAR2,
76 		    values_or_ids	IN  VARCHAR2 DEFAULT 'I',
77 		    validation_date	IN  DATE     DEFAULT SYSDATE,
78 		    enabled_activation	IN  BOOLEAN  DEFAULT TRUE,
79 		    resp_appl_id	IN  NUMBER   DEFAULT NULL,
80 		    resp_id		IN  NUMBER   DEFAULT NULL)
81 							    RETURN BOOLEAN;
82 
83 /* ------------------------------------------------------------------------ */
84 /*	VAL_DESC():							    */
85 /*	Checks descriptive flexfield information that is passed in as a     */
86 /*	concatenated string of segment ids or values.  This function is     */
87 /*	designed to be used to verify the validity of descriptive flexfield */
88 /*	information before being inserted into a table.	It will indicate    */
89 /*	an error if any of the values are invalid, disabled, expired or     */
90 /*	not available for the current user because of value security rules. */
91 /*									    */
92 /*	Returns TRUE if all segments of the descriptive flexfield are	    */
93 /*	valid.  otherwise returns FALSE and sets the validation status      */
94 /*	codes to indicate the detailed nature of the error.		    */
95 /*	If this function returns TRUE, the segment information for the      */
96 /*	most recently validated flexfield can be retrieved using the data   */
97 /*	retrieval functions.  If the function returns FALSE, the segment    */
98 /*	data will be null, but the error message can be read.		    */
99 /*									    */
100 /*	ARGUMENTS:							    */
101 /*	===========							    */
102 /*	The descriptive flexfield is identified by appl_short_name and      */
103 /*	desc_flex_name.  A string representing the concatenated ids or      */
104 /*	values is input in concat_segments.  This string should have the    */
105 /*	id or values in the order in which they are displayed in the edit   */
106 /*	window with global segments followed by the context segment,        */
107 /*	followed by the context-sensitive segments.  If ids are passed in   */
108 /*	one id is required for each enabled segment even if the segment is  */
109 /*	not displayed.  If values are input, only pass in values for the    */
110 /*	displayed segments and the rest will be defaulted.  The values or   */
111 /*	ids can be input in a PLSQL table and concatenated using the        */
112 /*	FND_FLEX_EXT.concatenate_segments() utility.  Values_or_ids         */
113 /*	indicates whether input segments are values ('V') or ids ('I').     */
114 /*	The validation date is used to check whether the values are         */
115 /*	active for that date.  The resp_appl_id, and resp_id arguments 	    */
116 /*	identify the user for the purposes of value security rules.         */
117 /*	If these are not specified the values from FND_GLOBAL will          */
118 /*	be used.  The FND_GLOBAL values are set by the form or by           */
119 /*	the concurrent program that starts this database session.           */
120 /*	The enabled_activation flag is for internal use only.  It is not    */
121 /*	supported outside of the Application Object Library.		    */
122 /* ------------------------------------------------------------------------ */
123 
124   FUNCTION val_desc(appl_short_name 	IN  VARCHAR2,
125 		    desc_flex_name	IN  VARCHAR2,
126 		    concat_segments	IN  VARCHAR2,
127 		    values_or_ids	IN  VARCHAR2 DEFAULT 'I',
128 		    validation_date	IN  DATE     DEFAULT SYSDATE,
129 		    enabled_activation	IN  BOOLEAN  DEFAULT TRUE,
130 		    resp_appl_id	IN  NUMBER   DEFAULT NULL,
131 		    resp_id		IN  NUMBER   DEFAULT NULL)
132 							    RETURN BOOLEAN;
133 
134 /* ------------------------------------------------------------------------ */
135 /*	Functions for getting more details about the most recently	    */
136 /*	validated combination.	These typically do not trap errors 	    */
137 /*	related to the user not leaving enough room in destination 	    */
138 /*	strings to store the result.					    */
139 /* ------------------------------------------------------------------------ */
140 
141 FUNCTION is_valid RETURN BOOLEAN;
142 FUNCTION is_secured RETURN BOOLEAN;
143 FUNCTION value_error RETURN BOOLEAN;
144 FUNCTION unsupported_error RETURN BOOLEAN;
145 FUNCTION serious_error RETURN BOOLEAN;
146 FUNCTION error_segment RETURN NUMBER;
147 FUNCTION error_message RETURN VARCHAR2;
148 FUNCTION encoded_error_message RETURN VARCHAR2;
149 FUNCTION segment_delimiter RETURN VARCHAR2;
150 FUNCTION concatenated_values RETURN VARCHAR2;
151 FUNCTION concatenated_ids RETURN VARCHAR2;
152 FUNCTION concatenated_descriptions RETURN VARCHAR2;
153 FUNCTION segment_count RETURN NUMBER;
154 FUNCTION segment_value(segnum  IN  NUMBER) RETURN VARCHAR2;
155 FUNCTION segment_id(segnum  IN  NUMBER) RETURN VARCHAR2;
156 FUNCTION segment_description(segnum  IN  NUMBER) RETURN VARCHAR2;
157 FUNCTION segment_concat_desc_length(segnum  IN  NUMBER) RETURN NUMBER;
158 FUNCTION segment_displayed(segnum  IN  NUMBER) RETURN BOOLEAN;
159 FUNCTION segment_valid(segnum  IN  NUMBER) RETURN BOOLEAN;
160 FUNCTION segment_column_name(segnum  IN  NUMBER) RETURN VARCHAR2;
161 FUNCTION segment_column_type(segnum  IN  NUMBER) RETURN VARCHAR2;
162 
163 /* ------------------------------------------------------------------------ */
164 
165 END fnd_flex_descval;