public static Variable marshallVariablesMap(MarshallerWriteContext context, Map<String, Object> variables) throws IOException{ Map<String, Variable> marshalledVariables = new HashMap<String, Variable>(); for(String key : variables.keySet()){ JBPMMessages.Variable.Builder builder = JBPMMessages.Variable.newBuilder().setName( key ); if(variables.get(key) != null){ ObjectMarshallingStrategy strategy = context.objectMarshallingStrategyStore.getStrategyObject( variables.get(key) ); Integer index = context.getStrategyIndex( strategy ); builder.setStrategyIndex( index ) .setValue( ByteString.copyFrom( strategy.marshal( context.strategyContext.get( strategy ), context, variables.get(key) ) ) ); } marshalledVariables.put(key, builder.build()); } return marshallVariable(context, "variablesMap" ,marshalledVariables); }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.jbpm.marshalling.impl.JBPMMessages.Variable parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.jbpm.marshalling.impl.JBPMMessages.Variable) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
/** * <code>optional string name = 1;</code> */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; name_ = value; onChanged(); return this; } /**
public org.jbpm.marshalling.impl.JBPMMessages.Variable buildPartial() { org.jbpm.marshalling.impl.JBPMMessages.Variable result = new org.jbpm.marshalling.impl.JBPMMessages.Variable(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.name_ = name_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.strategyIndex_ = strategyIndex_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.value_ = value_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.jbpm.marshalling.impl.JBPMMessages.Variable parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.jbpm.marshalling.impl.JBPMMessages.Variable) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_;
public Builder mergeFrom(org.jbpm.marshalling.impl.JBPMMessages.Variable other) { if (other == org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasStrategyIndex()) { setStrategyIndex(other.getStrategyIndex()); } if (other.hasValue()) { setValue(other.getValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public static VariableContainer marshallVariablesContainer(MarshallerWriteContext context, Map<String, Object> variables) throws IOException{ JBPMMessages.VariableContainer.Builder vcbuilder = JBPMMessages.VariableContainer.newBuilder(); for(String key : variables.keySet()){ JBPMMessages.Variable.Builder builder = JBPMMessages.Variable.newBuilder().setName( key ); if(variables.get(key) != null){ ObjectMarshallingStrategy strategy = context.objectMarshallingStrategyStore.getStrategyObject( variables.get(key) ); Integer index = context.getStrategyIndex( strategy ); builder.setStrategyIndex( index ) .setValue( ByteString.copyFrom( strategy.marshal( context.strategyContext.get( strategy ), context, variables.get(key) ) ) ); } vcbuilder.addVariable(builder.build()); } return vcbuilder.build(); }
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 1;</code> */ public Builder addVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.add(index, builderForValue.build()); onChanged(); } else { variableBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 1;</code> */ public Builder addVariable( org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.add(builderForValue.build()); onChanged(); } else { variableBuilder_.addMessage(builderForValue.build()); } return this; } /**
public static Variable marshallVariablesMap(MarshallerWriteContext context, Map<String, Object> variables) throws IOException{ Map<String, Variable> marshalledVariables = new HashMap<String, Variable>(); for(String key : variables.keySet()){ JBPMMessages.Variable.Builder builder = JBPMMessages.Variable.newBuilder().setName( key ); if(variables.get(key) != null){ ObjectMarshallingStrategy strategy = context.objectMarshallingStrategyStore.getStrategyObject( variables.get(key) ); Integer index = context.getStrategyIndex( strategy ); builder.setStrategyIndex( index ) .setValue( ByteString.copyFrom( strategy.marshal( context.strategyContext.get( strategy ), context, variables.get(key) ) ) ); } marshalledVariables.put(key, builder.build()); } return marshallVariable(context, "variablesMap" ,marshalledVariables); }
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 5;</code> */ public Builder addVariable( org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.add(builderForValue.build()); onChanged(); } else { variableBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 8;</code> */ public Builder addVariable( org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.add(builderForValue.build()); onChanged(); } else { variableBuilder_.addMessage(builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 3;</code> */ public Builder addVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.add(index, builderForValue.build()); onChanged(); } else { variableBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 1;</code> */ public Builder setVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.set(index, builderForValue.build()); onChanged(); } else { variableBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 5;</code> */ public Builder addVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.add(index, builderForValue.build()); onChanged(); } else { variableBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 5;</code> */ public Builder setVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.set(index, builderForValue.build()); onChanged(); } else { variableBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 8;</code> */ public Builder setVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.set(index, builderForValue.build()); onChanged(); } else { variableBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 2;</code> */ public Builder setVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.set(index, builderForValue.build()); onChanged(); } else { variableBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 8;</code> */ public Builder addVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.add(index, builderForValue.build()); onChanged(); } else { variableBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 2;</code> */ public Builder addVariable( int index, org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder builderForValue) { if (variableBuilder_ == null) { ensureVariableIsMutable(); variable_.add(index, builderForValue.build()); onChanged(); } else { variableBuilder_.addMessage(index, builderForValue.build()); } return this; } /**