Checks if the passed action is a reserved stream method.

@param action
Action to check
@return true if passed action is a reserved stream method, false otherwise
540602
@SuppressWarnings("unused")
    private boolean isStreamCommand(String action) {
        switch (StreamAction.getEnum(action)) {
            case CREATE_STREAM:
            case DELETE_STREAM:
            case RELEASE_STREAM:
            case PUBLISH:
            case PLAY:
            case PLAY2:
            case SEEK:
            case PAUSE:
            case PAUSE_RAW:
            case CLOSE_STREAM:
            case RECEIVE_VIDEO:
            case RECEIVE_AUDIO:
                return true;
            default:
                log.debug("Stream action {} is not a recognized command", action);
                return false;
        }
    }
374465
protected function _actionIsEnabled($action)
    {
        $actions = $this->type['actions'];

        if (array_key_exists($action, $actions)) {
            return $actions[$action];
        }
        return true;
    }
496587
@Override
    protected boolean isForAction(Method actionMethod, Class<?> controllerClazz) {
        for (Class<?> paramType : actionMethod.getParameterTypes()) {
            if (paramType == Portal.class) {
                return true;
            }
        }
        return false;
    }
557578
public boolean hasDelfoiAccess(User user, DelfoiActionName actionName) {
    if (isSuperUser(user)) {
      return true;
    }
    
    DelfoiAction action = delfoiActionDAO.findByActionName(actionName.toString());
    if (action == null) {
      logger.info(String.format("ActionUtils.hasDelfoiAccess - undefined action: '%s'", actionName));
      return false;
    }
    
    UserRole userRole = getDelfoiRole(user);
    return hasDelfoiAccess(action, userRole);
  }
560762
public boolean checkResource(RequiredOrientResource resource, Action action)
	{
		if(!resource.action().equals(action.getName())) return true;
		OSecurityUser user = OrientDbWebSession.get().getEffectiveUser();
		if(user==null) return false;
		int iOperation = OrientPermission.combinedPermission(resource.permissions());
		ORule.ResourceGeneric value = OSecurityHelper.getResourceGeneric(resource.value());
		String specific = resource.specific();
		if(Strings.isEmpty(specific)) specific = null;
		if(user.checkIfAllowed(value, specific, iOperation)!=null) return true;
		while(!Strings.isEmpty(specific=Strings.beforeLastPathComponent(specific, '.')))
		{
			if(user.checkIfAllowed(value, specific+"."+ODatabaseSecurityResources.ALL, iOperation)!=null) return true;
		}
		return false;
	}
707377
@Override
    public boolean handleAction (final ActionEvent action)
    {
        final boolean[] handled = new boolean[1];

        // let our delegates have a crack at the action
        applyToDelegates(new DelegateOp(PlaceControllerDelegate.class) {
            @Override
            public void apply (PlaceControllerDelegate delegate) {
                // we take advantage of short-circuiting here
                handled[0] = handled[0] || delegate.handleAction(action);
            }
        });

        // if they didn't handle it, pass it off to the super class
        return handled[0] || super.handleAction(action);
    }
500452
private boolean hasDelfoiAccess(DelfoiAction action, UserRole userRole) {
    Delfoi delfoi = getDelfoi();
    return delfoiUserRoleActionDAO.hasDelfoiActionAccess(delfoi, userRole, action);
  }
1209874
public static <T> T runInVm(PrivilegedAction<T> action) {
        checkPermission(PERFORM_IN_VM_CALL);

        if (action == null) return null;
        Boolean originalValue = IN_VM_CALL.get();

        try {
            IN_VM_CALL.set(Boolean.TRUE);
            return action.run();
        } finally {
            IN_VM_CALL.set(originalValue);
        }
    }
651241
public void setAction(MethodBinding action) {
        MethodExpressionMethodBindingAdapter adapter;
        if (null != action) {
            adapter = new MethodExpressionMethodBindingAdapter(action);
            setActionExpression(adapter);
        } else {
            setActionExpression(null);
        }
    }
1041960
public void setAction(String action) {
        try {
            this.action = new URI(action);
        } catch (URISyntaxException e) {
            throw new CitrusRuntimeException("Invalid action uri", e);
        }
    }
865788
private boolean isDownload(String action) {
		if (StringUtils.hasText(action) && action.equals(OperationType.DOWNLOAD.toString())) {
			return true;
		}
		return false;
	}
