The run method which starts the import process.<p>
487620
@Override
    public void run() {

        try {
            // do the content check
            m_contentCheck.startContentCheck(m_cms, getReport());
        } catch (Exception e) {
            getReport().println(e);
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage());
            }
        }
    }
681580
public void run()
    {
        String sourceDir = this.getProperty(SOURCE_DIR);
        sourceDir = ConvertBase.fixFilePath(sourceDir, File.separator);
        this.setProperty(SOURCE_DIR, sourceDir);
        
        String destDir = this.getProperty(DEST_DIR);
        destDir = ConvertBase.fixFilePath(destDir, File.separator);
        if (destDir != null)
        	if (destDir.equals(sourceDir))
        		destDir += "out";
        this.setProperty(DEST_DIR, destDir);
        
        String strSourcePackage = this.getProperty(SOURCE_PACKAGE);
        if (strSourcePackage == null)
        	strSourcePackage = ConvertBase.fixFilePath(sourceDir, ".");
        String strDestPackage = this.getProperty(DEST_PACKAGE);
        if (strDestPackage == null)
        	strDestPackage = ConvertBase.fixFilePath(destDir, ".");

        sourceDir = this.getFullPath(sourceDir);

        File fileDir = new File(sourceDir);
        
        if (fileDir.isDirectory())
            this.moveDirectory(fileDir, null);
    }
212851
protected void importUserFromFile() {

        CmsImportUserThread thread = new CmsImportUserThread(
            m_cms,
            m_ou,
            m_userImportList,
            getGroupsList(m_importGroups, true),
            getRolesList(m_importRoles, true),
            m_sendMail.getValue().booleanValue());
        thread.start();
        CmsShowReportDialog dialog = new CmsShowReportDialog(thread, new Runnable() {

            public void run() {

                m_window.close();
            }
        });
        m_window.setContent(dialog);

    }
1099703
public void run() throws Exception {

        Registry registry = LocateRegistry.getRegistry(m_registryPort);
        I_CmsRemoteShellProvider provider = (I_CmsRemoteShellProvider)(registry.lookup(
            CmsRemoteShellConstants.PROVIDER));
        m_remoteShell = provider.createShell(m_additionalCommands);
        m_prompt = m_remoteShell.getPrompt();
        m_out = new PrintStream(System.out);
        try {
            LineNumberReader lnr = new LineNumberReader(new InputStreamReader(m_input, "UTF-8"));
            while (!exitCalled()) {
                if (m_interactive || isEcho()) {
                    // print the prompt in front of the commands to process only when 'interactive'
                    printPrompt();
                }
                String line = lnr.readLine();
                if (line == null) {
                    break;
                }
                if (line.trim().startsWith("#")) {
                    m_out.println(line);
                    continue;
                }
                StringReader lineReader = new StringReader(line);
                StreamTokenizer st = new StreamTokenizer(lineReader);
                st.eolIsSignificant(true);
                st.wordChars('*', '*');
                // put all tokens into a List
                List<String> parameters = new ArrayList<String>();
                while (st.nextToken() != StreamTokenizer.TT_EOF) {
                    if (st.ttype == StreamTokenizer.TT_NUMBER) {
                        parameters.add(Integer.toString(new Double(st.nval).intValue()));
                    } else {
                        parameters.add(st.sval);
                    }
                }
                lineReader.close();

                if (parameters.size() == 0) {
                    // empty line, just need to check if echo is on
                    if (isEcho()) {
                        m_out.println();
                    }
                    continue;
                }

                // extract command and arguments
                String command = parameters.get(0);
                List<String> arguments = new ArrayList<String>(parameters.subList(1, parameters.size()));

                // execute the command with the given arguments
                executeCommand(command, arguments);

            }
            exit(0);
        } catch (Throwable t) {
            t.printStackTrace();
            if (m_errorCode != -1) {
                exit(m_errorCode);
            }
        }
    }
243739
@Override
    public void run() {
        try {
            VoltTable partitionKeys = null;
            partitionKeys = m_client.callProcedure("@GetPartitionKeys", "INTEGER").getResults()[0];

            while (partitionKeys.advanceRow()) {
                m_client.callProcedure(new NullCallback(), "DeleteOldAdRequests",
                        partitionKeys.getLong("PARTITION_KEY"),
                        m_expiredAgeInSeconds);
            }

            m_client.callProcedure(new NullCallback(), "DeleteExpiredBids");
        }
        catch (IOException | ProcCallException ex) {
            ex.printStackTrace();
        }
    }
