org.switchyard.Property.getScope()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中org.switchyard.Property.getScope()方法的一些代码示例,展示了Property.getScope()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.getScope()方法的具体详情如下:
包路径:org.switchyard.Property
类名称:Property
方法名:getScope

Property.getScope介绍

[英]The scope of the property.
[中]财产的范围。

代码示例

代码示例来源:origin: jboss-switchyard/core

@Override
public void removeProperty(Property property) {
  for (Entry<Scope, Context> entry : _contexts.entrySet()) {
    if (entry.getKey() == property.getScope()) {
      entry.getValue().removeProperty(property);
    }
  }
}

代码示例来源:origin: org.switchyard/switchyard-runtime

@Override
public void removeProperty(Property property) {
  for (Entry<Scope, Context> entry : _contexts.entrySet()) {
    if (entry.getKey() == property.getScope()) {
      entry.getValue().removeProperty(property);
    }
  }
}

代码示例来源:origin: org.switchyard/switchyard-runtime

@Override
public void removeProperty(Property property) {
  checkScope(_scope, property.getScope());
  _properties.remove(property.getName());
}

代码示例来源:origin: jboss-switchyard/core

@Override
public void removeProperty(Property property) {
  checkScope(_scope, property.getScope());
  _properties.remove(property.getName());
}

代码示例来源:origin: jboss-switchyard/core

@Override
public Context setProperties(Set<Property> properties) {
  for (Property property : properties) {
    setProperty(property.getName(), property.getValue(), property.getScope());
  }
  return this;
}

代码示例来源:origin: org.switchyard/switchyard-runtime

@Override
public Context setProperties(Set<Property> properties) {
  for (Property property : properties) {
    setProperty(property.getName(), property.getValue(), property.getScope());
  }
  return this;
}

代码示例来源:origin: org.switchyard/switchyard-bus-camel

@Override
public Context setProperties(Set<Property> properties) {
  for (Property property : properties) {
    Set<String> labels = property.getLabels();
    setProperty(property.getName(), property.getValue(), property.getScope())
      .addLabels(labels.toArray(new String[labels.size()]));
  }
  return this;
}

代码示例来源:origin: jboss-switchyard/core

@Override
public Context setProperties(Set<Property> properties) {
  for (Property property : properties) {
    Set<String> labels = property.getLabels();
    setProperty(property.getName(), property.getValue(), property.getScope())
      .addLabels(labels.toArray(new String[labels.size()]));
  }
  return this;
}

代码示例来源:origin: org.switchyard/switchyard-transform

private void copyProperties(Context context, Exchange exchange) {
  for (Property property : context.getProperties()) {
    if (property.hasLabel(BehaviorLabel.TRANSIENT.label()) 
        || ContextPropertyUtil.isReservedProperty(property.getName(), property.getScope())) {
      continue;
    }
    if (Scope.EXCHANGE.equals(property.getScope())) {
      exchange.setProperty(property.getName(), property.getValue());
    } else {
      exchange.getIn().setHeader(property.getName(), property.getValue());
    }
  }
}

代码示例来源:origin: org.switchyard/switchyard-bus-camel

@Override
public void removeProperty(Property property) {
  switch (property.getScope()) {
  case EXCHANGE:
    _exchange.removeProperty(property.getName());
    break;
  default:
    _message.removeHeader(property.getName());
    break;
  }
}

代码示例来源:origin: jboss-switchyard/core

@Override
public void removeProperty(Property property) {
  switch (property.getScope()) {
  case EXCHANGE:
    _exchange.removeProperty(property.getName());
    break;
  default:
    _message.removeHeader(property.getName());
    break;
  }
}

代码示例来源:origin: org.switchyard/switchyard-bus-camel

@Override
public void mergeInto(Context context) {
  for (Property property : getProperties()) {
    if (ContextPropertyUtil.isReservedProperty(property.getName(), property.getScope())
        || property.hasLabel(BehaviorLabel.TRANSIENT.label())) {
      continue;
    }
    context.setProperty(property.getName(), property.getValue(), property.getScope())
      .addLabels(property.getLabels());
  }
}

代码示例来源:origin: jboss-switchyard/core

@Override
public void mergeInto(Context context) {
  for (Property property : getProperties()) {
    if (ContextPropertyUtil.isReservedProperty(property.getName(), property.getScope())
        || property.hasLabel(BehaviorLabel.TRANSIENT.label())) {
      continue;
    }
    context.setProperty(property.getName(), property.getValue(), property.getScope())
      .addLabels(property.getLabels());
  }
}

代码示例来源:origin: org.switchyard/switchyard-bus-camel

return false;
if (getScope() != other.getScope()) {
  return false;

代码示例来源:origin: jboss-switchyard/core

return false;
if (getScope() != other.getScope()) {
  return false;

代码示例来源:origin: org.switchyard.components/switchyard-component-camel-switchyard

/**
   * Map from SwitchYard context property to camel exchange property or camel message header.
   * @param syContext switchyard context
   * @param camelExchange camel exchange
   * @param camelMessage camel message
   */
  public static void mapSwitchYardPropertiesToCamel(
      org.switchyard.Context syContext,
      org.apache.camel.Exchange camelExchange,
      org.apache.camel.Message camelMessage) {
    
    for (Property property : syContext.getProperties()) {
      if (property.hasLabel(BehaviorLabel.TRANSIENT.label()) 
          || ContextPropertyUtil.isReservedProperty(property.getName(), property.getScope())) {
        continue;
      }
      
      if (Scope.EXCHANGE.equals(property.getScope())) {
        camelExchange.setProperty(property.getName(), property.getValue());
      } else if (camelMessage != null) {
        camelMessage.setHeader(property.getName(), property.getValue());
      }
    }
  }
}

代码示例来源:origin: jboss-switchyard/components

|| ContextPropertyUtil.isReservedProperty(property.getName(), property.getScope())) {
  continue;
if (Scope.EXCHANGE.equals(property.getScope())) {
  camelExchange.setProperty(property.getName(), property.getValue());
} else {

相关文章