@Test public void testGetClusterKerberosDescriptorResourceProvider() { AmbariManagementController managementController = createMock(AmbariManagementController.class); replay(managementController); ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider( Resource.Type.ClusterKerberosDescriptor, null, null, managementController); verify(managementController); assertEquals(ClusterKerberosDescriptorResourceProvider.class, provider.getClass()); }
public static ResourceProvider getResourceProvider(Resource.Type type, Set<String> propertyIds, Map<Resource.Type, String> keyPropertyIds, AmbariManagementController managementController) { switch (type.getInternalType()) { case Cluster: return new ClusterResourceProvider(managementController); case Service: return resourceProviderFactory.getServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case Component: return resourceProviderFactory.getComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Host: return resourceProviderFactory.getHostResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponent: return resourceProviderFactory.getHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Configuration: return new ConfigurationResourceProvider(managementController); case ServiceConfigVersion: return new ServiceConfigVersionResourceProvider(managementController); case Action: return new ActionResourceProvider(propertyIds, keyPropertyIds, managementController); case Request: return new RequestResourceProvider(propertyIds, keyPropertyIds, managementController); case Task: return new TaskResourceProvider(propertyIds, keyPropertyIds, managementController); case User: return new UserResourceProvider(propertyIds, keyPropertyIds, managementController); case Group: return new GroupResourceProvider(propertyIds, keyPropertyIds, managementController); case Member: return resourceProviderFactory.getMemberResourceProvider(propertyIds, keyPropertyIds, managementController); case Upgrade: return resourceProviderFactory.getUpgradeResourceProvider(managementController); case Stack: return new StackResourceProvider(propertyIds, keyPropertyIds, managementController); case StackVersion: return new StackVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case ClusterStackVersion: return new ClusterStackVersionResourceProvider(managementController); case HostStackVersion: return new HostStackVersionResourceProvider(managementController); case StackService: return new StackServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case StackServiceComponent: return new StackServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfiguration: return new StackConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfigurationDependency: return new StackConfigurationDependencyResourceProvider(propertyIds, keyPropertyIds, managementController); case StackLevelConfiguration: return new StackLevelConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionLink: return new ExtensionLinkResourceProvider(propertyIds, keyPropertyIds, managementController); case Extension: return new ExtensionResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionVersion: return new ExtensionVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case RootService: return new RootServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceComponent: return new RootServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceHostComponent: return new RootServiceHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case ConfigGroup: return new ConfigGroupResourceProvider(propertyIds, keyPropertyIds, managementController); case RequestSchedule: return new RequestScheduleResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponentProcess: return new HostComponentProcessResourceProvider(propertyIds, keyPropertyIds, managementController); case Blueprint: return new BlueprintResourceProvider(propertyIds, keyPropertyIds, managementController); case KerberosDescriptor: return resourceProviderFactory.getKerberosDescriptorResourceProvider(managementController, propertyIds, keyPropertyIds); case Recommendation: return new RecommendationResourceProvider(propertyIds, keyPropertyIds, managementController); case Validation: return new ValidationResourceProvider(propertyIds, keyPropertyIds, managementController); case ClientConfig: return new ClientConfigResourceProvider(propertyIds, keyPropertyIds, managementController); case RepositoryVersion: return resourceProviderFactory.getRepositoryVersionResourceProvider(); case CompatibleRepositoryVersion: return new CompatibleRepositoryVersionResourceProvider(managementController); case StackArtifact: return new StackArtifactResourceProvider(managementController); case Theme: return new ThemeArtifactResourceProvider(managementController); case QuickLink: return new QuickLinkArtifactResourceProvider(managementController); case ActiveWidgetLayout: return new ActiveWidgetLayoutResourceProvider(managementController); case WidgetLayout: return new WidgetLayoutResourceProvider(managementController); case Widget: return new WidgetResourceProvider(managementController); case HostKerberosIdentity: return resourceProviderFactory.getHostKerberosIdentityResourceProvider(managementController); case Credential: return resourceProviderFactory.getCredentialResourceProvider(managementController); case RoleAuthorization: return new RoleAuthorizationResourceProvider(managementController); case UserAuthorization: return new UserAuthorizationResourceProvider(managementController); case VersionDefinition: return new VersionDefinitionResourceProvider(); case ClusterKerberosDescriptor: return new ClusterKerberosDescriptorResourceProvider(managementController); case LoggingQuery: return new LoggingResourceProvider(propertyIds, keyPropertyIds, managementController); default: throw new IllegalArgumentException("Unknown type " + type); } }
AbstractControllerResourceProvider extends AbstractAuthorizedResourceProvider { public static ResourceProvider getResourceProvider(Resource.Type type, Set<String> propertyIds, Map<Resource.Type, String> keyPropertyIds, AmbariManagementController managementController) { switch (type.getInternalType()) { case Cluster: return new ClusterResourceProvider(managementController); case Service: return resourceProviderFactory.getServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case Component: return resourceProviderFactory.getComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Host: return resourceProviderFactory.getHostResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponent: return resourceProviderFactory.getHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Configuration: return new ConfigurationResourceProvider(managementController); case ServiceConfigVersion: return new ServiceConfigVersionResourceProvider(managementController); case Action: return new ActionResourceProvider(propertyIds, keyPropertyIds, managementController); case Request: return new RequestResourceProvider(propertyIds, keyPropertyIds, managementController); case Task: return new TaskResourceProvider(propertyIds, keyPropertyIds, managementController); case User: return new UserResourceProvider(propertyIds, keyPropertyIds, managementController); case Group: return new GroupResourceProvider(propertyIds, keyPropertyIds, managementController); case Member: return resourceProviderFactory.getMemberResourceProvider(propertyIds, keyPropertyIds, managementController); case Upgrade: return resourceProviderFactory.getUpgradeResourceProvider(managementController); case Stack: return new StackResourceProvider(propertyIds, keyPropertyIds, managementController); case StackVersion: return new StackVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case ClusterStackVersion: return new ClusterStackVersionResourceProvider(managementController); case HostStackVersion: return new HostStackVersionResourceProvider(managementController); case StackService: return new StackServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case StackServiceComponent: return new StackServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfiguration: return new StackConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfigurationDependency: return new StackConfigurationDependencyResourceProvider(propertyIds, keyPropertyIds, managementController); case StackLevelConfiguration: return new StackLevelConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionLink: return new ExtensionLinkResourceProvider(propertyIds, keyPropertyIds, managementController); case Extension: return new ExtensionResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionVersion: return new ExtensionVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case RootService: return new RootServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceComponent: return new RootServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceHostComponent: return new RootServiceHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case ConfigGroup: return new ConfigGroupResourceProvider(propertyIds, keyPropertyIds, managementController); case RequestSchedule: return new RequestScheduleResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponentProcess: return new HostComponentProcessResourceProvider(propertyIds, keyPropertyIds, managementController); case Blueprint: return new BlueprintResourceProvider(propertyIds, keyPropertyIds, managementController); case KerberosDescriptor: return resourceProviderFactory.getKerberosDescriptorResourceProvider(managementController, propertyIds, keyPropertyIds); case Recommendation: return new RecommendationResourceProvider(propertyIds, keyPropertyIds, managementController); case Validation: return new ValidationResourceProvider(propertyIds, keyPropertyIds, managementController); case ClientConfig: return new ClientConfigResourceProvider(propertyIds, keyPropertyIds, managementController); case RepositoryVersion: return resourceProviderFactory.getRepositoryVersionResourceProvider(); case CompatibleRepositoryVersion: return new CompatibleRepositoryVersionResourceProvider(managementController); case StackArtifact: return new StackArtifactResourceProvider(managementController); case Theme: return new ThemeArtifactResourceProvider(managementController); case QuickLink: return new QuickLinkArtifactResourceProvider(managementController); case ActiveWidgetLayout: return new ActiveWidgetLayoutResourceProvider(managementController); case WidgetLayout: return new WidgetLayoutResourceProvider(managementController); case Widget: return new WidgetResourceProvider(managementController); case HostKerberosIdentity: return resourceProviderFactory.getHostKerberosIdentityResourceProvider(managementController); case Credential: return resourceProviderFactory.getCredentialResourceProvider(managementController); case RoleAuthorization: return new RoleAuthorizationResourceProvider(managementController); case UserAuthorization: return new UserAuthorizationResourceProvider(managementController); case VersionDefinition: return new VersionDefinitionResourceProvider(); case ClusterKerberosDescriptor: return new ClusterKerberosDescriptorResourceProvider(managementController); case LoggingQuery: return new LoggingResourceProvider(propertyIds, keyPropertyIds, managementController); default: throw new IllegalArgumentException("Unknown type " + type); } } }
AbstractControllerResourceProvider extends AbstractAuthorizedResourceProvider { public static ResourceProvider getResourceProvider(Resource.Type type, Set<String> propertyIds, Map<Resource.Type, String> keyPropertyIds, AmbariManagementController managementController) { switch (type.getInternalType()) { case Cluster: return new ClusterResourceProvider(managementController); case Service: return resourceProviderFactory.getServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case Component: return resourceProviderFactory.getComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Host: return resourceProviderFactory.getHostResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponent: return resourceProviderFactory.getHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Configuration: return new ConfigurationResourceProvider(managementController); case ServiceConfigVersion: return new ServiceConfigVersionResourceProvider(managementController); case Action: return new ActionResourceProvider(propertyIds, keyPropertyIds, managementController); case Request: return new RequestResourceProvider(propertyIds, keyPropertyIds, managementController); case Task: return new TaskResourceProvider(propertyIds, keyPropertyIds, managementController); case User: return new UserResourceProvider(propertyIds, keyPropertyIds, managementController); case Group: return new GroupResourceProvider(propertyIds, keyPropertyIds, managementController); case Member: return resourceProviderFactory.getMemberResourceProvider(propertyIds, keyPropertyIds, managementController); case Upgrade: return resourceProviderFactory.getUpgradeResourceProvider(managementController); case Stack: return new StackResourceProvider(propertyIds, keyPropertyIds, managementController); case StackVersion: return new StackVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case ClusterStackVersion: return new ClusterStackVersionResourceProvider(managementController); case HostStackVersion: return new HostStackVersionResourceProvider(managementController); case StackService: return new StackServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case StackServiceComponent: return new StackServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfiguration: return new StackConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfigurationDependency: return new StackConfigurationDependencyResourceProvider(propertyIds, keyPropertyIds, managementController); case StackLevelConfiguration: return new StackLevelConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionLink: return new ExtensionLinkResourceProvider(propertyIds, keyPropertyIds, managementController); case Extension: return new ExtensionResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionVersion: return new ExtensionVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case RootService: return new RootServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceComponent: return new RootServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceHostComponent: return new RootServiceHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case ConfigGroup: return new ConfigGroupResourceProvider(propertyIds, keyPropertyIds, managementController); case RequestSchedule: return new RequestScheduleResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponentProcess: return new HostComponentProcessResourceProvider(propertyIds, keyPropertyIds, managementController); case Blueprint: return new BlueprintResourceProvider(propertyIds, keyPropertyIds, managementController); case KerberosDescriptor: return resourceProviderFactory.getKerberosDescriptorResourceProvider(managementController, propertyIds, keyPropertyIds); case Recommendation: return new RecommendationResourceProvider(propertyIds, keyPropertyIds, managementController); case Validation: return new ValidationResourceProvider(propertyIds, keyPropertyIds, managementController); case ClientConfig: return new ClientConfigResourceProvider(propertyIds, keyPropertyIds, managementController); case RepositoryVersion: return resourceProviderFactory.getRepositoryVersionResourceProvider(); case CompatibleRepositoryVersion: return new CompatibleRepositoryVersionResourceProvider(managementController); case StackArtifact: return new StackArtifactResourceProvider(managementController); case Theme: return new ThemeArtifactResourceProvider(managementController); case QuickLink: return new QuickLinkArtifactResourceProvider(managementController); case ActiveWidgetLayout: return new ActiveWidgetLayoutResourceProvider(managementController); case WidgetLayout: return new WidgetLayoutResourceProvider(managementController); case Widget: return new WidgetResourceProvider(managementController); case HostKerberosIdentity: return resourceProviderFactory.getHostKerberosIdentityResourceProvider(managementController); case Credential: return resourceProviderFactory.getCredentialResourceProvider(managementController); case RoleAuthorization: return new RoleAuthorizationResourceProvider(managementController); case UserAuthorization: return new UserAuthorizationResourceProvider(managementController); case VersionDefinition: return new VersionDefinitionResourceProvider(); case ClusterKerberosDescriptor: return new ClusterKerberosDescriptorResourceProvider(managementController); case LoggingQuery: return new LoggingResourceProvider(propertyIds, keyPropertyIds, managementController); default: throw new IllegalArgumentException("Unknown type " + type); } } protected  AbstractControllerResourceProvider(Set<String> propertyIds,
                                               Map<Resource.Type, String> keyPropertyIds,
                                               AmbariManagementController managementController); }
