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

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.ExternalLinkImpl
All Implemented Interfaces:
Serializable, ExtensibleObject, ExternalLink, RegistryObject, URIValidator

public class ExternalLinkImpl
extends RegistryObjectImpl
implements ExternalLink, Serializable

Implementation of ExternalLink interface

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

Constructor Summary
ExternalLinkImpl()
          Default constructor initializes list and creates URIValidatorImpl object for delgating uri validations tasks.
ExternalLinkImpl(String uri)
          Utility constructor used when URI is given.
ExternalLinkImpl(String uri, String description)
          Utility constructor with URI and description.
 
Method Summary
 String getExternalURI()
          Gets URI to the an external resource
 Key getKey()
          Override the behavior in RegistryObject to return a provider generated id.
 Collection getLinkedObjects()
          Gets the collection of RegistryObjects that are annotated by this ExternalLink
 boolean getValidateURI()
          Whether or not validation is turned on
 void setExternalURI(String externalUri)
          Sets URI for an external resource.
 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, 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, 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

ExternalLinkImpl

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

Throws:
JAXRException

ExternalLinkImpl

public ExternalLinkImpl(String uri)
                 throws JAXRException
Utility constructor used when URI is given.

Throws:
JAXRException

ExternalLinkImpl

public ExternalLinkImpl(String uri,
                        String description)
                 throws JAXRException
Utility constructor with URI and description.

Throws:
JAXRException
Method Detail

getLinkedObjects

public Collection getLinkedObjects()
                            throws JAXRException
Gets the collection of RegistryObjects that are annotated by this ExternalLink

Specified by:
getLinkedObjects in interface ExternalLink
Returns:
Collection of RegistryObjects. Return an empty Collection if no RegistryObjects are annotated by this object.
Throws:
JAXRException - If the JAXR provider encounters an internal error

setValidateURI

public void setValidateURI(boolean validate)
                    throws JAXRException
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
Throws:
JAXRException - If the JAXR provider encounters an internal error
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

getExternalURI

public String getExternalURI()
                      throws JAXRException
Gets URI to the an external resource

Specified by:
getExternalURI in interface ExternalLink
Returns:
the URI String for this object (e.g. "http://java.sun.com")
Throws:
JAXRException - If the JAXR provider encounters an internal error

setExternalURI

public void setExternalURI(String externalUri)
                    throws JAXRException
Sets URI for an external resource. Throws an exception if the uri is invalid (when validation is on).

Specified by:
setExternalURI in interface ExternalLink
Parameters:
externalUri - the URI String for this object (e.g. "http://java.sun.com")
Throws:
JAXRException - If the JAXR provider encounters an internal error

getKey

public Key getKey()
           throws JAXRException
Override the behavior in RegistryObject to return a provider generated id. Gets a sequence id from the first parent registry object in registryObjects ArrayList.

Specified by:
getKey in interface RegistryObject
Overrides:
getKey in class RegistryObjectImpl
Returns:
the Key for this object
Throws:
JAXRException - If the JAXR provider encounters an internal error


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