1 package org.rundeck.api.domain; 2 3 import java.util.List; 4 import java.util.Map; 5 6 /** 7 * StorageResource represents a directory or a file 8 * 9 * @author Greg Schueler <greg@simplifyops.com> 10 * @since 2014-04-04 11 */ 12 public interface StorageResource { 13 /** 14 * Return the storage path for this resource 15 * 16 * @return 17 */ 18 public String getPath(); 19 20 /** 21 * Return the URL for this resource 22 * 23 * @return 24 */ 25 public String getUrl(); 26 27 /** 28 * Return the file name if this is a file 29 * 30 * @return 31 */ 32 public String getName(); 33 34 /** 35 * Return the metadata for this file if this is a file 36 * 37 * @return 38 */ 39 public Map<String, String> getMetadata(); 40 41 /** 42 * Return true if this is a directory, false if this is a file 43 * 44 * @return 45 */ 46 public boolean isDirectory(); 47 48 /** 49 * Return the list of directory contents if this is a directory 50 * 51 * @return 52 */ 53 public List<? extends StorageResource> getDirectoryContents(); 54 }