com.sun.xml.registry.uddi.infomodel
Class ServiceBindingImpl

java.lang.Object
  extended by com.sun.xml.registry.uddi.infomodel.ExtensibleObjectImpl
      extended by com.sun.xml.registry.uddi.infomodel.RegistryObjectImpl
          extended by com.sun.xml.registry.uddi.infomodel.ServiceBindingImpl
All Implemented Interfaces:
Serializable, ExtensibleObject, RegistryObject, ServiceBinding, URIValidator

public class ServiceBindingImpl
extends RegistryObjectImpl
implements ServiceBinding, Serializable

Implementation of the ServiceBinding interface

Author:
Farrukh S. Najmi, Kathy Walsh
See Also:
Serialized Form

Constructor Summary
ServiceBindingImpl()
          Default constructor initializes list and creates URIValidatorImpl object for delgating uri validations tasks.
 
Method Summary
 void addSpecificationLink(SpecificationLink link)
          Add specification link.
 void addSpecificationLinks(Collection specificationLinks)
          Add a Collection of SpecificationLink children.
 String getAccessURI()
          Gets the URI that gives access to the service via this binding.
 Service getService()
          Gets the parent service for which this is a binding
 Collection getSpecificationLinks()
          Get specification links
 ServiceBinding getTargetBinding()
          Gets the next ServiceInterfaceBinding in case there is a redirection
 boolean getValidateURI()
          Whether or not validation is turned on
 void removeSpecificationLink(SpecificationLink specificationLink)
          Remove a child SpecificationLink
 void removeSpecificationLinks(Collection specificationLinks)
          Remove a Collection of children SpecificationLinks.
 void setAccessURI(String uri)
          Sets the URI that gives access to the service via this binding.
 void setService(Service service)
          Internal method for setting service
 void setSpecificationLinks(Collection links)
          Internal method to set the specification links
 void setTargetBinding(ServiceBinding binding)
          Sets the next ServiceInterfaceBinding in case there is a redirection.
 void setValidateURI(boolean validate)
          Turns validation on or off.
 
Methods inherited from class com.sun.xml.registry.uddi.infomodel.RegistryObjectImpl
addAssociation, addAssociations, addClassification, addClassifications, addExternalIdentifier, addExternalIdentifiers, addExternalLink, addExternalLinks, addSlot, addSlots, areAssociationsLoaded, getAssociatedObjects, getAssociations, getAuditTrail, getClassifications, getConnection, getDescription, getExternalIdentifiers, getExternalLinks, getKey, getLifeCycleManager, getName, getObjectType, getRegistryPackages, getRegistryService, getServiceId, getSubmittingOrganization, isDeleted, isLoaded, isModified, isNew, isRetrieved, removeAssociation, removeAssociations, removeClassification, removeClassifications, removeExternalIdentifier, removeExternalIdentifiers, removeExternalLink, removeExternalLinks, removeSlot, removeSlots, setAssociations, setAssociationsLoaded, setClassifications, setDescription, setExternalIdentifiers, setExternalLinks, setIsDeleted, setIsLoaded, setIsModified, setIsNew, setIsRetrieved, setKey, setLifeCycleManager, setName, setObjectType, setRegistryService, setServiceId, setStatusFlags, setSubmittingOrganization, toXML
 
Methods inherited from class com.sun.xml.registry.uddi.infomodel.ExtensibleObjectImpl
getSlot, getSlots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.registry.infomodel.RegistryObject
addAssociation, addAssociations, addClassification, addClassifications, addExternalIdentifier, addExternalIdentifiers, addExternalLink, addExternalLinks, getAssociatedObjects, getAssociations, getAuditTrail, getClassifications, getDescription, getExternalIdentifiers, getExternalLinks, getKey, getLifeCycleManager, getName, getObjectType, getRegistryPackages, getSubmittingOrganization, removeAssociation, removeAssociations, removeClassification, removeClassifications, removeExternalIdentifier, removeExternalIdentifiers, removeExternalLink, removeExternalLinks, setAssociations, setClassifications, setDescription, setExternalIdentifiers, setExternalLinks, setKey, setName, toXML
 
Methods inherited from interface javax.xml.registry.infomodel.ExtensibleObject
addSlot, addSlots, getSlot, getSlots, removeSlot, removeSlots
 

Constructor Detail

ServiceBindingImpl

public ServiceBindingImpl()
Default constructor initializes list and creates URIValidatorImpl object for delgating uri validations tasks.

