@Test public void testGetSubResourceDefinitions() throws Exception { ViewVersionResourceDefinition viewVersionResourceDefinition = new ViewVersionResourceDefinition(); Set<SubResourceDefinition> subResourceDefinitions = viewVersionResourceDefinition.getSubResourceDefinitions (); Assert.assertEquals(2, subResourceDefinitions.size()); for (SubResourceDefinition subResourceDefinition : subResourceDefinitions) { String name = subResourceDefinition.getType().name(); Assert.assertTrue(name.equals("ViewInstance") || name.equals("ViewPermission")); } }
@Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subResourceDefinitions = new HashSet<SubResourceDefinition>(); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewInstance)); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewPermission)); return subResourceDefinitions; }
ViewVersionResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subResourceDefinitions = new HashSet<SubResourceDefinition>(); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewInstance)); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewPermission)); return subResourceDefinitions; } }
ViewVersionResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subResourceDefinitions = new HashSet<SubResourceDefinition>(); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewInstance)); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewPermission)); return subResourceDefinitions; } ViewVersionResourceDefinition(); }
ViewVersionResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subResourceDefinitions = new HashSet<SubResourceDefinition>(); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewInstance)); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewPermission)); return subResourceDefinitions; } ViewVersionResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Set<SubResourceDefinition> getSubResourceDefinitions(); }
ViewVersionResourceDefinition extends BaseResourceDefinition { @Override public Set<SubResourceDefinition> getSubResourceDefinitions() { Set<SubResourceDefinition> subResourceDefinitions = new HashSet<SubResourceDefinition>(); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewInstance)); subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewPermission)); return subResourceDefinitions; } ViewVersionResourceDefinition(); @Override String getPluralName(); @Override String getSingularName(); @Override Set<SubResourceDefinition> getSubResourceDefinitions();  }