Find wsa:Action attribute, and return value or the default.
970802
def GetWSAActionOutput(operation):
    """"""
    attr = operation.output.action
    if attr is not None:
        return attr
    targetNamespace = operation.getPortType().getTargetNamespace()
    ptName = operation.getPortType().name
    msgName = operation.output.name
    if not msgName:
        msgName = operation.name + 'Response'
    if targetNamespace.endswith('/'):
        return '%s%s/%s' %(targetNamespace, ptName, msgName)
    return '%s/%s/%s' %(targetNamespace, ptName, msgName)
422849
def _initialize_default_action_fluents(self):
        ''''''
        action_fluents = self.rddl.domain.action_fluents
        self.default_action_fluents = self._initialize_pvariables(
            action_fluents,
            self.rddl.domain.action_fluent_ordering)
        return self.default_action_fluents
950266
def action_attr(attr_name):
    

    def action_attr(_value, context, **_params):
        value = getattr(context["action"], attr_name)
        return _attr(value)

    return action_attr
482970
def dispatch(self, *args, **kwargs):
        """"""
        action = kwargs.pop('action', 'default')
        action_method = getattr(self, str(action), self.default)
        return action_method(*args, **kwargs)
955460
def check_action_type(self, value):
        """"""
        if value is not None:
            if not isinstance(value, ActionType):
                raise AttributeError("Invalid check action %s" % value)
        self._check_action_type = value
457606
def get(self, action, version=None):
        """"""
        by_version = self._by_action[action]
        if version in by_version:
            return by_version[version]
        else:
            return by_version[None]
831964
def _get_default(cls, attribute):
        """"""
        try:
            for klass in cls.__mro__:
                if attribute in klass._attributes:
                    return klass._attributes[attribute].default_value
        except AttributeError:
            raise KeyError("No attribute '{}' in {}".format(attribute, cls))
255776
def process_action(ctx, param, value):
    """"""
    actions = current_app.extensions['invenio-access'].actions
    if value not in actions:
        raise click.BadParameter('Action "%s" is not registered.', value)
    return actions[value]
749565
def action_handler_adapter(handler_cls: type, action_name: str) -> Callable:
    

    if not hasattr(handler_cls(), action_name):
        message = "{0} does'nt have attr:{1}".format(handler_cls, action_name)
        raise ValueError(message)

    def wsgiapp(environ, start_response):
        """ inner app """
        handler = handler_cls()
        return getattr(handler, action_name)(environ, start_response)
    return wsgiapp
774680
def get_event_action(cls) -> Optional[str]:
        
        if not cls.actor:
            return None
        return event_context.get_event_action(cls.event_type)
45766
def _check_action(action):
    """"""
    if isinstance(action, types.StringTypes):
        action = action.lower()

    if action not in ['learn', 'forget', 'report', 'revoke']:
        raise SpamCError('The action option is invalid')
    return action
821043
public CmsListDefaultAction removeDefaultAction(String actionId) {

        Iterator<CmsListDefaultAction> it = m_defaultActions.iterator();
        while (it.hasNext()) {
            CmsListDefaultAction action = it.next();
            if (action.getId().equals(actionId)) {
                it.remove();
                return action;
            }
        }
        return null;
    }
362071
def findViewsWithAttribute(self, attr, val, root="ROOT"):
        '''
        

        '''

        return self.__findViewsWithAttributeInTree(attr, val, root)
1073147
def _get_action_type(self, action):
        '''
        
        '''
        action_name = next(iter(action or {'': None}))
        if ':' not in action_name:
            action_name = '{}:{}'.format(self.CALL_TYPE, action_name)

        return action_name.split(':')[0] or None
1362554
def GetWSAActionInput(operation):
    """"""
    attr = operation.input.action
    if attr is not None:
        return attr
    portType = operation.getPortType()
    targetNamespace = portType.getTargetNamespace()
    ptName = portType.name
    msgName = operation.input.name
    if not msgName:
        msgName = operation.name + 'Request'
    if targetNamespace.endswith('/'):
        return '%s%s/%s' %(targetNamespace, ptName, msgName)
    return '%s/%s/%s' %(targetNamespace, ptName, msgName)
872656
function(action) {
    var self = this,
      imports = this.getActionImports(action),
      config = this.getActionConfig(action),
      authDisposition = this.getAuthDisposition(),
      auth = this.getAuthProperties(),
      descriptions = [];

     _.each(
      _.uniq(
        _.union(authDisposition, imports.required || [], config.required || []).concat(
          authDisposition,
          imports.disposition || [],
          config.disposition || []
        )
      ),
      function(attr) {
        var prop;

        if (imports.properties.hasOwnProperty(attr)) {
          prop = _.clone(imports.properties[attr]);

        } else if (config.properties.hasOwnProperty(attr)) {
          prop = _.clone(config.properties[attr]);

        } else if (auth.hasOwnProperty(attr)) {
          prop = _.clone(auth[attr]);
        }

        if (prop) {
          prop.name = attr;
          descriptions.push(prop);
        } else {
          self._logger('required field "' + attr + '" not in imports or config', 'warn');
        }
      }
    );

     return descriptions;
  }
1369034
public I_CmsDefaultAction getDefaultAction(
        I_CmsDialogContext context,
        I_CmsContextMenuItemProvider menuItemProvider) {

        I_CmsDefaultAction result = null;
        int resultRank = -1;
        if (context.getResources().size() == 1) {
            for (I_CmsContextMenuItem menuItem : menuItemProvider.getMenuItems()) {
                if ((menuItem instanceof CmsContextMenuActionItem)
                    && (((CmsContextMenuActionItem)menuItem).getWorkplaceAction() instanceof I_CmsDefaultAction)) {
                    I_CmsDefaultAction action = (I_CmsDefaultAction)((CmsContextMenuActionItem)menuItem).getWorkplaceAction();
                    if (action.getVisibility(context).isActive()) {
                        if (result == null) {
                            result = action;
                            resultRank = action.getDefaultActionRank(context);
                        } else {
                            int rank = action.getDefaultActionRank(context);
                            if (rank > resultRank) {
                                result = action;
                                resultRank = rank;
                            }
                        }
                    }
                }
            }
        }
        return result;
    }