AbstractControllerResourceProvider extends AbstractAuthorizedResourceProvider { public static ResourceProvider getResourceProvider(Resource.Type type, Set<String> propertyIds, Map<Resource.Type, String> keyPropertyIds, AmbariManagementController managementController) { switch (type.getInternalType()) { case Cluster: return new ClusterResourceProvider(managementController); case Service: return resourceProviderFactory.getServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case Component: return resourceProviderFactory.getComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Host: return resourceProviderFactory.getHostResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponent: return resourceProviderFactory.getHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Configuration: return new ConfigurationResourceProvider(managementController); case ServiceConfigVersion: return new ServiceConfigVersionResourceProvider(managementController); case Action: return new ActionResourceProvider(propertyIds, keyPropertyIds, managementController); case Request: return new RequestResourceProvider(propertyIds, keyPropertyIds, managementController); case Task: return new TaskResourceProvider(propertyIds, keyPropertyIds, managementController); case User: return new UserResourceProvider(propertyIds, keyPropertyIds, managementController); case Group: return new GroupResourceProvider(propertyIds, keyPropertyIds, managementController); case Member: return resourceProviderFactory.getMemberResourceProvider(propertyIds, keyPropertyIds, managementController); case Upgrade: return resourceProviderFactory.getUpgradeResourceProvider(managementController); case Stack: return new StackResourceProvider(propertyIds, keyPropertyIds, managementController); case StackVersion: return new StackVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case ClusterStackVersion: return new ClusterStackVersionResourceProvider(managementController); case HostStackVersion: return new HostStackVersionResourceProvider(managementController); case StackService: return new StackServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case StackServiceComponent: return new StackServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfiguration: return new StackConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfigurationDependency: return new StackConfigurationDependencyResourceProvider(propertyIds, keyPropertyIds, managementController); case StackLevelConfiguration: return new StackLevelConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionLink: return new ExtensionLinkResourceProvider(propertyIds, keyPropertyIds, managementController); case Extension: return new ExtensionResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionVersion: return new ExtensionVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case RootService: return new RootServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceComponent: return new RootServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceHostComponent: return new RootServiceHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case ConfigGroup: return new ConfigGroupResourceProvider(propertyIds, keyPropertyIds, managementController); case RequestSchedule: return new RequestScheduleResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponentProcess: return new HostComponentProcessResourceProvider(propertyIds, keyPropertyIds, managementController); case Blueprint: return new BlueprintResourceProvider(propertyIds, keyPropertyIds, managementController); case KerberosDescriptor: return resourceProviderFactory.getKerberosDescriptorResourceProvider(managementController, propertyIds, keyPropertyIds); case Recommendation: return new RecommendationResourceProvider(propertyIds, keyPropertyIds, managementController); case Validation: return new ValidationResourceProvider(propertyIds, keyPropertyIds, managementController); case ClientConfig: return new ClientConfigResourceProvider(propertyIds, keyPropertyIds, managementController); case RepositoryVersion: return resourceProviderFactory.getRepositoryVersionResourceProvider(); case CompatibleRepositoryVersion: return new CompatibleRepositoryVersionResourceProvider(managementController); case StackArtifact: return new StackArtifactResourceProvider(managementController); case Theme: return new ThemeArtifactResourceProvider(managementController); case QuickLink: return new QuickLinkArtifactResourceProvider(managementController); case ActiveWidgetLayout: return new ActiveWidgetLayoutResourceProvider(managementController); case WidgetLayout: return new WidgetLayoutResourceProvider(managementController); case Widget: return new WidgetResourceProvider(managementController); case HostKerberosIdentity: return resourceProviderFactory.getHostKerberosIdentityResourceProvider(managementController); case Credential: return resourceProviderFactory.getCredentialResourceProvider(managementController); case RoleAuthorization: return new RoleAuthorizationResourceProvider(managementController); case UserAuthorization: return new UserAuthorizationResourceProvider(managementController); case VersionDefinition: return new VersionDefinitionResourceProvider(); case ClusterKerberosDescriptor: return new ClusterKerberosDescriptorResourceProvider(managementController); case LoggingQuery: return new LoggingResourceProvider(propertyIds, keyPropertyIds, managementController); default: throw new IllegalArgumentException("Unknown type " + type); } } protected  AbstractControllerResourceProvider(Set<String> propertyIds,
                                               Map<Resource.Type, String> keyPropertyIds,
                                               AmbariManagementController managementController); static void init(ResourceProviderFactory factory); static ResourceProvider getResourceProvider(Resource.Type type,
                                                     Set<String> propertyIds,
                                                     Map<Resource.Type, String> keyPropertyIds,
                                                     AmbariManagementController managementController); }
