DBA Data[Home] [Help]

PACKAGE: APPS.PV_CONTACT_USER_BATCH_PUB

Source


1 PACKAGE PV_CONTACT_USER_BATCH_PUB AUTHID CURRENT_USER AS
2 /* $Header: pvxpldcs.pls 120.8 2006/05/12 10:42 dhii noship $ */
3 /*#
4  * This public interface can be utilized to insert/update a set of Partner contacts into the PRM application.
5  * As a prerequisite, each contact should already exist as a Person Party in TCA.
6  * The interface can also be used to create user accounts for the Contacts.
7  * @rep:scope public
8  * @rep:product PV
9  * @rep:displayname Import Partner Contacts
10  * @rep:lifecycle active
11  * @rep:compatibility S
12  * @rep:category BUSINESS_ENTITY PV_PARTNER_PROFILE
13  */
14 
15 G_PKG_NAME CONSTANT VARCHAR2(30):= 'PV_CONTACT_USER_BATCH_PUB';
16 G_FILE_NAME CONSTANT VARCHAR2(12) := 'pvxvcnts.pls';
17 
18 g_commit_size        CONSTANT NUMBER := 50 ;
19 
20 
21 /*-----------------------------------------------------------------------------
22 -- Declaration of attribute_details_rec_type
23 ------------------------------------------------------------------------------*/
24 
25  TYPE attribute_details_rec_type IS RECORD
26     (
27         attribute_id		  number,
28 	    attr_values_tbl		  PV_ENTY_ATTR_VALUE_PUB.attr_value_tbl_type,
29 	    message_data		  varchar2(8000)
30 
31     );
32  g_miss_attribute_details_rec    attribute_details_rec_type;
33  TYPE  attr_details_tbl_type  IS TABLE OF attribute_details_rec_type INDEX BY BINARY_INTEGER;
34  g_miss_attr_details_tbl          attr_details_tbl_type;
35 
36 
37 
38 /*-----------------------------------------------------------------------------
39 -- Declaration of CONTACT_DETAILS_REC_TYPE
40 ------------------------------------------------------------------------------*/
41 
42 
43 TYPE CONTACT_DETAILS_REC_TYPE IS RECORD(
44 	Prtnr_orig_system	     VARCHAR2(30)
45 	,Prtnr_orig_system_reference  VARCHAR2(250)
46 	,partner_party_id             NUMBER
47 	,Cnt_orig_system	      VARCHAR2(30)
48 	,Cnt_orig_system_reference    VARCHAR2(250)
49 	,person_party_id              NUMBER
50 	,Contact_name		     VARCHAR2(360)
51 	,location_rec	 	     HZ_LOCATION_V2PUB.LOCATION_REC_TYPE
52 	,phone_contact_point_rec     HZ_CONTACT_POINT_V2PUB.CONTACT_POINT_REC_TYPE
53 	,business_phone_rec		     HZ_CONTACT_POINT_V2PUB. PHONE_REC_TYPE
54         ,email_contact_point_rec     HZ_CONTACT_POINT_V2PUB.CONTACT_POINT_REC_TYPE
55 	,Email_rec		     HZ_CONTACT_POINT_V2PUB. EMAIL_REC_TYPE
56 	,User_name		     VARCHAR2(100)
57 	,User_type		     VARCHAR2(100)
58 	,Password		     VARCHAR2(100)
59 	,attribute_details_tbl	     ATTR_DETAILS_TBL_TYPE
60 	,update_if_exists	     VARCHAR2(1)
61 );
62 
63 
64 /*-----------------------------------------------------------------------------
65 -- Declaration of CONTACT_OUTPUT_REC_TYPE
66 ------------------------------------------------------------------------------*/
67 
68 TYPE CONTACT_OUTPUT_REC_TYPE IS RECORD(
69 	     Prtnr_orig_system		 VARCHAR2(30)
70 	    ,Prtnr_orig_system_reference	 VARCHAR2(250)
71 	    ,Partner_party_id		 NUMBER
72 	    ,Cnt_orig_system		 VARCHAR2(30)
73 	    ,Cnt_orig_system_reference	 VARCHAR2(250)
74 	    ,Person_party_id		 NUMBER
75 	    ,Contact_rel_party_id	 NUMBER
76 	    ,user_name                   VARCHAR2(100)
77 	    ,password                    VARCHAR2(100)
78 	    ,Return_Status		 VARCHAR2(100)
79 );
80 
81 
82 TYPE  CONTACT_DETAILS_TBL_TYPE   IS TABLE OF CONTACT_DETAILS_REC_TYPE INDEX BY BINARY_INTEGER;
83 TYPE  CONTACT_OUTPUT_TBL_TYPE   IS TABLE OF  CONTACT_OUTPUT_REC_TYPE INDEX BY BINARY_INTEGER;
84 TYPE  LOG_MESSAGE_TBL_TYPE IS TABLE OF VARCHAR2(1000) INDEX BY BINARY_INTEGER;
85 
86 
87 
88 
89 /*#
90 * A public API to insert and/or update attribute information of Partner Contacts in the Oracle PRM application.
91 * Prior to insert/update, the API performs all the necessary business validations to ensure data integrity.
92 * @param p_api_version_number Version of the API
93 * @param p_init_msg_list Indicator whether to initialize the message stack
94 * @param p_mode A parameter that indicates if the API should be executed in an experimental mode.  A value of "EVALUATION" indicates that the execution is experimental and no changes are committed.  "EXECUTION" indicates that changes are to be committed.
95 * @param p_validation_level Indicator of FND validation levels
96 * @param x_return_status Status of the program
97 * @param x_msg_count Number of the messages returned by the program.
98 * @param x_msg_data Return message by the program
99 * @param p_contact_details_tbl A table that contains details about the Partner contacts that were processed by the API.
100 * @param p_update_if_exists A Boolean parameter to indicate whether or not an update should be performed if a record already exists for the Partner Contact.  True indicates that the record should be updated with the supplied data.
101 * @param p_data_block_size A numerical parameter that indicates the number of Partner Contact records to be processed per commit.
102 * @param x_contact_output_tbl Table of output records
103 * @param x_file_name Path and Name of the log file generated by the API.
104 * @rep:displayname Load Contacts
105 * @rep:scope public
106 * @rep:lifecycle active
107 * @rep:compatibility S
108 */
109 
110 PROCEDURE Load_Contacts (
111      p_api_version_number  IN  NUMBER
112     ,p_init_msg_list      IN  VARCHAR2 := FND_API.G_FALSE
113     ,p_mode               IN  VARCHAR2 := 'EVALUATION'
114     ,p_validation_level   IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL
115     ,x_return_status      OUT NOCOPY  VARCHAR2
116     ,x_msg_data           OUT NOCOPY  VARCHAR2
117     ,x_msg_count          OUT NOCOPY  NUMBER
118     ,p_contact_details_tbl		IN	CONTACT_DETAILS_TBL_TYPE
119     ,p_update_if_exists			IN 	VARCHAR2
120     ,p_data_block_size			IN	NUMBER
121     ,x_contact_output_tbl               OUT NOCOPY    CONTACT_OUTPUT_TBL_TYPE
122     ,x_file_name			OUT NOCOPY	VARCHAR2
123     ) ;
124 
125 
126 
127 /*#
128 * A public API to create a User account of a specific PRM User Type for a Partner Contact.
129 * While creating a User account, a random password is generated if none is supplied.
130 * A User account will be created only if delegated user management is supported.
131 * @param p_api_version_number Version of the API
132 * @param p_init_msg_list Indicator whether to initialize the message stack
133 * @param p_commit Indicator whether to commit within the program
134 * @param p_validation_level Indicator of FND validation levels
135 * @param p_user_name User name to be created
136 * @param p_password password for the user
137 * @param p_user_type_key User type for the user
138 * @param p_contact_rel_id party id of relationship between partner org and person contact
139 * @param x_return_status Status of the program
140 * @param x_msg_count Number of the messages returned by the program
141 * @param x_msg_data Return message by the program
142 * @rep:displayname User Create
143 * @rep:scope public
144 * @rep:lifecycle active
145 * @rep:compatibility S
146 */
147 
148 PROCEDURE user_create (
149      p_api_version_number  IN  NUMBER
150     ,p_init_msg_list      IN  VARCHAR2 := FND_API.G_FALSE
151     ,p_commit             IN  VARCHAR2 := FND_API.G_FALSE
152     ,p_validation_level   IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL
153     ,p_user_name IN VARCHAR2
154     ,p_password IN OUT NOCOPY VARCHAR2
155     ,p_user_type_key IN VARCHAR2
156     ,p_contact_rel_id IN NUMBER
157     ,x_return_status      OUT NOCOPY  VARCHAR2
158     ,x_msg_data           OUT NOCOPY  VARCHAR2
159     ,x_msg_count          OUT NOCOPY  NUMBER
160     );
161 
162 
163 /*#
164 * A public API to upgrade an existing Oracle FND user account to a PRM user account.
165 * Appropriate PRM permissions are assigned based on the passed user type .
166 * @param p_api_version_number Version of the API
167 * @param p_init_msg_list Indicator whether to initialize the message stack
168 * @param p_commit Indicator whether to commit within the program
169 * @param p_validation_level Indicator of FND validation levels
170 * @param p_user_name User name to be updated
171 * @param p_user_type_key User type for the user
172 * @param p_contact_rel_id party id of relationship between partner org and person contact
173 * @param x_return_status Status of the program
174 * @param x_msg_count Number of the messages returned by the program.
175 * @param x_msg_data Return message by the program
176 * @rep:displayname User Update
177 * @rep:scope public
178 * @rep:lifecycle active
179 * @rep:compatibility S
180 */
181 
182 
183 PROCEDURE user_update (
184      p_api_version_number  IN  NUMBER
185     ,p_init_msg_list      IN  VARCHAR2 := FND_API.G_FALSE
186     ,p_commit             IN  VARCHAR2 := FND_API.G_FALSE
187     ,p_validation_level   IN  NUMBER   := FND_API.G_VALID_LEVEL_FULL
188     ,p_user_name IN VARCHAR2
189     ,p_user_type_key IN VARCHAR2
190     ,p_contact_rel_id IN NUMBER
191     ,x_return_status      OUT NOCOPY  VARCHAR2
192     ,x_msg_data           OUT NOCOPY  VARCHAR2
193     ,x_msg_count          OUT NOCOPY  NUMBER
194     );
195 
196 END PV_CONTACT_USER_BATCH_PUB;