186 DBMS_XDB

The DBMS_XDB package subprograms and constants are deprecated with Oracle Database 12c. While all features continue to be supported for backward compatibility, Oracle recommends that you use the alternative procedures provided in each case.

Note:

For more information, see Deprecated Subprograms and Constants.

The DBMS_XDB package supports the following features:

  • Resource Management subprograms which complement Resource Views

  • The Access Control List (ACL)-based Security Mechanism

  • Configuration Session Management

  • Creation of the XDB username

This chapter contains the following topics:

186.1 DBMS_XDB Overview

DBMS_XDB provides a range of management functions However, DBMS_XDB package subprograms and constants are deprecated with Oracle Database 12c. While all features continue to be supported for backward compatibility, Oracle recommends that you use the alternative procedures provided in each case.

The DBMS_XDB package supports the following features:

186.2 DBMS_XDB Deprecated Subprograms

All subprograms in the DBMS_XDB package are deprecated with Oracle Database 12c and substituted by the alternative subprograms with the same names in either the DBMS_XDB_CONFIG package or the DBMS_XDB_REPOS package as listed in the table.

Note:

Oracle recommends that you do not use deprecated subprograms in new applications. Support for deprecated features is for backward compatibility only and may be terminated in future releases.

Table 186-1 DBMS_XDB Deprecated Subprograms and their Altenatives

DBMS_XDB (Deprecated) DBMS_XDB_CONFIG DBMS_XDB_REPOS

ACLCHECKPRIVILEGES Function

ACLCHECKPRIVILEGES Function

ADDHTTPEXPIREMAPPING Procedure

ADDHTTPEXPIREMAPPING Procedure

ADDMIMEMAPPING Procedure

ADDMIMEMAPPING Procedure

ADDSCHEMALOCMAPPING Procedure

ADDSCHEMALOCMAPPING Procedure

ADDSERVLET Procedure

ADDSERVLET Procedure

ADDSERVLETMAPPING Procedure

ADDSERVLETMAPPING Procedure

ADDSERVLETSECROLE Procedure

ADDSERVLETSECROLE Procedure

ADDXMLEXTENSION Procedure

ADDXMLEXTENSION Procedure

APPENDRESOURCEMETADATA Procedure

APPENDRESOURCEMETADATA Procedure

CFG_GET Function

CFG_GET Function

CFG_REFRESH Procedure

CFG_REFRESH Procedure

CFG_UPDATE Procedure

CFG_UPDATE Procedure

CHANGEOWNER Procedure

CHANGEOWNER Procedure

CHANGEPRIVILEGES Function

CHANGEPRIVILEGES Function

CHECKPRIVILEGES Function

CHECKPRIVILEGES Function

CREATEFOLDER Function

CREATEFOLDER Function

CREATEOIDPATH Function

CREATEOIDPATH Function

CREATERESOURCE Functions

CREATERESOURCE Functions

DELETEHTTPEXPIREMAPPING Procedure

DELETEHTTPEXPIREMAPPING Procedure

DELETEMIMEMAPPING Procedure

DELETEMIMEMAPPING Procedure

DELETERESOURCE Procedure

DELETERESOURCE Procedure

DELETERESOURCEMETADATA Procedures

DELETERESOURCEMETADATA Procedures

DELETESCHEMALOCMAPPING Procedure

DELETESCHEMALOCMAPPING Procedure

DELETESERVLET Procedure

DELETESERVLET Procedure

DELETESERVLETMAPPING Procedure

DELETESERVLETMAPPING Procedure

DELETESERVLETSECROLE Procedure

DELETESERVLETSECROLE Procedure

DELETEXMLEXTENSION Procedure

DELETEXMLEXTENSION Procedure

ENABLEDIGESTAUTHENTICATION Procedure

ENABLEDIGESTAUTHENTICATION Procedure

EXISTSRESOURCE Function

EXISTSRESOURCE Function

GETACLDOCUMENT Function

GETACLDOCUMENT Function

GETCONTENTBLOB Function

GETCONTENTBLOB Function

GETCONTENTCLOB Function

GETCONTENTCLOB Function

GETCONTENTVARCHAR2 Function

GETCONTENTVARCHAR2 Function

GETCONTENTXMLREF Function

GETCONTENTXMLREF Function

GETCONTENTXMLTYPE Function

GETCONTENTXMLTYPE Function

GETFTPPORT Function

GETFTPPORT Function

GETHTTPPORT Function

GETHTTPPORT Function

GETLISTENERENDPOINT Procedure

GETLISTENERENDPOINT Procedure

GETLOCKTOKEN Procedure

GETLOCKTOKEN Procedure

GETRESOID Function

GETRESOID Function

GETXDB_TABLESPACE Function

GETXDB_TABLESPACE Function

HASBLOBCONTENT Function

HASBLOBCONTENT Function

HASCHARCONTENT Function

HASCHARCONTENT Function

HASXMLCONTENT Function

HASXMLCONTENT Function

HASXMLREFERENCE Function

HASXMLREFERENCE Function

ISFOLDER Function

ISFOLDER Function

LINK Procedures

LINK Procedures

LOCKRESOURCE Function

LOCKRESOURCE Function

PROCESSLINKS Procedure

PROCESSLINKS Procedure

PURGERESOURCEMETADATA Procedure

PURGERESOURCEMETADATA Procedure

RENAMERESOURCE Procedure

RENAMERESOURCE Procedure

SETACL Procedure

SETACL Procedure

SETFTPPORT Procedure

SETFTPPORT Procedure

SETHTTPPORT Procedure

SETHTTPPORT Procedure

SETLISTENERENDPOINT Procedure

SETLISTENERENDPOINT Procedure

SETLISTENERLOCALACCESS Procedure

SETLISTENERLOCALACCESS Procedure

SPLITPATH Procedure

SPLITPATH Procedure

TOUCHRESOURCE Procedure

TOUCHRESOURCE Procedure

UNLOCKRESOURCE Function

UNLOCKRESOURCE Function

UPDATERESOURCEMETADATA Procedures

UPDATERESOURCEMETADATA Procedures

186.3 DBMS_XDB Security Model

Owned by XDB, the DBMS_XDB package must be created by SYS or XDB. The EXECUTE privilege is granted to PUBLIC. Subprograms in this package are executed using the privileges of the current user. Subprograms that operate on the XDB Configuration will succeed only if the current user is SYS or XDB, or the current user has the XDBADMIN or DBA role.

186.4 DBMS_XDB Constants

All constants described in the following table are deprecated in Oracle Release 12c.

They are relocated to either the DBMS_XDB_CONFIG package or the DBMS_XDB_REPOS package. The specifics of transference in each case are detailed in the Relocated column.

Oracle recommends that you do not use constants in their DBMS_XDB context in new applications. Support for deprecated features is for backward compatibility only and may be terminated in future releases.

Table 186-2 DBMS_XDB Constants

Constant Type Value Description Relocated

DELETE_RESOURCE

NUMBER

1

Deletes a resource; fails if the resource has children.

DBMS_XDB_REPOS

