001// license-header java merge-point 002// 003// Attention: generated code (by Metafacade.vsl) - do not modify! 004// 005package org.andromda.cartridges.webservice.metafacades; 006 007import java.util.Collection; 008import org.andromda.metafacades.uml.Service; 009import org.andromda.metafacades.uml.TypeMappings; 010 011/** 012 * Represents a web service. 013 * 014 * Metafacade interface to be used by AndroMDA cartridges. 015 */ 016public interface WebService 017 extends Service 018{ 019 /** 020 * Indicates the metafacade type (used for metafacade mappings). 021 * 022 * @return boolean always <code>true</code> 023 */ 024 public boolean isWebServiceMetaType(); 025 026 /** 027 * Creates a space delimited string containing a name of ALL allowed methods. 028 * @return String 029 */ 030 public String getAllowedMethods(); 031 032 /** 033 * The collection of exceptions from all allowed operations present in this webservice. 034 * @return Collection<WSDLType> 035 */ 036 public Collection<WSDLType> getAllowedOperationExceptions(); 037 038 /** 039 * All operations which are exposed on the web service. 040 * @return Collection<WebServiceOperation> 041 */ 042 public Collection<WebServiceOperation> getAllowedOperations(); 043 044 /** 045 * The home interface name for an EJB provider. 046 * @return String 047 */ 048 public String getEjbHomeInterface(); 049 050 /** 051 * The interface name for an EJB provider. 052 * @return String 053 */ 054 public String getEjbInterface(); 055 056 /** 057 * The JNDI name for the EJB provider (the EJB that provides the functionality behind this web 058 * service). 059 * @return String 060 */ 061 public String getEjbJndiName(); 062 063 /** 064 * The fully qualified name of the test implementation class for this web service. 065 * @return String 066 */ 067 public String getFullyQualifiedTestImplementationName(); 068 069 /** 070 * The fully qualified name of a test generated for this web service. 071 * @return String 072 */ 073 public String getFullyQualifiedTestName(); 074 075 /** 076 * Number of REST JAX-RS service methods in this class. If WebService stereotype rest value is 077 * true, all methods are REST methods, otherwise this is the count of exposed 078 * WebServiceOperations with rest value set to true. This is the only required configuration for 079 * implementing REST services, the rest use intelligent defaults which can be overridden. 080 * @return int 081 */ 082 public int getJaxwsCount(); 083 084 /** 085 * The name of the namespace to which this web service belongs. 086 * @return String 087 */ 088 public String getNamespace(); 089 090 /** 091 * The namespace prefix used for types defined within the generated WSDLs. 092 * @return String 093 */ 094 public String getNamespacePrefix(); 095 096 /** 097 * TODO: Model Documentation for 098 * org.andromda.cartridges.webservice.metafacades.WebService.getPackageReferences 099 * @param packageName String 100 * @param follow boolean 101 * @return Collection 102 */ 103 public Collection getPackageReferences(String packageName, boolean follow); 104 105 /** 106 * The provider for this web service. Provider is something like: 'java:RPC', or 'java:EJB' etc. 107 * @return String 108 */ 109 public String getProvider(); 110 111 /** 112 * The QName for this service. Usually it will be the same name as the model element, however 113 * it is possible to specify a prefix to give to this name. 114 * @return String 115 */ 116 public String getQName(); 117 118 /** 119 * Specified CacheType (none, always, etc) in @CacheType annotation. 120 * @return String 121 */ 122 public String getRestCacheType(); 123 124 /** 125 * @Consumes(media type) annotation. i.e. json, atom, plain/text, xml. 126 * @return String 127 */ 128 public String getRestConsumes(); 129 130 /** 131 * Context used for REST JAX-WS implementation for this service. 132 * @return Collection<String> 133 */ 134 public Collection<String> getRestContexts(); 135 136 /** 137 * Number of REST JAX-RS service methods in this class. If WebService stereotype rest value is 138 * true, all methods are REST methods, otherwise this is the count of exposed 139 * WebServiceOperations with rest value set to true. This is the only required configuration for 140 * implementing REST services, the rest use intelligent defaults which can be overridden. 141 * @return int 142 */ 143 public int getRestCount(); 144 145 /** 146 * Customized Http Method implementation. 147 * @return String 148 */ 149 public String getRestMethod(); 150 151 /** 152 * The URL path for the REST webservice. If unspecified, the lowercase /classname/ is used. 153 * @return String 154 */ 155 public String getRestPath(); 156 157 /** 158 * @Produces(media type) annotation. i.e. json, atom, plain/text, xml. 159 * @return String 160 */ 161 public String getRestProduces(); 162 163 /** 164 * Customized REST @Provider annotation, must be implemented in the generated class. 165 * @return String 166 */ 167 public String getRestProvider(); 168 169 /** 170 * Customized RetentionPolicy (default=RUNTIME). 171 * @return String 172 */ 173 public String getRestRetention(); 174 175 /** 176 * Customized target ElementType, default=METHOD. 177 * @return String 178 */ 179 public String getRestTarget(); 180 181 /** 182 * The name of the RPC implementation class. 183 * @return String 184 */ 185 public String getRpcClassName(); 186 187 /** 188 * TODO: Model Documentation for 189 * org.andromda.cartridges.webservice.metafacades.WebService.getSchemaMappings 190 * @return TypeMappings 191 */ 192 public TypeMappings getSchemaMappings(); 193 194 /** 195 * The style of binding in the generated WSDL, either DOCUMENT, RPC, or WRAPPED. 196 * @return String 197 */ 198 public String getStyle(); 199 200 /** 201 * The name for the test implementation class. 202 * @return String 203 */ 204 public String getTestImplementationName(); 205 206 /** 207 * The name of a the test for this web service. 208 * @return String 209 */ 210 public String getTestName(); 211 212 /** 213 * The name of the package to which tests are generated. 214 * @return String 215 */ 216 public String getTestPackageName(); 217 218 /** 219 * Returns a collection of all type mappings used by this WebServiceFacade. This consists of 220 * all complex types that the service may take in as a parameter in an operation or returns and 221 * exceptions that this web service throws. 222 * @return Collection 223 */ 224 public Collection getTypeMappingElements(); 225 226 /** 227 * The use of items in the binding, either LITERAL or ENCODED. 228 * @return String 229 */ 230 public String getUse(); 231 232 /** 233 * The location of the WSDL file for this web service. 234 * @return String 235 */ 236 public String getWsdlFile(); 237 238 /** 239 * Override global default XJC arguments for Jaxb wsdl2java (i.e. add Collection setters, 240 * equals, toString methods). 241 * @return String 242 */ 243 public String getXjcArguments(); 244 245 /** 246 * Indicates whether or not this service is "document" style. 247 * @return boolean 248 */ 249 public boolean isDocumentStyle(); 250 251 /** 252 * Indicates whether or not this web service has a "encoded" use defined. 253 * @return boolean 254 */ 255 public boolean isEncodedUse(); 256 257 /** 258 * Indicates whether or not this web service has a "literal" use defined. 259 * @return boolean 260 */ 261 public boolean isLiteralUse(); 262 263 /** 264 * If this REST service provides application/atom, or any service operations provide 265 * application/atom 266 * @return boolean 267 */ 268 public boolean isRestAtom(); 269 270 /** 271 * Indicates whether or not this service is "rpc" style. 272 * @return boolean 273 */ 274 public boolean isRpcStyle(); 275 276 /** 277 * Validate incoming webservice XML against wsdl/xsd schema 278 * @return boolean 279 */ 280 public boolean isSchemaValidation(); 281 282 /** 283 * Whether or not this web service is secured (its based on whether or not it has any roles 284 * associated to it). 285 * @return boolean 286 */ 287 public boolean isSecured(); 288 289 /** 290 * Use Jaxb2 XJC simple binding mode 291 * @return boolean 292 */ 293 public boolean isSimpleBindingMode(); 294 295 /** 296 * Indicates whether or not this service style is "wrapped". 297 * @return boolean 298 */ 299 public boolean isWrappedStyle(); 300}