Interface Role

  • All Superinterfaces:
    Loggable
    All Known Implementing Classes:
    RoleImpl

    public interface Role
    extends Loggable
    Presents user role in TeamCity.
    • Method Detail

      • getId

        @NotNull
        String getId()
        Returns id of the role
        Returns:
        id of the role
      • getName

        @NotNull
        String getName()
        Returns name of the role
        Returns:
        name of the role
      • getPermissions

        @NotNull
        Permissions getPermissions()
        Returns permissions of the role
        Returns:
        permissions of the role
      • getOwnPermissions

        @NotNull
        Permissions getOwnPermissions()
        Return only own permissions of the role without inherited permissions
        Returns:
        own permissions of the role
      • getIncludedRoles

        @NotNull
        Role[] getIncludedRoles()
        Returns roles which are included in this role
        Returns:
        included roles
      • isProjectAssociationSupported

        boolean isProjectAssociationSupported()
        Returns true if this role can be associated with a particular project. This means that this role contains at least one permission that can be associated with a project.
        Returns:
        true if this role can be associated with a project
      • addPermissions

        void addPermissions​(@NotNull
                            Permission... permissions)
        Adds permissions to the role
        Parameters:
        permissions - permissions
      • removePermission

        void removePermission​(@NotNull
                              Permission permission)
        Removes permission from the role
        Parameters:
        permission - permission
      • addIncludedRole

        void addIncludedRole​(@NotNull
                             Role includedRole)
        Includes includedRole to the role
        Parameters:
        includedRole - role to include
      • removeIncludedRole

        void removeIncludedRole​(@NotNull
                                Role includedRole)
        Excludes includedRole from the role
        Parameters:
        includedRole - role to include