Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
package_manager_sharepoint.inc
1 <?php
17 require_once SQ_INCLUDE_PATH.'/package_manager.inc';
18 
32 {
33 
34 
40  {
41  $this->_full_path = SQ_PACKAGES_PATH.'/sharepoint';
42  $this->Package_Manager();
43 
44  }//end constructor
45 
46 
56  {
57  $system_assets = Array(
58  'cron_job_update_sharepoint_record',
59  'cron_job_sync_cmis_bridges',
60  );
61  $installed_assets = Array();
62 
63  foreach ($system_assets as $type_code) {
64  if ($GLOBALS['SQ_SYSTEM']->am->installed($type_code)) {
65  $installed_assets[] = $type_code;
66  }
67  }
68 
69  return $installed_assets;
70 
71  }//end getSystemAssetTypes()
72 
73 
81  {
82  $cron_manager = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('cron_manager');
83  if (is_null($cron_manager)) {
84  trigger_error('Couldn\'t get cron manager, couldn\'t create Update Trim Record cron job', E_USER_WARNING);
85  $null = NULL;
86  return $null;
87  }//end if
88 
89  $GLOBALS['SQ_SYSTEM']->am->includeAsset('cron_job_update_sharepoint_record');
90 
91  $cron_job = new Cron_Job_Update_Sharepoint_Record();
92  $root_user = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('root_user');
93  if (!$cron_manager->addJob($cron_job, $root_user, SQ_LINK_TYPE_2)) {
94  trigger_error('Update Trim Record Cron Job NOT CREATED', E_USER_ERROR);
95  }//end if
96  pre_echo('Update Trim Record Cron Job Id: '.$cron_job->id);
97 
98  $GLOBALS['SQ_SYSTEM']->am->registerSystemAsset('cron_job_update_sharepoint_record', $cron_job->id);
99 
100  return $cron_job;
101 
102  }//end createCronJobUpdateSharepointRecord()
103 
104 
112  {
113  $cron_manager = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('cron_manager');
114  if (is_null($cron_manager)) {
115  trigger_error('Couldn\'t get cron manager, couldn\'t create Sync CMIS Bridges Cron Job', E_USER_WARNING);
116  $null = NULL;
117  return $null;
118  }
119 
120  $GLOBALS['SQ_SYSTEM']->am->includeAsset('cron_job_sync_cmis_bridges');
121 
122  $cron_job = new Cron_Job_Sync_CMIS_Bridges();
123  $root_user = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('root_user');
124  if (!$cron_manager->addJob($cron_job, $root_user, SQ_LINK_TYPE_2)) {
125  trigger_error('Sync CMIS Bridges Cron Job NOT CREATED', E_USER_ERROR);
126  }
127  pre_echo('Sync CMIS Bridges Cron Job Id: '.$cron_job->id);
128 
129  $GLOBALS['SQ_SYSTEM']->am->registerSystemAsset('cron_job_sync_cmis_bridges', $cron_job->id);
130 
131  return $cron_job;
132 
133  }//end createCronJobSyncCMISBridges()
134 
135 }//end class
136 ?>