org.codehaus.enunciate.contract.jaxws
Class EndpointInterface

java.lang.Object
  extended by net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
      extended by net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration
          extended by net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration
              extended by org.codehaus.enunciate.contract.jaxws.EndpointInterface
All Implemented Interfaces:
com.sun.mirror.declaration.Declaration, com.sun.mirror.declaration.MemberDeclaration, com.sun.mirror.declaration.TypeDeclaration

public class EndpointInterface
extends net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration

A type or interface specified as a web service endpoint interface. This decorator can only be applied to either interfaces or classes that implicitly define an endpoint interface (see spec, section 3.3).

Author:
Ryan Heaton

Field Summary
 
Fields inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
delegate, javaDoc
 
Constructor Summary
EndpointInterface(com.sun.mirror.declaration.TypeDeclaration delegate, com.sun.mirror.declaration.TypeDeclaration... implementationCandidates)
          Construct an endoint interface.
 
Method Summary
protected  java.lang.String calculateNamespaceURI()
          Calculates a namespace URI for a given package.
protected  com.sun.mirror.apt.AnnotationProcessorEnvironment getAnnotationProcessorEnvironment()
          The current annotation processing environment.
 java.lang.String getClientSimpleName()
          The simple name for client-side code generation.
 java.util.Collection<EndpointImplementation> getEndpointImplementations()
          Finds the endpoint implemenations of this interface.
 java.util.Map<java.lang.String,java.lang.Object> getMetaData()
          The metadata associated with this endpoint interface.
 java.lang.String getPortTypeName()
          The name of this web service.
 java.util.Set<java.lang.String> getReferencedNamespaces()
          The set of namespace URIs that this web service references.
 java.lang.String getServiceName()
          The service name of this web service.
 java.lang.String getSoapBindingName()
          The name of the soap binding.
 javax.jws.soap.SOAPBinding.Style getSoapBindingStyle()
          The SOAP binding style specified on this endpoint interface.
 javax.jws.soap.SOAPBinding.ParameterStyle getSoapParameterStyle()
          The SOAP parameter style of this web method.
 javax.jws.soap.SOAPBinding.Use getSoapUse()
          The SOAP binding use of this web method.
 java.lang.String getTargetNamespace()
          Gets the target namespace of this web service.
 java.util.Collection<WebMethod> getWebMethods()
          Get the web methods for this web service.
 boolean isAnnotatedType()
           
 boolean isClass()
           
protected  boolean isEndpointImplementation(com.sun.mirror.declaration.TypeDeclaration declaration)
          A quick check to see if a declaration is an endpoint implementation.
 boolean isEnum()
           
 boolean isInterface()
           
 boolean isWebMethod(com.sun.mirror.declaration.MethodDeclaration method)
          A quick check to see if a method is a web method.
 void putMetaData(java.lang.String name, java.lang.Object data)
          Set the metadata associated with this endpoint interface.
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration
accept, getFields, getFormalTypeParameters, getMethods, getNestedTypes, getPackage, getProperties, getQualifiedName, getSuperinterfaces, isPaired
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedMemberDeclaration
getDeclaringType
 
Methods inherited from class net.sf.jelly.apt.decorations.declaration.DecoratedDeclaration
constructJavaDoc, equals, getAnnotation, getAnnotationMirrors, getAnnotations, getDelegate, getDocComment, getDocValue, getJavaDoc, getModifiers, getPosition, getSimpleName, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.mirror.declaration.MemberDeclaration
getDeclaringType
 
Methods inherited from interface com.sun.mirror.declaration.Declaration
equals, getAnnotation, getAnnotationMirrors, getDocComment, getModifiers, getPosition, getSimpleName
 

Constructor Detail

EndpointInterface

public EndpointInterface(com.sun.mirror.declaration.TypeDeclaration delegate,
                         com.sun.mirror.declaration.TypeDeclaration... implementationCandidates)
Construct an endoint interface.

Parameters:
delegate - The delegate.
implementationCandidates - The type declarations to be considered as implementation candidates (the ones that can't be seen by APT.)
Method Detail

getPortTypeName

public java.lang.String getPortTypeName()
The name of this web service.

Returns:
The name of this web service.

getServiceName

public java.lang.String getServiceName()
The service name of this web service.

Returns:
The service name of this web service.

getTargetNamespace

public java.lang.String getTargetNamespace()
Gets the target namespace of this web service.

Returns:
the target namespace of this web service.

getClientSimpleName

public java.lang.String getClientSimpleName()
The simple name for client-side code generation.

Returns:
The simple name for client-side code generation.

calculateNamespaceURI

protected java.lang.String calculateNamespaceURI()
Calculates a namespace URI for a given package. Default implementation uses the algorithm defined in section 3.2 of the jax-ws spec.

Returns:
The calculated namespace uri.

getReferencedNamespaces

public java.util.Set<java.lang.String> getReferencedNamespaces()
The set of namespace URIs that this web service references.

Returns:
The set of namespace URIs that this web service references.

getWebMethods

public java.util.Collection<WebMethod> getWebMethods()
Get the web methods for this web service.

Returns:
the web methods for this web service.

isWebMethod

public boolean isWebMethod(com.sun.mirror.declaration.MethodDeclaration method)
A quick check to see if a method is a web method.


getEndpointImplementations

public java.util.Collection<EndpointImplementation> getEndpointImplementations()
Finds the endpoint implemenations of this interface.

Returns:
The endpoint implementations of this interface.

isEndpointImplementation

protected boolean isEndpointImplementation(com.sun.mirror.declaration.TypeDeclaration declaration)
A quick check to see if a declaration is an endpoint implementation.


getSoapBindingStyle

public javax.jws.soap.SOAPBinding.Style getSoapBindingStyle()
The SOAP binding style specified on this endpoint interface.

Note: the specification is unclear on how to deal with the specific binding annotations of the associated endpoint implementation classes. It is a assumed that the annotations of the endpoint implementation classes override the annotations on the endpoint interface.

Returns:
The SOAP binding style specified on this endpoint interface.

getSoapBindingName

public java.lang.String getSoapBindingName()
The name of the soap binding. This is just used in the WSDL, so it's not really necessary-- it's more for aesthetic purposes.

Returns:
The name of the soap binding.
See Also:
SoapBindingName

getSoapUse

public javax.jws.soap.SOAPBinding.Use getSoapUse()
The SOAP binding use of this web method.

Returns:
The SOAP binding use of this web method.

getSoapParameterStyle

public javax.jws.soap.SOAPBinding.ParameterStyle getSoapParameterStyle()
The SOAP parameter style of this web method.

Returns:
The SOAP parameter style of this web method.

isClass

public boolean isClass()
Overrides:
isClass in class net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration

isInterface

public boolean isInterface()
Overrides:
isInterface in class net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration

isEnum

public boolean isEnum()
Overrides:
isEnum in class net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration

isAnnotatedType

public boolean isAnnotatedType()
Overrides:
isAnnotatedType in class net.sf.jelly.apt.decorations.declaration.DecoratedTypeDeclaration

getMetaData

public java.util.Map<java.lang.String,java.lang.Object> getMetaData()
The metadata associated with this endpoint interface.

Returns:
The metadata associated with this endpoint interface.

putMetaData

public void putMetaData(java.lang.String name,
                        java.lang.Object data)
Set the metadata associated with this endpoint interface.

Parameters:
name - The name of the metadata.
data - The data.

getAnnotationProcessorEnvironment

protected com.sun.mirror.apt.AnnotationProcessorEnvironment getAnnotationProcessorEnvironment()
The current annotation processing environment.

Returns:
The current annotation processing environment.