FileDocCategorySizeDatePackage
WebServicesDescriptor.javaAPI DocGlassfish v2 API6714Fri May 04 22:31:24 BST 2007com.sun.enterprise.deployment

WebServicesDescriptor

public class WebServicesDescriptor extends RootDeploymentDescriptor
Information about the web services defined in a single module.
author
Kenneth Saks
author
Jerome Dochez

Fields Summary
private BundleDescriptor
bundleDesc
private Collection
webServices
Constructors Summary
public WebServicesDescriptor()
Default constructor.

        webServices = new HashSet<WebService>();
    
Methods Summary
public voidaddWebService(WebService descriptor)

        descriptor.setWebServicesDescriptor(this);
        webServices.add(descriptor);
        super.changed();
    
public BundleDescriptorgetBundleDescriptor()

        return bundleDesc;
    
public java.lang.ClassLoadergetClassLoader()

 return null; 
public java.lang.StringgetDefaultSpecVersion()

return
the default version of the deployment descriptor loaded by this descriptor

        return WebServicesDescriptorNode.SPEC_VERSION;
    
public WebServiceEndpointgetEndpointByName(java.lang.String endpointName)
Endpoint has a unique name within all the endpoints in the module.

return
WebServiceEndpoint or null if not found

        for(Iterator iter = getEndpoints().iterator(); iter.hasNext();) {
            WebServiceEndpoint next = (WebServiceEndpoint) iter.next();
            if( next.getEndpointName().equals(endpointName) ) {
                return next;
            }
        }
        return null;
    
public java.util.CollectiongetEndpoints()

        Collection allEndpoints = new HashSet();
        for(WebService webService : webServices) {
            allEndpoints.addAll( webService.getEndpoints() );
        }
        return allEndpoints;
    
public java.util.CollectiongetEndpointsImplementedBy(EjbDescriptor ejb)

        Collection<WebServiceEndpoint> endpoints = new HashSet();
        if( ejb instanceof EjbSessionDescriptor ) {
            for(WebServiceEndpoint next : getEndpoints()) {
                if( next.implementedByEjbComponent(ejb) ) {
                    endpoints.add(next);
                }
            }
        }
        return endpoints;
    
public java.util.CollectiongetEndpointsImplementedBy(WebComponentDescriptor desc)

        Collection<WebServiceEndpoint> endpoints = new HashSet();
        for(WebServiceEndpoint next : getEndpoints()) {
            if( next.implementedByWebComponent(desc) ) {
                endpoints.add(next);
            }
        }
        return endpoints;
    
public java.lang.StringgetModuleID()

 return ""; 
public javax.enterprise.deploy.shared.ModuleTypegetModuleType()

 
        if (bundleDesc!=null) {
          return bundleDesc.getModuleType();  
        } 
        return null; 
    
public WebServicegetWebServiceByName(java.lang.String webServiceName)

        for (WebService webService : webServices) {
            if( webService.getName().equals(webServiceName) ) {
                return webService;
            }
        }
        return null;
    
public java.util.CollectiongetWebServices()

        return new HashSet<WebService>(webServices);
    
public booleanhasEndpointsImplementedBy(EjbDescriptor ejb)

        return !(getEndpointsImplementedBy(ejb).isEmpty());
    
public booleanhasEndpointsImplementedBy(WebComponentDescriptor desc)

        return !(getEndpointsImplementedBy(desc).isEmpty());
    
public booleanhasWebServices()

        return !(webServices.isEmpty());
    
public booleanisApplication()

return false; 
public voidprint(java.lang.StringBuffer toStringBuffer)
Returns a formatted String of the attributes of this object.

	super.print(toStringBuffer);
        if (hasWebServices()) {
            for (Iterator itr = getWebServices().iterator();itr.hasNext();) {
                WebService aWebService = (WebService) itr.next();
                toStringBuffer.append("\n Web Service : ");
                aWebService.print(toStringBuffer);
            }
        }
    
public voidremoveWebService(WebService descriptor)

        descriptor.setWebServicesDescriptor(null);
        webServices.remove(descriptor);
        super.changed();
    
public voidsetBundleDescriptor(BundleDescriptor module)

        bundleDesc = module;