1 package ORD_DICOM_ADMIN
2 authid current_user
3 AS
4 --
5 -- public constants
6 --
7 DT_URL CONSTANT VARCHAR2(700) := 'xmlns:dt="http://xmlns.oracle.com/ord/dicom/datatype_1_0"';
8
9 STORED_TAGLIST_DOC_SET CONSTANT VARCHAR2(64) :='USER';
10 DMDL_DOC_SET CONSTANT VARCHAR2(64) :='USER';
11
12 --==============================================================================
13 --loads a single document of the specified docType into repos
14 -- docName must be unique
15 --==============================================================================
16 PROCEDURE insertDocument(
17 docName IN VARCHAR2,
18 docType IN VARCHAR2,
19 xmlDoc XMLTYPE
20 );
21
22
23 --==============================================================================
24 -- return the configuration document as an XMLType.
25 --docName uniquely identfies the document
26 --==============================================================================
27 FUNCTION getDocumentContent(docName IN VARCHAR2) return XMLTYPE;
28
29 --==============================================================================
30 -- export the document to a file specfied by fileName in the location specfied
31 -- by dirName is the directory object created by
32 -- create or replace directory command
33 -- the dirName must match the name listed in all_directories
34 --==============================================================================
35 PROCEDURE exportDocument(
36 docName IN VARCHAR2,
37 dirName IN VARCHAR2,
38 fileName IN VARCHAR2
39 );
40
41 --==============================================================================
42 -- Documents installed by Oracle cannot be removed
43 --delete of dictionary documents is not supported in this release
44 --==============================================================================
45 PROCEDURE deleteDocument(docName IN VARCHAR2 ) ;
46
47 --==============================================================================
48 -- Starts the data model edits , locks the data model
49 --==============================================================================
50 PROCEDURE editDataModel;
51
52 --==============================================================================
53 -- Commits changes and publishes the new data model
54 -- unlocks the data model
55 --==============================================================================
56 PROCEDURE publishDataModel;
57
58 --==============================================================================
59 -- aborts the changes to the data model
60 -- unlocks the data model
61 --==============================================================================
62 PROCEDURE rollbackDataModel;
63
64 --==============================================================================
65 -- Generates the STORED_TAG_LIST document as an XMLType
66 -- for the specified set of constraint and mapping documents in the repository
67 -- Useful for keeping the STORED_TAG_LIST in sync with the repos docs
68 -- args: docSet: the allowed values are 'ALL', 'ORACLE' 'USER'
69 -- The default value 'USER' is represented by the constant
70 -- STORED_TAGLIST_DOC_SET
71 --
72 --==============================================================================
73 FUNCTION generateTagListDocument(docSet in varchar2 default STORED_TAGLIST_DOC_SET)
74 return XMLType;
75
76 --==============================================================================
77 -- importDataModel: Imports the documents from a ZIP archive file in a
78 -- specified Oracle directory into the repository. Use this
79 -- procedure to install OTN releases and updates.
80 -- This procedure can also be used to import a set of
81 -- documents that was exported using the exportDataModel()
82 -- procedure.
83 -- The OTN downloads contain a complete set of Oracle-defined documents and
84 -- manifest document ordcmmft.xml.
85 --
86 -- Note: All user-defined documents must be deleted from the repository
87 -- before calling this procedure this otherwise the procedures fails
88 -- with an ORA-53068 error.
89 --
90 -- The input document set can contain either complete set of Oracle-defined
91 -- documents or user defined documents or both.
92 --
93 -- Parameters:
94 -- dirName - The directory location of the ZIP archive file containing the
95 -- set of documents to be imported into the repository.
96 -- This string is an Oracle directory object name, which is
97 -- case-sensitive. The default is uppercase.
98 -- The write privilege must be granted to the administrator for
99 -- this directory object.
100 -- zipFileName - The name of the ZIP archive file containing the set of
101 -- documents to be imported. This archive file can be downloaded
102 -- from OTN or generated by the exportDataModel() procedure.
103 --
104 --
105 -- Privileges:
106 -- The repository administrator must be granted read/write privileges on the
107 -- directory object specified by dirName.
108 -- For example:
109 -- grant read, write on directory EXAMPLEDIR to REPOSADMIN;
110 --
111 -- Java security: The repository administrator must be granted
112 -- read, write, and delete FilePermissions on the directory containing the
113 -- zip file. These permissions must also be granted to ORDSYS.
114 -- For example:
115 -- dbms_java.grant_permission( 'REPOSADMIN', 'SYS:java.io.FilePermission',
116 -- '/EXAMPLEDIR/*' , 'read,write,delete');
117 -- dbms_java.grant_permission( 'ORDSYS', 'SYS:java.io.FilePermission',
118 -- '/EXAMPLEDIR/*' , 'read,write,delete');
119 --
120 --==============================================================================
121 PROCEDURE importDataModel(dirName in VARCHAR2,
122 zipFileName in VARCHAR2);
123
124 --==============================================================================
125 -- exportDataModel
126 -- Description:
127 -- Exports the specified set of documents in the repository as a zip file
128 -- to the specified directory. The zip file name is system generated
129 -- and has the format ordcm_reposdocs_<exportOption>_timestamp.zip
130 --
131 -- Params:
132 -- dirName - the name of the directory object that will contain the zip
133 -- file.
134 -- exportOption - specifies the set the documents to be exported.
135 -- The default value is :'USER'.
136 -- USER - only user-defined documents are exported.
137 -- ALL - all repository documents are exported.
138 -- ORACLE - only oracle-defined documents are exported.
139 --
140 -- Privileges:
141 -- The repository administrator must be granted read/write privileges on the
142 -- directory object specified by dirName.
143 -- For example:
144 -- grant read, write on directory EXAMPLEDIR to REPOSADMIN;
145 --
146 -- Java security: The repository administrator must be granted
147 -- read, write, and delete FilePermissions on the directory containing the
148 -- zip file. These permissions must also be granted to ORDSYS.
149 -- For example:
150 -- dbms_java.grant_permission( 'REPOSADMIN', 'SYS:java.io.FilePermission',
151 -- '/EXAMPLEDIR/*' , 'read,write,delete');
152 -- dbms_java.grant_permission( 'ORDSYS', 'SYS:java.io.FilePermission',
153 -- '/EXAMPLEDIR/*' , 'read,write,delete');
154 --
155 --==============================================================================
156 PROCEDURE exportDataModel(dirName IN VARCHAR2,
157 exportOption IN VARCHAR2 default DMDL_DOC_SET);
158
159
160 END ORD_DICOM_ADMIN;