Class CollabNetRole


  • public class CollabNetRole
    extends Object
    This class stores information about each CollabNet Role (name, description, associated Jenkins permissions, etc.)
    • Constructor Detail

      • CollabNetRole

        public CollabNetRole​(String name,
                             String description)
      • CollabNetRole

        public CollabNetRole​(String name)
    • Method Detail

      • getName

        public String getName()
        Returns:
        the name of the role.
      • getDescription

        public String getDescription()
        Returns:
        the description of the role.
      • getPermissions

        public Collection<Permission> getPermissions()
        Returns:
        the Jenkins Permissions granted by this role.
      • addPermission

        public void addPermission​(Permission permission)
        Parameters:
        permission - to add.
      • hasPermission

        public boolean hasPermission​(Permission permission)
        Returns:
        true if the role has this permission.
      • equals

        public boolean equals​(Object obj)
        Any two CollabNetRoles with the same name are equal.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Override hashcode so it remains consistent with equals.
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Override for prettier logging.
        Overrides:
        toString in class Object