GetActionDefType

説明

指定されたアクションのタイプを識別します。

GetActionDefNames メソッドを使用すると、action_def_name パラメータに有効な値のリストを取得できます。

レコード タイプに基づいて、指定されたレコードに許可されるアクションのタイプを制御します。(完全なリストについては、ActionType 定数を参照してください)。

EntityDef オブジェクトの他の部分と同様に、管理者が Rational ClearQuest Designer を使用して定義済みアクションを設定します。 これらは、API から直接には設定できません。

構文

VBScript

entitydef.GetActionDefType action_def_name 

Perl

$entitydef->GetActionDefType(action_def_name); 
識別子
説明
entitydef
スキーマ内のレコード タイプに対応する EntityDef オブジェクト。
action_def_name
entitydef の有効なアクション名を識別する String。
戻り値
action_def_name に指定されたアクションのタイプを指定する Long。値は、ActionType 定数の 1 つに対応します。

VBScript

set sessionObj = GetSession
set entityDefObj = sessionObj.GetEntityDef(GetEntityDefName())

sessionObj.OutputDebugString "Modify action names for " & _
         entityDefObj.GetName() 

' List the action names whose type is "modify"
nameList = entityDefObj.GetActionDefNames()
For Each actionName in nameList
   actionType = entityDefObj.GetActionDefType(actionName)
   if actionType = AD_MODIFY Then
      sessionObj.OutputDebugString actionName
   End If 
Next
Perl
$sessionobj = $entity->GetSession();



$entitydefname = $entity->GetEntityDefName();



$entitydefobj = $sessionobj->GetEntityDef($entitydefname); 



# Search for a legal action with which to modify the record 

$actiondeflist = $entity->GetLegalActionDefNames();



foreach $actionname(@$actiondeflist)

 {

  $actiondeftype = $entitydefobj->GetActionDefType($actionname);

  if ($actiondedftype eq $CQPerlExt::CQ_MODIFY)

   {

   $sessionobj->EditEntity($entity,$actionname);

   }

 } 


フィードバック