For subclasses to call in {@link #execute(org.apache.isis.applib.fixturescripts.FixtureScript.ExecutionContext)}.
163227
protected void newClassPermissions(
            final ApplicationPermissionRule rule,
            final ApplicationPermissionMode mode,
            final Class... classes) {

        newPermissions(rule, mode, ApplicationFeatureType.CLASS, asFeatureFqns(classes));
    }
473462
def get(self):
        
        return ExecutionContextContext(
            self._version,
            flow_sid=self._solution['flow_sid'],
            execution_sid=self._solution['execution_sid'],
        )
666734
@Override
  public Object execute(@Nonnull final CommandContext context) throws Exception {
    RemoteRepository.Builder builder = new RemoteRepository.Builder(id, type, url);
    repositoryAccess.addRemoteRepository(builder.build());
    return null;
  }
203141
@Override
	protected List<IN> executeOnCollections(List<IN> inputData, RuntimeContext runtimeContext, ExecutionConfig executionConfig) {

		TypeInformation<IN> inputType = getInput().getOperatorInfo().getOutputType();

		int[] sortColumns = this.partitionOrdering.getFieldPositions();
		boolean[] sortOrderings = this.partitionOrdering.getFieldSortDirections();

		final TypeComparator<IN> sortComparator;
		if (inputType instanceof CompositeType) {
			sortComparator = ((CompositeType<IN>) inputType).createComparator(sortColumns, sortOrderings, 0, executionConfig);
		} else if (inputType instanceof AtomicType) {
			sortComparator = ((AtomicType) inputType).createComparator(sortOrderings[0], executionConfig);
		} else {
			throw new UnsupportedOperationException("Partition sorting does not support type "+inputType+" yet.");
		}

		Collections.sort(inputData, new Comparator<IN>() {
			@Override
			public int compare(IN o1, IN o2) {
				return sortComparator.compare(o1, o2);
			}
		});

		return inputData;
	}
433843
@Override
    public void execute() {
        Set<String> annotated = db.getAnnotationIndex().get(Audit.class.getName());
        ScanAnnotatedFilter filter = new ScanAnnotatedFilter();
        for (String annotaionClass : annotated) {
            try {
                Class<?> clazz = Class.forName(annotaionClass);
                filter.addClass(clazz);
            } catch (ClassNotFoundException e) {
                throw new InitializationException("", e);
            }
        }
        PreConfigurationContext.addAnnotationFilter(filter);
    }
303939
private CompositeExecutionContext addAll(List<ExecutionContext> contexts) {
        this.elements = new ImmutableList.Builder().addAll(contexts).build();
        return this;
    }
865479
@Override
	public void execute() {
		if (target instanceof WComponentGroup<?>) {
			for (WComponent component : ((WComponentGroup<WComponent>) target).getComponents()) {
				if (component instanceof SubordinateTarget) {
					applyAction((SubordinateTarget) component, value);
				}
			}
		} else {
			// Leaf.
			applyAction(target, value);
		}

	}
1031708
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            clsContext = classContext;
            JavaClass cls = classContext.getJavaClass();
            if (cls.isInterface())
                return;
            superClasses = cls.getSuperClasses();
            cls.accept(this);
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            clsContext = null;
            superClasses = null;
        }
    }
459648
@AroundInvoke
    public Object execute(InvocationContext context) throws Exception {
        String methodName = "execute";

        String classOperationName = OpenTracingService.getClassOperationName(context.getMethod());
        String methodOperationName = OpenTracingService.getMethodOperationName(context.getMethod());

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, methodName + " operation names", classOperationName, methodOperationName);
        }

        boolean process = true;

        if (!OpenTracingService.isTraced(classOperationName, methodOperationName)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " skipping untraced method");
            }
            process = false;
        }

        if (process && isHandledByFilter(context.getMethod())) {
            // This is already processed as part of the OpentracingContainerFilter
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " skipping JAXRS method");
            }
            process = false;
        }

        if (process) {

            String operationName;

            if (OpenTracingService.hasExplicitOperationName(methodOperationName)) {
                operationName = methodOperationName;
            } else {
                // If the annotated method is not a JAX-RS endpoint, the default
                // operation name of the new Span for the method is:
                // <package name>.<class name>.<method name> [...]
                // If operationName is specified on a class, that operationName will be used
                // for all methods of the class unless a method explicitly overrides it with
                // its own operationName."
                // https://github.com/eclipse/microprofile-opentracing/blob/master/spec/src/main/asciidoc/microprofile-opentracing.asciidoc#321-the-traced-annotation
                if (OpenTracingService.hasExplicitOperationName(classOperationName)) {
                    operationName = classOperationName;
                } else {
                    operationName = context.getMethod().getDeclaringClass().getName() + "." + context.getMethod().getName();
                }

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, methodName + " setting default operationName", operationName);
                }
            }

            Tracer tracer = OpentracingTracerManager.getTracer();

            try (Scope scope = tracer.buildSpan(operationName).startActive(true)) {
                try {
                    Object result = context.proceed();
                    return result;
                } catch (Exception e) {
                    OpentracingService.addSpanErrorInfo(scope.span(), e);
                    throw e;
                } catch (Error e) {
                    OpentracingService.addSpanErrorInfo(scope.span(), e);
                    throw e;
                }
            }
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, methodName + " normal processing");
            }
            return context.proceed();
        }
    }
