/* (non-Javadoc)
@see com.centurylink.mdw.container.plugins.TestInterface#execute(java.lang.String, java.lang.String, java.lang.Runnable)
17913
public synchronized boolean execute(String workerName, String assignee, Runnable command) {
        if (!hasAvailableThread(workerName))
            return false;

        Work work = new Work(workerName, assignee, command);
        recordSubmit(work);
        thread_pool.execute(work);
        return true;
    }
447584
void executeStatement(String statement) {

		try (Connection conn = getFastConnection(); Statement stm = conn.createStatement()) {
			stm.execute(statement);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}

	}
845364
@Override
    public void execute() throws BuildException {
        try {
            ProvisioningFeatureDefinition feature = new SubsystemFeatureDefinitionImpl(null, this.featureManifestFile);
            String description = generateDescriptionHtml(feature, this.generateKnowledgeCentreLinks, this.licenseType);
            Files.write(this.descriptionHtmlOutputFile.toPath(), description.getBytes());
        } catch (IOException e) {
            throw new BuildException(e);
        }
    }
775064
@Override
    public boolean execute() throws SQLException {
        boolean isOk = false;

        try {
            boolean result = internalStmt.execute();
            isOk = true;

            return result;
        } finally {
            poolableConn.updateLastSQLExecutionTime(isOk);
        }
    }
758075
@Override
    public boolean execute( String sql ) throws SQLException {
        notClosed();
        warning = null;
        moreResults = 0;
        try {
            // Convert the supplied SQL into JCR-SQL2 ...
            String jcrSql2 = connection.nativeSQL(sql);
            // Create the query ...
            final QueryResult jcrResults = getJcrRepositoryDelegate().execute(jcrSql2, this.sqlLanguage);
            results = new JcrResultSet(this, jcrResults, null);
            moreResults = 1;
        } catch (RepositoryException e) {
            throw new SQLException(e.getLocalizedMessage(), e);
        }
        return true; // always a ResultSet
    }
1321779
@Override
    public void execute()
        throws MojoExecutionException, MojoFailureException
    {
        if ( !"pom".equals( project.getPackaging() ) )
        {
            long ts = System.currentTimeMillis();
            try
            {
                internalExecute();
            }
            finally
            {
                long te = System.currentTimeMillis();
                getLog().debug( String.format( "Mojo execution time: %d ms", te - ts ) );
            }
        }
    }
698428
@Override
	public Object execute(ExecutionEvent event) throws ExecutionException {
		IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
		
		for (Iterator<?> iterator = selection.iterator(); iterator.hasNext(); ) {
			Object object = iterator.next();
			IProject project;
			
			if (object instanceof IProject) {
				project = (IProject) object;
			} else if (object instanceof IJavaProject) {
				project = ((IJavaProject) object).getProject();
			} else {
				continue;
			}
			
			final IProject proj = project;
			WorkspaceModifyOperation operation = new WorkspaceModifyOperation() {

				@Override
				protected void execute(IProgressMonitor monitor)
						throws CoreException, InvocationTargetException,
						InterruptedException {
					// Enabling Gig nature.
					monitor.beginTask("Enabling Gig", 3);
					monitor.subTask("Enabling Gig nature");
					IProjectDescription description = proj.getDescription();
					String[] natures = description.getNatureIds();
					String[] newNatures = new String[natures.length + 1];
					System.arraycopy(natures, 0, newNatures, 0, natures.length);
					newNatures[natures.length] = GigNature.NATURE_ID;
					description.setNatureIds(newNatures);
					proj.setDescription(description, null);
					monitor.worked(1);
					
					// Adding Gig libraries to the classpath.
					monitor.subTask("Adding Gig libraries to the classpath");
					IJavaProject javaProject = JavaCore.create(proj);
					IClasspathEntry[] classpath = javaProject.getRawClasspath();
					IPath path = new Path("org.eiichiro.gig.eclipse.core.GIG_CONTAINER");
					boolean found = false;
					
					for (IClasspathEntry entry : classpath) {
						if (entry.getPath().equals(path)) {
							found = true;
							break;
						}
					}
					
					if (!found) {
						IClasspathEntry container = JavaCore.newContainerEntry(path, false);
						IClasspathEntry[] entries = new IClasspathEntry[classpath.length + 1];
						System.arraycopy(classpath, 0, entries, 0, classpath.length);
						entries[classpath.length] = container;
						javaProject.setRawClasspath(entries, monitor);
					}
					
					// Creating Gig-generated source directory.
					monitor.subTask("Creating Gig-generated source directory");
					IFolder folder = proj.getFolder(".gig_generated");
					
					if (!folder.exists()) {
						folder.create(true, true, monitor);
						IClasspathEntry[] c = javaProject.getRawClasspath();
						IClasspathEntry[] entries = new IClasspathEntry[c.length + 1];
						System.arraycopy(c, 0, entries, 0, c.length);
						IClasspathEntry source = JavaCore.newSourceEntry(folder.getFullPath());
						entries[c.length] = source;
						javaProject.setRawClasspath(entries, monitor);
					}
					
					monitor.worked(1);
					monitor.done();
				}
				
			};
			IProgressService service = PlatformUI.getWorkbench().getProgressService();
			
			try {
				service.run(true, true, operation);
			} catch (InvocationTargetException e) {
				IStatus status = new Status(IStatus.ERROR,
						GigUIPlugin.PLUGIN_ID, e.getTargetException().getMessage(), e.getTargetException());
				GigUIPlugin.getDefault().getLog().log(status);
				ErrorDialog.openError(HandlerUtil.getActiveShell(event),
						"Gig", "Failed to enable Gig in "
								+ project.getName() + " project", status);
			} catch (InterruptedException e) {}
		}
		
		return null;
	}
402295
public void execute() throws Exception {
        // Read the properties file, if it exists.
        properties = new Properties();
        if (propertiesFile != null) {
            FileInputStream propertiesStream = null;
            try {
                propertiesStream = new FileInputStream(propertiesFile);
                properties.load(propertiesStream);
            } catch (final Exception e) {
                throw new RuntimeException(e);
            } finally {
                if (propertiesStream != null) {
                    try {
                        propertiesStream.close();
                    } catch (final IOException e) {
                        logger.error(e.getMessage(), e) ;
                    }
                }
            }
        } else {
            properties.putAll(Configuration.configuration);
        }
        if (!properties.containsKey(CONF_PLUGIN_DIRS)) {
            properties.setProperty(CONF_PLUGIN_DIRS, configuration.getOrDefault(CONF_PLUGIN_DIRS, "plugins;demo"));
        }
        if (!properties.containsKey(CONF_PLUGIN_IGNORES)) {
            properties.setProperty(CONF_PLUGIN_IGNORES, configuration.getOrDefault(CONF_PLUGIN_IGNORES, ""));
        }

        // Get the list of plugin directories from the properties.
        final String[] pluginDirs = properties.getProperty(CONF_PLUGIN_DIRS).split(PARAM_VALUE_SEPARATOR);

        final Set<String> pluginIgnores = new HashSet<>();
        if (properties.getProperty(CONF_PLUGIN_IGNORES) != null) {
            pluginIgnores.addAll(Arrays.asList(properties.getProperty(CONF_PLUGIN_IGNORES).split(PARAM_VALUE_SEPARATOR)));
        }

        final String pluginOrderProperty = properties.getProperty(CONF_PLUGIN_ORDER);
        if (pluginOrderProperty != null) {
            final List<String> plugins = asList(pluginOrderProperty.trim().split("\\s+"));
            Collections.reverse(plugins);
            int priority = 1;
            for (final String plugin: plugins) {
                pluginOrder.put(plugin, priority++);
            }
        }

        for (final String tmpl : properties.getProperty(CONF_TEMPLATES, "").split(PARAM_VALUE_SEPARATOR)) {
            final String t = tmpl.trim();
            if (t.length() != 0) {
                logger.warn(MessageUtils.getMessage("DOTJ080W", "templates", "template").toString());
                templateSet.put(t, null);
            }
        }

        for (final String pluginDir2 : pluginDirs) {
            File pluginDir = new File(pluginDir2);
            if (!pluginDir.isAbsolute()) {
                pluginDir = new File(ditaDir, pluginDir.getPath());
            }
            final File[] pluginFiles = pluginDir.listFiles();

            for (int i = 0; (pluginFiles != null) && (i < pluginFiles.length); i++) {
                final File f = pluginFiles[i];
                final File descFile = new File(pluginFiles[i], "plugin.xml");
                if (pluginFiles[i].isDirectory() && !pluginIgnores.contains(f.getName()) && descFile.exists()) {
                    descSet.add(descFile);
                }
            }
        }

        mergePlugins();
        integrate();
        logChanges(pluginList, getPluginIds(pluginsDoc));
    }
182127
public void execute(AbstractWisdomMojo mojo) throws MojoExecutionException {
        String version = PluginExtractor.getBuildPluginVersion(mojo, MAVEN_COMPILER_PLUGIN);
        if (version == null) {
            version = DEFAULT_VERSION;
        }
        final Plugin plugin = plugin(
                GROUP_ID,
                MAVEN_COMPILER_PLUGIN,
                version
        );

        Xpp3Dom configuration = PluginExtractor.getBuildPluginConfiguration(mojo, MAVEN_COMPILER_PLUGIN, COMPILE_GOAL);
        if (configuration == null) {
            Properties properties = mojo.project.getProperties();
            String source = properties.getProperty("maven.compiler.source", "1.7");
            String target = properties.getProperty("maven.compiler.target", "1.7");
            configuration = configuration(
                    element("compileSourceRoots", "${project.compileSourceRoots}"),
                    element("classpathElements", "${project.compileClasspathElements}"),
                    element("outputDirectory", "${project.build.outputDirectory}"),
                    element("projectArtifact", "${project.artifact}"),
                    element("generatedSourcesDirectory",
                            "${project.build.directory}/generated-sources/annotations"),
                    element("target", source),
                    element("source", target)
            );
        } else {
            mojo.getLog().debug("Loading maven-compiler-plugin configuration:");
            PluginExtractor.extractEligibleConfigurationForGoal(mojo, plugin, COMPILE_GOAL, configuration);
            mojo.getLog().debug(configuration.toString());

        }

        // Compile sources
        executeMojo(
                plugin,
                goal(COMPILE_GOAL),
                configuration,
                executionEnvironment(
                        mojo.project,
                        mojo.session,
                        mojo.pluginManager
                )
        );
    }
60869
@Override
    public void execute(DelegateExecution execution) {
        ActionDefinition actionDefinition = findRelatedActionDefinition(execution);

        Connector connector = getConnector(getImplementation(execution));
        IntegrationContext integrationContext = connector.apply(integrationContextBuilder.from(execution,
                                                                                    actionDefinition));

        execution.setVariables(outboundVariablesProvider.calculateVariables(integrationContext,
                                                                            actionDefinition));

        leave(execution);
    }
883338
@Override
    public boolean execute(String sql, String[] columnNames) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
695012
@Override
    public void execute()
            throws MojoExecutionException, MojoFailureException
    {

        // ---
        // Check configuration and get all configured jar resources
        // ---

        checkConfiguration();

        // ---
        // Prepare working directory layout
        // ---

        IOUtil ioUtil = getIoUtil();

        ioUtil.makeDirectoryIfNecessary( getWorkDirectory() );
        ioUtil.copyResources( getResourcesDirectory(), getWorkDirectory() );

        // ---
        // Resolve common jar resources
        // ---

        getLog().info( "-- Prepare commons jar resources" );
        Set<ResolvedJarResource> resolvedCommonJarResources;

        if ( CollectionUtils.isEmpty( commonJarResources ) )
        {
            resolvedCommonJarResources = Collections.emptySet();
        }
        else
        {
            resolvedCommonJarResources = resolveJarResources( commonJarResources, null );
        }

        Set<ResolvedJarResource> allResolvedJarResources = new LinkedHashSet<>();
        allResolvedJarResources.addAll( resolvedCommonJarResources );

        // ---
        // Resolved jnlpFiles
        // ---

        getLog().info( "-- Prepare jnlp files" );
        Set<ResolvedJnlpFile> resolvedJnlpFiles = new LinkedHashSet<>();

        for ( JnlpFile jnlpFile : jnlpFiles )
        {
            verboseLog( "prepare jnlp " + jnlpFile );

            // resolve jar resources of the jnpl file
            Set<ResolvedJarResource> resolvedJarResources =
                    resolveJarResources( jnlpFile.getJarResources(), resolvedCommonJarResources );

            // keep them (to generate the versions.xml file)
            allResolvedJarResources.addAll( resolvedJarResources );

            // create the resolved jnlp file
            ResolvedJnlpFile resolvedJnlpFile = new ResolvedJnlpFile( jnlpFile, resolvedJarResources );
            resolvedJnlpFiles.add( resolvedJnlpFile );
        }

        // ---
        // Process collected jars
        // ---

        signOrRenameJars();

        // ---
        // Generate jnlp files
        // ---

        for ( ResolvedJnlpFile jnlpFile : resolvedJnlpFiles )
        {
            generateJnlpFile( jnlpFile, getLibPath() );
        }

        // ---
        // Generate version xml file
        // ---

        generateVersionXml( allResolvedJarResources );

        // ---
        // Copy to final directory
        // ---

        //FIXME Should be able to configure this
        File outputDir = new File( getProject().getBuild().getDirectory(),
                                   getProject().getBuild().getFinalName() + File.separator + outputDirectoryName );

        ioUtil.copyDirectoryStructure( getWorkDirectory(), outputDir );
    }
445481
public void execute(boolean update) {
		if (update) {
			final String sql = getSql().replace("DELETE", "SELECT " + Model._ID);
			final List<T> results = QueryUtils.rawQuery(mTable, sql, getArgs());
			for (T result : results) {
				result.id = null;
			}
		}
		super.execute();
	}
1037738
@Override
  public void execute(final ActivityExecution execution) throws Exception {
    this.executeWithErrorPropagation(execution, new Callable<Void>() {
      @Override
      public Void call() throws Exception {
        getActivityBehaviorInstance(execution).execute(execution);
        return null;
      }
    });
  }
379612
public void execute(String name, Reader sqlCode, PrintWriter out) throws Exception {
        runScript(name, sqlCode, out);
    }
132446
@Override
    public void execute()
            throws MojoExecutionException, MojoFailureException
        {
        if (command == null)
            {
            throw new MojoExecutionException("The npm command to execute must be set");
            }

        CommandLine cmdLine = getNpmCommand();
        addCommand(cmdLine);
        addArguments(cmdLine);

        execute(cmdLine);
        }
165845
public synchronized void execute(Runnable command) {
        if (active.get()) {
            stop();
            this.command = command;
            start();
        } else {
            this.command = command;
        }
    }