19 Setup Utilities

This is a public interface for operations related to the setting up of utilities in Oracle LSH.

This section contains the following topics:

Initialize APIs

This is a public interface that is used internally to initialize all other Oracle LSH external API packages. See Calling the Security API Package for details. See Code Example Using Security and Error Message APIs for an example of a program that calls the initialization API.

This section contains the following topics:

Initialize a Package

This is used internally to initialize external Oracle LSH API packages.

Name

CDR_PUB_API_INITIALIZATION.Initialization

Signature

PROCEDURE INITIALIZATION( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_VPKGNAME  IN    VARCHAR2 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_VPKGNAME This is used internally to pass the external API package name.

Verify Whether an API is Enabled

Use this API to find out whether or not the API you want to use is enabled.

Name

CDR_PUB_API_INITIALIZATION.IsAPIenabled

Signature

FUNCTION ISAPIENABLED( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL 
) RETURN BOOLEAN; 

Return

BOOLEAN

  • True: The API is enabled.
  • False: It is disabled.

Parameters

This API has standard parameters. See Standard Parameters for details.

Enable an API

Use this API to enable LSH APIs that you want to use in a session. This API must be called at the beginning of each Program that uses LSH APIs.

Name

CDR_PUB_API_INITIALIZATION.EnableAPIs

Signature

PROCEDURE ENABLEAPIS( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2 
); 

Parameters

This API has standard parameters. See Standard Parameters for details.

Disable an API

Use this API to disable LSH APIs that you have used in a session. Call this API at the end of each Program that uses LSH APIs.

Name

CDR_PUB_API_INITIALIZATION.DisableAPIs

Signature

Procedure disableAPIs (
p_api_version IN NUMBER
,p_init_msg_list IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE
,p_commit IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE
,p_validation_level IN NUMBER default CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL
,x_return_status OUT NOCOPY VARCHAR2
,x_msg_count OUT NOCOPY NUMBER
,x_msg_data OUT NOCOPY VARCHAR2
);

Parameters

This API has standard parameters. See Standard Parameters for details.

Get Factory Support

This is a public interface that hosts utility APIs for other packages.

This section contains the following topics:

Get a Naming Version Object

Use this API to retrieve a valid CDR_NAMING_VERSION_OBJ_TYPE parameter by passing the primary keys COMPANY_ID, OBJ_ID, and OBJ_VER to it.

Name

CDR_PUB_DEF_FACTORY_SUPPORT.GetNamingObject

Signature

FUNCTION GETNAMINGOBJECT( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_NCOMPANYID  IN    CDR_NAMINGS.COMPANY_ID%TYPE, 
  PI_NOBJID  IN    CDR_NAMINGS.OBJ_ID%TYPE, 
  PI_NOBJVER  IN    CDR_NAMING_VERSIONS.OBJ_VER%TYPE, 
  PO_CDRNAMING  OUT    CDR_NAMING_VERSION_OBJ_TYPE 
) RETURN BOOLEAN; 

Return

BOOLEAN

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_NCOMPANYID (Mandatory) Enter the COMPANY_ID of the object. Use Get a Company ID.
  • PI_NOBJID (Mandatory) Enter the OBJ_ID of the object.
  • PI_NOBJVER (Mandatory) Enter the OBJ_VER of the object.
  • PO_CDRNAMING (Mandatory) This is the output from the API.

Get a User ID

Use this API to retrieve the User ID of a given LSH user name.

Name

CDR_PUB_DEF_FACTORY_SUPPORT.getUserID

Signature

FUNCTION getUserID(  
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  P_USERNAME  IN    VARCHAR2 
  RETURN CDR_DF_NAMING_V.CHECKED_OUT_ID%type
);

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

P_USER_NAME (Mandatory) The LSH application user name.

Get a User Name

Use this API to retrieve the current user name.

Name

CDR_PUB_DEF_FACTORY_SUPPORT.GetUserName

Signature

FUNCTION GETUSERNAME( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_USERID  IN    NUMBER 
) RETURN VARCHAR2;

Return

Type VARCHAR2

Description VARCHAR2.

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_USERID (Mandatory) Enter the User ID. Use CDR_PUB_DEF_FACTORY_SUPPORT.GETUSERID to get the ID of the current user.

Get Factory Utilities

This is a public interface that hosts utility APIs for other packages.

This section contains the following topics:

Get a Base Object Type

Use this API to retrieve all details of an object from CDR_BASE_OBJ_TYPE table, by passing the object's primary key values: COMPANY_ID, OBJ_ID, and OBJ_VER.

Name

CDR_PUB_DEF_FACTORY_UTILS.GetCDRBaseObject

Signature

FUNCTION GETCDRBASEOBJECT( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_COMPANYID  IN    CDR_NAMINGS.COMPANY_ID%TYPE, 
  PI_OBJID  IN    CDR_NAMINGS.OBJ_ID%TYPE, 
  PI_OBJVER  IN    CDR_NAMING_VERSIONS.OBJ_VER%TYPE 
) RETURN CDR_BASE_OBJ_TYPE;

Return

Type CDR_BASE_OBJ_TYPE

Description CDR_BASE_OBJ_TYPE

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_COMPANYID (Mandatory) Enter the COMPANY_ID of the object
  • PI_OBJID (Mandatory) Enter the OBJ_ID of the object
  • PI_OBJVER (Mandatory) Enter the OBJ_VER of the object

Get a Company ID

Use this API to retrieve the COMPANY_ID of a given object. The object is identified from the context that this API is used in.

Name

CDR_PUB_DEF_FACTORY_UTILS.GetCompanyID

Signature

FUNCTION GETCOMPANYID( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL 
) RETURN NUMBER; 

Return

Type NUMBER

Parameters

This API has standard parameters. See Standard Parameters) for details.