DELETE_RECURSIVE

NUMBER

2

Deletes a resource and its children, if any.

DBMS_XDB_REPOS

DELETE_FORCE

NUMBER

3

Deletes the resource, even if the object it contains is invalid.

DBMS_XDB_REPOS

DELETE_RECURSIVE_FORCE

NUMBER

4

Deletes a resource and its children, if any, even if the object it contains is invalid.

DBMS_XDB_REPOS

DELETE_RES_METADATA_CASCADE

NUMBER

1

Deletes the corresponding row in the metadata table

DBMS_XDB_REPOS

DELETE_RES_METADATA_NOCASCADE

NUMBER

2

Does not delete the row in the metadata table

DBMS_XDB_REPOS

DEFAULT_LOCK_TIMEOUT CONSTANT

PLS_INTEGER

(60*60)

Default time (in seconds) after which lock will expire

DBMS_XDB_REPOS

LINK_TYPE_HARD

NUMBER

1

Type of link to be created (default)

DBMS_XDB_REPOS

LINK_TYPE_WEAK

NUMBER

2

Type of link to be created

DBMS_XDB_REPOS

LINK_TYPE_SYMBOLIC

NUMBER

3

Type of link to be created

DBMS_XDB_REPOS

ON_DENY_NEXT_CUSTOM

NUMBER

1

If access denied, the next custom authorization is tried

DBMS_XDB_CONFIG

ON_DENY_BASIC

NUMBER

2

If access denied, basic authentication is used

DBMS_XDB_CONFIG

XDB_ENDPOINT_HTTP

NUMBER

1

Defining listener for first HTTP port

DBMS_XDB_CONFIG

XDB_ENDPOINT_HTTP2

NUMBER

2

Defining listener for second HTTP port

DBMS_XDB_CONFIG

XDB_PROTOCOL_TCP

NUMBER

1

Defining listener for HTTP protocol

DBMS_XDB_CONFIG

XDB_PROTOCOL_TCPS

NUMBER

2

Defining listener for HTTPS protocol

DBMS_XDB_CONFIG

186.5 Summary of DBMS_XDB Subprograms

This table lists the DBMS_XDB subprograms and briefly describes them.

Table 186-3 DBMS_XDB Package Subprograms

Subprogram Description

ACLCHECKPRIVILEGES Function

Checks access privileges granted to the current user by specified ACL document on a resource whose owner is specified by the 'owner' parameter.

ADDHTTPEXPIREMAPPING Procedure

Adds to xdb$config a mapping of the URL pattern to an expiration date. This will control the Expire headers for URLs matching the pattern.

ADDMIMEMAPPING Procedure

Adds a mime mapping to the XDB configuration

ADDSCHEMALOCMAPPING Procedure

Adds a schema location mapping to the XDB configuration

ADDSERVLET Procedure

Adds a servlet to XDB configuration

ADDSERVLETMAPPING Procedure

Adds a servlet mapping to XDB configuration

ADDSERVLETSECROLE Procedure

Adds a security role REF to a specified servlet in the XDB configuration

ADDXMLEXTENSION Procedure

Adds adds an XML extension to the XDB configuration

APPENDRESOURCEMETADATA Procedure

Takes in user-defined metadata either as a REF to XMLTYPE or an XMLTYPE and adds it to the desired resource

CFG_GET Function

Retrieves the session's configuration information

CFG_REFRESH Procedure

Refreshes the session's configuration information to the latest configuration

CFG_UPDATE Procedure

Updates the configuration information

CHANGEOWNER Procedure

Changes the owner of the resource/s to the specified owner.

CHANGEPRIVILEGES Function

Adds a specified ACE to a specified resource's ACL

CHECKPRIVILEGES Function

Checks access privileges granted to the current user on the specified resource

CREATEFOLDER Function

Creates a new folder resource in the hierarchy

CREATEOIDPATH Function

Creates a virtual path to the resource based on object ID

CREATERESOURCE Functions

Creates a new resource

DELETEHTTPEXPIREMAPPING Procedure

Deletes from xdb$config all mappings of the URL pattern to an expiration date

DELETEMIMEMAPPING Procedure

Deletes the mime mapping from the XDB configuration

DELETERESOURCE Procedure

Deletes a resource from the hierarchy

DELETERESOURCEMETADATA Procedures

Deletes metadata from a resource (can be used for schema-based or nonschema-based metadata)

DELETESCHEMALOCMAPPING Procedure

Deletes the schema location mapping for the specified schema URL from the XDB configuration.

DELETESERVLET Procedure

Deletes a servlet from XDB configuration

DELETESERVLETMAPPING Procedure

Deletes the servlet mapping for the specified servlet name from the XDB configuration

DELETESERVLETSECROLE Procedure

Deletes the specified role from a servlet in the XDB configuration

DELETEXMLEXTENSION Procedure

Deletes the specified XML extension from the XDB configuration

ENABLEDIGESTAUTHENTICATION Procedure

Enables digest authentication

EXISTSRESOURCE Function

Determines if a resource is the hierarchy, based on its absolute path

GETACLDOCUMENT Function

Retrieves ACL document that protects resource given its path name

GETCONTENTBLOB Function

Retrieves the contents of a resource returned as a BLOB

GETCONTENTCLOB Function

Retrieves the contents of a resource returned as a CLOB

GETCONTENTVARCHAR2 Function

Retrieves the contents of a resource returned as a string

GETCONTENTXMLREF Function

Retrieves the contents of a resource returned as a a REF to an XMLTYPE

GETCONTENTXMLTYPE Function

Retrieves the contents of a resource returned as an XMLTYPE

GETFTPPORT Function

Gets the value of the current FTP port

GETHTTPPORT Function

Gets the value of the current HTTP port

GETHTTPREQUESTHEADER Function

Gets the values of the passed header

GETLISTENERENDPOINT Procedure

Retrieves the parameters of a listener end point corresponding to the XML DB HTTP server

GETLOCKTOKEN Procedure

Returns that resource's lock token for the current user given a path to a resource

GETPRIVILEGES Function

Gets all privileges granted to the current user on a specified resource

GETRESOID Function

Returns the object ID of the resource from its absolute path

GETXDB_TABLESPACE Function

Returns the current tablespace of the XDB (user)

HASBLOBCONTENT Function

Returns TRUE if the resource has BLOB content

HASCHARCONTENT Function

Returns TRUE if the resource has character content

HASXMLCONTENT Function

Returns TRUE if the resource has XML content

HASXMLREFERENCE Function

Returns TRUE if the resource has REF to XML content

ISFOLDER Function

Returns TRUE if the resource is a folder or container

LINK Procedures

Creates a link to an existing resource

LOCKRESOURCE Function

Gets a WebDAV-style lock on that resource given a path to that resource

PROCESSLINKS Procedure

Processes document links in the specified resource

PURGERESOURCEMETADATA Procedure

Deletes all user metadata from a resource

RENAMERESOURCE Procedure

Renames the XDB resource

SETACL Procedure

Sets the ACL on a specified resource

SETFTPPORT Procedure

