@SuppressWarnings({ "unchecked", "rawtypes" }) private static Object fallbackParse(MarshallerReaderContext context, Header header, ExtensionRegistry registry) throws Exception { Variable parseFrom = JBPMMessages.Variable.parseFrom(header.getPayload(), registry); Object value = ProtobufProcessMarshaller.unmarshallVariableValue(context, parseFrom); if (value instanceof Map) { Map result = new HashMap(); Map<String, Variable> variablesMap = (Map<String, Variable>) value; for (String key : variablesMap.keySet()) { result.put(key, ProtobufProcessMarshaller.unmarshallVariableValue(context, variablesMap.get(key))); } return result; } return value; } }
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 1;</code> */ public org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder addVariableBuilder( int index) { return getVariableFieldBuilder().addBuilder( index, org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance()); } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasStrategyIndex()) { hash = (37 * hash) + STRATEGY_INDEX_FIELD_NUMBER; hash = (53 * hash) + getStrategyIndex(); } if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
try { Object _value = ProtobufProcessMarshaller.unmarshallVariableValue( context, _variable ); variableScopeInstance.internalSetVariable( _variable.getName(), _value ); } catch ( ClassNotFoundException e ) { throw new IllegalArgumentException( "Could not reload variable " + _variable.getName() ); try { Object _value = ProtobufProcessMarshaller.unmarshallVariableValue( context, _variable ); variableScopeInstance.internalSetVariable( _variable.getName(), _value ); } catch ( ClassNotFoundException e ) { throw new IllegalArgumentException( "Could not reload variable " + _variable.getName() ); try { Object _value = ProtobufProcessMarshaller.unmarshallVariableValue( context, _variable ); variableScopeInstance.internalSetVariable( _variable.getName(), _value ); } catch ( ClassNotFoundException e ) { throw new IllegalArgumentException( "Could not reload variable " + _variable.getName() );
Variable parseFrom = JBPMMessages.Variable.parseFrom(_header.getPayload(), registry); Object value = ProtobufProcessMarshaller.unmarshallVariableValue(context, parseFrom);
public static WorkItem readWorkItem(MarshallerReaderContext context, JBPMMessages.WorkItem _workItem, boolean includeVariables) throws IOException { WorkItemImpl workItem = new WorkItemImpl(); workItem.setId( _workItem.getId() ); workItem.setProcessInstanceId( _workItem.getProcessInstancesId() ); workItem.setName( _workItem.getName() ); workItem.setState( _workItem.getState() ); workItem.setDeploymentId(_workItem.getDeploymentId()); workItem.setNodeId(_workItem.getNodeId()); workItem.setNodeInstanceId(_workItem.getNodeInstanceId()); if ( includeVariables ) { for ( JBPMMessages.Variable _variable : _workItem.getVariableList() ) { try { Object value = unmarshallVariableValue( context, _variable ); workItem.setParameter( _variable.getName(), value ); } catch ( ClassNotFoundException e ) { throw new IllegalArgumentException( "Could not reload parameter " + _variable.getName() + " for work item " + _workItem ); } } } return workItem; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.jbpm.marshalling.impl.JBPMMessages.Variable)) { return super.equals(obj); } org.jbpm.marshalling.impl.JBPMMessages.Variable other = (org.jbpm.marshalling.impl.JBPMMessages.Variable) obj; boolean result = true; result = result && (hasName() == other.hasName()); if (hasName()) { result = result && getName() .equals(other.getName()); } result = result && (hasStrategyIndex() == other.hasStrategyIndex()); if (hasStrategyIndex()) { result = result && (getStrategyIndex() == other.getStrategyIndex()); } result = result && (hasValue() == other.hasValue()); if (hasValue()) { result = result && getValue() .equals(other.getValue()); } result = result && unknownFields.equals(other.unknownFields); return result; }
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; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasStrategyIndex()) { hash = (37 * hash) + STRATEGY_INDEX_FIELD_NUMBER; hash = (53 * hash) + getStrategyIndex(); } if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
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 Map<String, Object> unmarshallVariableContainerValue(MarshallerReaderContext context, JBPMMessages.VariableContainer _variableContiner) throws IOException, ClassNotFoundException { Map<String, Object> variables = new HashMap<String, Object>(); if (_variableContiner.getVariableCount() == 0) { return variables; } for (Variable _variable : _variableContiner.getVariableList()) { Object value = ProtobufProcessMarshaller.unmarshallVariableValue(context, _variable); variables.put(_variable.getName(), value); } return variables; }
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 1;</code> */ public org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder addVariableBuilder( int index) { return getVariableFieldBuilder().addBuilder( index, org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance()); } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 2;</code> */ public org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder addVariableBuilder( int index) { return getVariableFieldBuilder().addBuilder( index, org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance()); } /**
public org.jbpm.marshalling.impl.JBPMMessages.Variable getDefaultInstanceForType() { return org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance(); }
public static Object unmarshallVariableValue(MarshallerReaderContext context, JBPMMessages.Variable _variable) throws IOException, ClassNotFoundException { if(_variable.getValue() == null || _variable.getValue().isEmpty()){ return null; } ObjectMarshallingStrategy strategy = context.usedStrategies.get( _variable.getStrategyIndex() ); Object value = strategy.unmarshal( context.strategyContexts.get( strategy ), context, _variable.getValue().toByteArray(), (context.kBase == null)?null:context.kBase.getRootClassLoader() ); return value; }
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 5;</code> */ public org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder addVariableBuilder( int index) { return getVariableFieldBuilder().addBuilder( index, org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance()); } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 5;</code> */ public org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder addVariableBuilder() { return getVariableFieldBuilder().addBuilder( org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance()); } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 8;</code> */ public org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder addVariableBuilder( int index) { return getVariableFieldBuilder().addBuilder( index, org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance()); } /**
/** * <code>repeated .org.jbpm.marshalling.Variable variable = 3;</code> */ public org.jbpm.marshalling.impl.JBPMMessages.Variable.Builder addVariableBuilder( int index) { return getVariableFieldBuilder().addBuilder( index, org.jbpm.marshalling.impl.JBPMMessages.Variable.getDefaultInstance()); } /**