Class OrganizationImpl

    • Constructor Detail

      • OrganizationImpl

        public OrganizationImpl()
        Creates new OrganizationImpl
      • OrganizationImpl

        public OrganizationImpl​(Key key)
        Creates new OrganizationImpl
    • Method Detail

      • getPrimaryContact

        public User getPrimaryContact()
                               throws JAXRException
        Gets the primary contact for this Organization. Primary contact should also be in the users collection.
        Specified by:
        getPrimaryContact in interface Organization
        Returns:
        the User that is the primary Contact for this Organization. Must not be null
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • setPrimaryContact

        public void setPrimaryContact​(User primaryContact)
                               throws JAXRException
        Sets the primary contact. Need to add this to users collection also if not already there.
        Specified by:
        setPrimaryContact in interface Organization
        Parameters:
        primaryContact - the User that is the primary Contact for this Organization
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • addUser

        public void addUser​(User user)
                     throws JAXRException
        Add a user.
        Specified by:
        addUser in interface Organization
        Parameters:
        user - the User being added to this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • addUsers

        public void addUsers​(Collection users)
                      throws JAXRException
        Add users. Treat null parameter as empty collection.
        Specified by:
        addUsers in interface Organization
        Parameters:
        users - the Collection of Users being added to this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • removeUser

        public void removeUser​(User user)
                        throws JAXRException
        Remove a user
        Specified by:
        removeUser in interface Organization
        Parameters:
        user - the User being removed from this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • removeUsers

        public void removeUsers​(Collection users)
                         throws JAXRException
        Remove multiple users. Treat null parameter as an empty collection.
        Specified by:
        removeUsers in interface Organization
        Parameters:
        users - the Collection of Users being removed from this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • getUsers

        public Collection getUsers()
                            throws 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 Organization
        Returns:
        Collection of User instances. The Collection may be empty but not null.
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
        See Also:
        User
      • getTelephoneNumbers

        public Collection getTelephoneNumbers​(String phoneType)
                                       throws JAXRException
        Gets the telephone numbers that match the type. If type is null, return all phone numbers.
        Specified by:
        getTelephoneNumbers in interface Organization
        Parameters:
        phoneType - a String that specifies the type of phone numbers desired
        Returns:
        Collection of TelephoneNumber instances. The Collection may be empty but not null.
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
        See Also:
        TelephoneNumber
      • setTelephoneNumbers

        public void setTelephoneNumbers​(Collection phoneNumbers)
                                 throws JAXRException
        Set the various telephone numbers for this user. Treat null param as empty collection.
        Specified by:
        setTelephoneNumbers in interface Organization
        Parameters:
        phoneNumbers - the TelephoneNumbers being set for this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • addService

        public void addService​(Service service)
                        throws JAXRException
        Add a child Service. Set organization on the service to this.
        Specified by:
        addService in interface Organization
        Parameters:
        service - the Service being added to this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • addServices

        public void addServices​(Collection services)
                         throws JAXRException
        Add a Collection of service children. Set organization on each to this. Treat null param as empty collection.
        Specified by:
        addServices in interface Organization
        Parameters:
        services - the Collection of Services being added to this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • removeService

        public void removeService​(Service service)
                           throws JAXRException
        Remove a child service.
        Specified by:
        removeService in interface Organization
        Parameters:
        service - the Service being removed from this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error
      • removeServices

        public void removeServices​(Collection services)
                            throws JAXRException
        Remove a collection of children services. Treat null param as empty collection.
        Specified by:
        removeServices in interface Organization
        Parameters:
        services - the Collection of Services being removed from this object
        Throws:
        JAXRException - If the JAXR provider encounters an internal error