Sets the FTP port to a new value

SETHTTPPORT Procedure

Sets the HTTP port to a new value

SETLISTENERENDPOINT Procedure

Sets the parameters of a listener end point corresponding to the XML DB HTTP server

SETLISTENERLOCALACCESS Procedure

Restricts all listener end points of the XML DB HTTP server to listen either only on the localhost interface or on both localhost and non-localhost interfaces

SPLITPATH Procedure

Splits the path into a parentpath and childpath

TOUCHRESOURCE Procedure

Changes the modification time of the resource to the current time

UNLOCKRESOURCE Function

Unlocks the resource given a lock token and resource path

UPDATERESOURCEMETADATA Procedures

Updates metadata for a resource

186.5.1 ACLCHECKPRIVILEGES Function

This function checks access privileges granted to the current user by specified ACL document by the OWNER of the resource. Returns positive integer if all privileges are granted.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the ACLCHECKPRIVILEGES Function.

Syntax

DBMS_XDB.ACLCHECKPRIVILEGES(
   acl_path  IN  VARCHAR2,
   owner     IN  VARCHAR2,
   privs     IN  xmltype)
 RETURN PLS_INTEGER;

Parameters

Table 186-4 ACLCHECKPRIVILEGES Function Parameters

Parameter Description

acl_path

Absolute path in the Hierarchy for ACL document

owner

Resource owner name; the pseudo user "DAV:owner" is replaced by this user during ACL privilege resolution

privs

An XMLType instance of the privilege element specifying the requested set of access privileges. See description for CHECKPRIVILEGES Function.

186.5.2 ADDHTTPEXPIREMAPPING Procedure

This procedure adds to xdb$config a mapping of the URL pattern to an expiration date. This will control the Expire headers for URLs matching the pattern.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the ADDHTTPEXPIREMAPPING Procedure.

Syntax

DBMS_XDB.ADDHTTPEXPIREMAPPING (
     pattern    IN    VARCHAR2,
     expire     IN    VARCHAR2);

Parameters

Table 186-5 ADDHTTPEXPIREMAPPING Procedure Parameters

Parameter Description

pattern

URL pattern (only * accepted as wildcards)

expire

Expiration directive, follows the ExpireDefault in Apache's mod_expires:

base [plus] (num type)*
-- base: now | modification
-- type: year|years|month|months|week|weeks|day|days|
minute|minutess|second|seconds

Examples

DBMS_XDB.ADDHTTPEXPIREMAPPING ('/public/test1/*', 'now plus 4 weeks');
DBMS_XDB.ADDHTTPEXPIREMAPPING (
             '/public/test2/*', 'modification plus 1 day 30 seconds');

186.5.3 ADDMIMEMAPPING Procedure

This procedure adds the following mime mapping to XDB configuration:

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the ADDMIMEMAPPING Procedure.

<mime-mapping>
<extension>extension</extension>
<mime-type>mimetype</mime-type>
</mime-mapping>

Syntax

DBMS_XDB.ADDMIMEMAPPING(
     extension    IN   VARCHAR2,
     mimetype     IN   VARCHAR2);

Parameters

Table 186-6 ADDMIMEMAPPING Procedure Parameters

Parameter Description

extension

Extension for which a mime type is being added

mimetype

Mime type

186.5.4 ADDSCHEMALOCMAPPING Procedure

This procedure adds the following schema location mapping to the XDB configuration:

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the ADDMIMEMAPPING Procedure.

<schemaLocation-mapping>
     <namespace>namespace</namespace>
     <element>element</element>
      <schemaURL>schemaURL</schemaURL>
</schemaLocation-mapping>

Syntax

DBMS_XDB.ADDSCHEMALOCMAPPING(
     namespace    IN   VARCHAR2,
     element      IN   VARCHAR2,
     schemaURL    IN   VARCHAR2);

Parameters

Table 186-7 ADDSCHEMALOCMAPPING Procedure Parameters

Parameter Description

namespace

Namespace

element

Element

schemaURL

Schema URL

186.5.5 ADDSERVLET Procedure

This procedure adds A servlet to XDB configuration.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the ADDSERVLET Procedure.

It adds the following servlet to XDB configuration:

<servlet>
     <servlet-name>name</servlet-name>
     <servlet-language>language</servlet-language>
     <display-name>dispname</display-name>
     <description>descript</description>
     <servlet-class>class</servlet-class>
     <servlet-schema>schema</servlet-schema>
</servlet>

Syntax

DBMS_XDB.ADDSERVLET(
    name        IN   VARCHAR2,
    language    IN   VARCHAR2,
    dispname    IN   VARCHAR2,
    icon        IN   VARCHAR2 := NULL,
    descript    IN   VARCHAR2 := NULL,
    class       IN   VARCHAR2 := NULL,
    jspfile     IN   VARCHAR2 := NULL,
    plsql       IN   VARCHAR2 := NULL,
    schema      IN   VARCHAR2 := NULL);

Parameters

Table 186-8 ADDSERVLET Procedure Parameters

Parameter Description

name

Servlet name

language

Must be one of "C", "Java", "PL/SQL"

dispname

Display name

icon

Icon

descript

Description

class

The class / jspfile/ plsql function corresponding to this servlet. The first non-NULL argument amongst these three is chosen, and the others are treated as NULL.

jspfile

This parameter is not supported. Always provide NULL value for this parameter. System throws an error if the value is not NULL.

plsql

The class / jspfile / plsql function corresponding to this servlet. The first non-NULL argument amongst these three is chosen, and the others are treated as NULL.

schema

Schema is used to specify servlet-schema xml element name in xdbconfig.xml. It indicates the Oracle schema in which the Java class is loaded.

If you do not specify any value, then the schema is searched using the default resolver specification.

186.5.6 ADDSERVLETMAPPING Procedure

This procedure adds a servlet mapping to XDB configuration:

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the ADDSERVLETMAPPING Procedure.

It adds the following servlet mapping:

<servlet-mapping>     <servlet-pattern>pattern</servlet-pattern>     <servlet-name>name</servlet-name></servlet-mapping>

Syntax

DBMS_XDB.ADDSERVLETMAPPING(
     pattern   IN   VARCHAR2,     name      IN   VARCHAR2);

Parameters

Table 186-9 ADDSERVLETMAPPING Procedure Parameters

Parameter Description

pattern

Sservlet pattern

name

Servlet name

186.5.7 ADDSERVLETSECROLE Procedure

This procedure adds the security role REF to a specified servlet in XDB configuration.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the ADDSERVLETSECROLE Procedure.

It adds the following security role, as shown below:

<security-role-ref>
     <role-name>rolename</role-name>
     <role-link>rolelink</role-link>
     <description>descript</description>
</security-role-ref>

Syntax

DBMS_XDB.ADDSERVLETSECROLE(
     servname    IN   VARCHAR2,     rolename    IN   VARCHAR2,     rolelink    IN   VARCHAR2,     descript    IN   VARCHAR2 := NULL);

Parameters

Table 186-10 ADDSERVLETSECROLE Procedure Parameters

Parameter Description

