@Test public void testGetSubResourceDefinitions() throws Exception { ViewInstanceResourceDefinition viewInstanceResourceDefinition = getViewInstanceResourceDefinition(); Set<SubResourceDefinition> subResourceDefinitions = viewInstanceResourceDefinition.getSubResourceDefinitions(); Assert.assertEquals(3, subResourceDefinitions.size()); for (SubResourceDefinition subResourceDefinition : subResourceDefinitions) { Resource.Type type = subResourceDefinition.getType(); Assert.assertTrue(type.name().equals("sub1") || type.name().equals("sub2") || type.equals(Resource.Type.ViewPrivilege)); } }
@Override public Set<SubResourceDefinition> getSubResourceDefinitions() { return subResourceDefinitions; }
ViewInstanceResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { return subResourceDefinitions; } }
ViewInstanceResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { return subResourceDefinitions; } ViewInstanceResourceDefinition(Set<SubResourceDefinition> subResourceDefinitions); }
ViewInstanceResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { return subResourceDefinitions; } ViewInstanceResourceDefinition(Set<SubResourceDefinition> subResourceDefinitions); @Override String getPluralName(); @Override String getSingularName(); @Override Set<SubResourceDefinition> getSubResourceDefinitions(); }
ViewInstanceResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { return subResourceDefinitions; } ViewInstanceResourceDefinition(Set<SubResourceDefinition> subResourceDefinitions); @Override String getPluralName(); @Override String getSingularName(); @Override Set<SubResourceDefinition> getSubResourceDefinitions();  }