236208
public void start() {

        ClassDoc[] classDocs = mRootDoc.getClasses();

        for (int i = 0; i < classDocs.length; i++) {

            ClassDoc classDoc = classDocs[i];
            if (!accept(classDoc)) {
                continue;
            }

            try {
                generateBeanInfo(classDoc);
            }
            catch (RuntimeException e) {
                throw e;
            }
            catch (Exception e) {
                e.printStackTrace();
                throw new RuntimeException(e.toString());
            }
        }
    }
825894
private function runInitMethods(): void
    {
        $reflectionClass = self::getDoctrineStaticMeta()->getReflectionClass();
        $methods         = $reflectionClass->getMethods(\ReflectionMethod::IS_PRIVATE);
        foreach ($methods as $method) {
            if ($method instanceof ReflectionMethod) {
                $method = $method->getName();
            }
            if (\ts\stringContains($method, UsesPHPMetaDataInterface::METHOD_PREFIX_INIT)
                && \ts\stringStartsWith($method, UsesPHPMetaDataInterface::METHOD_PREFIX_INIT)
            ) {
                $this->$method();
            }
        }
    }
1038956
public void run() throws Exception {

        if (m_bean.getWizardEnabled()) {

            long timeStarted = System.currentTimeMillis();

            CmsSetupTests setupTests = new CmsSetupTests();
            setupTests.runTests(m_bean, "No server info present, because this test is running in auto mode.");
            if (setupTests.isRed()) {
                for (CmsSetupTestResult result : setupTests.getTestResults()) {
                    if (result.isRed()) {
                        throw new Exception(result.getInfo());
                    }
                }
            }
            if (CmsStringUtil.isEmpty(m_bean.getDatabaseConfigPage(m_props.getDbProduct()))) {
                throw new Exception("DB product: " + m_props.getDbProduct() + " not supported.");
            }
            System.out.println("System requirements tested successfully.");

            initSetupBean();

            setupDB();

            if (m_bean.prepareStep8()) {
                System.out.println("Configuration files written successfully.");
                m_bean.prepareStep8b();
            }

            if (m_props.isShowProgress()) {
                // show a simple progress indicator
                // this is only needed in case you do an automated installation and watch the console
                System.out.println("\nImporting modules:");
                // System.out will be redirected by the setup bean, so keep a reference for the progress indicator
                PrintStream out = System.out;
                int timecount = 0;
                StringBuffer points = new StringBuffer(100);
                while (m_bean.isImportRunning()) {
                    if ((++timecount % 10) == 0) {
                        points.append('.');
                        out.println(points);
                    }
                    Thread.sleep(500);
                }
                System.out.println("\nModule import is finished!");
            } else {
                // no progress indicator
                System.out.println("Importing modules.");
                while (m_bean.isImportRunning()) {
                    Thread.sleep(500);
                }
            }
            System.out.println("Modules imported successfully.");

            m_bean.prepareStep10();
            System.out.println();
            System.out.println(HR);
            System.out.println(
                "OpenCms setup finished successfully in "
                    + Math.round((System.currentTimeMillis() - timeStarted) / 1000)
                    + " seconds.");
            System.out.println(HR);
        } else {
            throw new Exception("Error starting Alkacon OpenCms setup wizard.");
        }
    }
313384
@SuppressWarnings({ "rawtypes", "unchecked" })
	public void run()
	{
		IProcess process = fConsole.getProcess();
		if (process != null)
		{
			List targets = collectTargets(process);
			targets.add(process);
			DebugCommandService service = DebugCommandService.getService(fWindow);
			service.executeCommand(ITerminateHandler.class, targets.toArray(), null);
		}
	}
844330
@Override
    public void start() {
        String res = launchPing();
        if (res != null && res.length() > 0) {
            res = res.toLowerCase();
            if (res.contains(Cmd.PING_UNREACHABLE) && !res.contains(Cmd.PING_EXCEED)) {
                // Failed
                mLossRate = 1f;
                mError = Cmd.HOST_UNREACHABLE_ERROR;
            } else {
                // Succeed
                mLossRate = parseLoss(res);
                mDelay = parseDelay(res);
                if (isAnalysisIp)
                    mIp = parseIp(res);
            }
        } else {
            mError = Cmd.DROP_DATA_ERROR;
        }
    }