servname

Sservlet name

rolename

Role name

rolelink

Role link

descript

Description

186.5.8 ADDXMLEXTENSION Procedure

This procedure adds an XML extension to the XDB configuration under <xml-extensions>.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the ADDXMLEXTENSION Procedure.

It adds the following XML extension:

<extension>extension</extension>

Syntax

DBMS_XDB.ADDXMLEXTENSION(
     extension    IN   VARCHAR2);

Parameters

Table 186-11 ADDXMLEXTENSION Procedure Parameters

Parameter Description

extension

XML extension to be added

186.5.9 APPENDRESOURCEMETADATA Procedure

This procedure takes in user-defined metadata either as a REF to XMLTYPE or an XMLTYPE and adds it to the desired resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the APPENDRESOURCEMETADATA Procedure.

Syntax

DBMS_XDB.APPENDRESOURCEMETADATA (
 abspath   IN  VARCHAR2, 
 metadata  IN  XMLTYPE);

DBMS_XDB.APPENDRESOURCEMETADATA (
 abspath   IN  VARCHAR2, 
 metadata  IN  REF SYS.XMLTYPE);

Parameters

Table 186-12 APPENDRESOURCEMETADATA Procedure

Parameter Description

abspath

Absolute path of the resource

metadata

Metadata can be schema based or nonschema-based. Schema-based metadata is stored in its own table.

Usage Notes

  • In the case in which a REF is passed in, the procedure stores the REF in the resource, and the metadata is stored in a separate table. In this case you are responsible for populating the RESID column for the metadata table. Note that theREF passed in must be unique. In other words, there must not be aREF with the same value in the resource metadata, as this would violate uniqueness of properties. An error is thrown if users attempt to add a REF that already exists.

  • In the case where the XMLTYPE is passed in, the data is parsed to determine if it is schema-based or not and stored accordingly.

186.5.10 CFG_GET Function

This function retrieves the session's configuration information as an XMLType instance.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the CFG_GET Function.

Syntax

DBMS_XDB.CFG_GET 
 RETURN SYS.XMLType;

186.5.11 CFG_REFRESH Procedure

This procedure refreshes the session's configuration information to the latest configuration. This procedure is deprecated in Release 12c.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the CFG_REFRESH Procedure.

Syntax

DBMS_XDB.CFG_REFRESH;

186.5.12 CFG_UPDATE Procedure

This procedure updates the configuration information and commits the change. This procedure is deprecated in Release 12c.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the CFG_UPDATE Procedure.

Syntax

DBMS_XDB.CFG_UPDATE(
   xdbconfig   IN  SYS.XMLTYPE);

Parameters

Table 186-13 CFG_UPDATE Procedure Parameters

Parameter Description

xdbconfig

The new configuration data

186.5.13 CHANGEOWNER Procedure

This procedure changes the owner of the resource/s to the specified owner. This procedure is deprecated in Release 12c.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the CHANGEOWNER Procedure.

Syntax

DBMS_XDB.CHANGEOWNER(
     abspath    IN   VARCHAR2,
     owner      IN   VARCHAR2,
     recurse    IN   BOOLEAN := FALSE);

Parameters

Table 186-14 CHANGEOWNER Procedure Parameters

Parameter Description

abspath

Absolute path of the resource

owner

New owner for the resource

recurse

If TRUE, recursively change owner of all resources in the folder tree

186.5.14 CHANGEPRIVILEGES Function

This function adds a specified ACE to a specified resource's ACL. This procedure is deprecated in Release 12c.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the CHANGEPRIVILEGES Function.

Syntax

DBMS_XDB.CHANGEPRIVILEGES(
   res_path   IN    VARCHAR2,
   ace        IN    xmltype)
 RETURN PLS_INTEGER;

Parameters

Table 186-15 CHANGEPRIVILEGES Function Parameters

Parameter Description

res_path

Path name of the resource for which privileges need to be changed

ace

An XMLType instance of the <ace> element which specifies the <principal>, the operation <grant> and the list of privileges

Return Values

A positive integer if the ACL was successfully modified.

Usage Notes

If no ACE with the same principal and the same operation (grant/deny) already exists in the ACL, the new ACE is added at the end of the ACL.

186.5.15 CHECKPRIVILEGES Function

This function checks access privileges granted to the current user on the specified resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the CHECKPRIVILEGES Function.

Syntax

DBMS_XDB.CHECKPRIVILEGES(
   res_path   IN  VARCHAR2,
   privs      IN  xmltype)
 RETURN PLS_INTEGER;

Parameters

Table 186-16 CHECKPRIVILEGES Function Parameters

Parameter Description

res_path

Absolute path in the Hierarchy for resource

privs

An XMLType instance of the privilege element specifying the requested set of access privileges

Return Values

A positive integer if all requested privileges granted.

186.5.16 CREATEFOLDER Function

This deprecated function creates a new folder resource in the hierarchy.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the CREATEFOLDER Function.

Syntax

DBMS_XDB.CREATEFOLDER(
   path   IN  VARCHAR2)
 RETURN BOOLEAN;

Parameters

Table 186-17 CREATEFOLDER Function Parameters

Parameter Description

path

Path name for the new folder

Return Values

TRUE if operation successful; FALSE, otherwise.

Usage Notes

The given path name's parent folder must already exist in the hierarchy: if '/folder1/folder2' is passed as the path parameter, then '/folder1' must already exist.

186.5.17 CREATEOIDPATH Function

This deprecated function creates a virtual path to the resource based on object ID.

Note:

This funtion is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the CREATEOIDPATH Function.

Syntax

DBMS_XDB.CREATEOIDPATH(
   oid    IN   RAW)
 RETURN VARCHAR2;

Parameters

Table 186-18 CREATEOIDPATH Function Parameters

Parameter Description

oid

Object ID of the resource

186.5.18 CREATERESOURCE Functions

The deprecated function creates a new resource. The description of the overload options precede each version of the syntax

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the CREATERESOURCE Functions.

Syntax

Given a REF to an existing XMLType row, creates a resource whose contents point to that row. That row should not already exist inside another resource:

DBMS_XDB.CREATERESOURCE(
     abspath        IN  VARCHAR2,
     datarow        IN  REF SYS.XMLTYPE,
     createfolders  IN  BOOLEAN := FALSE)
 RETURN BOOLEAN;

Creates a resource with a specified BLOB as its contents, and specifies character set of the source BLOB:

DBMS_XDB.CREATERESOURCE(
     abspath        IN  VARCHAR2,
     data           IN  BLOB,
     csid           IN  NUMBER :=0,
     createfolders  IN  BOOLEAN := FALSE)
 RETURN BOOLEAN; 

Creates a resource with a specified BFILE as its contents, and specifies character set of the source BFILE:

DBMS_XDB.CREATERESOURCE ( 
     abspath        IN  VARCHAR2,
     data           IN  BFILE,
     csid           IN  NUMBER :=0,
     createfolders  IN  BOOLEAN := FALSE)
 RETURN BOOLEAN;

Creates a resource with a specified CLOB as its contents:

DBMS_XDB.CREATERESOURCE (
     abspath        IN  VARCHAR2,
     data           IN  CLOB,
     createfolders  IN  BOOLEAN := FALSE)
 RETURN BOOLEAN; 

Given a string, inserts a new resource into the hierarchy with the string as the contents:

DBMS_XDB.CREATERESOURCE (
   abspath        IN  VARCHAR2, 
   data           IN  VARCHAR2,
   schemaurl      IN  VARCHAR2 := NULL,
   elem           IN  VARCHAR2 := NULL)
 RETURN BOOLEAN; 

Given an XMLTYPE and a schema URL, inserts a new resource into the hierarchy with the XMLTYPE as the contents:

DBMS_XDB.CREATERESOURCE (
   abspath        IN  VARCHAR2, 
   data           IN  SYS.XMLTYPE,
   schemaurl      IN  VARCHAR2 := NULL,
   elem           IN  VARCHAR2 := NULL)
 RETURN BOOLEAN;

Parameters

Table 186-19 CREATERESOURCE Function Parameters

Parameter Description

abspath

Absolute path of the resource to create. The path name's parent folder must already exist in the hierarchy. In other words, if /foo/bar.txt is passed in, then folder /foo must already exist.

data

String buffer containing new resource's contents. The data is parsed to check if it contains a schema-based XML document, and the contents are stored as schema-based in the schema's default table. Otherwise, it is saved as binary data.

datarow

REF to an XMLType row to be used as the contents

csid

Character set id of the document. Must be a valid Oracle ID; otherwise returns an error.

If CSID is not specified, or if a zero CSID is specified, then the character set id of the document is determined as follows:

  • From the abspath extension, determine the resource's MIME type.

  • If the MIME type is */xml, then the encoding is detected based on Appendix F of the W3C XML 1.0 Reference at http://www.w3.org/TR/2000/REC-xml-20001006;

  • Otherwise, it is defaulted to the database character set.

createfolders

If TRUE, create the parent folders if they do not exist

schemaurl

For XML data, schema URL data conforms to (default NULL)

elem

Element name (default NULL)

Return Values

TRUE if operation successful; FALSE, otherwise.

186.5.19 DELETEHTTPEXPIREMAPPING Procedure

This deprecated procedure deletes from xdb$config all mappings of the URL pattern to an expiration date.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the DELETEHTTPEXPIREMAPPING Procedure.

Syntax

DBMS_XDB.DELETEHTTPEXPIREMAPPING(
     pattern  IN   VARCHAR2);

Parameters

Table 186-20 DELETEHTTPEXPIREMAPPING Procedure Parameters

Parameter Description

pattern

URL pattern (only * accepted as wildcards)

186.5.20 DELETEMIMEMAPPING Procedure

This deprecated procedure deletes the mime mapping for a specified extension from the XDB configuration.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the CFG_GET Function.

Syntax

DBMS_XDB.DELETEMIMEMAPPING(
     extension    IN   VARCHAR2);

Parameters

Table 186-21 DELETEMIMEMAPPING Procedure Parameters

Parameter Description

extension

Extension for which a mime type is to be deleted

186.5.21 DELETERESOURCE Procedure

This deprecated procedure deletes a resource from the hierarchy.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the DELETERESOURCE Procedure.

Syntax

DBMS_XDB.DELETERESOURCE(
   path          IN      VARCHAR2,
   delete_option IN      PLS_INTEGER);

Parameters

Table 186-22 DELETERESOURCE Procedure Parameters

Parameter Description

path

Path name of the resource to delete

delete_option

The option that controls how a a resource is deleted; defined in Table 186-2:

  • DELETE_RESOURCE

  • DELETE_RECURSIVE

  • DELETE_FORCE

  • DELETE_RECURSIVE_FORCE

186.5.22 DELETERESOURCEMETADATA Procedures

This deprecated procedure takes in a resource by absolute path and removes either the schema-based metadata identified by the REF, or the metadata identified by the namespace and name combination, which can be either schema-based or non-schema based. It also takes an additional (optional) parameter that specifies how to delete it. This parameter is only relevant for schema-based resource metadata that needs to be deleted. For non-schema based metadata, this parameter is ignored.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the DELETERESOURCEMETADATA Procedures.

Syntax

Can be used only for schema-based metadata:

DBMS_XDB.DELETERESOURCEMETADATA (
   abspath        IN  VARCHAR2, 
   metadata       IN  REF SYS.XMLTYPE,
   delete_option  IN  pls_integer := dbms_xdb.DELETE_RESOURCE_METADATA_CASCADE);
 

Can be used for schema-based or nonschema-based metadata:

DBMS_XDB.DELETERESOURCEMETADATA (
   abspath        IN VARCHAR2,
   metadatans     IN VARCHAR2,
   metadataname   IN VARCHAR2,
   delete_option  IN pls_integer := dbms_xdb.DELETE_RESOURCE_METADATA_CASCADE);

Parameters

Table 186-23 DELETERESOURCEMETADATA Procedure Parameters

Parameter Description

abspath

Absolute path of the resource

metadata

REF to the piece of metadata (schema based) to be deleted

mettadatans

Namespace of the metadata fragment to be removed

mettadataname

Local name of the metadata fragment to be removed

delete_option

Only applicable for schema-based metadata, this can be one of the following:

  • DELETE_RES_METADATA_CASCADE - deletes the corresponding row in the metadata table

  • DELETE_RES_METADATA_NOCASCADE - does not delete the row in the metadata table

186.5.23 DELETESCHEMALOCMAPPING Procedure

This deprecated procedure deletes the schema location mapping for a specified schema URL from the XDB configuration.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the DELETESCHEMALOCMAPPING Procedure.

Syntax

DBMS_XDB.DELETESCHEMALOCMAPPING(
     schemaURL    IN   VARCHAR2);

Parameters

Table 186-24 DELETESCHEMALOCMAPPING Procedure Parameters

Parameter Description

schemaURL

Schema URL

186.5.24 DELETESERVLET Procedure

This deprecated procedure deletes a servlet from the XDB configuration.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the DELETESERVLET Procedure.

Syntax

DBMS_XDB.DELETESERVLET(
     name        IN   VARCHAR2);

Parameters

Table 186-25 DELETESERVLET Procedure Parameters

Parameter Description

name

Servlet name

186.5.25 DELETESERVLETMAPPING Procedure

This deprecated procedure deletes the servlet mapping for a specified servlet name from the XDB configuration.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the DELETESERVLETMAPPING Procedure.

Syntax

DBMS_XDB.DELETESERVLETMAPPING(
     name      IN   VARCHAR2);

Parameters

Table 186-26 DELETESERVLETMAPPING Procedure Parameters

Parameter Description

name

Servlet name

186.5.26 DELETESERVLETSECROLE Procedure

This deprecated procedure deletes the specified role from a servlet in the XDB configuration.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the DELETESERVLETSECROLE Procedure.

Syntax

DBMS_XDB.DELETESERVLETSECROLE(
     servname    IN   VARCHAR2,     rolename    IN   VARCHAR2);

