Interface RoleActor

All Known Subinterfaces:
ProjectRoleActor
All Known Implementing Classes:
AbstractRoleActor, GroupRoleActorFactory.GroupRoleActor, MockGroupRoleActor, MockProjectRoleManager.MockRoleActor, MockRoleActor, MockUserRoleActor

@Immutable public interface RoleActor
This is an abstraction that allows us to associate users with ProjectRoles.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Does this RoleActor contain the specified user.
    Returns a pretty viewable representation of the contents of the RoleActor (e.g.
    Returns the id for the Role Actor
    Returns the string that identifies the target of this role actor (ex.
    This will get the ProjectRole that this RoleActor belongs to.
    Returns a string that identifies the implementation type.
    Will provide a Set of users encapsulated by this RoleActor.
    boolean
    Whether this Role Actor entity is active or not;
  • Method Details

    • getId

      Long getId()
      Returns the id for the Role Actor
      Returns:
      the id for the Role Actor
    • getProjectRoleId

      Long getProjectRoleId()
      This will get the ProjectRole that this RoleActor belongs to.
      Returns:
      the project role that this instance belongs to.
    • getDescriptor

      String getDescriptor()
      Returns a pretty viewable representation of the contents of the RoleActor (e.g. if a UserRoleActor, then their full name, James Brown, if a GroupRoleActor, then the name of the group, Business Analysts). NOTE that the returned value is used in RoleActorComparator for sorting.
      Returns:
      pretty descriptor
    • getType

      String getType()
      Returns a string that identifies the implementation type. This allows us to group common types.
      Returns:
      implementation type
    • getParameter

      String getParameter()
      Returns the string that identifies the target of this role actor (ex. if you are a group role actor, then this will be the unique identifier of the group, the group name).
      Returns:
      the target of the role actor
    • getUsers

      Set<ApplicationUser> getUsers()
      Will provide a Set of users encapsulated by this RoleActor.

      Returns:
      a Set of users encapsulated by this RoleActor.
    • contains

      boolean contains(ApplicationUser user)
      Does this RoleActor contain the specified user.
      Parameters:
      user - the user to check if they are contained
      Returns:
      true if the user is matched by this RoleActor
    • isActive

      boolean isActive()
      Whether this Role Actor entity is active or not;