Get Factory Validations

This is a public interface that hosts APIs for checking object validation on various objects. These APIs are tools to automatically validate objects without having to manually set their attributes to validate them.

This section contains the following topics:

Validate a Namespace

Use this API to validate whether a given object is created in a valid parent; for example, you may want to check if a Program Definition is a valid parent of a Table Descriptor.

Name

CDR_PUB_DEF_FACTORY_VALIDATE.ValidateNamespace

Signature

FUNCTION VALIDATENAMESPACE( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PIO_SOURCECDRNAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE 
) RETURN BOOLEAN; 

Return

Type BOOLEAN

If the function returns True, then the reference is valid. Otherwise, it's invalid.

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.

For OBJECT_TYPE_RC enter the appropriate value for the object for which you want to validate a reference.

Other required attributes are: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_TYPE_RC,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER,REF_COMPANY_ID,REF_OBJ_ID,REF_OBJ_VER

Validate a Reference

Use this API to validate the definition specified for the given object id.

Name

CDR_PUB_DEF_FACTORY_VALIDATE.ValidateReference

Signature

FUNCTION VALIDATEREFERENCE( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PIO_SOURCECDRNAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE 
) RETURN BOOLEAN; 

Return

Type BOOLEAN

If the function returns True, then the reference is valid. Otherwise, it's invalid.

  • True: The referenced object is valid.
  • False: The references object is not valid.

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.

For OBJECT_TYPE_RC enter the appropriate value for the object for which you want to validate a reference.

Other required attributes are: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_TYPE_RC,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER,REF_COMPANY_ID,REF_OBJ_ID,REF_OBJ_VER

Get Data from Object Naming Tables

This is a public interface that is used to retrieve data from naming-related tables.

This section contains the following topics:

Get the Latest Version

Use this API to retrieve the latest version available for a given object.

Name

CDR_PUB_DF_NAMING_UTIL.GetLastVersion

Signature

