if (role.equals("seller")) {
ItemRatingDetailArrayType sellerItemRatingDetailArray = new ItemRatingDetailArrayType();
//The item description
ItemRatingDetailsType itemRatingDetailsType1 = new ItemRatingDetailsType();
int ratingItemValue = 0;
if (UtilValidate.isInteger(ratingItem)) {
ratingItemValue = Integer.parseInt(ratingItem);
}
if (ratingItemValue < 3) {
/*
String AqItemAsDescribed = null;
int AqItemAsDescribedId = Integer.parseInt((String) context.get("AqItemAsDescribedId"));
switch (AqItemAsDescribedId) {
case 5:
AqItemAsDescribed = "ItemNotReceived";
break;
case 6:
AqItemAsDescribed = "ItemBadQuality";
break;
case 2:
AqItemAsDescribed = "ItemDamaged";
break;
case 1:
AqItemAsDescribed = "ItemIneligible";
break;
case 3:
AqItemAsDescribed = "ItemLost";
break;
default:
AqItemAsDescribed = "Other";
break;
}
*/
}
itemRatingDetailsType1.setRating(ratingItemValue);
itemRatingDetailsType1.setRatingDetail(FeedbackRatingDetailCodeType.ITEM_AS_DESCRIBED);
//The seller's communication
ItemRatingDetailsType itemRatingDetailsType2 = new ItemRatingDetailsType();
int ratingCommValue = 0;
if (UtilValidate.isInteger(ratingComm)) {
ratingCommValue = Integer.parseInt(ratingComm);
}
itemRatingDetailsType2.setRating(ratingCommValue);
itemRatingDetailsType2.setRatingDetail(FeedbackRatingDetailCodeType.COMMUNICATION);
//the seller ship the item
ItemRatingDetailsType itemRatingDetailsType3 = new ItemRatingDetailsType();
int ratingShipValue = 0;
if (UtilValidate.isInteger(ratingShip)) {
ratingShipValue = Integer.parseInt(ratingShip);
}
itemRatingDetailsType3.setRating(ratingShipValue);
itemRatingDetailsType3.setRatingDetail(FeedbackRatingDetailCodeType.SHIPPING_TIME);
//the shipping and handling charges
ItemRatingDetailsType itemRatingDetailsType4 = new ItemRatingDetailsType();
int ratingShipHandValue = 0;
if (UtilValidate.isInteger(ratingShipHand)) {
ratingShipHandValue = Integer.parseInt(ratingShipHand);
}
itemRatingDetailsType4.setRating(ratingShipHandValue);
itemRatingDetailsType4.setRatingDetail(FeedbackRatingDetailCodeType.SHIPPING_AND_HANDLING_CHARGES);
//Rating Summary
ItemRatingDetailsType[] itemRatingDetailsType = {itemRatingDetailsType1, itemRatingDetailsType2, itemRatingDetailsType3, itemRatingDetailsType4};
sellerItemRatingDetailArray.setItemRatingDetails(itemRatingDetailsType);