Changeset 2253 for sandbox/workflow


Ignore:
Timestamp:
03/15/10 16:00:11 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Modificando chamadas CreateObject? para utilizarem a nova factory.

Location:
sandbox/workflow/branches/609
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/inc/class.WorkflowUtils.inc.php

    r2233 r2253  
    359359                function export() 
    360360                { 
    361                         $this->process_manager  = CreateObject('workflow.workflow_processmanager'); 
     361                        $this->process_manager  = Factory::getInstance('workflow_processmanager'); 
    362362 
    363363                        // retrieve process info 
  • sandbox/workflow/branches/609/inc/class.bo_agent.inc.php

    r795 r2253  
    278278                        if (!(isset($this->process))) 
    279279                        { 
    280                                 $this->process = CreateObject('workflow.workflow_process'); 
     280                                $this->process = Factory::getInstance('workflow_process'); 
    281281                                $this->process->getProcess($wf_p_id); 
    282282                        } 
  • sandbox/workflow/branches/609/inc/class.bo_agent_mail_smtp.inc.php

    r795 r2253  
    109109        { 
    110110                parent::bo_agent(); 
    111                 $this->so_agent = CreateObject('workflow.so_agent_mail_smtp'); 
     111                $this->so_agent = Factory::getInstance('so_agent_mail_smtp'); 
    112112                $this->bo_emailadmin = CreateObject('emailadmin.bo'); 
    113113                //the showProcessConfigurationFields is not done here, quite harder to build 
     
    466466                } 
    467467 
    468                 $process = CreateObject('workflow.workflow_process'); 
     468                $process = Factory::getInstance('workflow_process'); 
    469469                $process->getProcess($this->process_id); 
    470470                $this->process_name = $process->getName(); 
     
    637637                                        if ($this->process_name=='') 
    638638                                        { 
    639                                                 $process = CreateObject('workflow.workflow_process'); 
     639                                                $process = Factory::getInstance('workflow_process'); 
    640640                                                $process->getProcess($this->process_id); 
    641641                                                $this->process_name = $process->getName(); 
     
    648648                                        if ($this->process_version=='') 
    649649                                        { 
    650                                                 $process = CreateObject('workflow.workflow_process'); 
     650                                                $process = Factory::getInstance('workflow_process'); 
    651651                                                $process->getProcess($this->process_id); 
    652652                                                $this->process_name = $process->getName(); 
     
    683683                                        if (!is_object($this->role_manager)) 
    684684                                        { 
    685                                                 $this->role_manager = CreateObject('workflow.workflow_rolemanager'); 
     685                                                $this->role_manager = Factory::getInstance('workflow_rolemanager'); 
    686686                                        } 
    687687                                        if (!is_object($this->account)) 
     
    731731                                                        if (!is_object($this->role_manager)) 
    732732                                                        { 
    733                                                                 $this->role_manager = CreateObject('workflow.workflow_rolemanager'); 
     733                                                                $this->role_manager = Factory::getInstance('workflow_rolemanager'); 
    734734                                                        } 
    735735                                                        if (!is_object($this->account)) 
  • sandbox/workflow/branches/609/inc/class.run_activity.inc.php

    r2249 r2253  
    1010        \**************************************************************************/ 
    1111 
     12        require_once(dirname(__FILE__) . SEP . 'common.inc.php');                                /* including common deifinitions */ 
    1213        require_once(dirname(__FILE__) . SEP . 'class.WorkflowUtils.inc.php'  ); /* superclass source code       */ 
    1314        require_once(dirname(__FILE__) . SEP . 'class.basecontroller.inc.php' ); /* module controller            */ 
    1415        require_once(dirname(__FILE__) . SEP . 'class.basemodel.inc.php'      ); /* module logic                 */ 
    15         //require_once(dirname(__FILE__) . SEP . 'class.process_factory.inc.php'); /* module process factory class */ 
    1616        require_once(dirname(__FILE__) . SEP . 'class.utils.security.php'     ); /* sanitizes input data         */ 
    1717 
     
    206206                { 
    207207                        parent::WorkflowUtils(); 
    208                         $this->runtime          = CreateObject('workflow.workflow_wfruntime'); 
     208                        $this->runtime          = Factory::getInstance('workflow_wfruntime'); 
    209209                        $this->runtime->setDebug(_DEBUG); 
    210                         //$this->base_activity  = CreateObject('workflow.workflow_baseactivity'); 
    211                         //$this->process                = CreateObject('workflow.workflow_process'); 
    212                         $this->GUI              = CreateObject('workflow.workflow_gui'); 
     210                        //$this->base_activity  = Factory::getInstance('workflow_baseactivity'); 
     211                        //$this->process                = Factory::getInstance('workflow_process'); 
     212                        $this->GUI              = Factory::getInstance('workflow_gui'); 
    213213                        $this->categories       = CreateObject('phpgwapi.categories'); 
    214214 
    215                         $this->workflowSmarty = CreateObject('workflow.workflow_smarty', false); 
     215                        $this->workflowSmarty = Factory::getInstance('workflow_smarty', false); 
    216216                        // TODO: open a new connection to the database under a different username to allow privilege handling on tables 
    217217                        /* CELEPAR */ 
     
    386386                                        return false; 
    387387                                } 
    388                                 $smarty = CreateObject('workflow.process_smarty'); 
     388                                $smarty = Factory::getInstance('process_smarty'); 
    389389                        } 
    390390 
     
    399399                                /* #celepar# smarty code*/ 
    400400 
    401                                 $smarty = CreateObject('workflow.process_smarty'); 
     401                                $smarty = Factory::getInstance('process_smarty'); 
    402402 
    403403                                $smarty->template_dir  = GALAXIA_PROCESSES.SEP.$this->process->getNormalizedName().SEP.'code'.SEP.'templates'; 
  • sandbox/workflow/branches/609/inc/class.ui_adminaccess.inc.php

    r2233 r2253  
    6363                $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'] . ' - ' . lang('Access Control List'); 
    6464                $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); 
    65                 $smarty = CreateObject('workflow.workflow_smarty'); 
     65                $smarty = Factory::getInstance('workflow_smarty'); 
    6666 
    6767                $javaScripts = $this->get_common_js(); 
  • sandbox/workflow/branches/609/inc/class.ui_adminactivities.inc.php

    r2233 r2253  
    7373                parent::WorkflowUtils(); 
    7474 
    75                 $this->workflow_acl = CreateObject('workflow.workflow_acl'); 
     75                $this->workflow_acl = Factory::getInstance('workflow_acl'); 
    7676                $denyAccess = true; 
    7777                if ($this->workflow_acl->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id'])) 
     
    106106                } 
    107107 
    108                 $this->process_manager  = CreateObject('workflow.workflow_processmanager'); 
    109                 $this->activity_manager = CreateObject('workflow.workflow_activitymanager'); 
    110                 $this->role_manager     = CreateObject('workflow.workflow_rolemanager'); 
     108                $this->process_manager  = Factory::getInstance('workflow_processmanager'); 
     109                $this->activity_manager = Factory::getInstance('workflow_activitymanager'); 
     110                $this->role_manager     = Factory::getInstance('workflow_rolemanager'); 
    111111                $this->fs = new FsUtils(); /* gets instance */ 
    112112 
  • sandbox/workflow/branches/609/inc/class.ui_adminprocesses.inc.php

    r2233 r2253  
    5454                parent::bo_workflow_forms('admin_processes'); 
    5555 
    56                 $this->workflow_acl = CreateObject('workflow.workflow_acl'); 
     56                $this->workflow_acl = Factory::getInstance('workflow_acl'); 
    5757                $denyAccess = true; 
    5858                if ($this->workflow_acl->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id'])) 
     
    8383                } 
    8484 
    85                 $this->process_manager  = CreateObject('workflow.workflow_processmanager'); 
    86                 $this->activity_manager = CreateObject('workflow.workflow_activitymanager'); 
     85                $this->process_manager  = Factory::getInstance('workflow_processmanager'); 
     86                $this->activity_manager = Factory::getInstance('workflow_activitymanager'); 
    8787 
    8888                $this->form_action = $GLOBALS['phpgw']->link('/index.php', 'menuaction=workflow.ui_adminprocesses.form'); 
     
    190190                $known_config_items = array_merge($known_config_items, array('Log Options' => 'title', 'log_level' => $log_levels)); 
    191191 
    192                 $bo_agent = CreateObject('workflow.bo_agent_mail_smtp'); 
     192                $bo_agent = Factory::getInstance('bo_agent_mail_smtp'); 
    193193                $known_config_items = array_merge($known_config_items, $bo_agent->listProcessConfigurationFields()); 
    194194 
  • sandbox/workflow/branches/609/inc/class.ui_adminroles.inc.php

    r2233 r2253  
    4242                parent::WorkflowUtils(); 
    4343 
    44                 $this->workflow_acl = CreateObject('workflow.workflow_acl'); 
     44                $this->workflow_acl = Factory::getInstance('workflow_acl'); 
    4545                $denyAccess = true; 
    4646                if ($this->workflow_acl->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id'])) 
     
    7171                } 
    7272 
    73                 $this->process_manager  = CreateObject('workflow.workflow_processmanager'); 
    74                 $this->activity_manager = CreateObject('workflow.workflow_activitymanager'); 
    75                 $this->role_manager     = CreateObject('workflow.workflow_rolemanager'); 
     73                $this->process_manager  = Factory::getInstance('workflow_processmanager'); 
     74                $this->activity_manager = Factory::getInstance('workflow_activitymanager'); 
     75                $this->role_manager     = Factory::getInstance('workflow_rolemanager'); 
    7676                $this->form_action = $GLOBALS['phpgw']->link('/index.php', 'menuaction=workflow.ui_adminroles.form'); 
    7777                 
  • sandbox/workflow/branches/609/inc/class.ui_agent_mail_smtp.inc.php

    r795 r2253  
    2929                parent::ui_agent(); 
    3030                $this->agent_type = 'mail_smtp'; 
    31                 $this->bo_agent = CreateObject('workflow.bo_agent_mail_smtp'); 
     31                $this->bo_agent = Factory::getInstance('bo_agent_mail_smtp'); 
    3232        } 
    3333 
  • sandbox/workflow/branches/609/inc/class.ui_external_applications.inc.php

    r2233 r2253  
    6161                $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title']; 
    6262                $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); 
    63                 $smarty = CreateObject('workflow.workflow_smarty'); 
     63                $smarty = Factory::getInstance('workflow_smarty'); 
    6464 
    6565                $this->set_wf_session(); 
  • sandbox/workflow/branches/609/inc/class.ui_monitors.inc.php

    r795 r2253  
    5858                $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title'] . ' - ' . lang('%1 monitoring'); 
    5959                $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); 
    60                 $smarty = CreateObject('workflow.workflow_smarty'); 
     60                $smarty = Factory::getInstance('workflow_smarty'); 
    6161 
    6262                $javaScripts = $this->get_common_js(); 
  • sandbox/workflow/branches/609/inc/class.ui_move_instances.inc.php

    r795 r2253  
    3636        { 
    3737                $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); 
    38                 $smarty = CreateObject('workflow.workflow_smarty'); 
     38                $smarty = Factory::getInstance('workflow_smarty'); 
    3939 
    4040                $javaScripts = $this->get_common_js(); 
  • sandbox/workflow/branches/609/inc/class.ui_orgchart.inc.php

    r2233 r2253  
    4747        function draw($tab_index = "") 
    4848        { 
    49                 $this->workflow_acl = CreateObject('workflow.workflow_acl'); 
     49                $this->workflow_acl = Factory::getInstance('workflow_acl'); 
    5050 
    5151                $isAdmin = $this->workflow_acl->checkWorkflowAdmin($GLOBALS['phpgw_info']['user']['account_id']); 
     
    6363 
    6464                $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); 
    65                 $smarty = CreateObject('workflow.workflow_smarty'); 
     65                $smarty = Factory::getInstance('workflow_smarty'); 
    6666 
    6767                $this->set_wf_session(); 
  • sandbox/workflow/branches/609/inc/class.ui_phpeditor.inc.php

    r2233 r2253  
    4545        function ui_phpeditor() 
    4646        { 
    47                 $this->bo = CreateObject('workflow.bo_editor'); 
     47                $this->bo = Factory::getInstance('bo_editor'); 
    4848                $this->loadVariables(); 
    4949        } 
  • sandbox/workflow/branches/609/inc/class.ui_userinterface.inc.php

    r2233 r2253  
    4545                $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title']; 
    4646                $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); 
    47                 //$smarty = CreateObject('workflow.workflow_smarty'); 
    4847                $smarty = Factory::getInstance('workflow_smarty'); 
    4948 
     
    132131                require_once 'class.so_userinterface.inc.php'; 
    133132                $so = new so_userinterface(); 
    134                 $smarty = CreateObject('workflow.workflow_smarty'); 
     133                $smarty = Factory::getInstance('workflow_smarty'); 
    135134 
    136135                /* get the user's organization */ 
  • sandbox/workflow/branches/609/inc/class.workflow_processmanager.inc.php

    r2233 r2253  
    3535                { 
    3636                        parent::ProcessManager(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID); 
    37                         $this->workflow_acl = CreateObject('workflow.workflow_acl'); 
     37                        $this->workflow_acl = Factory::getInstace('workflow_acl'); 
    3838 
    3939                        /* allow regular users to see the process graph */ 
  • sandbox/workflow/branches/609/inc/engine/config.egw.inc.php

    r2233 r2253  
    305305                { 
    306306                        // This way we create a new run_activity instance for the next activity 
    307                         $run_activity = CreateObject('workflow.run_activity.go'); 
     307                        $run_activity = Factory::getInstance('workflow.run_activity.go'); 
    308308                        $data = $run_activity->go($activityId, $iid, $auto); 
    309309                        return $data; 
  • sandbox/workflow/branches/609/inc/engine/src/common/WfRuntime.php

    r795 r2253  
    10911091    $workflow = $GLOBALS['workflow']; 
    10921092    unset($_REQUEST['iid']); 
    1093     $run_activity = CreateObject('workflow.run_activity'); 
     1093    $run_activity = Factory::getInstance('run_activity'); 
    10941094    $run_activity->runtime->instance->parentInstanceId = $this->instance_id; 
    10951095    $run_activity->runtime->instance->parentActivityId = $this->activity_id; 
  • sandbox/workflow/branches/609/inc/hook_home.inc.php

    r795 r2253  
    2222 
    2323$title = lang("External Applications"); 
    24 $bo     = CreateObject('workflow.bo_userinterface'); 
     24$bo     = Factory::getInstance('bo_userinterface'); 
    2525$externals      = $bo -> externals(); 
    2626$extra_data = ''; 
  • sandbox/workflow/branches/609/inc/hook_sidebox_menu.inc.php

    r795 r2253  
    1717 
    1818{ 
    19         $workflowACL = CreateObject('workflow.workflow_acl'); 
     19        $workflowACL = Factory::getInstance('workflow_acl'); 
    2020        $userID = $GLOBALS['phpgw_info']['user']['account_id']; 
    2121        $apptitle = $GLOBALS['phpgw_info']['apps'][$appname]['title']; 
  • sandbox/workflow/branches/609/inc/local/classes/class.JobBase.php

    r2249 r2253  
    200200        final public function createNewInstance($startActivityId, $instanceName=false, $properties=false, $user=false) 
    201201        { 
    202                 $activityManager = CreateObject('workflow.workflow_activitymanager'); 
     202                $activityManager = Factory::getInstance('workflow_activitymanager'); 
    203203                $activity = $activityManager->get_activity($startActivityId); 
    204204 
  • sandbox/workflow/branches/609/inc/local/classes/class.wf_engine.php

    r795 r2253  
    6868                $flagObject[0] = is_null($this->processManager); 
    6969                if ($flagObject[0]) 
    70                         $this->processManager = CreateObject('workflow.workflow_processmanager'); 
     70                        $this->processManager = Factory::getInstance('workflow_processmanager'); 
    7171 
    7272                $output = array(); 
     
    247247                $flagObject[0] = is_null($this->acl); 
    248248                if ($flagObject[0]) 
    249                         $this->acl = CreateObject('workflow.workflow_acl'); 
     249                        $this->acl = Factory::getInstance('workflow_acl'); 
    250250 
    251251                $output = $this->acl->getUserPermissions($type, $uid); 
     
    268268                $flagObject[0] = is_null($this->acl); 
    269269                if ($flagObject[0]) 
    270                         $this->acl = CreateObject('workflow.workflow_acl'); 
     270                        $this->acl = Factory::getInstance('workflow_acl'); 
    271271 
    272272                $output = $this->acl->getUserGroupPermissions($type, $uid); 
  • sandbox/workflow/branches/609/inc/local/classes/class.wf_instance.php

    r1385 r2253  
    7777        { 
    7878                $instanceID = (int) $instanceID; 
    79                 $instance = CreateObject('workflow.workflow_instance'); 
     79                $instance = Factory::getInstance('workflow_instance'); 
    8080                if (!$instance->getInstance($instanceID)) 
    8181                        return false; 
     
    118118                $instance = $this->getInstanceObject($instanceID); 
    119119 
    120                 $runActivity = CreateObject('workflow.run_activity'); 
     120                $runActivity = Factory::getInstance('run_activity'); 
    121121 
    122122                ob_start(); 
  • sandbox/workflow/branches/609/inc/local/classes/class.wf_role.php

    r2249 r2253  
    5858 
    5959                $this->db = &$GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID; 
    60                 $this->roleManager = CreateObject('workflow.workflow_rolemanager'); 
    61                 $this->activityManager = CreateObject('workflow.workflow_activitymanager'); 
     60                $this->roleManager = Factory::getInstance('workflow_rolemanager'); 
     61                $this->activityManager = Factory::getInstance('workflow_activitymanager'); 
    6262        } 
    6363 
  • sandbox/workflow/branches/609/lib/factory/WorkflowFactory.php

    r2249 r2253  
    5757                $this->registerFileInfo('BrowserInfo', 'class.BrowserInfo.inc.php', 'inc'); 
    5858 
     59                $this->registerFileInfo('process_smarty', 'class.process_smarty.inc.php', 'inc'); 
    5960                $this->registerFileInfo('workflow_smarty', 'class.workflow_smarty.inc.php', 'inc'); 
    6061                $this->registerFileInfo('workflow_acl', 'class.workflow_acl.inc.php', 'inc'); 
    6162                $this->registerFileInfo('workflow_processmanager', 'class.workflow_processmanager.inc.php', 'inc'); 
     63                $this->registerFileInfo('workflow_wfruntime', 'class.workflow_wfruntime.inc.php', 'inc'); 
     64                $this->registerFileInfo('workflow_gui', 'class.workflow_gui.inc.php', 'inc'); 
     65                $this->registerFileInfo('workflow_rolemanager', 'class.workflow_rolemanager.inc.php', 'inc'); 
     66                $this->registerFileInfo('workflow_activitymanager', 'class.workflow_activitymanager.inc.php', 'inc'); 
     67                $this->registerFileInfo('workflow_instance', 'class.workflow_instance.inc.php', 'inc'); 
    6268 
    6369                $this->registerFileInfo('bo_participants', 'class.bo_participants.inc.php', 'inc'); 
Note: See TracChangeset for help on using the changeset viewer.