1 PACKAGE per_org_structure_version_api AS
2 /* $Header: peosvapi.pkh 120.2 2005/10/22 01:24:23 aroussel noship $ */
3 /*#
4 * This package contains APIs that create and maintain organization hierarchy
5 * versions.
6 * @rep:scope public
7 * @rep:product per
8 * @rep:displayname Organization Hierarchy Version
9 */
10 g_package VARCHAR2(33) := ' per_org_structure_version_api.';
11 --
12 --------------------------------------------------------------------------------
13 g_dummy number(1); -- Dummy for cursor returns which are not needed
14 g_business_group_id number(15); -- For validating translation;
15 g_legislation_code varchar2(150); -- For validating translation;
16 --------------------------------------------------------------------------------
17 --
18 -- ----------------------------------------------------------------------------
19 -- |-----------------------< create_org_structure_version >-------------------|
20 -- ----------------------------------------------------------------------------
21 --
22 -- {Start Of Comments}
23 /*#
24 * This API create an Organization Hierarchy Version.
25 *
26 * It creates an organization hierarchy version for a given organization
27 * hierarchy. The process initializes the version number to 1.
28 *
29 * <p><b>Licensing</b><br>
30 * This API is licensed for use with Human Resources.
31 *
32 * <p><b>Prerequisites</b><br>
33 * A valid organization structure must exist.
34 *
35 * <p><b>Post Success</b><br>
36 * On successful completion creates an organization hierarchy version for a
37 * given organization hierarchy. Returns organization structure version Id and
38 * object version number.
39 *
40 * <p><b>Post Failure</b><br>
41 * Organization hierarchy version will not be created and an error will raised.
42 * @param p_validate If true, then validation alone will be performed and the
43 * database will remain unchanged. If false and all validation checks pass,
44 * then the database will be modified.
45 * @param p_effective_date Reference date for validating lookup values are
46 * applicable during the start to end active date range. This date does not
47 * determine when the changes take effect.
48 * @param p_organization_structure_id Uniquely identifies the organization
49 * hierarchy for which the process creates a version.
50 * @param p_date_from The date the organization hierarchy version takes effect.
51 * @param p_version_number The user-enterable version number of the
52 * organization hierarchy. Version numbers do not have to be sequential.
53 * @param p_copy_structure_version_id Uniquely identifies a previously existing
54 * organization hierarchy version (if any) the process copies as the basis for
55 * the created version.
56 * @param p_date_to The date this organization hierarchy version is no longer
57 * in effect.
58 * @param p_request_id When the API is executed from a concurrent program set
59 * to the concurrent request identifier.
60 * @param p_program_application_id When the API is executed from a concurrent
61 * program set to the program's Application.
62 * @param p_program_id When the API is executed from a concurrent program set
63 * to the program's identifier.
64 * @param p_program_update_date When the API is executed from a concurrent
65 * program set to when the program was ran.
66 * @param p_topnode_pos_ctrl_enabled_fla Flag specifying if the hierarchy
67 * associated with the created hierarchy version is a top node position
68 * controlled hierarchy.
69 * @param p_org_structure_version_id If p_validate is false, then this uniquely
70 * identifies the organization hierarchy version created. If p_validate is
71 * true, then set to null.
72 * @param p_object_version_number If p_validate is false, then set to the
73 * version number of the created organization hierarchy version. If p_validate
74 * is true, then the value will be null.
75 * @param p_gap_warning The process sets to 'true' if there is a gap between
76 * the effective date ranges of hierarchy versions.
77 * @rep:displayname Create Organization Hierarchy Version
78 * @rep:category BUSINESS_ENTITY PER_ORGANIZATION_HIERARCHY
79 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
80 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
81 * @rep:scope public
82 * @rep:lifecycle active
83 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
84 */
85 --
86 -- {End Of Comments}
87 --
88 PROCEDURE create_org_structure_version
89 (p_validate in boolean default false
90 ,p_effective_date in date
91 ,p_organization_structure_id in number
92 ,p_date_from in date
93 ,p_version_number in number
94 ,p_copy_structure_version_id in number default null
95 ,p_date_to in date default null
96 ,p_request_id in number default null
97 ,p_program_application_id in number default null
98 ,p_program_id in number default null
99 ,p_program_update_date in date default null
100 ,p_topnode_pos_ctrl_enabled_fla in varchar2 default 'N'
101 ,p_org_structure_version_id out nocopy number
102 ,p_object_version_number out nocopy number
103 ,p_gap_warning out nocopy boolean
104 );
105 --
106 -- ----------------------------------------------------------------------------
107 -- |-----------------------< update_org_structure_version >-------------------|
108 -- ----------------------------------------------------------------------------
109 --
110 -- {Start Of Comments}
111 /*#
112 * This API updates an Organization Hierarchy Version.
113 *
114 * This procedure will update the organization hierarchy version for a given
115 * organization hierarchy. The system generates a version number for each new
116 * row, which Increments by one with each update.
117 *
118 * <p><b>Licensing</b><br>
119 * This API is licensed for use with Human Resources.
120 *
121 * <p><b>Prerequisites</b><br>
122 * A valid organization structure version must be existing.
123 *
124 * <p><b>Post Success</b><br>
125 * On successful completion updates the organization structure version for a
126 * given organization structure version id and returns organization structure
127 * object version number.
128 *
129 * <p><b>Post Failure</b><br>
130 * Organization structure version will not be updated and an error will raised.
131 * @param p_validate If true, then validation alone will be performed and the
132 * database will remain unchanged. If false and all validation checks pass,
133 * then the database will be modified.
134 * @param p_effective_date Reference date for validating lookup values are
135 * applicable during the start to end active date range. This date does not
136 * determine when the changes take effect.
137 * @param p_date_from The date the created hierarchy version takes effect.
138 * @param p_version_number The user-enterable version number of the hierarchy
139 * version. Version numbers do not have to be sequential.
140 * @param p_copy_structure_version_id Uniquely identifies a previously existing
141 * organization hierarchy version (if any) the process copies as the basis for
142 * the created version.
143 * @param p_date_to The date the created hierarchy version is no longer in
144 * effect.
145 * @param p_request_id When the API is executed from a concurrent program set
146 * to the concurrent request identifier.
147 * @param p_program_application_id When the API is executed from a concurrent
148 * program set to the program's Application.
149 * @param p_program_id When the API is executed from a concurrent program set
150 * to the program's identifier.
151 * @param p_program_update_date When the API is executed from a concurrent
152 * program set to when the program was ran.
153 * @param p_topnode_pos_ctrl_enabled_fla Flag specifying if the hierarchy
154 * associated with the created hierarchy version is a top node position
155 * controlled hierarchy.
156 * @param p_org_structure_version_id Uniquely identifies the organization
157 * hierarchy version the process updates.
158 * @param p_object_version_number Pass in the current version number of the
159 * Organization Hierarchy Version to be updated. When the API completes if
160 * p_validate is false, will be set to the new version number of the updated
161 * Organization Hierarchy Version. If p_validate is true will be set to the
162 * same value which was passed in.
163 * @param p_gap_warning The process sets to 'true' if there is a gap between
164 * the effective date ranges of hierarchy versions.
165 * @rep:displayname Update Organization Hierarchy Version
166 * @rep:category BUSINESS_ENTITY PER_ORGANIZATION_HIERARCHY
167 * @rep:category MISC_EXTENSIONS HR_DATAPUMP
168 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
169 * @rep:scope public
170 * @rep:lifecycle active
171 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
172 */
173 --
174 -- {End Of Comments}
175 --
176 PROCEDURE update_org_structure_version
177 (p_validate in boolean default false
178 ,p_effective_date in date
179 ,p_date_from in date
180 ,p_version_number in number
181 ,p_copy_structure_version_id in number default hr_api.g_number
182 ,p_date_to in date default hr_api.g_date
183 ,p_request_id in number default hr_api.g_number
184 ,p_program_application_id in number default hr_api.g_number
185 ,p_program_id in number default hr_api.g_number
186 ,p_program_update_date in date default hr_api.g_date
187 ,p_topnode_pos_ctrl_enabled_fla in varchar2 default hr_api.g_varchar2
188 ,p_org_structure_version_id in number
189 ,p_object_version_number in out nocopy number
190 ,p_gap_warning out nocopy boolean);
191 --
192 -- ----------------------------------------------------------------------------
193 -- |-----------------------< delete_org_structure_version >-------------------|
194 -- ----------------------------------------------------------------------------
195 --
196 -- {Start Of Comments}
197 /*#
198 * This procedure deletes an organization hierarchy version for a given
199 * organization hierarchy.
200 *
201 *
202 * <p><b>Licensing</b><br>
203 * This API is licensed for use with Human Resources.
204 *
205 * <p><b>Prerequisites</b><br>
206 * A valid organization hierarchy version must exist.
207 *
208 * <p><b>Post Success</b><br>
209 * The organization hierarchy version record will be deleted.
210 *
211 * <p><b>Post Failure</b><br>
212 * Organization hierarchy version will not be deleted and an error will raised.
213 * @param p_validate If true, then validation alone will be performed and the
214 * database will remain unchanged. If false and all validation checks pass,
215 * then the database will be modified.
216 * @param p_org_structure_version_id Uniquely identifies the organization
217 * hierarchy version the process deletes.
218 * @param p_object_version_number Current version number of the organization
219 * hierarchy version record to be deleted.
220 * @rep:displayname Delete Organization Hierarchy Version
221 * @rep:category BUSINESS_ENTITY PER_ORGANIZATION_HIERARCHY
222 * @rep:category MISC_EXTENSIONS HR_USER_HOOKS
223 * @rep:scope public
224 * @rep:lifecycle active
225 * @rep:ihelp PER/@scalapi APIs in Oracle HRMS
226 */
227 --
228 -- {End Of Comments}
229 --
230 PROCEDURE delete_org_structure_version
231 ( p_validate IN BOOLEAN default false
232 ,p_org_structure_version_id IN number
233 ,p_object_version_number IN number );
234
235 --
236 --
237 END per_org_structure_version_api;