Package com.wavemaker.commons.io.store
Interface ResourceStore
-
- All Known Subinterfaces:
FileStore,FolderStore
public interface ResourceStoreBase interface forFileStoreandFolderStore.- See Also:
FileStore,FolderStore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreate()Create the resource when it does not exist.voiddelete()Delete the resource.booleanequals(java.lang.Object obj)Implementations must provide a suitable equals based on the underlying resource.booleanexists()Returns true if the resource exists.ResourcegetExisting(JailedResourcePath path)Return an existing resource for the specified path or null if no resource exists.FilegetFile(JailedResourcePath path)Return a file for the specified path.FoldergetFolder(JailedResourcePath path)Return a folder for the specified path.JailedResourcePathgetPath()Return the path of the current resource.inthashCode()Implementations must provide a suitable hashcode based on the underlying resource.Resourcerename(java.lang.String name)Rename the resource.
-
-
-
Method Detail
-
getPath
JailedResourcePath getPath()
Return the path of the current resource.- Returns:
- the path.
-
getExisting
Resource getExisting(JailedResourcePath path)
Return an existing resource for the specified path or null if no resource exists.- Parameters:
path- the path- Returns:
- the resource
-
getFolder
Folder getFolder(JailedResourcePath path)
Return a folder for the specified path.- Parameters:
path- the path- Returns:
- the folder
-
getFile
File getFile(JailedResourcePath path)
Return a file for the specified path.- Parameters:
path- the path- Returns:
- the file
-
exists
boolean exists()
Returns true if the resource exists.- Returns:
- if the resource exists.
-
rename
Resource rename(java.lang.String name)
Rename the resource.- Parameters:
name- the new name- Returns:
- the resource of the renamed item
-
delete
void delete()
Delete the resource.
-
create
void create()
Create the resource when it does not exist.
-
hashCode
int hashCode()
Implementations must provide a suitable hashcode based on the underlying resource.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code
-
equals
boolean equals(java.lang.Object obj)
Implementations must provide a suitable equals based on the underlying resource.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to compare- Returns:
- true if the items are equal
-
-