CARIS HPD : HPD® Server API : Database Setup : Integrator Overrides Reference Methods : CANLOCKFEATURE
 

CANLOCKFEATURE

This function allows an integrator to customize which features can be locked (and therefore edited) by the HPD Source Editor. This function is called when the feature is being locked for all usages. See also CANLOCKREPRESENTATION.

The function used by the integrator must have a fast response time, as the user will have to wait for the result before continuing editing tasks.

Input

Parameter

Type

Description

p_rwf_id

INTEGER

The primary key for the feature object version

Output

Type

Description

Boolean

TRUE if lock allowed

FALSE if lock request rejected

Example

The following example shows the code for this function and where the integrator would add code to decide if a given object can be locked for modification by the HPD Source Editor:

FUNCTION canlockfeature (p_rwf_id IN rwfobject.rwf_id%TYPE)

RETURN BOOLEAN IS

   --v_ACRONYM OBJECT_CLASS.ACRONYM%TYPE; BEGIN

/*

   -- Example code

   SELECT ACRONYM INTO v_ACRONYM

   FROM RWFOBJECT RWF, OBJECT_CLASS OC

   WHERE RWF.OBJECTCLASS_ID = OC.OBJECTCLASS_ID

   AND RWF.RWF_ID = p_rwf_id;

-- Do not allow locking of depares.

   IF v_ACRONYM = 'DEPARE' THEN

   RETURN FALSE; END IF;

*/

   RETURN TRUE;

END canlockfeature;