753643
@Override
    public void run() {

        try {
            // do the validation
            m_externLinkValidator.validateLinks(m_cms);
        } catch (Throwable e) {
            getReport().println(e);
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage());
            }
        }
        if (m_fin != null) {
            m_fin.run();
        }
    }
724011
void startThread() {

        m_reportPanel.setVisible(true);
        m_startPanel.setVisible(false);
        m_report.setVisible(false);
        CmsStaticExportThread thread = new CmsStaticExportThread(A_CmsUI.getCmsObject());
        CmsReportWidget report = new CmsReportWidget(thread);
        report.setHeight("500px");
        report.setWidth("100%");
        m_layout.addComponent(report);
        thread.start();
    }
995190
@Override
   public void execute() {
       if(log.isDebugEnabled()) {
           log.debug("execute() starting for " + pages.size() + " pages.");
       }

       try {
           if (uriRoot == null) {
               if( pages.size() == 0 ) {
                   throw new JasperException(
                       Localizer.getMessage("jsp.error.jspc.missingTarget"));
               }
               String firstJsp = pages.get( 0 );
               File firstJspF = new File( firstJsp );
               if (!firstJspF.exists()) {
                   throw new JasperException(
                       Localizer.getMessage("jspc.error.fileDoesNotExist",
                                            firstJsp));
               }
               locateUriRoot( firstJspF );
           }

           if (uriRoot == null) {
               throw new JasperException(
                   Localizer.getMessage("jsp.error.jspc.no_uriroot"));
           }

           File uriRootF = new File(uriRoot);
           if (!uriRootF.isDirectory()) {
               throw new JasperException(
                   Localizer.getMessage("jsp.error.jspc.uriroot_not_dir"));
           }

           if(context == null) {
               initServletContext(initClassLoader());
           }

           // No explicit pages, we'll process all .jsp in the webapp
           if (pages.size() == 0) {
               scanFiles(uriRootF);
           }

           initWebXml();
           
           log.info("compiling with " + getThreads() + " threads");
           ExecutorService executor = Executors.newFixedThreadPool(getThreads());
           final List<JasperException> errorCollector = Collections.synchronizedList(new ArrayList<JasperException>());
           
           for (String nextjsp : pages) {            
               File fjsp = new File(nextjsp);
               if (!fjsp.isAbsolute()) {
                   fjsp = new File(uriRootF, nextjsp);
               }
               if (!fjsp.exists()) {
                   if (log.isWarnEnabled()) {
                       log.warn
                           (Localizer.getMessage
                            ("jspc.error.fileDoesNotExist", fjsp.toString()));
                   }
                   continue;
               }
               String s = fjsp.getAbsolutePath();
               if (s.startsWith(uriRoot)) {
                   nextjsp = s.substring(uriRoot.length());
               }
               if (nextjsp.startsWith("." + File.separatorChar)) {
                   nextjsp = nextjsp.substring(2);
               }
               
               final String jspToCompile = nextjsp;
               executor.execute(new Runnable() {
                public void run() {
                    try {
                        processFile(jspToCompile);
                    } catch (JasperException je) {
                        errorCollector.add(je);
                    }
                }
            });
           }
           
           executor.shutdown();
           executor.awaitTermination(compilationTimeoutMinutes, TimeUnit.MINUTES);
           
           if (errorCollector.size() > 0) {
               throwBuildException(errorCollector);
           }

           completeWebXml();

           if (addWebXmlMappings) {
               mergeIntoWebXml();
           }

       } catch (IOException ioe) {
           throw new BuildException(ioe);

       } catch (JasperException je) {
           throwBuildException(Arrays.asList(je));
       } catch (InterruptedException e) {
        throw new BuildException(e);
       } finally {
           if (loader != null) {
               LogFactory.release(loader);
           }
       }
   }
