FIX.5.0SP2_EP168 Message
PartyEntitlementsReport [type 'CV']
<PtyEntlmntRpt>
The PartyEntitlementsReport is used to report entitlements for one or more parties, party role(s), or specific instrument(s).
Added FIX.5.0SP2 EP129
Expand Components | Collapse Components
| Field or Component | Field Name | FIXML name | Req'd | Comments | Depr. |
Component | StandardHeader | BaseHeader | MsgType=CV | |
Component | ApplicationSequenceControl | ApplSeqCtrl | | | |
1771 | @RptID | | | |||
1770 | @ReqID | | Conditionally required when responding to PartyEntitlementsRequest(35=CU). | | ||
1511 | @ReqRslt | | Conditionally required when responding to Party Entitlements Request. | | ||
1512 | @TotNoPtys | | | | ||
893 | @LastFragment | | | |
Component | PartyEntitlementGrp | PtyEntlmnt | | | |
60 | @TxnTm | | | | ||
58 | Text | @Txt | | | | |
354 | @EncTxtLen | | | | ||
355 | @EncTxt | | | | ||
1328 | @RejTxt | | | | ||
1664 | | | | | ||
1665 | | | | |
Component | StandardTrailer | | | |
消息实现:
package cs.mina.codec.msg;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import cs.mina.exception.InValidDataException;
/*
*@author(huangxiaoping)
*@date 2013-12-2
*/
public class PartyEntitlementReportMsg extends BaseMsg {
private Tag entitlementReportID=new Tag("1771","String",true);
private Tag entitlementRequestID=new Tag("1770","String",false);
private Tag requestResult=new Tag("1511","int",false);
private Tag totNoParties=new Tag("1512","int",false);
private Tag lastFragment=new Tag("893","Boolean",false);
private Tag partyEntitlementGrp=new PartyEntitlementGrpTag(false);
public PartyEntitlementReportMsg(){
this.getHeadEntity().getMsgType().setTagValue("CV");
this.bodyEntity.getBodyTagList().add(entitlementReportID);
this.bodyEntity.getBodyTagList().add(entitlementRequestID);
this.bodyEntity.getBodyTagList().add(requestResult);
this.bodyEntity.getBodyTagList().add(totNoParties);
this.bodyEntity.getBodyTagList().add(lastFragment);
this.bodyEntity.getBodyTagList().add(partyEntitlementGrp);
}
@Override
public void decodeBody() {
Set<String> already=new HashSet<String>();
String input=this.body;
while(input.length()!=0){
String firstTagId=input.substring(0, input.indexOf("="));
if(firstTagId.equals("1772")){
input=this.getPartyEntitlementGrp().decode(input, already);
}else{
List<Tag> tagList=this.bodyEntity.getBodyTagList();
boolean exist=false;
for(int j=0;j<tagList.size();j++){
Tag tag=tagList.get(j);
if(tag.getTagId().equals(firstTagId)){
input=tag.decode(input, already);
exist=true;
break;
}
}
if(!exist){
throw new InValidDataException(firstTagId+"不在消息字段中");
}
}
}
}
@Override
public void validate() {
this.headEntity.validate();
List<Tag> bodyTagList = this.bodyEntity.getBodyTagList();
for (int i = 0; i < bodyTagList.size(); i++) {
bodyTagList.get(i).validate();
}
this.tailerEntity.validate();
if(requestResult.getTagValue()!=null){
if(!(Integer.parseInt(requestResult.getTagValue())>=0
&&Integer.parseInt(requestResult.getTagValue())<=5
||Integer.parseInt(requestResult.getTagValue())==99)){
throw new InValidDataException("requestResult错误["
+ requestResult.getTagId() + "=" + requestResult.getTagValue()
+ "]");
}
}
}
public Tag getEntitlementReportID() {
return entitlementReportID;
}
public void setEntitlementReportID(Tag entitlementReportID) {
this.entitlementReportID = entitlementReportID;
}
public Tag getEntitlementRequestID() {
return entitlementRequestID;
}
public void setEntitlementRequestID(Tag entitlementRequestID) {
this.entitlementRequestID = entitlementRequestID;
}
public Tag getRequestResult() {
return requestResult;
}
public void setRequestResult(Tag requestResult) {
this.requestResult = requestResult;
}
public Tag getTotNoParties() {
return totNoParties;
}
public void setTotNoParties(Tag totNoParties) {
this.totNoParties = totNoParties;
}
public Tag getLastFragment() {
return lastFragment;
}
public void setLastFragment(Tag lastFragment) {
this.lastFragment = lastFragment;
}
public Tag getPartyEntitlementGrp() {
return partyEntitlementGrp;
}
public void setPartyEntitlementGrp(Tag partyEntitlementGrp) {
this.partyEntitlementGrp = partyEntitlementGrp;
}
}
处理逻辑:略