static AbstractAddStepHandler createAddOperation ( final String childType , final boolean allowSibling , Collection < ? extends AttributeDefinition > attributes ) { return new ActiveMQReloadRequiredHandlers . AddStepHandler ( attributes ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { super . execute ( context , operation ) ; if ( ! allowSibling ) { context . addStep ( checkNoOtherSibling ( childType ) , MODEL ) ; } } } ; }
Create an ADD operation that can check that there is no other sibling when the resource is added .