本文整理了Java中org.switchyard.Property.getValue()
方法的一些代码示例,展示了Property.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.getValue()
方法的具体详情如下:
包路径:org.switchyard.Property
类名称:Property
方法名:getValue
[英]The value of the property.
[中]财产的价值。
代码示例来源:origin: org.switchyard/switchyard-runtime
@Override
@SuppressWarnings("unchecked")
public <T> T getPropertyValue(String name) {
Property prop = _properties.get(name);
if (prop != null) {
return (T) prop.getValue();
}
return null;
}
代码示例来源:origin: org.switchyard/switchyard-runtime
@Override
@SuppressWarnings("unchecked")
public <T> T getPropertyValue(String name) {
Property property = getProperty(name);
return property == null ? null : (T) property.getValue();
}
代码示例来源:origin: org.switchyard.components/switchyard-component-common-knowledge
/**
* {@inheritDoc}
*/
@Override
public Collection<Object> values() {
Collection<Object> values = new ArrayList<Object>();
for (Property property : getProperties(_scope)) {
values.add(property.getValue());
}
return values;
}
代码示例来源:origin: org.switchyard.components/switchyard-component-common-rules
/**
* {@inheritDoc}
*/
@Override
public Collection<Object> values() {
Collection<Object> values = new ArrayList<Object>();
for (Property property : getProperties(_scope)) {
values.add(property.getValue());
}
return values;
}
代码示例来源:origin: jboss-switchyard/core
@Override
@SuppressWarnings("unchecked")
public <T> T getPropertyValue(String name) {
Property property = getProperty(name);
return property == null ? null : (T) property.getValue();
}
代码示例来源:origin: jboss-switchyard/components
/**
* {@inheritDoc}
*/
@Override
public Collection<Object> values() {
Collection<Object> values = new ArrayList<Object>();
for (Property property : getProperties(_scope)) {
values.add(property.getValue());
}
return values;
}
代码示例来源:origin: org.switchyard/switchyard-bus-camel
@Override
@SuppressWarnings("unchecked")
public <T> T getPropertyValue(String name) {
Property property = getProperty(name);
return property == null ? null : (T) property.getValue();
}
代码示例来源:origin: org.switchyard.components/switchyard-component-common-knowledge
/**
* {@inheritDoc}
*/
@Override
public Object get(Object key) {
if (key != null) {
Property property = getProperty(key.toString(), _scope);
if (property != null) {
return property.getValue();
}
}
return null;
}
代码示例来源:origin: org.switchyard.components/switchyard-component-common-rules
/**
* {@inheritDoc}
*/
@Override
public Object get(Object key) {
if (key != null) {
Property property = getProperty(key.toString(), _scope);
if (property != null) {
return property.getValue();
}
}
return null;
}
代码示例来源:origin: org.switchyard/switchyard-api
@SuppressWarnings("unchecked")
private static Set<Policy> getPolicies(Exchange exchange, String propertyName) {
Property intentsProperty = exchange.getContext().getProperty(propertyName, Scope.EXCHANGE);
Set<Policy> intents = new HashSet<Policy>();
if (intentsProperty != null) {
intents.addAll((Set<Policy>)intentsProperty.getValue());
}
return intents;
}
代码示例来源:origin: org.switchyard.components/switchyard-component-common-rules
/**
* {@inheritDoc}
*/
@Override
public Set<Entry<String, Object>> entrySet() {
Map<String, Object> entries = new HashMap<String, Object>();
for (Property property : getProperties(_scope)) {
entries.put(property.getName(), property.getValue());
}
return entries.entrySet();
}
代码示例来源:origin: org.switchyard.components/switchyard-component-common-knowledge
/**
* {@inheritDoc}
*/
@Override
public Set<Entry<String, Object>> entrySet() {
Map<String, Object> entries = new HashMap<String, Object>();
for (Property property : getProperties(_scope)) {
entries.put(property.getName(), property.getValue());
}
return entries.entrySet();
}
代码示例来源:origin: org.switchyard/switchyard-api
private static TransformSequence get(final Exchange exchange) {
Property sequenceProperty = exchange.getContext().getProperty(TransformSequence.class.getName());
if (sequenceProperty != null) {
return (TransformSequence)sequenceProperty.getValue();
} else {
return null;
}
}
}
代码示例来源: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) {
setProperty(property.getName(), property.getValue(), property.getScope());
}
return this;
}
代码示例来源:origin: jboss-switchyard/core
@Test
public void testGetProperties() {
_context.setProperty(PROP_NAME, PROP_VAL);
Set<Property> props = _context.getProperties();
Assert.assertTrue(props.size() == 1);
Assert.assertEquals(PROP_VAL, props.iterator().next().getValue());
// operations to the returned map should *not* be reflected in the context
props.remove(PROP_NAME);
Assert.assertTrue(_context.getProperties().size() == 1);
}
代码示例来源:origin: jboss-switchyard/core
@Test
public void testGetSet() {
_context.setProperty(PROP_NAME, PROP_VAL);
Assert.assertEquals(PROP_VAL, _context.getProperty(PROP_NAME).getValue());
}
代码示例来源: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
@Test
public void testRemove() {
_context.setProperty(PROP_NAME, PROP_VAL);
Property p = _context.getProperty(PROP_NAME);
Assert.assertEquals(PROP_VAL, p.getValue());
_context.removeProperty(p);
Assert.assertNull(_context.getProperty(PROP_NAME));
}
内容来源于网络,如有侵权,请联系作者删除!