phpDocumentor Testlink
[ class tree: Testlink ] [ index: Testlink ] [ all elements ]

Class: requirement_spec_mgr

Source Location: /requirement_spec_mgr.class.php

Class requirement_spec_mgr

Property Summary
mixed   $cfield_mgr  
mixed   $db  
mixed   $export_file_types  
mixed   $import_file_types  
mixed   $my_node_type  
mixed   $nodes_hierarchy_table  
mixed   $object_table  
mixed   $requirements_table  
mixed   $req_coverage_table  
mixed   $tree_mgr  

[ Top ]
Method Summary
requirement_spec_mgr   requirement_spec_mgr()  
void   check_title()  
void   create()  
void   createFromXML()  
void   customFieldValuesAsXML()   customFieldValuesAsXML
void   delete()  
void   delete_deep()   delete_deep()
void   exportReqSpecToXML()   exportReqSpecToXML
void   getReqTree()   getReqTree
void   get_all_in_testproject()  
void   get_by_id()  
void   get_by_title()  
array   get_coverage()   get analyse based on requirements and test specification
void   get_export_file_types()  
void   get_import_file_types()  
void   get_linked_cfields()  
array   get_metrics()   get requirement coverage metrics
void   get_requirements()  
void   get_requirements_count()  
void   html_table_of_custom_field_inputs()  
void   html_table_of_custom_field_values()  
void   set_order()  
void   update()  
void   values_to_db()  
void   xmlToMapReqSpec()   xmlToMapReqSpec
void   xmlToReqSpec()   xmlToReqSpec

[ Top ]
Properties
mixed   $cfield_mgr [line 49]

[ Top ]
mixed   $db [line 48]

Redefinition of:
tlObjectWithDB::$db

[ Top ]
mixed   $export_file_types = array("XML" => "XML") [line 62]

[ Top ]
mixed   $import_file_types = array("csv" => "CSV",
"csv_doors" => "CSV (Doors)",
"XML" => "XML",
"DocBook" => "DocBook")
[line 57]

[ Top ]
mixed   $my_node_type [line 63]

[ Top ]
mixed   $nodes_hierarchy_table = "nodes_hierarchy" [line 55]

[ Top ]
mixed   $object_table = "req_specs" [line 52]

[ Top ]
mixed   $requirements_table = "requirements" [line 53]

[ Top ]
mixed   $req_coverage_table = 'req_coverage' [line 54]

[ Top ]
mixed   $tree_mgr [line 50]

[ Top ]
Methods
Constructor requirement_spec_mgr  [line 74]

  requirement_spec_mgr requirement_spec_mgr( &$db  )

Parameters:
   &$db: 


[ Top ]
check_title  [line 627]

  void check_title( $title, [ $tproject_id = null], [ $parent_id = null], [ $id = null], [ $case_analysis = self::CASE_SENSITIVE]  )

Parameters:
   $title: 
   $tproject_id: 
   $parent_id: 
   $id: 
   $case_analysis: 


[ Top ]
create  [line 141]

  void create( $tproject_id, $parent_id, $title, $scope, $countReq, $user_id, [ $type = 'n'], [ $node_order = null]  )

Parameters:
   $tproject_id: 
   $parent_id: 
   $title: 
   $scope: 
   $countReq: 
   $user_id: 
   $type: 
   $node_order: 


[ Top ]
createFromXML  [line 1154]

  void createFromXML( $xml, $tproject_id, $parent_id, $author_id  )

Parameters:
   $xml: 
   $tproject_id: 
   $parent_id: 
   $author_id: 


[ Top ]
customFieldValuesAsXML  [line 1136]

  void customFieldValuesAsXML( $id: $id, $tproject_id: $tproject_id  )

customFieldValuesAsXML

Parameters:
$id:   $id:  requirement spec id
$tproject_id:   $tproject_id:  test project id


[ Top ]
delete  [line 443]

  void delete( $id  )

Parameters:
   $id: 


[ Top ]
delete_deep  [line 489]

  void delete_deep( $id  )

delete_deep()

Delete Req Specification, removing all children (other Req. Spec and Requirements)

Parameters:
   $id: 


[ Top ]
exportReqSpecToXML  [line 772]

  void exportReqSpecToXML( $id, $tproject_id, [ $optExport = array()]  )

exportReqSpecToXML

create XML string with following req spec data

  • basic data (title, scope)
  • custom fields values
  • children: can be other req spec or requirements (tree leaves)
Developed using exportTestSuiteDataToXML() as model

Parameters:
   $id: 
   $tproject_id: 
   $optExport: 


[ Top ]
getReqTree  [line 752]

  void getReqTree( $id  )

getReqTree

