DBA Data[Home] [Help]

PACKAGE: APPS.GMP_RESOURCES_PUB

Source


1 PACKAGE GMP_RESOURCES_PUB AS
2 /* $Header: GMPGRESS.pls 120.1.12010000.2 2008/11/05 18:52:00 rpatangy ship $ */
3 /*#
4  * This is the public interface for OPM Generic Resources API
5  * These API can be used  for creation, updation and deletion of Generic
6  * Resources in OPM
7  * @rep:scope public
8  * @rep:product GMP
9  * @rep:displayname GMP_RESOURCES_PUB
10  * @rep:lifecycle active
11  * @rep:category BUSINESS_ENTITY GMP_GENERIC_RESOURCE
12 */
13 
14   m_api_version   CONSTANT NUMBER         := 1;
15   m_pkg_name      CONSTANT VARCHAR2 (30)  := 'GMP_RESOURCES_PUB';
16   v_insert_flag  varchar2(1) := '';
17 
18   TYPE gmp_resources_tab IS TABLE OF cr_rsrc_mst%ROWTYPE
19        INDEX BY BINARY_INTEGER;
20 
21   TYPE gmp_resources_dtl_tab IS TABLE OF cr_rsrc_dtl%ROWTYPE
22        INDEX BY BINARY_INTEGER;
23 
24   /* define record and table type to specify the column that needs to
25      updated */
26   TYPE update_table_rec_type IS RECORD
27   (
28    p_col_to_update	VARCHAR2(30)
29   ,p_value		VARCHAR2(30)
30   );
31 
32   TYPE update_tbl_type IS TABLE OF update_table_rec_type INDEX BY BINARY_INTEGER;
33 
34 
35 /*#
36  *  API for INSERT_RESOURCES
37  *  This API creates a generic resource based on the data provided as
38  *  input after validating it. It inserts a row in Resource table cr_rsrc_mst
39  *  @param p_api_version Version Number of the API
40  *  @param p_init_msg_list Flag for initializing message list BOOLEAN
41  *  @param p_commit   This is the commmit flag BOOLEAN.
42  *  @param p_resources This is the resource information is prescribed format
43  *  that need to be inserted into the resource table.
44  *  @param x_message_count Number of messages on message stack
45  *  @param x_message_list  Actual message data from message stack
46  *  @param x_return_status Return status 'S'-Success, 'E'-Error,
47  *       'U'-Unexpected Error
48  *  @rep:scope public
49  *  @rep:lifecycle active
50  *  @rep:displayname INSERT_RESOURCES
51 */
52   PROCEDURE insert_resources
53   ( p_api_version            IN   NUMBER	                   :=  1
54   , p_init_msg_list          IN   BOOLEAN	                   :=  TRUE
55   , p_commit		     IN   BOOLEAN	                   :=  FALSE
56   , p_resources              IN   cr_rsrc_mst%ROWTYPE
57   , x_message_count          OUT  NOCOPY NUMBER
58   , x_message_list           OUT  NOCOPY VARCHAR2
59   , x_return_status          IN OUT  NOCOPY VARCHAR2
60   );
61 
62 /*#
63  *  API for CHECK_DATA
64  *  This API validates the data provided that is expected to be inserted in as a
65  *  resource.
66  *  @param p_resources These is the Resource that need to be inserted into the
67  *  table.
68  *  @param p_resource_desc This is the description of the Resource
69  *  @param p_std_usage_um  Standard Usage Uom of the Resource
70  *  @param p_resource_class  Resource Class for the Resource
71  *  @param p_cost_cmpntcls_id  Cost Component Class for the Resource
72  *  @param p_min_capacity    Minimum Capacity of the Resource
73  *  @param p_max_capacity    Maximum Capacity of the Resource
74  *  @param p_capacity_uom    Resource Capacity Uom
75  *  @param p_capacity_constraint  Resource Capacity Constraint
76  *  @param p_capacity_tolerance  Capacity Tolerance
77  *  @param x_message_count Number of messages on message stack
78  *  @param x_message_list  Actual message data from message stack
79  *  @param x_return_status Return status 'S'-Success, 'E'-Error,
80  *       'U'-Unexpected Error
81  *  @rep:scope public
82  *  @rep:lifecycle active
83  *  @rep:displayname CHECK_DATA
84 */
85   PROCEDURE  check_data
86   ( p_resources        IN     VARCHAR2,
87     p_resource_desc      IN   VARCHAR2,
88     p_std_usage_um       IN   VARCHAR2,
89     p_resource_class     IN   VARCHAR2,
90     p_cost_cmpntcls_id   IN   NUMBER,
91     p_min_capacity       IN   NUMBER,
92     p_max_capacity       IN   NUMBER,
93     p_capacity_uom       IN   VARCHAR2,
94     p_capacity_constraint  IN   NUMBER,
95     p_capacity_tolerance   IN   NUMBER,
96     x_message_count      OUT  NOCOPY NUMBER,
97     x_message_list       OUT  NOCOPY VARCHAR2,
98     x_return_status      OUT  NOCOPY VARCHAR2
99  );
100 
101 /*#
102  *  API for UPDATE_RESOURCES
103  *  This API updates the given resource record with desired values.
104  *  @param p_api_version Version Number of the API
105  *  @param p_init_msg_list Flag for initializing message list BOOLEAN
106  *  @param p_commit   This is the commmit flag BOOLEAN.
107  *  @param p_resources This is the resource information expected to be updated
108  *  It contains the resource name to be updated and new values for various
109  *  columns
110  *  @param x_message_count Number of messages on message stack
111  *  @param x_message_list  Actual message data from message stack
112  *  @param x_return_status Return status 'S'-Success, 'E'-Error,
113  *       'U'-Unexpected Error
114  *  @rep:scope public
115  *  @rep:lifecycle active
116  *  @rep:displayname UPDATE_RESOURCES
117 */
118   PROCEDURE update_resources
119   ( p_api_version 	IN 	NUMBER 			        := 1
120   , p_init_msg_list 	IN 	BOOLEAN 			:= TRUE
121   , p_commit		IN 	BOOLEAN 			:= FALSE
122   , p_resources         IN      cr_rsrc_mst%ROWTYPE
123   , x_message_count 	OUT 	NOCOPY NUMBER
124   , x_message_list 	OUT 	NOCOPY VARCHAR2
125   , x_return_status	OUT 	NOCOPY VARCHAR2
126   );
127 
128 /*#
129  *  API for DELETE_RESOURCES
130  *  This API to delete an OPM resource
131  *  @param p_api_version Version Number of the API
132  *  @param p_init_msg_list Flag for initializing message list BOOLEAN
133  *  @param p_commit   This is the commmit flag BOOLEAN.
134  *  @param p_resources Theis is the Resource that needs to be deleted.
135  *  @param x_message_count Number of messages on message stack
136  *  @param x_message_list  Actual message data from message stack
137  *  @param x_return_status Return status 'S'-Success, 'E'-Error,
138  *       'U'-Unexpected Error
139  *  @rep:scope public
140  *  @rep:lifecycle active
141  *  @rep:displayname DELETE_RESOURCES
142 */
143   PROCEDURE delete_resources
144   ( p_api_version 	IN 	NUMBER 			        := 1
145   , p_init_msg_list 	IN 	BOOLEAN 			:= TRUE
146   , p_commit		IN 	BOOLEAN 			:= FALSE
147   , p_resources         IN      cr_rsrc_mst.resources%TYPE      := NULL
148   , x_message_count 	OUT 	NOCOPY NUMBER
149   , x_message_list 	OUT 	NOCOPY VARCHAR2
150   , x_return_status	OUT 	NOCOPY VARCHAR2
151   );
152 
153 END GMP_RESOURCES_PUB;