Parameters

Table 186-27 DELETESERVLETSECROLE Procedure Parameters

Parameter Description

servname

Servlet name

rolename

Name of the role to be deleted

186.5.27 DELETEXMLEXTENSION Procedure

This deprecated procedure deletes the specified XML extension from the XDB configuration.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the DELETEXMLEXTENSION Procedure.

Syntax

DBMS_XDB.DELETEXMLEXTENSION(
     extension    IN   VARCHAR2);

Parameters

Table 186-28 DELETEXMLEXTENSION Procedure Parameters

Parameter Description

extension

XML extension to be deleted

186.5.28 ENABLEDIGESTAUTHENTICATION Procedure

This deprecated procedure enabling digest authentication. It will list digest as the first authentication mechanism to be used by the XML DB HTTP server.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the ENABLEDIGESTAUTHENTICATION Procedure.

Syntax

DBMS_XDB.ENABLEDIGESTAUTHENTICATION;

186.5.29 EXISTSRESOURCE Function

This deprecated function indicates if a resource is in the hierarchy. Matches resource by a string that represents its absolute path.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the EXISTSRESOURCE Function.

Syntax

DBMS_XDB.EXISTSRESOURCE(
   abspath    IN    VARCHAR2)
 RETURN BOOLEAN;

Parameters

Table 186-29 EXISTSRESOURCE Function Parameters

Parameter Description

abspath

Path name of the resource whose ACL document is required

Return Values

TRUE if the resource is found.

186.5.30 GETACLDOCUMENT Function

This deprecated function retrieves ACL document that protects resource given its path name.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETACLDOCUMENT Function.

Syntax

DBMS_XDB.GETACLDOCUMENT(
   abspath  IN  VARCHAR2)
  RETURN sys.xmltype;

Parameters

Table 186-30 GETACLDOCUMENT Function Parameters

Parameter Description

abspath

Path name of the resource whose ACL document is required

Return Values

The XMLType for ACL document.

186.5.31 GETCONTENTBLOB Function

This deprecated function retrieves the contents of a resource returned as a BLOB.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETCONTENTBLOB Function.

Syntax

DBMS_XDB.GETCONTENTBLOB(
     abspath    IN     VARCHAR2, 
     csid       OUT    PLS_INTEGER,
     locksrc    IN     BOOLEAN := FALSE) 
  RETURN BLOB;

Parameters

Table 186-31 GETCONTENTBLOB Function Parameters

Parameter Description

abspath

Absolute path of the resource

csid

If TRUE, lock and return the source LOB. If FALSE, return a temp LOB copy.

locksrc

Contents of the resource as a BLOB

Return Values

The contents of the resource as a BLOB.

186.5.32 GETCONTENTCLOB Function

This deprecated function gets the contents of a resource returned as a CLOB.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETCONTENTCLOB Function.

Syntax

DBMS_XDB.GETCONTENTCLOB(
     abspath    IN     VARCHAR2,
  RETURN CLOB;

Parameters

Table 186-32 GETCONTENTCLOB Function Parameters

Parameter Description

abspath

Absolute path of the resource

Return Values

The contents of the resource as a CLOB.

186.5.33 GETCONTENTVARCHAR2 Function

This deprecated function gets the contents of a resource returned as a string.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETCONTENTVARCHAR2 Function.

Syntax

DBMS_XDB.GETCONTENTVARCHAR2(
     abspath    IN     VARCHAR2,
  RETURN BLOB;

Parameters

Table 186-33 GETCONTENTVARCHAR2 Function Parameters

Parameter Description

abspath

Absolute path of the resource

Return Values

The contents of the resource as a string.

186.5.34 GETCONTENTXMLREF Function

This deprecated function retrieves the contents of a resource returned as a a REF to an XMLTYPE.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETCONTENTXMLREF Function.

Syntax

DBMS_XDB.GETCONTENTXMLREF(
     abspath    IN     VARCHAR2,
  RETURN SYS.XMLTYPE;

Parameters

Table 186-34 GETCONTENTXMLREF Function Parameters

Parameter Description

abspath

Absolute path of the resource

Return Values

The contents of the resource as a REF to an XMLTYPE.

186.5.35 GETCONTENTXMLTYPE Function

This deprecated function retrieves the contents of a resource returned as an XMLTYPE.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETCONTENTXMLTYPE Function.

Syntax

DBMS_XDB.GETCONTENTXMLTYPE(
     abspath    IN     VARCHAR2,
  RETURN SYS.XMLTYPE;

Parameters

Table 186-35 GETCONTENTXMLTYPE Function Parameters

Parameter Description

abspath

Absolute path of the resource

Return Values

The contents of the resource as an XMLTYPE.

186.5.36 GETFTPPORT Function

This deprecated procedure gets the value of the current FTP port.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the GETFTPPORT Function.

Syntax

DBMS_XDB.GETFTPPORT
 RETURN NUMBER;

186.5.37 GETHTTPPORT Function

This procedure gets the value of the current HTTP port.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the GETHTTPPORT Function.

Syntax

DBMS_XDB.GETHTTPPORT
 RETURN NUMBER;

186.5.38 GETHTTPREQUESTHEADER Function

This deprecated function, if called during an HTTP request serviced by XDB, returns the values of the passed header. It is used by routines that implement custom authentication.

Note:

This procedure is deprecated in Release 12c.

Syntax

DBMS_XDB.GETHTTPREQUESTHEADER(
    header_name    IN   VARCHAR2)
 RETURN VARCHAR2;

Parameters

Table 186-36 GETHTTPREQUESTHEADER Function Parameters

Parameter Description

header_name

Passed header

Return Values

Returns NULL in case the header is not present in the request, or for AUTHENTICATION, for security reasons.

186.5.39 GETLISTENERENDPOINT Procedure

This deprecated procedure retrieves the parameters of a listener end point corresponding to the XML DB HTTP server. The parameters of both HTTP and HTTP2 end points can be retrieved by invoking this procedure.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the GETLISTENERENDPOINT Procedure.

Syntax

DBMS_XDB.GETLISTENERENDPOINT (
   endpoint  IN   NUMBER, 
   host      OUT  VARCHAR2,    port      OUT  NUMBER, 
   protocol  OUT  NUMBER);

Parameters

Table 186-37 GETLISTENERENDPOINT Procedure Parameters

Parameter Description

endpoint

End point to be retrieved. Its value can be XDB_ENDPOINT_HTTP or XDB_ENDPOINT_HTTP2.

host

Interface on which the listener end point listens

port

Port on which the listener end point listens

protocol

Transport protocol accepted by the listener end point

186.5.40 GETLOCKTOKEN Procedure

Given a path to a resource, this deprecated procedure returns that resource's lock token for the current user.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETLOCKTOKEN Procedure.

Syntax

DBMS_XDB.GETLOCKTOKEN(
   path         IN      VARCHAR2,
   locktoken    OUT     VARCHAR2);

Parameters

Table 186-38 GETLOCKTOKEN Procedure Parameters

Parameter Description

path

Path name to the resource

locktoken

Logged-in user's lock token for the resource

Usage Notes

The user must have READPROPERTIES privilege on the resource.

186.5.41 GETPRIVILEGES Function

This deprecated function gets all privileges granted to the current user on a specified resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETPRIVILEGES Function.

Syntax

DBMS_XDB.GETPRIVILEGES(
   res_path    IN     VARCHAR2)
 RETURN sys.xmltype;

Parameters

Table 186-39 GETPRIVILEGES Function Parameters

Parameter Description

res_path

Absolute path in the hierarchy of the resource

Return Values

An XMLType instance of <privilege> element, which contains the list of all leaf privileges granted on this resource to the current user.

186.5.42 GETRESOID Function

This deprecated procedure returns the object ID of the resource from its absolute path.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETRESOID Function.

Syntax

DBMS_XDB.GETRESOID(
   abspath IN VARCHAR2)
RETURN RAW;

Parameters

Table 186-40 GETRESOID Function Parameters

Parameter Description

abspath_path

Absolute path of the resource

Return Values

NULL if the resource is not present.

186.5.43 GETXDB_TABLESPACE Function

This deprecated function returns the current tablespace of the XDB (user).

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the GETXDB_TABLESPACE Function.

Syntax

DBMS_XDB.GETXDB_TABLESPACE
 RETURN VARCHAR2;

186.5.44 HASBLOBCONTENT Function

This deprecated function returns TRUE if the resource has BLOB content.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the HASBLOBCONTENT Function.

Syntax

DBMS_XDB.HASBLOBCONTENT 
     abspath    IN     VARCHAR2)
 RETURN BOOLEAN;

Parameters

Table 186-41 HASBLOBCONTENT Function Parameters

Parameter Description

abspath_path

Absolute path of the resource

Return Values

TRUE if the resource has BOB content.

186.5.45 HASCHARCONTENT Function

This deprecated function returns TRUE if the resource has character content.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the HASCHARCONTENT Function.

Syntax

DBMS_XDB.HASCHARCONTENT 
     abspath    IN     VARCHAR2)
 RETURN BOOLEAN;

Parameters

Table 186-42 HASCHARCONTENT Function Parameters

Parameter Description

abspath_path

Absolute path of the resource

Return Values

TRUE if the resource has character content.

186.5.46 HASXMLCONTENT Function

This deprecated function returns TRUE if the resource has XML content.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the HASXMLCONTENT Function.

Syntax

DBMS_XDB.HASXMLCONTENT 
     abspath    IN     VARCHAR2)
 RETURN BOOLEAN;

Parameters

Table 186-43 HASXMLCONTENT Function Parameters

Parameter Description

abspath_path

Absolute path of the resource

Return Values

TRUE if the resource has XML content.

186.5.47 HASXMLREFERENCE Function

This deprecated function returns TRUE if the resource has a REF to XML content.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the HASXMLREFERENCE Function.

Syntax

DBMS_XDB.HASXMLREFERENCE 
     abspath    IN     VARCHAR2)
 RETURN BOOLEAN;

