@Test public void testGetSubResourceDefinitions() { ResourceDefinition resource = new ClusterResourceDefinition(); Set<SubResourceDefinition> subResources = resource.getSubResourceDefinitions(); assertEquals(13, subResources.size()); assertTrue(includesType(subResources, Resource.Type.Service)); assertTrue(includesType(subResources, Resource.Type.Host)); assertTrue(includesType(subResources, Resource.Type.Configuration)); assertTrue(includesType(subResources, Resource.Type.Request)); assertTrue(includesType(subResources, Resource.Type.Workflow)); assertTrue(includesType(subResources, Resource.Type.ConfigGroup)); assertTrue(includesType(subResources, Resource.Type.AlertDefinition)); assertTrue(includesType(subResources, Resource.Type.ServiceConfigVersion)); assertTrue(includesType(subResources, Resource.Type.ClusterPrivilege)); assertTrue(includesType(subResources, Resource.Type.Alert)); assertTrue(includesType(subResources, Resource.Type.ClusterStackVersion)); assertTrue(includesType(subResources, Resource.Type.Artifact)); assertTrue(includesType(subResources, Resource.Type.ClusterKerberosDescriptor)); }
@Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> setChildren = new HashSet<SubResourceDefinition>(); setChildren.add(new SubResourceDefinition(Resource.Type.Service)); setChildren.add(new SubResourceDefinition(Resource.Type.Host)); setChildren.add(new SubResourceDefinition(Resource.Type.Configuration)); setChildren.add(new SubResourceDefinition(Resource.Type.ServiceConfigVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.Request)); setChildren.add(new SubResourceDefinition(Resource.Type.Workflow)); setChildren.add(new SubResourceDefinition(Resource.Type.ConfigGroup)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterPrivilege)); setChildren.add(new SubResourceDefinition(Resource.Type.AlertDefinition)); setChildren.add(new SubResourceDefinition(Resource.Type.Alert)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterStackVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterKerberosDescriptor)); setChildren.add(new SubResourceDefinition(Resource.Type.Artifact)); return setChildren; }
ClusterResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> setChildren = new HashSet<SubResourceDefinition>(); setChildren.add(new SubResourceDefinition(Resource.Type.Service)); setChildren.add(new SubResourceDefinition(Resource.Type.Host)); setChildren.add(new SubResourceDefinition(Resource.Type.Configuration)); setChildren.add(new SubResourceDefinition(Resource.Type.ServiceConfigVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.Request)); setChildren.add(new SubResourceDefinition(Resource.Type.Workflow)); setChildren.add(new SubResourceDefinition(Resource.Type.ConfigGroup)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterPrivilege)); setChildren.add(new SubResourceDefinition(Resource.Type.AlertDefinition)); setChildren.add(new SubResourceDefinition(Resource.Type.Alert)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterStackVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterKerberosDescriptor)); setChildren.add(new SubResourceDefinition(Resource.Type.Artifact)); return setChildren; } }
ClusterResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> setChildren = new HashSet<SubResourceDefinition>(); setChildren.add(new SubResourceDefinition(Resource.Type.Service)); setChildren.add(new SubResourceDefinition(Resource.Type.Host)); setChildren.add(new SubResourceDefinition(Resource.Type.Configuration)); setChildren.add(new SubResourceDefinition(Resource.Type.ServiceConfigVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.Request)); setChildren.add(new SubResourceDefinition(Resource.Type.Workflow)); setChildren.add(new SubResourceDefinition(Resource.Type.ConfigGroup)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterPrivilege)); setChildren.add(new SubResourceDefinition(Resource.Type.AlertDefinition)); setChildren.add(new SubResourceDefinition(Resource.Type.Alert)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterStackVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterKerberosDescriptor)); setChildren.add(new SubResourceDefinition(Resource.Type.Artifact)); return setChildren; } ClusterResourceDefinition(); }
ClusterResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> setChildren = new HashSet<SubResourceDefinition>(); setChildren.add(new SubResourceDefinition(Resource.Type.Service)); setChildren.add(new SubResourceDefinition(Resource.Type.Host)); setChildren.add(new SubResourceDefinition(Resource.Type.Configuration)); setChildren.add(new SubResourceDefinition(Resource.Type.ServiceConfigVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.Request)); setChildren.add(new SubResourceDefinition(Resource.Type.Workflow)); setChildren.add(new SubResourceDefinition(Resource.Type.ConfigGroup)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterPrivilege)); setChildren.add(new SubResourceDefinition(Resource.Type.AlertDefinition)); setChildren.add(new SubResourceDefinition(Resource.Type.Alert)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterStackVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterKerberosDescriptor)); setChildren.add(new SubResourceDefinition(Resource.Type.Artifact)); return setChildren; } ClusterResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Renderer getRenderer(String name); @Override Set<SubResourceDefinition> getSubResourceDefinitions(); @Override Collection<String> getUpdateDirectives(); }
ClusterResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> setChildren = new HashSet<SubResourceDefinition>(); setChildren.add(new SubResourceDefinition(Resource.Type.Service)); setChildren.add(new SubResourceDefinition(Resource.Type.Host)); setChildren.add(new SubResourceDefinition(Resource.Type.Configuration)); setChildren.add(new SubResourceDefinition(Resource.Type.ServiceConfigVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.Request)); setChildren.add(new SubResourceDefinition(Resource.Type.Workflow)); setChildren.add(new SubResourceDefinition(Resource.Type.ConfigGroup)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterPrivilege)); setChildren.add(new SubResourceDefinition(Resource.Type.AlertDefinition)); setChildren.add(new SubResourceDefinition(Resource.Type.Alert)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterStackVersion)); setChildren.add(new SubResourceDefinition(Resource.Type.ClusterKerberosDescriptor)); setChildren.add(new SubResourceDefinition(Resource.Type.Artifact)); return setChildren; } ClusterResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Renderer getRenderer(String name); @Override Set<SubResourceDefinition> getSubResourceDefinitions(); @Override Collection<String> getUpdateDirectives();  }