Package com.polarion.alm.builder
Interface IWritableRepository
- All Known Subinterfaces:
IBuildInformationRepository,IReportsRepository
public interface IWritableRepository
Write operations for simple structured repository.
- Version:
- $Revision$ $Date$
- Author:
- Stepan Roh, Polarion Software
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFromLocalFile(File file, ILocation location) Copies file or directory to given location.voidmakeFolder(ILocation location) Makes folder on given location.voidmoveFromLocalFile(File file, ILocation location) Moves file or directory to given location.voidremoveLocation(ILocation location) Removes location (being it plain file or folder).voidwriteFile(ILocation location, InputStream data) Stores data in given file.
-
Method Details
-
writeFile
Stores data in given file.Will make parent folders if needed.
- Parameters:
location- locationdata- data- Throws:
IllegalArgumentException- if location isnullIllegalArgumentException- if data isnullIllegalArgumentException- if location is relativeIOException- if error occurs or location is not file
-
makeFolder
Makes folder on given location.Will make parent folders if needed.
It is OK to request making of folder which already exists.
- Parameters:
location- location- Throws:
IllegalArgumentException- if location isnullIllegalArgumentException- if location is relativeIOException- if error occurs or some folder can not be created
-
removeLocation
Removes location (being it plain file or folder).Will remove folder contents if needed.
It is permitted to remove location which does not exist.
- Parameters:
location- location- Throws:
IllegalArgumentException- if location isnullIllegalArgumentException- if location is relativeIOException- if error occurs
-
copyFromLocalFile
Copies file or directory to given location.If given file is real file then file data are written into given location.
If given file is directory then
makeFolder(ILocation)is called on given location and directory contents are (recursively) copied under it.Note that last modification time of target resources will mirror those of source.
- Parameters:
file- file or directory to copy fromlocation- destination location- Throws:
IllegalArgumentException- if file isnullIllegalArgumentException- if file does not existIllegalArgumentException- if location isnullIllegalArgumentException- if location is relativeIOException- if error occurs
-
moveFromLocalFile
Moves file or directory to given location.This is equivalent to
copyFromLocalFile(File, ILocation)followed by deletion of the file, but may be implemented in an optimized way.- Parameters:
file- file or directory to copy fromlocation- destination location- Throws:
IllegalArgumentException- if file isnullIllegalArgumentException- if file does not existIllegalArgumentException- if location isnullIllegalArgumentException- if location is relativeIOException- if error occurs- Since:
- 3.2.1
-