24144
public function isGranted($action, $entity, array $parameters)
    {
        $method = $this->getActions()[$action];

        return $this->$method($entity, $parameters);
    }
353960
public static Callable<Object> callable(final PrivilegedExceptionAction<?> action) {
        if (action == null)
            throw new NullPointerException();
        return new Callable<Object>() {
            public Object call() throws Exception { return action.run(); }};
    }
284796
@Override
    public boolean validateAction(String action) {
        boolean result = false;
        if (action.equals(MessagingSecurityConstants.OPERATION_TYPE_SEND) ||
            action.equals(MessagingSecurityConstants.OPERATION_TYPE_RECEIVE)) {
            result = true;
        }
        return result;
    }
1131962
public function isGranted(string $action): bool
    {
        if (empty($this->allowed)) {
            return false;
        }

        if (isset($this->denied[$action]) || isset($this->denied[self::WILDCARD])) {
            return false;
        }

        $rules = $this->getRules($action);

        foreach ($rules as $rule) {
            if (isset($this->denied[$rule])) {
                return false;
            }
        }

        foreach ($rules as $rule) {
            if (isset($this->allowed[$rule])) {
                return true;
            }
        }

        return false;
    }
1063706
public boolean checkResource(String resource, Action action, OrientPermission[] permissions)
	{
		String actionName = action.getName();
		int actionIndx = resource.indexOf(':');
		if(actionIndx>0) {
			if(!(resource.endsWith(actionName) && resource.length()>actionName.length() 
					&& resource.charAt(resource.length()-actionName.length()-1) == ':')) return true;
			else resource = resource.substring(0, actionIndx);//Should cut off action
		} else if(!Component.RENDER.equals(action)) return true; //Default suffix is for render: so other should be skipped
		
		OSecurityUser user = OrientDbWebSession.get().getUser();
		if(user==null) return false;
		ORule.ResourceGeneric generic = OSecurityHelper.getResourceGeneric(resource);
		String specific = OSecurityHelper.getResourceSpecific(resource);
		
		return user!=null
				?user.checkIfAllowed(generic, specific, OrientPermission.combinedPermission(permissions))!=null
				:false;
	}
9558
protected boolean processUnhandledAction( HttpServletRequest request, HttpServletResponse response, String uri )
        throws IOException, ServletException
    {
        //
        // First check to see if we're already in a forwarded fallback request.  If so, just bail.
        //
        PageFlowRequestWrapper rw = PageFlowRequestWrapper.get( request );
        if ( rw.getOriginalServletPath() != null ) return false;       
        
        SharedFlowController sharedFlowToTry = null;
        String uriBaseName = ServletUtils.getBaseName( uri );
        int firstDot = uriBaseName.indexOf( '.' );
        int lastDot = uriBaseName.lastIndexOf( '.' );
        
        if ( firstDot != -1 && firstDot != lastDot )
        {
            String sharedFlowName = uriBaseName.substring( 0, firstDot );
            
            try
            {
                RequestContext rc = new RequestContext( request, response );
                Map defaultSharedFlows = FlowControllerFactory.get( getServletContext() ).getDefaultSharedFlows( rc );
                
                if ( defaultSharedFlows != null )
                {
                    sharedFlowToTry = ( SharedFlowController ) defaultSharedFlows.get( sharedFlowName );
                    uriBaseName = uriBaseName.substring( firstDot + 1 );
                }
            }
            catch ( ClassNotFoundException e )
            {
                ServletUtils.throwServletException(e);
            }
            catch ( InstantiationException e )
            {
                ServletUtils.throwServletException(e);
            }
            catch ( IllegalAccessException e )
            {
                ServletUtils.throwServletException(e);
            }
        }
        else
        {
            sharedFlowToTry = FlowControllerFactory.getGlobalApp( request, response, getServletContext() );
        }
        
        //
        // If we couldn't find an appropriate module, try raising the action on the (deprecated) Global.app.
        //
        
        if ( sharedFlowToTry != null )
        {
            InternalStringBuilder sfActionURI = new InternalStringBuilder( sharedFlowToTry.getModulePath() );
            sfActionURI.append( '/' );
            sfActionURI.append( uriBaseName );
            rw.setOriginalServletPath( uri );
            ForwardRedirectHandler frh = _handlers.getForwardRedirectHandler();
            FlowControllerHandlerContext context = new FlowControllerHandlerContext( request, response, null );
            frh.forward( context, sfActionURI.toString() );
            return true;
        }
        
        return false;
    }