/* (non-Javadoc)
@see org.jboss.as.cli.operation.OperationParser.CallbackHandler#operationName(java.lang.String)
342359
@Override
    public void operationName(int index, String operationName)
            throws OperationFormatException {

        if (operationName == null || !ALPHANUMERICS_PATTERN.matcher(operationName).matches()) {
            throw new OperationFormatException("'" + operationName + "' is not a valid operation name.");
        }

        validatedOperationName(index, operationName);
    }
1367880
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString id_validator = new MPSString();
		id_validator.validate(operationType, id, "\"id\"");
		
		MPSString act_id_validator = new MPSString();
		act_id_validator.validate(operationType, act_id, "\"act_id\"");
		
		MPSString activity_validator = new MPSString();
		activity_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 128);
		activity_validator.validate(operationType, activity, "\"activity\"");
		
		MPSString status_validator = new MPSString();
		status_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 64);
		status_validator.validate(operationType, status, "\"status\"");
		
		MPSString message_validator = new MPSString();
		message_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 256);
		message_validator.validate(operationType, message, "\"message\"");
		
		MPSBoolean is_last_validator = new MPSBoolean();
		is_last_validator.validate(operationType, is_last, "\"is_last\"");
		
		MPSInt starttime_validator = new MPSInt();
		starttime_validator.validate(operationType, starttime, "\"starttime\"");
		
	}
685465
public Operation getOperation(String id) {
        for (Iterator<Operation> it = operations.iterator(); it.hasNext();) {
            Operation oper = it.next();
            if (oper.getId().compareTo(id) == 0) {
                return oper;
            }
        }
        return null;
    }
96480
private OperationHandler getHandler(String serviceName, String operationName) {
        if (serviceName == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Service Name was null!");
            }

            return null;
        }

        if (operationName == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Operation Name was null!");
            }

            return null;
        }

        Map<String, OperationHandler> handlers =
                m_serviceHandlers.get(serviceName);
        if (handlers == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("No Service Handlers found for: " + serviceName);
            }

            return null;
        }

        OperationHandler handler = handlers.get(operationName);
        if (handler == null) {
            if (logger.isDebugEnabled()) {
                logger.debug("Handler not found for: " + serviceName + "/"
                        + operationName);
            }
        }

        return handler;
    }
368724
function handleOperation(handlers, mode, checkArity, req, res, done) {
  // parse path:
  // - first part is the operation name
  // - the following components of the path are used as arguments
  const parsedParts = parsePath(req);
  if (parsedParts[0].length === 0) {
    done(new ModofunError(403, 'NoOperation', 'Operation must be specified!'));
    return;
  }
  const [operation, ...args] = parsedParts;

  if (operation && handlers.hasOwnProperty(operation)) {
    // the stack of operation specific middleware
    let operationMiddleware = [];
    // operation handler
    let operationHandler = handlers[operation];

    if (Array.isArray(operationHandler)) {
      // if an array is passed, add operation specific middleware
      // last item in the array should be the operation handler
      operationMiddleware = operationHandler.slice(0, -1);
      operationHandler = operationHandler[operationHandler.length-1];

    } else if (typeof operationHandler !== 'function') {
      // otherwise return internal error
      done(new ModofunError(500, 'InvalidConfig', 'Handler must be a function or array'));
      return;
    }

    // call middleware stack with same req/res context
    runMiddlewareStack(operationMiddleware, req, res, (err) => {
      if (err) {
        done(err);
        return;
      }
      try {
        // call handler function
        if (mode === FUNCTION_MODE) {
          invokeFunctionHandler(operationHandler, args, checkArity, req, res, done);
        } else {
          invokeHTTPHandler(operationHandler, args, req, res, done);
        }
      } catch(err) {
        done(err);
      }
    });

  } else {
    // fail if requested operation cannot be resolved
    done(new ModofunError(404, 'NotFound', `No handler for: ${operation}`));
    return;
  }
}
408418
protected function _getOperationName()
    {
        $operation = lcfirst($this->_getContainer()->getConfig()->getRequestParameter('operation'));

        if (method_exists($this->_getContainer()->getClient(), $operation)) {
            return $operation;
        }

        $this->setViewData(array('sError' => "Operation '{$operation}' does not exist"));
        return false;
    }
270796
public void setOperationNames(String operationNames) {
		String[] names = operationNames.split(",");
		if (this.operationInfos == null) {
			this.operationInfos = new ArrayList<JmxOperationInfo>();
		}
		for (int i = 0; i < names.length; i++) {
			this.operationInfos.add(new JmxOperationInfo(names[i]));
		}
	}
163328
func (s *UpdateRouteInput) SetOperationName(v string) *UpdateRouteInput {
	s.OperationName = &v
	return s
}
945952
func (s *CreateRouteOutput) SetOperationName(v string) *CreateRouteOutput {
	s.OperationName = &v
	return s
}
437471
static String getDomainName(OperationContext context, ModelNode model, String child) throws OperationFailedException {
        if (!model.hasDefined(CommonAttributes.EXPOSE_MODEL)) {
            return null;
        }
        if (!model.get(CommonAttributes.EXPOSE_MODEL).hasDefined(child)) {
            return null;
        }
        ModelNode childModel = model.get(CommonAttributes.EXPOSE_MODEL, child);
        return ExposeModelResource.getDomainNameAttribute(child).resolveModelAttribute(context, childModel).asString();
    }
199210
func (s *Span) OperationName() string {
	s.RLock()
	defer s.RUnlock()
	return s.operationName
}
830881
@Action(
            semantics = SemanticsOf.IDEMPOTENT,
            command = CommandReification.ENABLED
    )
    public SomeCommandAnnotatedObject changeName(
            @ParameterLayout(named = "New name")
            final String newName) {
        setName(newName);
        return this;
    }
964416
func (s *Span) SetOperationName(operationName string) opentracing.Span {
	s.Lock()
	defer s.Unlock()
	if s.context.IsSampled() {
		s.operationName = operationName
	}
	s.observer.OnSetOperationName(operationName)
	return s
}
1058974
function serializeOperation(operation, index) {
  var params = operation.params;

  switch (operation.method) {
  case 'create':
    params.constructorParams = serializeParams(params.constructorParams);
    break;

  default:
    params = serializeParams(params);
    params.operationParams = serializeParams(params.operationParams);
  };

  operation.jsonrpc = "2.0";

  operation.id = index;
}
219542
<Q extends BaseProxy> Q processReturnOperation(final SimpleProxyId<Q> id,
      final OperationMessage op, final WriteOperation... operations) {

    final AutoBean<Q> toMutate = this.getProxyForReturnPayloadGraph(id);
    toMutate.setTag(Constants.VERSION_PROPERTY_B64, op.getVersion());

    final Map<String, Splittable> properties = op.getPropertyMap();
    if (properties != null) {
      // Apply updates
      toMutate.accept(new AutoBeanVisitor() {
        @Override
        public boolean visitReferenceProperty(final String propertyName, final AutoBean<?> value,
            final PropertyContext ctx) {
          if (ctx.canSet()) {
            if (properties.containsKey(propertyName)) {
              final Splittable raw = properties.get(propertyName);
              Object decoded = null;
              if (ctx.getType() == Map.class) {
                final MapPropertyContext mapCtx = (MapPropertyContext) ctx;
                final Class<?> keyType = mapCtx.getKeyType();
                final Class<?> valueType = mapCtx.getValueType();
                decoded = EntityCodex.decode(AbstractRequestContext.this, mapCtx.getType(), keyType,
                    valueType, raw);
              } else {
                final Class<?> elementType = ctx instanceof CollectionPropertyContext
                    ? ((CollectionPropertyContext) ctx).getElementType()
                    : null;
                decoded = EntityCodex.decode(AbstractRequestContext.this, ctx.getType(),
                    elementType, raw);
              }
              ctx.set(decoded);
            }
          }
          return false;
        }

        @Override
        public boolean visitValueProperty(final String propertyName, final Object value,
            final PropertyContext ctx) {
          if (ctx.canSet()) {
            if (properties.containsKey(propertyName)) {
              final Splittable raw = properties.get(propertyName);
              Object decoded = ValueCodex.decode(ctx.getType(), raw);
              /*
               * Hack for Date subtypes, consider generalizing for "custom serializers"
               */
              if (decoded != null && Date.class.equals(ctx.getType())) {
                decoded = new DatePoser((Date) decoded);
              }
              ctx.set(decoded);
            }
          }
          return false;
        }
      });
    }

    // Finished applying updates, freeze the bean
    this.makeImmutable(toMutate);
    final Q proxy = toMutate.as();

    /*
     * Notify subscribers if the object differs from when it first came into the RequestContext.
     */
    if (operations != null && this.state.requestFactory.isEntityType(id.getProxyClass())) {
      for (final WriteOperation writeOperation : operations) {
        if (writeOperation.equals(WriteOperation.UPDATE)
            && !this.state.requestFactory.hasVersionChanged(id, op.getVersion())) {
          // No updates if the server reports no change
          continue;
        }
        this.state.requestFactory.getEventBus().fireEventFromSource(
            new EntityProxyChange<>((EntityProxy) proxy, writeOperation), id.getProxyClass());
      }
    }
    return proxy;
  }
1038473
private Name makeOperatorName(String name) {
        Name opName = names.fromString(name);
        operatorNames.add(opName);
        return opName;
    }
1129701
protected void validate(String operationType) throws Exception
	{
		super.validate(operationType);

		MPSString hostname_validator = new MPSString();
		hostname_validator.setConstraintCharSetRegEx(MPSConstants.GENERIC_CONSTRAINT,"[ a-zA-Z0-9_#.:@=-]+");
		hostname_validator.setConstraintMaxStrLen(MPSConstants.GENERIC_CONSTRAINT, 256);
		hostname_validator.setConstraintMinStrLen(MPSConstants.GENERIC_CONSTRAINT, 1);
		hostname_validator.validate(operationType, hostname, "\"hostname\"");
		
	}