Interface ModifiableRealmIdentity

All Superinterfaces:
RealmIdentity

public interface ModifiableRealmIdentity extends RealmIdentity
A realm identity which is modifiable.
Author:
David M. Lloyd
  • Field Details

    • NON_EXISTENT

      static final ModifiableRealmIdentity NON_EXISTENT
      A modifiable identity for a non-existent user who cannot be created.
  • Method Details

    • delete

      void delete() throws RealmUnavailableException
      Delete this realm identity. After this call, RealmIdentity.exists() will return false. If the identity does not exist, an exception is thrown.
      Throws:
      RealmUnavailableException - if deletion fails for some reason
    • create

      void create() throws RealmUnavailableException
      Create this realm identity. After this call, RealmIdentity.exists() will return true and the credentials and role sets will be empty. If the identity already exists, an exception is thrown.
      Throws:
      RealmUnavailableException - if creation fails for some reason
    • setCredentials

      void setCredentials(Collection<? extends org.wildfly.security.credential.Credential> credentials) throws RealmUnavailableException
      Set the credentials of this identity. If the identity does not exist, an exception is thrown. Any existing credential(s) are replaced/updated with the new value (in a possibly realm-specific manner).
      Parameters:
      credentials - the new credentials to set
      Throws:
      RealmUnavailableException - if updating the credentials fails for some reason
    • updateCredential

      default void updateCredential(org.wildfly.security.credential.Credential credential) throws RealmUnavailableException
      Description copied from interface: RealmIdentity
      Update a credential of this realm identity.
      Specified by:
      updateCredential in interface RealmIdentity
      Parameters:
      credential - the new credential (must not be null)
      Throws:
      RealmUnavailableException - if the realm is not able to handle requests for any reason
    • setAttributes

      void setAttributes(Attributes attributes) throws RealmUnavailableException
      Modify the attributes collection of this identity. If the identity does not exist, an exception is thrown.
      Parameters:
      attributes - the new attributes collection
      Throws:
      RealmUnavailableException - if updating the attributes collection fails for some reason