@Test public void testGetSubcommunities() throws Exception { assertThat("testGetSubcommunities 0", c.getSubcommunities(), notNullValue()); assertTrue("testGetSubcommunities 1", c.getSubcommunities().size() == 0); context.turnOffAuthorisationSystem(); Community community = communityService.create(c, context); communityService .setMetadataSingleValue(context, community, MetadataSchemaEnum.DC.getName(), "title", null, Item.ANY, "subcommunity B"); community = communityService.create(c, context); communityService .setMetadataSingleValue(context, community, MetadataSchemaEnum.DC.getName(), "title", null, Item.ANY, "subcommunity A"); community = communityService.create(c, context); communityService .setMetadataSingleValue(context, community, MetadataSchemaEnum.DC.getName(), "title", null, Item.ANY, "subcommunity C"); context.restoreAuthSystemState(); assertTrue("testGetCollections 2", c.getSubcommunities().get(0).getName().equals("subcommunity A")); assertTrue("testGetCollections 3", c.getSubcommunities().get(1).getName().equals("subcommunity B")); assertTrue("testGetCollections 4", c.getSubcommunities().get(2).getName().equals("subcommunity C")); }
public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); } }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); } protected  Community(); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); } protected  Community(); void removeSubCommunity(Community subCommunity); Bitstream getLogo(); Group getAdministrators(); List<Collection> getCollections(); List<Community> getSubcommunities(); List<Community> getParentCommunities(); void removeParentCommunity(Community parentCommunity); @Override boolean equals(Object other); @Override int hashCode(); @Override int getType(); @Override String getName(); @Override Integer getLegacyId(); }
Community extends DSpaceObject implements DSpaceObjectLegacySupport { public List<Community> getSubcommunities() { Community[] output = subCommunities.toArray(new Community[] {}); Arrays.sort(output, new NameAscendingComparator()); return Arrays.asList(output); } protected  Community(); void removeSubCommunity(Community subCommunity); Bitstream getLogo(); Group getAdministrators(); List<Collection> getCollections(); List<Community> getSubcommunities(); List<Community> getParentCommunities(); void removeParentCommunity(Community parentCommunity); @Override boolean equals(Object other); @Override int hashCode(); @Override int getType(); @Override String getName(); @Override Integer getLegacyId(); static final String COPYRIGHT_TEXT; static final String INTRODUCTORY_TEXT; static final String SHORT_DESCRIPTION; static final String SIDEBAR_TEXT; }