Parameters

Table 186-44 HASXMLREFERENCE Function Parameters

Parameter Description

abspath_path

Absolute path of the resource

Return Values

TRUE resource has a REF to XML content.

186.5.48 ISFOLDER Function

This deprecated function returns TRUE if the resource is a folder or container.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the ISFOLDER Function.

Syntax

DBMS_XDB.ISFOLDER 
     abspath    IN     VARCHAR2)
 RETURN BOOLEAN;

Parameters

Table 186-45 DBMS_XDB.ISFOLDER Function Parameters

Parameter Description

abspath_path

Absolute path of the resource

Return Values

TRUE if the resource is a folder or container.

186.5.49 LINK Procedures

This deprecated procedure creates a link from a specified folder to a specified resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the LINK Procedures.

Syntax

DBMS_XDB.LINK(
   srcpath      IN   VARCHAR2,
   linkfolder   IN   VARCHAR2,
   linkname     IN   VARCHAR2);
DBMS_XDB.LINK(
   srcpath      IN   VARCHAR2,
   linkfolder   IN   VARCHAR2,
   linkname     IN   VARCHAR2,
   linktype     IN   PLS_INTEGER := DBMS_XDB.LINK_TYPE_HARD);

Parameters

Table 186-46 LINK Procedure Parameters

Parameter Description

srcpath

Path name of the resource to which a link is created

linkfolder

Folder in which the new link is placed

linkname

Name of the new link

linktype

Type of link to be created:

  • DBMS_XDB.LINK_TYPE_HARD (default)

  • DBMS_XDB.LINK_TYPE_WEAK

  • DBMS_XDB.LINK_TYPE_SYMBOLIC

186.5.50 LOCKRESOURCE Function

Given a path to a resource, this deprecated function gets a WebDAV-style lock on that resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the LOCKRESOURCE Function.

Syntax

DBMS_XDB.LOCKRESOURCE(
   path      IN  VARCHAR2,
   depthzero IN  BOOLEAN,
   shared    IN  boolean)
RETURN BOOLEAN;

Parameters

Table 186-47 LOCKRESOURCE Function Parameters

Parameter Description

path

Path name of the resource to lock.

depthzero

Currently not supported

shared

Passing TRUE obtains a shared write lock

Return Values

TRUE if successful.

Usage Notes

The user must have UPDATE privileges on the resource.

186.5.51 PROCESSLINKS Procedure

This deprecated procedure processes document links in the specified resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the PROCESSLINKS Procedure.

Syntax

DBMS_XDB.PURGERESOURCEMETADATA( 
 abspath  IN  VARCHAR2,
 recurse  IN  BOOLEAN := FALSE);

Parameters

Table 186-48 PROCESSLINKS Procedure Parameters

Parameter Description

abspath

Absolute path of the resource. If the path is a folder, use the recurse flag.

recurse

Used only if abspath specifies a folder. If TRUE, process links of all resources in the folder hierarchy rooted at the specified resource. If FALSE, process links of all documents in this folder only.

186.5.52 PURGERESOURCEMETADATA Procedure

This deprecated procedure deletes all user metadata from a resource. Schema-based metadata is removed in cascade mode, rows being deleted from the corresponding metadata tables.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the PURGERESOURCEMETADATA Procedure.

Syntax

DBMS_XDB.PURGERESOURCEMETADATA(  
 abspath  IN  VARCHAR2);

Parameters

Table 186-49 PURGERESOURCEMETADATA Procedure Parameters

Parameter Description

abspath

Absolute path of the resource

186.5.53 RENAMERESOURCE Procedure

This deprecated procedure renames the XDB resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the RENAMERESOURCE Procedure.

Syntax

DBMS_XDB.RENAMERESOURCE(
   srcpath    IN  VARCHAR2,
   destfolder IN  CARCHAR2,
   newname    IN  VARCHAR2);

Parameters

Table 186-50 RENAMERESOURCE Procedure Parameters

Parameter Description

srcpath

Absolute path in the Hierarchy for the source resource destination folder

destfolder

