Examples of CreateOperation


Examples of org.apache.camel.component.zookeeper.operations.CreateOperation

            }
        }
    }
   
    private OperationResult<String> createNode(ProductionContext ctx) throws Exception {
        CreateOperation create = new CreateOperation(ctx.connection, ctx.node);
        create.setPermissions(getAclListFromMessage(ctx.exchange.getIn()));
       
        CreateMode mode = null;
        String modeString = configuration.getCreateMode();
        if (modeString != null) {
            try {
                mode = getCreateModeFromString(modeString, CreateMode.EPHEMERAL);
            } catch (Exception e) { }
        } else {
            mode = getCreateMode(ctx.exchange.getIn(), CreateMode.EPHEMERAL);
        }
        create.setCreateMode(mode == null ? CreateMode.EPHEMERAL : mode);
        create.setData(ctx.payload);
        return create.get();
    }
View Full Code Here

Examples of org.apache.camel.component.zookeeper.operations.CreateOperation

            }
        }
    }

    private OperationResult<String> createNode(ProductionContext ctx) throws Exception {
        CreateOperation create = new CreateOperation(ctx.connection, ctx.node);
        create.setPermissions(getAclListFromMessage(ctx.exchange.getIn()));
       
        CreateMode mode = null;
        String modeString = configuration.getCreateMode();
        if (modeString != null) {
            try {
                mode = getCreateModeFromString(modeString, CreateMode.EPHEMERAL);
            } catch (Exception e) { }
        } else {
            mode = getCreateMode(ctx.exchange.getIn(), CreateMode.EPHEMERAL);
        }
        create.setCreateMode(mode == null ? CreateMode.EPHEMERAL : mode);
        create.setData(ctx.payload);
        return create.get();
    }
View Full Code Here

Examples of org.apache.camel.component.zookeeper.operations.CreateOperation

            }
        }
    }
   
    private OperationResult<String> createNode(ProductionContext ctx) throws Exception {
        CreateOperation create = new CreateOperation(ctx.connection, ctx.node);
        create.setPermissions(getAclListFromMessage(ctx.exchange.getIn()));
       
        CreateMode mode = null;
        String modeString = configuration.getCreateMode();
        if (modeString != null) {
            try {
                mode = getCreateModeFromString(modeString, CreateMode.EPHEMERAL);
            } catch (Exception e) { }
        } else {
            mode = getCreateMode(ctx.exchange.getIn(), CreateMode.EPHEMERAL);
        }
        create.setCreateMode(mode == null ? CreateMode.EPHEMERAL : mode);
        create.setData(ctx.payload);
        return create.get();
    }
View Full Code Here

Examples of org.apache.camel.component.zookeeper.operations.CreateOperation

            }
        }
    }
   
    private OperationResult<String> createNode(ProductionContext ctx) throws Exception {
        CreateOperation create = new CreateOperation(ctx.connection, ctx.node);
        create.setPermissions(getAclListFromMessage(ctx.exchange.getIn()));
       
        CreateMode mode = null;
        String modeString = configuration.getCreateMode();
        if (modeString != null) {
            try {
                mode = getCreateModeFromString(modeString, CreateMode.EPHEMERAL);
            } catch (Exception e) { }
        } else {
            mode = getCreateMode(ctx.exchange.getIn(), CreateMode.EPHEMERAL);
        }
        create.setCreateMode(mode == null ? CreateMode.EPHEMERAL : mode);
        create.setData(ctx.payload);
        return create.get();
    }
View Full Code Here

Examples of org.apache.camel.component.zookeeper.operations.CreateOperation

            }
        }
    }
   
    private OperationResult<String> createNode(ProductionContext ctx) throws Exception {
        CreateOperation create = new CreateOperation(ctx.connection, ctx.node);
        create.setPermissions(getAclListFromMessage(ctx.exchange.getIn()));
       
        CreateMode mode = null;
        String modeString = configuration.getCreateMode();
        if (modeString != null) {
            try {
                mode = getCreateModeFromString(modeString, CreateMode.EPHEMERAL);
            } catch (Exception e) { }
        } else {
            mode = getCreateMode(ctx.exchange.getIn(), CreateMode.EPHEMERAL);
        }
        create.setCreateMode(mode == null ? CreateMode.EPHEMERAL : mode);
        create.setData(ctx.payload);
        return create.get();
    }
View Full Code Here

Examples of org.eclipse.rap.rwt.internal.protocol.Operation.CreateOperation

    TestMessage protocolMessage = Fixture.getProtocolMessage();
    int operationCount = protocolMessage.getOperationCount();
    for( int i = 0; i < operationCount; i++ ) {
      Operation operation = protocolMessage.getOperation( i );
      if( operation instanceof CreateOperation ) {
        CreateOperation create = ( CreateOperation )operation;
        if( create.getType().equals( type ) ) {
          found = true;
        }
      }
    }
    return found;
View Full Code Here

Examples of org.eclipse.rap.rwt.internal.protocol.Operation.CreateOperation

    TestMessage protocolMessage = Fixture.getProtocolMessage();
    int operationCount = protocolMessage.getOperationCount();
    for( int i = 0; i < operationCount; i++ ) {
      Operation operation = protocolMessage.getOperation( i );
      if( operation instanceof CreateOperation ) {
        CreateOperation create = ( CreateOperation )operation;
        if( create.getType().equals( type ) && create.getProperties().get( "parent" ).asString().equals( parentId ) ) {
          found = true;
        }
      }
    }
    return found;
View Full Code Here

Examples of org.eclipse.rap.rwt.internal.protocol.Operation.CreateOperation

  }

  public static boolean hasOperation( String target, OperationType type, String operationName ) {
    TestMessage message = Fixture.getProtocolMessage();
    if( type == OperationType.CREATE ) {
      CreateOperation operation = message.findCreateOperation( target );
      if( operation != null ) {
        return true;
      }
    } else if( type == OperationType.CALL ) {
      CallOperation operation = message.findCallOperation( target, operationName );
View Full Code Here

Examples of org.eclipse.rap.rwt.internal.protocol.Operation.CreateOperation

  }

  public static JsonObject getOperationProperties( String target, OperationType type, String operationName ) {
    TestMessage message = Fixture.getProtocolMessage();
    if( type == OperationType.CREATE ) {
      CreateOperation operation = message.findCreateOperation( target );
      if( operation != null ) {
        return operation.getProperties();
      }
    } else if( type == OperationType.CALL ) {
      CallOperation operation = message.findCallOperation( target, operationName );
      if( operation != null ) {
        return operation.getParameters();
      }
    } else if( type == OperationType.SET ) {
      SetOperation operation = findSetOperation( message, target );
      if( operation != null ) {
        return operation.getProperties();
      }
    } else if( type == OperationType.LISTEN ) {
      ListenOperation operation = findListenOperation( message, target );
      if( operation != null ) {
        return operation.getProperties();
      }
    }
    return new JsonObject();
  }
View Full Code Here

Examples of org.structr.web.diff.CreateOperation

      // check for deleted nodes ignoring Page nodes
      if (!hashMappedExistingNodes.containsKey(newHash) && !(newNode instanceof Page)) {

        final DOMNode newParent  = newNode.getProperty(DOMNode.parent);

        changeSet.add(new CreateOperation(hashMappedExistingNodes, getHashOrNull(newParent), getSiblingHashes(newNode), newNode, depthMappedNewNodes.get(newNode)));
      }
    }

    // compare all new nodes with all existing nodes
    for (final Map.Entry<String, DOMNode> newNodeEntry : indexMappedNewNodes.entrySet()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.