public void removeAllObjects() { int rowCount = this.getRowCount(); for (int i = 0; i < rowCount; i++) { this.removeRow(0); } objectList.clear(); }
public void removeAllObjects() { int rowCount = this.getRowCount(); for (int i = 0; i < rowCount; i++) { this.removeRow(0); } objectList.clear(); }
public void removeObject(S3Object object) { sanitizeObjectKey(object); int row = Collections.binarySearch(objectList, object, new Comparator() { public int compare(Object o1, Object o2) { return ((S3Object)o1).getKey().compareToIgnoreCase(((S3Object)o2).getKey()); } }); if (row >= 0) { this.removeRow(row); objectList.remove(row); } }
public void removeObject(S3Object object) { sanitizeObjectKey(object); int row = Collections.binarySearch(objectList, object, new Comparator() { public int compare(Object o1, Object o2) { return ((S3Object)o1).getKey().compareToIgnoreCase(((S3Object)o2).getKey()); } }); if (row >= 0) { this.removeRow(row); objectList.remove(row); } }
public int addObject(S3Object object) { sanitizeObjectKey(object); int insertRow = Collections.binarySearch(objectList, object, new Comparator() { public int compare(Object o1, Object o2) { return ((S3Object)o1).getKey().compareToIgnoreCase(((S3Object)o2).getKey()); } }); String aclStatus = null; if (insertRow >= 0) { // Retain the object's ACL status if it's available. aclStatus = (String) this.getValueAt(insertRow, 3); // We already have an item with this key, replace it. objectList.remove(insertRow); this.removeRow(insertRow); } else { insertRow = (-insertRow) - 1; } if (object.getAcl() != null || aclStatus == null) { aclStatus = CockpitLite.getAclDescription(object.getAcl()); } // New object to insert. objectList.add(insertRow, object); this.insertRow(insertRow, new Object[] {object.getKey(), new Long(object.getContentLength()), object.getLastModifiedDate(), aclStatus}); return insertRow; }
public int addObject(S3Object object) { sanitizeObjectKey(object); int insertRow = Collections.binarySearch(objectList, object, new Comparator() { public int compare(Object o1, Object o2) { return ((S3Object)o1).getKey().compareToIgnoreCase(((S3Object)o2).getKey()); } }); String aclStatus = null; if (insertRow >= 0) { // Retain the object's ACL status if it's available. aclStatus = (String) this.getValueAt(insertRow, 3); // We already have an item with this key, replace it. objectList.remove(insertRow); this.removeRow(insertRow); } else { insertRow = (-insertRow) - 1; } if (object.getAcl() != null || aclStatus == null) { aclStatus = CockpitLite.getAclDescription(object.getAcl()); } // New object to insert. objectList.add(insertRow, object); this.insertRow(insertRow, new Object[] {object.getKey(), new Long(object.getContentLength()), object.getLastModifiedDate(), aclStatus}); return insertRow; }