6: -- Maximum # of attempts to try when locking
7: MAX_SECONDS_TO_WAIT_FOR_LOCK CONSTANT INTEGER := 10;
8:
9: --
10: -- Creates an entry in the jdr_paths table for the document or package.
11: -- The full name of the document/package must be specified. Any packages
12: -- which do not already exist will be created as well.
13: --
14: -- Parameters:
29: xmlencoding VARCHAR2) RETURN NUMBER;
30:
31:
32: --
33: -- Creates an entry in the jdr_paths document.
34: --
35: -- Parameters:
36: -- username - user who is creating the document
37: -- pathname - the name of the document/package (not fully qualified)
47: --
48: FUNCTION createPath(
49: username VARCHAR2,
50: pathname VARCHAR2,
51: ownerID JDR_PATHS.PATH_OWNER_DOCID%TYPE,
52: pathSeq JDR_PATHS.PATH_SEQ%TYPE,
53: docType VARCHAR2,
54: xmlversion VARCHAR2 DEFAULT NULL,
55: xmlencoding VARCHAR2 DEFAULT NULL) RETURN NUMBER;
48: FUNCTION createPath(
49: username VARCHAR2,
50: pathname VARCHAR2,
51: ownerID JDR_PATHS.PATH_OWNER_DOCID%TYPE,
52: pathSeq JDR_PATHS.PATH_SEQ%TYPE,
53: docType VARCHAR2,
54: xmlversion VARCHAR2 DEFAULT NULL,
55: xmlencoding VARCHAR2 DEFAULT NULL) RETURN NUMBER;
56:
62: -- docID - ID of the document to delete
63: -- isDrop - should the document be dropped as well. If TRUE, then the
64: -- document will be completely removed. If FALSE, then only
65: -- the contents of the document will be deleted, and the entry
66: -- in the jdr_paths table will remain.
67: --
68: -- Notes:
69: -- If the document is a package document, then the "child" documents will
70: -- be deleted as well.
69: -- If the document is a package document, then the "child" documents will
70: -- be deleted as well.
71: --
72: PROCEDURE deleteDocument(
73: docID JDR_PATHS.PATH_DOCID%TYPE,
74: isDrop BOOLEAN DEFAULT FALSE);
75:
76: --
77: -- Drops the document and the document's contents from the repository.
78: -- If the document is a package document, the "child" documents of the
79: -- package document will be dropped as well.
80: --
81: PROCEDURE dropDocument(
82: docID JDR_PATHS.PATH_DOCID%TYPE);
83:
84:
85: --
86: -- This method has been deprecated. Please use the function which
235: -- Returns the ID of the path or -1 if no such path exists
236: --
237: FUNCTION getDocumentID(
238: name VARCHAR2,
239: ownerID JDR_PATHS.PATH_OWNER_DOCID%TYPE,
240: pathSeq JDR_PATHS.PATH_SEQ%TYPE,
241: docType JDR_PATHS.PATH_TYPE%TYPE) RETURN NUMBER;
242:
243:
236: --
237: FUNCTION getDocumentID(
238: name VARCHAR2,
239: ownerID JDR_PATHS.PATH_OWNER_DOCID%TYPE,
240: pathSeq JDR_PATHS.PATH_SEQ%TYPE,
241: docType JDR_PATHS.PATH_TYPE%TYPE) RETURN NUMBER;
242:
243:
244: --
237: FUNCTION getDocumentID(
238: name VARCHAR2,
239: ownerID JDR_PATHS.PATH_OWNER_DOCID%TYPE,
240: pathSeq JDR_PATHS.PATH_SEQ%TYPE,
241: docType JDR_PATHS.PATH_TYPE%TYPE) RETURN NUMBER;
242:
243:
244: --
245: -- For each document name, retrieve the corresponding document ID.
310: -- docID - ID of the document to lock
311: -- attempts - number of seconds to wait for a lock
312: --
313: PROCEDURE lockDocument(
314: docID JDR_PATHS.PATH_DOCID%TYPE,
315: attempts INTEGER DEFAULT MAX_SECONDS_TO_WAIT_FOR_LOCK);
316:
317:
318: --
318: --
319: -- Performs all steps that are necessary before a top-level document is
320: -- saved/updated which includes:
321: -- (1) If the document already exists, updates the "who" columns in
322: -- JDR_PATHS and deletes the contents of the document
323: -- (2) If the document does not exist yet, creates a new entry in the
324: -- JDR_PATHS table
325: --
326: -- Parameters:
320: -- saved/updated which includes:
321: -- (1) If the document already exists, updates the "who" columns in
322: -- JDR_PATHS and deletes the contents of the document
323: -- (2) If the document does not exist yet, creates a new entry in the
324: -- JDR_PATHS table
325: --
326: -- Parameters:
327: -- username - user who is updating/inserting the document
328: -- fullPathName - fully qualified name of the document/package file
345: --
346: -- Performs all steps that are necessary before a package document is
347: -- saved/updated which includes:
348: -- (1) If the document already exists, updates the "who" columns in
349: -- JDR_PATHS
350: -- (2) If the document does not exist yet, creates a new entry in the
351: -- JDR_PATHS table
352: --
353: -- Parameters:
347: -- saved/updated which includes:
348: -- (1) If the document already exists, updates the "who" columns in
349: -- JDR_PATHS
350: -- (2) If the document does not exist yet, creates a new entry in the
351: -- JDR_PATHS table
352: --
353: -- Parameters:
354: -- username - user who is updating/inserting the document
355: -- pathname - name of the document/package
362: --
363: FUNCTION prepareDocumentForInsert(
364: username VARCHAR2,
365: pathname VARCHAR2,
366: ownerID JDR_PATHS.PATH_OWNER_DOCID%TYPE,
367: pathSeq JDR_PATHS.PATH_SEQ%TYPE,
368: pathType JDR_PATHS.PATH_TYPE%TYPE) RETURN NUMBER;
369:
370:
363: FUNCTION prepareDocumentForInsert(
364: username VARCHAR2,
365: pathname VARCHAR2,
366: ownerID JDR_PATHS.PATH_OWNER_DOCID%TYPE,
367: pathSeq JDR_PATHS.PATH_SEQ%TYPE,
368: pathType JDR_PATHS.PATH_TYPE%TYPE) RETURN NUMBER;
369:
370:
371: --
364: username VARCHAR2,
365: pathname VARCHAR2,
366: ownerID JDR_PATHS.PATH_OWNER_DOCID%TYPE,
367: pathSeq JDR_PATHS.PATH_SEQ%TYPE,
368: pathType JDR_PATHS.PATH_TYPE%TYPE) RETURN NUMBER;
369:
370:
371: --
372: -- Refactors the specified component/document by making the necessary
400: -- In order make sure that all references to C are destroyed, this needs to
401: -- be called after saving FOO.
402: --
403: PROCEDURE removeDanglingReferences(
404: docID JDR_PATHS.PATH_DOCID%TYPE);
405:
406: END;