Absolute path in the Hierarchy for the destination folder

newname

Name of the child in the destination folder

186.5.54 SETACL Procedure

This deprecated procedure set the ACL on a specified resource to be the ACL specified by path.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the SETACL Procedure.

Syntax

DBMS_XDB.SETACL(
   res_path   IN  VARCHAR2,
   acl_path   IN  VARCHAR2);

Parameters

Table 186-51 SETACL Procedure Parameters

Parameter Description

res_path

Absolute path in the Hierarchy for resource

acl_path

Absolute path in the Hierarchy for ACL

Usage Notes

The user must have <write-acl> privileges on the resource.

186.5.55 SETFTPPORT Procedure

This deprecated procedure set the FTP port to a new value.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the SETFTPPORT Procedure.

Syntax

DBMS_XDB.SETFTPPORT(
   new_port  IN  NUMBER);

Parameters

Table 186-52 SETFTPPORT Procedure Parameters

Parameter Description

new_port

Value to which the FTP port is set

186.5.56 SETHTTPPORT Procedure

This deprecated procedure set the HTTP port to a new value.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the SETHTTPPORT Procedure.

Syntax

DBMS_XDB.SETHTTPPORT(
   new_port  IN  NUMBER);

Parameters

Table 186-53 SETHTTPPORT Procedure Parameters

Parameter Description

new_port

Value to which the HTTP port is set

186.5.57 SETLISTENERENDPOINT Procedure

This deprecated procedure sets the parameters of a listener end point corresponding to the XML DB HTTP server. Both HTTP and HTTP2 end points can be set by invoking this procedure.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the SETLISTENERENDPOINT Procedure.

Syntax

DBMS_XDB.SETLISTENERENDPOINT (
   endpoint  IN  NUMBER, 
   host      IN  VARCHAR2,    port      IN  NUMBER, 
   protocol  IN  NUMBER);

Parameters

Table 186-54 SETLISTENERENDPOINT Procedure Parameters

Parameter Description

endpoint

End point to be set. Its value can be XDB_ENDPOINT_HTTP or XDB_ENDPOINT_HTTP2.

host

Interface on which the listener end point is to listen. Its value can be 'LOCALHOST,' NULL, or a hostname. If its value is 'LOCALHOST' the listener end point is permitted to only listen on the localhost interface. If its value is NULL or hostname, the listener end point is permitted to listen on both localhost and non-localhost interfaces.

port

Port on which the listener end point is to listen

protocol

Transport protocol that the listener end point is to accept. Its value can be XDB_PROTOCOL_TCP or XDB_PROTOCOL_TCPS

186.5.58 SETLISTENERLOCALACCESS Procedure

This deprecated procedure restricts all listener end points of the XML DB HTTP server to listen either only on the localhost interface (when l_access is set to TRUE) or to listen on both localhost and non-localhost interfaces (when l_access is set to FALSE).

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_CONFIG package - the SETLISTENERLOCALACCESS Procedure.

Syntax

DBMS_XDB.SETLISTENERLOCALACCESS (
   l_access   BOOLEAN);

Parameters

Table 186-55 SETLISTENERLOCALACCESS Procedure Parameters

Parameter Description

l_access.

TRUE or FALSE.

186.5.59 SPLITPATH Procedure

This deprecated procedure splits the path into a parentpath and childpath.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the SPLITPATH Procedure.

Syntax

DBMS_XDB.SPLITPATH(
      abspath     IN  VARCHAR2,
      parentpath  OUT VARCHAR2,
     childpath    OUT VARCHAR2);

Parameters

Table 186-56 SPLITPATH Procedure Parameters

Parameter Description

abspath

Absolute path to be split

parentpath

Parentpath

childpath

Childpath

186.5.60 TOUCHRESOURCE Procedure

This deprecated procedure changes the modification time of the resource to the current time.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the TOUCHRESOURCE Procedure.

Syntax

DBMS_XDB.TOUCHRESOURCE 
     abspath    IN     VARCHAR2);

Parameters

Table 186-57 DBMS_XDB.TOUCHRESOURCE Procedure Parameters

Parameter Description

abspath_path

Absolute path of the resource

186.5.61 UNLOCKRESOURCE Function

This deprecated function unlocks the resource given a lock token and a path to the resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the UNLOCKRESOURCE Function.

Syntax

DBMS_XDB.UNLOCKRESOURCE(
   path     IN  VARCHAR2,
   deltoken IN  VARCHAR2)
 RETURN BOOLEAN;

Parameters

Table 186-58 UNLOCKRESOURCE Function Parameters

Parameter Description

path

Path name to the resource

deltoken

Lock token to be removed

Return Values

TRUE if operation successful.

Usage Notes

The user must have UPDATE privileges on the resource.

186.5.62 UPDATERESOURCEMETADATA Procedures

This deprecated procedure updates metadata for a resource.

Note:

This procedure is deprecated in Release 12c. This functionality is replaced by a subprogram of the same name in the DBMS_XDB_REPOS package - the UPDATERESOURCEMETADATA Procedures.

The procedure takes in a resource identified by absolute path and the metadata in it to replace identified by its REF. It replaces that piece of metadata with user-defined metadata which is either in the form of a REF to XMLTYPE or an XMLTYPE.

Syntax

Can be used to update schema-based metadata only. The new metadata must be schema-based:

DBMS_XDB.UPDATERESOURCEMETADATA(
   abspath  IN VARCHAR2,
   oldmetadata    IN   REF SYS.XMLTYPE,
   newmetadata    IN   REF SYS.XMLTYPE)
 

Can be used to update schema-based metadata only. The new metadata must be schema-based or nonschema-based:

DBMS_XDB.UPDATERESOURCEMETADATA(
   abspath        IN   VARCHAR2,
   oldmetadata    IN   REF SYS.XMLTYPE,
   newmetadata    IN   XMLTYPE);
 

Can be used for both schema-based and nonschema-based metadata:

DBMS_XDB.UPDATERESOURCEMETADATA(
   abspath        IN   VARCHAR2,
   oldns          IN   VARCHAR2,
   oldname IN VARCHAR,
   newmetadata IN XMLTYPE);
 

Can be used for both schema-based or nonschema-based metadata. New metadata must be schema-based:

DBMS_XDB.UPDATERESOURCEMETADATA(
   abspath       IN   VARCHAR2,
   oldns         IN   VARCHAR2,
   oldname       IN   VARCHAR,
   newmetadata   IN   REF SYS.XMLTYPE);

Parameters

Table 186-59 UPDATERESOURCEMETADATA Procedure Parameters

Parameter Description

abspath

Absolute path of the resource

oldmetadata

REF to the old of metadata

newmetadata

REF to the new, replacement metadata (can be either schema-based or nonschema-based depending on the overload)

oldns

Namespace identifying old metadata

oldname

Local name identifying old metadata

Usage Notes

In the case of REF, it stores the REF in the resource and the metadata is stored in a separate table. Uniqueness of REFs is enforced. In the case where the XMLTYPE is passed in, data is parsed to determine if it is schema-based or not and is stored accordingly.