Ejemplo n.º 1
0
 public function init()
 {
     $detailWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Dashboard_Detail');
     $extension = new Xinc_Plugin_Repos_Gui_Documentation_Extension_Last();
     $extension->setWidget($this);
     $detailWidget->registerExtension('BUILD_SUMMARY', $extension);
     $dashboardWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Dashboard_Widget');
     $dashboardWidget->registerExtension('PROJECT_FEATURE', $extension);
 }
Ejemplo n.º 2
0
 /**
  * Is called after all widgets have been registered. This is the place where widgets need
  * to register the hooks for another Widget
  *
  * @return void
  */
 public function init()
 {
     $detailWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Dashboard_Detail');
     $extension = new Xinc_Publisher_Checkstyle_Dashboard();
     $extension->setWidget($this);
     $detailWidget->registerExtension('BUILD_DETAILS', $extension);
     $statisticWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Statistics_Widget');
     $extension = new Xinc_Publisher_Checkstyle_Statistic('Checkstyle', 'line', '#f2f2f2', 'blue');
     $extension->setWidget($this);
     $statisticWidget->registerExtension('STATISTIC_GRAPH', $extension);
 }
Ejemplo n.º 3
0
 public function init()
 {
     try {
         $indexWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Dashboard_Detail');
         $extension = new Xinc_Plugin_Repos_Gui_ModificationSet_Extension_Summary();
         $indexWidget->registerExtension('BUILD_DETAILS', $extension);
         $extension2 = new Xinc_Plugin_Repos_Gui_ModificationSet_Extension_ChangeLog();
         $indexWidget->registerExtension('BUILD_DETAILS', $extension2);
     } catch (Exception $e) {
         echo "Could not init on " . __FILE__ . "<br>";
     }
 }
Ejemplo n.º 4
0
 public function init()
 {
     $indexWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Dashboard_Widget');
     $extension = new Xinc_Plugin_Repos_Gui_Statistics_Menu_Item($this);
     $indexWidget->registerExtension('PROJECT_MENU_ITEM', $extension);
 }
Ejemplo n.º 5
0
 /**
  * Enter description here...
  *
  * @param Xinc_Plugin_Interface $plugin
  *
  * @return boolean
  * @throws Xinc_Plugin_Task_Exception
  */
 public function registerPlugin(Xinc_Plugin_Interface $plugin)
 {
     $tasks = $plugin->getTaskDefinitions();
     foreach ($tasks as $task) {
     }
     $widgets = $plugin->getGuiWidgets();
     foreach ($widgets as $widget) {
         Xinc_Gui_Widget_Repository::getInstance()->registerWidget($widget);
     }
     $apiModules = $plugin->getApiModules();
     foreach ($apiModules as $apiMod) {
         Xinc_Api_Module_Repository::getInstance()->registerModule($apiMod);
     }
     $this->plugins[] = $plugin;
 }
Ejemplo n.º 6
0
 public function init()
 {
     $statisticWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Statistics_Widget');
     $statisticWidget->registerExtension('STATISTIC_GRAPH', $this->getBuildStatusGraph());
     $statisticWidget->registerExtension('STATISTIC_GRAPH', $this->getBuildDurationGraph());
     $statisticWidget->registerExtension('STATISTIC_GRAPH', $this->getPhpUnitGraph());
     $detailWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Dashboard_Detail');
     $extension = new Xinc_Plugin_Repos_Gui_Statistics_Extension_Prominent();
     $extension->setWidget($this);
     $detailWidget->registerExtension('BUILD_SUMMARY', $extension);
     $dashboardWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Dashboard_Widget');
     $dashboardWidget->registerExtension('PROJECT_FEATURE', $extension);
 }
Ejemplo n.º 7
0
 public function init()
 {
     $detailWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Dashboard_Detail');
     $extension = new Xinc_Plugin_Repos_Gui_Artifacts_Extension_Dashboard();
     $extension->setWidget($this);
     $detailWidget->registerExtension('BUILD_DETAILS', $extension);
 }
Ejemplo n.º 8
0
 public function view()
 {
     /**
      * Determine called Pathname
      */
     $path = $this->getRequestPath();
     if (strpos($path, $this->apiHandler->getBasePath()) === 0) {
         $this->apiHandler->processCall($path);
         return;
     }
     /**
      * Get the Widget to use for this Request from the Widget-Repository
      */
     $widget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetForPath($path);
     if (!$widget instanceof Xinc_Gui_Widget_Interface) {
         /**
          * Try Api Handler
          */
         header('HTTP/1.0 404 Not Found');
         die;
     }
     /**
      * Start session
      */
     session_start();
     if (!isset($_SESSION['Xinc_Gui_Handler'])) {
         $_SESSION['Xinc_Gui_Handler'] = 1;
         /**
          * Trigger the session_start event on the widget
          */
         $widget->handleEvent(Xinc_Gui_Event::SESSION_START);
     }
     /**
      * trigger the page-load event
      */
     try {
         $widget->handleEvent(Xinc_Gui_Event::PAGE_LOAD);
     } catch (Exception $e) {
         if ($widget->hasExceptionHandler()) {
             $widget->handleException($e);
         } else {
             $this->handleException($e);
         }
     }
 }
Ejemplo n.º 9
0
 public function init()
 {
     $indexWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Index_Widget');
     $extension = new Xinc_Plugin_Repos_Gui_Menu_Extension_Menu($this);
     $indexWidget->registerExtension('MAIN_MENU', $extension);
 }
Ejemplo n.º 10
0
 public function init()
 {
     $menuWidget = Xinc_Gui_Widget_Repository::getInstance()->getWidgetByClassName('Xinc_Plugin_Repos_Gui_Menu_Widget');
     $menuWidget->registerExtension('MAIN_MENU_ITEMS', $this->generateDashboardMenuItem());
     $menuWidget->registerExtension('MAIN_MENU_ITEMS', $this->generateProjectsMenuItem());
 }