*/
public final Response executeCommand(Object inputPar,UserSessionParameters userSessionPars,HttpServletRequest request, HttpServletResponse response,HttpSession userSession,ServletContext context) {
try {
// create VariantsMatrixVO v.o.
VariantsItemDescriptor itemVO = (VariantsItemDescriptor)inputPar;
LoadProductVariantsMatrix bean = (LoadProductVariantsMatrix)JAIOBeanFactory.getInstance().getBean(LoadProductVariantsMatrix.class);
if (itemVO instanceof DetailItemVO)
return new VOResponse( bean.getDetailItemVariantsMatrix(
(DetailItemVO)itemVO,
((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
));
else if (itemVO instanceof GridItemVO)
return new VOResponse( bean.getGridItemVariantsMatrix(
(GridItemVO)itemVO,
((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
));
else if (itemVO instanceof SupplierPriceItemVO)
return new VOResponse( bean.getSupplierPriceItemVariantsMatrix(
(SupplierPriceItemVO)itemVO,
((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
));
else if (itemVO instanceof SupplierPriceVO)
return new VOResponse( bean.getSupplierPriceVariantsMatrix(
(SupplierPriceVO)itemVO,
((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
));
else if (itemVO instanceof PriceVO)
return new VOResponse( bean.getPriceVariantsMatrix(
(PriceVO)itemVO,
((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
));
else if (itemVO instanceof PriceItemVO)
return new VOResponse( bean.getPriceItemVariantsMatrix(
(PriceItemVO)itemVO,
((JAIOUserSessionParameters)userSessionPars).getServerLanguageId(),userSessionPars.getUsername()
));
else
return new ErrorResponse("Unsupported class type: "+itemVO.getClass().getName());
}
catch (Throwable ex) {
Logger.error(userSessionPars.getUsername(),this.getClass().getName(),"executeCommand","Error while fetching the variants matrix",ex);