1 package org.jbpm.bpel.wsdl.impl; 2 3 import javax.wsdl.PortType; 4 5 import org.jbpm.bpel.wsdl.def.PartnerLinkType; 6 import org.jbpm.bpel.wsdl.xml.WsdlConstants; 7 8 16 public class PartnerLinkTypeImpl extends NamedExtension implements PartnerLinkType { 17 18 private static final long serialVersionUID = 1L; 19 20 23 public static class RoleImpl implements Role { 24 25 long id; 26 private String name; 27 private PortType portType; 28 29 private static final long serialVersionUID = 1L; 30 31 34 public String getName() { 35 return name; 36 } 37 38 41 public void setName(String name) { 42 this.name = name; 43 } 44 45 48 public PortType getPortType() { 49 return portType; 50 } 51 52 55 public void setPortType(PortType portType) { 56 this.portType = portType; 57 } 58 } 59 60 private Role firstRole; 61 private Role secondRole; 62 63 66 public PartnerLinkTypeImpl() { 67 setElementType(WsdlConstants.Q_PARTNER_LINK_TYPE); 68 } 69 70 73 public Role getFirstRole() { 74 return firstRole; 75 } 76 77 80 public void setFirstRole(Role firstRole) { 81 this.firstRole = firstRole; 82 } 83 84 87 public Role getSecondRole() { 88 return secondRole; 89 } 90 91 94 public void setSecondRole(Role secondRole) { 95 this.secondRole = secondRole; 96 } 97 98 101 public Role createRole() { 102 return new RoleImpl(); 103 } 104 105 public Role getRole(String roleName) { 106 Role role = null; 107 if (firstRole != null && firstRole.getName().equals(roleName)) 108 role = firstRole; 109 else if (secondRole != null && secondRole.getName().equals(roleName)) 110 role = secondRole; 111 return role; 112 } 113 } 114 | Popular Tags |