- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.eclipse.scada.da.core.WriteAttributeResults
类的一些代码示例,展示了WriteAttributeResults
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WriteAttributeResults
类的具体详情如下:
包路径:org.eclipse.scada.da.core.WriteAttributeResults
类名称:WriteAttributeResults
暂无
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.server.common
@Override
public WriteAttributeResults setAttributes ( final Map<String, Variant> attributes )
{
final WriteAttributeResults writeAttributeResults = new WriteAttributeResults ();
for ( final Map.Entry<String, Variant> entry : attributes.entrySet () )
{
if ( this.reservedAttributes.contains ( entry.getKey () ) )
{
writeAttributeResults.put ( entry.getKey (), new WriteAttributeResult ( new Exception ( "Attribute may not be set" ) ) );
}
}
return writeAttributeResults;
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.server.ngp
protected List<AttributeWriteResultEntry> convertResult ( final WriteAttributeResults attributeResult )
{
if ( attributeResult == null )
{
return null;
}
final List<AttributeWriteResultEntry> result = new ArrayList<AttributeWriteResultEntry> ( attributeResult.size () );
for ( final Map.Entry<String, WriteAttributeResult> entry : attributeResult.entrySet () )
{
result.add ( new AttributeWriteResultEntry ( entry.getKey (), convertEntry ( entry.getValue () ) ) );
}
return result;
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.server.common
writeAttributeResults = new WriteAttributeResults ();
if ( !writeAttributeResults.containsKey ( name ) )
writeAttributeResults.put ( name, WriteAttributeResult.OK );
代码示例来源:origin: org.eclipse.neoscada.core/org.eclipse.scada.da.master
/**
* Merge the two result sets
*
* @param firstResult
* first set
* @param secondResult
* second set
* @return the merged result
*/
protected WriteAttributeResults mergeResults ( final WriteAttributeResults firstResult, final WriteAttributeResults secondResult )
{
final WriteAttributeResults newResults = new WriteAttributeResults ();
if ( firstResult != null )
{
newResults.putAll ( firstResult );
}
if ( secondResult != null )
{
newResults.putAll ( secondResult );
}
return newResults;
}
代码示例来源:origin: org.eclipse.neoscada.core/org.eclipse.scada.da.master
public WriteRequestResult ( final Variant value, final Map<String, Variant> attributes, final WriteAttributeResults attributeResults )
{
this.value = value;
if ( attributes != null )
{
this.attributes = new HashMap<String, Variant> ( attributes );
}
else
{
this.attributes = Collections.emptyMap ();
}
if ( attributeResults != null )
{
this.attributeResults = (WriteAttributeResults)attributeResults.clone ();
}
else
{
this.attributeResults = new WriteAttributeResults ();
}
this.error = null;
}
代码示例来源:origin: org.eclipse.neoscada.core/org.eclipse.scada.da.master
for ( final String attr : result.keySet () )
result.put ( attr, new WriteAttributeResult ( new OperationException ( String.format ( "Attribute '%s' is not supported", this.dotPrefix + attr ) ) ) ); //$NON-NLS-1$
final WriteAttributeResults fullResults = new WriteAttributeResults ();
for ( final Map.Entry<String, WriteAttributeResult> entry : result.entrySet () )
fullResults.put ( fullKey, entry.getValue () );
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.server.common
protected WriteAttributeResults processSetAttributes ( final Map<String, Variant> attributes, final OperationParameters operationParameters )
{
final WriteAttributeResults writeAttributeResults = new WriteAttributeResults ();
for ( final ChainProcessEntry chainEntry : this.chain )
{
final ChainItem chainItem = chainEntry.getWhat ();
final WriteAttributeResults partialResult = chainItem.setAttributes ( attributes );
if ( partialResult != null )
{
for ( final Map.Entry<String, WriteAttributeResult> entry : partialResult.entrySet () )
{
if ( entry.getValue ().isError () )
{
attributes.remove ( entry.getKey () );
}
writeAttributeResults.put ( entry.getKey (), entry.getValue () );
}
}
}
process ();
return handleUnhandledAttributes ( writeAttributeResults, attributes );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.server.common
@Override
protected WriteAttributeResults handleUnhandledAttributes ( final WriteAttributeResults writeAttributeResults, final Map<String, Variant> attributes )
{
final AttributeWriteHandler handler = this.writeHandler;
WriteAttributeResults result = null;
try
{
result = handler.handleWrite ( attributes );
// remove handled attributes
for ( final String attr : result.keySet () )
{
attributes.remove ( attr );
}
return super.handleUnhandledAttributes ( result, attributes );
}
catch ( final Exception e )
{
if ( result == null )
{
result = new WriteAttributeResults ();
}
for ( final String attr : attributes.keySet () )
{
result.put ( attr, new WriteAttributeResult ( e ) );
}
return result;
}
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.server.common.memory
@Override
protected WriteAttributeResults handleUnhandledAttributes ( final WriteAttributeResults initialResults, final Map<String, Variant> attributes )
{
// check for null
WriteAttributeResults writeAttributeResults = initialResults;
if ( writeAttributeResults == null )
{
writeAttributeResults = new WriteAttributeResults ();
}
// gather the list of open requests
final Map<String, Variant> requests = new HashMap<String, Variant> ( 0 );
for ( final Map.Entry<String, Variant> entry : attributes.entrySet () )
{
if ( !writeAttributeResults.containsKey ( entry.getKey () ) )
{
requests.put ( entry.getKey (), entry.getValue () );
}
}
writeAttributeResults.putAll ( this.variable.handleAttributes ( requests ) );
// default for the rest
return super.handleUnhandledAttributes ( writeAttributeResults, attributes );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.ae.monitor.datasource
private WriteRequestResult handleAttributesWrite ( final WriteRequest request )
{
final Map<String, Variant> attributes = new HashMap<String, Variant> ( request.getAttributes () );
final WriteAttributeResults result = new WriteAttributeResults ();
simpleHandleAttributes ( attributes, result, request.getOperationParameters () );
// remove result keys from request
for ( final String attr : result.keySet () )
{
attributes.remove ( attr );
}
return new WriteRequestResult ( request.getValue (), attributes, result );
}
代码示例来源:origin: org.eclipse.neoscada.core/org.eclipse.scada.da.master
@Override
public void complete ( final WriteResult result )
{
setResult ( new WriteAttributeResults () );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.ae.monitor.datasource
protected void handleConfigUpdate ( final Map<String, String> configUpdate, final Map<String, Variant> attributes, final WriteAttributeResults result )
{
final Variant active = attributes.get ( this.prefix + ".active" );
if ( active != null )
{
configUpdate.put ( "active", active.asBoolean () ? "true" : "false" );
result.put ( intern ( this.prefix + ".active" ), WriteAttributeResult.OK );
}
}
代码示例来源:origin: org.eclipse.neoscada.core/org.eclipse.scada.da.master
for ( final Map.Entry<String, WriteAttributeResult> entry : finalResult.getAttributeResults ().entrySet () )
代码示例来源:origin: org.eclipse.neoscada.core/org.eclipse.scada.da.master
private static WriteRequestResult mergeNextResult ( final WriteRequestResult finalResult, final WriteRequestResult nextResult )
{
if ( nextResult.getError () != null )
{
return nextResult;
}
// merge current and previous results
final WriteAttributeResults result = new WriteAttributeResults ();
if ( nextResult.getAttributeResults () != null )
{
result.putAll ( nextResult.getAttributeResults () );
}
if ( finalResult.getAttributeResults () != null )
{
result.putAll ( finalResult.getAttributeResults () );
}
return new WriteRequestResult ( nextResult.getValue (), nextResult.getAttributes (), result );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.server.common
@Override
public NotifyFuture<WriteAttributeResults> startSetAttributes ( final Map<String, Variant> attributes, final OperationParameters operationParameters )
{
final WriteAttributeResults writeAttributeResults = new WriteAttributeResults ();
this.attributes.update ( null, attributes );
for ( final Map.Entry<String, Variant> entry : attributes.entrySet () )
{
writeAttributeResults.put ( entry.getKey (), WriteAttributeResult.OK );
}
return new InstantFuture<WriteAttributeResults> ( writeAttributeResults );
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.server.common
/**
* This method sets all unprocessed attribute write requests to an <q>unsupported</q> error ({@link UnsupportedOperationException});
*
* @param initialResults
* The results generated so far
* @param attributes
* The attributes to write
* @return the initial results including the unprocessed results
*/
public static WriteAttributeResults errorUnhandled ( final WriteAttributeResults initialResults, final Map<String, Variant> attributes )
{
final WriteAttributeResults writeAttributeResults;
if ( initialResults == null )
{
writeAttributeResults = new WriteAttributeResults ();
}
else
{
writeAttributeResults = initialResults;
}
for ( final String name : attributes.keySet () )
{
if ( !writeAttributeResults.containsKey ( name ) )
{
writeAttributeResults.put ( name, new WriteAttributeResult ( new UnsupportedOperationException ( "Operation not supported" ) ) );
}
}
return writeAttributeResults;
}
代码示例来源:origin: org.eclipse.neoscada.core/org.eclipse.scada.da.server.ngp
protected List<AttributeWriteResultEntry> convertResult ( final WriteAttributeResults attributeResult )
{
if ( attributeResult == null )
{
return null;
}
final List<AttributeWriteResultEntry> result = new ArrayList<AttributeWriteResultEntry> ( attributeResult.size () );
for ( final Map.Entry<String, WriteAttributeResult> entry : attributeResult.entrySet () )
{
result.add ( new AttributeWriteResultEntry ( entry.getKey (), convertEntry ( entry.getValue () ) ) );
}
return result;
}
代码示例来源:origin: de.dentrassi.eclipse.neoscada.core/org.eclipse.scada.da.client.ngp
public static WriteAttributeResults convertResults ( final List<AttributeWriteResultEntry> attributeResults )
{
final WriteAttributeResults result = new WriteAttributeResults ();
for ( final AttributeWriteResultEntry entry : attributeResults )
{
result.put ( entry.getAttribute (), convertResult ( entry.getErrorInformation () ) );
}
return result;
}
代码示例来源:origin: org.eclipse.neoscada.core/org.eclipse.scada.da.master
result = new WriteAttributeResults ();
for ( final String attr : data.keySet () )
result.put ( attr, new WriteAttributeResult ( error ) );
result.put ( attr, WriteAttributeResult.OK );
本文整理了Java中org.eclipse.scada.da.core.WriteAttributeResults.entrySet()方法的一些代码示例,展示了WriteAttributeResul
本文整理了Java中org.eclipse.scada.da.core.WriteAttributeResults.()方法的一些代码示例,展示了WriteAttributeResults.()的具体
本文整理了Java中org.eclipse.scada.da.core.WriteAttributeResults.put()方法的一些代码示例,展示了WriteAttributeResults.pu
本文整理了Java中org.eclipse.scada.da.core.WriteAttributeResults.keySet()方法的一些代码示例,展示了WriteAttributeResults
我是一名优秀的程序员,十分优秀!