public static Action getAndCheckAction ( EntityDataModel entityDataModel , String actionName ) { int namespaceLastIndex = actionName . lastIndexOf ( ' ' ) ; String namespace = actionName . substring ( 0 , namespaceLastIndex ) ; String simpleActionName = actionName . substring ( namespaceLastIndex + 1 ) ; Schema schema = entityDataModel . getSchema ( namespace ) ; if ( schema == null ) { throw new ODataSystemException ( "Could not find schema in entity data model with namespace: " + namespace ) ; } Action action = schema . getAction ( simpleActionName ) ; if ( action == null ) { throw new ODataSystemException ( "Action not found in entity data model: " + actionName ) ; } return action ; }
Gets the action by the specified name throw an exception if no action with the specified name exists .