551293
public static void bind(ApplicationContext context) {
        Object old = contextMap.putIfAbsent(getContextClassLoader(), context);
        if (old != null) {
            throw new IllegalStateException(
                "There is already a ApplicationContext associated with the context ClassLoader of the current thread!");
        }
    }
233140
public void executeJob() {
        AbstractApplicationContext springContext = SpringContext.getContext(springConfigurationClass);
        CinchJob cinchJob = springContext.getBean(CinchJob.class);

        cinchJob.execute(this);
    }
636184
@Override
    public synchronized Enumeration getSubContexts() {
        Enumeration e = mySubContexts.elements();
        class Adapter implements Enumeration {
            Enumeration base;

            public Adapter(Enumeration e) {
                this.base = e;
            }

            @Override
            public boolean hasMoreElements() {
                return base.hasMoreElements();
            }

            @Override
            public Object nextElement() {
                return ((Entry) base.nextElement()).getCtx();
            }
        }
        return new Adapter(e);
    }
944766
private void executeInClassScope(Callable<Void> call) {
        try {
            classContext.get().activate(deploymentClass);
            call.call();
        } catch (Exception e) {
            throw new RuntimeException("Could not invoke operation", e); // NOPMD
        } finally {
            classContext.get().deactivate();
        }
    }
598277
@Override
    public void visitClassContext(ClassContext classContext) {
        JavaClass cls = classContext.getJavaClass();
        clsVersion = cls.getMajor();
        super.visitClassContext(classContext);
    }
101066
@Override
    public void execute(TaskExecutionContext context) { // e.g. error handling
        debugFw("...Beginning the cron4j task (before run): {}", jobType);
        final TaskExecutionContext nativeContext;
        final OptionalThing<LaunchNowOption> nowOption;
        if (context instanceof RomanticCron4jTaskExecutionContext) {
            final RomanticCron4jTaskExecutionContext romantic = (RomanticCron4jTaskExecutionContext) context;
            nativeContext = romantic.getNativeContext();
            nowOption = romantic.getLaunchNowOption();
        } else {
            nativeContext = context;
            nowOption = OptionalThing.empty();
        }
        try {
            final LocalDateTime activationTime = currentTime.get();
            final Cron4jJob job = findJob();
            final Thread jobThread = Thread.currentThread();
            RunnerResult runnerResult = null;
            Throwable controllerCause = null;
            try {
                debugFw("...Calling doExecute() of task (before run)");
                runnerResult = doExecute(job, nativeContext, nowOption); // not null
                if (canTriggerNext(job, runnerResult)) {
                    debugFw("...Calling triggerNext() of job in task (after run)");
                    job.triggerNext(); // should be after current job ending
                }
            } catch (JobConcurrentlyExecutingException e) { // these catch statements are related to deriveRunnerExecResultType()
                debugFw("...Calling catch clause of job concurrently executing exception: {}", e.getClass().getSimpleName());
                final String msg = "Cannot execute the job task by concurrent execution: " + varyingCron + ", " + jobType.getSimpleName();
                error(OptionalThing.of(job), msg, e);
                controllerCause = e;
            } catch (Throwable cause) { // from framework part (exception in appilcation job are already handled)
                debugFw("...Calling catch clause of job controller's exception: {}", cause.getClass().getSimpleName());
                final String msg = "Failed to execute the job task: " + varyingCron + ", " + jobType.getSimpleName();
                error(OptionalThing.of(job), msg, cause);
                controllerCause = cause;
            }
            final OptionalThing<RunnerResult> optRunnerResult = optRunnerResult(runnerResult); // empty when error 
            final OptionalThing<LocalDateTime> endTime = deriveEndTime(optRunnerResult);
            debugFw("...Calling recordJobHistory() of task (after run): {}, {}", optRunnerResult, endTime);
            recordJobHistory(nativeContext, job, jobThread, activationTime, optRunnerResult, endTime, optControllerCause(controllerCause));
            debugFw("...Ending the cron4j task (after run): {}, {}", optRunnerResult, endTime);
        } catch (Throwable coreCause) { // controller dead
            final String msg = "Failed to control the job task: " + varyingCron + ", " + jobType.getSimpleName();
            error(OptionalThing.empty(), msg, coreCause);
        }
    }
919622
@Override
	public Element execute(Context context) {
		Element result = Undef.VALUE;
		for (Operation op : ops) {
			try {
				result = op.execute(context);
			} catch (EvaluationException ee) {
				throw ee.addExceptionInfo(sourceRange, context);
			}
		}
		return result;
	}
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);
        }
    }