Class AbstractUserSourceProfile

java.lang.Object
com.inductiveautomation.ignition.gateway.user.UserSourceProfileKernelWrapper
com.inductiveautomation.ignition.gateway.user.AbstractUserSourceProfile
All Implemented Interfaces:
UserSourceProfile, UserSourceProfileKernel
Direct Known Subclasses:
ActiveDirectoryUserSource, DatabaseAutomaticUserSource, DatabaseExpertUserSource, InternalUserSource

public abstract class AbstractUserSourceProfile extends UserSourceProfileKernelWrapper implements UserSourceProfile
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: UserSourceProfile
      The name of this user profile.
      Specified by:
      getName in interface UserSourceProfile
    • getEditFlags

      public Set<UserSourceEditCapability> getEditFlags()
      Description copied from interface: UserSourceProfile
      Which of the editing functions are supported?
      Specified by:
      getEditFlags in interface UserSourceProfile
    • addRole

      public void addRole(String groupName, UICallback ui) throws Exception
      Specified by:
      addRole in interface UserSourceProfile
      Throws:
      Exception
    • removeRole

      public void removeRole(String groupName, UICallback ui) throws Exception
      Specified by:
      removeRole in interface UserSourceProfile
      Throws:
      Exception
    • renameRole

      public void renameRole(String oldName, String newName, UICallback ui) throws Exception
      Specified by:
      renameRole in interface UserSourceProfile
      Throws:
      Exception
    • addUser

      public void addUser(User user, UICallback ui) throws Exception
      Specified by:
      addUser in interface UserSourceProfile
      Throws:
      Exception
    • alterUser

      public void alterUser(User user, UICallback ui) throws Exception
      Specified by:
      alterUser in interface UserSourceProfile
      Throws:
      Exception
    • removeUser

      public void removeUser(User user, UICallback ui) throws Exception
      Specified by:
      removeUser in interface UserSourceProfile
      Throws:
      Exception
    • alterPassword

      public void alterPassword(User user, String oldPassword, String newPassword) throws Exception
      Specified by:
      alterPassword in interface UserSourceProfile
      Throws:
      Exception
    • getUsers

      @Nonnull public abstract Collection<User> getUsers() throws Exception
      Description copied from interface: UserSourceProfile
      Retrieve all users from this profile. This can execute slowly (block) if need be. It will be called periodically by the manager and the results will be cached. Users from failover sources will be returned if hard failover is configured and triggered.
      Specified by:
      getUsers in interface UserSourceProfile
      Throws:
      Exception
    • getUsers

      @Nonnull public Collection<User> getUsers(boolean useFailover) throws Exception
      Description copied from interface: UserSourceProfile
      Retrieve all users from this profile. This can execute slowly (block) if need be. It will be called periodically by the manager and the results will be cached. Users from failover sources will be returned if hard failover is configured and triggered when useFailover argument is true.
      Specified by:
      getUsers in interface UserSourceProfile
      Throws:
      Exception
    • getUser

      @Nonnull public Optional<User> getUser(String userName) throws Exception
      Description copied from interface: UserSourceProfile
      Fetch a User with the given user name. If more than one user exists with the given user name, the first user returned from the underlying data source is returned. Failover sources will be queried if hard failover is configured and the primary sources are unable to fetch the user due to an error. Failover sources will also be queried if soft failover is configured and the user is not found in the primary sources.
      Specified by:
      getUser in interface UserSourceProfile
      Parameters:
      userName - the user name of the User to fetch
      Returns:
      an Optional User with the given user name. the user may be from a failover user source (check User.getProfileName() to confirm)
      Throws:
      Exception - if there is an unexpected problem fetching the user with the given user name
      See Also:
    • getUser

      @Nonnull public Optional<User> getUser(String userName, String userSourceProfileName) throws Exception
      Description copied from interface: UserSourceProfile
      Fetch a User with the given user name and user source profile name. If more than one user exists with the given user name, the first user returned from the underlying data source is returned. Tries to target the user source with the given userSourceProfileName argument in the chain of failover sources (if configured), following the rules of the failover mode that is currently set at each user source in the chain. While visiting each user source in the chain, the failover source will be queried if hard failover is configured and the primary source is unable to fetch the user due to an error, as long as the given userSourceProfileName argument does not match the primary user source name currently being queried, otherwise an empty result is returned. The failover source will also be queried if soft failover is configured and the given userSourceProfileName argument does not match the primary user source name currently being queried.
      Specified by:
      getUser in interface UserSourceProfile
      Parameters:
      userName - the user name of the User to fetch
      userSourceProfileName - the name of the user source profile for the target user
      Returns:
      an Optional User with the given user name
      Throws:
      Exception - if there is an unexpected problem fetching the user with the given user name
      See Also:
    • getRoles

      @Nonnull public abstract Collection<String> getRoles() throws Exception
      Specified by:
      getRoles in interface UserSourceProfile
      Returns:
      a collection of all possible role names for this profile. May be empty. Roles from failover sources will be returned if hard failover is configured and triggered.
      Throws:
      Exception
    • getRoles

      @Nonnull public Collection<String> getRoles(boolean useFailover) throws Exception
      Specified by:
      getRoles in interface UserSourceProfile
      Returns:
      a collection of all possible role names for this profile. May be empty. Roles from failover sources will be returned if hard failover is configured and triggered when useFailover argument is true.
      Throws:
      Exception