java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.vespa.hosted.controller.api.integration.stubs.MockUserManagement
All Implemented Interfaces:
com.yahoo.component.Component, com.yahoo.component.Deconstructable, UserManagement, Comparable<com.yahoo.component.Component>

public class MockUserManagement extends com.yahoo.component.AbstractComponent implements UserManagement
Author:
jonmv
  • Field Summary

    Fields inherited from class com.yahoo.component.AbstractComponent

    isDeconstructable
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Ensures the given user exist, and are part of the given roles, or throws if the roles does not exist.
    void
    addUsers(Role role, Collection<UserId> users)
    Ensures the given users exist, and are part of the given role, or throws if the role does not exist.
    void
    Creates the given role, or throws if the role already exists.
    void
    Ensures the given role does not exist.
    Optional<com.yahoo.jdisc.http.filter.security.misc.User>
    Find a user with all attributes
    List<com.yahoo.jdisc.http.filter.security.misc.User>
    Find all users from the database given query
    Returns all roles
    listRoles(UserId userId)
    Returns all roles of which the given user is part, or throws if the user does not exist
    List<com.yahoo.jdisc.http.filter.security.misc.User>
    Returns all users in the given role, or throws if the role does not exist.
    void
    Ensures the given users are not part of the given role, or throws if the roles does not exist.
    void
    Ensures none of the given users are part of the given role, or throws if the role does not exist.

    Methods inherited from class com.yahoo.component.AbstractComponent

    clone, compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MockUserManagement

      public MockUserManagement()
  • Method Details