= SyncControl
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Controls the way that a (synchronous) wrapper works.

== API

[source,java]
.SyncControl.java
----
class SyncControl {
  SyncControl control()
  SyncControl withSkipRules()     // <.>
  SyncControl with(ExceptionHandler exceptionHandler)     // <.>
  SyncControl withExecute()     // <.>
  SyncControl withNoExecute()     // <.>
  ImmutableEnumSet<ExecutionMode> getExecutionModes()     // <.>
}
----

<.> xref:#withSkipRules_[withSkipRules()]
+
--
Skip checking business rules (hide/disable/validate) before executing the underlying property or action
--
<.> xref:#with_ExceptionHandler[with(ExceptionHandler)]
+
--
How to handle exceptions if they occur, using the provided xref:refguide:applib:index/services/wrapper/control/ExceptionHandler.adoc[ExceptionHandler] .
--
<.> xref:#withExecute_[withExecute()]
+
--
Explicitly set the action to be executed.
--
<.> xref:#withNoExecute_[withNoExecute()]
+
--
Explicitly set the action to _not_ be executed, in other words a "dry run".
--
<.> xref:#getExecutionModes_[getExecutionModes()]
+
--
Not API.
--

== Members

[#withSkipRules_]
=== withSkipRules()

Skip checking business rules (hide/disable/validate) before executing the underlying property or action

[#with_ExceptionHandler]
=== with(ExceptionHandler)

How to handle exceptions if they occur, using the provided xref:refguide:applib:index/services/wrapper/control/ExceptionHandler.adoc[ExceptionHandler] .

The default behaviour is to rethrow the exception.

[#withExecute_]
=== withExecute()

Explicitly set the action to be executed.

[#withNoExecute_]
=== withNoExecute()

Explicitly set the action to _not_ be executed, in other words a "dry run".

[#getExecutionModes_]
=== getExecutionModes()

Not API.
