DBA Data[Home] [Help]

PACKAGE: APPS.AME_ATTRIBUTE_PKG

Source


1 package ame_attribute_pkg as
2 /* $Header: ameoattr.pkh 120.0 2005/07/26 06:04:33 mbocutt noship $ */
3   function attributeExists(attributeIdIn in integer) return boolean;
4   function attributeExistsForDiffIC(attributeNameIn in varchar2,
5 	                                  itemClassIdIn in integer) return boolean;
6 /*
7 AME_STRIPING
8   function calculateUseCount(attributeIdIn in integer,
9                              applicationIdIn in integer,
10                              isStripingAttributeChangeIn in varchar2 default ame_util.booleanFalse,
11                              isBecomingStripingAttributeIn in varchar2 default ame_util.booleanFalse) return integer;
12 */
13   function calculateUseCount(attributeIdIn in integer,
14                              applicationIdIn in integer) return integer;
15   function getApprovalTypeNames(attributeIdIn in integer) return varchar2;
16   function getApproverTypeId(attributeIdIn in integer) return integer;
17   function getAttributeConditionCnt(attributeIdIn in integer,
18                                     conditionTypeIn in varchar2) return integer;
19   function getAttributeConditionInUseCnt(attributeIdIn in integer,
20                                          conditionTypeIn in varchar2,
21                                          ruleIdIn in integer) return integer;
22   function getAttributeNames(actionTypeIdIn in integer) return varchar2;
23   function getDescription(attributeIdIn in integer) return varchar2;
24   function getIdByName(attributeNameIn in varchar2) return integer;
25   function getItemClassId(attributeIdIn in integer) return integer;
26   function getLineItem(attributeIdIn in integer) return varchar2;
27   function getName(attributeIdIn in integer) return varchar2;
28   function getQueryString(attributeIdIn in integer,
29                           applicationIdIn in integer) return varchar2;
30   function getStartDate(attributeIdIn in integer) return date;
31   function getStaticUsage(attributeIdIn in integer,
32                           applicationIdIn in integer) return varchar2;
33   function getType(attributeIdIn in integer) return varchar2;
34   function getUseCount(attributeIdIn in integer,
35                        applicationIdIn in integer) return varchar2;
36   function getUserEditable(attributeIdIn in integer,
37                            applicationIdIn in integer) return varchar2;
38   function getChildVersionStartDate(attributeIdIn in integer,
39                                     applicationIdIn in integer) return varchar2;
40   function getParentVersionStartDate(attributeIdIn in integer) return varchar2;
41   function hasUsage(attributeIdIn in integer,
42                     applicationIdIn in integer) return boolean;
43   function inputToCanonStaticCurUsage(attributeIdIn in integer,
44                                       applicationIdIn in integer,
45                                       queryStringIn varchar2) return varchar2;
46 /*
47 AME_STRIPING
48   function isAStripingAttribute(applicationIdIn in integer,
49                                 attributeIdIn in integer) return boolean;
50 */
51   function isInUse(attributeIdIn in integer) return boolean;
52   function isInUseByApplication(attributeIdIn in integer,
53                                 applicationIdIn in integer) return boolean;
54   function isLIneItem(attributeIdIn in integer) return boolean;
55   function isMandatory(attributeIdIn in integer) return boolean;
56   function isNonHeaderAttributeItem(attributeIdIn in integer) return boolean;
57   function isRequired(attributeIdIn in integer) return boolean;
58   function isSeeded(attributeIdIn in integer) return boolean;
59 /*
60 AME_STRIPING
61   function isStripingAttribute(applicationIdIn in integer,
62                                attributeIdIn in integer) return boolean;
63 */
64   function nameExists(nameIn in varchar2) return boolean;
65   function new(nameIn in varchar2,
66                typeIn in varchar2,
67                descriptionIn in varchar2,
68                itemClassIdIn in integer,
69                approverTypeIdIn in integer default null,
70                finalizeIn in boolean default false,
71                newStartDateIn in date default null,
72                attributeIdIn in integer default null,
73                createdByIn in integer default null) return integer;
74   function usageIsUserEditable(attributeIdIn in integer,
75                                applicationIdIn in integer) return boolean;
76   procedure change(attributeIdIn in integer,
77                    applicationIdIn in integer default null,
78                    nameIn in varchar2,
79                    typeIn in varchar2,
80                    startDateIn in date,
81                    endDateIn in date,
82                    descriptionIn in varchar2 default null,
83                    itemClassIdIn in integer,
84                    finalizeIn in boolean default false);
85   procedure changeAttributeAndUsage(attributeIdIn in integer,
86                                     applicationIdIn in integer default null,
87                                     staticUsageIn in varchar2,
88                                     queryStringIn in varchar2 default null,
89                                     nameIn in varchar2 default null,
90                                     descriptionIn in varchar2 default null,
91                                     parentVersionStartDateIn in date,
92                                     childVersionStartDateIn in date,
93                                     itemClassIdIn in integer,
94                                     finalizeIn in boolean default false);
95 /*
96 AME_STRIPING
97   procedure changeUsage(attributeIdIn in integer,
98                         applicationIdIn in integer,
99                         staticUsageIn in varchar2,
100                         queryStringIn in varchar2 default null,
101                         endDateIn in date,
102                         newStartDateIn in date,
103                         lineItemAttributeIn in varchar2,
104                         isStripingAttributeIn in varchar2 default null,
105                         finalizeIn in boolean default true);
106 */
107   procedure changeUsage(attributeIdIn in integer,
108                         applicationIdIn in integer,
109                         staticUsageIn in varchar2,
110                         queryStringIn in varchar2 default null,
111                         endDateIn in date,
112                         newStartDateIn in date,
113                         finalizeIn in boolean default false);
114   /*
115     An attribute is "active" for a given transaction type (calling application) if it is a
116     mandatory attribute, or if its ame_attribute_usages.use_count > 0.  The engine fetches
117     the values of all and only active attributes when processing a transaction.  The
118     procedure getActiveAttributes orders the attribute IDs in attributeIdsOut by attribute
119     name, so that the procedure is useful to UI code.  The engine's fetchAttributeValues
120     function also requires attribute type, and does not require the by-name ordering,
121     so it uses its own cursor for efficiency.
122   */
123   procedure getActiveAttributes(applicationIdIn in integer,
124                                 attributeIdsOut out nocopy ame_util.idList,
125                                 attributeNamesOut out nocopy ame_util.stringList);
126   procedure getActiveHeaderAttributes(applicationIdIn in integer,
127                                       attributeIdsOut out nocopy ame_util.idList,
128                                       attributeNamesOut out nocopy ame_util.stringList);
129   procedure getAllAttributes(attributeIdsOut out nocopy ame_util.stringList,
130                              attributeNamesOut out nocopy ame_util.stringList);
131   procedure getApplicationAttributes(applicationIdIn in integer,
132                                      attributeIdOut out nocopy ame_util.idList);
133   procedure getApplicationAttributes2(applicationIdIn in integer,
134                                       itemClassIdIn in integer,
135                                       attributeIdOut out nocopy ame_util.stringList,
136                                       attributeNameOut out nocopy ame_util.stringList);
137 /*
138 AME_STRIPING
139   procedure getApplicationAttributes3(applicationIdIn in integer,
140                                       attributeIdsOut out nocopy ame_util.stringList,
141                                       attributeNamesOut out nocopy ame_util.stringList);
142 */
143   procedure getAttributes(applicationIdIn in integer,
144                           ruleTypeIn in integer,
145                           lineItemIn in varchar2 default ame_util.booleanFalse,
146                           attributeIdOut out nocopy ame_util.stringList,
147                           attributeNameOut out nocopy ame_util.stringList);
148   procedure getAttributes2(applicationIdIn in integer,
149                            itemClassIdIn in integer,
150                            ruleTypeIn in integer,
151                            lineItemIn in varchar2 default ame_util.booleanFalse,
152                            attributeIdOut out nocopy ame_util.stringList,
153                            attributeNameOut out nocopy ame_util.stringList);
154   procedure getAttributes3(applicationIdIn in integer,
155                            ruleIdIn in integer,
156                            itemClassIdIn in integer,
157                            conditionTypeIn in varchar2,
158                            ruleTypeIn in integer,
159                            attributeIdOut out nocopy ame_util.stringList,
160                            attributeNameOut out nocopy ame_util.stringList);
161   procedure getAttributeConditions(attributeIdIn in integer,
162                                    conditionIdListOut out nocopy ame_util.idList);
163   procedure getAvailReqAttributes(actionTypeIdIn in integer,
164                                   attributeIdOut out nocopy ame_util.stringList,
165                                   attributeNameOut out nocopy ame_util.stringList);
166 /*
167 AME_STRIPING
168   procedure getLineItemAttributes(applicationIdIn in integer,
169                                   isStripingAttributeIn in varchar2 default ame_util.booleanFalse,
170                                   attributeIdOut out nocopy ame_util.stringList,
171                                   attributeNameOut out nocopy ame_util.stringList);
172 */
173   procedure getExistingShareableAttNames(applicationIdIn in integer,
174                                          itemClassIdIn in integer,
175                                          attributeIdsOut out nocopy ame_util.stringList,
176                                          attributeNamesOut out nocopy ame_util.stringList);
177   procedure getHeaderICAttributes(applicationIdIn in integer,
178                                   attributeIdsOut out nocopy ame_util.stringList,
179                                   attributeNamesOut out nocopy ame_util.stringList);
180   procedure getLineItemAttributes(applicationIdIn in integer,
181                                   attributeIdOut out nocopy ame_util.stringList,
182                                   attributeNameOut out nocopy ame_util.stringList);
183   procedure getLineItemAttributes2(applicationIdIn in integer,
184                                    attributeIdOut out nocopy ame_util.stringList,
185                                    attributeNameOut out nocopy ame_util.stringList);
186   procedure getMandatoryAttributes(attributeIdOut out nocopy ame_util.stringList,
187                                    attributeNameOut out nocopy ame_util.stringList,
188                                    attributeTypeOut out nocopy ame_util.stringList,
189                                    attributeStartDateOut out nocopy ame_util.stringList);
190   procedure getMandatoryAttributes2(applicationIdIn in integer,
191                                     attributeIdOut out nocopy ame_util.stringList,
192                                     attributeNameOut out nocopy ame_util.stringList,
193                                     attributeTypeOut out nocopy ame_util.stringList);
194   procedure getMandatoryAttributes3(attributeIdOut out nocopy ame_util.stringList,
195                                     attributeNameOut out nocopy ame_util.stringList,
196                                     attributeTypeOut out nocopy ame_util.stringList,
197                                     attributeStartDateOut out nocopy ame_util.stringList);
198   procedure getNonHeaderICAttributes(applicationIdIn in integer,
199                                      itemClassIdIn in integer,
200                                      attributeIdsOut out nocopy ame_util.stringList,
201                                      attributeNamesOut out nocopy ame_util.stringList);
202   procedure getNonHeaderICAttributes2(applicationIdIn in integer,
203                                       itemClassIdIn in integer,
204                                       attributeIdsOut out nocopy ame_util.idList,
205                                       attributeNamesOut out nocopy ame_util.stringList);
206   procedure getNonMandatoryAttributes(applicationIdIn in integer,
207                                       attributeIdOut out nocopy ame_util.stringList,
208                                       attributeNameOut out nocopy ame_util.stringList);
209   procedure getNonMandHeaderAttributes(applicationIdIn in integer,
210                                        attributeIdOut out nocopy ame_util.stringList,
211                                        attributeNameOut out nocopy ame_util.stringList);
212   procedure getRequiredAttributes(actionTypeIdIn in integer,
213                                   attributeIdOut out nocopy ame_util.stringList,
214                                   attributeNameOut out nocopy ame_util.stringList);
215   procedure getSubordinateICAttributes(applicationIdIn in integer,
216                                        itemClassIdIn in integer,
217                                        attributeIdsOut out nocopy ame_util.stringList,
218                                        attributeNamesOut out nocopy ame_util.stringList);
219   procedure getSubordinateICAttributes2(applicationIdIn in integer,
220                                         itemClassIdIn in integer,
221                                         attributeIdsOut out nocopy ame_util.idList,
222                                         attributeNamesOut out nocopy ame_util.stringList,
223                                         attributeTypesOut out nocopy ame_util.stringList);
224 /*
225 AME_STRIPING
226   procedure getRuleStripingAttributes(applicationIdIn in integer,
227                                       attributeIdsOut out nocopy ame_util.stringList);
228 */
229 /*
230 AME_STRIPING
234                               queryStringIn in varchar2 default null,
231   procedure newAttributeUsage(attributeIdIn in integer,
232                               applicationIdIn in integer,
233                               staticUsageIn in varchar2,
235                               newStartDateIn in date default null,
236                               lineItemAttributeIn in varchar2,
237                               isStripingAttributeIn in varchar2 default null,
238                               finalizeIn in boolean default true);
239 */
240   procedure newAttributeUsage(attributeIdIn in integer,
241                               applicationIdIn in integer,
242                               staticUsageIn in varchar2,
243                               updateParentObjectIn in boolean,
244                               queryStringIn in varchar2 default null,
245                               newStartDateIn in date default null,
246                               finalizeIn in boolean default false,
247                               parentVersionStartDateIn in date default null,
248                               createdByIn in integer default null);
249   procedure newMandatoryAttributes(attributeIdIn in integer,
250                                    actionTypeIdIn in integer,
251                                    createdByIn in integer default null);
252   procedure remove(attributeIdIn in integer,
253                    finalizeIn in boolean default false);
254   procedure removeMandatoryAttributes(attributeIdIn in integer,
255                                       actionTypeIdIn in integer,
256                                       finalizeIn in boolean default true);
257   procedure removeUsage(attributeIdIn in integer,
258                         parentVersionStartDateIn in date,
259                         childVersionStartDateIn in date,
260                         applicationIdIn in integer,
261                         allowAttributeUsageDeleteIn in boolean default false,
262                         finalizeIn in boolean default false,
263                         deleteConditionsIn in boolean default false,
264                         itemClassIdIn in integer);
265 /*
266 AME_STRIPING
267   procedure setStripingAttributesToNull(applicationIdIn in integer,
268                                         oldStripedAttributesIn in ame_util.idList default ame_util.emptyIdList,
269                                         lastStripingAttributeIn in boolean default false);
270 */
271   /*
272     Call updateUseCount in an object-layer routine after the routine does something
273     that might change an attribute's ame_attribute_usages.use_count value, which is
274     the number of rules that use the attribute, either in a condition or in an
275     action.  (In the latter case, the handler for the action's approval type may
276     require the attribute.)
277   */
278   procedure updateUseCount(attributeIdIn in integer,
279                            applicationIdIn in integer,
280                            finalizeIn in boolean default true);
281   procedure updateUseCount2(ruleIdIn in integer,
282                             applicationIdIn in integer);
283 end ame_attribute_pkg;