Class CommunicationIdentifier

java.lang.Object
com.azure.communication.common.CommunicationIdentifier
Direct Known Subclasses:
CommunicationUserIdentifier, MicrosoftTeamsUserIdentifier, PhoneNumberIdentifier, UnknownIdentifier

public abstract class CommunicationIdentifier extends Object
Common communication identifier for Communication Services
  • Constructor Details

    • CommunicationIdentifier

      public CommunicationIdentifier()
  • Method Details

    • fromRawId

      public static CommunicationIdentifier fromRawId(String rawId)
      When storing rawIds, use this function to restore the identifier that was encoded in the rawId.
      Parameters:
      rawId - raw id.
      Returns:
      CommunicationIdentifier
      Throws:
      IllegalArgumentException - raw id is null or empty.
    • getRawId

      public String getRawId()
      Returns the rawId for a given CommunicationIdentifier. You can use the rawId for encoding the identifier and then use it as a key in a database.
      Returns:
      raw id
    • setRawId

      protected CommunicationIdentifier setRawId(String rawId)
      Set full id of the identifier RawId is the encoded format for identifiers to store in databases or as stable keys in general.
      Parameters:
      rawId - full id of the identifier
      Returns:
      CommunicationIdentifier object itself
    • equals

      public boolean equals(Object that)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object