All Implemented Interfaces:
Iterable<Attribute>, AttributeContainer<MapAttributeValue>, AttributeOrAttributeValue<AttributeValue>, AttributeValue

public final class Address extends MultiValuedAttributeValue<Address>
An object representing the complex attribute Address in SCIM Core Schema RFC7643

A physical mailing address for this user.

  • Field Details

  • Method Details

    • of

      public static Address of(String formatted)
      Create an Address with the FORMATTED attribute set.
      Parameters:
      formatted - the formatted value to set
      Returns:
      Address with a formatted address set
    • of

      public static Address of(Iterable<Attribute> attributes)
    • of

      public static Address of(String formatted, boolean isPrimary)
      Create an Address with the FORMATTED and PRIMARY attributes set.
      Parameters:
      formatted - the formatted value to set
      isPrimary - set the PRIMARY flag of this object
      Returns:
      Address with a formatted address set
    • of

      public static Address of(MapAttributeValue attributes)
      Create an Address.
      Parameters:
      attributes - to set
      Returns:
      Address with the attributes set
    • copyOf

      protected Address copyOf(MapAttributeValue other)
      Description copied from class: ComplexAttributeValue
      Copies the provided map attribute value.
      Specified by:
      copyOf in class ComplexAttributeValue<Address>
      Parameters:
      other - The map attribute value to copy
      Returns:
      A copy of the map attribute value
    • getFormatted

      @Nullable public @Nullable String getFormatted()
      The full mailing address, formatted for display or use with a mailing label. This attribute MAY contain newlines.
      Returns:
      formatted String, or null if not set
    • getCountry

      @Nullable public @Nullable String getCountry()
      The country name component. When specified, the value MUST be in ISO 3166-1 "alpha-2" code format [ISO3166]; e.g., the United States and Sweden are "US" and "SE", respectively
      Returns:
      the country name, or null if not set
    • getPostalCode

      @Nullable public @Nullable String getPostalCode()
      The zip code or postal code component.
      Returns:
      The zip code or postal code, or null if not set
    • getLocality

      @Nullable public @Nullable String getLocality()
      The city or locality component.
      Returns:
      The city or locality component, or null of not set
    • getStreetAddress

      @Nullable public @Nullable String getStreetAddress()
      The full street address component, which may include house number, street name, P.O. box, and multi-line extended street address information. This attribute MAY contain newlines.
      Returns:
      The full street address, or null if not set
    • getRegion

      @Nullable public @Nullable String getRegion()
      The state or region component.
      Returns:
      The state or region component, or null of not set
    • withCountry

      public Address withCountry(String country)
      Create a new Address object, with the COUNTRY attribute set

      If the attribute already exists, it will be replaced.

      Note: While the SCIM2 specification states this value "MUST be in ISO 3166-1" (i.e. 'US', 'SE', etc), this is not currently enforced. This may change in a future release, however.

      Parameters:
      country - the value to set
      Returns:
      clone of the address object
      See Also:
    • withPostalCode

      public Address withPostalCode(String postalCode)
      Create a new Address object, with the POSTAL_CODE attribute set

      If the attribute alreay exists, it will be replaced.

      Parameters:
      postalCode - the value to set
      Returns:
      clone of the address object
      See Also:
    • withLocality

      public Address withLocality(String locality)
      Create a new Address object, with the LOCALITY attribute set

      If the attribute alreay exists, it will be replaced.

      Parameters:
      locality - the value to set
      Returns:
      clone of the address object
      See Also:
    • withStreetAddress

      public Address withStreetAddress(String streetAddress)
      Create a new Address object, with the LOCALITY attribute set

      If the attribute alreay exists, it will be replaced.

      Parameters:
      streetAddress - the value to set
      Returns:
      clone of the address object
      See Also: