@Test public void testRemoveBundle() throws Exception { View view = getView(); Assert.assertEquals("Should have 20 bundles",view.getBundles().size(), 20); final String bundleName = "bundle_3"; view.removeBundle(bundleName); Assert.assertEquals("Should have 19 bundles", view.getBundles().size(), 19); Bundle bundle = view.getBundleByName(bundleName); Assert.assertNull("Bundle should be null after removal", bundle); }
public void removeBundle(final String bundleName) { final Bundle bundle = getBundleByName(bundleName); if(bundle == null) { return; } this.bundles.remove(bundle); int seqNo = 0; for (Bundle b : this.bundles) { b.setSeqNo(seqNo); seqNo++; } }
View implements Serializable { public void removeBundle(final String bundleName) { final Bundle bundle = getBundleByName(bundleName); if(bundle == null) { return; } this.bundles.remove(bundle); int seqNo = 0; for (Bundle b : this.bundles) { b.setSeqNo(seqNo); seqNo++; } } }
View implements Serializable { public void removeBundle(final String bundleName) { final Bundle bundle = getBundleByName(bundleName); if(bundle == null) { return; } this.bundles.remove(bundle); int seqNo = 0; for (Bundle b : this.bundles) { b.setSeqNo(seqNo); seqNo++; } }  }
View implements Serializable { public void removeBundle(final String bundleName) { final Bundle bundle = getBundleByName(bundleName); if(bundle == null) { return; } this.bundles.remove(bundle); int seqNo = 0; for (Bundle b : this.bundles) { b.setSeqNo(seqNo); seqNo++; } }  String getUrl(); JSONObject getMetadata(); String getMetadataAsString(); void setMetadata(JSONObject metadata); long getId(); void setId(long id); long getOldId(); void setOldId(long oldId); String getUuid(); void setUuid(String uuid); boolean isOnlyForUuId(); void setOnlyForUuId(boolean onlyForUuId); String getName(); void setName(String name); String getDescription(); void setDescription(String description); String getApplication(); void setApplication(String as); String getPage(); void setPage(String ba); long getCreator(); void setCreator(long creator); boolean isPublic(); void setIsPublic(boolean isPublic); boolean isDefault(); void setIsDefault(boolean isDefault); String getPubDomain(); void setPubDomain(String pd); String getLang(); void setLang(String lang); String getType(); void setType(String type); String toString(); Bundle getBundleByName(String bundleName); List<Bundle> getBundles(); void setBundles(List<Bundle> bundles); void addBundle(final Bundle bundle); void removeBundle(final String bundleName); void pushBundleLast(String bundleName); View cloneBasicInfo(); JSONObject getMapOptions(); String getSrsName(); }
View implements Serializable { public void removeBundle(final String bundleName) { final Bundle bundle = getBundleByName(bundleName); if(bundle == null) { return; } this.bundles.remove(bundle); int seqNo = 0; for (Bundle b : this.bundles) { b.setSeqNo(seqNo); seqNo++; } }  String getUrl(); JSONObject getMetadata(); String getMetadataAsString(); void setMetadata(JSONObject metadata); long getId(); void setId(long id); long getOldId(); void setOldId(long oldId); String getUuid(); void setUuid(String uuid); boolean isOnlyForUuId(); void setOnlyForUuId(boolean onlyForUuId); String getName(); void setName(String name); String getDescription(); void setDescription(String description); String getApplication(); void setApplication(String as); String getPage(); void setPage(String ba); long getCreator(); void setCreator(long creator); boolean isPublic(); void setIsPublic(boolean isPublic); boolean isDefault(); void setIsDefault(boolean isDefault); String getPubDomain(); void setPubDomain(String pd); String getLang(); void setLang(String lang); String getType(); void setType(String type); String toString(); Bundle getBundleByName(String bundleName); List<Bundle> getBundles(); void setBundles(List<Bundle> bundles); void addBundle(final Bundle bundle); void removeBundle(final String bundleName); void pushBundleLast(String bundleName); View cloneBasicInfo(); JSONObject getMapOptions(); String getSrsName();  }