FUNCTION GETLASTVERSION( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN NUMBER; 

Return

Type NUMBER

Description number

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Get a Maximum Version

Use this API to get the maximum versions of a specified object and its namespace.

Name

CDR_PUB_DF_NAMING_UTIL.GetMaxObjAndNsVersions

Signature

PROCEDURE GETMAXOBJANDNSVERSIONS( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_COMPID  IN    NUMBER, 
  PI_OBJID  IN    NUMBER, 
  PO_MAXOBJVER  OUT    NUMBER, 
  PO_MAXNSOBJVER  OUT    NUMBER 
);

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_COMPID (Mandatory) Enter the COMPANY_ID of the given object.
  • PI_OBJID (Mandatory) Enter the OBJ_ID of the given object.
  • PO_MAXOBJVER This is an output parameter. It returns the maximum version of the given object.
  • PO_MAXNSOBJVER This is an output parameter. It returns the maximum version of the Namespace of the given object.

Get the Type of a Naming Object

Use this API to get the type of a specified naming object.

Name

CDR_PUB_DF_NAMING_UTIL.GetNamingObjectType

Signature

FUNCTION GETNAMINGOBJECTTYPE( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PIO_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN VARCHAR2; 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE. The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Get an Object's Naming Version

Use this API to retrieve an initialized object of table type CDR_NAMING_VERSION_OBJ_TYPE for a given naming object.

Name

CDR_PUB_DF_NAMING_UTIL. GetNamingVersionObject

Signature

FUNCTION GETNAMINGVERSIONOBJECT( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN CDR_NAMING_VERSION_OBJ_TYPE; 

Return

Type CDR_NAMING_VERSION_OBJ_TYPE

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Get an Object's Subtype ID

Use this API to retrieve the object subtype ID of a given naming object.

Name

CDR_PUB_DF_NAMING_UTIL.GetObjectSubtypeID

Signature

FUNCTION GETOBJECTSUBTYPEID( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN NUMBER; 

Return

Type NUMBER

Description Number

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_BASEOBJECT Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Get an Object's Checkout Status

Use this API to find out whether or not a naming object is checked out.

Name

CDR_PUB_DF_NAMING_UTIL.IsNamingCheckedOut

Signature

FUNCTION ISNAMINGCHECKEDOUT( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PIO_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN BOOLEAN; 

Return

Type BOOLEAN

Description Boolean

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Get Checkout Properties

Use this API to retrieve the checkout status and implicit checkout property of a specified object.

Name

CDR_PUB_DF_NAMING_UTIL.GetChkoutProp

Signature

PROCEDURE GETCHKOUTPROP( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_COMPID  IN    NUMBER, 
  PI_OBJID  IN    NUMBER, 
  PO_CHKOUTSTATUS  OUT    VARCHAR2, 
  PO_CHKIMPLPROP  OUT    VARCHAR2 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_COMPID (Mandatory) Enter the COMPANY_ID of the given object.
  • PI_OBJID (Mandatory) Enter the OBJ_ID of the given object.
  • PO_CHKOUTSTATUS This is an output parameter. It returns the checkout status of the given object
  • PO_CHKIMPLPROP This is an output parameter. It returns the implicit checkout property of the given object.

Get a Naming Object's Parent

Use this API to retrieve the parent object of a given naming object.

Name

CDR_PUB_DF_NAMING_UTIL.GetParentNaming

Signature

FUNCTION GETPARENTNAMING( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN CDR_BASE_OBJ_TYPE; 

Return

Type CDR_BASE_OBJ_TYPE

Description CDR_BASE_OBJ_TYPE

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Get a Parent Naming Object

Use this API to retrieve the parent object of a naming object.

Name

CDR_PUB_DF_NAMING_UTIL.GetParentNaming

Signature

FUNCTION GETPARENTNAMING( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN CDR_BASE_OBJ_TYPE; 

Return

Type CDR_BASE_OBJ_TYPE

Description CDR_BASE_OBJ_TYPE

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER

Get the Latest Version of the Parent Object

Use this API to retrieve the latest version of the parent of the given object.

Name

CDR_PUB_DF_NAMING_UTIL.GetLatestVersionOfParent

Signature

FUNCTION GETLATESTVERSIONOFPARENT( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN CDR_BASE_OBJ_TYPE;

Return

Type CDR_BASE_OBJ_TYPE

Description cdr_base_obj_type

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Get the Naming Status of a Parent Object

Use this API to get the naming status of the parent object of the specified object

Name

CDR_PUB_DF_NAMING_UTIL.GetParentNamingStatus

Signature

FUNCTION GETPARENTNAMINGSTATUS( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_COMPANYID  IN    CDR_NAMINGS.COMPANY_ID%TYPE, 
  PI_NSOBJID  IN    CDR_NAMINGS.OBJ_ID%TYPE, 
  PI_NSOBJVER  IN    CDR_NAMING_VERSIONS.OBJ_VER%TYPE 
) RETURN VARCHAR2; 

Return

Type VARCHAR2

Description varchar2

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_COMPANYID (Mandatory) Enter the COMPANY_ID of the object.
  • PI_NSOBJID (Mandatory) Enter the OBJ_ID of the given object.
  • PI_NSOBJVER (Mandatory) Enter the OBJ_VER of the given object.

Get the Validation Status of a Parent Object

Use this API to get the validation status of the parent object of the specified object

Name

CDR_PUB_DF_NAMING_UTIL.GetParentValidationStatus

Signature

FUNCTION GETPARENTVALIDATIONSTATUS( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_COMPANYID  IN    CDR_NAMINGS.COMPANY_ID%TYPE, 
  PI_NSOBJID  IN    CDR_NAMINGS.OBJ_ID%TYPE, 
  PI_NSOBJVER  IN    CDR_NAMING_VERSIONS.OBJ_VER%TYPE 
) RETURN VARCHAR2; 

Return

Type VARCHAR2

Description varchar2

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_COMPANYID (Mandatory) This refers to the company id of the given object.
  • PI_NSOBJID (Mandatory) Enter the OBJ_ID of the given object.
  • PI_NSOBJVER (Mandatory) Enter the OBJ_VER of the given object.

Get a Definition Object

Use this API to retrieve the definition object that the given instance object points to.

Name

CDR_PUB_DF_NAMING_UTIL.GetRefNaming

Signature

FUNCTION GETREFNAMING( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN CDR_BASE_OBJ_TYPE;

Return

Type CDR_BASE_OBJ_TYPE

Description CDR_BASE_OBJ_TYPE

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Get a Lookup Meaning

Use this API to get the Lookup Meaning for a Lookup Type and Code

Name

CDR_PUB_DF_NAMING_UTIL.GetLookupMeaning

Signature

PROCEDURE GETLOOKUPMEANING( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PI_LOOKUPTYPE  IN    VARCHAR2, 
  PI_LOOKUPCODE  IN    VARCHAR2, 
  PO_LOOKUPMEANING  OUT    VARCHAR2 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_LOOKUPTYPE (Mandatory) Enter the Lookup Type
  • PI_LOOKUPCODE (Mandatory) Enter the Lookup Code
  • PO_LOOKUPMEANING This is an output parameter. It returns the Lookup Meaning.

Find Whether an Object is an Instance

Use this API to check if the given naming object is an instance.

Name

CDR_PUB_DF_NAMING_UTIL.IsInstance

Signature

FUNCTION ISINSTANCE( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_OBJECT_TYPE_RC  IN    VARCHAR2 
) RETURN VARCHAR2;

Return

Type VARCHAR2

Description varchar2

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_OBJECT_TYPE_RC (Mandatory) Object Type RC.

Find Whether Checked Out By Current User

Use this API to find out whether the given naming object is checked out by the current user.

Name

CDR_PUB_DF_NAMING_UTIL.IsCheckedOutByUser

Signature

FUNCTION ISCHECKEDOUTBYUSER( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PIO_BASEOBJECT  IN    CDR_BASE_OBJ_TYPE 
) RETURN BOOLEAN; 

Return

Type BOOLEAN Description boolean

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_BASEOBJECT (Mandatory) This is a parameter of table type CDR_BASE_OBJ_TYPE.

The required attributes are COMPANY_ID,OBJECT_ID,OBJECT_VER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.

Find Whether a Checkout is User-Specific

Use this API to find out if an object checkout is user specific or non-user specific. Only the user who checked out a user specific object can check it in; whereas any user may check in a non-user specific object.

Name

CDR_PUB_DF_NAMING_UTIL.IsCheckOutUserSpecific

Signature

FUNCTION ISCHECKOUTUSERSPECIFIC( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_SOURCECDRNAMING  IN    CDR_NAMING_VERSION_OBJ_TYPE 
) RETURN BOOLEAN; 

Return

Type BOOLEAN

Description Boolean True or False

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PI_SOURCECDRNAMING (Mandatory) This is a parameter of type cdr_naming_versions_obj_type.

The following attributes are required: COMPANY_ID, OBJECT_TYPE_RC, NAME, NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER, OWNING_LOCATION_RC, OBJECT_SUBTYPE_ID, DESCRIPTION, REF_COMPANY_ID, REF_OBJ_ID, REF_OBJ_VER.

Find Whether Checkout is Implicit

Use this API to find out whether a naming object is checked out implicitly.

Name

CDR_PUB_DF_NAMING_UTIL.IsCheckOutImplicit

Signature

FUNCTION ISCHECKOUTIMPLICIT( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  PI_OBJECT_TYPE_RC  IN    VARCHAR2, 
  PI_ISINSTONLY  IN    VARCHAR2 
) RETURN BOOLEAN; 

Return

Type BOOLEAN Description boolean

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PI_OBJECT_TYPE_RC (Mandatory) Enter the Object Type.
  • PI_ISINSTONLY (Mandatory) This will have the value 'YES' or 'NO', to indicate whether it is called from an Instance or a Definition.

Define and Modify Adapters

This package is used to create adapter domains and adapter areas for user defined adapters.

This section contains the following topics:

Create an Adapter Domain

Use this API to create an Adapter Domain.

Name

CDR_PUB_ATK_ADAPTER.CreateAdapterDomain

Signature

PROCEDURE CREATEADAPTERDOMAIN( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_ADAPTERDOMAINNAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_ADAPTERDOMAINNAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSION_OBJ_TYPE. Enter values for the Adapter Domain that you are creating. For OBJECT_TYPE_RC enter $OBJTYPES$ADAPTERDOMAIN.

The following attributes are required: COMPANY_ID,NAME

Modify an Adapter Domain

Use this API to modify an Adapter Domain.

Name

CDR_PUB_ATK_ADAPTER.ModifyAdapterDomain

Signature

PROCEDURE MODIFYADAPTERDOMAIN(
P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE,
P_COMMIT IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE,
P_VALIDATION_LEVEL IN NUMBER DEFAULT CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2,
PIO_ADAPTERDOMAINNAMING IN OUT NOCOPY CDR_NAMING_VERSION_OBJ_TYPE
);

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PARAM P_API_VERSION (Mandatory). Enter the current version of the API you are calling. The API compares the version numbers of incoming calls to its current version number and returns an error if they are incompatible.
  • PARAM P_INIT_MSG_LIST (Optional). Accept the default value (FND_API.G_FALSE) to ensure that this individual API does not initialize the message list upon completion. Pass FND_API.G_TRUE to override the default behavior.
  • PARAM P_COMMIT (Optional). Accept the default value (FND_API.G_FALSE) to ensure that this individual API does not get committed upon completion. Pass FND_API.G_TRUE to override the default behavior.
  • PARAM P_VALIDATION_LEVEL (Optional). Accept the default value to perform full validation. No other values are currently supported.
  • PARAM X_RETURN_STATUS. This output parameter returns the end status of the API: (S) Success, (E) Error or (U) Unexpected Error.
  • PARAM X_MSG_COUNT. This output parameter returns the count of error messages if the return status is other than Success.
  • PARAM X_MSG_DATA. This output parameter returns the text of the error message, if the message count is 1. If there are more than one message, use cdr_pub_msg_pub.get to retrieve the messages.
  • PARAM PIO_ADAPTERDOMAINNAMING (Mandatory). This is a parameter of table type CDR_NAMING_VERSION_OBJ_TYPE. Enter values to identify the Adapter Domain and enter new values for the attributes you want to modify. All attributes are required. For OBJECT_TYPE_RC enter $OBJTYPES$ADAPTERDOMAIN.

Create an Adapter Area

Use this API to create an Adapter Area.

Name

CDR_PUB_ATK_ADAPTER.CreateAdapterArea

Signature

PROCEDURE CREATEADAPTERAREA( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_ADAPTERAREANAMING  IN OUT    CDR_NAMING_VERSION_OBJ_TYPE, 
  PIO_ADAPTERAREAROW  IN OUT    CDR_ADAPTER_AREAS%ROWTYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PIO_ADAPTERAREANAMING (Mandatory) This is a parameter of table type CDR_NAMING_VERSION_OBJ_TYPE. Enter values for the adapter area that you are creating.
  • PIO_ADAPTERAREAROW (Mandatory) This is a parameter of row type CDR_ADAPTER_AREAS table. Enter values specific for the adapter area that you are creating. For OBJECT_TYPE_RC enter $OBJTYPES$ADAPTERAREA.

    The following attributes are required: COMPANY_ID,NAME

Modify an Adapter Area

Use this API to modify an Adapter Area.

Name

CDR_PUB_ATK_ADAPTER.ModifyAdapterArea

Signature

PROCEDURE MODIFYADAPTERAREA(
P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE,
P_COMMIT IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE,
P_VALIDATION_LEVEL IN NUMBER DEFAULT CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2,
PIO_ADAPTERAREANAMING IN OUT NOCOPY CDR_NAMING_VERSION_OBJ_TYPE,
PIO_ADAPTERAREAROW IN OUT NOCOPY CDR_ADAPTER_AREAS%ROWTYPE,
);

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PARAM P_INIT_MSG_LIST (Optional). Accept the default value (FND_API.G_FALSE) to ensure that this individual API does not initialize the message list upon completion. Pass FND_API.G_TRUE to override the default behavior.
  • PARAM P_COMMIT (Optional). Accept the default value (FND_API.G_FALSE) to ensure that this individual API does not get committed upon completion. Pass FND_API.G_TRUE to override the default behavior.
  • PARAM P_VALIDATION_LEVEL (Optional). Accept the default value to perform full validation. No other values are currently supported.
  • PARAM X_RETURN_STATUS. This output parameter returns the end status of the API: (S) Success, (E) Error or (U) Unexpected Error.
  • PARAM X_MSG_COUNT. This output parameter returns the count of error messages if the return status is other than Success.
  • PARAM X_MSG_DATA. This output parameter returns the text of the error message, if the message count is 1. If there are more than one message, use cdr_pub_msg_pub.get to retrieve the messages.
  • PARAM PIO_ADAPTERDOMAINNAMING (Mandatory). This is a parameter of table-type CDR_NAMING_VERSION_OBJ_TYPE. Enter values to identify the Adapter Area and enter new values for the attributes you want to modify.

    All attributes are required.

  • PARAM PIO_ADAPTERAREAROW (Mandatory). This is a parameter of row-type CDR_ADAPTER_AREAS table.
  • PARAM P_API_VERSION (Mandatory). Enter the current version of the API you are calling. The API compares the version numbers of incoming calls to its current version number and returns an error if they are incompatible.

    For OBJECT_TYPE_RC enter $OBJTYPES$ADAPTERAREA.

Populate a Tech Type Table

Use this API to populate a Tech Type Table.

Name

CDR_PUB_ATK_ADAPTER.PopulateTechTypes

Signature

PROCEDURE POPULATETECHTYPES( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2, 
  PIO_TECHTYPEROW  IN OUT    CDR_TECH_TYPES%ROWTYPE 
); 

Parameters

This API has standard parameters (see Standard Parameters) and the following parameter:

PIO_TECHTYPEROW (Mandatory) This is a parameter of row type cdr_tech_types table. Enter values specific for the tech type that you are creating.

Modify a Tech Type Table

Use this API to modify a Tech Type Table.

Name

CDR_PUB_ATK_ADAPTER.ModifyTechTypes

Signature

PROCEDURE MODIFYTECHTYPE(
P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE,
P_COMMIT IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE,
P_VALIDATION_LEVEL IN NUMBER DEFAULT CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2,
PIO_TECHTYPEROW IN OUT NOCOPY CDR_TECH_TYPES%ROWTYPE,
);

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • PARAM P_API_VERSION (Mandatory). Enter the current version of the API you are calling. The API compares the version numbers of incoming calls to its current version number and returns an error if they are incompatible.
  • PARAM P_INIT_MSG_LIST (Optional). Accept the default value (FND_API.G_FALSE) to ensure that this individual API does not initialize the message list upon completion. Pass FND_API.G_TRUE to override the default behavior.
  • PARAM P_COMMIT (Optional). Accept the default value (FND_API.G_FALSE) to ensure that this individual API does not get committed upon completion. Pass FND_API.G_TRUE to override the default behavior.
  • PARAM P_VALIDATION_LEVEL (Optional). Accept the default value to perform full validation. No other values are currently supported.
  • PARAM X_RETURN_STATUS. This output parameter returns the end status of the API: (S) Success, (E) Error or (U) Unexpected Error.
  • PARAM X_MSG_COUNT. This output parameter returns the count of error messages if the return status is other than Success.
  • PARAM X_MSG_DATA. This output parameter returns the text of the error message, if the message count is 1. If there are more than one message, use cdr_pub_msg_pub.get to retrieve the messages.
  • PARAM PIO_TECHTYPEROW (Mandatory). This is a parameter of row type cdr_tech_types table. Enter values specific for the tech type that you want to update.

Host Definition Constants

This is a public interface that hosts definition constants for Oracle LSH APIs.

Name

CDR_PUB_DEF_CONSTANTS

Read Messages

This is a public interface for reporting using messages from the system's message stack. See Code Example Using Security and Error Message APIs for an example of a program that calls this reporting API.

This section contains the following topics:

Get a Message

Use this API to retrieve messages from the message stack.

Name

CDR_PUB_MSG_PUB.Get

Signature

FUNCTION GET( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  P_MSG_INDEX  IN    NUMBER := G_NEXT, 
  P_ENCODED  IN    VARCHAR2 := 'T' 
) RETURN VARCHAR2; 

Return

Type VARCHAR2

Description varchar2 Message Text

Parameters

This API has standard parameters (see Standard Parameters) and the following parameters:

  • P_MSG_INDEX (Mandatory) Enter the number of the message you want to retrieve; for example, if you enter the number 1, the first message is retrieved from the message stack.
  • P_ENCODED (Mandatory) Enter "T" if you want the message to be encoded, and "F" if you do not.

Get a Message Count

Use this API to retrieve the count of messages in the message stack. This API returns the G_MSG_COUNT value.

Name

CDR_PUB_MSG_PUB.Count_Msg

Signature

FUNCTION COUNT_MSG( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL 
) RETURN NUMBER; 

Return

Type NUMBER

Description Number of messages in the stack

Parameters

This API has standard parameters (see Standard Parameters).

Initialize a Message Stack

Use this API to initialize the global message table. This API clears the G_MSG_TBL and resets all its global variables, except the message level threshold value.

Name

CDR_PUB_MSG_PUB.Initialize

Signature

PROCEDURE INITIALIZE( 
  P_API_VERSION  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_COMMIT  IN    VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, 
  P_VALIDATION_LEVEL  IN    NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, 
  X_RETURN_STATUS  OUT    VARCHAR2, 
  X_MSG_COUNT  OUT    NUMBER, 
  X_MSG_DATA  OUT    VARCHAR2 
); 

Parameters

This API has standard parameters (see Standard Parameters).

Change Tablespaces

Use this API to alter the tablespace of Table instances and indexes in a single container—Domain, Application Area, or Work Area—identified recursively. This may be helpful if you want to archive data or if the current tablespace runs out of room. You can associate Table instances and indexes with the same tablespace or two different ones.

The API generates a script to change the tablespace attribute of all table instances and indexes in the container you specify. It also analyzes the effect of the change and generates a log file that may include errors or warnings.

To Use this API:

  1. Take a backup of the database.
  2. Run the API with a database account associated with an application user.
  3. Check the generated log file for errors and warnings before running the generated script.
  4. Run the script with a database account with DBA privileges.

    Note:

    If a Work Area is installed after its Table instances and indexes have been changed to a different tablespace, some of the new tablespace associations are lost:
    • Table instances remain in the new tablespace.
    • Temporary tables revert to the default tablespace.
    • Nonunique and bitmap indexes are associated with the new tablespace of the Table instances, even if they had been in a different new tablespace.
    • All other indexes revert to the default tablespace.

    You can run the script again to properly reassociate all objects with the preferred tablespaces.

Name

CDR_PUB_REORG_TABLES.genTablesTablespaceAlterScript

Signature

procedure genTablesTablespaceAlterScript(
		p_api_version      IN NUMBER ,
		p_init_msg_list    IN VARCHAR2 DEFAULT CDR_PUB_DEF_CONSTANTS.G_FALSE,
		p_validation_level IN NUMBER DEFAULT 
                   CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL,
		pi_companyId        IN cdr_namings.company_id%TYPE,
		pi_objId            IN cdr_namings.obj_id%TYPE,
		pi_targetTabTablespace IN VARCHAR2,
		pi_targetIdxTablespace IN VARCHAR2,
		po_cReturnClob OUT NOCOPY clob,
		po_cReturnLogClob OUT NOCOPY clob,
		x_return_status OUT NOCOPY VARCHAR2,
		x_msg_count OUT NOCOPY NUMBER,
		x_msg_data OUT NOCOPY VARCHAR2);

Parameters

This API has standard parameters (see the Oracle Health Sciences Life Sciences Data Hub API Guide) and the following parameters:

Note:

Unlike other LSH public APIs, this API has the standard P_COMMIT parameter permanently set to FALSE.
  • PI_COMPANYID (Mandatory). Enter the company ID of the container object—Domain, Application Area, or Work Area—that contains the table instances whose tablespace you want to change. To get your company ID, use CDR_PUB_DEF_FACTORY_UTILS.GetCompanyId.
  • PI_OBJID (Mandatory). Enter the object ID of the container object—Domain, Application Area, or Work Area—that contains the table instances whose tablespace you want to change.
  • PI_TARGETTABTABLESPACE (Mandatory). Enter the name of the new tablespace for tables.
  • PI_TARGETIDXTABLESPACE (Mandatory). Enter the name of the new tablespace for indexes.
  • PO_CRETURNCLOB The API returns a generated script CLOB output.
  • PO_CRETURNLOGCLOB The API returns a generated log CLOB output.