AbstractControllerResourceProvider extends AbstractAuthorizedResourceProvider { public static ResourceProvider getResourceProvider(Resource.Type type, Set<String> propertyIds, Map<Resource.Type, String> keyPropertyIds, AmbariManagementController managementController) { switch (type.getInternalType()) { case Cluster: return new ClusterResourceProvider(managementController); case Service: return resourceProviderFactory.getServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case Component: return resourceProviderFactory.getComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Host: return resourceProviderFactory.getHostResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponent: return resourceProviderFactory.getHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case Configuration: return new ConfigurationResourceProvider(managementController); case ServiceConfigVersion: return new ServiceConfigVersionResourceProvider(managementController); case Action: return new ActionResourceProvider(propertyIds, keyPropertyIds, managementController); case Request: return new RequestResourceProvider(propertyIds, keyPropertyIds, managementController); case Task: return new TaskResourceProvider(propertyIds, keyPropertyIds, managementController); case User: return new UserResourceProvider(propertyIds, keyPropertyIds, managementController); case Group: return new GroupResourceProvider(propertyIds, keyPropertyIds, managementController); case Member: return resourceProviderFactory.getMemberResourceProvider(propertyIds, keyPropertyIds, managementController); case Upgrade: return resourceProviderFactory.getUpgradeResourceProvider(managementController); case Stack: return new StackResourceProvider(propertyIds, keyPropertyIds, managementController); case StackVersion: return new StackVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case ClusterStackVersion: return new ClusterStackVersionResourceProvider(managementController); case HostStackVersion: return new HostStackVersionResourceProvider(managementController); case StackService: return new StackServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case StackServiceComponent: return new StackServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfiguration: return new StackConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case StackConfigurationDependency: return new StackConfigurationDependencyResourceProvider(propertyIds, keyPropertyIds, managementController); case StackLevelConfiguration: return new StackLevelConfigurationResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionLink: return new ExtensionLinkResourceProvider(propertyIds, keyPropertyIds, managementController); case Extension: return new ExtensionResourceProvider(propertyIds, keyPropertyIds, managementController); case ExtensionVersion: return new ExtensionVersionResourceProvider(propertyIds, keyPropertyIds, managementController); case RootService: return new RootServiceResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceComponent: return new RootServiceComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case RootServiceHostComponent: return new RootServiceHostComponentResourceProvider(propertyIds, keyPropertyIds, managementController); case ConfigGroup: return new ConfigGroupResourceProvider(propertyIds, keyPropertyIds, managementController); case RequestSchedule: return new RequestScheduleResourceProvider(propertyIds, keyPropertyIds, managementController); case HostComponentProcess: return new HostComponentProcessResourceProvider(propertyIds, keyPropertyIds, managementController); case Blueprint: return new BlueprintResourceProvider(propertyIds, keyPropertyIds, managementController); case KerberosDescriptor: return resourceProviderFactory.getKerberosDescriptorResourceProvider(managementController, propertyIds, keyPropertyIds); case Recommendation: return new RecommendationResourceProvider(propertyIds, keyPropertyIds, managementController); case Validation: return new ValidationResourceProvider(propertyIds, keyPropertyIds, managementController); case ClientConfig: return new ClientConfigResourceProvider(propertyIds, keyPropertyIds, managementController); case RepositoryVersion: return resourceProviderFactory.getRepositoryVersionResourceProvider(); case CompatibleRepositoryVersion: return new CompatibleRepositoryVersionResourceProvider(managementController); case StackArtifact: return new StackArtifactResourceProvider(managementController); case Theme: return new ThemeArtifactResourceProvider(managementController); case QuickLink: return new QuickLinkArtifactResourceProvider(managementController); case ActiveWidgetLayout: return new ActiveWidgetLayoutResourceProvider(managementController); case WidgetLayout: return new WidgetLayoutResourceProvider(managementController); case Widget: return new WidgetResourceProvider(managementController); case HostKerberosIdentity: return resourceProviderFactory.getHostKerberosIdentityResourceProvider(managementController); case Credential: return resourceProviderFactory.getCredentialResourceProvider(managementController); case RoleAuthorization: return new RoleAuthorizationResourceProvider(managementController); case UserAuthorization: return new UserAuthorizationResourceProvider(managementController); case VersionDefinition: return new VersionDefinitionResourceProvider(); case ClusterKerberosDescriptor: return new ClusterKerberosDescriptorResourceProvider(managementController); case LoggingQuery: return new LoggingResourceProvider(propertyIds, keyPropertyIds, managementController); default: throw new IllegalArgumentException("Unknown type " + type); } } protected  AbstractControllerResourceProvider(Set<String> propertyIds,
                                               Map<Resource.Type, String> keyPropertyIds,
                                               AmbariManagementController managementController); static void init(ResourceProviderFactory factory); static ResourceProvider getResourceProvider(Resource.Type type,
                                                     Set<String> propertyIds,
                                                     Map<Resource.Type, String> keyPropertyIds,
                                                     AmbariManagementController managementController);  }