Class OrganizationImpl

  • All Implemented Interfaces:
    Serializable, javax.xml.registry.infomodel.ExtensibleObject, javax.xml.registry.infomodel.Organization, javax.xml.registry.infomodel.RegistryObject

    public class OrganizationImpl
    extends RegistryObjectImpl
    implements javax.xml.registry.infomodel.Organization, Serializable
    Author:
    kwalsh
    See Also:
    Serialized Form
    • Constructor Detail

      • OrganizationImpl

        public OrganizationImpl()
        Creates new OrganizationImpl
      • OrganizationImpl

        public OrganizationImpl​(javax.xml.registry.infomodel.Key key)
        Creates new OrganizationImpl
      • OrganizationImpl

        public OrganizationImpl​(String name)
                         throws javax.xml.registry.JAXRException
        Creates new OrganizationImpl
        Throws:
        javax.xml.registry.JAXRException
      • OrganizationImpl

        public OrganizationImpl​(javax.xml.registry.infomodel.Key key,
                                String description,
                                String name)
                         throws javax.xml.registry.JAXRException
        Creates new OrganizationImpl
        Throws:
        javax.xml.registry.JAXRException
    • Method Detail

      • getPrimaryContact

        public javax.xml.registry.infomodel.User getPrimaryContact()
                                                            throws javax.xml.registry.JAXRException
        Gets the primary contact for this Organization. Primary contact should also be in the users collection.
        Specified by:
        getPrimaryContact in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • setPrimaryContact

        public void setPrimaryContact​(javax.xml.registry.infomodel.User primaryContact)
                               throws javax.xml.registry.JAXRException
        Sets the primary contact. Need to add this to users collection also if not already there.
        Specified by:
        setPrimaryContact in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • addUser

        public void addUser​(javax.xml.registry.infomodel.User user)
                     throws javax.xml.registry.JAXRException
        Add a user.
        Specified by:
        addUser in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • addUsers

        public void addUsers​(Collection users)
                      throws javax.xml.registry.JAXRException
        Add users. Treat null parameter as empty collection.
        Specified by:
        addUsers in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • removeUser

        public void removeUser​(javax.xml.registry.infomodel.User user)
                        throws javax.xml.registry.JAXRException
        Remove a user
        Specified by:
        removeUser in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • removeUsers

        public void removeUsers​(Collection users)
                         throws javax.xml.registry.JAXRException
        Remove multiple users. Treat null parameter as an empty collection.
        Specified by:
        removeUsers in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • getUsers

        public Collection getUsers()
                            throws javax.xml.registry.JAXRException
        Gets the Collection of Users affiliated with this Organization. One of these users is designated as the primary contact.
        Specified by:
        getUsers in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • getTelephoneNumbers

        public Collection getTelephoneNumbers​(String phoneType)
                                       throws javax.xml.registry.JAXRException
        Gets the telephone numbers that match the type. If type is null, return all phone numbers.
        Specified by:
        getTelephoneNumbers in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • setTelephoneNumbers

        public void setTelephoneNumbers​(Collection phoneNumbers)
                                 throws javax.xml.registry.JAXRException
        Set the various telephone numbers for this user. Treat null param as empty collection.
        Specified by:
        setTelephoneNumbers in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • addService

        public void addService​(javax.xml.registry.infomodel.Service service)
                        throws javax.xml.registry.JAXRException
        Add a child Service. Set organization on the service to this.
        Specified by:
        addService in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • addServices

        public void addServices​(Collection services)
                         throws javax.xml.registry.JAXRException
        Add a Collection of service children. Set organization on each to this. Treat null param as empty collection.
        Specified by:
        addServices in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • removeService

        public void removeService​(javax.xml.registry.infomodel.Service service)
                           throws javax.xml.registry.JAXRException
        Remove a child service.
        Specified by:
        removeService in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • removeServices

        public void removeServices​(Collection services)
                            throws javax.xml.registry.JAXRException
        Remove a collection of children services. Treat null param as empty collection.
        Specified by:
        removeServices in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • getServices

        public Collection getServices()
                               throws javax.xml.registry.JAXRException
        Get all children services.
        Specified by:
        getServices in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • setServices

        public void setServices​(Collection services)
                         throws javax.xml.registry.JAXRException
        Internal method for setting services on organization
        Throws:
        javax.xml.registry.JAXRException
      • addExternalLink

        public void addExternalLink​(javax.xml.registry.infomodel.ExternalLink link)
                             throws javax.xml.registry.JAXRException
        Overrides behavior in RegistryObjectImpl to allow adding external links. See appendix D of specification.
        Specified by:
        addExternalLink in interface javax.xml.registry.infomodel.RegistryObject
        Overrides:
        addExternalLink in class RegistryObjectImpl
        Throws:
        javax.xml.registry.JAXRException
      • addExternalLinks

        public void addExternalLinks​(Collection links)
                              throws javax.xml.registry.JAXRException
        Overrides behavior in RegistryObjectImpl to allow adding external links. See appendix D of specification.
        Specified by:
        addExternalLinks in interface javax.xml.registry.infomodel.RegistryObject
        Overrides:
        addExternalLinks in class RegistryObjectImpl
        Throws:
        javax.xml.registry.JAXRException
      • setExternalLinks

        public void setExternalLinks​(Collection links)
                              throws javax.xml.registry.JAXRException
        Overrides behavior in RegistryObjectImpl to allow adding external links. See appendix D of specification.
        Specified by:
        setExternalLinks in interface javax.xml.registry.infomodel.RegistryObject
        Overrides:
        setExternalLinks in class RegistryObjectImpl
        Throws:
        javax.xml.registry.JAXRException
      • getPostalAddress

        public javax.xml.registry.infomodel.PostalAddress getPostalAddress()
                                                                    throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        getPostalAddress in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • setPostalAddress

        public void setPostalAddress​(javax.xml.registry.infomodel.PostalAddress address)
                              throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        setPostalAddress in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • addChildOrganization

        public void addChildOrganization​(javax.xml.registry.infomodel.Organization organization)
                                  throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        addChildOrganization in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • addChildOrganizations

        public void addChildOrganizations​(Collection organization)
                                   throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        addChildOrganizations in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • removeChildOrganization

        public void removeChildOrganization​(javax.xml.registry.infomodel.Organization organization)
                                     throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        removeChildOrganization in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • removeChildOrganizations

        public void removeChildOrganizations​(Collection organization)
                                      throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        removeChildOrganizations in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • getChildOrganizationCount

        public int getChildOrganizationCount()
                                      throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        getChildOrganizationCount in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • getChildOrganizations

        public Collection getChildOrganizations()
                                         throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        getChildOrganizations in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • getDescendantOrganizations

        public Collection getDescendantOrganizations()
                                              throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        getDescendantOrganizations in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • getParentOrganization

        public javax.xml.registry.infomodel.Organization getParentOrganization()
                                                                        throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        getParentOrganization in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException
      • getRootOrganization

        public javax.xml.registry.infomodel.Organization getRootOrganization()
                                                                      throws javax.xml.registry.JAXRException
        Level 1 method
        Specified by:
        getRootOrganization in interface javax.xml.registry.infomodel.Organization
        Throws:
        javax.xml.registry.JAXRException