Method Detail

getAccessURI

public String getAccessURI()
                    throws JAXRException
Gets the URI that gives access to the service via this binding.

Specified by:
getAccessURI in interface ServiceBinding
Returns:
the URI that gives access to the service via this binding
Throws:
JAXRException - If the JAXR provider encounters an internal error

setAccessURI

public void setAccessURI(String uri)
                  throws JAXRException
Sets the URI that gives access to the service via this binding. If there is already a target binding, throw an exception.

Specified by:
setAccessURI in interface ServiceBinding
Parameters:
uri - the URI that gives access to the service via this binding
Throws:
JAXRException - If the JAXR provider encounters an internal error

getTargetBinding

public ServiceBinding getTargetBinding()
                                throws JAXRException
Gets the next ServiceInterfaceBinding in case there is a redirection

Specified by:
getTargetBinding in interface ServiceBinding
Returns:
the next ServiceBinding in case there is a service redirection
Throws:
JAXRException - If the JAXR provider encounters an internal error

setTargetBinding

public void setTargetBinding(ServiceBinding binding)
                      throws JAXRException
Sets the next ServiceInterfaceBinding in case there is a redirection. Throws an exception if there is already an accessURI.

Specified by:
setTargetBinding in interface ServiceBinding
Parameters:
binding - the target ServiceBinding to which this object is redirected to
Throws:
JAXRException - If the JAXR provider encounters an internal error

getService

public Service getService()
                   throws JAXRException
Gets the parent service for which this is a binding

Specified by:
getService in interface ServiceBinding
Returns:
the parent Service object
Throws:
JAXRException - If the JAXR provider encounters an internal error

setService

public void setService(Service service)
Internal method for setting service


getSpecificationLinks

public Collection getSpecificationLinks()
                                 throws JAXRException
Get specification links

Specified by:
getSpecificationLinks in interface ServiceBinding
Returns:
Collection of SpecificationLink instances. The Collection may be empty but not null.
Throws:
JAXRException - If the JAXR provider encounters an internal error
See Also:
SpecificationLink

addSpecificationLink

public void addSpecificationLink(SpecificationLink link)
                          throws JAXRException
Add specification link. This will call setServiceBinding() on the added SpecificationLink.

Specified by:
addSpecificationLink in interface ServiceBinding
Parameters:
link - the SpecificationLink being added
Throws:
JAXRException - If the JAXR provider encounters an internal error

addSpecificationLinks

public void addSpecificationLinks(Collection specificationLinks)
                           throws JAXRException
Add a Collection of SpecificationLink children. Treat null collection as an empty collection. Sets the service binding on each specification link.

Specified by:
addSpecificationLinks in interface ServiceBinding
Parameters:
specificationLinks - the Collection of SpecificationLinks being added
Throws:
JAXRException - If the JAXR provider encounters an internal error

removeSpecificationLink

public void removeSpecificationLink(SpecificationLink specificationLink)
                             throws JAXRException
Remove a child SpecificationLink

Specified by:
removeSpecificationLink in interface ServiceBinding
Parameters:
specificationLink - the SpecificationLink being removed
Throws:
JAXRException - If the JAXR provider encounters an internal error

removeSpecificationLinks

public void removeSpecificationLinks(Collection specificationLinks)
                              throws JAXRException
Remove a Collection of children SpecificationLinks. Treat null param as an empty collection.

Specified by:
removeSpecificationLinks in interface ServiceBinding
Parameters:
specificationLinks - the Collection of SpecificationLinks being removed
Throws:
JAXRException - If the JAXR provider encounters an internal error

setSpecificationLinks

public void setSpecificationLinks(Collection links)
                           throws JAXRException
Internal method to set the specification links

Throws:
JAXRException

setValidateURI

public void setValidateURI(boolean validate)
Turns validation on or off.

Specified by:
setValidateURI in interface URIValidator
Parameters:
validate - true implies JAXR provider must perform validation of URIs when they are set; false implies validation is turned off
See Also:
URIValidatorImpl

getValidateURI

public boolean getValidateURI()
Whether or not validation is turned on

Specified by:
getValidateURI in interface URIValidator
Returns:
true implies JAXR provider must perform validation of URIs when they are set; false implies validation is turned off
See Also:
URIValidatorImpl


Copyright © 2005-2013 Oracle Corporation. All Rights Reserved.