Module: Muml_Component

Defined in:
lib/ontomde-java/java/component.rb

Instance Method Summary collapse

Instance Method Details

#java_processComponent!Object



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/ontomde-java/java/component.rb', line 108

def java_processComponent!
    #    if umlx_isStatelessComponent?
    #      java_annotation_add("@javax.ejb.Stateless")
    #      java_annotation_add("@javax.jws.WebService")
    #    else
    #      java_annotation_add("@javax.ejb.Statefull")
    #    end
java_annotation_add("@javax.jws.WebService")

uml_ownedOperation.each { |op|
op.java_annotation_add("@javax.jws.WebMethod")
op.uml_ownedParameter.each{|p|
next if p.uml_direction_one==Cuml_ParameterDirectionKind::Return
p.java_annotation_add("@javax.jws.WebParam(name=\"#{p.java_Name}\")")
}
}

end

#umlx_isStatelessComponent?Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/ontomde-java/java/component.rb', line 87

def umlx_isStatelessComponent?
  return uml_ownedAttribute.empty?
end

#writeJWSConfigObject



91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/ontomde-java/java/component.rb', line 91

def writeJWSConfig
  write <<CONFIG
  <!-- Service endpoint -->
  <bean id="#{self.java_Name}" class="#{self.java_qualifiedName}"/>
  <jaxws:endpoint id="#{self.java_Name}EndPoint"
          implementorClass="#{self.java_qualifiedName}"
          implementor="##{self.java_Name}"
          address="/#{self.java_Name}">
      <jaxws:serviceFactory>
          <ref bean="jaxws-and-aegis-service-factory"/>
      </jaxws:serviceFactory>
  </jaxws:endpoint>    
CONFIG
end