Class Roles


  • public class Roles
    extends java.lang.Object
    Validation, utility and serialization methods for roles used in user management.
    Author:
    jonmv
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<ApplicationRole> applicationRoles​(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application)
      Returns the list of ApplicationRoles a UserId may be a member of.
      static java.util.List<TenantRole> tenantRoles​(com.yahoo.config.provision.TenantName tenant)
      Returns the list of TenantRoles a UserId may be a member of.
      static Role toRole​(com.yahoo.config.provision.TenantName tenant, com.yahoo.config.provision.ApplicationName application, java.lang.String roleName)
      Returns the Role the given tenant and role names correspond to.
      static Role toRole​(com.yahoo.config.provision.TenantName tenant, java.lang.String roleName)
      Returns the Role the given tenant, application and role names correspond to.
      static Role toRole​(java.lang.String value)
      Returns the Role the given value represents.
      static java.lang.String valueOf​(Role role)
      Returns a serialised representation the given role.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • tenantRoles

        public static java.util.List<TenantRole> tenantRoles​(com.yahoo.config.provision.TenantName tenant)
        Returns the list of TenantRoles a UserId may be a member of.
      • applicationRoles

        public static java.util.List<ApplicationRole> applicationRoles​(com.yahoo.config.provision.TenantName tenant,
                                                                       com.yahoo.config.provision.ApplicationName application)
        Returns the list of ApplicationRoles a UserId may be a member of.
      • toRole

        public static Role toRole​(java.lang.String value)
        Returns the Role the given value represents.
      • toRole

        public static Role toRole​(com.yahoo.config.provision.TenantName tenant,
                                  java.lang.String roleName)
        Returns the Role the given tenant, application and role names correspond to.
      • toRole

        public static Role toRole​(com.yahoo.config.provision.TenantName tenant,
                                  com.yahoo.config.provision.ApplicationName application,
                                  java.lang.String roleName)
        Returns the Role the given tenant and role names correspond to.
      • valueOf

        public static java.lang.String valueOf​(Role role)
        Returns a serialised representation the given role.