1 Package HR_ADI_DOCUMENT_API AUTHID CURRENT_USER as
2 /* $Header: hrlobapi.pkh 115.2 2002/11/21 14:22:23 menderby noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------< CREATE_DOCUMENT >----------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- This API is provided to allow creation of new documents within the
11 -- FND_LOBS table.
12 --
13 -- Prerequisites:
14 --
15 -- In Parameters:
16 -- Name Reqd Type Description
17 -- p_validate No boolean Commit or rollback
18 -- p_effective_date Yes date Effective date of the document
19 -- p_mime_type Yes varchar2 The MIME type of document
20 -- p_file_name Yes varchar2 The name of the file
21 -- p_type Yes varchar2 Lookup code relating to file
22 -- type lookup HRMS_ADI_FILE_TYPE
23 --
24 -- Post Success:
25 -- When the document has been sucessfully been inserted the following
26 -- parameters are set:
27 --
28 -- Name Type Description
29 -- p_file_id number PK of FND_LOBS.
30 --
31 -- Post Failure:
32 -- The API does not create the document and raises an error.
33 --
34 -- Access Status:
35 -- Public.
36 --
37 -- {End Of Comments}
38 --
39 procedure CREATE_DOCUMENT
40 (p_validate in boolean default false
41 ,p_effective_date in date
42 ,p_mime_type in varchar2
43 ,p_file_name in varchar2
44 ,p_type in varchar2
45 ,p_file_id out nocopy number
46 );
47 --
48 --
49 -- ----------------------------------------------------------------------------
50 -- |---------------------------< UPDATE_DOCUMENT >----------------------------|
51 -- ----------------------------------------------------------------------------
52 -- {Start Of Comments}
53 --
54 -- Description:
55 -- This API is provided to allow updating of documents within the
56 -- FND_LOBS table.
57 --
58 -- Prerequisites:
59 -- (i) The FILE_ID must exist within the FND_LOBS table.
60 --
61 --
62 -- In Parameters:
63 -- Name Reqd Type Description
64 -- p_validate No boolean Commit or rollback
65 -- p_effective_date Yes date Effective date of the document
66 -- p_file_id Yes number The PK of FND_LOBS
67 -- p_mime_type Yes varchar2 MIME type of upload file
68 -- p_file_name Yes varchar2 The name of the file
69 --
70 -- Post Success:
71 -- When the document has been sucessfully been updated the following
72 -- parameters are set:
73 --
74 -- Name Type Description
75 --
76 -- Post Failure:
77 -- The API does not update the file and raises an error.
78 --
79 -- Access Status:
80 -- Public.
81 --
82 -- {End Of Comments}
83 --
84 procedure UPDATE_DOCUMENT
85 (p_validate in boolean default false
86 ,p_effective_date in date
87 ,p_file_id in number
88 ,p_mime_type in varchar2
89 ,p_file_name in varchar2
90 );
91 --
92 --
93 -- ----------------------------------------------------------------------------
94 -- |---------------------------< DELETE_DOCUMENT >----------------------------|
95 -- ----------------------------------------------------------------------------
96 -- {Start Of Comments}
97 --
98 -- Description:
99 -- This API is provided to allow deletion of documents within the
100 -- FND_LOBS table.
101 --
102 -- Prerequisites:
103 -- (i) The FILE_ID must exist within the FND_LOBS table.
104 --
105 --
106 -- In Parameters:
107 -- Name Reqd Type Description
108 -- p_validate No boolean Commit or rollback
109 -- p_file_id Yes number The PK of FND_LOBS
110 --
111 -- Post Success:
112 -- The record will cease to exist.
113 --
114 -- Post Failure:
115 -- The record will exist, and an error will be raised.
116 --
117 -- Access Status:
118 -- Public.
119 --
120 -- {End Of Comments}
121 --
122 procedure DELETE_DOCUMENT
123 (p_validate in boolean default false
124 ,p_file_id in number
125 );
126 --
127
128 function search_for_term(p_search_term in varchar2,
129 p_document_type in varchar2 default null)
130 return varchar2;
131
132 function document_to_text(p_file_id in varchar2, p_text_or_html varchar2) return clob;
133
134 end HR_ADI_DOCUMENT_API;