@Override
public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
context.addStep(new AlternativeAttributeValidationStepHandler(new SimpleAttributeDefinition[] {
HandlerResourceDefinition.CLASS_NAME, HandlerResourceDefinition.CODE
}), OperationContext.Stage.MODEL);
context.addStep(new UniqueTypeValidationStepHandler(ModelElement.COMMON_HANDLER) {
@Override
protected String getType(OperationContext context, ModelNode model) throws OperationFailedException {
return getHandlerType(context, model);
}
}, OperationContext.Stage.MODEL);