@Override protected Object[] convertDataToObject(IOperationBean data) { Object[] object = new Object[5]; object[0] = data.getName(); object[1] = data.getMessageIn(); object[2] = data.getMessageOut(); object[3] = data.getErrors(); object[4] = data.getWsdlImplementationRef(); return object; }
@Override public void visitOperation(IOperationBean op) { if(op.getId().equals(this.id) && bean==null){bean = op;} } @Override
@Override protected boolean isValid(IOperationBean data) { if (data.getName()!=null && data.getName().equals("")==false && data.getMessageIn()!=null && data.getMessageOut()!=null){ return true; } return false; }
public Set<IMessageBean> getMessages() { Set<IMessageBean> res = new HashSet<IMessageBean>(); for (IOperationBean op : getOperations()) { res.add(op.getMessageIn()); if (op.getMessageOut() != null) { res.add(op.getMessageOut()); } } return res; }
private Operation buildOperation(IOperationBean opBean){ Operation op = newInstance(Operation.class); setDocumentationAndExtensions(op, opBean); op.setName(opBean.getName()); op.setId(opBean.getId()); if(opBean.getWsdlImplementationRef()!=null && !opBean.getWsdlImplementationRef().isEmpty()) { op.setImplementationRef(getQNameFromString(opBean.getWsdlImplementationRef())); } return op; }
this.visitOperation(op); IMessageBean msg = op.getMessageIn(); this.visitOperationMessageIn(msg,op); msg = op.getMessageOut(); if(msg!=null){ this.visitOperationMessageOut(msg,op); if(op.getErrors()!=null){ for(IErrorBean mb : op.getErrors()){ this.visitOperationError(mb,op);
public IOperationBean getOperationByName(String name) { for (IInterfaceBean itf : interfaces) { for (IOperationBean op : itf.getOperations()) { if (op.getName().equals(name)) { return op; } } } return null; }
@Override protected void bind(Record record, IOperationBean value) { value.setName(record.getAsString(Operation.name.toString())); value.setMessageIn((IMessageBean) record.getAsObject(Operation.inMessage.toString())); value.setMessageOut((IMessageBean)record.getAsObject(Operation.outMessage.toString())); // value.setErrors(record); // value.setWsdlImplementationRef(ref); }
private void validate(IOperationBean operationBean){ //check if operation is ok, if yes, add it to interface if (operationBean.getName()!=null && operationBean.getName().equals("")==false && operationBean.getMessageIn()!=null && operationBean.getMessageOut()!=null){ if (actualInterface.getOperations().contains(operationBean)==false) actualInterface.addOperation(operationBean); //if interface is ok if (actualInterface.getName()!=null && actualInterface.getName().equals("")==false ){ //add interface to definitions interfaceController.fireEvent(new AddInterfaceEvent(actualInterface)); } } }
public IMessageBean getMessageByName(String name) { for (IInterfaceBean itf : interfaces) { for (IOperationBean op : itf.getOperations()) { if (op.getMessageIn().getName().equals(name)) { return op.getMessageIn(); } if (op.getMessageOut() != null && op.getMessageOut().getName().equals(name)) { return op.getMessageOut(); } } } return null; }
public IOperationBean getOperationById(String id) { for(IOperationBean op : operations){ if(op.getId().equals(id)){ return op; } } return null; } ////////////////////////////////////////////