@Test public void testGetSubResourceDefinitions() { final ResourceDefinition resource = new HostResourceDefinition(); Set<SubResourceDefinition> subResources = resource.getSubResourceDefinitions(); assertEquals(4, subResources.size()); assertTrue(includesType(subResources, Resource.Type.HostComponent)); assertTrue(includesType(subResources, Resource.Type.Alert)); assertTrue(includesType(subResources, Resource.Type.HostStackVersion)); assertTrue(includesType(subResources, Resource.Type.HostKerberosIdentity)); }
@Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subs = new HashSet<>(); subs.add(new SubResourceDefinition(Resource.Type.HostComponent)); subs.add(new SubResourceDefinition(Resource.Type.Alert)); subs.add(new SubResourceDefinition(Resource.Type.HostStackVersion)); subs.add(new SubResourceDefinition(Resource.Type.HostKerberosIdentity)); return subs; }
HostResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subs = new HashSet<>(); subs.add(new SubResourceDefinition(Resource.Type.HostComponent)); subs.add(new SubResourceDefinition(Resource.Type.Alert)); subs.add(new SubResourceDefinition(Resource.Type.HostStackVersion)); subs.add(new SubResourceDefinition(Resource.Type.HostKerberosIdentity)); return subs; } }
HostResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subs = new HashSet<>(); subs.add(new SubResourceDefinition(Resource.Type.HostComponent)); subs.add(new SubResourceDefinition(Resource.Type.Alert)); subs.add(new SubResourceDefinition(Resource.Type.HostStackVersion)); subs.add(new SubResourceDefinition(Resource.Type.HostKerberosIdentity)); return subs; } HostResourceDefinition(); }
HostResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subs = new HashSet<>(); subs.add(new SubResourceDefinition(Resource.Type.HostComponent)); subs.add(new SubResourceDefinition(Resource.Type.Alert)); subs.add(new SubResourceDefinition(Resource.Type.HostStackVersion)); subs.add(new SubResourceDefinition(Resource.Type.HostKerberosIdentity)); return subs; } HostResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Collection<String> getDeleteDirectives(); @Override Set<SubResourceDefinition> getSubResourceDefinitions(); }
HostResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subs = new HashSet<>(); subs.add(new SubResourceDefinition(Resource.Type.HostComponent)); subs.add(new SubResourceDefinition(Resource.Type.Alert)); subs.add(new SubResourceDefinition(Resource.Type.HostStackVersion)); subs.add(new SubResourceDefinition(Resource.Type.HostKerberosIdentity)); return subs; } HostResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Collection<String> getDeleteDirectives(); @Override Set<SubResourceDefinition> getSubResourceDefinitions();  }