/** * Create an MDEntry group. * * @param inMessageFactory a <code>FIXMessageFactory</code> value * @param inMdEntryType a <code>char</code> value * @return a <code>Group</code> value */ public Group createMdEntryGroup(String inMsgType, char inMdEntryType) { Group newGroup = createGroup(inMsgType, quickfix.field.NoMDEntries.FIELD); newGroup.setField(new quickfix.field.MDEntryType(inMdEntryType)); return newGroup; } /**
/** * Populate the MDEntry given group with the given date time value. * * @param inGroup a <code>Group</code> value * @param inDateTime a <code>DateTime</code> value */ public void populateMdEntryGroupWithDateTime(Group inGroup, DateTime inDateTime) { if(inDateTime == null) { return; } // TODO the time doesn't seem quite right inGroup.setField(new quickfix.field.MDEntryDate(inDateTime.minusMillis(inDateTime.getMillisOfDay()).toDate())); inGroup.setField(new quickfix.field.MDEntryTime(inDateTime.minusYears(inDateTime.getYear()).minusDays(inDateTime.getDayOfYear()).toDate())); } /**
/** * Add an MDEntry to the given message with the given type. * * @param inMarketDataRequest a <code>Message</code> value * @param inMdEntryType a <code>char</code> value * @param inCurrentContentCount an <code>int</code> value * @return an <code>int</code> value * @throws FieldNotFound if the given message is invalid */ private int addMdEntry(Message inMarketDataRequest, char inMdEntryType, int inCurrentContentCount) throws FieldNotFound { Group newGroup = msgFactory.create(beginString, inMarketDataRequest.getHeader().getString(quickfix.field.MsgType.FIELD), quickfix.field.NoMDEntryTypes.FIELD); newGroup.setField(new quickfix.field.MDEntryType(inMdEntryType)); inMarketDataRequest.addGroup(newGroup); return inCurrentContentCount + 1; } /**
private boolean checkFieldValidation(FieldMap parent, DataDictionary parentDD, StringField field, String msgType, boolean doValidation, Group group) throws FieldException { boolean isField = (parent instanceof Group) ? parentDD.isField(field.getTag()) : parentDD.isMsgField(msgType, field.getTag()); if (!isField) { if (doValidation) { boolean fail = parentDD.checkFieldFailure(field.getTag(), false); if (fail) { throw new FieldException(SessionRejectReason.TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE, field.getTag()); } } group.setField(field); return true; } return false; }
private boolean checkFieldValidation(FieldMap parent, DataDictionary parentDD, StringField field, String msgType, boolean doValidation, Group group) throws FieldException { boolean isField = (parent instanceof Group) ? parentDD.isField(field.getTag()) : parentDD.isMsgField(msgType, field.getTag()); if (!isField) { if (doValidation) { boolean fail = parentDD.checkFieldFailure(field.getTag(), false); if (fail) { throw new FieldException(SessionRejectReason.TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE, field.getTag()); } } group.setField(field); return true; } return false; }
private boolean checkFieldValidation(FieldMap parent, DataDictionary parentDD, StringField field, String msgType, boolean doValidation, Group group) throws FieldException { boolean isField = (parent instanceof Group) ? parentDD.isField(field.getTag()) : parentDD.isMsgField(msgType, field.getTag()); if (!isField) { if (doValidation) { boolean fail = parentDD.checkFieldFailure(field.getTag(), false); if (fail) { throw new FieldException(SessionRejectReason.TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE, field.getTag()); } } group.setField(field); return true; } return false; }
addGroupRefToParent(group, parent); group = new Group(groupCountTag, firstField, groupDataDictionary.getOrderedFields()); group.setField(field); firstFieldFound = true; previousOffset = -1; if (offset <= previousOffset) { group.setField(field); addGroupRefToParent(group, parent); throw new FieldException( group.setField(field); } else {
addGroupRefToParent(group, parent); group = new Group(groupCountTag, firstField, groupDataDictionary.getOrderedFields()); group.setField(field); firstFieldFound = true; previousOffset = -1; if (offset <= previousOffset) { group.setField(field); addGroupRefToParent(group, parent); throw new FieldException( group.setField(field); } else {
addGroupRefToParent(group, parent); group = new Group(groupCountTag, firstField, groupDataDictionary.getOrderedFields()); group.setField(field); firstFieldFound = true; previousOffset = -1; if (offset <= previousOffset) { group.setField(field); addGroupRefToParent(group, parent); throw new FieldException( group.setField(field); } else {
symbolGroup.removeField(quickfix.field.OrdType.FIELD); if(inExchange != null && !inExchange.isEmpty()) { symbolGroup.setField(new quickfix.field.SecurityExchange(inExchange));