211649
public void run() {
		if (logger.isDebugEnabled()){
    		logger.debug("run");
    	}
		
		final SipContext sipContext = sipFactoryImpl.getSipApplicationDispatcher().findSipApplication(key.getApplicationName());
		if(sipContext != null) {
			SipManager sipManager = sipContext.getSipManager();
									
			MobicentsSipApplicationSession sipApplicationSession = sipManager.getSipApplicationSession(key, false);
					
			if(sipApplicationSession != null) {				
				ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
				boolean batchStarted = false;
				try {
					if(logger.isDebugEnabled()) {
						logger.debug("Asynchronous work for sip app session " + key + " scheduled to run once the sipappsession lock is available.");
					}
					sipContext.enterSipContext();	
					sipContext.enterSipApp(sipApplicationSession, null, false, true);
					batchStarted = sipContext.enterSipAppHa(true);
					if(logger.isDebugEnabled()) {
						logger.debug("Starting Asynchronous work for sip app session " + key);
					}
					work.doAsynchronousWork(sipApplicationSession);
					if(logger.isDebugEnabled()) {
						logger.debug("Done with Asynchronous work for sip app session " + key);
					}
				} catch(Throwable t) {
					logger.error("An unexpected exception happened in the SipApplicationSessionAsynchronousWork callback on sip application session " + key, t);
				} finally {
					if(logger.isDebugEnabled()) {
						logger.debug("Exiting Asynchronous work for sip app session " + key);
					}
					sipContext.exitSipAppHa(null, null, batchStarted);
					sipContext.exitSipApp(sipApplicationSession, null);
					sipContext.exitSipContext(oldClassLoader);			
				}
			} else {
				if(logger.isDebugEnabled()) {
					logger.debug("SipApplicationSession " + key + " couldn't be found, it may have been already invalidated.");
				}
			}
		}
	}
492035
public void run() {

        try {
            // add a list of plugins to execute
            // be sure to use the right order
            m_plugins = new ArrayList<I_CmsUpdateDBPart>();

            if (getDetectedVersion() < 7) {
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBDropOldIndexes());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBUpdateOU());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBCmsUsers());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBProjectId());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBNewTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBHistoryTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBHistoryPrincipals());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBDropUnusedTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBContentTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBAlterTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBDropBackupTables());
                m_plugins.add(new org.opencms.setup.db.update6to7.CmsUpdateDBCreateIndexes7());
            } else {
                m_plugins.add(new org.opencms.setup.db.update7to8.CmsUpdateDBNewTables());
                m_plugins.add(new org.opencms.setup.db.update7to8.CmsUpdatePasswordColumn());
            }
        } catch (Throwable t) {
            t.printStackTrace();
            throw new RuntimeException(t);
        }

        Iterator<String> it = getPools().iterator();
        while (it.hasNext()) {
            String dbPool = it.next();
            System.out.println("Starting DB Update for pool " + dbPool + "... ");

            try {
                updateDatabase(dbPool);
            } catch (Throwable t) {
                t.printStackTrace();
            }

            System.out.println("... DB Update finished for " + dbPool + ".");
        }
    }
878372
public static void run(Process process) {
    try {
      LOG.info("Starting {}.", process);
      process.start();
      LOG.info("Stopping {}.", process);
      System.exit(0);
    } catch (Throwable t) {
      LOG.error("Uncaught exception while running {}, stopping it and exiting.", process, t);
      try {
        process.stop();
      } catch (Throwable t2) {
        // continue to exit
        LOG.error("Uncaught exception while stopping {}, simply exiting.", process, t2);
      }
      System.exit(-1);
    }
  }
1076426
@Override
    public void run() {

        try {

            // Set up
            Path path = FileSystems.getDefault().getPath(this.path);
            watcher = FileSystems.getDefault().newWatchService();
            Scanner.start(path, watcher);

            while (true) {

                // Reload when notified
                synchronized (this) {
                    this.wait();
                }

                // Keep reloading until all changes have notified:
                while (reloadRequested) {
                    reloadRequested = false;
                    Reflections reflections = ClassFinder.newReflections();
                    ApiHandler.setupApi(reflections);
                    Main.mainHandler.setupFilters(reflections);
                    Main.mainHandler.runStartups(reflections);
                }

            }

        } catch (IOException | InterruptedException e) {
            try {
                shutdown();
                throw new RuntimeException("Error in " + ClassReloader.class.getSimpleName() + ", exiting.", e);
            } catch (IOException e1) {
                e.printStackTrace();
            }
        }

    }