/**
  * This method "normalizes" the paths back to the "level" from where the original item was
  * requested.
  */
 protected void correctPaths(Collection<StorageItem> list) {
   for (StorageItem item : list) {
     if (getPath().endsWith(RepositoryItemUid.PATH_SEPARATOR)) {
       ((AbstractStorageItem) item).setPath(getPath() + item.getName());
     } else {
       ((AbstractStorageItem) item)
           .setPath(getPath() + RepositoryItemUid.PATH_SEPARATOR + item.getName());
     }
   }
 }
Beispiel #2
0
 @Override
 public boolean equals(Object other) {
   if (this == other) {
     return true;
   } else if (other instanceof StorageItem) {
     StorageItem otherItem = (StorageItem) other;
     return ObjectUtils.equals(getStorage(), otherItem.getStorage())
         && ObjectUtils.equals(getPath(), otherItem.getPath());
   } else {
     return false;
   }
 }