daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jan 24th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SimpleAttributeDefinition TRANSACTION = SimpleAttributeDefinitionBuilder.create("transaction", STRING)
  2.                 .setDefaultValue(new ModelNode().set(CommonAttributes.XA))
  3.                 .setCorrector(new ParameterCorrector() {
  4.                     @Override
  5.                     public ModelNode correct(ModelNode newValue, ModelNode currentValue) {
  6.                         if (newValue.isDefined() && (newValue.asString().equals(CommonAttributes.LOCAL) || newValue.asString().equals(CommonAttributes.NONE))) {
  7.                             return newValue;
  8.                         } else {
  9.                             return new ModelNode(CommonAttributes.XA);
  10.                         }
  11.                     }
  12.                 })
  13.                 .setValidator(new StringAllowedValuesValidator(CommonAttributes.LOCAL, CommonAttributes.NONE, CommonAttributes.XA))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top