@Override protected void onGrdVMPSelectionChanged() throws ims.framework.exceptions.PresentationLogicException { form.grdVTM().getRows().clear(); form.grdAMP().getRows().clear(); try { IDMDValue vmp = form.grdVMP().getValue(); VTMRefVo vtmRef = ((VMPVo)vmp).getVTM(); if(vtmRef != null) { addVTMItem(domain.getVTM(vtmRef)); } populateAMPValues(domain.searchAMP(form.grdVMP().getValue())); } catch (DomainInterfaceException e) { engine.showMessage(e.getMessage(), "Error", MessageButtons.OK, MessageIcon.ERROR); } form.fireCustomControlValueChanged(); }
@Override protected void onGrdAMPSelectionChanged() throws ims.framework.exceptions.PresentationLogicException { form.grdVTM().getRows().clear(); form.grdVMP().getRows().clear(); try { IDMDValue amp = form.grdAMP().getValue(); VMPRefVo vmpRef = ((AMPVo)amp).getVMP(); if(vmpRef != null) { VMPVo vmp = domain.getVMP(((AMPVo)amp).getVMP()); if(vmp != null) { addVMPItem(vmp); if (vmp.getVTM() != null) //VTMID is optional SN. addVTMItem(domain.getVTM(vmp.getVTM())); } } } catch (DomainInterfaceException e) { engine.showMessage(e.getMessage(), "Error", MessageButtons.OK, MessageIcon.ERROR); } form.fireCustomControlValueChanged(); }
public VMPVo getVMP() { if(form.grdVMP().getValue() != null) return (VMPVo)form.grdVMP().getValue(); else if(form.grdVMP().getRows().size() > 0) return (VMPVo)form.grdVMP().getRows().get(0).getValue(); return null; }
public VMPVo getVMP(VMPRefVo vmp) throws DomainInterfaceException { if(vmp == null || vmp.getBoId() == null) throw new DomainInterfaceException("Invalid VMP reference"); return VMPVoAssembler.create((VMP)getDomainFactory().getDomainObject(vmp)); }
public void characters(char[] ch, int start, int length) throws SAXException { String value = new String( ch , start , length ); if(!value.trim().equals("")) { if( currentElement.equalsIgnoreCase("APID") ) { amp.setProductIdentifier(value); } else if( currentElement.equalsIgnoreCase("DESC") ) { amp.setName(value); } else if( currentElement.equalsIgnoreCase("VPID") ) { try { VMPVo ampVo = domainDMD.getVMP(value); if (ampVo != null) amp.setVMP(ampVo.toVMPRefVo()); } catch (DomainInterfaceException e) { logAMPLoadError(e.getMessage()); loadErrors=true; } } else if( currentElement.equalsIgnoreCase("INVALID") ) { if (value.equalsIgnoreCase("1")) amp.setInvalid(true); else amp.setInvalid(false); } } currentElement=""; }
public VMPVo getVMP(String vmpId) throws DomainInterfaceException { if(vmpId == null) throw new DomainInterfaceException("Invalid VMP reference"); VMPVoCollection vmpCol = VMPVoAssembler.createVMPVoCollectionFromVMP(getDomainFactory().find("from VMP vm WHERE vm.productIdentifier = '" + vmpId + "'")); if (vmpCol != null && vmpCol.size()>0) return vmpCol.get(0); else return null; }
public VMPVo getVMP() { return form.ccDMD().getVMP(); }
public VMPLoader() { super(); vmp = new VMPVo(); }