Example of returned value ( is a recursive one ) ( [childNodes] => Array ([0] => Array ( [id] => 216 [parent_id] => 179 [node_type_id] => 6 [node_order] => 0 [node_table] => req_specs [name] => SUB-R [childNodes] => Array ([0] => Array ( [id] => 181 [parent_id] => 216 [node_type_id] => 7 [node_order] => 0 [node_table] => requirements [name] => Gamma Ray Emissions [childNodes] => ) [1] => Array ( [id] => 182 [parent_id] => 216 [node_type_id] => 7 [node_order] => 0 [node_table] => requirements [name] => Coriolis Effet [childNodes] => ) ) ) [1] => Array ( [id] => 217 [parent_id] => 179 [node_type_id] => 6 [node_order] => 0 [node_table] => req_specs [name] => SUB-R2 [childNodes] => Array ...

Parameters:
   $id: 


[ Top ]
get_all_in_testproject  [line 336]

  void get_all_in_testproject( $tproject_id, [ $order_by = " ORDER BY title"]  )

Parameters:
   $tproject_id: 
   $order_by: 


[ Top ]
get_by_id  [line 194]

  void get_by_id( $id  )

Parameters:
   $id: 


[ Top ]
get_by_title  [line 572]

  void get_by_title( $title, [ $tproject_id = null], [ $parent_id = null], [ $case_analysis = self::CASE_SENSITIVE]  )

Parameters:
   $title: 
   $tproject_id: 
   $parent_id: 
   $case_analysis: 


[ Top ]
get_coverage  [line 233]

  array get_coverage( $id, integer $srs_id  )

get analyse based on requirements and test specification

Parameters:
integer   $srs_id: 
   $id: 

API Tags:
Return:  Coverage in three internal arrays: covered, uncovered, nottestable REQ

Information Tags:
Author:  martin havlat

[ Top ]
get_export_file_types  [line 98]

  void get_export_file_types( )



[ Top ]
get_import_file_types  [line 114]

  void get_import_file_types( )



[ Top ]
get_linked_cfields  [line 988]

  void get_linked_cfields( $id, [ $tproject_id = null]  )

Parameters:
   $id: 
   $tproject_id: 


[ Top ]
get_metrics  [line 279]

  array get_metrics( $id, integer $srs_id  )

get requirement coverage metrics

Parameters:
integer   $srs_id: 
   $id: 

API Tags:
Return:  results

Information Tags:
Author:  havlatm

[ Top ]
get_requirements  [line 512]

  void get_requirements( $id, [ $range = 'all'], [ $testcase_id = null], [ $order_by = " ORDER BY NH.node_order,title,req_doc_id"]  )

Parameters:
   $id: 
   $range: 
   $testcase_id: 
   $order_by: 


[ Top ]
get_requirements_count  [line 677]

  void get_requirements_count( $id, [ $range = 'all'], [ $testcase_id = null]  )

Parameters:
   $id: 
   $range: 
   $testcase_id: 


[ Top ]
html_table_of_custom_field_inputs  [line 1029]

  void html_table_of_custom_field_inputs( $id, [ $tproject_id = null], [ $parent_id = null], [ $name_suffix = '']  )

Parameters:
   $id: 
   $tproject_id: 
   $parent_id: 
   $name_suffix: 


[ Top ]
html_table_of_custom_field_values  [line 1067]

  void html_table_of_custom_field_values( $id, $tproject_id  )

Parameters:
   $id: 
   $tproject_id: 


[ Top ]
set_order  [line 663]

  void set_order( $map_id_order  )

Parameters:
   $map_id_order: 


[ Top ]
update  [line 369]

  void update( $id, $title, $scope, $countReq, $user_id, [ $type = TL_REQ_STATUS_NOT_TESTABLE]  )

Parameters:
   $id: 
   $title: 
   $scope: 
   $countReq: 
   $user_id: 
   $type: 


[ Top ]
values_to_db  [line 1122]

  void values_to_db( $hash, $node_id, [ $cf_map = null], [ $hash_type = null]  )

Parameters:
   $hash: 
   $node_id: 
   $cf_map: 
   $hash_type: 


[ Top ]
xmlToMapReqSpec  [line 872]

  void xmlToMapReqSpec( $xml_item, [ $level = 0]  )

xmlToMapReqSpec

Parameters:
   $xml_item: 
   $level: 


[ Top ]
xmlToReqSpec  [line 843]

  void xmlToReqSpec( $source, object $source:  )

xmlToReqSpec

Parameters:
object   $source::  $source->type: possible values 'string', 'file' $source->value: depends of $source->type 'string' => xml string 'file' => path name of XML file
   $source: 


[ Top ]
Constants
CASE_INSENSITIVE = 1 [line 46]

[ Top ]
CASE_SENSITIVE = 0 [line 45]

[ Top ]

Documentation generated on Fri, 03 Apr 2009 14:13:49 +0200 by phpDocumentor 1.4.1